@seedtactics/insight-client 16.5.0 → 16.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/ProgramHighlight-LvRM40Qr.js +3 -0
- package/dist/assets/index-CbqW4-gR.css +1 -0
- package/dist/assets/index-gAFi3Oss.js +364 -0
- package/dist/assets/roboto-cyrillic-300-normal-DEFNdjk5.woff +0 -0
- package/dist/assets/roboto-cyrillic-300-normal-DzUz0kzv.woff2 +0 -0
- package/dist/assets/{roboto-cyrillic-400-normal-DZJji7Rx.woff → roboto-cyrillic-400-normal-Bjg-1-sg.woff} +0 -0
- package/dist/assets/roboto-cyrillic-400-normal-CBPI_iaY.woff2 +0 -0
- package/dist/assets/{roboto-cyrillic-500-normal-BI4HuXre.woff → roboto-cyrillic-500-normal-CBKMylY4.woff} +0 -0
- package/dist/assets/roboto-cyrillic-500-normal-CLao9AfR.woff2 +0 -0
- package/dist/assets/roboto-cyrillic-700-normal-C2o7G-SM.woff2 +0 -0
- package/dist/assets/{roboto-cyrillic-700-normal-KqaQ5bNp.woff → roboto-cyrillic-700-normal-DhZFXDSN.woff} +0 -0
- package/dist/assets/roboto-cyrillic-ext-300-normal-D7ank4TF.woff +0 -0
- package/dist/assets/roboto-cyrillic-ext-300-normal-DIxttMbC.woff2 +0 -0
- package/dist/assets/{roboto-cyrillic-ext-400-normal-DtZHuW6i.woff → roboto-cyrillic-ext-400-normal-CaK1767H.woff} +0 -0
- package/dist/assets/roboto-cyrillic-ext-400-normal-qHufge6k.woff2 +0 -0
- package/dist/assets/roboto-cyrillic-ext-500-normal-BWC_xYeb.woff2 +0 -0
- package/dist/assets/roboto-cyrillic-ext-500-normal-DqF2hftb.woff +0 -0
- package/dist/assets/roboto-cyrillic-ext-700-normal-CI7FH63F.woff +0 -0
- package/dist/assets/roboto-cyrillic-ext-700-normal-DmFxo5wj.woff2 +0 -0
- package/dist/assets/roboto-greek-300-normal-C_Dgaih9.woff +0 -0
- package/dist/assets/roboto-greek-300-normal-DJEM9B4Z.woff2 +0 -0
- package/dist/assets/{roboto-greek-400-normal-CcizSnRP.woff → roboto-greek-400-normal-Bb5mj_fZ.woff} +0 -0
- package/dist/assets/roboto-greek-400-normal-ai2Z1K3C.woff2 +0 -0
- package/dist/assets/roboto-greek-500-normal-C9AnhcmC.woff2 +0 -0
- package/dist/assets/{roboto-greek-500-normal-BLLWU9W-.woff → roboto-greek-500-normal-oCqhoyfc.woff} +0 -0
- package/dist/assets/roboto-greek-700-normal-0aHWxGLu.woff2 +0 -0
- package/dist/assets/{roboto-greek-700-normal-D3kmAf0K.woff → roboto-greek-700-normal-DjRqqLBV.woff} +0 -0
- package/dist/assets/roboto-latin-300-normal-BARJ-h6h.woff +0 -0
- package/dist/assets/roboto-latin-300-normal-CCzlftfr.woff2 +0 -0
- package/dist/assets/roboto-latin-400-normal-BqEyEoaF.woff2 +0 -0
- package/dist/assets/{roboto-latin-400-normal-068yxgMN.woff → roboto-latin-400-normal-DyYNIH4P.woff} +0 -0
- package/dist/assets/roboto-latin-500-normal-7RbcRiD8.woff2 +0 -0
- package/dist/assets/roboto-latin-500-normal-DQZyH_nt.woff +0 -0
- package/dist/assets/roboto-latin-700-normal-BZpUvMxY.woff2 +0 -0
- package/dist/assets/roboto-latin-700-normal-DLgJJpmK.woff +0 -0
- package/dist/assets/roboto-latin-ext-300-normal-B90pq-BC.woff2 +0 -0
- package/dist/assets/roboto-latin-ext-300-normal-CTCCHkZF.woff +0 -0
- package/dist/assets/roboto-latin-ext-400-normal-C3tdtHj3.woff2 +0 -0
- package/dist/assets/roboto-latin-ext-400-normal-scX0fKtV.woff +0 -0
- package/dist/assets/roboto-latin-ext-500-normal-Cyc0AKLz.woff +0 -0
- package/dist/assets/roboto-latin-ext-500-normal-pMCM9Ixg.woff2 +0 -0
- package/dist/assets/roboto-latin-ext-700-normal-BUhwtWwy.woff +0 -0
- package/dist/assets/roboto-latin-ext-700-normal-DSBUz0N1.woff2 +0 -0
- package/dist/assets/roboto-math-300-normal-5dF_7mZP.woff2 +0 -0
- package/dist/assets/roboto-math-300-normal-Ds0YpBw2.woff +0 -0
- package/dist/assets/roboto-math-400-normal-BEFej5gc.woff2 +0 -0
- package/dist/assets/{roboto-math-400-normal-rzxYvyVt.woff → roboto-math-400-normal-C9RxBKAh.woff} +0 -0
- package/dist/assets/{roboto-math-500-normal-DaFX-ZC8.woff → roboto-math-500-normal-C-7mKPO3.woff} +0 -0
- package/dist/assets/roboto-math-500-normal-C4NU9gLX.woff2 +0 -0
- package/dist/assets/roboto-math-700-normal-B8YqGHVc.woff2 +0 -0
- package/dist/assets/roboto-math-700-normal-DVoD5t2k.woff +0 -0
- package/dist/assets/roboto-symbols-300-normal-BCnjhQd_.woff +0 -0
- package/dist/assets/roboto-symbols-300-normal-DDU7avhj.woff2 +0 -0
- package/dist/assets/roboto-symbols-400-normal-CB1Ce4Gk.woff2 +0 -0
- package/dist/assets/roboto-symbols-400-normal-DLYbZahX.woff +0 -0
- package/dist/assets/roboto-symbols-500-normal-B_CZKVJS.woff2 +0 -0
- package/dist/assets/roboto-symbols-500-normal-F7c8nfcH.woff +0 -0
- package/dist/assets/roboto-symbols-700-normal-BiFDindJ.woff2 +0 -0
- package/dist/assets/roboto-symbols-700-normal-BoS6HWkc.woff +0 -0
- package/dist/assets/roboto-vietnamese-300-normal-BPvXm_f1.woff2 +0 -0
- package/dist/assets/roboto-vietnamese-300-normal-INUupD3o.woff +0 -0
- package/dist/assets/roboto-vietnamese-400-normal-D2PTxGxD.woff2 +0 -0
- package/dist/assets/{roboto-vietnamese-400-normal-DmXaN3yE.woff → roboto-vietnamese-400-normal-DnpnVwnf.woff} +0 -0
- package/dist/assets/roboto-vietnamese-500-normal-B3ncpOoB.woff2 +0 -0
- package/dist/assets/{roboto-vietnamese-500-normal-DW96CsrR.woff → roboto-vietnamese-500-normal-D380IkQ8.woff} +0 -0
- package/dist/assets/roboto-vietnamese-700-normal-BEVeWqJt.woff2 +0 -0
- package/dist/assets/{roboto-vietnamese-700-normal-Dz0HwF-w.woff → roboto-vietnamese-700-normal-DsFyXAL4.woff} +0 -0
- package/dist/components/App.d.ts +1 -1
- package/dist/components/BarcodeScanning.d.ts +3 -3
- package/dist/components/ChooseOperator.d.ts +1 -1
- package/dist/components/LoadingIcon.d.ts +1 -1
- package/dist/components/LogEntry.d.ts +2 -2
- package/dist/components/ManualSerialEntry.d.ts +2 -2
- package/dist/components/MonthSelect.d.ts +1 -1
- package/dist/components/analysis/AnalysisSelectToolbar.d.ts +1 -1
- package/dist/components/analysis/CostPerPiece.d.ts +1 -1
- package/dist/components/analysis/CycleChart.d.ts +1 -1
- package/dist/components/analysis/DataTable.d.ts +2 -2
- package/dist/components/analysis/InspectionDataTable.d.ts +1 -1
- package/dist/components/analysis/StationDataTable.d.ts +1 -1
- package/dist/components/analysis/ToolReplacements.d.ts +1 -1
- package/dist/components/operations/ChartRangeEdit.d.ts +2 -2
- package/dist/components/operations/CurrentWorkorders.d.ts +3 -2
- package/dist/components/operations/OEEChart.d.ts +2 -2
- package/dist/components/operations/RecentSchedules.d.ts +1 -1
- package/dist/components/quality/QualityPaths.d.ts +1 -1
- package/dist/components/station-monitor/BulkRawMaterial.d.ts +2 -2
- package/dist/components/station-monitor/CustomStationMonitorDialog.d.ts +2 -1
- package/dist/components/station-monitor/Material.d.ts +9 -9
- package/dist/components/station-monitor/MoveMaterialArrows.d.ts +2 -2
- package/dist/components/station-monitor/Queues.d.ts +1 -1
- package/dist/components/station-monitor/SelectInspType.d.ts +1 -1
- package/dist/components/station-monitor/SelectWorkorder.d.ts +1 -1
- package/dist/components/station-monitor/SystemOverview.d.ts +4 -4
- package/dist/components/station-monitor/Whiteboard.d.ts +1 -1
- package/dist/index.html +2 -2
- package/dist/network/api.d.ts +40 -2
- package/dist/network/api.js +62 -0
- package/package.json +20 -20
- package/dist/assets/ProgramHighlight-C7lr7YIr.js +0 -3
- package/dist/assets/index-WWzKpVgW.js +0 -346
- package/dist/assets/index-ZBfg6YlO.css +0 -1
- package/dist/assets/roboto-cyrillic-300-normal-BoeCr7ev.woff2 +0 -0
- package/dist/assets/roboto-cyrillic-300-normal-D568C3aM.woff +0 -0
- package/dist/assets/roboto-cyrillic-400-normal-DAIM1_dR.woff2 +0 -0
- package/dist/assets/roboto-cyrillic-500-normal-hCeO1jFL.woff2 +0 -0
- package/dist/assets/roboto-cyrillic-700-normal-BiSG5NnW.woff2 +0 -0
- package/dist/assets/roboto-cyrillic-ext-300-normal-CUPJdUZp.woff2 +0 -0
- package/dist/assets/roboto-cyrillic-ext-300-normal-DQdcc27I.woff +0 -0
- package/dist/assets/roboto-cyrillic-ext-400-normal-DzMWdK87.woff2 +0 -0
- package/dist/assets/roboto-cyrillic-ext-500-normal-B7rQpwPu.woff2 +0 -0
- package/dist/assets/roboto-cyrillic-ext-500-normal-C927yMrb.woff +0 -0
- package/dist/assets/roboto-cyrillic-ext-700-normal-BuQgZIrO.woff +0 -0
- package/dist/assets/roboto-cyrillic-ext-700-normal-UFn0vR9r.woff2 +0 -0
- package/dist/assets/roboto-greek-300-normal-CTj2MfNN.woff +0 -0
- package/dist/assets/roboto-greek-300-normal-Cnub06j7.woff2 +0 -0
- package/dist/assets/roboto-greek-400-normal-jFM2czAU.woff2 +0 -0
- package/dist/assets/roboto-greek-500-normal-BJMS0heP.woff2 +0 -0
- package/dist/assets/roboto-greek-700-normal-BcGn9doz.woff2 +0 -0
- package/dist/assets/roboto-latin-300-normal-CztWkFGs.woff2 +0 -0
- package/dist/assets/roboto-latin-300-normal-KByCBsad.woff +0 -0
- package/dist/assets/roboto-latin-400-normal-CNwBRw8h.woff2 +0 -0
- package/dist/assets/roboto-latin-500-normal-CC5nhZkh.woff +0 -0
- package/dist/assets/roboto-latin-500-normal-CkrA1NAy.woff2 +0 -0
- package/dist/assets/roboto-latin-700-normal-CXeAXeti.woff2 +0 -0
- package/dist/assets/roboto-latin-700-normal-DUekQERp.woff +0 -0
- package/dist/assets/roboto-latin-ext-300-normal-BOz0oSmX.woff2 +0 -0
- package/dist/assets/roboto-latin-ext-300-normal-Tcf9y2tg.woff +0 -0
- package/dist/assets/roboto-latin-ext-400-normal-ZYmyxeOy.woff2 +0 -0
- package/dist/assets/roboto-latin-ext-400-normal-eTRLN0Nt.woff +0 -0
- package/dist/assets/roboto-latin-ext-500-normal-C_ARlJGk.woff2 +0 -0
- package/dist/assets/roboto-latin-ext-500-normal-FFcS8vBN.woff +0 -0
- package/dist/assets/roboto-latin-ext-700-normal-70GS1MYH.woff2 +0 -0
- package/dist/assets/roboto-latin-ext-700-normal-BS1OuQqR.woff +0 -0
- package/dist/assets/roboto-math-300-normal-BMxwzQmU.woff2 +0 -0
- package/dist/assets/roboto-math-300-normal-BU9CUCyj.woff +0 -0
- package/dist/assets/roboto-math-400-normal-B3wgz80t.woff2 +0 -0
- package/dist/assets/roboto-math-500-normal-CFNaIMFC.woff2 +0 -0
- package/dist/assets/roboto-math-700-normal-VUAI6Bz2.woff2 +0 -0
- package/dist/assets/roboto-math-700-normal-pYD1nhov.woff +0 -0
- package/dist/assets/roboto-symbols-300-normal-BtHl5mYl.woff2 +0 -0
- package/dist/assets/roboto-symbols-300-normal-kyoSXp-d.woff +0 -0
- package/dist/assets/roboto-symbols-400-normal-Tzuungub.woff +0 -0
- package/dist/assets/roboto-symbols-400-normal-fF1SLJBj.woff2 +0 -0
- package/dist/assets/roboto-symbols-500-normal-BXFTxrNR.woff2 +0 -0
- package/dist/assets/roboto-symbols-500-normal-CAhAe-ik.woff +0 -0
- package/dist/assets/roboto-symbols-700-normal-CuuvBBxy.woff +0 -0
- package/dist/assets/roboto-symbols-700-normal-rJi6RjIy.woff2 +0 -0
- package/dist/assets/roboto-vietnamese-300-normal-CNeuLW5X.woff2 +0 -0
- package/dist/assets/roboto-vietnamese-300-normal-DXBG9gdz.woff +0 -0
- package/dist/assets/roboto-vietnamese-400-normal-CDDxGrUb.woff2 +0 -0
- package/dist/assets/roboto-vietnamese-500-normal-HYpufUYk.woff2 +0 -0
- package/dist/assets/roboto-vietnamese-700-normal-iKxYNAzq.woff2 +0 -0
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ee=/\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function j(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function te(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,te(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+A(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(ee,`$&/`)+`/`),te(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ee,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+A(a,u),c+=te(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+A(a,u++),c+=te(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return te(j(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function M(e,t,n){if(e==null)return e;var r=[],i=0;return te(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ne(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var N=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},P={map:M,forEach:function(e,t,n){M(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return M(e,function(){t++}),t},toArray:function(e){return M(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=P,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ne}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,N)}catch(e){N(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.4`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&A(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&A(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,ee=k.port2;k.port1.onmessage=D,O=function(){ee.postMessage(null)}}else O=function(){_(D,0)};function A(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,A(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.4`})),h=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=p(),n=d(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var m=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),ee=Symbol.for(`react.memo_cache_sentinel`),A=Symbol.iterator;function j(e){return typeof e!=`object`||!e?null:(e=A&&e[A]||e[`@@iterator`],typeof e==`function`?e:null)}var te=Symbol.for(`react.client.reference`);function M(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?M(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return M(e(t))}catch{}}return null}var ne=Array.isArray,N=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re={pending:!1,data:null,method:null,action:null},ie=[],ae=-1;function oe(e){return{current:e}}function se(e){0>ae||(e.current=ie[ae],ie[ae]=null,ae--)}function ce(e,t){ae++,ie[ae]=e.current,e.current=t}var le=oe(null),ue=oe(null),de=oe(null),F=oe(null);function fe(e,t){switch(ce(de,t),ce(ue,e),ce(le,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Xd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Xd(t),e=Zd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}se(le),ce(le,e)}function pe(){se(le),se(ue),se(de)}function me(e){e.memoizedState!==null&&ce(F,e);var t=le.current,n=Zd(t,e.type);t!==n&&(ce(ue,e),ce(le,n))}function he(e){ue.current===e&&(se(le),se(ue)),F.current===e&&(se(F),sp._currentValue=re)}var ge,_e;function I(e){if(ge===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ge=t&&t[1]||``,_e=-1<e.stack.indexOf(`
|
|
2
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
|
+
`+ge+e+_e}var ve=!1;function ye(e,t){if(!e||ve)return``;ve=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
4
|
+
`),l=s.split(`
|
|
5
|
+
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
6
|
+
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ve=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?I(n):``}function be(e,t){switch(e.tag){case 26:case 27:case 5:return I(e.type);case 16:return I(`Lazy`);case 13:return e.child!==t&&t!==null?I(`Suspense Fallback`):I(`Suspense`);case 19:return I(`SuspenseList`);case 0:case 15:return ye(e.type,!1);case 11:return ye(e.type.render,!1);case 1:return ye(e.type,!0);case 31:return I(`Activity`);default:return``}}function xe(e){try{var t=``,n=null;do t+=be(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
|
+
Error generating stack: `+e.message+`
|
|
8
|
+
`+e.stack}}var Se=Object.prototype.hasOwnProperty,Ce=t.unstable_scheduleCallback,we=t.unstable_cancelCallback,Te=t.unstable_shouldYield,Ee=t.unstable_requestPaint,De=t.unstable_now,Oe=t.unstable_getCurrentPriorityLevel,ke=t.unstable_ImmediatePriority,Ae=t.unstable_UserBlockingPriority,je=t.unstable_NormalPriority,Me=t.unstable_LowPriority,Ne=t.unstable_IdlePriority,Pe=t.log,Fe=t.unstable_setDisableYieldValue,Ie=null,Le=null;function Re(e){if(typeof Pe==`function`&&Fe(e),Le&&typeof Le.setStrictMode==`function`)try{Le.setStrictMode(Ie,e)}catch{}}var ze=Math.clz32?Math.clz32:He,Be=Math.log,Ve=Math.LN2;function He(e){return e>>>=0,e===0?32:31-(Be(e)/Ve|0)|0}var Ue=256,We=262144,Ge=4194304;function Ke(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function qe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ke(n))):i=Ke(o):i=Ke(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ke(n))):i=Ke(o)):i=Ke(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Je(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ye(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Xe(){var e=Ge;return Ge<<=1,!(Ge&62914560)&&(Ge=4194304),e}function Ze(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Qe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function $e(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-ze(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&et(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function et(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-ze(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function tt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ze(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function nt(e,t){var n=t&-t;return n=n&42?1:rt(n),(n&(e.suspendedLanes|t))===0?n:0}function rt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function it(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function at(){var e=P.p;return e===0?(e=window.event,e===void 0?32:Cp(e.type)):e}function ot(e,t){var n=P.p;try{return P.p=e,t()}finally{P.p=n}}var st=Math.random().toString(36).slice(2),ct=`__reactFiber$`+st,lt=`__reactProps$`+st,ut=`__reactContainer$`+st,dt=`__reactEvents$`+st,ft=`__reactListeners$`+st,pt=`__reactHandles$`+st,mt=`__reactResources$`+st,ht=`__reactMarker$`+st;function gt(e){delete e[ct],delete e[lt],delete e[dt],delete e[ft],delete e[pt]}function _t(e){var t=e[ct];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ut]||n[ct]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=bf(e);e!==null;){if(n=e[ct])return n;e=bf(e)}return t}e=n,n=e.parentNode}return null}function vt(e){if(e=e[ct]||e[ut]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function yt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function bt(e){var t=e[mt];return t||=e[mt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function xt(e){e[ht]=!0}var St=new Set,Ct={};function wt(e,t){Tt(e,t),Tt(e+`Capture`,t)}function Tt(e,t){for(Ct[e]=t,e=0;e<t.length;e++)St.add(t[e])}var Et=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Dt={},Ot={};function kt(e){return Se.call(Ot,e)?!0:Se.call(Dt,e)?!1:Et.test(e)?Ot[e]=!0:(Dt[e]=!0,!1)}function L(e,t,n){if(kt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function At(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function jt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Mt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Nt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Pt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ft(e){if(!e._valueTracker){var t=Nt(e)?`checked`:`value`;e._valueTracker=Pt(e,t,``+e[t])}}function It(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Nt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Lt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Rt=/[\n"\\]/g;function zt(e){return e.replace(Rt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Bt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Mt(t)):e.value!==``+Mt(t)&&(e.value=``+Mt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Ht(e,o,Mt(n)):Ht(e,o,Mt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Mt(s):e.removeAttribute(`name`)}function Vt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Ft(e);return}n=n==null?``:``+Mt(n),t=t==null?n:``+Mt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Ft(e)}function Ht(e,t,n){t===`number`&&Lt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ut(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Mt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Wt(e,t,n){if(t!=null&&(t=``+Mt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Mt(n)}function Gt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ne(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Mt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Ft(e)}function Kt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var qt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Jt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||qt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Yt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Jt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Jt(e,o,t[o])}function Xt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Zt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Qt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function $t(e){return Qt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function en(){}var tn=null;function nn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var rn=null,R=null;function an(e){var t=vt(e);if(t&&(e=t.stateNode)){var n=e[lt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Bt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+zt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[lt]||null;if(!a)throw Error(i(90));Bt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&It(r)}break a;case`textarea`:Wt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ut(e,!!n.multiple,t,!1)}}}var on=!1;function sn(e,t,n){if(on)return e(t,n);on=!0;try{return e(t)}finally{if(on=!1,(rn!==null||R!==null)&&(Eu(),rn&&(t=rn,e=R,R=rn=null,an(t),e)))for(t=0;t<e.length;t++)an(e[t])}}function cn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[lt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var ln=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),un=!1;if(ln)try{var dn={};Object.defineProperty(dn,`passive`,{get:function(){un=!0}}),window.addEventListener(`test`,dn,dn),window.removeEventListener(`test`,dn,dn)}catch{un=!1}var fn=null,pn=null,mn=null;function hn(){if(mn)return mn;var e,t=pn,n=t.length,r,i=`value`in fn?fn.value:fn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return mn=i.slice(e,1<r?1-r:void 0)}function gn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function _n(){return!0}function vn(){return!1}function yn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?_n:vn,this.isPropagationStopped=vn,this}return m(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=_n)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=_n)},persist:function(){},isPersistent:_n}),t}var bn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xn=yn(bn),Sn=m({},bn,{view:0,detail:0}),Cn=yn(Sn),wn,Tn,En,Dn=m({},Sn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==En&&(En&&e.type===`mousemove`?(wn=e.screenX-En.screenX,Tn=e.screenY-En.screenY):Tn=wn=0,En=e),wn)},movementY:function(e){return`movementY`in e?e.movementY:Tn}}),On=yn(Dn),kn=yn(m({},Dn,{dataTransfer:0})),An=yn(m({},Sn,{relatedTarget:0})),jn=yn(m({},bn,{animationName:0,elapsedTime:0,pseudoElement:0})),Mn=yn(m({},bn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Nn=yn(m({},bn,{data:0})),Pn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Fn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},In={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Ln(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=In[e])?!!t[e]:!1}function Rn(){return Ln}var zn=yn(m({},Sn,{key:function(e){if(e.key){var t=Pn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=gn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Fn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rn,charCode:function(e){return e.type===`keypress`?gn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?gn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Bn=yn(m({},Dn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Vn=yn(m({},Sn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rn})),Hn=yn(m({},bn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Un=yn(m({},Dn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Wn=yn(m({},bn,{newState:0,oldState:0})),Gn=[9,13,27,32],Kn=ln&&`CompositionEvent`in window,qn=null;ln&&`documentMode`in document&&(qn=document.documentMode);var Jn=ln&&`TextEvent`in window&&!qn,Yn=ln&&(!Kn||qn&&8<qn&&11>=qn),Xn=` `,Zn=!1;function Qn(e,t){switch(e){case`keyup`:return Gn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function $n(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var er=!1;function tr(e,t){switch(e){case`compositionend`:return $n(t);case`keypress`:return t.which===32?(Zn=!0,Xn):null;case`textInput`:return e=t.data,e===Xn&&Zn?null:e;default:return null}}function nr(e,t){if(er)return e===`compositionend`||!Kn&&Qn(e,t)?(e=hn(),mn=pn=fn=null,er=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Yn&&t.locale!==`ko`?null:t.data;default:return null}}var rr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ir(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!rr[e.type]:t===`textarea`}function ar(e,t,n,r){rn?R?R.push(r):R=[r]:rn=r,t=Pd(t,`onChange`),0<t.length&&(n=new xn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var or=null,sr=null;function cr(e){Ed(e,0)}function lr(e){if(It(yt(e)))return e}function ur(e,t){if(e===`change`)return t}var dr=!1;if(ln){var fr;if(ln){var pr=`oninput`in document;if(!pr){var mr=document.createElement(`div`);mr.setAttribute(`oninput`,`return;`),pr=typeof mr.oninput==`function`}fr=pr}else fr=!1;dr=fr&&(!document.documentMode||9<document.documentMode)}function hr(){or&&(or.detachEvent(`onpropertychange`,gr),sr=or=null)}function gr(e){if(e.propertyName===`value`&&lr(sr)){var t=[];ar(t,sr,e,nn(e)),sn(cr,t)}}function _r(e,t,n){e===`focusin`?(hr(),or=t,sr=n,or.attachEvent(`onpropertychange`,gr)):e===`focusout`&&hr()}function vr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return lr(sr)}function yr(e,t){if(e===`click`)return lr(t)}function br(e,t){if(e===`input`||e===`change`)return lr(t)}function xr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Sr=typeof Object.is==`function`?Object.is:xr;function Cr(e,t){if(Sr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Se.call(t,i)||!Sr(e[i],t[i]))return!1}return!0}function wr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Tr(e,t){var n=wr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=wr(n)}}function Er(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Er(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Lt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Lt(e.document)}return t}function Or(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var kr=ln&&`documentMode`in document&&11>=document.documentMode,Ar=null,jr=null,Mr=null,Nr=!1;function Pr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Nr||Ar==null||Ar!==Lt(r)||(r=Ar,`selectionStart`in r&&Or(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Mr&&Cr(Mr,r)||(Mr=r,r=Pd(jr,`onSelect`),0<r.length&&(t=new xn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Ar)))}function Fr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Ir={animationend:Fr(`Animation`,`AnimationEnd`),animationiteration:Fr(`Animation`,`AnimationIteration`),animationstart:Fr(`Animation`,`AnimationStart`),transitionrun:Fr(`Transition`,`TransitionRun`),transitionstart:Fr(`Transition`,`TransitionStart`),transitioncancel:Fr(`Transition`,`TransitionCancel`),transitionend:Fr(`Transition`,`TransitionEnd`)},Lr={},Rr={};ln&&(Rr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Ir.animationend.animation,delete Ir.animationiteration.animation,delete Ir.animationstart.animation),`TransitionEvent`in window||delete Ir.transitionend.transition);function zr(e){if(Lr[e])return Lr[e];if(!Ir[e])return e;var t=Ir[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Rr)return Lr[e]=t[n];return e}var Br=zr(`animationend`),Vr=zr(`animationiteration`),Hr=zr(`animationstart`),Ur=zr(`transitionrun`),Wr=zr(`transitionstart`),Gr=zr(`transitioncancel`),z=zr(`transitionend`),Kr=new Map,qr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);qr.push(`scrollEnd`);function B(e,t){Kr.set(e,t),wt(t,[e])}var Jr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Yr=[],Xr=0,Zr=0;function Qr(){for(var e=Xr,t=Zr=Xr=0;t<e;){var n=Yr[t];Yr[t++]=null;var r=Yr[t];Yr[t++]=null;var i=Yr[t];Yr[t++]=null;var a=Yr[t];if(Yr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ni(n,i,a)}}function $r(e,t,n,r){Yr[Xr++]=e,Yr[Xr++]=t,Yr[Xr++]=n,Yr[Xr++]=r,Zr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ei(e,t,n,r){return $r(e,t,n,r),ri(e)}function ti(e,t){return $r(e,null,null,t),ri(e)}function ni(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-ze(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ri(e){if(50<_u)throw _u=0,vu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ii={};function ai(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function oi(e,t,n,r){return new ai(e,t,n,r)}function si(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ci(e,t){var n=e.alternate;return n===null?(n=oi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function li(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ui(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)si(e)&&(s=1);else if(typeof e==`string`)s=Qf(e,n,le.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=oi(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return di(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=oi(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=oi(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=oi(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=oi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function di(e,t,n,r){return e=oi(7,e,r,t),e.lanes=n,e}function fi(e,t,n){return e=oi(6,e,null,t),e.lanes=n,e}function pi(e){var t=oi(18,null,null,0);return t.stateNode=e,t}function mi(e,t,n){return t=oi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var hi=new WeakMap;function gi(e,t){if(typeof e==`object`&&e){var n=hi.get(e);return n===void 0?(t={value:e,source:t,stack:xe(t)},hi.set(e,t),t):n}return{value:e,source:t,stack:xe(t)}}var _i=[],vi=0,yi=null,bi=0,xi=[],Si=0,Ci=null,wi=1,Ti=``;function Ei(e,t){_i[vi++]=bi,_i[vi++]=yi,yi=e,bi=t}function Di(e,t,n){xi[Si++]=wi,xi[Si++]=Ti,xi[Si++]=Ci,Ci=e;var r=wi;e=Ti;var i=32-ze(r)-1;r&=~(1<<i),n+=1;var a=32-ze(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,wi=1<<32-ze(t)+i|n<<i|r,Ti=a+e}else wi=1<<a|n<<i|r,Ti=e}function Oi(e){e.return!==null&&(Ei(e,1),Di(e,1,0))}function ki(e){for(;e===yi;)yi=_i[--vi],_i[vi]=null,bi=_i[--vi],_i[vi]=null;for(;e===Ci;)Ci=xi[--Si],xi[Si]=null,Ti=xi[--Si],xi[Si]=null,wi=xi[--Si],xi[Si]=null}function Ai(e,t){xi[Si++]=wi,xi[Si++]=Ti,xi[Si++]=Ci,wi=t.id,Ti=t.overflow,Ci=e}var ji=null,Mi=null,Ni=!1,Pi=null,Fi=!1,Ii=Error(i(519));function Li(e){throw Ui(gi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ii}function Ri(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ct]=e,t[lt]=r,n){case`dialog`:Dd(`cancel`,t),Dd(`close`,t);break;case`iframe`:case`object`:case`embed`:Dd(`load`,t);break;case`video`:case`audio`:for(n=0;n<wd.length;n++)Dd(wd[n],t);break;case`source`:Dd(`error`,t);break;case`img`:case`image`:case`link`:Dd(`error`,t),Dd(`load`,t);break;case`details`:Dd(`toggle`,t);break;case`input`:Dd(`invalid`,t),Vt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Dd(`invalid`,t);break;case`textarea`:Dd(`invalid`,t),Gt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Bd(t.textContent,n)?(r.popover!=null&&(Dd(`beforetoggle`,t),Dd(`toggle`,t)),r.onScroll!=null&&Dd(`scroll`,t),r.onScrollEnd!=null&&Dd(`scrollend`,t),r.onClick!=null&&(t.onclick=en),t=!0):t=!1,t||Li(e,!0)}function zi(e){for(ji=e.return;ji;)switch(ji.tag){case 5:case 31:case 13:Fi=!1;return;case 27:case 3:Fi=!0;return;default:ji=ji.return}}function Bi(e){if(e!==ji)return!1;if(!Ni)return zi(e),Ni=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Qd(e.type,e.memoizedProps)),n=!n),n&&Mi&&Li(e),zi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Mi=yf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Mi=yf(e)}else t===27?(t=Mi,sf(e.type)?(e=vf,vf=null,Mi=e):Mi=t):Mi=ji?_f(e.stateNode.nextSibling):null;return!0}function Vi(){Mi=ji=null,Ni=!1}function Hi(){var e=Pi;return e!==null&&(ru===null?ru=e:ru.push.apply(ru,e),Pi=null),e}function Ui(e){Pi===null?Pi=[e]:Pi.push(e)}var Wi=oe(null),Gi=null,Ki=null;function qi(e,t,n){ce(Wi,t._currentValue),t._currentValue=n}function Ji(e){e._currentValue=Wi.current,se(Wi)}function Yi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Xi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Yi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Yi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Zi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Sr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===F.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[sp]:e.push(sp))}a=a.return}e!==null&&Xi(t,e,n,r),t.flags|=262144}function Qi(e){for(e=e.firstContext;e!==null;){if(!Sr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function $i(e){Gi=e,Ki=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ea(e){return na(Gi,e)}function ta(e,t){return Gi===null&&$i(e),na(e,t)}function na(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ki===null){if(e===null)throw Error(i(308));Ki=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ki=Ki.next=t;return n}var ra=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ia=t.unstable_scheduleCallback,aa=t.unstable_NormalPriority,oa={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function sa(){return{controller:new ra,data:new Map,refCount:0}}function ca(e){e.refCount--,e.refCount===0&&ia(aa,function(){e.controller.abort()})}var la=null,ua=0,da=0,fa=null;function pa(e,t){if(la===null){var n=la=[];ua=0,da=vd(),fa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ua++,t.then(ma,ma),t}function ma(){if(--ua===0&&la!==null){fa!==null&&(fa.status=`fulfilled`);var e=la;la=null,da=0,fa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ha(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ga=N.S;N.S=function(e,t){ou=De(),typeof t==`object`&&t&&typeof t.then==`function`&&pa(e,t),ga!==null&&ga(e,t)};var _a=oe(null);function va(){var e=_a.current;return e===null?Hl.pooledCache:e}function ya(e,t){t===null?ce(_a,_a.current):ce(_a,t.pool)}function ba(){var e=va();return e===null?null:{parent:oa._currentValue,pool:e}}var xa=Error(i(460)),Sa=Error(i(474)),Ca=Error(i(542)),wa={then:function(){}};function Ta(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ea(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(en,en),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Aa(e),e;default:if(typeof t.status==`string`)t.then(en,en);else{if(e=Hl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Aa(e),e}throw Oa=t,xa}}function Da(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Oa=e,xa):e}}var Oa=null;function ka(){if(Oa===null)throw Error(i(459));var e=Oa;return Oa=null,e}function Aa(e){if(e===xa||e===Ca)throw Error(i(483))}var ja=null,Ma=0;function Na(e){var t=Ma;return Ma+=1,ja===null&&(ja=[]),Ea(ja,e,t)}function Pa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Fa(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ia(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ci(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=fi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&Da(i)===t.type)?(t=a(t,n.props),Pa(t,n),t.return=e,t):(t=ui(n.type,n.key,n.props,null,e.mode,r),Pa(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=mi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=di(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=fi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=ui(t.type,t.key,t.props,null,e.mode,n),Pa(n,t),n.return=e,n;case v:return t=mi(t,e.mode,n),t.return=e,t;case O:return t=Da(t),f(e,t,n)}if(ne(t)||j(t))return t=di(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Na(t),n);if(t.$$typeof===C)return f(e,ta(e,t),n);Fa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=Da(n),p(e,t,n,r)}if(ne(n)||j(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Na(n),r);if(n.$$typeof===C)return p(e,t,ta(e,n),r);Fa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=Da(r),m(e,t,n,r,i)}if(ne(r)||j(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Na(r),i);if(r.$$typeof===C)return m(e,t,n,ta(t,r),i);Fa(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Ni&&Ei(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Ni&&Ei(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Ni&&Ei(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Ni&&Ei(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ni&&Ei(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Ni&&Ei(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&Da(l)===r.type){n(e,r.sibling),c=a(r,o.props),Pa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=di(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ui(o.type,o.key,o.props,null,e.mode,c),Pa(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=mi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Da(o),b(e,r,o,c)}if(ne(o))return h(e,r,o,c);if(j(o)){if(l=j(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Na(o),c);if(o.$$typeof===C)return b(e,r,ta(e,o),c);Fa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=fi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ma=0;var i=b(e,t,n,r);return ja=null,i}catch(t){if(t===xa||t===Ca)throw t;var a=oi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var La=Ia(!0),Ra=Ia(!1),za=!1;function Ba(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Va(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ha(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ua(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Vl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ri(e),ni(e,null,n),t}return $r(e,r,t,n),ri(e)}function Wa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,tt(e,n)}}function Ga(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ka=!1;function qa(){if(Ka){var e=fa;if(e!==null)throw e}}function Ja(e,t,n,r){Ka=!1;var i=e.updateQueue;za=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Wl&f)===f:(r&f)===f){f!==0&&f===da&&(Ka=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=m({},d,f);break a;case 2:za=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Zl|=o,e.lanes=o,e.memoizedState=d}}function Ya(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Xa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ya(n[e],t)}var Za=oe(null),Qa=oe(0);function $a(e,t){e=Yl,ce(Qa,e),ce(Za,t),Yl=e|t.baseLanes}function eo(){ce(Qa,Yl),ce(Za,Za.current)}function to(){Yl=Qa.current,se(Za),se(Qa)}var no=oe(null),ro=null;function io(e){var t=e.alternate;ce(lo,lo.current&1),ce(no,e),ro===null&&(t===null||Za.current!==null||t.memoizedState!==null)&&(ro=e)}function ao(e){ce(lo,lo.current),ce(no,e),ro===null&&(ro=e)}function oo(e){e.tag===22?(ce(lo,lo.current),ce(no,e),ro===null&&(ro=e)):so(e)}function so(){ce(lo,lo.current),ce(no,no.current)}function co(e){se(no),ro===e&&(ro=null),se(lo)}var lo=oe(0);function uo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||mf(n)||hf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var fo=0,po=null,mo=null,ho=null,go=!1,_o=!1,vo=!1,yo=0,bo=0,xo=null,So=0;function Co(){throw Error(i(321))}function wo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Sr(e[n],t[n]))return!1;return!0}function To(e,t,n,r,i,a){return fo=a,po=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=e===null||e.memoizedState===null?zs:Bs,vo=!1,a=n(r,i),vo=!1,_o&&(a=Do(t,n,r,i)),Eo(e),a}function Eo(e){N.H=Rs;var t=mo!==null&&mo.next!==null;if(fo=0,ho=mo=po=null,go=!1,bo=0,xo=null,t)throw Error(i(300));e===null||rc||(e=e.dependencies,e!==null&&Qi(e)&&(rc=!0))}function Do(e,t,n,r){po=e;var a=0;do{if(_o&&(xo=null),bo=0,_o=!1,25<=a)throw Error(i(301));if(a+=1,ho=mo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}N.H=Vs,o=t(n,r)}while(_o);return o}function Oo(){var e=N.H,t=e.useState()[0];return t=typeof t.then==`function`?Fo(t):t,e=e.useState()[0],(mo===null?null:mo.memoizedState)!==e&&(po.flags|=1024),t}function ko(){var e=yo!==0;return yo=0,e}function Ao(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function jo(e){if(go){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}go=!1}fo=0,ho=mo=po=null,_o=!1,bo=yo=0,xo=null}function Mo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ho===null?po.memoizedState=ho=e:ho=ho.next=e,ho}function No(){if(mo===null){var e=po.alternate;e=e===null?null:e.memoizedState}else e=mo.next;var t=ho===null?po.memoizedState:ho.next;if(t!==null)ho=t,mo=e;else{if(e===null)throw po.alternate===null?Error(i(467)):Error(i(310));mo=e,e={memoizedState:mo.memoizedState,baseState:mo.baseState,baseQueue:mo.baseQueue,queue:mo.queue,next:null},ho===null?po.memoizedState=ho=e:ho=ho.next=e}return ho}function Po(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Fo(e){var t=bo;return bo+=1,xo===null&&(xo=[]),e=Ea(xo,e,t),t=po,(ho===null?t.memoizedState:ho.next)===null&&(t=t.alternate,N.H=t===null||t.memoizedState===null?zs:Bs),e}function Io(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Fo(e);if(e.$$typeof===C)return ea(e)}throw Error(i(438,String(e)))}function Lo(e){var t=null,n=po.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=po.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Po(),po.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ee;return t.index++,n}function Ro(e,t){return typeof t==`function`?t(e):t}function zo(e){return Bo(No(),mo,e)}function Bo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(fo&f)===f:(Wl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===da&&(d=!0);else if((fo&p)===p){u=u.next,p===da&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,po.lanes|=p,Zl|=p;f=u.action,vo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,po.lanes|=f,Zl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Sr(o,e.memoizedState)&&(rc=!0,d&&(n=fa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Vo(e){var t=No(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Sr(o,t.memoizedState)||(rc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Ho(e,t,n){var r=po,a=No(),o=Ni;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Sr((mo||a).memoizedState,n);if(s&&(a.memoizedState=n,rc=!0),a=a.queue,U(V.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||ho!==null&&ho.memoizedState.tag&1){if(r.flags|=2048,os(9,{destroy:void 0},Wo.bind(null,r,a,n,t),null),Hl===null)throw Error(i(349));o||fo&127||Uo(r,t,n)}return n}function Uo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=po.updateQueue,t===null?(t=Po(),po.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Wo(e,t,n,r){t.value=n,t.getSnapshot=r,Go(t)&&Ko(e)}function V(e,t,n){return n(function(){Go(t)&&Ko(e)})}function Go(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Sr(e,n)}catch{return!0}}function Ko(e){var t=ti(e,2);t!==null&&xu(t,e,2)}function qo(e){var t=Mo();if(typeof e==`function`){var n=e;if(e=n(),vo){Re(!0);try{n()}finally{Re(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,lastRenderedState:e},t}function Jo(e,t,n,r){return e.baseState=n,Bo(e,mo,typeof r==`function`?r:Ro)}function Yo(e,t,n,r,a){if(Fs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};N.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Xo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Xo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=N.T,o={};N.T=o;try{var s=n(i,r),c=N.S;c!==null&&c(o,s),Zo(e,t,s)}catch(n){$o(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),N.T=a}}else try{a=n(i,r),Zo(e,t,a)}catch(n){$o(e,t,n)}}function Zo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Qo(e,t,n)},function(n){return $o(e,t,n)}):Qo(e,t,n)}function Qo(e,t,n){t.status=`fulfilled`,t.value=n,es(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Xo(e,n)))}function $o(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,es(t),t=t.next;while(t!==r)}e.action=null}function es(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ts(e,t){return t}function ns(e,t){if(Ni){var n=Hl.formState;if(n!==null){a:{var r=po;if(Ni){if(Mi){b:{for(var i=Mi,a=Fi;i.nodeType!==8;){if(!a){i=null;break b}if(i=_f(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Mi=_f(i.nextSibling),r=i.data===`F!`;break a}}Li(r)}r=!1}r&&(t=n[0])}}return n=Mo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:t},n.queue=r,n=Ms.bind(null,po,r),r.dispatch=n,r=qo(!1),a=Ps.bind(null,po,!1,r.queue),r=Mo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Yo.bind(null,po,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function rs(e){return H(No(),mo,e)}function H(e,t,n){if(t=Bo(e,t,ts)[0],e=zo(Ro)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Fo(t)}catch(e){throw e===xa?Ca:e}else r=t;t=No();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(po.flags|=2048,os(9,{destroy:void 0},is.bind(null,i,n),null)),[r,a,e]}function is(e,t){e.action=t}function as(e){var t=No(),n=mo;if(n!==null)return H(t,n,e);No(),t=t.memoizedState,n=No();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function os(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=po.updateQueue,t===null&&(t=Po(),po.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ss(){return No().memoizedState}function cs(e,t,n,r){var i=Mo();po.flags|=e,i.memoizedState=os(1|t,{destroy:void 0},n,r===void 0?null:r)}function ls(e,t,n,r){var i=No();r=r===void 0?null:r;var a=i.memoizedState.inst;mo!==null&&r!==null&&wo(r,mo.memoizedState.deps)?i.memoizedState=os(t,a,n,r):(po.flags|=e,i.memoizedState=os(1|t,a,n,r))}function us(e,t){cs(8390656,8,e,t)}function U(e,t){ls(2048,8,e,t)}function ds(e){po.flags|=4;var t=po.updateQueue;if(t===null)t=Po(),po.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function fs(e){var t=No().memoizedState;return ds({ref:t,nextImpl:e}),function(){if(Vl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ps(e,t){return ls(4,2,e,t)}function ms(e,t){return ls(4,4,e,t)}function hs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function gs(e,t,n){n=n==null?null:n.concat([e]),ls(4,4,hs.bind(null,t,e),n)}function _s(){}function vs(e,t){var n=No();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&wo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ys(e,t){var n=No();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&wo(t,r[1]))return r[0];if(r=e(),vo){Re(!0);try{e()}finally{Re(!1)}}return n.memoizedState=[r,t],r}function bs(e,t,n){return n===void 0||fo&1073741824&&!(Wl&261930)?e.memoizedState=t:(e.memoizedState=n,e=bu(),po.lanes|=e,Zl|=e,n)}function xs(e,t,n,r){return Sr(n,t)?n:Za.current===null?!(fo&42)||fo&1073741824&&!(Wl&261930)?(rc=!0,e.memoizedState=n):(e=bu(),po.lanes|=e,Zl|=e,t):(e=bs(e,n,r),Sr(e,t)||(rc=!0),e)}function Ss(e,t,n,r,i){var a=P.p;P.p=a!==0&&8>a?a:8;var o=N.T,s={};N.T=s,Ps(e,!1,t,n);try{var c=i(),l=N.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ns(e,t,ha(c,r),yu(e)):Ns(e,t,r,yu(e))}catch(n){Ns(e,t,{then:function(){},status:`rejected`,reason:n},yu())}finally{P.p=a,o!==null&&s.types!==null&&(o.types=s.types),N.T=o}}function Cs(){}function ws(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ts(e).queue;Ss(e,a,t,re,n===null?Cs:function(){return Es(e),n(r)})}function Ts(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,lastRenderedState:re},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Es(e){var t=Ts(e);t.next===null&&(t=e.alternate.memoizedState),Ns(e,t.next.queue,{},yu())}function Ds(){return ea(sp)}function Os(){return No().memoizedState}function ks(){return No().memoizedState}function As(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=yu();e=Ha(n);var r=Ua(t,e,n);r!==null&&(xu(r,t,n),Wa(r,t,n)),t={cache:sa()},e.payload=t;return}t=t.return}}function js(e,t,n){var r=yu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Fs(e)?Is(t,n):(n=ei(e,t,n,r),n!==null&&(xu(n,e,r),Ls(n,t,r)))}function Ms(e,t,n){Ns(e,t,n,yu())}function Ns(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fs(e))Is(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Sr(s,o))return $r(e,t,i,0),Hl===null&&Qr(),!1}catch{}if(n=ei(e,t,i,r),n!==null)return xu(n,e,r),Ls(n,t,r),!0}return!1}function Ps(e,t,n,r){if(r={lane:2,revertLane:vd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Fs(e)){if(t)throw Error(i(479))}else t=ei(e,n,r,2),t!==null&&xu(t,e,2)}function Fs(e){var t=e.alternate;return e===po||t!==null&&t===po}function Is(e,t){_o=go=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ls(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,tt(e,n)}}var Rs={readContext:ea,use:Io,useCallback:Co,useContext:Co,useEffect:Co,useImperativeHandle:Co,useLayoutEffect:Co,useInsertionEffect:Co,useMemo:Co,useReducer:Co,useRef:Co,useState:Co,useDebugValue:Co,useDeferredValue:Co,useTransition:Co,useSyncExternalStore:Co,useId:Co,useHostTransitionStatus:Co,useFormState:Co,useActionState:Co,useOptimistic:Co,useMemoCache:Co,useCacheRefresh:Co};Rs.useEffectEvent=Co;var zs={readContext:ea,use:Io,useCallback:function(e,t){return Mo().memoizedState=[e,t===void 0?null:t],e},useContext:ea,useEffect:us,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),cs(4194308,4,hs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cs(4194308,4,e,t)},useInsertionEffect:function(e,t){cs(4,2,e,t)},useMemo:function(e,t){var n=Mo();t=t===void 0?null:t;var r=e();if(vo){Re(!0);try{e()}finally{Re(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Mo();if(n!==void 0){var i=n(t);if(vo){Re(!0);try{n(t)}finally{Re(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=js.bind(null,po,e),[r.memoizedState,e]},useRef:function(e){var t=Mo();return e={current:e},t.memoizedState=e},useState:function(e){e=qo(e);var t=e.queue,n=Ms.bind(null,po,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:_s,useDeferredValue:function(e,t){return bs(Mo(),e,t)},useTransition:function(){var e=qo(!1);return e=Ss.bind(null,po,e.queue,!0,!1),Mo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=po,a=Mo();if(Ni){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Hl===null)throw Error(i(349));Wl&127||Uo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,us(V.bind(null,r,o,e),[e]),r.flags|=2048,os(9,{destroy:void 0},Wo.bind(null,r,o,n,t),null),n},useId:function(){var e=Mo(),t=Hl.identifierPrefix;if(Ni){var n=Ti,r=wi;n=(r&~(1<<32-ze(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=yo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=So++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ds,useFormState:ns,useActionState:ns,useOptimistic:function(e){var t=Mo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ps.bind(null,po,!0,n),n.dispatch=t,[e,t]},useMemoCache:Lo,useCacheRefresh:function(){return Mo().memoizedState=As.bind(null,po)},useEffectEvent:function(e){var t=Mo(),n={impl:e};return t.memoizedState=n,function(){if(Vl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Bs={readContext:ea,use:Io,useCallback:vs,useContext:ea,useEffect:U,useImperativeHandle:gs,useInsertionEffect:ps,useLayoutEffect:ms,useMemo:ys,useReducer:zo,useRef:ss,useState:function(){return zo(Ro)},useDebugValue:_s,useDeferredValue:function(e,t){return xs(No(),mo.memoizedState,e,t)},useTransition:function(){var e=zo(Ro)[0],t=No().memoizedState;return[typeof e==`boolean`?e:Fo(e),t]},useSyncExternalStore:Ho,useId:Os,useHostTransitionStatus:Ds,useFormState:rs,useActionState:rs,useOptimistic:function(e,t){return Jo(No(),mo,e,t)},useMemoCache:Lo,useCacheRefresh:ks};Bs.useEffectEvent=fs;var Vs={readContext:ea,use:Io,useCallback:vs,useContext:ea,useEffect:U,useImperativeHandle:gs,useInsertionEffect:ps,useLayoutEffect:ms,useMemo:ys,useReducer:Vo,useRef:ss,useState:function(){return Vo(Ro)},useDebugValue:_s,useDeferredValue:function(e,t){var n=No();return mo===null?bs(n,e,t):xs(n,mo.memoizedState,e,t)},useTransition:function(){var e=Vo(Ro)[0],t=No().memoizedState;return[typeof e==`boolean`?e:Fo(e),t]},useSyncExternalStore:Ho,useId:Os,useHostTransitionStatus:Ds,useFormState:as,useActionState:as,useOptimistic:function(e,t){var n=No();return mo===null?(n.baseState=e,[e,n.queue.dispatch]):Jo(n,mo,e,t)},useMemoCache:Lo,useCacheRefresh:ks};Vs.useEffectEvent=fs;function Hs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:m({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Us={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=yu(),i=Ha(r);i.payload=t,n!=null&&(i.callback=n),t=Ua(e,i,r),t!==null&&(xu(t,e,r),Wa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=yu(),i=Ha(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ua(e,i,r),t!==null&&(xu(t,e,r),Wa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=yu(),r=Ha(n);r.tag=2,t!=null&&(r.callback=t),t=Ua(e,r,n),t!==null&&(xu(t,e,n),Wa(t,e,n))}};function Ws(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Cr(n,r)||!Cr(i,a):!0}function Gs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Us.enqueueReplaceState(t,t.state,null)}function Ks(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=m({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function qs(e){Jr(e)}function Js(e){console.error(e)}function Ys(e){Jr(e)}function Xs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Zs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Qs(e,t,n){return n=Ha(n),n.tag=3,n.payload={element:null},n.callback=function(){Xs(e,t)},n}function $s(e){return e=Ha(e),e.tag=3,e}function ec(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Zs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Zs(t,n,r),typeof i!=`function`&&(lu===null?lu=new Set([this]):lu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function tc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Zi(t,n,a,!0),n=no.current,n!==null){switch(n.tag){case 31:case 13:return ro===null?Nu():n.alternate===null&&Xl===0&&(Xl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===wa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Qu(e,r,a)),!1;case 22:return n.flags|=65536,r===wa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Qu(e,r,a)),!1}throw Error(i(435,n.tag))}return Qu(e,r,a),Nu(),!1}if(Ni)return t=no.current,t===null?(r!==Ii&&(t=Error(i(423),{cause:r}),Ui(gi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=gi(r,n),a=Qs(e.stateNode,r,a),Ga(e,a),Xl!==4&&(Xl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Ii&&(e=Error(i(422),{cause:r}),Ui(gi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=gi(o,n),nu===null?nu=[o]:nu.push(o),Xl!==4&&(Xl=2),t===null)return!0;r=gi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Qs(n.stateNode,r,e),Ga(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(lu===null||!lu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=$s(a),ec(a,e,n,r),Ga(n,a),!1}n=n.return}while(n!==null);return!1}var nc=Error(i(461)),rc=!1;function ic(e,t,n,r){t.child=e===null?Ra(t,null,n,r):La(t,e.child,n,r)}function ac(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return $i(t),r=To(e,t,n,o,a,i),s=ko(),e!==null&&!rc?(Ao(e,t,i),kc(e,t,i)):(Ni&&s&&Oi(t),t.flags|=1,ic(e,t,r,i),t.child)}function oc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!si(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,sc(e,t,a,r,i)):(e=ui(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ac(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Cr:n,n(o,r)&&e.ref===t.ref)return kc(e,t,i)}return t.flags|=1,e=ci(a,r),e.ref=t.ref,e.return=t,t.child=e}function sc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Cr(a,r)&&e.ref===t.ref)if(rc=!1,t.pendingProps=r=a,Ac(e,i))e.flags&131072&&(rc=!0);else return t.lanes=e.lanes,kc(e,t,i)}return hc(e,t,n,r,i)}function cc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return uc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ya(t,a===null?null:a.cachePool),a===null?eo():$a(t,a),oo(t);else return r=t.lanes=536870912,uc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ya(t,null),eo(),so(t)):(ya(t,a.cachePool),$a(t,a),so(t),t.memoizedState=null);return ic(e,t,i,n),t.child}function lc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function uc(e,t,n,r,i){var a=va();return a=a===null?null:{parent:oa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ya(t,null),eo(),oo(t),e!==null&&Zi(e,t,r,!0),t.childLanes=i,null}function dc(e,t){return t=wc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function fc(e,t,n){return La(t,e.child,null,n),e=dc(t,t.pendingProps),e.flags|=2,co(t),t.memoizedState=null,e}function pc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Ni){if(r.mode===`hidden`)return e=dc(t,r),t.lanes=536870912,lc(null,e);if(ao(t),(e=Mi)?(e=pf(e,Fi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ci===null?null:{id:wi,overflow:Ti},retryLane:536870912,hydrationErrors:null},n=pi(e),n.return=t,t.child=n,ji=t,Mi=null)):e=null,e===null)throw Li(t);return t.lanes=536870912,null}return dc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(ao(t),a)if(t.flags&256)t.flags&=-257,t=fc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(rc||Zi(e,t,n,!1),a=(n&e.childLanes)!==0,rc||a){if(r=Hl,r!==null&&(s=nt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ti(e,s),xu(r,e,s),nc;Nu(),t=fc(e,t,n)}else e=o.treeContext,Mi=_f(s.nextSibling),ji=t,Ni=!0,Pi=null,Fi=!1,e!==null&&Ai(t,e),t=dc(t,r),t.flags|=4096;return t}return e=ci(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function mc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function hc(e,t,n,r,i){return $i(t),n=To(e,t,n,r,void 0,i),r=ko(),e!==null&&!rc?(Ao(e,t,i),kc(e,t,i)):(Ni&&r&&Oi(t),t.flags|=1,ic(e,t,n,i),t.child)}function gc(e,t,n,r,i,a){return $i(t),t.updateQueue=null,n=Do(t,r,n,i),Eo(e),r=ko(),e!==null&&!rc?(Ao(e,t,a),kc(e,t,a)):(Ni&&r&&Oi(t),t.flags|=1,ic(e,t,n,a),t.child)}function _c(e,t,n,r,i){if($i(t),t.stateNode===null){var a=ii,o=n.contextType;typeof o==`object`&&o&&(a=ea(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Us,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ba(t),o=n.contextType,a.context=typeof o==`object`&&o?ea(o):ii,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Hs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Us.enqueueReplaceState(a,a.state,null),Ja(t,r,a,i),qa(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Ks(n,s);a.props=c;var l=a.context,u=n.contextType;o=ii,typeof u==`object`&&u&&(o=ea(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Gs(t,a,r,o),za=!1;var f=t.memoizedState;a.state=f,Ja(t,r,a,i),qa(),l=t.memoizedState,s||f!==l||za?(typeof d==`function`&&(Hs(t,n,d,r),l=t.memoizedState),(c=za||Ws(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Va(e,t),o=t.memoizedProps,u=Ks(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ii,typeof l==`object`&&l&&(c=ea(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Gs(t,a,r,c),za=!1,f=t.memoizedState,a.state=f,Ja(t,r,a,i),qa();var p=t.memoizedState;o!==d||f!==p||za||e!==null&&e.dependencies!==null&&Qi(e.dependencies)?(typeof s==`function`&&(Hs(t,n,s,r),p=t.memoizedState),(u=za||Ws(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Qi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,mc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=La(t,e.child,null,i),t.child=La(t,null,n,i)):ic(e,t,n,i),t.memoizedState=a.state,e=t.child):e=kc(e,t,i),e}function vc(e,t,n,r){return Vi(),t.flags|=256,ic(e,t,n,r),t.child}var yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bc(e){return{baseLanes:e,cachePool:ba()}}function xc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=eu),e}function Sc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(lo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Ni){if(a?io(t):so(t),(e=Mi)?(e=pf(e,Fi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ci===null?null:{id:wi,overflow:Ti},retryLane:536870912,hydrationErrors:null},n=pi(e),n.return=t,t.child=n,ji=t,Mi=null)):e=null,e===null)throw Li(t);return hf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(so(t),a=t.mode,c=wc({mode:`hidden`,children:c},a),r=di(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=bc(n),r.childLanes=xc(e,s,n),t.memoizedState=yc,lc(null,r)):(io(t),Cc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(io(t),t.flags&=-257,t=Tc(e,t,n)):t.memoizedState===null?(so(t),c=r.fallback,a=t.mode,r=wc({mode:`visible`,children:r.children},a),c=di(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,La(t,e.child,null,n),r=t.child,r.memoizedState=bc(n),r.childLanes=xc(e,s,n),t.memoizedState=yc,t=lc(null,r)):(so(t),t.child=e.child,t.flags|=128,t=null);else if(io(t),hf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ui({value:r,source:null,stack:null}),t=Tc(e,t,n)}else if(rc||Zi(e,t,n,!1),s=(n&e.childLanes)!==0,rc||s){if(s=Hl,s!==null&&(r=nt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ti(e,r),xu(s,e,r),nc;mf(c)||Nu(),t=Tc(e,t,n)}else mf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Mi=_f(c.nextSibling),ji=t,Ni=!0,Pi=null,Fi=!1,e!==null&&Ai(t,e),t=Cc(t,r.children),t.flags|=4096);return t}return a?(so(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ci(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=di(c,a,n,null),c.flags|=2):c=ci(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,lc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=bc(n):(a=c.cachePool,a===null?a=ba():(l=oa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=xc(e,s,n),t.memoizedState=yc,lc(e.child,r)):(io(t),n=e.child,e=n.sibling,n=ci(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Cc(e,t){return t=wc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function wc(e,t){return e=oi(22,e,null,t),e.lanes=0,e}function Tc(e,t,n){return La(t,e.child,null,n),e=Cc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ec(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Yi(e.return,t,n)}function Dc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Oc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=lo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,ce(lo,o),ic(e,t,r,n),r=Ni?bi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ec(e,n,t);else if(e.tag===19)Ec(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&uo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Dc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&uo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Dc(t,!0,n,null,a,r);break;case`together`:Dc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function kc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Zl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Zi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ci(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ci(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ac(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Qi(e))):!0}function jc(e,t,n){switch(t.tag){case 3:fe(t,t.stateNode.containerInfo),qi(t,oa,e.memoizedState.cache),Vi();break;case 27:case 5:me(t);break;case 4:fe(t,t.stateNode.containerInfo);break;case 10:qi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ao(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(io(t),e=kc(e,t,n),e===null?null:e.sibling):Sc(e,t,n):(io(t),t.flags|=128,null);io(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Zi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Oc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ce(lo,lo.current),r)break;return null;case 22:return t.lanes=0,cc(e,t,n,t.pendingProps);case 24:qi(t,oa,e.memoizedState.cache)}return kc(e,t,n)}function Mc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)rc=!0;else{if(!Ac(e,n)&&!(t.flags&128))return rc=!1,jc(e,t,n);rc=!!(e.flags&131072)}else rc=!1,Ni&&t.flags&1048576&&Di(t,bi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Da(t.elementType),t.type=e,typeof e==`function`)si(e)?(r=Ks(e,r),t.tag=1,t=_c(null,t,e,r,n)):(t.tag=0,t=hc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=ac(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=oc(null,t,e,r,n);break a}}throw t=M(e)||e,Error(i(306,t,``))}}return t;case 0:return hc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Ks(r,t.pendingProps),_c(e,t,r,a,n);case 3:a:{if(fe(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Va(e,t),Ja(t,r,null,n);var s=t.memoizedState;if(r=s.cache,qi(t,oa,r),r!==o.cache&&Xi(t,[oa],n,!0),qa(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=vc(e,t,r,n);break a}else if(r!==a){a=gi(Error(i(424)),t),Ui(a),t=vc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Mi=_f(e.firstChild),ji=t,Ni=!0,Pi=null,Fi=!0,n=Ra(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Vi(),r===a){t=kc(e,t,n);break a}ic(e,t,r,n)}t=t.child}return t;case 26:return mc(e,t),e===null?(n=Rf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ni||(n=t.type,e=t.pendingProps,r=Yd(de.current).createElement(n),r[ct]=t,r[lt]=e,Ud(r,n,e),xt(r),t.stateNode=r):t.memoizedState=Rf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return me(t),e===null&&Ni&&(r=t.stateNode=xf(t.type,t.pendingProps,de.current),ji=t,Fi=!0,a=Mi,sf(t.type)?(vf=a,Mi=_f(r.firstChild)):Mi=a),ic(e,t,t.pendingProps.children,n),mc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ni&&((a=r=Mi)&&(r=df(r,t.type,t.pendingProps,Fi),r===null?a=!1:(t.stateNode=r,ji=t,Mi=_f(r.firstChild),Fi=!1,a=!0)),a||Li(t)),me(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Qd(a,o)?r=null:s!==null&&Qd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=To(e,t,Oo,null,null,n),sp._currentValue=a),mc(e,t),ic(e,t,r,n),t.child;case 6:return e===null&&Ni&&((e=n=Mi)&&(n=ff(n,t.pendingProps,Fi),n===null?e=!1:(t.stateNode=n,ji=t,Mi=null,e=!0)),e||Li(t)),null;case 13:return Sc(e,t,n);case 4:return fe(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=La(t,null,r,n):ic(e,t,r,n),t.child;case 11:return ac(e,t,t.type,t.pendingProps,n);case 7:return ic(e,t,t.pendingProps,n),t.child;case 8:return ic(e,t,t.pendingProps.children,n),t.child;case 12:return ic(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,qi(t,t.type,r.value),ic(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,$i(t),a=ea(a),r=r(a),t.flags|=1,ic(e,t,r,n),t.child;case 14:return oc(e,t,t.type,t.pendingProps,n);case 15:return sc(e,t,t.type,t.pendingProps,n);case 19:return Oc(e,t,n);case 31:return pc(e,t,n);case 22:return cc(e,t,n,t.pendingProps);case 24:return $i(t),r=ea(oa),e===null?(a=va(),a===null&&(a=Hl,o=sa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ba(t),qi(t,oa,a)):((e.lanes&n)!==0&&(Va(e,t),Ja(t,null,null,n),qa()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,qi(t,oa,r),r!==a.cache&&Xi(t,[oa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),qi(t,oa,r))),ic(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Nc(e){e.flags|=4}function Pc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Au())e.flags|=8192;else throw Oa=wa,Sa}else e.flags&=-16777217}function Fc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!$f(t))if(Au())e.flags|=8192;else throw Oa=wa,Sa}function Ic(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Xe(),e.lanes|=t,tu|=t)}function Lc(e,t){if(!Ni)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Rc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function zc(e,t,n){var r=t.pendingProps;switch(ki(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Rc(t),null;case 1:return Rc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ji(oa),pe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Bi(t)?Nc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Hi())),Rc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Nc(t),o===null?(Rc(t),Pc(t,a,null,r,n)):(Rc(t),Fc(t,o))):o?o===e.memoizedState?(Rc(t),t.flags&=-16777217):(Nc(t),Rc(t),Fc(t,o)):(e=e.memoizedProps,e!==r&&Nc(t),Rc(t),Pc(t,a,e,r,n)),null;case 27:if(he(t),n=de.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Rc(t),null}e=le.current,Bi(t)?Ri(t,e):(e=xf(a,r,n),t.stateNode=e,Nc(t))}return Rc(t),null;case 5:if(he(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Rc(t),null}if(o=le.current,Bi(t))Ri(t,o);else{var s=Yd(de.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[ct]=t,o[lt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Ud(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Nc(t)}}return Rc(t),Pc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=de.current,Bi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ji,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[ct]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Bd(e.nodeValue,n)),e||Li(t,!0)}else e=Yd(e).createTextNode(r),e[ct]=t,t.stateNode=e}return Rc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Bi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[ct]=t}else Vi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Rc(t),e=!1}else n=Hi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(co(t),t):(co(t),null);if(t.flags&128)throw Error(i(558))}return Rc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Bi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[ct]=t}else Vi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Rc(t),a=!1}else a=Hi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(co(t),t):(co(t),null)}return co(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ic(t,t.updateQueue),Rc(t),null);case 4:return pe(),e===null&&Ad(t.stateNode.containerInfo),Rc(t),null;case 10:return Ji(t.type),Rc(t),null;case 19:if(se(lo),r=t.memoizedState,r===null)return Rc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Lc(r,!1);else{if(Xl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=uo(e),o!==null){for(t.flags|=128,Lc(r,!1),e=o.updateQueue,t.updateQueue=e,Ic(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)li(n,e),n=n.sibling;return ce(lo,lo.current&1|2),Ni&&Ei(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&De()>su&&(t.flags|=128,a=!0,Lc(r,!1),t.lanes=4194304)}else{if(!a)if(e=uo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ic(t,e),Lc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ni)return Rc(t),null}else 2*De()-r.renderingStartTime>su&&n!==536870912&&(t.flags|=128,a=!0,Lc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Rc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=De(),e.sibling=null,n=lo.current,ce(lo,a?n&1|2:n&1),Ni&&Ei(t,r.treeForkCount),e);case 22:case 23:return co(t),to(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Rc(t),t.subtreeFlags&6&&(t.flags|=8192)):Rc(t),n=t.updateQueue,n!==null&&Ic(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&se(_a),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ji(oa),Rc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Bc(e,t){switch(ki(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ji(oa),pe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return he(t),null;case 31:if(t.memoizedState!==null){if(co(t),t.alternate===null)throw Error(i(340));Vi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(co(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Vi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return se(lo),null;case 4:return pe(),null;case 10:return Ji(t.type),null;case 22:case 23:return co(t),to(),e!==null&&se(_a),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ji(oa),null;case 25:return null;default:return null}}function Vc(e,t){switch(ki(t),t.tag){case 3:Ji(oa),pe();break;case 26:case 27:case 5:he(t);break;case 4:pe();break;case 31:t.memoizedState!==null&&co(t);break;case 13:co(t);break;case 19:se(lo);break;case 10:Ji(t.type);break;case 22:case 23:co(t),to(),e!==null&&se(_a);break;case 24:Ji(oa)}}function Hc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Zu(t,t.return,e)}}function Uc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Zu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Zu(t,t.return,e)}}function Wc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Xa(t,n)}catch(t){Zu(e,e.return,t)}}}function Gc(e,t,n){n.props=Ks(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Zu(e,t,n)}}function Kc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Zu(e,t,n)}}function qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Zu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Zu(e,t,n)}else n.current=null}function Jc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Zu(e,e.return,t)}}function Yc(e,t,n){try{var r=e.stateNode;Wd(r,e.type,n,t),r[lt]=t}catch(t){Zu(e,e.return,t)}}function Xc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&sf(e.type)||e.tag===4}function Zc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Xc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&sf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=en));else if(r!==4&&(r===27&&sf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&sf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Ud(t,r,n),t[ct]=e,t[lt]=n}catch(t){Zu(e,e.return,t)}}var tl=!1,nl=!1,rl=!1,il=typeof WeakSet==`function`?WeakSet:Set,al=null;function ol(e,t){if(e=e.containerInfo,qd=gp,e=Dr(e),Or(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Jd={focusedElem:e,selectionRange:n},gp=!1,al=t;al!==null;)if(t=al,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,al=e;else for(;al!==null;){switch(t=al,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Ks(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Zu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)uf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:uf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,al=e;break}al=t.return}}function sl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Sl(e,n),r&4&&Hc(5,n);break;case 1:if(Sl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Zu(n,n.return,e)}else{var i=Ks(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Zu(n,n.return,e)}}r&64&&Wc(n),r&512&&Kc(n,n.return);break;case 3:if(Sl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Xa(e,t)}catch(e){Zu(n,n.return,e)}}break;case 27:t===null&&r&4&&el(n);case 26:case 5:Sl(e,n),t===null&&r&4&&Jc(n),r&512&&Kc(n,n.return);break;case 12:Sl(e,n);break;case 31:Sl(e,n),r&4&&pl(e,n);break;case 13:Sl(e,n),r&4&&ml(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=td.bind(null,n),gf(e,n))));break;case 22:if(r=n.memoizedState!==null||tl,!r){t=t!==null&&t.memoizedState!==null||nl,i=tl;var a=nl;tl=r,(nl=t)&&!a?wl(e,n,(n.subtreeFlags&8772)!=0):Sl(e,n),tl=i,nl=a}break;case 30:break;default:Sl(e,n)}}function cl(e){var t=e.alternate;t!==null&&(e.alternate=null,cl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&>(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ll=null,ul=!1;function dl(e,t,n){for(n=n.child;n!==null;)fl(e,t,n),n=n.sibling}function fl(e,t,n){if(Le&&typeof Le.onCommitFiberUnmount==`function`)try{Le.onCommitFiberUnmount(Ie,n)}catch{}switch(n.tag){case 26:nl||qc(n,t),dl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:nl||qc(n,t);var r=ll,i=ul;sf(n.type)&&(ll=n.stateNode,ul=!1),dl(e,t,n),Sf(n.stateNode),ll=r,ul=i;break;case 5:nl||qc(n,t);case 6:if(r=ll,i=ul,ll=null,dl(e,t,n),ll=r,ul=i,ll!==null)if(ul)try{(ll.nodeType===9?ll.body:ll.nodeName===`HTML`?ll.ownerDocument.body:ll).removeChild(n.stateNode)}catch(e){Zu(n,t,e)}else try{ll.removeChild(n.stateNode)}catch(e){Zu(n,t,e)}break;case 18:ll!==null&&(ul?(e=ll,cf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Hp(e)):cf(ll,n.stateNode));break;case 4:r=ll,i=ul,ll=n.stateNode.containerInfo,ul=!0,dl(e,t,n),ll=r,ul=i;break;case 0:case 11:case 14:case 15:Uc(2,n,t),nl||Uc(4,n,t),dl(e,t,n);break;case 1:nl||(qc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Gc(n,t,r)),dl(e,t,n);break;case 21:dl(e,t,n);break;case 22:nl=(r=nl)||n.memoizedState!==null,dl(e,t,n),nl=r;break;default:dl(e,t,n)}}function pl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hp(e)}catch(e){Zu(t,t.return,e)}}}function ml(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hp(e)}catch(e){Zu(t,t.return,e)}}function hl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new il),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new il),t;default:throw Error(i(435,e.tag))}}function gl(e,t){var n=hl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=nd.bind(null,e,t);t.then(r,r)}})}function _l(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(sf(c.type)){ll=c.stateNode,ul=!1;break a}break;case 5:ll=c.stateNode,ul=!1;break a;case 3:case 4:ll=c.stateNode.containerInfo,ul=!0;break a}c=c.return}if(ll===null)throw Error(i(160));fl(o,s,a),ll=null,ul=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)yl(t,e),t=t.sibling}var vl=null;function yl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:_l(t,e),bl(e),r&4&&(Uc(3,e,e.return),Hc(3,e),Uc(5,e,e.return));break;case 1:_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),r&64&&tl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=vl;if(_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[ht]||o[ct]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Ud(o,r,n),o[ct]=e,xt(o),r=o;break a;case`link`:var s=Xf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Ud(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Xf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Ud(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[ct]=e,xt(o),r=o}e.stateNode=r}else Zf(a,e.type,e.stateNode);else e.stateNode=Gf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Yc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Zf(a,e.type,e.stateNode):Gf(a,r,e.memoizedProps))}break;case 27:_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),n!==null&&r&4&&Yc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),e.flags&32){a=e.stateNode;try{Kt(a,``)}catch(t){Zu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Yc(e,a,n===null?a:n.memoizedProps)),r&1024&&(rl=!0);break;case 6:if(_l(t,e),bl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Zu(e,e.return,t)}}break;case 3:if(Yf=null,a=vl,vl=Tf(t.containerInfo),_l(t,e),vl=a,bl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Hp(t.containerInfo)}catch(t){Zu(e,e.return,t)}rl&&(rl=!1,xl(e));break;case 4:r=vl,vl=Tf(e.stateNode.containerInfo),_l(t,e),bl(e),vl=r;break;case 12:_l(t,e),bl(e);break;case 31:_l(t,e),bl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 13:_l(t,e),bl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(au=De()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=tl,d=nl;if(tl=u||a,nl=d||l,_l(t,e),nl=d,tl=u,bl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||tl||nl||Cl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Zu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Zu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?lf(m,!0):lf(l.stateNode,!1)}catch(e){Zu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,gl(e,n))));break;case 19:_l(t,e),bl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 30:break;case 21:break;default:_l(t,e),bl(e)}}function bl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Xc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;$c(e,Zc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Kt(o,``),n.flags&=-33),$c(e,Zc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Qc(e,Zc(e),s);break;default:throw Error(i(161))}}catch(t){Zu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;xl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Sl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)sl(e,t.alternate,t),t=t.sibling}function Cl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Uc(4,t,t.return),Cl(t);break;case 1:qc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Gc(t,t.return,n),Cl(t);break;case 27:Sf(t.stateNode);case 26:case 5:qc(t,t.return),Cl(t);break;case 22:t.memoizedState===null&&Cl(t);break;case 30:Cl(t);break;default:Cl(t)}e=e.sibling}}function wl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:wl(i,a,n),Hc(4,a);break;case 1:if(wl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Zu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ya(c[i],s)}catch(e){Zu(r,r.return,e)}}n&&o&64&&Wc(a),Kc(a,a.return);break;case 27:el(a);case 26:case 5:wl(i,a,n),n&&r===null&&o&4&&Jc(a),Kc(a,a.return);break;case 12:wl(i,a,n);break;case 31:wl(i,a,n),n&&o&4&&pl(i,a);break;case 13:wl(i,a,n),n&&o&4&&ml(i,a);break;case 22:a.memoizedState===null&&wl(i,a,n),Kc(a,a.return);break;case 30:break;default:wl(i,a,n)}t=t.sibling}}function Tl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ca(n))}function El(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ca(e))}function Dl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ol(e,t,n,r),t=t.sibling}function Ol(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Dl(e,t,n,r),i&2048&&Hc(9,t);break;case 1:Dl(e,t,n,r);break;case 3:Dl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ca(e)));break;case 12:if(i&2048){Dl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Zu(t,t.return,e)}}else Dl(e,t,n,r);break;case 31:Dl(e,t,n,r);break;case 13:Dl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Dl(e,t,n,r):(a._visibility|=2,kl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Dl(e,t,n,r):Al(e,t),i&2048&&Tl(o,t);break;case 24:Dl(e,t,n,r),i&2048&&El(t.alternate,t);break;default:Dl(e,t,n,r)}}function kl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:kl(a,o,s,c,i),Hc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,kl(a,o,s,c,i)):u._visibility&2?kl(a,o,s,c,i):Al(a,o),i&&l&2048&&Tl(o.alternate,o);break;case 24:kl(a,o,s,c,i),i&&l&2048&&El(o.alternate,o);break;default:kl(a,o,s,c,i)}t=t.sibling}}function Al(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Al(n,r),i&2048&&Tl(r.alternate,r);break;case 24:Al(n,r),i&2048&&El(r.alternate,r);break;default:Al(n,r)}t=t.sibling}}var jl=8192;function Ml(e,t,n){if(e.subtreeFlags&jl)for(e=e.child;e!==null;)Nl(e,t,n),e=e.sibling}function Nl(e,t,n){switch(e.tag){case 26:Ml(e,t,n),e.flags&jl&&e.memoizedState!==null&&ep(n,vl,e.memoizedState,e.memoizedProps);break;case 5:Ml(e,t,n);break;case 3:case 4:var r=vl;vl=Tf(e.stateNode.containerInfo),Ml(e,t,n),vl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=jl,jl=16777216,Ml(e,t,n),jl=r):Ml(e,t,n));break;default:Ml(e,t,n)}}function Pl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Fl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Rl(r,e)}Pl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Il(e),e=e.sibling}function Il(e){switch(e.tag){case 0:case 11:case 15:Fl(e),e.flags&2048&&Uc(9,e,e.return);break;case 3:Fl(e);break;case 12:Fl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ll(e)):Fl(e);break;default:Fl(e)}}function Ll(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Rl(r,e)}Pl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Uc(8,t,t.return),Ll(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ll(t));break;default:Ll(t)}e=e.sibling}}function Rl(e,t){for(;al!==null;){var n=al;switch(n.tag){case 0:case 11:case 15:Uc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ca(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,al=r;else a:for(n=e;al!==null;){r=al;var i=r.sibling,a=r.return;if(cl(r),r===n){al=null;break a}if(i!==null){i.return=a,al=i;break a}al=a}}}var zl={getCacheForType:function(e){var t=ea(oa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ea(oa).controller.signal}},Bl=typeof WeakMap==`function`?WeakMap:Map,Vl=0,Hl=null,Ul=null,Wl=0,Gl=0,Kl=null,ql=!1,W=!1,Jl=!1,Yl=0,Xl=0,Zl=0,Ql=0,$l=0,eu=0,tu=0,nu=null,ru=null,iu=!1,au=0,ou=0,su=1/0,cu=null,lu=null,uu=0,du=null,fu=null,pu=0,mu=0,hu=null,gu=null,_u=0,vu=null;function yu(){return Vl&2&&Wl!==0?Wl&-Wl:N.T===null?at():vd()}function bu(){if(eu===0)if(!(Wl&536870912)||Ni){var e=We;We<<=1,!(We&3932160)&&(We=262144),eu=e}else eu=536870912;return e=no.current,e!==null&&(e.flags|=32),eu}function xu(e,t,n){(e===Hl&&(Gl===2||Gl===9)||e.cancelPendingCommit!==null)&&(Ou(e,0),Tu(e,Wl,eu,!1)),Qe(e,n),(!(Vl&2)||e!==Hl)&&(e===Hl&&(!(Vl&2)&&(Ql|=n),Xl===4&&Tu(e,Wl,eu,!1)),ud(e))}function Su(e,t,n){if(Vl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Je(e,t),a=r?Iu(e,t):Pu(e,t,!0),o=r;do{if(a===0){W&&!r&&Tu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!wu(n)){a=Pu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=nu;var l=c.current.memoizedState.isDehydrated;if(l&&(Ou(c,s).flags|=256),s=Pu(c,s,!1),s!==2){if(Jl&&!l){c.errorRecoveryDisabledLanes|=o,Ql|=o,a=4;break a}o=ru,ru=a,o!==null&&(ru===null?ru=o:ru.push.apply(ru,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Ou(e,0),Tu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Tu(r,t,eu,!ql);break a;case 2:ru=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=au+300-De(),10<a)){if(Tu(r,t,eu,!ql),qe(r,0,!0)!==0)break a;pu=t,r.timeoutHandle=tf(Cu.bind(null,r,n,ru,cu,iu,t,eu,Ql,tu,ql,o,`Throttled`,-0,0),a);break a}Cu(r,n,ru,cu,iu,t,eu,Ql,tu,ql,o,null,-0,0)}}break}while(1);ud(e)}function Cu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:en},Nl(t,a,d);var m=(a&62914560)===a?au-De():(a&4194048)===a?ou-De():0;if(m=np(d,m),m!==null){pu=a,e.cancelPendingCommit=m(Uu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Tu(e,a,o,!l);return}}Uu(e,t,a,n,r,i,o,s,c)}function wu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Sr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Tu(e,t,n,r){t&=~$l,t&=~Ql,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-ze(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&et(e,n,t)}function Eu(){return Vl&6?!0:(dd(0,!1),!1)}function Du(){if(Ul!==null){if(Gl===0)var e=Ul.return;else e=Ul,Ki=Gi=null,jo(e),ja=null,Ma=0,e=Ul;for(;e!==null;)Vc(e.alternate,e),e=e.return;Ul=null}}function Ou(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,nf(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),pu=0,Du(),Hl=e,Ul=n=ci(e.current,null),Wl=t,Gl=0,Kl=null,ql=!1,W=Je(e,t),Jl=!1,tu=eu=$l=Ql=Zl=Xl=0,ru=nu=null,iu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-ze(r),a=1<<i;t|=e[i],r&=~a}return Yl=t,Qr(),n}function ku(e,t){po=null,N.H=Rs,t===xa||t===Ca?(t=ka(),Gl=3):t===Sa?(t=ka(),Gl=4):Gl=t===nc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Kl=t,Ul===null&&(Xl=1,Xs(e,gi(t,e.current)))}function Au(){var e=no.current;return e===null?!0:(Wl&4194048)===Wl?ro===null:(Wl&62914560)===Wl||Wl&536870912?e===ro:!1}function ju(){var e=N.H;return N.H=Rs,e===null?Rs:e}function Mu(){var e=N.A;return N.A=zl,e}function Nu(){Xl=4,ql||(Wl&4194048)!==Wl&&no.current!==null||(W=!0),!(Zl&134217727)&&!(Ql&134217727)||Hl===null||Tu(Hl,Wl,eu,!1)}function Pu(e,t,n){var r=Vl;Vl|=2;var i=ju(),a=Mu();(Hl!==e||Wl!==t)&&(cu=null,Ou(e,t)),t=!1;var o=Xl;a:do try{if(Gl!==0&&Ul!==null){var s=Ul,c=Kl;switch(Gl){case 8:Du(),o=6;break a;case 3:case 2:case 9:case 6:no.current===null&&(t=!0);var l=Gl;if(Gl=0,Kl=null,Bu(e,s,c,l),n&&W){o=0;break a}break;default:l=Gl,Gl=0,Kl=null,Bu(e,s,c,l)}}Fu(),o=Xl;break}catch(t){ku(e,t)}while(1);return t&&e.shellSuspendCounter++,Ki=Gi=null,Vl=r,N.H=i,N.A=a,Ul===null&&(Hl=null,Wl=0,Qr()),o}function Fu(){for(;Ul!==null;)Ru(Ul)}function Iu(e,t){var n=Vl;Vl|=2;var r=ju(),a=Mu();Hl!==e||Wl!==t?(cu=null,su=De()+500,Ou(e,t)):W=Je(e,t);a:do try{if(Gl!==0&&Ul!==null){t=Ul;var o=Kl;b:switch(Gl){case 1:Gl=0,Kl=null,Bu(e,t,o,1);break;case 2:case 9:if(Ta(o)){Gl=0,Kl=null,zu(t);break}t=function(){Gl!==2&&Gl!==9||Hl!==e||(Gl=7),ud(e)},o.then(t,t);break a;case 3:Gl=7;break a;case 4:Gl=5;break a;case 7:Ta(o)?(Gl=0,Kl=null,zu(t)):(Gl=0,Kl=null,Bu(e,t,o,7));break;case 5:var s=null;switch(Ul.tag){case 26:s=Ul.memoizedState;case 5:case 27:var c=Ul;if(s?$f(s):c.stateNode.complete){Gl=0,Kl=null;var l=c.sibling;if(l!==null)Ul=l;else{var u=c.return;u===null?Ul=null:(Ul=u,Vu(u))}break b}}Gl=0,Kl=null,Bu(e,t,o,5);break;case 6:Gl=0,Kl=null,Bu(e,t,o,6);break;case 8:Du(),Xl=6;break a;default:throw Error(i(462))}}Lu();break}catch(t){ku(e,t)}while(1);return Ki=Gi=null,N.H=r,N.A=a,Vl=n,Ul===null?(Hl=null,Wl=0,Qr(),Xl):0}function Lu(){for(;Ul!==null&&!Te();)Ru(Ul)}function Ru(e){var t=Mc(e.alternate,e,Yl);e.memoizedProps=e.pendingProps,t===null?Vu(e):Ul=t}function zu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=gc(n,t,t.pendingProps,t.type,void 0,Wl);break;case 11:t=gc(n,t,t.pendingProps,t.type.render,t.ref,Wl);break;case 5:jo(t);default:Vc(n,t),t=Ul=li(t,Yl),t=Mc(n,t,Yl)}e.memoizedProps=e.pendingProps,t===null?Vu(e):Ul=t}function Bu(e,t,n,r){Ki=Gi=null,jo(t),ja=null,Ma=0;var i=t.return;try{if(tc(e,i,t,n,Wl)){Xl=1,Xs(e,gi(n,e.current)),Ul=null;return}}catch(t){if(i!==null)throw Ul=i,t;Xl=1,Xs(e,gi(n,e.current)),Ul=null;return}t.flags&32768?(Ni||r===1?e=!0:W||Wl&536870912?e=!1:(ql=e=!0,(r===2||r===9||r===3||r===6)&&(r=no.current,r!==null&&r.tag===13&&(r.flags|=16384))),Hu(t,e)):Vu(t)}function Vu(e){var t=e;do{if(t.flags&32768){Hu(t,ql);return}e=t.return;var n=zc(t.alternate,t,Yl);if(n!==null){Ul=n;return}if(t=t.sibling,t!==null){Ul=t;return}Ul=t=e}while(t!==null);Xl===0&&(Xl=5)}function Hu(e,t){do{var n=Bc(e.alternate,e);if(n!==null){n.flags&=32767,Ul=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Ul=e;return}Ul=e=n}while(e!==null);Xl=6,Ul=null}function Uu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Ju();while(uu!==0);if(Vl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Zr,$e(e,n,o,s,c,l),e===Hl&&(Ul=Hl=null,Wl=0),fu=t,du=e,pu=n,mu=o,hu=a,gu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,rd(je,function(){return Yu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=N.T,N.T=null,a=P.p,P.p=2,s=Vl,Vl|=4;try{ol(e,t,n)}finally{Vl=s,P.p=a,N.T=r}}uu=1,Wu(),Gu(),Ku()}}function Wu(){if(uu===1){uu=0;var e=du,t=fu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=N.T,N.T=null;var r=P.p;P.p=2;var i=Vl;Vl|=4;try{yl(t,e);var a=Jd,o=Dr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Er(s.ownerDocument.documentElement,s)){if(c!==null&&Or(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Tr(s,h),v=Tr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}gp=!!qd,Jd=qd=null}finally{Vl=i,P.p=r,N.T=n}}e.current=t,uu=2}}function Gu(){if(uu===2){uu=0;var e=du,t=fu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=N.T,N.T=null;var r=P.p;P.p=2;var i=Vl;Vl|=4;try{sl(e,t.alternate,t)}finally{Vl=i,P.p=r,N.T=n}}uu=3}}function Ku(){if(uu===4||uu===3){uu=0,Ee();var e=du,t=fu,n=pu,r=gu;t.subtreeFlags&10256||t.flags&10256?uu=5:(uu=0,fu=du=null,qu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(lu=null),it(n),t=t.stateNode,Le&&typeof Le.onCommitFiberRoot==`function`)try{Le.onCommitFiberRoot(Ie,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=N.T,i=P.p,P.p=2,N.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{N.T=t,P.p=i}}pu&3&&Ju(),ud(e),i=e.pendingLanes,n&261930&&i&42?e===vu?_u++:(_u=0,vu=e):_u=0,dd(0,!1)}}function qu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ca(t)))}function Ju(){return Wu(),Gu(),Ku(),Yu()}function Yu(){if(uu!==5)return!1;var e=du,t=mu;mu=0;var n=it(pu),r=N.T,a=P.p;try{P.p=32>n?32:n,N.T=null,n=hu,hu=null;var o=du,s=pu;if(uu=0,fu=du=null,pu=0,Vl&6)throw Error(i(331));var c=Vl;if(Vl|=4,Il(o.current),Ol(o,o.current,s,n),Vl=c,dd(0,!1),Le&&typeof Le.onPostCommitFiberRoot==`function`)try{Le.onPostCommitFiberRoot(Ie,o)}catch{}return!0}finally{P.p=a,N.T=r,qu(e,t)}}function Xu(e,t,n){t=gi(n,t),t=Qs(e.stateNode,t,2),e=Ua(e,t,2),e!==null&&(Qe(e,2),ud(e))}function Zu(e,t,n){if(e.tag===3)Xu(e,e,n);else for(;t!==null;){if(t.tag===3){Xu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(lu===null||!lu.has(r))){e=gi(n,e),n=$s(2),r=Ua(t,n,2),r!==null&&(ec(n,r,t,e),Qe(r,2),ud(r));break}}t=t.return}}function Qu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Bl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Jl=!0,i.add(n),e=$u.bind(null,e,t,n),t.then(e,e))}function $u(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Hl===e&&(Wl&n)===n&&(Xl===4||Xl===3&&(Wl&62914560)===Wl&&300>De()-au?!(Vl&2)&&Ou(e,0):$l|=n,tu===Wl&&(tu=0)),ud(e)}function ed(e,t){t===0&&(t=Xe()),e=ti(e,t),e!==null&&(Qe(e,t),ud(e))}function td(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ed(e,n)}function nd(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),ed(e,n)}function rd(e,t){return Ce(e,t)}var id=null,ad=null,od=!1,sd=!1,cd=!1,ld=0;function ud(e){e!==ad&&e.next===null&&(ad===null?id=ad=e:ad=ad.next=e),sd=!0,od||(od=!0,_d())}function dd(e,t){if(!cd&&sd){cd=!0;do for(var n=!1,r=id;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-ze(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,gd(r,a))}else a=Wl,a=qe(r,r===Hl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Je(r,a)||(n=!0,gd(r,a));r=r.next}while(n);cd=!1}}function fd(){pd()}function pd(){sd=od=!1;var e=0;ld!==0&&ef()&&(e=ld);for(var t=De(),n=null,r=id;r!==null;){var i=r.next,a=md(r,t);a===0?(r.next=null,n===null?id=i:n.next=i,i===null&&(ad=n)):(n=r,(e!==0||a&3)&&(sd=!0)),r=i}uu!==0&&uu!==5||dd(e,!1),ld!==0&&(ld=0)}function md(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-ze(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ye(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Hl,n=Wl,n=qe(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Gl===2||Gl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&we(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Je(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&we(r),it(n)){case 2:case 8:n=Ae;break;case 32:n=je;break;case 268435456:n=Ne;break;default:n=je}return r=hd.bind(null,e),n=Ce(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&we(r),e.callbackPriority=2,e.callbackNode=null,2}function hd(e,t){if(uu!==0&&uu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Ju()&&e.callbackNode!==n)return null;var r=Wl;return r=qe(e,e===Hl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Su(e,r,t),md(e,De()),e.callbackNode!=null&&e.callbackNode===n?hd.bind(null,e):null)}function gd(e,t){if(Ju())return null;Su(e,t,!0)}function _d(){af(function(){Vl&6?Ce(ke,fd):pd()})}function vd(){if(ld===0){var e=da;e===0&&(e=Ue,Ue<<=1,!(Ue&261888)&&(Ue=256)),ld=e}return ld}function yd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:$t(``+e)}function bd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function xd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=yd((i[lt]||null).action),o=r.submitter;o&&(t=(t=o[lt]||null)?yd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new xn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ld!==0){var e=o?bd(i,o):new FormData(i);ws(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?bd(i,o):new FormData(i),ws(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Sd=0;Sd<qr.length;Sd++){var Cd=qr[Sd];B(Cd.toLowerCase(),`on`+(Cd[0].toUpperCase()+Cd.slice(1)))}B(Br,`onAnimationEnd`),B(Vr,`onAnimationIteration`),B(Hr,`onAnimationStart`),B(`dblclick`,`onDoubleClick`),B(`focusin`,`onFocus`),B(`focusout`,`onBlur`),B(Ur,`onTransitionRun`),B(Wr,`onTransitionStart`),B(Gr,`onTransitionCancel`),B(z,`onTransitionEnd`),Tt(`onMouseEnter`,[`mouseout`,`mouseover`]),Tt(`onMouseLeave`,[`mouseout`,`mouseover`]),Tt(`onPointerEnter`,[`pointerout`,`pointerover`]),Tt(`onPointerLeave`,[`pointerout`,`pointerover`]),wt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),wt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),wt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),wt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),wt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),wt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var wd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Td=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(wd));function Ed(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Jr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Jr(e)}i.currentTarget=null,a=c}}}}function Dd(e,t){var n=t[dt];n===void 0&&(n=t[dt]=new Set);var r=e+`__bubble`;n.has(r)||(jd(t,e,2,!1),n.add(r))}function Od(e,t,n){var r=0;t&&(r|=4),jd(n,e,r,t)}var kd=`_reactListening`+Math.random().toString(36).slice(2);function Ad(e){if(!e[kd]){e[kd]=!0,St.forEach(function(t){t!==`selectionchange`&&(Td.has(t)||Od(t,!1,e),Od(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[kd]||(t[kd]=!0,Od(`selectionchange`,!1,t))}}function jd(e,t,n,r){switch(Cp(t)){case 2:var i=_p;break;case 8:i=vp;break;default:i=yp}n=i.bind(null,t,n,e),i=void 0,!un||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Md(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=_t(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}sn(function(){var r=a,i=nn(n),s=[];a:{var c=Kr.get(e);if(c!==void 0){var l=xn,u=e;switch(e){case`keypress`:if(gn(n)===0)break a;case`keydown`:case`keyup`:l=zn;break;case`focusin`:u=`focus`,l=An;break;case`focusout`:u=`blur`,l=An;break;case`beforeblur`:case`afterblur`:l=An;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=On;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=kn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Vn;break;case Br:case Vr:case Hr:l=jn;break;case z:l=Hn;break;case`scroll`:case`scrollend`:l=Cn;break;case`wheel`:l=Un;break;case`copy`:case`cut`:case`paste`:l=Mn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Bn;break;case`toggle`:case`beforetoggle`:l=Wn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=cn(m,p),g!=null&&d.push(Nd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==tn&&(u=n.relatedTarget||n.fromElement)&&(_t(u)||u[ut]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?_t(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=On,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Bn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:yt(l),h=u==null?c:yt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,_t(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Fd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Id(s,c,l,d,!1),u!==null&&f!==null&&Id(s,f,u,d,!0)}}a:{if(c=r?yt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=ur;else if(ir(c))if(dr)v=br;else{v=vr;var y=_r}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Xt(r.elementType)&&(v=ur):v=yr;if(v&&=v(e,r)){ar(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Ht(c,`number`,c.value)}switch(y=r?yt(r):window,e){case`focusin`:(ir(y)||y.contentEditable===`true`)&&(Ar=y,jr=r,Mr=null);break;case`focusout`:Mr=jr=Ar=null;break;case`mousedown`:Nr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Nr=!1,Pr(s,n,i);break;case`selectionchange`:if(kr)break;case`keydown`:case`keyup`:Pr(s,n,i)}var b;if(Kn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else er?Qn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Yn&&n.locale!==`ko`&&(er||x!==`onCompositionStart`?x===`onCompositionEnd`&&er&&(b=hn()):(fn=i,pn=`value`in fn?fn.value:fn.textContent,er=!0)),y=Pd(r,x),0<y.length&&(x=new Nn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=$n(n),b!==null&&(x.data=b)))),(b=Jn?tr(e,n):nr(e,n))&&(x=Pd(r,`onBeforeInput`),0<x.length&&(y=new Nn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),xd(s,e,r,n,i)}Ed(s,t)})}function Nd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Pd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=cn(e,n),i!=null&&r.unshift(Nd(e,i,a)),i=cn(e,t),i!=null&&r.push(Nd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Fd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Id(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=cn(n,a),l!=null&&o.unshift(Nd(n,l,c))):i||(l=cn(n,a),l!=null&&o.push(Nd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ld=/\r\n?/g,Rd=/\u0000|\uFFFD/g;function zd(e){return(typeof e==`string`?e:``+e).replace(Ld,`
|
|
9
|
+
`).replace(Rd,``)}function Bd(e,t){return t=zd(t),zd(e)===t}function Vd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Kt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Kt(e,``+r);break;case`className`:At(e,`class`,r);break;case`tabIndex`:At(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:At(e,n,r);break;case`style`:Yt(e,r,o);break;case`data`:if(t!==`object`){At(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=$t(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Vd(e,t,`name`,a.name,a,null),Vd(e,t,`formEncType`,a.formEncType,a,null),Vd(e,t,`formMethod`,a.formMethod,a,null),Vd(e,t,`formTarget`,a.formTarget,a,null)):(Vd(e,t,`encType`,a.encType,a,null),Vd(e,t,`method`,a.method,a,null),Vd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=$t(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=en);break;case`onScroll`:r!=null&&Dd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Dd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=$t(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Dd(`beforetoggle`,e),Dd(`toggle`,e),L(e,`popover`,r);break;case`xlinkActuate`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:L(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Zt.get(n)||n,L(e,n,r))}}function Hd(e,t,n,r,a,o){switch(n){case`style`:Yt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Kt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Kt(e,``+r);break;case`onScroll`:r!=null&&Dd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Dd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=en);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Ct.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[lt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):L(e,n,r)}}}function Ud(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Dd(`error`,e),Dd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Vd(e,t,o,s,n,null)}}a&&Vd(e,t,`srcSet`,n.srcSet,n,null),r&&Vd(e,t,`src`,n.src,n,null);return;case`input`:Dd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Vd(e,t,r,d,n,null)}}Vt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Dd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Vd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ut(e,!!r,n,!0):Ut(e,!!r,t,!1);return;case`textarea`:for(s in Dd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Vd(e,t,s,c,n,null)}Gt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Vd(e,t,l,r,n,null)}return;case`dialog`:Dd(`beforetoggle`,e),Dd(`toggle`,e),Dd(`cancel`,e),Dd(`close`,e);break;case`iframe`:case`object`:Dd(`load`,e);break;case`video`:case`audio`:for(r=0;r<wd.length;r++)Dd(wd[r],e);break;case`image`:Dd(`error`,e),Dd(`load`,e);break;case`details`:Dd(`toggle`,e);break;case`embed`:case`source`:case`link`:Dd(`error`,e),Dd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Vd(e,t,u,r,n,null)}return;default:if(Xt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Hd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Vd(e,t,c,r,n,null))}function Wd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Vd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Vd(e,t,p,m,r,f)}}Bt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Vd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Vd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ut(e,!!n,n?[]:``,!1):Ut(e,!!n,t,!0)):Ut(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Vd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Vd(e,t,s,a,r,o)}Wt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Vd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Vd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Vd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Vd(e,t,u,p,r,m)}return;default:if(Xt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Hd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Hd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Vd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Vd(e,t,f,p,r,m)}function Gd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Kd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Gd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Gd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var qd=null,Jd=null;function Yd(e){return e.nodeType===9?e:e.ownerDocument}function Xd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Zd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Qd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var $d=null;function ef(){var e=window.event;return e&&e.type===`popstate`?e===$d?!1:($d=e,!0):($d=null,!1)}var tf=typeof setTimeout==`function`?setTimeout:void 0,nf=typeof clearTimeout==`function`?clearTimeout:void 0,rf=typeof Promise==`function`?Promise:void 0,af=typeof queueMicrotask==`function`?queueMicrotask:rf===void 0?tf:function(e){return rf.resolve(null).then(e).catch(of)};function of(e){setTimeout(function(){throw e})}function sf(e){return e===`head`}function cf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Hp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Sf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Sf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ht]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Sf(e.ownerDocument.body);n=i}while(n);Hp(t)}function lf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function uf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:uf(n),gt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function df(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[ht])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=_f(e.nextSibling),e===null)break}return null}function ff(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=_f(e.nextSibling),e===null))return null;return e}function pf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=_f(e.nextSibling),e===null))return null;return e}function mf(e){return e.data===`$?`||e.data===`$~`}function hf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function gf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function _f(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var vf=null;function yf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return _f(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function bf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function xf(e,t,n){switch(t=Yd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Sf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);gt(e)}var Cf=new Map,wf=new Set;function Tf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ef=P.d;P.d={f:Df,r:Of,D:jf,C:Mf,L:Nf,m:Pf,X:If,S:Ff,M:Lf};function Df(){var e=Ef.f(),t=Eu();return e||t}function Of(e){var t=vt(e);t!==null&&t.tag===5&&t.type===`form`?Es(t):Ef.r(e)}var kf=typeof document>`u`?null:document;function Af(e,t,n){var r=kf;if(r&&typeof t==`string`&&t){var i=zt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),wf.has(i)||(wf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Ud(t,`link`,e),xt(t),r.head.appendChild(t)))}}function jf(e){Ef.D(e),Af(`dns-prefetch`,e,null)}function Mf(e,t){Ef.C(e,t),Af(`preconnect`,e,t)}function Nf(e,t,n){Ef.L(e,t,n);var r=kf;if(r&&e&&t){var i=`link[rel="preload"][as="`+zt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+zt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+zt(n.imageSizes)+`"]`)):i+=`[href="`+zt(e)+`"]`;var a=i;switch(t){case`style`:a=zf(e);break;case`script`:a=Uf(e)}Cf.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Cf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Bf(a))||t===`script`&&r.querySelector(Wf(a))||(t=r.createElement(`link`),Ud(t,`link`,e),xt(t),r.head.appendChild(t)))}}function Pf(e,t){Ef.m(e,t);var n=kf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+zt(r)+`"][href="`+zt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Uf(e)}if(!Cf.has(a)&&(e=m({rel:`modulepreload`,href:e},t),Cf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Wf(a)))return}r=n.createElement(`link`),Ud(r,`link`,e),xt(r),n.head.appendChild(r)}}}function Ff(e,t,n){Ef.S(e,t,n);var r=kf;if(r&&e){var i=bt(r).hoistableStyles,a=zf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Bf(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Cf.get(a))&&qf(e,n);var c=o=r.createElement(`link`);xt(c),Ud(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Kf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function If(e,t){Ef.X(e,t);var n=kf;if(n&&e){var r=bt(n).hoistableScripts,i=Uf(e),a=r.get(i);a||(a=n.querySelector(Wf(i)),a||(e=m({src:e,async:!0},t),(t=Cf.get(i))&&Jf(e,t),a=n.createElement(`script`),xt(a),Ud(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Lf(e,t){Ef.M(e,t);var n=kf;if(n&&e){var r=bt(n).hoistableScripts,i=Uf(e),a=r.get(i);a||(a=n.querySelector(Wf(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=Cf.get(i))&&Jf(e,t),a=n.createElement(`script`),xt(a),Ud(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rf(e,t,n,r){var a=(a=de.current)?Tf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=zf(n.href),n=bt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=zf(n.href);var o=bt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Bf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Cf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Cf.set(e,n),o||Hf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Uf(n),n=bt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function zf(e){return`href="`+zt(e)+`"`}function Bf(e){return`link[rel="stylesheet"][`+e+`]`}function Vf(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Hf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Ud(t,`link`,n),xt(t),e.head.appendChild(t))}function Uf(e){return`[src="`+zt(e)+`"]`}function Wf(e){return`script[async]`+e}function Gf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+zt(n.href)+`"]`);if(r)return t.instance=r,xt(r),r;var a=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),xt(r),Ud(r,`style`,a),Kf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=zf(n.href);var o=e.querySelector(Bf(a));if(o)return t.state.loading|=4,t.instance=o,xt(o),o;r=Vf(n),(a=Cf.get(a))&&qf(r,a),o=(e.ownerDocument||e).createElement(`link`),xt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Ud(o,`link`,r),t.state.loading|=4,Kf(o,n.precedence,e),t.instance=o;case`script`:return o=Uf(n.src),(a=e.querySelector(Wf(o)))?(t.instance=a,xt(a),a):(r=n,(a=Cf.get(o))&&(r=m({},n),Jf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),xt(a),Ud(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Kf(r,n.precedence,e));return t.instance}function Kf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function qf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Jf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Yf=null;function Xf(e,t,n){if(Yf===null){var r=new Map,i=Yf=new Map;i.set(n,r)}else i=Yf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[ht]||a[ct]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Zf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Qf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function $f(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function ep(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=zf(r.href),a=t.querySelector(Bf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=rp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,xt(a);return}a=t.ownerDocument||t,r=Vf(r),(i=Cf.get(i))&&qf(r,i),a=a.createElement(`link`),xt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Ud(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=rp.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var tp=0;function np(e,t){return e.stylesheets&&e.count===0&&ap(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ap(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&tp===0&&(tp=62500*Kd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ap(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>tp?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function rp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ap(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ip=null;function ap(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ip=new Map,t.forEach(op,e),ip=null,rp.call(e))}function op(e,t){if(!(t.state.loading&4)){var n=ip.get(e);if(n)var r=n.get(null);else{n=new Map,ip.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=rp.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var sp={$$typeof:C,Provider:null,Consumer:null,_currentValue:re,_currentValue2:re,_threadCount:0};function cp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ze(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ze(0),this.hiddenUpdates=Ze(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function lp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new cp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=oi(3,null,null,t),e.current=a,a.stateNode=e,t=sa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ba(a),e}function up(e){return e?(e=ii,e):ii}function dp(e,t,n,r,i,a){i=up(i),r.context===null?r.context=i:r.pendingContext=i,r=Ha(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ua(e,r,t),n!==null&&(xu(n,e,t),Wa(n,e,t))}function fp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function pp(e,t){fp(e,t),(e=e.alternate)&&fp(e,t)}function mp(e){if(e.tag===13||e.tag===31){var t=ti(e,67108864);t!==null&&xu(t,e,67108864),pp(e,67108864)}}function hp(e){if(e.tag===13||e.tag===31){var t=yu();t=rt(t);var n=ti(e,t);n!==null&&xu(n,e,t),pp(e,t)}}var gp=!0;function _p(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=2,yp(e,t,n,r)}finally{P.p=a,N.T=i}}function vp(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=8,yp(e,t,n,r)}finally{P.p=a,N.T=i}}function yp(e,t,n,r){if(gp){var i=bp(r);if(i===null)Md(e,t,r,xp,n),Mp(e,r);else if(Pp(i,e,t,n,r))r.stopPropagation();else if(Mp(e,r),t&4&&-1<jp.indexOf(e)){for(;i!==null;){var a=vt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ke(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-ze(o);s.entanglements[1]|=c,o&=~c}ud(a),!(Vl&6)&&(su=De()+500,dd(0,!1))}}break;case 31:case 13:s=ti(a,2),s!==null&&xu(s,a,2),Eu(),pp(a,2)}if(a=bp(r),a===null&&Md(e,t,r,xp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Md(e,t,r,null,n)}}function bp(e){return e=nn(e),Sp(e)}var xp=null;function Sp(e){if(xp=null,e=_t(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return xp=e,null}function Cp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Oe()){case ke:return 2;case Ae:return 8;case je:case Me:return 32;case Ne:return 268435456;default:return 32}default:return 32}}var wp=!1,Tp=null,Ep=null,Dp=null,Op=new Map,kp=new Map,Ap=[],jp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Mp(e,t){switch(e){case`focusin`:case`focusout`:Tp=null;break;case`dragenter`:case`dragleave`:Ep=null;break;case`mouseover`:case`mouseout`:Dp=null;break;case`pointerover`:case`pointerout`:Op.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:kp.delete(t.pointerId)}}function Np(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=vt(t),t!==null&&mp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Pp(e,t,n,r,i){switch(t){case`focusin`:return Tp=Np(Tp,e,t,n,r,i),!0;case`dragenter`:return Ep=Np(Ep,e,t,n,r,i),!0;case`mouseover`:return Dp=Np(Dp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Op.set(a,Np(Op.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,kp.set(a,Np(kp.get(a)||null,e,t,n,r,i)),!0}return!1}function Fp(e){var t=_t(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,ot(e.priority,function(){hp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,ot(e.priority,function(){hp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ip(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);tn=r,n.target.dispatchEvent(r),tn=null}else return t=vt(n),t!==null&&mp(t),e.blockedOn=n,!1;t.shift()}return!0}function Lp(e,t,n){Ip(e)&&n.delete(t)}function Rp(){wp=!1,Tp!==null&&Ip(Tp)&&(Tp=null),Ep!==null&&Ip(Ep)&&(Ep=null),Dp!==null&&Ip(Dp)&&(Dp=null),Op.forEach(Lp),kp.forEach(Lp)}function zp(e,n){e.blockedOn===n&&(e.blockedOn=null,wp||(wp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Rp)))}var Bp=null;function Vp(e){Bp!==e&&(Bp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Bp===e&&(Bp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Sp(r||n)===null)continue;break}var a=vt(n);a!==null&&(e.splice(t,3),t-=3,ws(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hp(e){function t(t){return zp(t,e)}Tp!==null&&zp(Tp,e),Ep!==null&&zp(Ep,e),Dp!==null&&zp(Dp,e),Op.forEach(t),kp.forEach(t);for(var n=0;n<Ap.length;n++){var r=Ap[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ap.length&&(n=Ap[0],n.blockedOn===null);)Fp(n),n.blockedOn===null&&Ap.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[lt]||null;if(typeof a==`function`)o||Vp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[lt]||null)s=o.formAction;else if(Sp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Vp(n)}}}function Up(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Wp(e){this._internalRoot=e}G.prototype.render=Wp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;dp(n,yu(),e,t,null,null)},G.prototype.unmount=Wp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dp(e.current,2,null,e,null,null),Eu(),t[ut]=null}};function G(e){this._internalRoot=e}G.prototype.unstable_scheduleHydration=function(e){if(e){var t=at();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ap.length&&t!==0&&t<Ap[n].priority;n++);Ap.splice(n,0,e),n===0&&Fp(e)}};var Gp=n.version;if(Gp!==`19.2.4`)throw Error(i(527,Gp,`19.2.4`));P.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Kp={bundleType:0,version:`19.2.4`,rendererPackageName:`react-dom`,currentDispatcherRef:N,reconcilerVersion:`19.2.4`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var qp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!qp.isDisabled&&qp.supportsFiber)try{Ie=qp.inject(Kp),Le=qp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=qs,s=Js,c=Ys;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=lp(e,1,!1,null,null,n,r,null,o,s,c,Up),e[ut]=t.current,Ad(e),new Wp(t)}})),_=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v={black:`#000`,white:`#fff`},y={50:`#ffebee`,100:`#ffcdd2`,200:`#ef9a9a`,300:`#e57373`,400:`#ef5350`,500:`#f44336`,600:`#e53935`,700:`#d32f2f`,800:`#c62828`,900:`#b71c1c`,A100:`#ff8a80`,A200:`#ff5252`,A400:`#ff1744`,A700:`#d50000`},b={50:`#f3e5f5`,100:`#e1bee7`,200:`#ce93d8`,300:`#ba68c8`,400:`#ab47bc`,500:`#9c27b0`,600:`#8e24aa`,700:`#7b1fa2`,800:`#6a1b9a`,900:`#4a148c`,A100:`#ea80fc`,A200:`#e040fb`,A400:`#d500f9`,A700:`#aa00ff`},x={50:`#e3f2fd`,100:`#bbdefb`,200:`#90caf9`,300:`#64b5f6`,400:`#42a5f5`,500:`#2196f3`,600:`#1e88e5`,700:`#1976d2`,800:`#1565c0`,900:`#0d47a1`,A100:`#82b1ff`,A200:`#448aff`,A400:`#2979ff`,A700:`#2962ff`},S={50:`#e1f5fe`,100:`#b3e5fc`,200:`#81d4fa`,300:`#4fc3f7`,400:`#29b6f6`,500:`#03a9f4`,600:`#039be5`,700:`#0288d1`,800:`#0277bd`,900:`#01579b`,A100:`#80d8ff`,A200:`#40c4ff`,A400:`#00b0ff`,A700:`#0091ea`},C={50:`#e8f5e9`,100:`#c8e6c9`,200:`#a5d6a7`,300:`#81c784`,400:`#66bb6a`,500:`#4caf50`,600:`#43a047`,700:`#388e3c`,800:`#2e7d32`,900:`#1b5e20`,A100:`#b9f6ca`,A200:`#69f0ae`,A400:`#00e676`,A700:`#00c853`},w={50:`#fff3e0`,100:`#ffe0b2`,200:`#ffcc80`,300:`#ffb74d`,400:`#ffa726`,500:`#ff9800`,600:`#fb8c00`,700:`#f57c00`,800:`#ef6c00`,900:`#e65100`,A100:`#ffd180`,A200:`#ffab40`,A400:`#ff9100`,A700:`#ff6d00`},T={50:`#efebe9`,100:`#d7ccc8`,200:`#bcaaa4`,300:`#a1887f`,400:`#8d6e63`,500:`#795548`,600:`#6d4c41`,700:`#5d4037`,800:`#4e342e`,900:`#3e2723`,A100:`#d7ccc8`,A200:`#bcaaa4`,A400:`#8d6e63`,A700:`#5d4037`},E={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`};function D(e,...t){let n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>n.searchParams.append(`args[]`,e)),`Minified MUI error #${e}; visit ${n} for the full message.`}var O=`$$material`;function k(){return k=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},k.apply(null,arguments)}var ee=!1;function A(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function j(e){var t=document.createElement(`style`);return t.setAttribute(`data-emotion`,e.key),e.nonce!==void 0&&t.setAttribute(`nonce`,e.nonce),t.appendChild(document.createTextNode(``)),t.setAttribute(`data-s`,``),t}var te=function(){function e(e){var t=this;this._insertTag=function(e){var n=t.tags.length===0?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling;t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=e.speedy===void 0?!ee:e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(j(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=A(t);try{n.insertRule(e,n.cssRules.length)}catch{}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){return e.parentNode?.removeChild(e)}),this.tags=[],this.ctr=0},e}(),M=`-ms-`,ne=`-moz-`,N=`-webkit-`,P=`comm`,re=`rule`,ie=`decl`,ae=`@import`,oe=`@keyframes`,se=`@layer`,ce=Math.abs,le=String.fromCharCode,ue=Object.assign;function de(e,t){return he(e,0)^45?(((t<<2^he(e,0))<<2^he(e,1))<<2^he(e,2))<<2^he(e,3):0}function F(e){return e.trim()}function fe(e,t){return(e=t.exec(e))?e[0]:e}function pe(e,t,n){return e.replace(t,n)}function me(e,t){return e.indexOf(t)}function he(e,t){return e.charCodeAt(t)|0}function ge(e,t,n){return e.slice(t,n)}function _e(e){return e.length}function I(e){return e.length}function ve(e,t){return t.push(e),e}function ye(e,t){return e.map(t).join(``)}var be=1,xe=1,Se=0,Ce=0,we=0,Te=``;function Ee(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:be,column:xe,length:o,return:``}}function De(e,t){return ue(Ee(``,null,null,``,null,null,0),e,{length:-e.length},t)}function Oe(){return we}function ke(){return we=Ce>0?he(Te,--Ce):0,xe--,we===10&&(xe=1,be--),we}function Ae(){return we=Ce<Se?he(Te,Ce++):0,xe++,we===10&&(xe=1,be++),we}function je(){return he(Te,Ce)}function Me(){return Ce}function Ne(e,t){return ge(Te,e,t)}function Pe(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Fe(e){return be=xe=1,Se=_e(Te=e),Ce=0,[]}function Ie(e){return Te=``,e}function Le(e){return F(Ne(Ce-1,Be(e===91?e+2:e===40?e+1:e)))}function Re(e){for(;(we=je())&&we<33;)Ae();return Pe(e)>2||Pe(we)>3?``:` `}function ze(e,t){for(;--t&&Ae()&&!(we<48||we>102||we>57&&we<65||we>70&&we<97););return Ne(e,Me()+(t<6&&je()==32&&Ae()==32))}function Be(e){for(;Ae();)switch(we){case e:return Ce;case 34:case 39:e!==34&&e!==39&&Be(we);break;case 40:e===41&&Be(e);break;case 92:Ae();break}return Ce}function Ve(e,t){for(;Ae()&&e+we!==57&&!(e+we===84&&je()===47););return`/*`+Ne(t,Ce-1)+`*`+le(e===47?e:Ae())}function He(e){for(;!Pe(je());)Ae();return Ne(e,Ce)}function Ue(e){return Ie(We(``,null,null,null,[``],e=Fe(e),0,[0],e))}function We(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=``,b=i,x=a,S=r,C=y;g;)switch(m=v,v=Ae()){case 40:if(m!=108&&he(C,d-1)==58){me(C+=pe(Le(v),`&`,`&\f`),`&\f`)!=-1&&(_=-1);break}case 34:case 39:case 91:C+=Le(v);break;case 9:case 10:case 13:case 32:C+=Re(m);break;case 92:C+=ze(Me()-1,7);continue;case 47:switch(je()){case 42:case 47:ve(Ke(Ve(Ae(),Me()),t,n),c);break;default:C+=`/`}break;case 123*h:s[l++]=_e(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=pe(C,/\f/g,``)),p>0&&_e(C)-d&&ve(p>32?qe(C+`;`,r,n,d-1):qe(pe(C,` `,``)+`;`,r,n,d-2),c);break;case 59:C+=`;`;default:if(ve(S=Ge(C,t,n,l,u,i,s,y,b=[],x=[],d),a),v===123)if(u===0)We(C,t,S,S,b,a,d,s,x);else switch(f===99&&he(C,3)===110?100:f){case 100:case 108:case 109:case 115:We(e,S,S,r&&ve(Ge(e,S,S,0,0,i,s,y,i,b=[],d),x),i,x,d,s,r?b:x);break;default:We(C,S,S,S,[``],x,0,s,x)}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+_e(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&ke()==125)continue}switch(C+=le(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(_e(C)-1)*_,_=1;break;case 64:je()===45&&(C+=Le(Ae())),f=je(),u=d=_e(y=C+=He(Me())),v++;break;case 45:m===45&&_e(C)==2&&(h=0)}}return a}function Ge(e,t,n,r,i,a,o,s,c,l,u){for(var d=i-1,f=i===0?a:[``],p=I(f),m=0,h=0,g=0;m<r;++m)for(var _=0,v=ge(e,d+1,d=ce(h=o[m])),y=e;_<p;++_)(y=F(h>0?f[_]+` `+v:pe(v,/&\f/g,f[_])))&&(c[g++]=y);return Ee(e,t,n,i===0?re:s,c,l,u)}function Ke(e,t,n){return Ee(e,t,n,P,le(Oe()),ge(e,2,-2),0)}function qe(e,t,n,r){return Ee(e,t,n,ie,ge(e,0,r),ge(e,r+1,-1),r)}function Je(e,t){for(var n=``,r=I(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||``;return n}function Ye(e,t,n,r){switch(e.type){case se:if(e.children.length)break;case ae:case ie:return e.return=e.return||e.value;case P:return``;case oe:return e.return=e.value+`{`+Je(e.children,r)+`}`;case re:e.value=e.props.join(`,`)}return _e(n=Je(e.children,r))?e.return=e.value+`{`+n+`}`:``}function Xe(e){var t=I(e);return function(n,r,i,a){for(var o=``,s=0;s<t;s++)o+=e[s](n,r,i,a)||``;return o}}function Ze(e){return function(t){t.root||(t=t.return)&&e(t)}}function Qe(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var $e=function(e,t,n){for(var r=0,i=0;r=i,i=je(),r===38&&i===12&&(t[n]=1),!Pe(i);)Ae();return Ne(e,Ce)},et=function(e,t){var n=-1,r=44;do switch(Pe(r)){case 0:r===38&&je()===12&&(t[n]=1),e[n]+=$e(Ce-1,t,n);break;case 2:e[n]+=Le(r);break;case 4:if(r===44){e[++n]=je()===58?`&\f`:``,t[n]=e[n].length;break}default:e[n]+=le(r)}while(r=Ae());return e},tt=function(e,t){return Ie(et(Fe(e),t))},nt=new WeakMap,rt=function(e){if(!(e.type!==`rule`||!e.parent||e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;n.type!==`rule`;)if(n=n.parent,!n)return;if(!(e.props.length===1&&t.charCodeAt(0)!==58&&!nt.get(n))&&!r){nt.set(e,!0);for(var i=[],a=tt(t,i),o=n.props,s=0,c=0;s<a.length;s++)for(var l=0;l<o.length;l++,c++)e.props[c]=i[s]?a[s].replace(/&\f/g,o[l]):o[l]+` `+a[s]}}},it=function(e){if(e.type===`decl`){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return=``,e.value=``)}};function at(e,t){switch(de(e,t)){case 5103:return N+`print-`+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return N+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return N+e+ne+e+M+e+e;case 6828:case 4268:return N+e+M+e+e;case 6165:return N+e+M+`flex-`+e+e;case 5187:return N+e+pe(e,/(\w+).+(:[^]+)/,N+`box-$1$2`+M+`flex-$1$2`)+e;case 5443:return N+e+M+`flex-item-`+pe(e,/flex-|-self/,``)+e;case 4675:return N+e+M+`flex-line-pack`+pe(e,/align-content|flex-|-self/,``)+e;case 5548:return N+e+M+pe(e,`shrink`,`negative`)+e;case 5292:return N+e+M+pe(e,`basis`,`preferred-size`)+e;case 6060:return N+`box-`+pe(e,`-grow`,``)+N+e+M+pe(e,`grow`,`positive`)+e;case 4554:return N+pe(e,/([^-])(transform)/g,`$1`+N+`$2`)+e;case 6187:return pe(pe(pe(e,/(zoom-|grab)/,N+`$1`),/(image-set)/,N+`$1`),e,``)+e;case 5495:case 3959:return pe(e,/(image-set\([^]*)/,N+"$1$`$1");case 4968:return pe(pe(e,/(.+:)(flex-)?(.*)/,N+`box-pack:$3`+M+`flex-pack:$3`),/s.+-b[^;]+/,`justify`)+N+e+e;case 4095:case 3583:case 4068:case 2532:return pe(e,/(.+)-inline(.+)/,N+`$1$2`)+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(_e(e)-1-t>6)switch(he(e,t+1)){case 109:if(he(e,t+4)!==45)break;case 102:return pe(e,/(.+:)(.+)-([^]+)/,`$1`+N+`$2-$3$1`+ne+(he(e,t+3)==108?`$3`:`$2-$3`))+e;case 115:return~me(e,`stretch`)?at(pe(e,`stretch`,`fill-available`),t)+e:e}break;case 4949:if(he(e,t+1)!==115)break;case 6444:switch(he(e,_e(e)-3-(~me(e,`!important`)&&10))){case 107:return pe(e,`:`,`:`+N)+e;case 101:return pe(e,/(.+:)([^;!]+)(;|!.+)?/,`$1`+N+(he(e,14)===45?`inline-`:``)+`box$3$1`+N+`$2$3$1`+M+`$2box$3`)+e}break;case 5936:switch(he(e,t+11)){case 114:return N+e+M+pe(e,/[svh]\w+-[tblr]{2}/,`tb`)+e;case 108:return N+e+M+pe(e,/[svh]\w+-[tblr]{2}/,`tb-rl`)+e;case 45:return N+e+M+pe(e,/[svh]\w+-[tblr]{2}/,`lr`)+e}return N+e+M+e+e}return e}var ot=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case ie:e.return=at(e.value,e.length);break;case oe:return Je([De(e,{value:pe(e.value,`@`,`@`+N)})],r);case re:if(e.length)return ye(e.props,function(t){switch(fe(t,/(::plac\w+|:read-\w+)/)){case`:read-only`:case`:read-write`:return Je([De(e,{props:[pe(t,/:(read-\w+)/,`:`+ne+`$1`)]})],r);case`::placeholder`:return Je([De(e,{props:[pe(t,/:(plac\w+)/,`:`+N+`input-$1`)]}),De(e,{props:[pe(t,/:(plac\w+)/,`:`+ne+`$1`)]}),De(e,{props:[pe(t,/:(plac\w+)/,M+`input-$1`)]})],r)}return``})}}],st=function(e){var t=e.key;if(t===`css`){var n=document.querySelectorAll(`style[data-emotion]:not([data-s])`);Array.prototype.forEach.call(n,function(e){e.getAttribute(`data-emotion`).indexOf(` `)!==-1&&(document.head.appendChild(e),e.setAttribute(`data-s`,``))})}var r=e.stylisPlugins||ot,i={},a,o=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll(`style[data-emotion^="`+t+` "]`),function(e){for(var t=e.getAttribute(`data-emotion`).split(` `),n=1;n<t.length;n++)i[t[n]]=!0;o.push(e)});var s,c=[rt,it],l,u=[Ye,Ze(function(e){l.insert(e)})],d=Xe(c.concat(r,u)),f=function(e){return Je(Ue(e),d)};s=function(e,t,n,r){l=n,f(e?e+`{`+t.styles+`}`:t.styles),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new te({key:t,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:s};return p.sheet.hydrate(o),p},ct=o((e=>{var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case u:case i:case o:case a:case f:return e;default:switch(e&&=e.$$typeof,e){case c:case d:case h:case m:case s:return e;default:return t}}case r:return t}}}function x(e){return b(e)===u}e.AsyncMode=l,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=h,e.Memo=m,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return x(e)||b(e)===l},e.isConcurrentMode=x,e.isContextConsumer=function(e){return b(e)===c},e.isContextProvider=function(e){return b(e)===s},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return b(e)===d},e.isFragment=function(e){return b(e)===i},e.isLazy=function(e){return b(e)===h},e.isMemo=function(e){return b(e)===m},e.isPortal=function(e){return b(e)===r},e.isProfiler=function(e){return b(e)===o},e.isStrictMode=function(e){return b(e)===a},e.isSuspense=function(e){return b(e)===f},e.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},e.typeOf=b})),lt=o(((e,t)=>{t.exports=ct()})),ut=o(((e,t)=>{var n=lt(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[n.ForwardRef]=a,s[n.Memo]=o;function c(e){return n.isMemo(e)?o:s[e.$$typeof]||r}var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;function h(e,t,n){if(typeof t!=`string`){if(m){var r=p(t);r&&r!==m&&h(e,r,n)}var a=u(t);d&&(a=a.concat(d(t)));for(var o=c(e),s=c(t),g=0;g<a.length;++g){var _=a[g];if(!i[_]&&!(n&&n[_])&&!(s&&s[_])&&!(o&&o[_])){var v=f(t,_);try{l(e,_,v)}catch{}}}}return e}t.exports=h})),dt=!0;function ft(e,t,n){var r=``;return n.split(` `).forEach(function(n){e[n]===void 0?n&&(r+=n+` `):t.push(e[n]+`;`)}),r}var pt=function(e,t,n){var r=e.key+`-`+t.name;(n===!1||dt===!1)&&e.registered[r]===void 0&&(e.registered[r]=t.styles)},mt=function(e,t,n){pt(e,t,n);var r=e.key+`-`+t.name;if(e.inserted[t.name]===void 0){var i=t;do e.insert(t===i?`.`+r:``,i,e.sheet,!0),i=i.next;while(i!==void 0)}};function ht(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&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 gt={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},_t=!1,vt=/[A-Z]|^ms/g,yt=/_EMO_([^_]+?)_([^]*?)_EMO_/g,bt=function(e){return e.charCodeAt(1)===45},xt=function(e){return e!=null&&typeof e!=`boolean`},St=Qe(function(e){return bt(e)?e:e.replace(vt,`-$&`).toLowerCase()}),Ct=function(e,t){switch(e){case`animation`:case`animationName`:if(typeof t==`string`)return t.replace(yt,function(e,t,n){return Ot={name:t,styles:n,next:Ot},t})}return gt[e]!==1&&!bt(e)&&typeof t==`number`&&t!==0?t+`px`:t},wt=`Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.`;function Tt(e,t,n){if(n==null)return``;var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case`boolean`:return``;case`object`:var i=n;if(i.anim===1)return Ot={name:i.name,styles:i.styles,next:Ot},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)Ot={name:o.name,styles:o.styles,next:Ot},o=o.next;return a.styles+`;`}return Et(e,t,n);case`function`:if(e!==void 0){var s=Ot,c=n(e);return Ot=s,Tt(e,t,c)}break}var l=n;if(t==null)return l;var u=t[l];return u===void 0?l:u}function Et(e,t,n){var r=``;if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Tt(e,t,n[i])+`;`;else for(var a in n){var o=n[a];if(typeof o!=`object`){var s=o;t!=null&&t[s]!==void 0?r+=a+`{`+t[s]+`}`:xt(s)&&(r+=St(a)+`:`+Ct(a,s)+`;`)}else{if(a===`NO_COMPONENT_SELECTOR`&&_t)throw Error(wt);if(Array.isArray(o)&&typeof o[0]==`string`&&(t==null||t[o[0]]===void 0))for(var c=0;c<o.length;c++)xt(o[c])&&(r+=St(a)+`:`+Ct(a,o[c])+`;`);else{var l=Tt(e,t,o);switch(a){case`animation`:case`animationName`:r+=St(a)+`:`+l+`;`;break;default:r+=a+`{`+l+`}`}}}}return r}var Dt=/label:\s*([^\s;{]+)\s*(;|$)/g,Ot;function kt(e,t,n){if(e.length===1&&typeof e[0]==`object`&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i=``;Ot=void 0;var a=e[0];a==null||a.raw===void 0?(r=!1,i+=Tt(n,t,a)):i+=a[0];for(var o=1;o<e.length;o++)i+=Tt(n,t,e[o]),r&&(i+=a[o]);Dt.lastIndex=0;for(var s=``,c;(c=Dt.exec(i))!==null;)s+=`-`+c[1];return{name:ht(i)+s,styles:i,next:Ot}}var L=l(d()),At=function(e){return e()},jt=L.useInsertionEffect?L.useInsertionEffect:!1,Mt=jt||At,Nt=jt||L.useLayoutEffect,Pt=L.createContext(typeof HTMLElement<`u`?st({key:`css`}):null);Pt.Provider;var Ft=function(e){return(0,L.forwardRef)(function(t,n){return e(t,(0,L.useContext)(Pt),n)})},It=L.createContext({}),Lt={}.hasOwnProperty,Rt=`__EMOTION_TYPE_PLEASE_DO_NOT_USE__`,zt=function(e,t){var n={};for(var r in t)Lt.call(t,r)&&(n[r]=t[r]);return n[Rt]=e,n},Bt=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return pt(t,n,r),Mt(function(){return mt(t,n,r)}),null},Vt=Ft(function(e,t,n){var r=e.css;typeof r==`string`&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[Rt],a=[r],o=``;typeof e.className==`string`?o=ft(t.registered,a,e.className):e.className!=null&&(o=e.className+` `);var s=kt(a,void 0,L.useContext(It));o+=t.key+`-`+s.name;var c={};for(var l in e)Lt.call(e,l)&&l!==`css`&&l!==Rt&&(c[l]=e[l]);return c.className=o,n&&(c.ref=n),L.createElement(L.Fragment,null,L.createElement(Bt,{cache:t,serialized:s,isStringTag:typeof i==`string`}),L.createElement(i,c))});ut();var Ht=function(e,t){var n=arguments;if(t==null||!Lt.call(t,`css`))return L.createElement.apply(void 0,n);var r=n.length,i=Array(r);i[0]=Vt,i[1]=zt(e,t);for(var a=2;a<r;a++)i[a]=n[a];return L.createElement.apply(null,i)};(function(e){var t;(function(e){})(t||=e.JSX||={})})(Ht||={});var Ut=Ft(function(e,t){var n=e.styles,r=kt([n],void 0,L.useContext(It)),i=L.useRef();return Nt(function(){var e=t.key+`-global`,n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),a=!1,o=document.querySelector(`style[data-emotion="`+e+` `+r.name+`"]`);return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),o!==null&&(a=!0,o.setAttribute(`data-emotion`,e),n.hydrate([o])),i.current=[n,a],function(){n.flush()}},[t]),Nt(function(){var e=i.current,n=e[0];if(e[1]){e[1]=!1;return}r.next!==void 0&&mt(t,r.next,!0),n.tags.length&&(n.before=n.tags[n.tags.length-1].nextElementSibling,n.flush()),t.insert(``,r,n,!1)},[t,r.name]),null});function Wt(){return kt([...arguments])}function Gt(){var e=Wt.apply(void 0,arguments),t=`animation-`+e.name;return{name:t,styles:`@keyframes `+t+`{`+e.styles+`}`,anim:1,toString:function(){return`_EMO_`+this.name+`_`+this.styles+`_EMO_`}}}var Kt=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,qt=Qe(function(e){return Kt.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Jt=!1,Yt=qt,Xt=function(e){return e!==`theme`},Zt=function(e){return typeof e==`string`&&e.charCodeAt(0)>96?Yt:Xt},Qt=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return typeof r!=`function`&&n&&(r=e.__emotion_forwardProp),r},$t=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return pt(t,n,r),Mt(function(){return mt(t,n,r)}),null},en=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,a,o;n!==void 0&&(a=n.label,o=n.target);var s=Qt(t,n,r),c=s||Zt(i),l=!c(`as`);return function(){var u=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(a!==void 0&&d.push(`label:`+a+`;`),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{var f=u[0];d.push(f[0]);for(var p=u.length,m=1;m<p;m++)d.push(u[m],f[m])}var h=Ft(function(e,t,n){var r=l&&e.as||i,a=``,u=[],f=e;if(e.theme==null){for(var p in f={},e)f[p]=e[p];f.theme=L.useContext(It)}typeof e.className==`string`?a=ft(t.registered,u,e.className):e.className!=null&&(a=e.className+` `);var m=kt(d.concat(u),t.registered,f);a+=t.key+`-`+m.name,o!==void 0&&(a+=` `+o);var h=l&&s===void 0?Zt(r):c,g={};for(var _ in e)l&&_===`as`||h(_)&&(g[_]=e[_]);return g.className=a,n&&(g.ref=n),L.createElement(L.Fragment,null,L.createElement($t,{cache:t,serialized:m,isStringTag:typeof r==`string`}),L.createElement(r,g))});return h.displayName=a===void 0?`Styled(`+(typeof i==`string`?i:i.displayName||i.name||`Component`)+`)`:a,h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=i,h.__emotion_styles=d,h.__emotion_forwardProp=s,Object.defineProperty(h,`toString`,{value:function(){return o===void 0&&Jt?`NO_COMPONENT_SELECTOR`:`.`+o}}),h.withComponent=function(t,r){return e(t,k({},n,r,{shouldForwardProp:Qt(h,r,!0)})).apply(void 0,d)},h}},tn=`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.big.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.keygen.label.legend.li.link.main.map.mark.marquee.menu.menuitem.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.param.picture.pre.progress.q.rp.rt.ruby.s.samp.script.section.select.small.source.span.strong.style.sub.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr.circle.clipPath.defs.ellipse.foreignObject.g.image.line.linearGradient.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.svg.text.tspan`.split(`.`),nn=en.bind(null);tn.forEach(function(e){nn[e]=nn(e)});var rn=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),R=o(((e,t)=>{t.exports=rn()}))();function an(e){return e==null||Object.keys(e).length===0}function on(e){let{styles:t,defaultTheme:n={}}=e;return(0,R.jsx)(Ut,{styles:typeof t==`function`?e=>t(an(e)?n:e):t})}function sn(e,t){return nn(e,t)}function cn(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}var ln=[];function un(e){return ln[0]=e,kt(ln)}var dn=o((e=>{var t=Symbol.for(`react.fragment`),n=Symbol.for(`react.strict_mode`),r=Symbol.for(`react.profiler`),i=Symbol.for(`react.consumer`),a=Symbol.for(`react.context`),o=Symbol.for(`react.forward_ref`),s=Symbol.for(`react.suspense`),c=Symbol.for(`react.suspense_list`),l=Symbol.for(`react.memo`),u=Symbol.for(`react.lazy`),d=Symbol.for(`react.client.reference`);e.isValidElementType=function(e){return!!(typeof e==`string`||typeof e==`function`||e===t||e===r||e===n||e===s||e===c||typeof e==`object`&&e&&(e.$$typeof===u||e.$$typeof===l||e.$$typeof===a||e.$$typeof===i||e.$$typeof===o||e.$$typeof===d||e.getModuleId!==void 0))}})),fn=o(((e,t)=>{t.exports=dn()}))();function pn(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function mn(e){if(L.isValidElement(e)||(0,fn.isValidElementType)(e)||!pn(e))return e;let t={};return Object.keys(e).forEach(n=>{t[n]=mn(e[n])}),t}function hn(e,t,n={clone:!0}){let r=n.clone?{...e}:e;return pn(e)&&pn(t)&&Object.keys(t).forEach(i=>{L.isValidElement(t[i])||(0,fn.isValidElementType)(t[i])?r[i]=t[i]:pn(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&pn(e[i])?r[i]=hn(e[i],t[i],n):n.clone?r[i]=pn(t[i])?mn(t[i]):t[i]:r[i]=t[i]}),r}var gn=e=>{let t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})};function _n(e){let{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n=`px`,step:r=5,...i}=e,a=gn(t),o=Object.keys(a);function s(e){return`@media (min-width:${typeof t[e]==`number`?t[e]:e}${n})`}function c(e){return`@media (max-width:${(typeof t[e]==`number`?t[e]:e)-r/100}${n})`}function l(e,i){let a=o.indexOf(i);return`@media (min-width:${typeof t[e]==`number`?t[e]:e}${n}) and (max-width:${(a!==-1&&typeof t[o[a]]==`number`?t[o[a]]:i)-r/100}${n})`}function u(e){return o.indexOf(e)+1<o.length?l(e,o[o.indexOf(e)+1]):s(e)}function d(e){let t=o.indexOf(e);return t===0?s(o[1]):t===o.length-1?c(o[t]):l(e,o[o.indexOf(e)+1]).replace(`@media`,`@media not all and`)}return{keys:o,values:a,up:s,down:c,between:l,only:u,not:d,unit:n,...i}}function vn(e,t){if(!e.containerQueries)return t;let n=Object.keys(t).filter(e=>e.startsWith(`@container`)).sort((e,t)=>{let n=/min-width:\s*([0-9.]+)/;return(e.match(n)?.[1]||0)-+(t.match(n)?.[1]||0)});return n.length?n.reduce((e,n)=>{let r=t[n];return delete e[n],e[n]=r,e},{...t}):t}function yn(e,t){return t===`@`||t.startsWith(`@`)&&(e.some(e=>t.startsWith(`@${e}`))||!!t.match(/^@\d/))}function bn(e,t){let n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;let[,r,i]=n,a=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(a)}function xn(e){let t=(e,t)=>e.replace(`@media`,t?`@container ${t}`:`@container`);function n(n,r){n.up=(...n)=>t(e.breakpoints.up(...n),r),n.down=(...n)=>t(e.breakpoints.down(...n),r),n.between=(...n)=>t(e.breakpoints.between(...n),r),n.only=(...n)=>t(e.breakpoints.only(...n),r),n.not=(...n)=>{let i=t(e.breakpoints.not(...n),r);return i.includes(`not all and`)?i.replace(`not all and `,``).replace(`min-width:`,`width<`).replace(`max-width:`,`width>`).replace(`and`,`or`):i}}let r={},i=e=>(n(r,e),r);return n(i),{...e,containerQueries:i}}var Sn={borderRadius:4};function Cn(e,t){return t?hn(e,t,{clone:!1}):e}var wn={xs:0,sm:600,md:900,lg:1200,xl:1536},Tn={keys:[`xs`,`sm`,`md`,`lg`,`xl`],up:e=>`@media (min-width:${wn[e]}px)`},En={containerQueries:e=>({up:t=>{let n=typeof t==`number`?t:wn[t]||t;return typeof n==`number`&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Dn(e,t,n){let r=e.theme||{};if(Array.isArray(t)){let e=r.breakpoints||Tn;return t.reduce((r,i,a)=>(r[e.up(e.keys[a])]=n(t[a]),r),{})}if(typeof t==`object`){let e=r.breakpoints||Tn;return Object.keys(t).reduce((i,a)=>{if(yn(e.keys,a)){let e=bn(r.containerQueries?r:En,a);e&&(i[e]=n(t[a],a))}else if(Object.keys(e.values||wn).includes(a)){let r=e.up(a);i[r]=n(t[a],a)}else{let e=a;i[e]=t[e]}return i},{})}return n(t)}function On(e={}){return e.keys?.reduce((t,n)=>{let r=e.up(n);return t[r]={},t},{})||{}}function kn(e,t){return e.reduce((e,t)=>{let n=e[t];return(!n||Object.keys(n).length===0)&&delete e[t],e},t)}function An(e,...t){let n=On(e),r=[n,...t].reduce((e,t)=>hn(e,t),{});return kn(Object.keys(n),r)}function jn(e,t){if(typeof e!=`object`)return{};let n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((t,r)=>{r<e.length&&(n[t]=!0)}):r.forEach(t=>{e[t]!=null&&(n[t]=!0)}),n}function Mn({values:e,breakpoints:t,base:n}){let r=n||jn(e,t),i=Object.keys(r);if(i.length===0)return e;let a;return i.reduce((t,n,r)=>(Array.isArray(e)?(t[n]=e[r]==null?e[a]:e[r],a=r):typeof e==`object`?(t[n]=e[n]==null?e[a]:e[n],a=n):t[n]=e,t),{})}function Nn(e){if(typeof e!=`string`)throw Error(D(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Pn(e,t,n=!0){if(!t||typeof t!=`string`)return null;if(e&&e.vars&&n){let n=`vars.${t}`.split(`.`).reduce((e,t)=>e&&e[t]?e[t]:null,e);if(n!=null)return n}return t.split(`.`).reduce((e,t)=>e&&e[t]!=null?e[t]:null,e)}function Fn(e,t,n,r=n){let i;return i=typeof e==`function`?e(n):Array.isArray(e)?e[n]||r:Pn(e,n)||r,t&&(i=t(i,r,e)),i}function In(e){let{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,a=e=>{if(e[t]==null)return null;let a=e[t],o=e.theme,s=Pn(o,r)||{};return Dn(e,a,e=>{let r=Fn(s,i,e);return e===r&&typeof e==`string`&&(r=Fn(s,i,`${t}${e===`default`?``:Nn(e)}`,e)),n===!1?r:{[n]:r}})};return a.propTypes={},a.filterProps=[t],a}function Ln(e){let t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}var Rn={m:`margin`,p:`padding`},zn={t:`Top`,r:`Right`,b:`Bottom`,l:`Left`,x:[`Left`,`Right`],y:[`Top`,`Bottom`]},Bn={marginX:`mx`,marginY:`my`,paddingX:`px`,paddingY:`py`},Vn=Ln(e=>{if(e.length>2)if(Bn[e])e=Bn[e];else return[e];let[t,n]=e.split(``),r=Rn[t],i=zn[n]||``;return Array.isArray(i)?i.map(e=>r+e):[r+i]}),Hn=[`m`,`mt`,`mr`,`mb`,`ml`,`mx`,`my`,`margin`,`marginTop`,`marginRight`,`marginBottom`,`marginLeft`,`marginX`,`marginY`,`marginInline`,`marginInlineStart`,`marginInlineEnd`,`marginBlock`,`marginBlockStart`,`marginBlockEnd`],Un=[`p`,`pt`,`pr`,`pb`,`pl`,`px`,`py`,`padding`,`paddingTop`,`paddingRight`,`paddingBottom`,`paddingLeft`,`paddingX`,`paddingY`,`paddingInline`,`paddingInlineStart`,`paddingInlineEnd`,`paddingBlock`,`paddingBlockStart`,`paddingBlockEnd`],Wn=[...Hn,...Un];function Gn(e,t,n,r){let i=Pn(e,t,!0)??n;return typeof i==`number`||typeof i==`string`?e=>typeof e==`string`?e:typeof i==`string`?i.startsWith(`var(`)&&e===0?0:i.startsWith(`var(`)&&e===1?i:`calc(${e} * ${i})`:i*e:Array.isArray(i)?e=>{if(typeof e==`string`)return e;let t=i[Math.abs(e)];return e>=0?t:typeof t==`number`?-t:typeof t==`string`&&t.startsWith(`var(`)?`calc(-1 * ${t})`:`-${t}`}:typeof i==`function`?i:()=>void 0}function Kn(e){return Gn(e,`spacing`,8,`spacing`)}function qn(e,t){return typeof t==`string`||t==null?t:e(t)}function Jn(e,t){return n=>e.reduce((e,r)=>(e[r]=qn(t,n),e),{})}function Yn(e,t,n,r){if(!t.includes(n))return null;let i=Jn(Vn(n),r),a=e[n];return Dn(e,a,i)}function Xn(e,t){let n=Kn(e.theme);return Object.keys(e).map(r=>Yn(e,t,r,n)).reduce(Cn,{})}function Zn(e){return Xn(e,Hn)}Zn.propTypes={},Zn.filterProps=Hn;function Qn(e){return Xn(e,Un)}Qn.propTypes={},Qn.filterProps=Un;function $n(e){return Xn(e,Wn)}$n.propTypes={},$n.filterProps=Wn;function er(e=8,t=Kn({spacing:e})){if(e.mui)return e;let n=(...e)=>(e.length===0?[1]:e).map(e=>{let n=t(e);return typeof n==`number`?`${n}px`:n}).join(` `);return n.mui=!0,n}function tr(...e){let t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>Object.keys(e).reduce((n,r)=>t[r]?Cn(n,t[r](e)):n,{});return n.propTypes={},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n}function nr(e){return typeof e==`number`?`${e}px solid`:e}function rr(e,t){return In({prop:e,themeKey:`borders`,transform:t})}var ir=rr(`border`,nr),ar=rr(`borderTop`,nr),or=rr(`borderRight`,nr),sr=rr(`borderBottom`,nr),cr=rr(`borderLeft`,nr),lr=rr(`borderColor`),ur=rr(`borderTopColor`),dr=rr(`borderRightColor`),fr=rr(`borderBottomColor`),pr=rr(`borderLeftColor`),mr=rr(`outline`,nr),hr=rr(`outlineColor`),gr=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){let t=Gn(e.theme,`shape.borderRadius`,4,`borderRadius`);return Dn(e,e.borderRadius,e=>({borderRadius:qn(t,e)}))}return null};gr.propTypes={},gr.filterProps=[`borderRadius`],tr(ir,ar,or,sr,cr,lr,ur,dr,fr,pr,gr,mr,hr);var _r=e=>{if(e.gap!==void 0&&e.gap!==null){let t=Gn(e.theme,`spacing`,8,`gap`);return Dn(e,e.gap,e=>({gap:qn(t,e)}))}return null};_r.propTypes={},_r.filterProps=[`gap`];var vr=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){let t=Gn(e.theme,`spacing`,8,`columnGap`);return Dn(e,e.columnGap,e=>({columnGap:qn(t,e)}))}return null};vr.propTypes={},vr.filterProps=[`columnGap`];var yr=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){let t=Gn(e.theme,`spacing`,8,`rowGap`);return Dn(e,e.rowGap,e=>({rowGap:qn(t,e)}))}return null};yr.propTypes={},yr.filterProps=[`rowGap`],tr(_r,vr,yr,In({prop:`gridColumn`}),In({prop:`gridRow`}),In({prop:`gridAutoFlow`}),In({prop:`gridAutoColumns`}),In({prop:`gridAutoRows`}),In({prop:`gridTemplateColumns`}),In({prop:`gridTemplateRows`}),In({prop:`gridTemplateAreas`}),In({prop:`gridArea`}));function br(e,t){return t===`grey`?t:e}tr(In({prop:`color`,themeKey:`palette`,transform:br}),In({prop:`bgcolor`,cssProperty:`backgroundColor`,themeKey:`palette`,transform:br}),In({prop:`backgroundColor`,themeKey:`palette`,transform:br}));function xr(e){return e<=1&&e!==0?`${e*100}%`:e}var Sr=In({prop:`width`,transform:xr}),Cr=e=>e.maxWidth!==void 0&&e.maxWidth!==null?Dn(e,e.maxWidth,t=>{let n=e.theme?.breakpoints?.values?.[t]||wn[t];return n?e.theme?.breakpoints?.unit===`px`?{maxWidth:n}:{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:xr(t)}}):null;Cr.filterProps=[`maxWidth`];var wr=In({prop:`minWidth`,transform:xr}),Tr=In({prop:`height`,transform:xr}),Er=In({prop:`maxHeight`,transform:xr}),Dr=In({prop:`minHeight`,transform:xr});In({prop:`size`,cssProperty:`width`,transform:xr}),In({prop:`size`,cssProperty:`height`,transform:xr}),tr(Sr,Cr,wr,Tr,Er,Dr,In({prop:`boxSizing`}));var Or={border:{themeKey:`borders`,transform:nr},borderTop:{themeKey:`borders`,transform:nr},borderRight:{themeKey:`borders`,transform:nr},borderBottom:{themeKey:`borders`,transform:nr},borderLeft:{themeKey:`borders`,transform:nr},borderColor:{themeKey:`palette`},borderTopColor:{themeKey:`palette`},borderRightColor:{themeKey:`palette`},borderBottomColor:{themeKey:`palette`},borderLeftColor:{themeKey:`palette`},outline:{themeKey:`borders`,transform:nr},outlineColor:{themeKey:`palette`},borderRadius:{themeKey:`shape.borderRadius`,style:gr},color:{themeKey:`palette`,transform:br},bgcolor:{themeKey:`palette`,cssProperty:`backgroundColor`,transform:br},backgroundColor:{themeKey:`palette`,transform:br},p:{style:Qn},pt:{style:Qn},pr:{style:Qn},pb:{style:Qn},pl:{style:Qn},px:{style:Qn},py:{style:Qn},padding:{style:Qn},paddingTop:{style:Qn},paddingRight:{style:Qn},paddingBottom:{style:Qn},paddingLeft:{style:Qn},paddingX:{style:Qn},paddingY:{style:Qn},paddingInline:{style:Qn},paddingInlineStart:{style:Qn},paddingInlineEnd:{style:Qn},paddingBlock:{style:Qn},paddingBlockStart:{style:Qn},paddingBlockEnd:{style:Qn},m:{style:Zn},mt:{style:Zn},mr:{style:Zn},mb:{style:Zn},ml:{style:Zn},mx:{style:Zn},my:{style:Zn},margin:{style:Zn},marginTop:{style:Zn},marginRight:{style:Zn},marginBottom:{style:Zn},marginLeft:{style:Zn},marginX:{style:Zn},marginY:{style:Zn},marginInline:{style:Zn},marginInlineStart:{style:Zn},marginInlineEnd:{style:Zn},marginBlock:{style:Zn},marginBlockStart:{style:Zn},marginBlockEnd:{style:Zn},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:_r},rowGap:{style:yr},columnGap:{style:vr},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:`zIndex`},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:`shadows`},width:{transform:xr},maxWidth:{style:Cr},minWidth:{transform:xr},height:{transform:xr},maxHeight:{transform:xr},minHeight:{transform:xr},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 kr(...e){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),n=new Set(t);return e.every(e=>n.size===Object.keys(e).length)}function Ar(e,t){return typeof e==`function`?e(t):e}function jr(){function e(e,t,n,r){let i={[e]:t,theme:n},a=r[e];if(!a)return{[e]:t};let{cssProperty:o=e,themeKey:s,transform:c,style:l}=a;if(t==null)return null;if(s===`typography`&&t===`inherit`)return{[e]:t};let u=Pn(n,s)||{};return l?l(i):Dn(i,t,t=>{let n=Fn(u,c,t);return t===n&&typeof t==`string`&&(n=Fn(u,c,`${e}${t===`default`?``:Nn(t)}`,t)),o===!1?n:{[o]:n}})}function t(n){let{sx:r,theme:i={},nested:a}=n||{};if(!r)return null;let o=i.unstable_sxConfig??Or;function s(n){let r=n;if(typeof n==`function`)r=n(i);else if(typeof n!=`object`)return n;if(!r)return null;let s=On(i.breakpoints),c=Object.keys(s),l=s;return Object.keys(r).forEach(n=>{let a=Ar(r[n],i);if(a!=null)if(typeof a==`object`)if(o[n])l=Cn(l,e(n,a,i,o));else{let e=Dn({theme:i},a,e=>({[n]:e}));kr(e,a)?l[n]=t({sx:a,theme:i,nested:!0}):l=Cn(l,e)}else l=Cn(l,e(n,a,i,o))}),!a&&i.modularCssLayers?{"@layer sx":vn(i,kn(c,l))}:vn(i,kn(c,l))}return Array.isArray(r)?r.map(s):s(r)}return t}var Mr=jr();Mr.filterProps=[`sx`];function Nr(e,t){let n=this;if(n.vars){if(!n.colorSchemes?.[e]||typeof n.getColorSchemeSelector!=`function`)return{};let r=n.getColorSchemeSelector(e);return r===`&`?t:((r.includes(`data-`)||r.includes(`.`))&&(r=`*:where(${r.replace(/\s*&$/,``)}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function Pr(e={},...t){let{breakpoints:n={},palette:r={},spacing:i,shape:a={},...o}=e,s=_n(n),c=er(i),l=hn({breakpoints:s,direction:`ltr`,components:{},palette:{mode:`light`,...r},spacing:c,shape:{...Sn,...a}},o);return l=xn(l),l.applyStyles=Nr,l=t.reduce((e,t)=>hn(e,t),l),l.unstable_sxConfig={...Or,...o?.unstable_sxConfig},l.unstable_sx=function(e){return Mr({sx:e,theme:this})},l}function Fr(e){return Object.keys(e).length===0}function Ir(e=null){let t=L.useContext(It);return!t||Fr(t)?e:t}var Lr=Pr();function Rr(e=Lr){return Ir(e)}function zr(e){let t=un(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function Br({styles:e,themeId:t,defaultTheme:n={}}){let r=Rr(n),i=t&&r[t]||r,a=typeof e==`function`?e(i):e;return i.modularCssLayers&&(a=Array.isArray(a)?a.map(e=>zr(typeof e==`function`?e(i):e)):zr(a)),(0,R.jsx)(on,{styles:a})}var Vr=e=>{let t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??Or;return Object.keys(e).forEach(r=>{n[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]}),t};function Hr(e){let{sx:t,...n}=e,{systemProps:r,otherProps:i}=Vr(n),a;return a=Array.isArray(t)?[r,...t]:typeof t==`function`?(...e)=>{let n=t(...e);return pn(n)?{...r,...n}:r}:{...r,...t},{...i,sx:a}}var Ur=e=>e,Wr=(()=>{let e=Ur;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Ur}}})();function Gr(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Gr(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function z(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Gr(e))&&(r&&(r+=` `),r+=t);return r}function Kr(e={}){let{themeId:t,defaultTheme:n,defaultClassName:r=`MuiBox-root`,generateClassName:i}=e,a=sn(`div`,{shouldForwardProp:e=>e!==`theme`&&e!==`sx`&&e!==`as`})(Mr);return L.forwardRef(function(e,o){let s=Rr(n),{className:c,component:l=`div`,...u}=Hr(e);return(0,R.jsx)(a,{as:l,ref:o,className:z(c,i?i(r):r),theme:t&&s[t]||s,...u})})}var qr={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 B(e,t,n=`Mui`){let r=qr[t];return r?`${n}-${r}`:`${Wr.generate(e)}-${t}`}function Jr(e,t,n=`Mui`){let r={};return t.forEach(t=>{r[t]=B(e,t,n)}),r}function Yr(e){let{variants:t,...n}=e,r={variants:t,style:un(n),isProcessed:!0};return r.style===n||t&&t.forEach(e=>{typeof e.style!=`function`&&(e.style=un(e.style))}),r}var Xr=Pr();function Zr(e){return e!==`ownerState`&&e!==`theme`&&e!==`sx`&&e!==`as`}function Qr(e,t){return t&&e&&typeof e==`object`&&e.styles&&!e.styles.startsWith(`@layer`)&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function $r(e){return e?(t,n)=>n[e]:null}function ei(e,t,n){e.theme=ii(e.theme)?n:e.theme[t]||e.theme}function ti(e,t,n){let r=typeof t==`function`?t(e):t;if(Array.isArray(r))return r.flatMap(t=>ti(e,t,n));if(Array.isArray(r?.variants)){let t;if(r.isProcessed)t=n?Qr(r.style,n):r.style;else{let{variants:e,...i}=r;t=n?Qr(un(i),n):i}return ni(e,r.variants,[t],n)}return r?.isProcessed?n?Qr(un(r.style),n):r.style:n?Qr(un(r),n):r}function ni(e,t,n=[],r=void 0){let i;variantLoop:for(let a=0;a<t.length;a+=1){let o=t[a];if(typeof o.props==`function`){if(i??={...e,...e.ownerState,ownerState:e.ownerState},!o.props(i))continue}else for(let t in o.props)if(e[t]!==o.props[t]&&e.ownerState?.[t]!==o.props[t])continue variantLoop;typeof o.style==`function`?(i??={...e,...e.ownerState,ownerState:e.ownerState},n.push(r?Qr(un(o.style(i)),r):o.style(i))):n.push(r?Qr(un(o.style),r):o.style)}return n}function ri(e={}){let{themeId:t,defaultTheme:n=Xr,rootShouldForwardProp:r=Zr,slotShouldForwardProp:i=Zr}=e;function a(e){ei(e,t,n)}return(e,t={})=>{cn(e,e=>e.filter(e=>e!==Mr));let{name:n,slot:o,skipVariantsResolver:s,skipSx:c,overridesResolver:l=$r(oi(o)),...u}=t,d=n&&n.startsWith(`Mui`)||o?`components`:`custom`,f=s===void 0?o&&o!==`Root`&&o!==`root`||!1:s,p=c||!1,m=Zr;o===`Root`||o===`root`?m=r:o?m=i:ai(e)&&(m=void 0);let h=sn(e,{shouldForwardProp:m,label:void 0,...u}),g=e=>{if(e.__emotion_real===e)return e;if(typeof e==`function`)return function(t){return ti(t,e,t.theme.modularCssLayers?d:void 0)};if(pn(e)){let t=Yr(e);return function(e){return t.variants?ti(e,t,e.theme.modularCssLayers?d:void 0):e.theme.modularCssLayers?Qr(t.style,d):t.style}}return e},_=(...t)=>{let r=[],i=t.map(g),o=[];if(r.push(a),n&&l&&o.push(function(e){let t=e.theme.components?.[n]?.styleOverrides;if(!t)return null;let r={};for(let n in t)r[n]=ti(e,t[n],e.theme.modularCssLayers?`theme`:void 0);return l(e,r)}),n&&!f&&o.push(function(e){let t=e.theme?.components?.[n]?.variants;return t?ni(e,t,[],e.theme.modularCssLayers?`theme`:void 0):null}),p||o.push(Mr),Array.isArray(i[0])){let e=i.shift(),t=Array(r.length).fill(``),n=Array(o.length).fill(``),a;a=[...t,...e,...n],a.raw=[...t,...e.raw,...n],r.unshift(a)}let s=h(...r,...i,...o);return e.muiName&&(s.muiName=e.muiName),s};return h.withConfig&&(_.withConfig=h.withConfig),_}}function ii(e){for(let t in e)return!1;return!0}function ai(e){return typeof e==`string`&&e.charCodeAt(0)>96}function oi(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}var si=ri();function ci(e,t,n=!1){let r={...t};for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)){let a=i;if(a===`components`||a===`slots`)r[a]={...e[a],...r[a]};else if(a===`componentsProps`||a===`slotProps`){let i=e[a],o=t[a];if(!o)r[a]=i||{};else if(!i)r[a]=o;else{r[a]={...o};for(let e in i)if(Object.prototype.hasOwnProperty.call(i,e)){let t=e;r[a][t]=ci(i[t],o[t],n)}}}else a===`className`&&n&&t.className?r.className=z(e?.className,t?.className):a===`style`&&n&&t.style?r.style={...e?.style,...t?.style}:r[a]===void 0&&(r[a]=e[a])}return r}function li(e){let{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:ci(t.components[n].defaultProps,r)}function ui({props:e,name:t,defaultTheme:n,themeId:r}){let i=Rr(n);return r&&(i=i[r]||i),li({theme:i,name:t,props:e})}var di=typeof window<`u`?L.useLayoutEffect:L.useEffect;function fi(e,t,n,r,i){let[a,o]=L.useState(()=>i&&n?n(e).matches:r?r(e).matches:t);return di(()=>{if(!n)return;let t=n(e),r=()=>{o(t.matches)};return r(),t.addEventListener(`change`,r),()=>{t.removeEventListener(`change`,r)}},[e,n]),a}var pi={...L}.useSyncExternalStore;function mi(e,t,n,r,i){let a=L.useCallback(()=>t,[t]),o=L.useMemo(()=>{if(i&&n)return()=>n(e).matches;if(r!==null){let{matches:t}=r(e);return()=>t}return a},[a,e,r,i,n]),[s,c]=L.useMemo(()=>{if(n===null)return[a,()=>()=>{}];let t=n(e);return[()=>t.matches,e=>(t.addEventListener(`change`,e),()=>{t.removeEventListener(`change`,e)})]},[a,n,e]);return pi(c,s,o)}function hi(e={}){let{themeId:t}=e;return function(e,n={}){let r=Ir();r&&t&&(r=r[t]||r);let i=typeof window<`u`&&window.matchMedia!==void 0,{defaultMatches:a=!1,matchMedia:o=i?window.matchMedia:null,ssrMatchMedia:s=null,noSsr:c=!1}=li({name:`MuiUseMediaQuery`,props:n,theme:r}),l=typeof e==`function`?e(r):e;return l=l.replace(/^@media( ?)/m,``),l.includes(`print`)&&console.warn(["MUI: You have provided a `print` query to the `useMediaQuery` hook.",`Using the print media query to modify print styles can lead to unexpected results.`,"Consider using the `displayPrint` field in the `sx` prop instead.","More information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."].join(`
|
|
10
|
+
`)),(pi===void 0?fi:mi)(l,a,o,s,c)}}hi();function gi(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}function _i(e,t=0,n=1){return gi(e,t,n)}function vi(e){e=e.slice(1);let t=RegExp(`.{1,${e.length>=6?2:1}}`,`g`),n=e.match(t);return n&&n[0].length===1&&(n=n.map(e=>e+e)),n?`rgb${n.length===4?`a`:``}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(`, `)})`:``}function yi(e){if(e.type)return e;if(e.charAt(0)===`#`)return yi(vi(e));let t=e.indexOf(`(`),n=e.substring(0,t);if(![`rgb`,`rgba`,`hsl`,`hsla`,`color`].includes(n))throw Error(D(9,e));let r=e.substring(t+1,e.length-1),i;if(n===`color`){if(r=r.split(` `),i=r.shift(),r.length===4&&r[3].charAt(0)===`/`&&(r[3]=r[3].slice(1)),![`srgb`,`display-p3`,`a98-rgb`,`prophoto-rgb`,`rec-2020`].includes(i))throw Error(D(10,i))}else r=r.split(`,`);return r=r.map(e=>parseFloat(e)),{type:n,values:r,colorSpace:i}}var bi=e=>{let t=yi(e);return t.values.slice(0,3).map((e,n)=>t.type.includes(`hsl`)&&n!==0?`${e}%`:e).join(` `)},xi=(e,t)=>{try{return bi(e)}catch{return e}};function Si(e){let{type:t,colorSpace:n}=e,{values:r}=e;return t.includes(`rgb`)?r=r.map((e,t)=>t<3?parseInt(e,10):e):t.includes(`hsl`)&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=t.includes(`color`)?`${n} ${r.join(` `)}`:`${r.join(`, `)}`,`${t}(${r})`}function Ci(e){e=yi(e);let{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,a=r*Math.min(i,1-i),o=(e,t=(e+n/30)%12)=>i-a*Math.max(Math.min(t-3,9-t,1),-1),s=`rgb`,c=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return e.type===`hsla`&&(s+=`a`,c.push(t[3])),Si({type:s,values:c})}function wi(e){e=yi(e);let t=e.type===`hsl`||e.type===`hsla`?yi(Ci(e)).values:e.values;return t=t.map(t=>(e.type!==`color`&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Ti(e,t){let n=wi(e),r=wi(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Ei(e,t){return e=yi(e),t=_i(t),(e.type===`rgb`||e.type===`hsl`)&&(e.type+=`a`),e.type===`color`?e.values[3]=`/${t}`:e.values[3]=t,Si(e)}function Di(e,t,n){try{return Ei(e,t)}catch{return e}}function Oi(e,t){if(e=yi(e),t=_i(t),e.type.includes(`hsl`))e.values[2]*=1-t;else if(e.type.includes(`rgb`)||e.type.includes(`color`))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Si(e)}function ki(e,t,n){try{return Oi(e,t)}catch{return e}}function Ai(e,t){if(e=yi(e),t=_i(t),e.type.includes(`hsl`))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes(`rgb`))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes(`color`))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Si(e)}function ji(e,t,n){try{return Ai(e,t)}catch{return e}}function Mi(e,t=.15){return wi(e)>.5?Oi(e,t):Ai(e,t)}function Ni(e,t,n){try{return Mi(e,t)}catch{return e}}var Pi=L.createContext(null);function Fi(){return L.useContext(Pi)}var Ii=typeof Symbol==`function`&&Symbol.for?Symbol.for(`mui.nested`):`__THEME_NESTED__`;function Li(e,t){return typeof t==`function`?t(e):{...e,...t}}function Ri(e){let{children:t,theme:n}=e,r=Fi(),i=L.useMemo(()=>{let e=r===null?{...n}:Li(r,n);return e!=null&&(e[Ii]=r!==null),e},[n,r]);return(0,R.jsx)(Pi.Provider,{value:i,children:t})}var zi=L.createContext();function Bi({value:e,...t}){return(0,R.jsx)(zi.Provider,{value:e??!0,...t})}var Vi=()=>L.useContext(zi)??!1,Hi=L.createContext(void 0);function Ui({value:e,children:t}){return(0,R.jsx)(Hi.Provider,{value:e,children:t})}function Wi(e){let{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;let i=t.components[n];return i.defaultProps?ci(i.defaultProps,r,t.components.mergeClassNameAndStyle):!i.styleOverrides&&!i.variants?ci(i,r,t.components.mergeClassNameAndStyle):r}function Gi({props:e,name:t}){return Wi({props:e,name:t,theme:{components:L.useContext(Hi)}})}var Ki=0;function qi(e){let[t,n]=L.useState(e),r=e||t;return L.useEffect(()=>{t??(Ki+=1,n(`mui-${Ki}`))},[t]),r}var Ji={...L}.useId;function Yi(e){if(Ji!==void 0){let t=Ji();return e??t}return qi(e)}function Xi(e){let t=Ir(),n=Yi()||``,{modularCssLayers:r}=e,i=`mui.global, mui.components, mui.theme, mui.custom, mui.sx`;return i=!r||t!==null?``:typeof r==`string`?r.replace(/mui(?!\.)/g,i):`@layer ${i};`,di(()=>{let e=document.querySelector(`head`);if(!e)return;let t=e.firstChild;if(i){if(t&&t.hasAttribute?.(`data-mui-layer-order`)&&t.getAttribute(`data-mui-layer-order`)===n)return;let r=document.createElement(`style`);r.setAttribute(`data-mui-layer-order`,n),r.textContent=i,e.prepend(r)}else e.querySelector(`style[data-mui-layer-order="${n}"]`)?.remove()},[i,n]),i?(0,R.jsx)(Br,{styles:i}):null}var Zi={};function Qi(e,t,n,r=!1){return L.useMemo(()=>{let i=e&&t[e]||t;if(typeof n==`function`){let a=n(i),o=e?{...t,[e]:a}:a;return r?()=>o:o}return e?{...t,[e]:n}:{...t,...n}},[e,t,n,r])}function $i(e){let{children:t,theme:n,themeId:r}=e,i=Ir(Zi),a=Fi()||Zi,o=Qi(r,i,n),s=Qi(r,a,n,!0),c=(r?o[r]:o).direction===`rtl`,l=Xi(o);return(0,R.jsx)(Ri,{theme:s,children:(0,R.jsx)(It.Provider,{value:o,children:(0,R.jsx)(Bi,{value:c,children:(0,R.jsxs)(Ui,{value:r?o[r].components:o.components,children:[l,t]})})})})}var ea={theme:void 0};function ta(e){let t,n;return function(r){let i=t;return(i===void 0||r.theme!==n)&&(ea.theme=r.theme,i=Yr(e(ea)),t=i,n=r.theme),i}}var na=`mode`,ra=`color-scheme`,ia=`data-color-scheme`;function aa(e){let{defaultMode:t=`system`,defaultLightColorScheme:n=`light`,defaultDarkColorScheme:r=`dark`,modeStorageKey:i=na,colorSchemeStorageKey:a=ra,attribute:o=ia,colorSchemeNode:s=`document.documentElement`,nonce:c}=e||{},l=``,u=o;if(o===`class`&&(u=`.%s`),o===`data`&&(u=`[data-%s]`),u.startsWith(`.`)){let e=u.substring(1);l+=`${s}.classList.remove('${e}'.replace('%s', light), '${e}'.replace('%s', dark));
|
|
11
|
+
${s}.classList.add('${e}'.replace('%s', colorScheme));`}let d=u.match(/\[([^[\]]+)\]/);if(d){let[e,t]=d[1].split(`=`);t||(l+=`${s}.removeAttribute('${e}'.replace('%s', light));
|
|
12
|
+
${s}.removeAttribute('${e}'.replace('%s', dark));`),l+=`
|
|
13
|
+
${s}.setAttribute('${e}'.replace('%s', colorScheme), ${t?`${t}.replace('%s', colorScheme)`:`""`});`}else u!==`.%s`&&(l+=`${s}.setAttribute('${u}', colorScheme);`);return(0,R.jsx)(`script`,{suppressHydrationWarning:!0,nonce:typeof window>`u`?c:``,dangerouslySetInnerHTML:{__html:`(function() {
|
|
14
|
+
try {
|
|
15
|
+
let colorScheme = '';
|
|
16
|
+
const mode = localStorage.getItem('${i}') || '${t}';
|
|
17
|
+
const dark = localStorage.getItem('${a}-dark') || '${r}';
|
|
18
|
+
const light = localStorage.getItem('${a}-light') || '${n}';
|
|
19
|
+
if (mode === 'system') {
|
|
20
|
+
// handle system mode
|
|
21
|
+
const mql = window.matchMedia('(prefers-color-scheme: dark)');
|
|
22
|
+
if (mql.matches) {
|
|
23
|
+
colorScheme = dark
|
|
24
|
+
} else {
|
|
25
|
+
colorScheme = light
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
if (mode === 'light') {
|
|
29
|
+
colorScheme = light;
|
|
30
|
+
}
|
|
31
|
+
if (mode === 'dark') {
|
|
32
|
+
colorScheme = dark;
|
|
33
|
+
}
|
|
34
|
+
if (colorScheme) {
|
|
35
|
+
${l}
|
|
36
|
+
}
|
|
37
|
+
} catch(e){}})();`}},`mui-color-scheme-init`)}function oa(){}var sa=({key:e,storageWindow:t})=>(!t&&typeof window<`u`&&(t=window),{get(n){if(typeof window>`u`)return;if(!t)return n;let r;try{r=t.localStorage.getItem(e)}catch{}return r||n},set:n=>{if(t)try{t.localStorage.setItem(e,n)}catch{}},subscribe:n=>{if(!t)return oa;let r=t=>{let r=t.newValue;t.key===e&&n(r)};return t.addEventListener(`storage`,r),()=>{t.removeEventListener(`storage`,r)}}});function ca(){}function la(e){if(typeof window<`u`&&typeof window.matchMedia==`function`&&e===`system`)return window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}function ua(e,t){if(e.mode===`light`||e.mode===`system`&&e.systemMode===`light`)return t(`light`);if(e.mode===`dark`||e.mode===`system`&&e.systemMode===`dark`)return t(`dark`)}function da(e){return ua(e,t=>{if(t===`light`)return e.lightColorScheme;if(t===`dark`)return e.darkColorScheme})}function fa(e){let{defaultMode:t=`light`,defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:i=[],modeStorageKey:a=na,colorSchemeStorageKey:o=ra,storageWindow:s=typeof window>`u`?void 0:window,storageManager:c=sa,noSsr:l=!1}=e,u=i.join(`,`),d=i.length>1,f=L.useMemo(()=>c?.({key:a,storageWindow:s}),[c,a,s]),p=L.useMemo(()=>c?.({key:`${o}-light`,storageWindow:s}),[c,o,s]),m=L.useMemo(()=>c?.({key:`${o}-dark`,storageWindow:s}),[c,o,s]),[h,g]=L.useState(()=>{let e=f?.get(t)||t,i=p?.get(n)||n,a=m?.get(r)||r;return{mode:e,systemMode:la(e),lightColorScheme:i,darkColorScheme:a}}),[_,v]=L.useState(l||!d);L.useEffect(()=>{v(!0)},[]);let y=da(h),b=L.useCallback(e=>{g(n=>{if(e===n.mode)return n;let r=e??t;return f?.set(r),{...n,mode:r,systemMode:la(r)}})},[f,t]),x=L.useCallback(e=>{e?typeof e==`string`?e&&!u.includes(e)?console.error(`\`${e}\` does not exist in \`theme.colorSchemes\`.`):g(t=>{let n={...t};return ua(t,t=>{t===`light`&&(p?.set(e),n.lightColorScheme=e),t===`dark`&&(m?.set(e),n.darkColorScheme=e)}),n}):g(t=>{let i={...t},a=e.light===null?n:e.light,o=e.dark===null?r:e.dark;return a&&(u.includes(a)?(i.lightColorScheme=a,p?.set(a)):console.error(`\`${a}\` does not exist in \`theme.colorSchemes\`.`)),o&&(u.includes(o)?(i.darkColorScheme=o,m?.set(o)):console.error(`\`${o}\` does not exist in \`theme.colorSchemes\`.`)),i}):g(e=>(p?.set(n),m?.set(r),{...e,lightColorScheme:n,darkColorScheme:r}))},[u,p,m,n,r]),S=L.useCallback(e=>{h.mode===`system`&&g(t=>{let n=e?.matches?`dark`:`light`;return t.systemMode===n?t:{...t,systemMode:n}})},[h.mode]),C=L.useRef(S);return C.current=S,L.useEffect(()=>{if(typeof window.matchMedia!=`function`||!d)return;let e=(...e)=>C.current(...e),t=window.matchMedia(`(prefers-color-scheme: dark)`);return t.addListener(e),e(t),()=>{t.removeListener(e)}},[d]),L.useEffect(()=>{if(d){let e=f?.subscribe(e=>{(!e||[`light`,`dark`,`system`].includes(e))&&b(e||t)})||ca,n=p?.subscribe(e=>{(!e||u.match(e))&&x({light:e})})||ca,r=m?.subscribe(e=>{(!e||u.match(e))&&x({dark:e})})||ca;return()=>{e(),n(),r()}}},[x,b,u,t,s,d,f,p,m]),{...h,mode:_?h.mode:void 0,systemMode:_?h.systemMode:void 0,colorScheme:_?y:void 0,setMode:b,setColorScheme:x}}var pa=`*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`;function ma(e){let{themeId:t,theme:n={},modeStorageKey:r=na,colorSchemeStorageKey:i=ra,disableTransitionOnChange:a=!1,defaultColorScheme:o,resolveTheme:s}=e,c={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},l=L.createContext(void 0),u=()=>L.useContext(l)||c,d={},f={};function p(e){let{children:c,theme:u,modeStorageKey:p=r,colorSchemeStorageKey:m=i,disableTransitionOnChange:h=a,storageManager:g,storageWindow:_=typeof window>`u`?void 0:window,documentNode:v=typeof document>`u`?void 0:document,colorSchemeNode:y=typeof document>`u`?void 0:document.documentElement,disableNestedContext:b=!1,disableStyleSheetGeneration:x=!1,defaultMode:S=`system`,forceThemeRerender:C=!1,noSsr:w}=e,T=L.useRef(!1),E=Fi(),D=L.useContext(l),O=!!D&&!b,k=L.useMemo(()=>u||(typeof n==`function`?n():n),[u]),ee=k[t],A=ee||k,{colorSchemes:j=d,components:te=f,cssVarPrefix:M}=A,ne=Object.keys(j).filter(e=>!!j[e]).join(`,`),N=L.useMemo(()=>ne.split(`,`),[ne]),P=typeof o==`string`?o:o.light,re=typeof o==`string`?o:o.dark,{mode:ie,setMode:ae,systemMode:oe,lightColorScheme:se,darkColorScheme:ce,colorScheme:le,setColorScheme:ue}=fa({supportedColorSchemes:N,defaultLightColorScheme:P,defaultDarkColorScheme:re,modeStorageKey:p,colorSchemeStorageKey:m,defaultMode:j[P]&&j[re]?S:j[A.defaultColorScheme]?.palette?.mode||A.palette?.mode,storageManager:g,storageWindow:_,noSsr:w}),de=ie,F=le;O&&(de=D.mode,F=D.colorScheme);let fe=F||A.defaultColorScheme;A.vars&&!C&&(fe=A.defaultColorScheme);let pe=L.useMemo(()=>{let e=A.generateThemeVars?.()||A.vars,t={...A,components:te,colorSchemes:j,cssVarPrefix:M,vars:e};if(typeof t.generateSpacing==`function`&&(t.spacing=t.generateSpacing()),fe){let e=j[fe];e&&typeof e==`object`&&Object.keys(e).forEach(n=>{e[n]&&typeof e[n]==`object`?t[n]={...t[n],...e[n]}:t[n]=e[n]})}return s?s(t):t},[A,fe,te,j,M]),me=A.colorSchemeSelector;di(()=>{if(F&&y&&me&&me!==`media`){let e=me,t=me;if(e===`class`&&(t=`.%s`),e===`data`&&(t=`[data-%s]`),e?.startsWith(`data-`)&&!e.includes(`%s`)&&(t=`[${e}="%s"]`),t.startsWith(`.`))y.classList.remove(...N.map(e=>t.substring(1).replace(`%s`,e))),y.classList.add(t.substring(1).replace(`%s`,F));else{let e=t.replace(`%s`,F).match(/\[([^\]]+)\]/);if(e){let[t,n]=e[1].split(`=`);n||N.forEach(e=>{y.removeAttribute(t.replace(F,e))}),y.setAttribute(t,n?n.replace(/"|'/g,``):``)}else y.setAttribute(t,F)}}},[F,me,y,N]),L.useEffect(()=>{let e;if(h&&T.current&&v){let t=v.createElement(`style`);t.appendChild(v.createTextNode(pa)),v.head.appendChild(t),window.getComputedStyle(v.body),e=setTimeout(()=>{v.head.removeChild(t)},1)}return()=>{clearTimeout(e)}},[F,h,v]),L.useEffect(()=>(T.current=!0,()=>{T.current=!1}),[]);let he=L.useMemo(()=>({allColorSchemes:N,colorScheme:F,darkColorScheme:ce,lightColorScheme:se,mode:de,setColorScheme:ue,setMode:ae,systemMode:oe}),[N,F,ce,se,de,ue,ae,oe,pe.colorSchemeSelector]),ge=!0;(x||A.cssVariables===!1||O&&E?.cssVarPrefix===M)&&(ge=!1);let _e=(0,R.jsxs)(L.Fragment,{children:[(0,R.jsx)($i,{themeId:ee?t:void 0,theme:pe,children:c}),ge&&(0,R.jsx)(on,{styles:pe.generateStyleSheets?.()||[]})]});return O?_e:(0,R.jsx)(l.Provider,{value:he,children:_e})}let m=typeof o==`string`?o:o.light,h=typeof o==`string`?o:o.dark;return{CssVarsProvider:p,useColorScheme:u,getInitColorSchemeScript:e=>aa({colorSchemeStorageKey:i,defaultLightColorScheme:m,defaultDarkColorScheme:h,modeStorageKey:r,...e})}}function ha(e=``){function t(...n){if(!n.length)return``;let r=n[0];return typeof r==`string`&&!r.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}-`:``}${r}${t(...n.slice(1))})`:`, ${r}`}return(n,...r)=>`var(--${e?`${e}-`:``}${n}${t(...r)})`}var ga=(e,t,n,r=[])=>{let i=e;t.forEach((e,a)=>{a===t.length-1?Array.isArray(i)?i[Number(e)]=n:i&&typeof i==`object`&&(i[e]=n):i&&typeof i==`object`&&(i[e]||(i[e]=r.includes(e)?[]:{}),i=i[e])})},_a=(e,t,n)=>{function r(e,i=[],a=[]){Object.entries(e).forEach(([e,o])=>{(!n||n&&!n([...i,e]))&&o!=null&&(typeof o==`object`&&Object.keys(o).length>0?r(o,[...i,e],Array.isArray(o)?[...a,e]:a):t([...i,e],o,a))})}r(e)},va=(e,t)=>typeof t==`number`?[`lineHeight`,`fontWeight`,`opacity`,`zIndex`].some(t=>e.includes(t))||e[e.length-1].toLowerCase().includes(`opacity`)?t:`${t}px`:t;function ya(e,t){let{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},a={},o={};return _a(e,(e,t,s)=>{if((typeof t==`string`||typeof t==`number`)&&(!r||!r(e,t))){let r=`--${n?`${n}-`:``}${e.join(`-`)}`,c=va(e,t);Object.assign(i,{[r]:c}),ga(a,e,`var(${r})`,s),ga(o,e,`var(${r}, ${c})`,s)}},e=>e[0]===`vars`),{css:i,vars:a,varsWithDefaults:o}}function ba(e,t={}){let{getSelector:n=_,disableCssColorScheme:r,colorSchemeSelector:i,enableContrastVars:a}=t,{colorSchemes:o={},components:s,defaultColorScheme:c=`light`,...l}=e,{vars:u,css:d,varsWithDefaults:f}=ya(l,t),p=f,m={},{[c]:h,...g}=o;if(Object.entries(g||{}).forEach(([e,n])=>{let{vars:r,css:i,varsWithDefaults:a}=ya(n,t);p=hn(p,a),m[e]={css:i,vars:r}}),h){let{css:e,vars:n,varsWithDefaults:r}=ya(h,t);p=hn(p,r),m[c]={css:e,vars:n}}function _(t,n){let r=i;if(i===`class`&&(r=`.%s`),i===`data`&&(r=`[data-%s]`),i?.startsWith(`data-`)&&!i.includes(`%s`)&&(r=`[${i}="%s"]`),t){if(r===`media`)return e.defaultColorScheme===t?`:root`:{[`@media (prefers-color-scheme: ${o[t]?.palette?.mode||t})`]:{":root":n}};if(r)return e.defaultColorScheme===t?`:root, ${r.replace(`%s`,String(t))}`:r.replace(`%s`,String(t))}return`:root`}return{vars:p,generateThemeVars:()=>{let e={...u};return Object.entries(m).forEach(([,{vars:t}])=>{e=hn(e,t)}),e},generateStyleSheets:()=>{let t=[],i=e.defaultColorScheme||`light`;function s(e,n){Object.keys(n).length&&t.push(typeof e==`string`?{[e]:{...n}}:e)}s(n(void 0,{...d}),d);let{[i]:c,...l}=m;if(c){let{css:e}=c,t=o[i]?.palette?.mode,a=!r&&t?{colorScheme:t,...e}:{...e};s(n(i,{...a}),a)}return Object.entries(l).forEach(([e,{css:t}])=>{let i=o[e]?.palette?.mode,a=!r&&i?{colorScheme:i,...t}:{...t};s(n(e,{...a}),a)}),a&&t.push({":root":{"--__l-threshold":`0.7`,"--__l":`clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)`,"--__a":`clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)`}}),t}}}function xa(e){return function(t){return e===`media`?`@media (prefers-color-scheme: ${t})`:e?e.startsWith(`data-`)&&!e.includes(`%s`)?`[${e}="${t}"] &`:e===`class`?`.${t} &`:e===`data`?`[data-${t}] &`:`${e.replace(`%s`,t)} &`:`&`}}function Sa(e,t,n=void 0){let r={};for(let i in e){let a=e[i],o=``,s=!0;for(let e=0;e<a.length;e+=1){let r=a[e];r&&(o+=(s===!0?``:` `)+t(r),s=!1,n&&n[r]&&(o+=` `+n[r]))}r[i]=o}return r}function Ca(e,t){return L.isValidElement(e)&&t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}var wa=(e,t)=>e.filter(e=>t.includes(e)),Ta=(e,t,n)=>{let r=e.keys[0];Array.isArray(t)?t.forEach((t,r)=>{n((t,n)=>{r<=e.keys.length-1&&(r===0?Object.assign(t,n):t[e.up(e.keys[r])]=n)},t)}):t&&typeof t==`object`?(Object.keys(t).length>e.keys.length?e.keys:wa(e.keys,Object.keys(t))).forEach(i=>{if(e.keys.includes(i)){let a=t[i];a!==void 0&&n((t,n)=>{r===i?Object.assign(t,n):t[e.up(i)]=n},a)}}):(typeof t==`number`||typeof t==`string`)&&n((e,t)=>{Object.assign(e,t)},t)};function Ea(e){return`--Grid-${e}Spacing`}function Da(e){return`--Grid-parent-${e}Spacing`}var Oa=`--Grid-columns`,ka=`--Grid-parent-columns`,Aa=({theme:e,ownerState:t})=>{let n={};return Ta(e.breakpoints,t.size,(e,t)=>{let r={};t===`grow`&&(r={flexBasis:0,flexGrow:1,maxWidth:`100%`}),t===`auto`&&(r={flexBasis:`auto`,flexGrow:0,flexShrink:0,maxWidth:`none`,width:`auto`}),typeof t==`number`&&(r={flexGrow:0,flexBasis:`auto`,width:`calc(100% * ${t} / var(${ka}) - (var(${ka}) - ${t}) * (var(${Da(`column`)}) / var(${ka})))`}),e(n,r)}),n},ja=({theme:e,ownerState:t})=>{let n={};return Ta(e.breakpoints,t.offset,(e,t)=>{let r={};t===`auto`&&(r={marginLeft:`auto`}),typeof t==`number`&&(r={marginLeft:t===0?`0px`:`calc(100% * ${t} / var(${ka}) + var(${Da(`column`)}) * ${t} / var(${ka}))`}),e(n,r)}),n},Ma=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={[Oa]:12};return Ta(e.breakpoints,t.columns,(e,t)=>{let r=t??12;e(n,{[Oa]:r,"> *":{[ka]:r}})}),n},Na=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={};return Ta(e.breakpoints,t.rowSpacing,(t,r)=>{let i=typeof r==`string`?r:e.spacing?.(r);t(n,{[Ea(`row`)]:i,"> *":{[Da(`row`)]:i}})}),n},Pa=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={};return Ta(e.breakpoints,t.columnSpacing,(t,r)=>{let i=typeof r==`string`?r:e.spacing?.(r);t(n,{[Ea(`column`)]:i,"> *":{[Da(`column`)]:i}})}),n},Fa=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={};return Ta(e.breakpoints,t.direction,(e,t)=>{e(n,{flexDirection:t})}),n},Ia=({ownerState:e})=>({minWidth:0,boxSizing:`border-box`,...e.container&&{display:`flex`,flexWrap:`wrap`,...e.wrap&&e.wrap!==`wrap`&&{flexWrap:e.wrap},gap:`var(${Ea(`row`)}) var(${Ea(`column`)})`}}),La=e=>{let t=[];return Object.entries(e).forEach(([e,n])=>{n!==!1&&n!==void 0&&t.push(`grid-${e}-${String(n)}`)}),t},Ra=(e,t=`xs`)=>{function n(e){return e===void 0?!1:typeof e==`string`&&!Number.isNaN(Number(e))||typeof e==`number`&&e>0}if(n(e))return[`spacing-${t}-${String(e)}`];if(typeof e==`object`&&!Array.isArray(e)){let t=[];return Object.entries(e).forEach(([e,r])=>{n(r)&&t.push(`spacing-${e}-${String(r)}`)}),t}return[]},za=e=>e===void 0?[]:typeof e==`object`?Object.entries(e).map(([e,t])=>`direction-${e}-${t}`):[`direction-xs-${String(e)}`];function Ba(e,t){let n=[];e.item!==void 0&&(delete e.item,n.push(`item`)),e.zeroMinWidth!==void 0&&(delete e.zeroMinWidth,n.push(`zeroMinWidth`)),t.keys.forEach(t=>{e[t]!==void 0&&(n.push(t),delete e[t])})}var Va=Pr(),Ha=si(`div`,{name:`MuiGrid`,slot:`Root`});function Ua(e){return ui({props:e,name:`MuiGrid`,defaultTheme:Va})}function Wa(e={}){let{createStyledComponent:t=Ha,useThemeProps:n=Ua,useTheme:r=Rr,componentName:i=`MuiGrid`}=e,a=(e,t)=>{let{container:n,direction:r,spacing:a,wrap:o,size:s}=e;return Sa({root:[`root`,n&&`container`,o!==`wrap`&&`wrap-xs-${String(o)}`,...za(r),...La(s),...n?Ra(a,t.breakpoints.keys[0]):[]]},e=>B(i,e),{})};function o(e,t,n=()=>!0){let r={};return e===null||(Array.isArray(e)?e.forEach((e,i)=>{e!==null&&n(e)&&t.keys[i]&&(r[t.keys[i]]=e)}):typeof e==`object`?Object.keys(e).forEach(t=>{let i=e[t];i!=null&&n(i)&&(r[t]=i)}):r[t.keys[0]]=e),r}let s=t(Ma,Pa,Na,Aa,Fa,Ia,ja),c=L.forwardRef(function(e,t){let i=r(),c=Hr(n(e));Ba(c,i.breakpoints);let{className:l,children:u,columns:d=12,container:f=!1,component:p=`div`,direction:m=`row`,wrap:h=`wrap`,size:g={},offset:_={},spacing:v=0,rowSpacing:y=v,columnSpacing:b=v,unstable_level:x=0,...S}=c,C=o(g,i.breakpoints,e=>e!==!1),w=o(_,i.breakpoints),T=e.columns??(x?void 0:d),E=e.spacing??(x?void 0:v),D=e.rowSpacing??e.spacing??(x?void 0:y),O=e.columnSpacing??e.spacing??(x?void 0:b),k={...c,level:x,columns:T,container:f,direction:m,wrap:h,spacing:E,rowSpacing:D,columnSpacing:O,size:C,offset:w};return(0,R.jsx)(s,{ref:t,as:p,ownerState:k,className:z(a(k,i).root,l),...S,children:L.Children.map(u,e=>L.isValidElement(e)&&Ca(e,[`Grid`])&&f&&e.props.container?L.cloneElement(e,{unstable_level:e.props?.unstable_level??x+1}):e)})});return c.muiName=`Grid`,c}var Ga=Pr(),Ka=si(`div`,{name:`MuiStack`,slot:`Root`});function qa(e){return ui({props:e,name:`MuiStack`,defaultTheme:Ga})}function Ja(e,t){let n=L.Children.toArray(e).filter(Boolean);return n.reduce((e,r,i)=>(e.push(r),i<n.length-1&&e.push(L.cloneElement(t,{key:`separator-${i}`})),e),[])}var Ya=e=>({row:`Left`,"row-reverse":`Right`,column:`Top`,"column-reverse":`Bottom`})[e],Xa=({ownerState:e,theme:t})=>{let n={display:`flex`,flexDirection:`column`,...Dn({theme:t},Mn({values:e.direction,breakpoints:t.breakpoints.values}),e=>({flexDirection:e}))};if(e.spacing){let r=Kn(t),i=Object.keys(t.breakpoints.values).reduce((t,n)=>((typeof e.spacing==`object`&&e.spacing[n]!=null||typeof e.direction==`object`&&e.direction[n]!=null)&&(t[n]=!0),t),{}),a=Mn({values:e.direction,base:i}),o=Mn({values:e.spacing,base:i});typeof a==`object`&&Object.keys(a).forEach((e,t,n)=>{a[e]||(a[e]=t>0?a[n[t-1]]:`column`)}),n=hn(n,Dn({theme:t},o,(t,n)=>e.useFlexGap?{gap:qn(r,t)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Ya(n?a[n]:e.direction)}`]:qn(r,t)}}))}return n=An(t.breakpoints,n),n};function Za(e={}){let{createStyledComponent:t=Ka,useThemeProps:n=qa,componentName:r=`MuiStack`}=e,i=()=>Sa({root:[`root`]},e=>B(r,e),{}),a=t(Xa);return L.forwardRef(function(e,t){let{component:r=`div`,direction:o=`column`,spacing:s=0,divider:c,children:l,className:u,useFlexGap:d=!1,...f}=Hr(n(e));return(0,R.jsx)(a,{as:r,ownerState:{direction:o,spacing:s,useFlexGap:d},ref:t,className:z(i().root,u),...f,children:c?Ja(l,c):l})})}function Qa(){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:v.white,default:v.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}}}var $a=Qa();function eo(){return{text:{primary:v.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:v.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}}}var to=eo();function no(e,t,n,r){let i=r.light||r,a=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t===`light`?e.light=Ai(e.main,i):t===`dark`&&(e.dark=Oi(e.main,a)))}function ro(e,t,n,r,i){let a=i.light||i,o=i.dark||i*1.5;t[n]||(t.hasOwnProperty(r)?t[n]=t[r]:n===`light`?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(a*100).toFixed(0)}%)`:n===`dark`&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(o*100).toFixed(0)}%)`))}function io(e=`light`){return e===`dark`?{main:x[200],light:x[50],dark:x[400]}:{main:x[700],light:x[400],dark:x[800]}}function ao(e=`light`){return e===`dark`?{main:b[200],light:b[50],dark:b[400]}:{main:b[500],light:b[300],dark:b[700]}}function oo(e=`light`){return e===`dark`?{main:y[500],light:y[300],dark:y[700]}:{main:y[700],light:y[400],dark:y[800]}}function so(e=`light`){return e===`dark`?{main:S[400],light:S[300],dark:S[700]}:{main:S[700],light:S[500],dark:S[900]}}function co(e=`light`){return e===`dark`?{main:C[400],light:C[300],dark:C[700]}:{main:C[800],light:C[500],dark:C[900]}}function lo(e=`light`){return e===`dark`?{main:w[400],light:w[300],dark:w[700]}:{main:`#ed6c02`,light:w[500],dark:w[900]}}function uo(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function fo(e){let{mode:t=`light`,contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:i,...a}=e,o=e.primary||io(t),s=e.secondary||ao(t),c=e.error||oo(t),l=e.info||so(t),u=e.success||co(t),d=e.warning||lo(t);function f(e){return i?uo(e):Ti(e,to.text.primary)>=n?to.text.primary:$a.text.primary}let p=({color:e,name:t,mainShade:n=500,lightShade:a=300,darkShade:o=700})=>{if(e={...e},!e.main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty(`main`))throw Error(D(11,t?` (${t})`:``,n));if(typeof e.main!=`string`)throw Error(D(12,t?` (${t})`:``,JSON.stringify(e.main)));return i?(ro(i,e,`light`,a,r),ro(i,e,`dark`,o,r)):(no(e,`light`,a,r),no(e,`dark`,o,r)),e.contrastText||=f(e.main),e},m;return t===`light`?m=Qa():t===`dark`&&(m=eo()),hn({common:{...v},mode:t,primary:p({color:o,name:`primary`}),secondary:p({color:s,name:`secondary`,mainShade:`A400`,lightShade:`A200`,darkShade:`A700`}),error:p({color:c,name:`error`}),warning:p({color:d,name:`warning`}),info:p({color:l,name:`info`}),success:p({color:u,name:`success`}),grey:E,contrastThreshold:n,getContrastText:f,augmentColor:p,tonalOffset:r,...m},a)}function po(e){let t={};return Object.entries(e).forEach(e=>{let[n,r]=e;typeof r==`object`&&(t[n]=`${r.fontStyle?`${r.fontStyle} `:``}${r.fontVariant?`${r.fontVariant} `:``}${r.fontWeight?`${r.fontWeight} `:``}${r.fontStretch?`${r.fontStretch} `:``}${r.fontSize||``}${r.lineHeight?`/${r.lineHeight} `:``}${r.fontFamily||``}`)}),t}function mo(e,t){return{toolbar:{minHeight:56,[e.up(`xs`)]:{"@media (orientation: landscape)":{minHeight:48}},[e.up(`sm`)]:{minHeight:64}},...t}}function ho(e){return Math.round(e*1e5)/1e5}var go={textTransform:`uppercase`},_o=`"Roboto", "Helvetica", "Arial", sans-serif`;function vo(e,t){let{fontFamily:n=_o,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:o=500,fontWeightBold:s=700,htmlFontSize:c=16,allVariants:l,pxToRem:u,...d}=typeof t==`function`?t(e):t,f=r/14,p=u||(e=>`${e/c*f}rem`),m=(e,t,r,i,a)=>({fontFamily:n,fontWeight:e,fontSize:p(t),lineHeight:r,...n===_o?{letterSpacing:`${ho(i/t)}em`}:{},...a,...l});return hn({htmlFontSize:c,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:o,fontWeightBold:s,h1:m(i,96,1.167,-1.5),h2:m(i,60,1.2,-.5),h3:m(a,48,1.167,0),h4:m(a,34,1.235,.25),h5:m(a,24,1.334,0),h6:m(o,20,1.6,.15),subtitle1:m(a,16,1.75,.15),subtitle2:m(o,14,1.57,.1),body1:m(a,16,1.5,.15),body2:m(a,14,1.43,.15),button:m(o,14,1.75,.4,go),caption:m(a,12,1.66,.4),overline:m(a,12,2.66,1,go),inherit:{fontFamily:`inherit`,fontWeight:`inherit`,fontSize:`inherit`,lineHeight:`inherit`,letterSpacing:`inherit`}},d,{clone:!1})}var yo=.2,bo=.14,xo=.12;function So(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${yo})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${bo})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${xo})`].join(`,`)}var Co=[`none`,So(0,2,1,-1,0,1,1,0,0,1,3,0),So(0,3,1,-2,0,2,2,0,0,1,5,0),So(0,3,3,-2,0,3,4,0,0,1,8,0),So(0,2,4,-1,0,4,5,0,0,1,10,0),So(0,3,5,-1,0,5,8,0,0,1,14,0),So(0,3,5,-1,0,6,10,0,0,1,18,0),So(0,4,5,-2,0,7,10,1,0,2,16,1),So(0,5,5,-3,0,8,10,1,0,3,14,2),So(0,5,6,-3,0,9,12,1,0,3,16,2),So(0,6,6,-3,0,10,14,1,0,4,18,3),So(0,6,7,-4,0,11,15,1,0,4,20,3),So(0,7,8,-4,0,12,17,2,0,5,22,4),So(0,7,8,-4,0,13,19,2,0,5,24,4),So(0,7,9,-4,0,14,21,2,0,5,26,4),So(0,8,9,-5,0,15,22,2,0,6,28,5),So(0,8,10,-5,0,16,24,2,0,6,30,5),So(0,8,11,-5,0,17,26,2,0,6,32,5),So(0,9,11,-5,0,18,28,2,0,7,34,6),So(0,9,12,-6,0,19,29,2,0,7,36,6),So(0,10,13,-6,0,20,31,3,0,8,38,7),So(0,10,13,-6,0,21,33,3,0,8,40,7),So(0,10,14,-6,0,22,35,3,0,8,42,7),So(0,11,14,-7,0,23,36,3,0,9,44,8),So(0,11,15,-7,0,24,38,3,0,9,46,8)],wo={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)`},To={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Eo(e){return`${Math.round(e)}ms`}function Do(e){if(!e)return 0;let t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function Oo(e){let t={...wo,...e.easing},n={...To,...e.duration};return{getAutoHeightDuration:Do,create:(e=[`all`],r={})=>{let{duration:i=n.standard,easing:a=t.easeInOut,delay:o=0,...s}=r;return(Array.isArray(e)?e:[e]).map(e=>`${e} ${typeof i==`string`?i:Eo(i)} ${a} ${typeof o==`string`?o:Eo(o)}`).join(`,`)},...e,easing:t,duration:n}}var ko={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Ao(e){return pn(e)||e===void 0||typeof e==`string`||typeof e==`boolean`||typeof e==`number`||Array.isArray(e)}function jo(e={}){let t={...e};function n(e){let t=Object.entries(e);for(let r=0;r<t.length;r++){let[i,a]=t[r];!Ao(a)||i.startsWith(`unstable_`)?delete e[i]:pn(a)&&(e[i]={...a},n(e[i]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
38
|
+
|
|
39
|
+
const theme = ${JSON.stringify(t,null,2)};
|
|
40
|
+
|
|
41
|
+
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
42
|
+
theme.transitions = createTransitions(theme.transitions || {});
|
|
43
|
+
|
|
44
|
+
export default theme;`}function Mo(e){return typeof e==`number`?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}var No=e=>{if(!Number.isNaN(+e))return+e;let t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let e=0;e<t.length;e+=1)n+=+t[e];return n};function Po(e){Object.assign(e,{alpha(t,n){let r=this||e;return r.colorSpace?`oklch(from ${t} l c h / ${typeof n==`string`?`calc(${n})`:n})`:r.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,`var(--$1Channel)`)} / ${typeof n==`string`?`calc(${n})`:n})`:Ei(t,No(n))},lighten(t,n){let r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #fff ${Mo(n)})`:Ai(t,n)},darken(t,n){let r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #000 ${Mo(n)})`:Oi(t,n)}})}function Fo(e={},...t){let{breakpoints:n,mixins:r={},spacing:i,palette:a={},transitions:o={},typography:s={},shape:c,colorSpace:l,...u}=e;if(e.vars&&e.generateThemeVars===void 0)throw Error(D(20));let d=fo({...a,colorSpace:l}),f=Pr(e),p=hn(f,{mixins:mo(f.breakpoints,r),palette:d,shadows:Co.slice(),typography:vo(d,s),transitions:Oo(o),zIndex:{...ko}});return p=hn(p,u),p=t.reduce((e,t)=>hn(e,t),p),p.unstable_sxConfig={...Or,...u?.unstable_sxConfig},p.unstable_sx=function(e){return Mr({sx:e,theme:this})},p.toRuntimeSource=jo,Po(p),p}function Io(e){let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}var Lo=[...Array(25)].map((e,t)=>{if(t===0)return`none`;let n=Io(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Ro(e){return{inputPlaceholder:e===`dark`?.5:.42,inputUnderline:e===`dark`?.7:.42,switchTrackDisabled:e===`dark`?.2:.12,switchTrack:e===`dark`?.3:.38}}function zo(e){return e===`dark`?Lo:[]}function Bo(e){let{palette:t={mode:`light`},opacity:n,overlays:r,colorSpace:i,...a}=e,o=fo({...t,colorSpace:i});return{palette:o,opacity:{...Ro(o.mode),...n},overlays:r||zo(o.mode),...a}}function Vo(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]===`palette`&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}var Ho=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:``}overlays-${n}`),`--${e?`${e}-`:``}palette-AppBar-darkBg`,`--${e?`${e}-`:``}palette-AppBar-darkColor`],Uo=e=>(t,n)=>{let r=e.rootSelector||`:root`,i=e.colorSchemeSelector,a=i;if(i===`class`&&(a=`.%s`),i===`data`&&(a=`[data-%s]`),i?.startsWith(`data-`)&&!i.includes(`%s`)&&(a=`[${i}="%s"]`),e.defaultColorScheme===t){if(t===`dark`){let i={};return Ho(e.cssVarPrefix).forEach(e=>{i[e]=n[e],delete n[e]}),a===`media`?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:i}}:a?{[a.replace(`%s`,t)]:i,[`${r}, ${a.replace(`%s`,t)}`]:n}:{[r]:{...n,...i}}}if(a&&a!==`media`)return`${r}, ${a.replace(`%s`,String(t))}`}else if(t){if(a===`media`)return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(a)return a.replace(`%s`,String(t))}return r};function Wo(e,t){t.forEach(t=>{e[t]||(e[t]={})})}function V(e,t,n){!e[t]&&n&&(e[t]=n)}function Go(e){return typeof e!=`string`||!e.startsWith(`hsl`)?e:Ci(e)}function Ko(e,t){`${t}Channel`in e||(e[`${t}Channel`]=xi(Go(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().
|
|
45
|
+
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 qo(e){return typeof e==`number`?`${e}px`:typeof e==`string`||typeof e==`function`||Array.isArray(e)?e:`8px`}var Jo=e=>{try{return e()}catch{}},Yo=(e=`mui`)=>ha(e);function Xo(e,t,n,r,i){if(!n)return;n=n===!0?{}:n;let a=i===`dark`?`dark`:`light`;if(!r){t[i]=Bo({...n,palette:{mode:a,...n?.palette},colorSpace:e});return}let{palette:o,...s}=Fo({...r,palette:{mode:a,...n?.palette},colorSpace:e});return t[i]={...n,palette:o,opacity:{...Ro(a),...n?.opacity},overlays:n?.overlays||zo(a)},s}function Zo(e={},...t){let{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:a=`mui`,nativeColor:o=!1,shouldSkipGeneratingVar:s=Vo,colorSchemeSelector:c=n.light&&n.dark?`media`:void 0,rootSelector:l=`:root`,...u}=e,d=Object.keys(n)[0],f=r||(n.light&&d!==`light`?`light`:d),p=Yo(a),{[f]:m,light:h,dark:g,..._}=n,v={..._},y=m;if((f===`dark`&&!(`dark`in n)||f===`light`&&!(`light`in n))&&(y=!0),!y)throw Error(D(21,f));let b;o&&(b=`oklch`);let x=Xo(b,v,y,u,f);h&&!v.light&&Xo(b,v,h,void 0,`light`),g&&!v.dark&&Xo(b,v,g,void 0,`dark`);let S={defaultColorScheme:f,...x,cssVarPrefix:a,colorSchemeSelector:c,rootSelector:l,getCssVar:p,colorSchemes:v,font:{...po(x.typography),...x.font},spacing:qo(u.spacing)};Object.keys(S.colorSchemes).forEach(e=>{let t=S.colorSchemes[e].palette,n=e=>{let n=e.split(`-`),r=n[1],i=n[2];return p(e,t[r][i])};t.mode===`light`&&(V(t.common,`background`,`#fff`),V(t.common,`onBackground`,`#000`)),t.mode===`dark`&&(V(t.common,`background`,`#000`),V(t.common,`onBackground`,`#fff`));function r(e,t,n){if(b){let r;return e===Di&&(r=`transparent ${((1-n)*100).toFixed(0)}%`),e===ki&&(r=`#000 ${(n*100).toFixed(0)}%`),e===ji&&(r=`#fff ${(n*100).toFixed(0)}%`),`color-mix(in ${b}, ${t}, ${r})`}return e(t,n)}if(Wo(t,[`Alert`,`AppBar`,`Avatar`,`Button`,`Chip`,`FilledInput`,`LinearProgress`,`Skeleton`,`Slider`,`SnackbarContent`,`SpeedDialAction`,`StepConnector`,`StepContent`,`Switch`,`TableCell`,`Tooltip`]),t.mode===`light`){V(t.Alert,`errorColor`,r(ki,o?p(`palette-error-light`):t.error.light,.6)),V(t.Alert,`infoColor`,r(ki,o?p(`palette-info-light`):t.info.light,.6)),V(t.Alert,`successColor`,r(ki,o?p(`palette-success-light`):t.success.light,.6)),V(t.Alert,`warningColor`,r(ki,o?p(`palette-warning-light`):t.warning.light,.6)),V(t.Alert,`errorFilledBg`,n(`palette-error-main`)),V(t.Alert,`infoFilledBg`,n(`palette-info-main`)),V(t.Alert,`successFilledBg`,n(`palette-success-main`)),V(t.Alert,`warningFilledBg`,n(`palette-warning-main`)),V(t.Alert,`errorFilledColor`,Jo(()=>t.getContrastText(t.error.main))),V(t.Alert,`infoFilledColor`,Jo(()=>t.getContrastText(t.info.main))),V(t.Alert,`successFilledColor`,Jo(()=>t.getContrastText(t.success.main))),V(t.Alert,`warningFilledColor`,Jo(()=>t.getContrastText(t.warning.main))),V(t.Alert,`errorStandardBg`,r(ji,o?p(`palette-error-light`):t.error.light,.9)),V(t.Alert,`infoStandardBg`,r(ji,o?p(`palette-info-light`):t.info.light,.9)),V(t.Alert,`successStandardBg`,r(ji,o?p(`palette-success-light`):t.success.light,.9)),V(t.Alert,`warningStandardBg`,r(ji,o?p(`palette-warning-light`):t.warning.light,.9)),V(t.Alert,`errorIconColor`,n(`palette-error-main`)),V(t.Alert,`infoIconColor`,n(`palette-info-main`)),V(t.Alert,`successIconColor`,n(`palette-success-main`)),V(t.Alert,`warningIconColor`,n(`palette-warning-main`)),V(t.AppBar,`defaultBg`,n(`palette-grey-100`)),V(t.Avatar,`defaultBg`,n(`palette-grey-400`)),V(t.Button,`inheritContainedBg`,n(`palette-grey-300`)),V(t.Button,`inheritContainedHoverBg`,n(`palette-grey-A100`)),V(t.Chip,`defaultBorder`,n(`palette-grey-400`)),V(t.Chip,`defaultAvatarColor`,n(`palette-grey-700`)),V(t.Chip,`defaultIconColor`,n(`palette-grey-700`)),V(t.FilledInput,`bg`,`rgba(0, 0, 0, 0.06)`),V(t.FilledInput,`hoverBg`,`rgba(0, 0, 0, 0.09)`),V(t.FilledInput,`disabledBg`,`rgba(0, 0, 0, 0.12)`),V(t.LinearProgress,`primaryBg`,r(ji,o?p(`palette-primary-main`):t.primary.main,.62)),V(t.LinearProgress,`secondaryBg`,r(ji,o?p(`palette-secondary-main`):t.secondary.main,.62)),V(t.LinearProgress,`errorBg`,r(ji,o?p(`palette-error-main`):t.error.main,.62)),V(t.LinearProgress,`infoBg`,r(ji,o?p(`palette-info-main`):t.info.main,.62)),V(t.LinearProgress,`successBg`,r(ji,o?p(`palette-success-main`):t.success.main,.62)),V(t.LinearProgress,`warningBg`,r(ji,o?p(`palette-warning-light`):t.warning.main,.62)),V(t.Skeleton,`bg`,b?r(Di,o?p(`palette-text-primary`):t.text.primary,.11):`rgba(${n(`palette-text-primaryChannel`)} / 0.11)`),V(t.Slider,`primaryTrack`,r(ji,o?p(`palette-primary-main`):t.primary.main,.62)),V(t.Slider,`secondaryTrack`,r(ji,o?p(`palette-secondary-main`):t.secondary.main,.62)),V(t.Slider,`errorTrack`,r(ji,o?p(`palette-error-main`):t.error.main,.62)),V(t.Slider,`infoTrack`,r(ji,o?p(`palette-info-main`):t.info.main,.62)),V(t.Slider,`successTrack`,r(ji,o?p(`palette-success-main`):t.success.main,.62)),V(t.Slider,`warningTrack`,r(ji,o?p(`palette-warning-main`):t.warning.main,.62));let e=b?r(ki,o?p(`palette-background-default`):t.background.default,.6825):Ni(t.background.default,.8);V(t.SnackbarContent,`bg`,e),V(t.SnackbarContent,`color`,Jo(()=>b?to.text.primary:t.getContrastText(e))),V(t.SpeedDialAction,`fabHoverBg`,Ni(t.background.paper,.15)),V(t.StepConnector,`border`,n(`palette-grey-400`)),V(t.StepContent,`border`,n(`palette-grey-400`)),V(t.Switch,`defaultColor`,n(`palette-common-white`)),V(t.Switch,`defaultDisabledColor`,n(`palette-grey-100`)),V(t.Switch,`primaryDisabledColor`,r(ji,o?p(`palette-primary-main`):t.primary.main,.62)),V(t.Switch,`secondaryDisabledColor`,r(ji,o?p(`palette-secondary-main`):t.secondary.main,.62)),V(t.Switch,`errorDisabledColor`,r(ji,o?p(`palette-error-main`):t.error.main,.62)),V(t.Switch,`infoDisabledColor`,r(ji,o?p(`palette-info-main`):t.info.main,.62)),V(t.Switch,`successDisabledColor`,r(ji,o?p(`palette-success-main`):t.success.main,.62)),V(t.Switch,`warningDisabledColor`,r(ji,o?p(`palette-warning-main`):t.warning.main,.62)),V(t.TableCell,`border`,r(ji,Di(o?p(`palette-divider`):t.divider,1),.88)),V(t.Tooltip,`bg`,r(Di,o?p(`palette-grey-700`):t.grey[700],.92))}if(t.mode===`dark`){V(t.Alert,`errorColor`,r(ji,o?p(`palette-error-light`):t.error.light,.6)),V(t.Alert,`infoColor`,r(ji,o?p(`palette-info-light`):t.info.light,.6)),V(t.Alert,`successColor`,r(ji,o?p(`palette-success-light`):t.success.light,.6)),V(t.Alert,`warningColor`,r(ji,o?p(`palette-warning-light`):t.warning.light,.6)),V(t.Alert,`errorFilledBg`,n(`palette-error-dark`)),V(t.Alert,`infoFilledBg`,n(`palette-info-dark`)),V(t.Alert,`successFilledBg`,n(`palette-success-dark`)),V(t.Alert,`warningFilledBg`,n(`palette-warning-dark`)),V(t.Alert,`errorFilledColor`,Jo(()=>t.getContrastText(t.error.dark))),V(t.Alert,`infoFilledColor`,Jo(()=>t.getContrastText(t.info.dark))),V(t.Alert,`successFilledColor`,Jo(()=>t.getContrastText(t.success.dark))),V(t.Alert,`warningFilledColor`,Jo(()=>t.getContrastText(t.warning.dark))),V(t.Alert,`errorStandardBg`,r(ki,o?p(`palette-error-light`):t.error.light,.9)),V(t.Alert,`infoStandardBg`,r(ki,o?p(`palette-info-light`):t.info.light,.9)),V(t.Alert,`successStandardBg`,r(ki,o?p(`palette-success-light`):t.success.light,.9)),V(t.Alert,`warningStandardBg`,r(ki,o?p(`palette-warning-light`):t.warning.light,.9)),V(t.Alert,`errorIconColor`,n(`palette-error-main`)),V(t.Alert,`infoIconColor`,n(`palette-info-main`)),V(t.Alert,`successIconColor`,n(`palette-success-main`)),V(t.Alert,`warningIconColor`,n(`palette-warning-main`)),V(t.AppBar,`defaultBg`,n(`palette-grey-900`)),V(t.AppBar,`darkBg`,n(`palette-background-paper`)),V(t.AppBar,`darkColor`,n(`palette-text-primary`)),V(t.Avatar,`defaultBg`,n(`palette-grey-600`)),V(t.Button,`inheritContainedBg`,n(`palette-grey-800`)),V(t.Button,`inheritContainedHoverBg`,n(`palette-grey-700`)),V(t.Chip,`defaultBorder`,n(`palette-grey-700`)),V(t.Chip,`defaultAvatarColor`,n(`palette-grey-300`)),V(t.Chip,`defaultIconColor`,n(`palette-grey-300`)),V(t.FilledInput,`bg`,`rgba(255, 255, 255, 0.09)`),V(t.FilledInput,`hoverBg`,`rgba(255, 255, 255, 0.13)`),V(t.FilledInput,`disabledBg`,`rgba(255, 255, 255, 0.12)`),V(t.LinearProgress,`primaryBg`,r(ki,o?p(`palette-primary-main`):t.primary.main,.5)),V(t.LinearProgress,`secondaryBg`,r(ki,o?p(`palette-secondary-main`):t.secondary.main,.5)),V(t.LinearProgress,`errorBg`,r(ki,o?p(`palette-error-main`):t.error.main,.5)),V(t.LinearProgress,`infoBg`,r(ki,o?p(`palette-info-main`):t.info.main,.5)),V(t.LinearProgress,`successBg`,r(ki,o?p(`palette-success-main`):t.success.main,.5)),V(t.LinearProgress,`warningBg`,r(ki,o?p(`palette-warning-main`):t.warning.main,.5)),V(t.Skeleton,`bg`,b?r(Di,o?p(`palette-text-primary`):t.text.primary,.13):`rgba(${n(`palette-text-primaryChannel`)} / 0.13)`),V(t.Slider,`primaryTrack`,r(ki,o?p(`palette-primary-main`):t.primary.main,.5)),V(t.Slider,`secondaryTrack`,r(ki,o?p(`palette-secondary-main`):t.secondary.main,.5)),V(t.Slider,`errorTrack`,r(ki,o?p(`palette-error-main`):t.error.main,.5)),V(t.Slider,`infoTrack`,r(ki,o?p(`palette-info-main`):t.info.main,.5)),V(t.Slider,`successTrack`,r(ki,o?p(`palette-success-main`):t.success.main,.5)),V(t.Slider,`warningTrack`,r(ki,o?p(`palette-warning-light`):t.warning.main,.5));let e=b?r(ji,o?p(`palette-background-default`):t.background.default,.985):Ni(t.background.default,.98);V(t.SnackbarContent,`bg`,e),V(t.SnackbarContent,`color`,Jo(()=>b?$a.text.primary:t.getContrastText(e))),V(t.SpeedDialAction,`fabHoverBg`,Ni(t.background.paper,.15)),V(t.StepConnector,`border`,n(`palette-grey-600`)),V(t.StepContent,`border`,n(`palette-grey-600`)),V(t.Switch,`defaultColor`,n(`palette-grey-300`)),V(t.Switch,`defaultDisabledColor`,n(`palette-grey-600`)),V(t.Switch,`primaryDisabledColor`,r(ki,o?p(`palette-primary-main`):t.primary.main,.55)),V(t.Switch,`secondaryDisabledColor`,r(ki,o?p(`palette-secondary-main`):t.secondary.main,.55)),V(t.Switch,`errorDisabledColor`,r(ki,o?p(`palette-error-main`):t.error.main,.55)),V(t.Switch,`infoDisabledColor`,r(ki,o?p(`palette-info-main`):t.info.main,.55)),V(t.Switch,`successDisabledColor`,r(ki,o?p(`palette-success-main`):t.success.main,.55)),V(t.Switch,`warningDisabledColor`,r(ki,o?p(`palette-warning-light`):t.warning.main,.55)),V(t.TableCell,`border`,r(ki,Di(o?p(`palette-divider`):t.divider,1),.68)),V(t.Tooltip,`bg`,r(Di,o?p(`palette-grey-700`):t.grey[700],.92))}Ko(t.background,`default`),Ko(t.background,`paper`),Ko(t.common,`background`),Ko(t.common,`onBackground`),Ko(t,`divider`),Object.keys(t).forEach(e=>{let n=t[e];e!==`tonalOffset`&&n&&typeof n==`object`&&(n.main&&V(t[e],`mainChannel`,xi(Go(n.main))),n.light&&V(t[e],`lightChannel`,xi(Go(n.light))),n.dark&&V(t[e],`darkChannel`,xi(Go(n.dark))),n.contrastText&&V(t[e],`contrastTextChannel`,xi(Go(n.contrastText))),e===`text`&&(Ko(t[e],`primary`),Ko(t[e],`secondary`)),e===`action`&&(n.active&&Ko(t[e],`active`),n.selected&&Ko(t[e],`selected`)))})}),S=t.reduce((e,t)=>hn(e,t),S);let C={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:Uo(S),enableContrastVars:o},{vars:w,generateThemeVars:T,generateStyleSheets:E}=ba(S,C);return S.vars=w,Object.entries(S.colorSchemes[S.defaultColorScheme]).forEach(([e,t])=>{S[e]=t}),S.generateThemeVars=T,S.generateStyleSheets=E,S.generateSpacing=function(){return er(u.spacing,Kn(this))},S.getColorSchemeSelector=xa(c),S.spacing=S.generateSpacing(),S.shouldSkipGeneratingVar=s,S.unstable_sxConfig={...Or,...u?.unstable_sxConfig},S.unstable_sx=function(e){return Mr({sx:e,theme:this})},S.toRuntimeSource=jo,S}function Qo(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:fo({...n===!0?{}:n.palette,mode:t})})}function $o(e={},...t){let{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:a=n?.mode,...o}=e,s=a||`light`,c=i?.[s],l={...i,...n?{[s]:{...typeof c!=`boolean`&&c,palette:n}}:void 0};if(r===!1){if(!(`colorSchemes`in e))return Fo(e,...t);let r=n;`palette`in e||l[s]&&(l[s]===!0?s===`dark`&&(r={mode:`dark`}):r=l[s].palette);let i=Fo({...e,palette:r},...t);return i.defaultColorScheme=s,i.colorSchemes=l,i.palette.mode===`light`&&(i.colorSchemes.light={...l.light!==!0&&l.light,palette:i.palette},Qo(i,`dark`,l.dark)),i.palette.mode===`dark`&&(i.colorSchemes.dark={...l.dark!==!0&&l.dark,palette:i.palette},Qo(i,`light`,l.light)),i}return!n&&!(`light`in l)&&s===`light`&&(l.light=!0),Zo({...o,colorSchemes:l,defaultColorScheme:s,...typeof r!=`boolean`&&r},...t)}var es=$o();function ts(){let e=Rr(es);return e.$$material||e}function ns(e){return e!==`ownerState`&&e!==`theme`&&e!==`sx`&&e!==`as`}var rs=e=>ns(e)&&e!==`classes`,H=ri({themeId:O,defaultTheme:es,rootShouldForwardProp:rs});function is({theme:e,...t}){let n=`$$material`in e?e[O]:void 0;return(0,R.jsx)($i,{...t,themeId:n?O:void 0,theme:n||e})}var as={attribute:`data-mui-color-scheme`,colorSchemeStorageKey:`mui-color-scheme`,defaultLightColorScheme:`light`,defaultDarkColorScheme:`dark`,modeStorageKey:`mui-mode`},{CssVarsProvider:os,useColorScheme:ss,getInitColorSchemeScript:cs}=ma({themeId:O,theme:()=>$o({cssVariables:!0}),colorSchemeStorageKey:as.colorSchemeStorageKey,modeStorageKey:as.modeStorageKey,defaultColorScheme:{light:as.defaultLightColorScheme,dark:as.defaultDarkColorScheme},resolveTheme:e=>{let t={...e,typography:vo(e.palette,e.typography)};return t.unstable_sx=function(e){return Mr({sx:e,theme:this})},t}}),ls=os;function us({theme:e,...t}){let n=L.useMemo(()=>{if(typeof e==`function`)return e;let t=`$$material`in e?e[O]:e;return`colorSchemes`in t?null:`vars`in t?e:{...e,vars:null}},[e]);return n?(0,R.jsx)(is,{theme:n,...t}):(0,R.jsx)(ls,{theme:e,...t})}var U=Nn;function ds(...e){return e.reduce((e,t)=>t==null?e:function(...n){e.apply(this,n),t.apply(this,n)},()=>{})}var fs=ds;function ps(e){return(0,R.jsx)(Br,{...e,defaultTheme:es,themeId:O})}function ms(e){return function(t){return(0,R.jsx)(ps,{styles:typeof e==`function`?n=>e({theme:n,...t}):e})}}function hs(){return Hr}var gs=ta;function _s(e){return Gi(e)}function vs(e){return B(`MuiSvgIcon`,e)}Jr(`MuiSvgIcon`,[`root`,`colorPrimary`,`colorSecondary`,`colorAction`,`colorError`,`colorDisabled`,`fontSizeInherit`,`fontSizeSmall`,`fontSizeMedium`,`fontSizeLarge`]);var ys=e=>{let{color:t,fontSize:n,classes:r}=e;return Sa({root:[`root`,t!==`inherit`&&`color${U(t)}`,`fontSize${U(n)}`]},vs,r)},bs=H(`svg`,{name:`MuiSvgIcon`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color!==`inherit`&&t[`color${U(n.color)}`],t[`fontSize${U(n.fontSize)}`]]}})(gs(({theme:e})=>({userSelect:`none`,width:`1em`,height:`1em`,display:`inline-block`,flexShrink:0,transition:e.transitions?.create?.(`fill`,{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:`currentColor`}},{props:{fontSize:`inherit`},style:{fontSize:`inherit`}},{props:{fontSize:`small`},style:{fontSize:e.typography?.pxToRem?.(20)||`1.25rem`}},{props:{fontSize:`medium`},style:{fontSize:e.typography?.pxToRem?.(24)||`1.5rem`}},{props:{fontSize:`large`},style:{fontSize:e.typography?.pxToRem?.(35)||`2.1875rem`}},...Object.entries((e.vars??e).palette).filter(([,e])=>e&&e.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:`action`},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:`disabled`},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:`inherit`},style:{color:void 0}}]}))),xs=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiSvgIcon`}),{children:r,className:i,color:a=`inherit`,component:o=`svg`,fontSize:s=`medium`,htmlColor:c,inheritViewBox:l=!1,titleAccess:u,viewBox:d=`0 0 24 24`,...f}=n,p=L.isValidElement(r)&&r.type===`svg`,m={...n,color:a,component:o,fontSize:s,instanceFontSize:e.fontSize,inheritViewBox:l,viewBox:d,hasSvgAsChild:p},h={};return l||(h.viewBox=d),(0,R.jsxs)(bs,{as:o,className:z(ys(m).root,i),focusable:`false`,color:c,"aria-hidden":u?void 0:!0,role:u?`img`:void 0,ref:t,...h,...f,...p&&r.props,ownerState:m,children:[p?r.props.children:r,u?(0,R.jsx)(`title`,{children:u}):null]})});xs.muiName=`SvgIcon`;function Ss(e,t){function n(t,n){return(0,R.jsx)(xs,{"data-testid":void 0,ref:n,...t,children:e})}return n.muiName=xs.muiName,L.memo(L.forwardRef(n))}function Cs(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}return r.clear=()=>{clearTimeout(n)},r}var ws=Cs,Ts=Ca;function Es(e){return e&&e.ownerDocument||document}var Ds=Es;function Os(e){return Es(e).defaultView||window}var ks=Os;function As(e,t){typeof e==`function`?e(t):e&&(e.current=t)}var js=di,Ms=Yi;function Ns(e){let{controlled:t,default:n,name:r,state:i=`value`}=e,{current:a}=L.useRef(t!==void 0),[o,s]=L.useState(n);return[a?t:o,L.useCallback(e=>{a||s(e)},[])]}var Ps=Ns;function Fs(e){let t=L.useRef(e);return di(()=>{t.current=e}),L.useRef((...e)=>(0,t.current)(...e)).current}var Is=Fs;function Ls(...e){let t=L.useRef(void 0),n=L.useCallback(t=>{let n=e.map(e=>{if(e==null)return null;if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}});return()=>{n.forEach(e=>e?.())}},e);return L.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}var Rs=Ls;function zs(e,t){let n=e.charCodeAt(2);return e[0]===`o`&&e[1]===`n`&&n>=65&&n<=90&&typeof t==`function`}function Bs(e,t){if(!e)return t;function n(e,t){let n={};return Object.keys(t).forEach(r=>{zs(r,t[r])&&typeof e[r]==`function`&&(n[r]=(...n)=>{e[r](...n),t[r](...n)})}),n}if(typeof e==`function`||typeof t==`function`)return r=>{let i=typeof t==`function`?t(r):t,a=typeof e==`function`?e({...r,...i}):e,o=z(r?.className,i?.className,a?.className),s=n(a,i);return{...i,...a,...s,...!!o&&{className:o},...i?.style&&a?.style&&{style:{...i.style,...a.style}},...i?.sx&&a?.sx&&{sx:[...Array.isArray(i.sx)?i.sx:[i.sx],...Array.isArray(a.sx)?a.sx:[a.sx]]}}};let r=t,i=n(e,r),a=z(r?.className,e?.className);return{...t,...e,...i,...!!a&&{className:a},...r?.style&&e?.style&&{style:{...r.style,...e.style}},...r?.sx&&e?.sx&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}function Vs(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Hs(e,t){return Hs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Hs(e,t)}function Us(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Hs(e,t)}var Ws={disabled:!1},Gs=L.createContext(null),Ks=function(e){return e.scrollTop},qs=l(h()),Js=`unmounted`,Ys=`exited`,Xs=`entering`,Zs=`entered`,Qs=`exiting`,$s=function(e){Us(t,e);function t(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=Ys,r.appearStatus=Xs):o=Zs:o=t.unmountOnExit||t.mountOnEnter?Js:Ys,r.state={status:o},r.nextCallback=null,r}t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:Ys}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==`entering`&&n!==`entered`&&(t=Xs):(n===`entering`||n===`entered`)&&(t=Qs)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},n.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null)if(this.cancelNextCallback(),t===`entering`){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:qs.default.findDOMNode(this);n&&Ks(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:Js})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[qs.default.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;if(!e&&!n||Ws.disabled){this.safeSetState({status:Zs},function(){t.props.onEntered(a)});return}this.props.onEnter(a,o),this.safeSetState({status:Xs},function(){t.props.onEntering(a,o),t.onTransitionEnd(c,function(){t.safeSetState({status:Zs},function(){t.props.onEntered(a,o)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:qs.default.findDOMNode(this);if(!t||Ws.disabled){this.safeSetState({status:Ys},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:Qs},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:Ys},function(){e.props.onExited(r)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:qs.default.findDOMNode(this),r=e==null&&!this.props.addEndListener;if(!n||r){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}e!=null&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===`unmounted`)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=Vs(t,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return L.createElement(Gs.Provider,{value:null},typeof n==`function`?n(e,r):L.cloneElement(L.Children.only(n),r))},t}(L.Component);$s.contextType=Gs,$s.propTypes={};function ec(){}$s.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ec,onEntering:ec,onEntered:ec,onExit:ec,onExiting:ec,onExited:ec},$s.UNMOUNTED=Js,$s.EXITED=Ys,$s.ENTERING=Xs,$s.ENTERED=Zs,$s.EXITING=Qs;function tc(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function nc(e,t){var n=function(e){return t&&(0,L.isValidElement)(e)?t(e):e},r=Object.create(null);return e&&L.Children.map(e,function(e){return e}).forEach(function(e){r[e.key]=n(e)}),r}function rc(e,t){e||={},t||={};function n(n){return n in t?t[n]:e[n]}var r=Object.create(null),i=[];for(var a in e)a in t?i.length&&(r[a]=i,i=[]):i.push(a);var o,s={};for(var c in t){if(r[c])for(o=0;o<r[c].length;o++){var l=r[c][o];s[r[c][o]]=n(l)}s[c]=n(c)}for(o=0;o<i.length;o++)s[i[o]]=n(i[o]);return s}function ic(e,t,n){return n[t]==null?e.props[t]:n[t]}function ac(e,t){return nc(e.children,function(n){return(0,L.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:ic(n,`appear`,e),enter:ic(n,`enter`,e),exit:ic(n,`exit`,e)})})}function oc(e,t,n){var r=nc(e.children),i=rc(t,r);return Object.keys(i).forEach(function(a){var o=i[a];if((0,L.isValidElement)(o)){var s=a in t,c=a in r,l=t[a],u=(0,L.isValidElement)(l)&&!l.props.in;c&&(!s||u)?i[a]=(0,L.cloneElement)(o,{onExited:n.bind(null,o),in:!0,exit:ic(o,`exit`,e),enter:ic(o,`enter`,e)}):!c&&s&&!u?i[a]=(0,L.cloneElement)(o,{in:!1}):c&&s&&(0,L.isValidElement)(l)&&(i[a]=(0,L.cloneElement)(o,{onExited:n.bind(null,o),in:l.props.in,exit:ic(o,`exit`,e),enter:ic(o,`enter`,e)}))}}),i}var sc=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},cc={component:`div`,childFactory:function(e){return e}},lc=function(e){Us(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.state={contextValue:{isMounting:!0},handleExited:r.handleExited.bind(tc(r)),firstRender:!0},r}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?ac(e,r):oc(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=nc(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=k({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=Vs(e,[`component`,`childFactory`]),i=this.state.contextValue,a=sc(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,t===null?L.createElement(Gs.Provider,{value:i},a):L.createElement(Gs.Provider,{value:i},L.createElement(t,r,a))},t}(L.Component);lc.propTypes={},lc.defaultProps=cc;var uc={};function dc(e,t){let n=L.useRef(uc);return n.current===uc&&(n.current=e(t)),n}var fc=[];function pc(e){L.useEffect(e,fc)}var mc=class e{static create(){return new e}currentId=null;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear};function hc(){let e=dc(mc.create).current;return pc(e.disposeEffect),e}var gc=e=>e.scrollTop;function _c(e,t){let{timeout:n,easing:r,style:i={}}=e;return{duration:i.transitionDuration??(typeof n==`number`?n:n[t.mode]||0),easing:i.transitionTimingFunction??(typeof r==`object`?r[t.mode]:r),delay:i.transitionDelay}}function vc(e){return typeof e==`string`}function yc(e,t,n){return e===void 0||vc(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function bc(e,t,n){return typeof e==`function`?e(t,n):e}function xc(e,t=[]){if(e===void 0)return{};let n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]==`function`&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n}function Sc(e){if(e===void 0)return{};let t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&typeof e[t]==`function`)).forEach(n=>{t[n]=e[n]}),t}function Cc(e){let{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:a}=e;if(!t){let e=z(n?.className,a,i?.className,r?.className),t={...n?.style,...i?.style,...r?.style},o={...n,...i,...r};return e.length>0&&(o.className=e),Object.keys(t).length>0&&(o.style=t),{props:o,internalRef:void 0}}let o=xc({...i,...r}),s=Sc(r),c=Sc(i),l=t(o),u=z(l?.className,n?.className,a,i?.className,r?.className),d={...l?.style,...n?.style,...i?.style,...r?.style},f={...l,...n,...c,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:l.ref}}function wc(e,t){let{className:n,elementType:r,ownerState:i,externalForwardedProps:a,internalForwardedProps:o,shouldForwardComponentProp:s=!1,...c}=t,{component:l,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...f}=a,p=u[e]||r,m=bc(d[e],i),{props:{component:h,...g},internalRef:_}=Cc({className:n,...c,externalForwardedProps:e===`root`?f:void 0,externalSlotProps:m}),v=Ls(_,m?.ref,t.ref),y=e===`root`?h||l:h;return[p,yc(p,{...e===`root`&&!l&&!u[e]&&o,...e!==`root`&&!u[e]&&o,...g,...y&&!s&&{as:y},...y&&s&&{component:y},ref:v},i)]}function Tc(e){return B(`MuiCollapse`,e)}Jr(`MuiCollapse`,[`root`,`horizontal`,`vertical`,`entered`,`hidden`,`wrapper`,`wrapperInner`]);var Ec=e=>{let{orientation:t,classes:n}=e;return Sa({root:[`root`,t],entered:[`entered`],hidden:[`hidden`],wrapper:[`wrapper`,t],wrapperInner:[`wrapperInner`,t]},Tc,n)},Dc=H(`div`,{name:`MuiCollapse`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation],n.state===`entered`&&t.entered,n.state===`exited`&&!n.in&&n.collapsedSize===`0px`&&t.hidden]}})(gs(({theme:e})=>({height:0,overflow:`hidden`,transition:e.transitions.create(`height`),variants:[{props:{orientation:`horizontal`},style:{height:`auto`,width:0,transition:e.transitions.create(`width`)}},{props:{state:`entered`},style:{height:`auto`,overflow:`visible`}},{props:{state:`entered`,orientation:`horizontal`},style:{width:`auto`}},{props:({ownerState:e})=>e.state===`exited`&&!e.in&&e.collapsedSize===`0px`,style:{visibility:`hidden`}}]}))),Oc=H(`div`,{name:`MuiCollapse`,slot:`Wrapper`})({display:`flex`,width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),kc=H(`div`,{name:`MuiCollapse`,slot:`WrapperInner`})({width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),Ac=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiCollapse`}),{addEndListener:r,children:i,className:a,collapsedSize:o=`0px`,component:s,easing:c,in:l,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:m,onExiting:h,orientation:g=`vertical`,slots:_={},slotProps:v={},style:y,timeout:b=To.standard,TransitionComponent:x=$s,...S}=n,C={...n,orientation:g,collapsedSize:o},w=Ec(C),T=ts(),E=hc(),D=L.useRef(null),O=L.useRef(),k=typeof o==`number`?`${o}px`:o,ee=g===`horizontal`,A=ee?`width`:`height`,j=L.useRef(null),te=Rs(t,j),M=e=>t=>{if(e){let n=j.current;t===void 0?e(n):e(n,t)}},ne=()=>D.current?D.current[ee?`clientWidth`:`clientHeight`]:0,N=M((e,t)=>{D.current&&ee&&(D.current.style.position=`absolute`),e.style[A]=k,u&&u(e,t)}),P=M((e,t)=>{let n=ne();D.current&&ee&&(D.current.style.position=``);let{duration:r,easing:i}=_c({style:y,timeout:b,easing:c},{mode:`enter`});if(b===`auto`){let t=T.transitions.getAutoHeightDuration(n);e.style.transitionDuration=`${t}ms`,O.current=t}else e.style.transitionDuration=typeof r==`string`?r:`${r}ms`;e.style[A]=`${n}px`,e.style.transitionTimingFunction=i,f&&f(e,t)}),re=M((e,t)=>{e.style[A]=`auto`,d&&d(e,t)}),ie=M(e=>{e.style[A]=`${ne()}px`,p&&p(e)}),ae=M(m),oe=M(e=>{let t=ne(),{duration:n,easing:r}=_c({style:y,timeout:b,easing:c},{mode:`exit`});if(b===`auto`){let n=T.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${n}ms`,O.current=n}else e.style.transitionDuration=typeof n==`string`?n:`${n}ms`;e.style[A]=k,e.style.transitionTimingFunction=r,h&&h(e)}),se=e=>{b===`auto`&&E.start(O.current||0,e),r&&r(j.current,e)},ce={slots:_,slotProps:v,component:s},[le,ue]=wc(`root`,{ref:te,className:z(w.root,a),elementType:Dc,externalForwardedProps:ce,ownerState:C,additionalProps:{style:{[ee?`minWidth`:`minHeight`]:k,...y}}}),[de,F]=wc(`wrapper`,{ref:D,className:w.wrapper,elementType:Oc,externalForwardedProps:ce,ownerState:C}),[fe,pe]=wc(`wrapperInner`,{className:w.wrapperInner,elementType:kc,externalForwardedProps:ce,ownerState:C});return(0,R.jsx)(x,{in:l,onEnter:N,onEntered:re,onEntering:P,onExit:ie,onExited:ae,onExiting:oe,addEndListener:se,nodeRef:j,timeout:b===`auto`?null:b,...S,children:(e,{ownerState:t,...n})=>{let r={...C,state:e};return(0,R.jsx)(le,{...ue,className:z(ue.className,{entered:w.entered,exited:!l&&k===`0px`&&w.hidden}[e]),ownerState:r,...n,children:(0,R.jsx)(de,{...F,ownerState:r,children:(0,R.jsx)(fe,{...pe,ownerState:r,children:i})})})}})});Ac&&(Ac.muiSupportAuto=!0);function jc(e){return B(`MuiPaper`,e)}Jr(`MuiPaper`,`root.rounded.outlined.elevation.elevation0.elevation1.elevation2.elevation3.elevation4.elevation5.elevation6.elevation7.elevation8.elevation9.elevation10.elevation11.elevation12.elevation13.elevation14.elevation15.elevation16.elevation17.elevation18.elevation19.elevation20.elevation21.elevation22.elevation23.elevation24`.split(`.`));var Mc=e=>{let{square:t,elevation:n,variant:r,classes:i}=e;return Sa({root:[`root`,r,!t&&`rounded`,r===`elevation`&&`elevation${n}`]},jc,i)},Nc=H(`div`,{name:`MuiPaper`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant===`elevation`&&t[`elevation${n.elevation}`]]}})(gs(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create(`box-shadow`),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:`outlined`},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:`elevation`},style:{boxShadow:`var(--Paper-shadow)`,backgroundImage:`var(--Paper-overlay)`}}]}))),Pc=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiPaper`}),r=ts(),{className:i,component:a=`div`,elevation:o=1,square:s=!1,variant:c=`elevation`,...l}=n,u={...n,component:a,elevation:o,square:s,variant:c};return(0,R.jsx)(Nc,{as:a,ownerState:u,className:z(Mc(u).root,i),ref:t,...l,style:{...c===`elevation`&&{"--Paper-shadow":(r.vars||r).shadows[o],...r.vars&&{"--Paper-overlay":r.vars.overlays?.[o]},...!r.vars&&r.palette.mode===`dark`&&{"--Paper-overlay":`linear-gradient(${Ei(`#fff`,Io(o))}, ${Ei(`#fff`,Io(o))})`}},...l.style}})}),Fc=L.createContext({});function Ic(e){return B(`MuiAccordion`,e)}var Lc=Jr(`MuiAccordion`,[`root`,`heading`,`rounded`,`expanded`,`disabled`,`gutters`,`region`]),Rc=e=>{let{classes:t,square:n,expanded:r,disabled:i,disableGutters:a}=e;return Sa({root:[`root`,!n&&`rounded`,r&&`expanded`,i&&`disabled`,!a&&`gutters`],heading:[`heading`],region:[`region`]},Ic,t)},zc=H(Pc,{name:`MuiAccordion`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${Lc.region}`]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})(gs(({theme:e})=>{let t={duration:e.transitions.duration.shortest};return{position:`relative`,transition:e.transitions.create([`margin`],t),overflowAnchor:`none`,"&::before":{position:`absolute`,left:0,top:-1,right:0,height:1,content:`""`,opacity:1,backgroundColor:(e.vars||e).palette.divider,transition:e.transitions.create([`opacity`,`background-color`],t)},"&:first-of-type":{"&::before":{display:`none`}},[`&.${Lc.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:`none`}}},[`&.${Lc.disabled}`]:{backgroundColor:(e.vars||e).palette.action.disabledBackground}}}),gs(({theme:e})=>({variants:[{props:e=>!e.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(e.vars||e).shape.borderRadius,borderBottomRightRadius:(e.vars||e).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:e=>!e.disableGutters,style:{[`&.${Lc.expanded}`]:{margin:`16px 0`}}}]}))),Bc=H(`h3`,{name:`MuiAccordion`,slot:`Heading`})({all:`unset`}),Vc=H(`div`,{name:`MuiAccordion`,slot:`Region`})({}),Hc=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiAccordion`}),{children:r,className:i,defaultExpanded:a=!1,disabled:o=!1,disableGutters:s=!1,expanded:c,onChange:l,slots:u={},slotProps:d={},TransitionComponent:f,TransitionProps:p,...m}=n,[h,g]=Ps({controlled:c,default:a,name:`Accordion`,state:`expanded`}),_=L.useCallback(e=>{g(!h),l&&l(e,!h)},[h,l,g]),[v,...y]=L.Children.toArray(r),b=L.useMemo(()=>({expanded:h,disabled:o,disableGutters:s,toggle:_}),[h,o,s,_]),x={...n,disabled:o,disableGutters:s,expanded:h},S=Rc(x),C={slots:{transition:f,...u},slotProps:{transition:p,...d}},[w,T]=wc(`root`,{elementType:zc,externalForwardedProps:{...C,...m},className:z(S.root,i),shouldForwardComponentProp:!0,ownerState:x,ref:t}),[E,D]=wc(`heading`,{elementType:Bc,externalForwardedProps:C,className:S.heading,ownerState:x}),[O,k]=wc(`transition`,{elementType:Ac,externalForwardedProps:C,ownerState:x}),[ee,A]=wc(`region`,{elementType:Vc,externalForwardedProps:C,ownerState:x,className:S.region,additionalProps:{"aria-labelledby":v.props.id,id:v.props[`aria-controls`],role:`region`}});return(0,R.jsxs)(w,{...T,children:[(0,R.jsx)(E,{...D,children:(0,R.jsx)(Fc.Provider,{value:b,children:v})}),(0,R.jsx)(O,{in:h,timeout:`auto`,...k,children:(0,R.jsx)(ee,{...A,children:y})})]})});function Uc(e){return B(`MuiAccordionDetails`,e)}Jr(`MuiAccordionDetails`,[`root`]);var Wc=e=>{let{classes:t}=e;return Sa({root:[`root`]},Uc,t)},Gc=H(`div`,{name:`MuiAccordionDetails`,slot:`Root`})(gs(({theme:e})=>({padding:e.spacing(1,2,2)}))),Kc=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiAccordionDetails`}),{className:r,...i}=n,a=n;return(0,R.jsx)(Gc,{className:z(Wc(a).root,r),ref:t,ownerState:a,...i})});function qc(e){try{return e.matches(`:focus-visible`)}catch{}return!1}var Jc=class e{static create(){return new e}static use(){let t=dc(e.create).current,[n,r]=L.useState(!1);return t.shouldMount=n,t.setShouldMount=r,L.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=Xc(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}};function Yc(){return Jc.use()}function Xc(){let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n}function Zc(e){let{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:a,rippleSize:o,in:s,onExited:c,timeout:l}=e,[u,d]=L.useState(!1),f=z(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:o,height:o,top:-(o/2)+a,left:-(o/2)+i},m=z(n.child,u&&n.childLeaving,r&&n.childPulsate);return!s&&!u&&d(!0),L.useEffect(()=>{if(!s&&c!=null){let e=setTimeout(c,l);return()=>{clearTimeout(e)}}},[c,s,l]),(0,R.jsx)(`span`,{className:f,style:p,children:(0,R.jsx)(`span`,{className:m})})}var Qc=Jr(`MuiTouchRipple`,[`root`,`ripple`,`rippleVisible`,`ripplePulsate`,`child`,`childLeaving`,`childPulsate`]),$c=550,el=Gt`
|
|
46
|
+
0% {
|
|
47
|
+
transform: scale(0);
|
|
48
|
+
opacity: 0.1;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
100% {
|
|
52
|
+
transform: scale(1);
|
|
53
|
+
opacity: 0.3;
|
|
54
|
+
}
|
|
55
|
+
`,tl=Gt`
|
|
56
|
+
0% {
|
|
57
|
+
opacity: 1;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
100% {
|
|
61
|
+
opacity: 0;
|
|
62
|
+
}
|
|
63
|
+
`,nl=Gt`
|
|
64
|
+
0% {
|
|
65
|
+
transform: scale(1);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
50% {
|
|
69
|
+
transform: scale(0.92);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
100% {
|
|
73
|
+
transform: scale(1);
|
|
74
|
+
}
|
|
75
|
+
`,rl=H(`span`,{name:`MuiTouchRipple`,slot:`Root`})({overflow:`hidden`,pointerEvents:`none`,position:`absolute`,zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:`inherit`}),il=H(Zc,{name:`MuiTouchRipple`,slot:`Ripple`})`
|
|
76
|
+
opacity: 0;
|
|
77
|
+
position: absolute;
|
|
78
|
+
|
|
79
|
+
&.${Qc.rippleVisible} {
|
|
80
|
+
opacity: 0.3;
|
|
81
|
+
transform: scale(1);
|
|
82
|
+
animation-name: ${el};
|
|
83
|
+
animation-duration: ${$c}ms;
|
|
84
|
+
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&.${Qc.ripplePulsate} {
|
|
88
|
+
animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
& .${Qc.child} {
|
|
92
|
+
opacity: 1;
|
|
93
|
+
display: block;
|
|
94
|
+
width: 100%;
|
|
95
|
+
height: 100%;
|
|
96
|
+
border-radius: 50%;
|
|
97
|
+
background-color: currentColor;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
& .${Qc.childLeaving} {
|
|
101
|
+
opacity: 0;
|
|
102
|
+
animation-name: ${tl};
|
|
103
|
+
animation-duration: ${$c}ms;
|
|
104
|
+
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
& .${Qc.childPulsate} {
|
|
108
|
+
position: absolute;
|
|
109
|
+
/* @noflip */
|
|
110
|
+
left: 0px;
|
|
111
|
+
top: 0;
|
|
112
|
+
animation-name: ${nl};
|
|
113
|
+
animation-duration: 2500ms;
|
|
114
|
+
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
115
|
+
animation-iteration-count: infinite;
|
|
116
|
+
animation-delay: 200ms;
|
|
117
|
+
}
|
|
118
|
+
`,al=L.forwardRef(function(e,t){let{center:n=!1,classes:r={},className:i,...a}=_s({props:e,name:`MuiTouchRipple`}),[o,s]=L.useState([]),c=L.useRef(0),l=L.useRef(null);L.useEffect(()=>{l.current&&=(l.current(),null)},[o]);let u=L.useRef(!1),d=hc(),f=L.useRef(null),p=L.useRef(null),m=L.useCallback(e=>{let{pulsate:t,rippleX:n,rippleY:i,rippleSize:a,cb:o}=e;s(e=>[...e,(0,R.jsx)(il,{classes:{ripple:z(r.ripple,Qc.ripple),rippleVisible:z(r.rippleVisible,Qc.rippleVisible),ripplePulsate:z(r.ripplePulsate,Qc.ripplePulsate),child:z(r.child,Qc.child),childLeaving:z(r.childLeaving,Qc.childLeaving),childPulsate:z(r.childPulsate,Qc.childPulsate)},timeout:$c,pulsate:t,rippleX:n,rippleY:i,rippleSize:a},c.current)]),c.current+=1,l.current=o},[r]),h=L.useCallback((e={},t={},r=()=>{})=>{let{pulsate:i=!1,center:a=n||t.pulsate,fakeElement:o=!1}=t;if(e?.type===`mousedown`&&u.current){u.current=!1;return}e?.type===`touchstart`&&(u.current=!0);let s=o?null:p.current,c=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0},l,h,g;if(a||e===void 0||e.clientX===0&&e.clientY===0||!e.clientX&&!e.touches)l=Math.round(c.width/2),h=Math.round(c.height/2);else{let{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;l=Math.round(t-c.left),h=Math.round(n-c.top)}if(a)g=Math.sqrt((2*c.width**2+c.height**2)/3),g%2==0&&(g+=1);else{let e=Math.max(Math.abs((s?s.clientWidth:0)-l),l)*2+2,t=Math.max(Math.abs((s?s.clientHeight:0)-h),h)*2+2;g=Math.sqrt(e**2+t**2)}e?.touches?f.current===null&&(f.current=()=>{m({pulsate:i,rippleX:l,rippleY:h,rippleSize:g,cb:r})},d.start(80,()=>{f.current&&=(f.current(),null)})):m({pulsate:i,rippleX:l,rippleY:h,rippleSize:g,cb:r})},[n,m,d]),g=L.useCallback(()=>{h({},{pulsate:!0})},[h]),_=L.useCallback((e,t)=>{if(d.clear(),e?.type===`touchend`&&f.current){f.current(),f.current=null,d.start(0,()=>{_(e,t)});return}f.current=null,s(e=>e.length>0?e.slice(1):e),l.current=t},[d]);return L.useImperativeHandle(t,()=>({pulsate:g,start:h,stop:_}),[g,h,_]),(0,R.jsx)(rl,{className:z(Qc.root,r.root,i),ref:p,...a,children:(0,R.jsx)(lc,{component:null,exit:!0,children:o})})});function ol(e){return B(`MuiButtonBase`,e)}var sl=Jr(`MuiButtonBase`,[`root`,`disabled`,`focusVisible`]),cl=e=>{let{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,a=Sa({root:[`root`,t&&`disabled`,n&&`focusVisible`]},ol,i);return n&&r&&(a.root+=` ${r}`),a},ll=H(`button`,{name:`MuiButtonBase`,slot:`Root`})({display:`inline-flex`,alignItems:`center`,justifyContent:`center`,position:`relative`,boxSizing:`border-box`,WebkitTapHighlightColor:`transparent`,backgroundColor:`transparent`,outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:`pointer`,userSelect:`none`,verticalAlign:`middle`,MozAppearance:`none`,WebkitAppearance:`none`,textDecoration:`none`,color:`inherit`,"&::-moz-focus-inner":{borderStyle:`none`},[`&.${sl.disabled}`]:{pointerEvents:`none`,cursor:`default`},"@media print":{colorAdjust:`exact`}}),ul=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiButtonBase`}),{action:r,centerRipple:i=!1,children:a,className:o,component:s=`button`,disabled:c=!1,disableRipple:l=!1,disableTouchRipple:u=!1,focusRipple:d=!1,focusVisibleClassName:f,LinkComponent:p=`a`,onBlur:m,onClick:h,onContextMenu:g,onDragLeave:_,onFocus:v,onFocusVisible:y,onKeyDown:b,onKeyUp:x,onMouseDown:S,onMouseLeave:C,onMouseUp:w,onTouchEnd:T,onTouchMove:E,onTouchStart:D,tabIndex:O=0,TouchRippleProps:k,touchRippleRef:ee,type:A,...j}=n,te=L.useRef(null),M=Yc(),ne=Rs(M.ref,ee),[N,P]=L.useState(!1);c&&N&&P(!1),L.useImperativeHandle(r,()=>({focusVisible:()=>{P(!0),te.current.focus()}}),[]);let re=M.shouldMount&&!l&&!c;L.useEffect(()=>{N&&d&&!l&&M.pulsate()},[l,d,N,M]);let ie=dl(M,`start`,S,u),ae=dl(M,`stop`,g,u),oe=dl(M,`stop`,_,u),se=dl(M,`stop`,w,u),ce=dl(M,`stop`,e=>{N&&e.preventDefault(),C&&C(e)},u),le=dl(M,`start`,D,u),ue=dl(M,`stop`,T,u),de=dl(M,`stop`,E,u),F=dl(M,`stop`,e=>{qc(e.target)||P(!1),m&&m(e)},!1),fe=Is(e=>{te.current||=e.currentTarget,qc(e.target)&&(P(!0),y&&y(e)),v&&v(e)}),pe=()=>{let e=te.current;return s&&s!==`button`&&!(e.tagName===`A`&&e.href)},me=Is(e=>{d&&!e.repeat&&N&&e.key===` `&&M.stop(e,()=>{M.start(e)}),e.target===e.currentTarget&&pe()&&e.key===` `&&e.preventDefault(),b&&b(e),e.target===e.currentTarget&&pe()&&e.key===`Enter`&&!c&&(e.preventDefault(),h&&h(e))}),he=Is(e=>{d&&e.key===` `&&N&&!e.defaultPrevented&&M.stop(e,()=>{M.pulsate(e)}),x&&x(e),h&&e.target===e.currentTarget&&pe()&&e.key===` `&&!e.defaultPrevented&&h(e)}),ge=s;ge===`button`&&(j.href||j.to)&&(ge=p);let _e={};if(ge===`button`){let e=!!j.formAction;_e.type=A===void 0&&!e?`button`:A,_e.disabled=c}else !j.href&&!j.to&&(_e.role=`button`),c&&(_e[`aria-disabled`]=c);let I=Rs(t,te),ve={...n,centerRipple:i,component:s,disabled:c,disableRipple:l,disableTouchRipple:u,focusRipple:d,tabIndex:O,focusVisible:N},ye=cl(ve);return(0,R.jsxs)(ll,{as:ge,className:z(ye.root,o),ownerState:ve,onBlur:F,onClick:h,onContextMenu:ae,onFocus:fe,onKeyDown:me,onKeyUp:he,onMouseDown:ie,onMouseLeave:ce,onMouseUp:se,onDragLeave:oe,onTouchEnd:ue,onTouchMove:de,onTouchStart:le,ref:I,tabIndex:c?-1:O,type:A,..._e,...j,children:[a,re?(0,R.jsx)(al,{ref:ne,center:i,...k}):null]})});function dl(e,t,n,r=!1){return Is(i=>(n&&n(i),r||e[t](i),!0))}function fl(e){return B(`MuiAccordionSummary`,e)}var pl=Jr(`MuiAccordionSummary`,[`root`,`expanded`,`focusVisible`,`disabled`,`gutters`,`contentGutters`,`content`,`expandIconWrapper`]),ml=e=>{let{classes:t,expanded:n,disabled:r,disableGutters:i}=e;return Sa({root:[`root`,n&&`expanded`,r&&`disabled`,!i&&`gutters`],focusVisible:[`focusVisible`],content:[`content`,n&&`expanded`,!i&&`contentGutters`],expandIconWrapper:[`expandIconWrapper`,n&&`expanded`]},fl,t)},hl=H(ul,{name:`MuiAccordionSummary`,slot:`Root`})(gs(({theme:e})=>{let t={duration:e.transitions.duration.shortest};return{display:`flex`,width:`100%`,minHeight:48,padding:e.spacing(0,2),transition:e.transitions.create([`min-height`,`background-color`],t),[`&.${pl.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${pl.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${pl.disabled})`]:{cursor:`pointer`},variants:[{props:e=>!e.disableGutters,style:{[`&.${pl.expanded}`]:{minHeight:64}}}]}})),gl=H(`span`,{name:`MuiAccordionSummary`,slot:`Content`})(gs(({theme:e})=>({display:`flex`,textAlign:`start`,flexGrow:1,margin:`12px 0`,variants:[{props:e=>!e.disableGutters,style:{transition:e.transitions.create([`margin`],{duration:e.transitions.duration.shortest}),[`&.${pl.expanded}`]:{margin:`20px 0`}}}]}))),_l=H(`span`,{name:`MuiAccordionSummary`,slot:`ExpandIconWrapper`})(gs(({theme:e})=>({display:`flex`,color:(e.vars||e).palette.action.active,transform:`rotate(0deg)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shortest}),[`&.${pl.expanded}`]:{transform:`rotate(180deg)`}}))),vl=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiAccordionSummary`}),{children:r,className:i,expandIcon:a,focusVisibleClassName:o,onClick:s,slots:c,slotProps:l,...u}=n,{disabled:d=!1,disableGutters:f,expanded:p,toggle:m}=L.useContext(Fc),h=e=>{m&&m(e),s&&s(e)},g={...n,expanded:p,disabled:d,disableGutters:f},_=ml(g),v={slots:c,slotProps:l},[y,b]=wc(`root`,{ref:t,shouldForwardComponentProp:!0,className:z(_.root,i),elementType:hl,externalForwardedProps:{...v,...u},ownerState:g,additionalProps:{focusRipple:!1,disableRipple:!0,disabled:d,"aria-expanded":p,focusVisibleClassName:z(_.focusVisible,o)},getSlotProps:e=>({...e,onClick:t=>{e.onClick?.(t),h(t)}})}),[x,S]=wc(`content`,{className:_.content,elementType:gl,externalForwardedProps:v,ownerState:g}),[C,w]=wc(`expandIconWrapper`,{className:_.expandIconWrapper,elementType:_l,externalForwardedProps:v,ownerState:g});return(0,R.jsxs)(y,{...b,children:[(0,R.jsx)(x,{...S,children:r}),a&&(0,R.jsx)(C,{...w,children:a})]})});function yl(e){return typeof e.main==`string`}function bl(e,t=[]){if(!yl(e))return!1;for(let n of t)if(!e.hasOwnProperty(n)||typeof e[n]!=`string`)return!1;return!0}function xl(e=[]){return([,t])=>t&&bl(t,e)}function Sl(e){return B(`MuiCircularProgress`,e)}Jr(`MuiCircularProgress`,[`root`,`determinate`,`indeterminate`,`colorPrimary`,`colorSecondary`,`svg`,`track`,`circle`,`circleDeterminate`,`circleIndeterminate`,`circleDisableShrink`]);var Cl=44,wl=Gt`
|
|
119
|
+
0% {
|
|
120
|
+
transform: rotate(0deg);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
100% {
|
|
124
|
+
transform: rotate(360deg);
|
|
125
|
+
}
|
|
126
|
+
`,Tl=Gt`
|
|
127
|
+
0% {
|
|
128
|
+
stroke-dasharray: 1px, 200px;
|
|
129
|
+
stroke-dashoffset: 0;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
50% {
|
|
133
|
+
stroke-dasharray: 100px, 200px;
|
|
134
|
+
stroke-dashoffset: -15px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
100% {
|
|
138
|
+
stroke-dasharray: 1px, 200px;
|
|
139
|
+
stroke-dashoffset: -126px;
|
|
140
|
+
}
|
|
141
|
+
`,El=typeof wl==`string`?null:Wt`
|
|
142
|
+
animation: ${wl} 1.4s linear infinite;
|
|
143
|
+
`,Dl=typeof Tl==`string`?null:Wt`
|
|
144
|
+
animation: ${Tl} 1.4s ease-in-out infinite;
|
|
145
|
+
`,Ol=e=>{let{classes:t,variant:n,color:r,disableShrink:i}=e;return Sa({root:[`root`,n,`color${U(r)}`],svg:[`svg`],track:[`track`],circle:[`circle`,`circle${U(n)}`,i&&`circleDisableShrink`]},Sl,t)},kl=H(`span`,{name:`MuiCircularProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`color${U(n.color)}`]]}})(gs(({theme:e})=>({display:`inline-block`,variants:[{props:{variant:`determinate`},style:{transition:e.transitions.create(`transform`)}},{props:{variant:`indeterminate`},style:El||{animation:`${wl} 1.4s linear infinite`}},...Object.entries(e.palette).filter(xl()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),Al=H(`svg`,{name:`MuiCircularProgress`,slot:`Svg`})({display:`block`}),jl=H(`circle`,{name:`MuiCircularProgress`,slot:`Circle`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.circle,t[`circle${U(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(gs(({theme:e})=>({stroke:`currentColor`,variants:[{props:{variant:`determinate`},style:{transition:e.transitions.create(`stroke-dashoffset`)}},{props:{variant:`indeterminate`},style:{strokeDasharray:`80px, 200px`,strokeDashoffset:0}},{props:({ownerState:e})=>e.variant===`indeterminate`&&!e.disableShrink,style:Dl||{animation:`${Tl} 1.4s ease-in-out infinite`}}]}))),Ml=H(`circle`,{name:`MuiCircularProgress`,slot:`Track`})(gs(({theme:e})=>({stroke:`currentColor`,opacity:(e.vars||e).palette.action.activatedOpacity}))),Nl=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiCircularProgress`}),{className:r,color:i=`primary`,disableShrink:a=!1,enableTrackSlot:o=!1,size:s=40,style:c,thickness:l=3.6,value:u=0,variant:d=`indeterminate`,...f}=n,p={...n,color:i,disableShrink:a,size:s,thickness:l,value:u,variant:d,enableTrackSlot:o},m=Ol(p),h={},g={},_={};if(d===`determinate`){let e=2*Math.PI*((Cl-l)/2);h.strokeDasharray=e.toFixed(3),_[`aria-valuenow`]=Math.round(u),h.strokeDashoffset=`${((100-u)/100*e).toFixed(3)}px`,g.transform=`rotate(-90deg)`}return(0,R.jsx)(kl,{className:z(m.root,r),style:{width:s,height:s,...g,...c},ownerState:p,ref:t,role:`progressbar`,..._,...f,children:(0,R.jsxs)(Al,{className:m.svg,ownerState:p,viewBox:`${Cl/2} ${Cl/2} ${Cl} ${Cl}`,children:[o?(0,R.jsx)(Ml,{className:m.track,ownerState:p,cx:Cl,cy:Cl,r:(Cl-l)/2,fill:`none`,strokeWidth:l,"aria-hidden":`true`}):null,(0,R.jsx)(jl,{className:m.circle,style:h,ownerState:p,cx:Cl,cy:Cl,r:(Cl-l)/2,fill:`none`,strokeWidth:l})]})})});function Pl(e){return B(`MuiIconButton`,e)}var Fl=Jr(`MuiIconButton`,[`root`,`disabled`,`colorInherit`,`colorPrimary`,`colorSecondary`,`colorError`,`colorInfo`,`colorSuccess`,`colorWarning`,`edgeStart`,`edgeEnd`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`loading`,`loadingIndicator`,`loadingWrapper`]),Il=e=>{let{classes:t,disabled:n,color:r,edge:i,size:a,loading:o}=e;return Sa({root:[`root`,o&&`loading`,n&&`disabled`,r!==`default`&&`color${U(r)}`,i&&`edge${U(i)}`,`size${U(a)}`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},Pl,t)},Ll=H(ul,{name:`MuiIconButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!==`default`&&t[`color${U(n.color)}`],n.edge&&t[`edge${U(n.edge)}`],t[`size${U(n.size)}`]]}})(gs(({theme:e})=>({textAlign:`center`,flex:`0 0 auto`,fontSize:e.typography.pxToRem(24),padding:8,borderRadius:`50%`,color:(e.vars||e).palette.action.active,transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:`var(--IconButton-hoverBg)`,"@media (hover: none)":{backgroundColor:`transparent`}}}},{props:{edge:`start`},style:{marginLeft:-12}},{props:{edge:`start`,size:`small`},style:{marginLeft:-3}},{props:{edge:`end`},style:{marginRight:-12}},{props:{edge:`end`,size:`small`},style:{marginRight:-3}}]})),gs(({theme:e})=>({variants:[{props:{color:`inherit`},style:{color:`inherit`}},...Object.entries(e.palette).filter(xl()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(xl()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:`small`},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:`large`},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${Fl.disabled}`]:{backgroundColor:`transparent`,color:(e.vars||e).palette.action.disabled},[`&.${Fl.loading}`]:{color:`transparent`}}))),Rl=H(`span`,{name:`MuiIconButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:`flex`}}]})),zl=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiIconButton`}),{edge:r=!1,children:i,className:a,color:o=`default`,disabled:s=!1,disableFocusRipple:c=!1,size:l=`medium`,id:u,loading:d=null,loadingIndicator:f,...p}=n,m=Ms(u),h=f??(0,R.jsx)(Nl,{"aria-labelledby":m,color:`inherit`,size:16}),g={...n,edge:r,color:o,disabled:s,disableFocusRipple:c,loading:d,loadingIndicator:h,size:l},_=Il(g);return(0,R.jsxs)(Ll,{id:d?m:u,className:z(_.root,a),centerRipple:!0,focusRipple:!c,disabled:s||d,ref:t,...p,ownerState:g,children:[typeof d==`boolean`&&(0,R.jsx)(`span`,{className:_.loadingWrapper,style:{display:`contents`},children:(0,R.jsx)(Rl,{className:_.loadingIndicator,ownerState:g,children:d&&h})}),i]})}),Bl=Ss((0,R.jsx)(`path`,{d:`M19 6.41L17.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`}),`Close`);function Vl(e){return B(`MuiTypography`,e)}var Hl=Jr(`MuiTypography`,[`root`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`subtitle1`,`subtitle2`,`body1`,`body2`,`inherit`,`button`,`caption`,`overline`,`alignLeft`,`alignRight`,`alignCenter`,`alignJustify`,`noWrap`,`gutterBottom`,`paragraph`]),Ul={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Wl=hs(),Gl=e=>{let{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:a,classes:o}=e;return Sa({root:[`root`,a,e.align!==`inherit`&&`align${U(t)}`,n&&`gutterBottom`,r&&`noWrap`,i&&`paragraph`]},Vl,o)},Kl=H(`span`,{name:`MuiTypography`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!==`inherit`&&t[`align${U(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(gs(({theme:e})=>({margin:0,variants:[{props:{variant:`inherit`},style:{font:`inherit`,lineHeight:`inherit`,letterSpacing:`inherit`}},...Object.entries(e.typography).filter(([e,t])=>e!==`inherit`&&t&&typeof t==`object`).map(([e,t])=>({props:{variant:e},style:t})),...Object.entries(e.palette).filter(xl()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,e])=>typeof e==`string`).map(([t])=>({props:{color:`text${U(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:e})=>e.align!==`inherit`,style:{textAlign:`var(--Typography-textAlign)`}},{props:({ownerState:e})=>e.noWrap,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:`0.35em`}},{props:({ownerState:e})=>e.paragraph,style:{marginBottom:16}}]}))),ql={h1:`h1`,h2:`h2`,h3:`h3`,h4:`h4`,h5:`h5`,h6:`h6`,subtitle1:`h6`,subtitle2:`h6`,body1:`p`,body2:`p`,inherit:`p`},W=L.forwardRef(function(e,t){let{color:n,...r}=_s({props:e,name:`MuiTypography`}),i=!Ul[n],a=Wl({...r,...i&&{color:n}}),{align:o=`inherit`,className:s,component:c,gutterBottom:l=!1,noWrap:u=!1,paragraph:d=!1,variant:f=`body1`,variantMapping:p=ql,...m}=a,h={...a,align:o,color:n,className:s,component:c,gutterBottom:l,noWrap:u,paragraph:d,variant:f,variantMapping:p};return(0,R.jsx)(Kl,{as:c||(d?`p`:p[f]||ql[f])||`span`,ref:t,className:z(Gl(h).root,s),...m,ownerState:h,style:{...o!==`inherit`&&{"--Typography-textAlign":o},...m.style}})});function Jl(e){return B(`MuiAppBar`,e)}Jr(`MuiAppBar`,[`root`,`positionFixed`,`positionAbsolute`,`positionSticky`,`positionStatic`,`positionRelative`,`colorDefault`,`colorPrimary`,`colorSecondary`,`colorInherit`,`colorTransparent`,`colorError`,`colorInfo`,`colorSuccess`,`colorWarning`]);var Yl=e=>{let{color:t,position:n,classes:r}=e;return Sa({root:[`root`,`color${U(t)}`,`position${U(n)}`]},Jl,r)},Xl=(e,t)=>e?`${e.replace(`)`,``)}, ${t})`:t,Zl=H(Pc,{name:`MuiAppBar`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`position${U(n.position)}`],t[`color${U(n.color)}`]]}})(gs(({theme:e})=>({display:`flex`,flexDirection:`column`,width:`100%`,boxSizing:`border-box`,flexShrink:0,variants:[{props:{position:`fixed`},style:{position:`fixed`,zIndex:(e.vars||e).zIndex.appBar,top:0,left:`auto`,right:0,"@media print":{position:`absolute`}}},{props:{position:`absolute`},style:{position:`absolute`,zIndex:(e.vars||e).zIndex.appBar,top:0,left:`auto`,right:0}},{props:{position:`sticky`},style:{position:`sticky`,zIndex:(e.vars||e).zIndex.appBar,top:0,left:`auto`,right:0}},{props:{position:`static`},style:{position:`static`}},{props:{position:`relative`},style:{position:`relative`}},{props:{color:`inherit`},style:{"--AppBar-color":`inherit`,color:`var(--AppBar-color)`}},{props:{color:`default`},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles(`dark`,{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter(xl([`contrastText`])).map(([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText}})),{props:e=>e.enableColorOnDark===!0&&![`inherit`,`transparent`].includes(e.color),style:{backgroundColor:`var(--AppBar-background)`,color:`var(--AppBar-color)`}},{props:e=>e.enableColorOnDark===!1&&![`inherit`,`transparent`].includes(e.color),style:{backgroundColor:`var(--AppBar-background)`,color:`var(--AppBar-color)`,...e.applyStyles(`dark`,{backgroundColor:e.vars?Xl(e.vars.palette.AppBar.darkBg,`var(--AppBar-background)`):null,color:e.vars?Xl(e.vars.palette.AppBar.darkColor,`var(--AppBar-color)`):null})}},{props:{color:`transparent`},style:{"--AppBar-background":`transparent`,"--AppBar-color":`inherit`,backgroundColor:`var(--AppBar-background)`,color:`var(--AppBar-color)`,...e.applyStyles(`dark`,{backgroundImage:`none`})}}]}))),Ql=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiAppBar`}),{className:r,color:i=`primary`,enableColorOnDark:a=!1,position:o=`fixed`,...s}=n,c={...n,color:i,position:o,enableColorOnDark:a};return(0,R.jsx)(Zl,{square:!0,component:`header`,ownerState:c,elevation:4,className:z(Yl(c).root,r,o===`fixed`&&`mui-fixed`),ref:t,...s})});function $l(e){let t=L.useRef({});return L.useEffect(()=>{t.current=e}),t.current}function eu({array1:e,array2:t,parser:n=e=>e}){return e&&t&&e.length===t.length&&e.every((e,r)=>n(e)===n(t[r]))}function tu(e){return e.normalize(`NFD`).replace(/[\u0300-\u036f]/g,``)}function nu(e={}){let{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:i=`any`,stringify:a,trim:o=!1}=e;return(e,{inputValue:s,getOptionLabel:c})=>{let l=o?s.trim():s;n&&(l=l.toLowerCase()),t&&(l=tu(l));let u=l?e.filter(e=>{let r=(a||c)(e);return n&&(r=r.toLowerCase()),t&&(r=tu(r)),i===`start`?r.startsWith(l):r.includes(l)}):e;return typeof r==`number`?u.slice(0,r):u}}var ru=nu(),iu=5,au=e=>e.current!==null&&e.current.parentElement?.contains(document.activeElement),ou=[];function su(e,t,n,r){if(t||e==null||r)return``;let i=n(e);return typeof i==`string`?i:``}function cu(e){let{unstable_isActiveElementInListbox:t=au,unstable_classNamePrefix:n=`Mui`,autoComplete:r=!1,autoHighlight:i=!1,autoSelect:a=!1,blurOnSelect:o=!1,clearOnBlur:s=!e.freeSolo,clearOnEscape:c=!1,componentName:l=`useAutocomplete`,defaultValue:u=e.multiple?ou:null,disableClearable:d=!1,disableCloseOnSelect:f=!1,disabled:p,disabledItemsFocusable:m=!1,disableListWrap:h=!1,filterOptions:g=ru,filterSelectedOptions:_=!1,freeSolo:v=!1,getOptionDisabled:y,getOptionKey:b,getOptionLabel:x=e=>e.label??e,groupBy:S,handleHomeEndKeys:C=!e.freeSolo,id:w,includeInputInList:T=!1,inputValue:E,isOptionEqualToValue:D=(e,t)=>e===t,multiple:O=!1,onChange:k,onClose:ee,onHighlightChange:A,onInputChange:j,onOpen:te,open:M,openOnFocus:ne=!1,options:N,readOnly:P=!1,renderValue:re,selectOnFocus:ie=!e.freeSolo,value:ae}=e,oe=Yi(w),se=x;se=e=>{let t=x(e);return typeof t==`string`?t:String(t)};let ce=L.useRef(!1),le=L.useRef(!0),ue=L.useRef(null),de=L.useRef(null),[F,fe]=L.useState(null),[pe,me]=L.useState(-1),he=i?0:-1,ge=L.useRef(he),_e=L.useRef(su(u??ae,O,se)).current,[I,ve]=Ns({controlled:ae,default:u,name:l}),[ye,be]=Ns({controlled:E,default:_e,name:l,state:`inputValue`}),[xe,Se]=L.useState(!1),Ce=L.useCallback((e,t,n)=>{if(!(O?I.length<t.length:t!==null)&&!s)return;let r=su(t,O,se,re);ye!==r&&(be(r),j&&j(e,r,n))},[se,ye,O,j,be,s,I,re]),[we,Te]=Ns({controlled:M,default:!1,name:l,state:`open`}),[Ee,De]=L.useState(!0),Oe=!O&&I!=null&&ye===se(I),ke=we&&!P,Ae=ke?g(N.filter(e=>!(_&&(O?I:[I]).some(t=>t!==null&&D(e,t)))),{inputValue:Oe&&Ee?``:ye,getOptionLabel:se}):[],je=$l({filteredOptions:Ae,value:I,inputValue:ye});L.useEffect(()=>{let e=I!==je.value;xe&&!e||v&&!e||Ce(null,I,`reset`)},[I,Ce,xe,je.value,v]);let Me=we&&Ae.length>0&&!P,Ne=Fs(e=>{if(e===-1)ue.current.focus();else{let t=re?`data-item-index`:`data-tag-index`;F.querySelector(`[${t}="${e}"]`).focus()}});L.useEffect(()=>{O&&pe>I.length-1&&(me(-1),Ne(-1))},[I,O,pe,Ne]);function Pe(e,t){if(!de.current||e<0||e>=Ae.length)return-1;let n=e;for(;;){let r=de.current.querySelector(`[data-option-index="${n}"]`),i=m?!1:!r||r.disabled||r.getAttribute(`aria-disabled`)===`true`;if(r&&r.hasAttribute(`tabindex`)&&!i)return n;if(n=t===`next`?(n+1)%Ae.length:(n-1+Ae.length)%Ae.length,n===e)return-1}}let Fe=Fs(({event:e,index:t,reason:r})=>{if(ge.current=t,t===-1?ue.current.removeAttribute(`aria-activedescendant`):ue.current.setAttribute(`aria-activedescendant`,`${oe}-option-${t}`),A&&[`mouse`,`keyboard`,`touch`].includes(r)&&A(e,t===-1?null:Ae[t],r),!de.current)return;let i=de.current.querySelector(`[role="option"].${n}-focused`);i&&(i.classList.remove(`${n}-focused`),i.classList.remove(`${n}-focusVisible`));let a=de.current;if(de.current.getAttribute(`role`)!==`listbox`&&(a=de.current.parentElement.querySelector(`[role="listbox"]`)),!a)return;if(t===-1){a.scrollTop=0;return}let o=de.current.querySelector(`[data-option-index="${t}"]`);if(o&&(o.classList.add(`${n}-focused`),r===`keyboard`&&o.classList.add(`${n}-focusVisible`),a.scrollHeight>a.clientHeight&&r!==`mouse`&&r!==`touch`)){let e=o,t=a.clientHeight+a.scrollTop,n=e.offsetTop+e.offsetHeight;n>t?a.scrollTop=n-a.clientHeight:e.offsetTop-e.offsetHeight*(S?1.3:0)<a.scrollTop&&(a.scrollTop=e.offsetTop-e.offsetHeight*(S?1.3:0))}}),Ie=Fs(({event:e,diff:t,direction:n=`next`,reason:i})=>{if(!ke)return;let a=Pe((()=>{let e=Ae.length-1;if(t===`reset`)return he;if(t===`start`)return 0;if(t===`end`)return e;let n=ge.current+t;return n<0?n===-1&&T?-1:h&&ge.current!==-1||Math.abs(t)>1?0:e:n>e?n===e+1&&T?-1:h||Math.abs(t)>1?e:0:n})(),n);if(Fe({index:a,reason:i,event:e}),r&&t!==`reset`)if(a===-1)ue.current.value=ye;else{let e=se(Ae[a]);ue.current.value=e,e.toLowerCase().indexOf(ye.toLowerCase())===0&&ye.length>0&&ue.current.setSelectionRange(ye.length,e.length)}}),Le=!eu({array1:je.filteredOptions,array2:Ae,parser:se}),Re=()=>{if(ge.current!==-1&&!eu({array1:je.filteredOptions,array2:Ae,parser:se})&&je.inputValue===ye&&(O?I.length===je.value.length&&je.value.every((e,t)=>se(I[t])===se(e)):((e,t)=>(e?se(e):``)===(t?se(t):``))(je.value,I))){let e=je.filteredOptions[ge.current];if(e)return Ae.findIndex(t=>se(t)===se(e))}return-1},ze=L.useCallback(()=>{if(!ke)return;let e=Re();if(e!==-1){ge.current=e;return}let t=O?I[0]:I;if(Ae.length===0||t==null){Ie({diff:`reset`});return}if(de.current){if(t!=null){let e=Ae[ge.current];if(O&&e&&I.findIndex(t=>D(e,t))!==-1)return;let n=Ae.findIndex(e=>D(e,t));n===-1?Ie({diff:`reset`}):Fe({index:n});return}if(ge.current>=Ae.length-1){Fe({index:Ae.length-1});return}Fe({index:ge.current})}},[Ae.length,O?!1:I,Ie,Fe,ke,ye,O]),Be=Fs(e=>{As(de,e),e&&ze()});L.useEffect(()=>{(Le||ke&&!f)&&ze()},[ze,Le,ke,f]);let Ve=e=>{we||(Te(!0),De(!0),te&&te(e))},He=(e,t)=>{we&&(Te(!1),ee&&ee(e,t))},Ue=(e,t,n,r)=>{if(O){if(I.length===t.length&&I.every((e,n)=>e===t[n]))return}else if(I===t)return;k&&k(e,t,n,r),ve(t)},We=L.useRef(!1),Ge=(e,t,n=`selectOption`,r=`options`)=>{let i=n,a=t;if(O){a=Array.isArray(I)?I.slice():[];let e=a.findIndex(e=>D(t,e));e===-1?a.push(t):r!==`freeSolo`&&(a.splice(e,1),i=`removeOption`)}Ce(e,a,i),Ue(e,a,i,{option:t}),!f&&(!e||!e.ctrlKey&&!e.metaKey)&&He(e,i),(o===!0||o===`touch`&&We.current||o===`mouse`&&!We.current)&&ue.current.blur()};function Ke(e,t){if(e===-1)return-1;let n=e;for(;;){if(t===`next`&&n===I.length||t===`previous`&&n===-1)return-1;let e=re?`data-item-index`:`data-tag-index`,r=F.querySelector(`[${e}="${n}"]`);if(!r||!r.hasAttribute(`tabindex`)||r.disabled||r.getAttribute(`aria-disabled`)===`true`)n+=t===`next`?1:-1;else return n}}let qe=(e,t)=>{if(!O)return;ye===``&&He(e,`toggleInput`);let n=pe;pe===-1&&t===`previous`?(n=I.length-1,v&&ye!==``&&(be(``),j&&j(e,``,`reset`))):(n+=t===`next`?1:-1,n<0&&(n=0),n===I.length&&(n=-1)),n=Ke(n,t),me(n),Ne(n)},Je=e=>{ce.current=!0,be(``),j&&j(e,``,`clear`),Ue(e,O?[]:null,`clear`)},Ye=e=>t=>{if(e.onKeyDown&&e.onKeyDown(t),!t.defaultMuiPrevented&&(pe!==-1&&![`ArrowLeft`,`ArrowRight`].includes(t.key)&&(me(-1),Ne(-1)),t.which!==229))switch(t.key){case`Home`:ke&&C&&(t.preventDefault(),Ie({diff:`start`,direction:`next`,reason:`keyboard`,event:t}));break;case`End`:ke&&C&&(t.preventDefault(),Ie({diff:`end`,direction:`previous`,reason:`keyboard`,event:t}));break;case`PageUp`:t.preventDefault(),Ie({diff:-iu,direction:`previous`,reason:`keyboard`,event:t}),Ve(t);break;case`PageDown`:t.preventDefault(),Ie({diff:iu,direction:`next`,reason:`keyboard`,event:t}),Ve(t);break;case`ArrowDown`:t.preventDefault(),Ie({diff:1,direction:`next`,reason:`keyboard`,event:t}),Ve(t);break;case`ArrowUp`:t.preventDefault(),Ie({diff:-1,direction:`previous`,reason:`keyboard`,event:t}),Ve(t);break;case`ArrowLeft`:{let e=ue.current;if(!(e&&e.selectionStart===0&&e.selectionEnd===0))return;!O&&re&&I!=null?(v&&ye!==``&&(be(``),j&&j(t,``,`reset`)),me(0),Ne(0)):qe(t,`previous`);break}case`ArrowRight`:!O&&re?(me(-1),Ne(-1)):qe(t,`next`);break;case`Enter`:if(ge.current!==-1&&ke){let e=Ae[ge.current],n=y?y(e):!1;if(t.preventDefault(),n)return;Ge(t,e,`selectOption`),r&&ue.current.setSelectionRange(ue.current.value.length,ue.current.value.length)}else v&&ye!==``&&Oe===!1&&(O&&t.preventDefault(),Ge(t,ye,`createOption`,`freeSolo`));break;case`Escape`:ke?(t.preventDefault(),t.stopPropagation(),He(t,`escape`)):c&&(ye!==``||O&&I.length>0||re)&&(t.preventDefault(),t.stopPropagation(),Je(t));break;case`Backspace`:if(O&&!P&&ye===``&&I.length>0){let e=pe===-1?I.length-1:pe,n=I.slice();n.splice(e,1),Ue(t,n,`removeOption`,{option:I[e]})}!O&&re&&!P&&ye===``&&Ue(t,null,`removeOption`,{option:I});break;case`Delete`:if(O&&!P&&ye===``&&I.length>0&&pe!==-1){let e=pe,n=I.slice();n.splice(e,1),Ue(t,n,`removeOption`,{option:I[e]})}!O&&re&&!P&&ye===``&&Ue(t,null,`removeOption`,{option:I});break;default:}},Xe=e=>{Se(!0),pe!==-1&&(me(-1),Ne(-1)),ne&&!ce.current&&Ve(e)},Ze=e=>{if(t(de)){ue.current.focus();return}Se(!1),le.current=!0,ce.current=!1,a&&ge.current!==-1&&ke?Ge(e,Ae[ge.current],`blur`):a&&v&&ye!==``?Ge(e,ye,`blur`,`freeSolo`):s&&Ce(e,I,`blur`),He(e,`blur`)},Qe=e=>{let t=e.target.value;ye!==t&&(be(t),De(!1),j&&j(e,t,`input`)),t===``?!d&&!O&&!re&&Ue(e,null,`clear`):Ve(e)},$e=e=>{let t=Number(e.currentTarget.getAttribute(`data-option-index`));ge.current!==t&&Fe({event:e,index:t,reason:`mouse`})},et=e=>{Fe({event:e,index:Number(e.currentTarget.getAttribute(`data-option-index`)),reason:`touch`}),We.current=!0},tt=e=>{Ge(e,Ae[Number(e.currentTarget.getAttribute(`data-option-index`))],`selectOption`),We.current=!1},nt=e=>t=>{let n=I.slice();n.splice(e,1),Ue(t,n,`removeOption`,{option:I[e]})},rt=e=>{Ue(e,null,`removeOption`,{option:I})},it=e=>{we?He(e,`toggleInput`):Ve(e)},at=e=>{e.currentTarget.contains(e.target)&&e.target.getAttribute(`id`)!==oe&&e.preventDefault()},ot=e=>{e.currentTarget.contains(e.target)&&(ue.current.focus(),ie&&le.current&&ue.current.selectionEnd-ue.current.selectionStart===0&&ue.current.select(),le.current=!1)},st=e=>{!p&&(ye===``||!we)&&it(e)},ct=v&&ye.length>0;ct||=O?I.length>0:I!==null;let lt=Ae;return S&&(lt=Ae.reduce((e,t,n)=>{let r=S(t);return e.length>0&&e[e.length-1].group===r?e[e.length-1].options.push(t):e.push({key:n,index:n,group:r,options:[t]}),e},[])),p&&xe&&Ze(),{getRootProps:(e={})=>({...e,onKeyDown:Ye(e),onMouseDown:at,onClick:ot}),getInputLabelProps:()=>({id:`${oe}-label`,htmlFor:oe}),getInputProps:()=>({id:oe,value:ye,onBlur:Ze,onFocus:Xe,onChange:Qe,onMouseDown:st,"aria-activedescendant":ke?``:null,"aria-autocomplete":r?`both`:`list`,"aria-controls":Me?`${oe}-listbox`:void 0,"aria-expanded":Me,autoComplete:`off`,ref:ue,autoCapitalize:`none`,spellCheck:`false`,role:`combobox`,disabled:p}),getClearProps:()=>({tabIndex:-1,type:`button`,onClick:Je}),getItemProps:({index:e=0}={})=>({...O&&{key:e},...re?{"data-item-index":e}:{"data-tag-index":e},tabIndex:-1,...!P&&{onDelete:O?nt(e):rt}}),getPopupIndicatorProps:()=>({tabIndex:-1,type:`button`,onClick:it}),getTagProps:({index:e})=>({key:e,"data-tag-index":e,tabIndex:-1,...!P&&{onDelete:nt(e)}}),getListboxProps:()=>({role:`listbox`,id:`${oe}-listbox`,"aria-labelledby":`${oe}-label`,"aria-multiselectable":O||void 0,ref:Be,onMouseDown:e=>{e.preventDefault()}}),getOptionProps:({index:e,option:t})=>{let n=(O?I:[I]).some(e=>e!=null&&D(t,e)),r=y?y(t):!1;return{key:b?.(t)??se(t),tabIndex:-1,role:`option`,id:`${oe}-option-${e}`,onMouseMove:$e,onClick:tt,onTouchStart:et,"data-option-index":e,"aria-disabled":r,"aria-selected":n}},id:oe,inputValue:ye,value:I,dirty:ct,expanded:ke&&F,popupOpen:ke,focused:xe||pe!==-1,anchorEl:F,setAnchorEl:fe,focusedItem:pe,focusedTag:pe,groupedOptions:lt}}var lu=`bottom`,uu=`right`,du=`left`,fu=`auto`,pu=[`top`,lu,uu,du],mu=`start`,hu=`clippingParents`,gu=`viewport`,_u=`popper`,vu=`reference`,yu=pu.reduce(function(e,t){return e.concat([t+`-`+mu,t+`-end`])},[]),bu=[].concat(pu,[fu]).reduce(function(e,t){return e.concat([t,t+`-`+mu,t+`-end`])},[]),xu=[`beforeRead`,`read`,`afterRead`,`beforeMain`,`main`,`afterMain`,`beforeWrite`,`write`,`afterWrite`];function Su(e){return e?(e.nodeName||``).toLowerCase():null}function Cu(e){if(e==null)return window;if(e.toString()!==`[object Window]`){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function wu(e){return e instanceof Cu(e).Element||e instanceof Element}function Tu(e){return e instanceof Cu(e).HTMLElement||e instanceof HTMLElement}function Eu(e){return typeof ShadowRoot>`u`?!1:e instanceof Cu(e).ShadowRoot||e instanceof ShadowRoot}function Du(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];!Tu(i)||!Su(i)||(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];t===!1?i.removeAttribute(e):i.setAttribute(e,t===!0?``:t)}))})}function Ou(e){var t=e.state,n={popper:{position:t.options.strategy,left:`0`,top:`0`,margin:`0`},arrow:{position:`absolute`},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]=``,e},{});!Tu(r)||!Su(r)||(Object.assign(r.style,a),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}}var ku={name:`applyStyles`,enabled:!0,phase:`write`,fn:Du,effect:Ou,requires:[`computeStyles`]};function Au(e){return e.split(`-`)[0]}var ju=Math.max,Mu=Math.min,Nu=Math.round;function Pu(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+`/`+e.version}).join(` `):navigator.userAgent}function Fu(){return!/^((?!chrome|android).)*safari/i.test(Pu())}function Iu(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&Tu(e)&&(i=e.offsetWidth>0&&Nu(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&Nu(r.height)/e.offsetHeight||1);var o=(wu(e)?Cu(e):window).visualViewport,s=!Fu()&&n,c=(r.left+(s&&o?o.offsetLeft:0))/i,l=(r.top+(s&&o?o.offsetTop:0))/a,u=r.width/i,d=r.height/a;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c,x:c,y:l}}function Lu(e){var t=Iu(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Ru(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Eu(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function zu(e){return Cu(e).getComputedStyle(e)}function Bu(e){return[`table`,`td`,`th`].indexOf(Su(e))>=0}function Vu(e){return((wu(e)?e.ownerDocument:e.document)||window.document).documentElement}function Hu(e){return Su(e)===`html`?e:e.assignedSlot||e.parentNode||(Eu(e)?e.host:null)||Vu(e)}function Uu(e){return!Tu(e)||zu(e).position===`fixed`?null:e.offsetParent}function Wu(e){var t=/firefox/i.test(Pu());if(/Trident/i.test(Pu())&&Tu(e)&&zu(e).position===`fixed`)return null;var n=Hu(e);for(Eu(n)&&(n=n.host);Tu(n)&&[`html`,`body`].indexOf(Su(n))<0;){var r=zu(n);if(r.transform!==`none`||r.perspective!==`none`||r.contain===`paint`||[`transform`,`perspective`].indexOf(r.willChange)!==-1||t&&r.willChange===`filter`||t&&r.filter&&r.filter!==`none`)return n;n=n.parentNode}return null}function Gu(e){for(var t=Cu(e),n=Uu(e);n&&Bu(n)&&zu(n).position===`static`;)n=Uu(n);return n&&(Su(n)===`html`||Su(n)===`body`&&zu(n).position===`static`)?t:n||Wu(e)||t}function Ku(e){return[`top`,`bottom`].indexOf(e)>=0?`x`:`y`}function qu(e,t,n){return ju(e,Mu(t,n))}function Ju(e,t,n){var r=qu(e,t,n);return r>n?n:r}function Yu(){return{top:0,right:0,bottom:0,left:0}}function Xu(e){return Object.assign({},Yu(),e)}function Zu(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var Qu=function(e,t){return e=typeof e==`function`?e(Object.assign({},t.rects,{placement:t.placement})):e,Xu(typeof e==`number`?Zu(e,pu):e)};function $u(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=Au(n.placement),c=Ku(s),l=[`left`,`right`].indexOf(s)>=0?`height`:`width`;if(!(!a||!o)){var u=Qu(i.padding,n),d=Lu(a),f=c===`y`?`top`:du,p=c===`y`?lu:uu,m=n.rects.reference[l]+n.rects.reference[c]-o[c]-n.rects.popper[l],h=o[c]-n.rects.reference[c],g=Gu(a),_=g?c===`y`?g.clientHeight||0:g.clientWidth||0:0,v=m/2-h/2,y=u[f],b=_-d[l]-u[p],x=_/2-d[l]/2+v,S=qu(y,x,b),C=c;n.modifiersData[r]=(t={},t[C]=S,t.centerOffset=S-x,t)}}function ed(e){var t=e.state,n=e.options.element,r=n===void 0?`[data-popper-arrow]`:n;r!=null&&(typeof r==`string`&&(r=t.elements.popper.querySelector(r),!r)||Ru(t.elements.popper,r)&&(t.elements.arrow=r))}var td={name:`arrow`,enabled:!0,phase:`main`,fn:$u,effect:ed,requires:[`popperOffsets`],requiresIfExists:[`preventOverflow`]};function nd(e){return e.split(`-`)[1]}var rd={top:`auto`,right:`auto`,bottom:`auto`,left:`auto`};function id(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Nu(n*i)/i||0,y:Nu(r*i)/i||0}}function ad(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=o.x,p=f===void 0?0:f,m=o.y,h=m===void 0?0:m,g=typeof u==`function`?u({x:p,y:h}):{x:p,y:h};p=g.x,h=g.y;var _=o.hasOwnProperty(`x`),v=o.hasOwnProperty(`y`),y=du,b=`top`,x=window;if(l){var S=Gu(n),C=`clientHeight`,w=`clientWidth`;if(S===Cu(n)&&(S=Vu(n),zu(S).position!==`static`&&s===`absolute`&&(C=`scrollHeight`,w=`scrollWidth`)),S=S,i===`top`||(i===`left`||i===`right`)&&a===`end`){b=lu;var T=d&&S===x&&x.visualViewport?x.visualViewport.height:S[C];h-=T-r.height,h*=c?1:-1}if(i===`left`||(i===`top`||i===`bottom`)&&a===`end`){y=uu;var E=d&&S===x&&x.visualViewport?x.visualViewport.width:S[w];p-=E-r.width,p*=c?1:-1}}var D=Object.assign({position:s},l&&rd),O=u===!0?id({x:p,y:h},Cu(n)):{x:p,y:h};if(p=O.x,h=O.y,c){var k;return Object.assign({},D,(k={},k[b]=v?`0`:``,k[y]=_?`0`:``,k.transform=(x.devicePixelRatio||1)<=1?`translate(`+p+`px, `+h+`px)`:`translate3d(`+p+`px, `+h+`px, 0)`,k))}return Object.assign({},D,(t={},t[b]=v?h+`px`:``,t[y]=_?p+`px`:``,t.transform=``,t))}function od(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,a=n.adaptive,o=a===void 0?!0:a,s=n.roundOffsets,c=s===void 0?!0:s,l={placement:Au(t.placement),variation:nd(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy===`fixed`};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,ad(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,ad(Object.assign({},l,{offsets:t.modifiersData.arrow,position:`absolute`,adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var sd={name:`computeStyles`,enabled:!0,phase:`beforeWrite`,fn:od,data:{}},cd={passive:!0};function ld(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0?!0:i,o=r.resize,s=o===void 0?!0:o,c=Cu(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach(function(e){e.addEventListener(`scroll`,n.update,cd)}),s&&c.addEventListener(`resize`,n.update,cd),function(){a&&l.forEach(function(e){e.removeEventListener(`scroll`,n.update,cd)}),s&&c.removeEventListener(`resize`,n.update,cd)}}var ud={name:`eventListeners`,enabled:!0,phase:`write`,fn:function(){},effect:ld,data:{}},dd={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function fd(e){return e.replace(/left|right|bottom|top/g,function(e){return dd[e]})}var pd={start:`end`,end:`start`};function md(e){return e.replace(/start|end/g,function(e){return pd[e]})}function hd(e){var t=Cu(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function gd(e){return Iu(Vu(e)).left+hd(e).scrollLeft}function _d(e,t){var n=Cu(e),r=Vu(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var l=Fu();(l||!l&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+gd(e),y:c}}function vd(e){var t=Vu(e),n=hd(e),r=e.ownerDocument?.body,i=ju(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=ju(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),o=-n.scrollLeft+gd(e),s=-n.scrollTop;return zu(r||t).direction===`rtl`&&(o+=ju(t.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:o,y:s}}function yd(e){var t=zu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function bd(e){return[`html`,`body`,`#document`].indexOf(Su(e))>=0?e.ownerDocument.body:Tu(e)&&yd(e)?e:bd(Hu(e))}function xd(e,t){t===void 0&&(t=[]);var n=bd(e),r=n===e.ownerDocument?.body,i=Cu(n),a=r?[i].concat(i.visualViewport||[],yd(n)?n:[]):n,o=t.concat(a);return r?o:o.concat(xd(Hu(a)))}function Sd(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Cd(e,t){var n=Iu(e,!1,t===`fixed`);return n.top+=e.clientTop,n.left+=e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function wd(e,t,n){return t===`viewport`?Sd(_d(e,n)):wu(t)?Cd(t,n):Sd(vd(Vu(e)))}function Td(e){var t=xd(Hu(e)),n=[`absolute`,`fixed`].indexOf(zu(e).position)>=0&&Tu(e)?Gu(e):e;return wu(n)?t.filter(function(e){return wu(e)&&Ru(e,n)&&Su(e)!==`body`}):[]}function Ed(e,t,n,r){var i=t===`clippingParents`?Td(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(t,n){var i=wd(e,n,r);return t.top=ju(i.top,t.top),t.right=Mu(i.right,t.right),t.bottom=Mu(i.bottom,t.bottom),t.left=ju(i.left,t.left),t},wd(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Dd(e){var t=e.reference,n=e.element,r=e.placement,i=r?Au(r):null,a=r?nd(r):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,c;switch(i){case`top`:c={x:o,y:t.y-n.height};break;case lu:c={x:o,y:t.y+t.height};break;case uu:c={x:t.x+t.width,y:s};break;case du:c={x:t.x-n.width,y:s};break;default:c={x:t.x,y:t.y}}var l=i?Ku(i):null;if(l!=null){var u=l===`y`?`height`:`width`;switch(a){case mu:c[l]=c[l]-(t[u]/2-n[u]/2);break;case`end`:c[l]=c[l]+(t[u]/2-n[u]/2);break;default:}}return c}function Od(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,o=a===void 0?e.strategy:a,s=n.boundary,c=s===void 0?hu:s,l=n.rootBoundary,u=l===void 0?gu:l,d=n.elementContext,f=d===void 0?_u:d,p=n.altBoundary,m=p===void 0?!1:p,h=n.padding,g=h===void 0?0:h,_=Xu(typeof g==`number`?Zu(g,pu):g),v=f===`popper`?vu:_u,y=e.rects.popper,b=e.elements[m?v:f],x=Ed(wu(b)?b:b.contextElement||Vu(e.elements.popper),c,u,o),S=Iu(e.elements.reference),C=Dd({reference:S,element:y,strategy:`absolute`,placement:i}),w=Sd(Object.assign({},y,C)),T=f===`popper`?w:S,E={top:x.top-T.top+_.top,bottom:T.bottom-x.bottom+_.bottom,left:x.left-T.left+_.left,right:T.right-x.right+_.right},D=e.modifiersData.offset;if(f===`popper`&&D){var O=D[i];Object.keys(E).forEach(function(e){var t=[`right`,`bottom`].indexOf(e)>=0?1:-1,n=[`top`,`bottom`].indexOf(e)>=0?`y`:`x`;E[e]+=O[n]*t})}return E}function kd(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=c===void 0?bu:c,u=nd(r),d=u?s?yu:yu.filter(function(e){return nd(e)===u}):pu,f=d.filter(function(e){return l.indexOf(e)>=0});f.length===0&&(f=d);var p=f.reduce(function(t,n){return t[n]=Od(e,{placement:n,boundary:i,rootBoundary:a,padding:o})[Au(n)],t},{});return Object.keys(p).sort(function(e,t){return p[e]-p[t]})}function Ad(e){if(Au(e)===`auto`)return[];var t=fd(e);return[md(e),t,md(t)]}function jd(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!0:o,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,h=n.allowedAutoPlacements,g=t.options.placement,_=Au(g)===g,v=c||(_||!m?[fd(g)]:Ad(g)),y=[g].concat(v).reduce(function(e,n){return e.concat(Au(n)===`auto`?kd(t,{placement:n,boundary:u,rootBoundary:d,padding:l,flipVariations:m,allowedAutoPlacements:h}):n)},[]),b=t.rects.reference,x=t.rects.popper,S=new Map,C=!0,w=y[0],T=0;T<y.length;T++){var E=y[T],D=Au(E),O=nd(E)===mu,k=[`top`,lu].indexOf(D)>=0,ee=k?`width`:`height`,A=Od(t,{placement:E,boundary:u,rootBoundary:d,altBoundary:f,padding:l}),j=k?O?uu:du:O?lu:`top`;b[ee]>x[ee]&&(j=fd(j));var te=fd(j),M=[];if(a&&M.push(A[D]<=0),s&&M.push(A[j]<=0,A[te]<=0),M.every(function(e){return e})){w=E,C=!1;break}S.set(E,M)}if(C)for(var ne=m?3:1,N=function(e){var t=y.find(function(t){var n=S.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return w=t,`break`},P=ne;P>0&&N(P)!==`break`;P--);t.placement!==w&&(t.modifiersData[r]._skip=!0,t.placement=w,t.reset=!0)}}var Md={name:`flip`,enabled:!0,phase:`main`,fn:jd,requiresIfExists:[`offset`],data:{_skip:!1}};function Nd(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Pd(e){return[`top`,uu,lu,du].some(function(t){return e[t]>=0})}function Fd(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=Od(t,{elementContext:`reference`}),s=Od(t,{altBoundary:!0}),c=Nd(o,r),l=Nd(s,i,a),u=Pd(c),d=Pd(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}var Id={name:`hide`,enabled:!0,phase:`main`,requiresIfExists:[`preventOverflow`],fn:Fd};function Ld(e,t,n){var r=Au(e),i=[`left`,`top`].indexOf(r)>=0?-1:1,a=typeof n==`function`?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o||=0,s=(s||0)*i,[`left`,`right`].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function Rd(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=bu.reduce(function(e,n){return e[n]=Ld(n,t.rects,a),e},{}),s=o[t.placement],c=s.x,l=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=o}var zd={name:`offset`,enabled:!0,phase:`main`,requires:[`popperOffsets`],fn:Rd};function Bd(e){var t=e.state,n=e.name;t.modifiersData[n]=Dd({reference:t.rects.reference,element:t.rects.popper,strategy:`absolute`,placement:t.placement})}var Vd={name:`popperOffsets`,enabled:!0,phase:`read`,fn:Bd,data:{}};function Hd(e){return e===`x`?`y`:`x`}function Ud(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!1:o,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0?!0:f,m=n.tetherOffset,h=m===void 0?0:m,g=Od(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),_=Au(t.placement),v=nd(t.placement),y=!v,b=Ku(_),x=Hd(b),S=t.modifiersData.popperOffsets,C=t.rects.reference,w=t.rects.popper,T=typeof h==`function`?h(Object.assign({},t.rects,{placement:t.placement})):h,E=typeof T==`number`?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(S){if(a){var k=b===`y`?`top`:du,ee=b===`y`?lu:uu,A=b===`y`?`height`:`width`,j=S[b],te=j+g[k],M=j-g[ee],ne=p?-w[A]/2:0,N=v===`start`?C[A]:w[A],P=v===`start`?-w[A]:-C[A],re=t.elements.arrow,ie=p&&re?Lu(re):{width:0,height:0},ae=t.modifiersData[`arrow#persistent`]?t.modifiersData[`arrow#persistent`].padding:Yu(),oe=ae[k],se=ae[ee],ce=qu(0,C[A],ie[A]),le=y?C[A]/2-ne-ce-oe-E.mainAxis:N-ce-oe-E.mainAxis,ue=y?-C[A]/2+ne+ce+se+E.mainAxis:P+ce+se+E.mainAxis,de=t.elements.arrow&&Gu(t.elements.arrow),F=de?b===`y`?de.clientTop||0:de.clientLeft||0:0,fe=D?.[b]??0,pe=j+le-fe-F,me=j+ue-fe,he=qu(p?Mu(te,pe):te,j,p?ju(M,me):M);S[b]=he,O[b]=he-j}if(s){var ge=b===`x`?`top`:du,_e=b===`x`?lu:uu,I=S[x],ve=x===`y`?`height`:`width`,ye=I+g[ge],be=I-g[_e],xe=[`top`,du].indexOf(_)!==-1,Se=D?.[x]??0,Ce=xe?ye:I-C[ve]-w[ve]-Se+E.altAxis,we=xe?I+C[ve]+w[ve]-Se-E.altAxis:be,Te=p&&xe?Ju(Ce,I,we):qu(p?Ce:ye,I,p?we:be);S[x]=Te,O[x]=Te-I}t.modifiersData[r]=O}}var Wd={name:`preventOverflow`,enabled:!0,phase:`main`,fn:Ud,requiresIfExists:[`offset`]};function Gd(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Kd(e){return e===Cu(e)||!Tu(e)?hd(e):Gd(e)}function qd(e){var t=e.getBoundingClientRect(),n=Nu(t.width)/e.offsetWidth||1,r=Nu(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Jd(e,t,n){n===void 0&&(n=!1);var r=Tu(t),i=Tu(t)&&qd(t),a=Vu(t),o=Iu(e,i,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((Su(t)!==`body`||yd(a))&&(s=Kd(t)),Tu(t)?(c=Iu(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=gd(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function Yd(e){var t=new Map,n=new Set,r=[];e.forEach(function(e){t.set(e.name,e)});function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}}),r.push(e)}return e.forEach(function(e){n.has(e.name)||i(e)}),r}function Xd(e){var t=Yd(e);return xu.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}function Zd(e){var t;return function(){return t||=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})}),t}}function Qd(e){var t=e.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{});return Object.keys(t).map(function(e){return t[e]})}var $d={placement:`bottom`,modifiers:[],strategy:`absolute`};function ef(){return![...arguments].some(function(e){return!(e&&typeof e.getBoundingClientRect==`function`)})}function tf(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?$d:i;return function(e,t,n){n===void 0&&(n=a);var i={placement:`bottom`,orderedModifiers:[],options:Object.assign({},$d,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},o=[],s=!1,c={state:i,setOptions:function(n){var o=typeof n==`function`?n(i.options):n;u(),i.options=Object.assign({},a,i.options,o),i.scrollParents={reference:wu(e)?xd(e):e.contextElement?xd(e.contextElement):[],popper:xd(t)};var s=Xd(Qd([].concat(r,i.options.modifiers)));return i.orderedModifiers=s.filter(function(e){return e.enabled}),l(),c.update()},forceUpdate:function(){if(!s){var e=i.elements,t=e.reference,n=e.popper;if(ef(t,n)){i.rects={reference:Jd(t,Gu(n),i.options.strategy===`fixed`),popper:Lu(n)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(e){return i.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r<i.orderedModifiers.length;r++){if(i.reset===!0){i.reset=!1,r=-1;continue}var a=i.orderedModifiers[r],o=a.fn,l=a.options,u=l===void 0?{}:l,d=a.name;typeof o==`function`&&(i=o({state:i,options:u,name:d,instance:c})||i)}}}},update:Zd(function(){return new Promise(function(e){c.forceUpdate(),e(i)})}),destroy:function(){u(),s=!0}};if(!ef(e,t))return c;c.setOptions(n).then(function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)});function l(){i.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=n===void 0?{}:n,a=e.effect;if(typeof a==`function`){var s=a({state:i,name:t,instance:c,options:r});o.push(s||function(){})}})}function u(){o.forEach(function(e){return e()}),o=[]}return c}}var nf=tf({defaultModifiers:[ud,Vd,sd,ku,zd,Md,Wd,td,Id]});function rf(e){let{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...a}=e,o=i?{}:bc(n,r),{props:s,internalRef:c}=Cc({...a,externalSlotProps:o}),l=Ls(c,o?.ref,e.additionalProps?.ref);return yc(t,{...s,ref:l},r)}function af(e){return e?.props?.ref||null}function of(e){return typeof e==`function`?e():e}var sf=L.forwardRef(function(e,t){let{children:n,container:r,disablePortal:i=!1}=e,[a,o]=L.useState(null),s=Ls(L.isValidElement(n)?af(n):null,t);if(di(()=>{i||o(of(r)||document.body)},[r,i]),di(()=>{if(a&&!i)return As(t,a),()=>{As(t,null)}},[t,a,i]),i){if(L.isValidElement(n)){let e={ref:s};return L.cloneElement(n,e)}return n}return a&&qs.createPortal(n,a)});function cf(e){return B(`MuiPopper`,e)}Jr(`MuiPopper`,[`root`]);function lf(e,t){if(t===`ltr`)return e;switch(e){case`bottom-end`:return`bottom-start`;case`bottom-start`:return`bottom-end`;case`top-end`:return`top-start`;case`top-start`:return`top-end`;default:return e}}function uf(e){return typeof e==`function`?e():e}function df(e){return e.nodeType!==void 0}var ff=e=>{let{classes:t}=e;return Sa({root:[`root`]},cf,t)},pf={},mf=L.forwardRef(function(e,t){let{anchorEl:n,children:r,direction:i,disablePortal:a,modifiers:o,open:s,placement:c,popperOptions:l,popperRef:u,slotProps:d={},slots:f={},TransitionProps:p,ownerState:m,...h}=e,g=L.useRef(null),_=Ls(g,t),v=L.useRef(null),y=Ls(v,u),b=L.useRef(y);di(()=>{b.current=y},[y]),L.useImperativeHandle(u,()=>v.current,[]);let x=lf(c,i),[S,C]=L.useState(x),[w,T]=L.useState(uf(n));L.useEffect(()=>{v.current&&v.current.forceUpdate()}),L.useEffect(()=>{n&&T(uf(n))},[n]),di(()=>{if(!w||!s)return;let e=e=>{C(e.placement)},t=[{name:`preventOverflow`,options:{altBoundary:a}},{name:`flip`,options:{altBoundary:a}},{name:`onUpdate`,enabled:!0,phase:`afterWrite`,fn:({state:t})=>{e(t)}}];o!=null&&(t=t.concat(o)),l&&l.modifiers!=null&&(t=t.concat(l.modifiers));let n=nf(w,g.current,{placement:x,...l,modifiers:t});return b.current(n),()=>{n.destroy(),b.current(null)}},[w,a,o,s,l,x]);let E={placement:S};p!==null&&(E.TransitionProps=p);let D=ff(e),O=f.root??`div`;return(0,R.jsx)(O,{...rf({elementType:O,externalSlotProps:d.root,externalForwardedProps:h,additionalProps:{role:`tooltip`,ref:_},ownerState:e,className:D.root}),children:typeof r==`function`?r(E):r})}),hf=H(L.forwardRef(function(e,t){let{anchorEl:n,children:r,container:i,direction:a=`ltr`,disablePortal:o=!1,keepMounted:s=!1,modifiers:c,open:l,placement:u=`bottom`,popperOptions:d=pf,popperRef:f,style:p,transition:m=!1,slotProps:h={},slots:g={},..._}=e,[v,y]=L.useState(!0),b=()=>{y(!1)},x=()=>{y(!0)};if(!s&&!l&&(!m||v))return null;let S;if(i)S=i;else if(n){let e=uf(n);S=e&&df(e)?Es(e).body:Es(null).body}let C=!l&&s&&(!m||v)?`none`:void 0,w=m?{in:l,onEnter:b,onExited:x}:void 0;return(0,R.jsx)(sf,{disablePortal:o,container:S,children:(0,R.jsx)(mf,{anchorEl:n,direction:a,disablePortal:o,modifiers:c,ref:t,open:m?!v:l,placement:u,popperOptions:d,popperRef:f,slotProps:h,slots:g,..._,style:{position:`fixed`,top:0,left:0,display:C,...p},TransitionProps:w,children:r})})}),{name:`MuiPopper`,slot:`Root`})({}),gf=L.forwardRef(function(e,t){let n=Vi(),{anchorEl:r,component:i,components:a,componentsProps:o,container:s,disablePortal:c,keepMounted:l,modifiers:u,open:d,placement:f,popperOptions:p,popperRef:m,transition:h,slots:g,slotProps:_,...v}=_s({props:e,name:`MuiPopper`}),y=g?.root??a?.Root,b={anchorEl:r,container:s,disablePortal:c,keepMounted:l,modifiers:u,open:d,placement:f,popperOptions:p,popperRef:m,transition:h,...v};return(0,R.jsx)(hf,{as:i,direction:n?`rtl`:`ltr`,slots:{root:y},slotProps:_??o,...b,ref:t})});function _f(e){return B(`MuiListSubheader`,e)}Jr(`MuiListSubheader`,[`root`,`colorPrimary`,`colorInherit`,`gutters`,`inset`,`sticky`]);var vf=e=>{let{classes:t,color:n,disableGutters:r,inset:i,disableSticky:a}=e;return Sa({root:[`root`,n!==`default`&&`color${U(n)}`,!r&&`gutters`,i&&`inset`,!a&&`sticky`]},_f,t)},yf=H(`li`,{name:`MuiListSubheader`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color!==`default`&&t[`color${U(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(gs(({theme:e})=>({boxSizing:`border-box`,lineHeight:`48px`,listStyle:`none`,color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14),variants:[{props:{color:`primary`},style:{color:(e.vars||e).palette.primary.main}},{props:{color:`inherit`},style:{color:`inherit`}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:72}},{props:({ownerState:e})=>!e.disableSticky,style:{position:`sticky`,top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}}]}))),bf=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiListSubheader`}),{className:r,color:i=`default`,component:a=`li`,disableGutters:o=!1,disableSticky:s=!1,inset:c=!1,...l}=n,u={...n,color:i,component:a,disableGutters:o,disableSticky:s,inset:c};return(0,R.jsx)(yf,{as:a,className:z(vf(u).root,r),ref:t,ownerState:u,...l})});bf&&(bf.muiSkipListHighlight=!0);var xf=Ss((0,R.jsx)(`path`,{d:`M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z`}),`Cancel`);function Sf(e){return B(`MuiChip`,e)}var Cf=Jr(`MuiChip`,`root.sizeSmall.sizeMedium.colorDefault.colorError.colorInfo.colorPrimary.colorSecondary.colorSuccess.colorWarning.disabled.clickable.clickableColorPrimary.clickableColorSecondary.deletable.deletableColorPrimary.deletableColorSecondary.outlined.filled.outlinedPrimary.outlinedSecondary.filledPrimary.filledSecondary.avatar.avatarSmall.avatarMedium.avatarColorPrimary.avatarColorSecondary.icon.iconSmall.iconMedium.iconColorPrimary.iconColorSecondary.label.labelSmall.labelMedium.deleteIcon.deleteIconSmall.deleteIconMedium.deleteIconColorPrimary.deleteIconColorSecondary.deleteIconOutlinedColorPrimary.deleteIconOutlinedColorSecondary.deleteIconFilledColorPrimary.deleteIconFilledColorSecondary.focusVisible`.split(`.`)),wf=e=>{let{classes:t,disabled:n,size:r,color:i,iconColor:a,onDelete:o,clickable:s,variant:c}=e;return Sa({root:[`root`,c,n&&`disabled`,`size${U(r)}`,`color${U(i)}`,s&&`clickable`,s&&`clickableColor${U(i)}`,o&&`deletable`,o&&`deletableColor${U(i)}`,`${c}${U(i)}`],label:[`label`,`label${U(r)}`],avatar:[`avatar`,`avatar${U(r)}`,`avatarColor${U(i)}`],icon:[`icon`,`icon${U(r)}`,`iconColor${U(a)}`],deleteIcon:[`deleteIcon`,`deleteIcon${U(r)}`,`deleteIconColor${U(i)}`,`deleteIcon${U(c)}Color${U(i)}`]},Sf,t)},Tf=H(`div`,{name:`MuiChip`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e,{color:r,iconColor:i,clickable:a,onDelete:o,size:s,variant:c}=n;return[{[`& .${Cf.avatar}`]:t.avatar},{[`& .${Cf.avatar}`]:t[`avatar${U(s)}`]},{[`& .${Cf.avatar}`]:t[`avatarColor${U(r)}`]},{[`& .${Cf.icon}`]:t.icon},{[`& .${Cf.icon}`]:t[`icon${U(s)}`]},{[`& .${Cf.icon}`]:t[`iconColor${U(i)}`]},{[`& .${Cf.deleteIcon}`]:t.deleteIcon},{[`& .${Cf.deleteIcon}`]:t[`deleteIcon${U(s)}`]},{[`& .${Cf.deleteIcon}`]:t[`deleteIconColor${U(r)}`]},{[`& .${Cf.deleteIcon}`]:t[`deleteIcon${U(c)}Color${U(r)}`]},t.root,t[`size${U(s)}`],t[`color${U(r)}`],a&&t.clickable,a&&r!==`default`&&t[`clickableColor${U(r)}`],o&&t.deletable,o&&r!==`default`&&t[`deletableColor${U(r)}`],t[c],t[`${c}${U(r)}`]]}})(gs(({theme:e})=>{let t=e.palette.mode===`light`?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:`100%`,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:`inline-flex`,alignItems:`center`,justifyContent:`center`,height:32,lineHeight:1.5,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:`nowrap`,transition:e.transitions.create([`background-color`,`box-shadow`]),cursor:`unset`,outline:0,textDecoration:`none`,border:0,padding:0,verticalAlign:`middle`,boxSizing:`border-box`,[`&.${Cf.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:`none`},[`& .${Cf.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${Cf.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Cf.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Cf.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Cf.icon}`]:{marginLeft:5,marginRight:-6},[`& .${Cf.deleteIcon}`]:{WebkitTapHighlightColor:`transparent`,color:e.alpha((e.vars||e).palette.text.primary,.26),fontSize:22,cursor:`pointer`,margin:`0 5px 0 -6px`,"&:hover":{color:e.alpha((e.vars||e).palette.text.primary,.4)}},variants:[{props:{size:`small`},style:{height:24,[`& .${Cf.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${Cf.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(xl([`contrastText`])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText,[`& .${Cf.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[t].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].contrastText}}}})),{props:e=>e.iconColor===e.color,style:{[`& .${Cf.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:e=>e.iconColor===e.color&&e.color!==`default`,style:{[`& .${Cf.icon}`]:{color:`inherit`}}},{props:{onDelete:!0},style:{[`&.${Cf.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}},...Object.entries(e.palette).filter(xl([`dark`])).map(([t])=>({props:{color:t,onDelete:!0},style:{[`&.${Cf.focusVisible}`]:{background:(e.vars||e).palette[t].dark}}})),{props:{clickable:!0},style:{userSelect:`none`,WebkitTapHighlightColor:`transparent`,cursor:`pointer`,"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)},[`&.${Cf.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(xl([`dark`])).map(([t])=>({props:{color:t,clickable:!0},style:{[`&:hover, &.${Cf.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark}}})),{props:{variant:`outlined`},style:{backgroundColor:`transparent`,border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode===`light`?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${Cf.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Cf.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Cf.avatar}`]:{marginLeft:4},[`& .${Cf.avatarSmall}`]:{marginLeft:2},[`& .${Cf.icon}`]:{marginLeft:4},[`& .${Cf.iconSmall}`]:{marginLeft:2},[`& .${Cf.deleteIcon}`]:{marginRight:5},[`& .${Cf.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(xl()).map(([t])=>({props:{variant:`outlined`,color:t},style:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.alpha((e.vars||e).palette[t].main,.7)}`,[`&.${Cf.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)},[`&.${Cf.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.focusOpacity)},[`& .${Cf.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[t].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].main}}}}))]}})),Ef=H(`span`,{name:`MuiChip`,slot:`Label`,overridesResolver:(e,t)=>{let{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${U(r)}`]]}})({overflow:`hidden`,textOverflow:`ellipsis`,paddingLeft:12,paddingRight:12,whiteSpace:`nowrap`,variants:[{props:{variant:`outlined`},style:{paddingLeft:11,paddingRight:11}},{props:{size:`small`},style:{paddingLeft:8,paddingRight:8}},{props:{size:`small`,variant:`outlined`},style:{paddingLeft:7,paddingRight:7}}]});function Df(e){return e.key===`Backspace`||e.key===`Delete`}var Of=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiChip`}),{avatar:r,className:i,clickable:a,color:o=`default`,component:s,deleteIcon:c,disabled:l=!1,icon:u,label:d,onClick:f,onDelete:p,onKeyDown:m,onKeyUp:h,size:g=`medium`,variant:_=`filled`,tabIndex:v,skipFocusWhenDisabled:y=!1,slots:b={},slotProps:x={},...S}=n,C=Rs(L.useRef(null),t),w=e=>{e.stopPropagation(),p(e)},T=e=>{e.currentTarget===e.target&&Df(e)&&e.preventDefault(),m&&m(e)},E=e=>{e.currentTarget===e.target&&p&&Df(e)&&p(e),h&&h(e)},D=a!==!1&&f?!0:a,O=D||p?ul:s||`div`,k={...n,component:O,disabled:l,size:g,color:o,iconColor:L.isValidElement(u)&&u.props.color||o,onDelete:!!p,clickable:D,variant:_},ee=wf(k),A=O===ul?{component:s||`div`,focusVisibleClassName:ee.focusVisible,...p&&{disableRipple:!0}}:{},j=null;p&&(j=c&&L.isValidElement(c)?L.cloneElement(c,{className:z(c.props.className,ee.deleteIcon),onClick:w}):(0,R.jsx)(xf,{className:ee.deleteIcon,onClick:w}));let te=null;r&&L.isValidElement(r)&&(te=L.cloneElement(r,{className:z(ee.avatar,r.props.className)}));let M=null;u&&L.isValidElement(u)&&(M=L.cloneElement(u,{className:z(ee.icon,u.props.className)}));let ne={slots:b,slotProps:x},[N,P]=wc(`root`,{elementType:Tf,externalForwardedProps:{...ne,...S},ownerState:k,shouldForwardComponentProp:!0,ref:C,className:z(ee.root,i),additionalProps:{disabled:D&&l?!0:void 0,tabIndex:y&&l?-1:v,...A},getSlotProps:e=>({...e,onClick:t=>{e.onClick?.(t),f?.(t)},onKeyDown:t=>{e.onKeyDown?.(t),T(t)},onKeyUp:t=>{e.onKeyUp?.(t),E(t)}})}),[re,ie]=wc(`label`,{elementType:Ef,externalForwardedProps:ne,ownerState:k,className:ee.label});return(0,R.jsxs)(N,{as:O,...P,children:[te||M,(0,R.jsx)(re,{...ie,children:d}),j]})});function kf(e){return parseInt(e,10)||0}var Af={shadow:{visibility:`hidden`,position:`absolute`,overflow:`hidden`,height:0,top:0,left:0,transform:`translateZ(0)`}};function jf(e){for(let t in e)return!1;return!0}function Mf(e){return jf(e)||e.outerHeightStyle===0&&!e.overflowing}var Nf=L.forwardRef(function(e,t){let{onChange:n,maxRows:r,minRows:i=1,style:a,value:o,...s}=e,{current:c}=L.useRef(o!=null),l=L.useRef(null),u=Ls(t,l),d=L.useRef(null),f=L.useRef(null),p=L.useCallback(()=>{let t=l.current,n=f.current;if(!t||!n)return;let a=Os(t).getComputedStyle(t);if(a.width===`0px`)return{outerHeightStyle:0,overflowing:!1};n.style.width=a.width,n.value=t.value||e.placeholder||`x`,n.value.slice(-1)===`
|
|
146
|
+
`&&(n.value+=` `);let o=a.boxSizing,s=kf(a.paddingBottom)+kf(a.paddingTop),c=kf(a.borderBottomWidth)+kf(a.borderTopWidth),u=n.scrollHeight;n.value=`x`;let d=n.scrollHeight,p=u;return i&&(p=Math.max(Number(i)*d,p)),r&&(p=Math.min(Number(r)*d,p)),p=Math.max(p,d),{outerHeightStyle:p+(o===`border-box`?s+c:0),overflowing:Math.abs(p-u)<=1}},[r,i,e.placeholder]),m=Fs(()=>{let e=l.current,t=p();if(!e||!t||Mf(t))return!1;let n=t.outerHeightStyle;return d.current!=null&&d.current!==n}),h=L.useCallback(()=>{let e=l.current,t=p();if(!e||!t||Mf(t))return;let n=t.outerHeightStyle;d.current!==n&&(d.current=n,e.style.height=`${n}px`),e.style.overflow=t.overflowing?`hidden`:``},[p]),g=L.useRef(-1);return di(()=>{let e=Cs(h),t=l?.current;if(!t)return;let n=Os(t);n.addEventListener(`resize`,e);let r;return typeof ResizeObserver<`u`&&(r=new ResizeObserver(()=>{m()&&(r.unobserve(t),cancelAnimationFrame(g.current),h(),g.current=requestAnimationFrame(()=>{r.observe(t)}))}),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(g.current),n.removeEventListener(`resize`,e),r&&r.disconnect()}},[p,h,m]),di(()=>{h()}),(0,R.jsxs)(L.Fragment,{children:[(0,R.jsx)(`textarea`,{value:o,onChange:e=>{c||h();let t=e.target,r=t.value.length,i=t.value.endsWith(`
|
|
147
|
+
`),a=t.selectionStart===r;i&&a&&t.setSelectionRange(r,r),n&&n(e)},ref:u,rows:i,style:a,...s}),(0,R.jsx)(`textarea`,{"aria-hidden":!0,className:e.className,readOnly:!0,ref:f,tabIndex:-1,style:{...Af.shadow,...a,paddingTop:0,paddingBottom:0}})]})});function Pf({props:e,states:t,muiFormControl:n}){return t.reduce((t,r)=>(t[r]=e[r],n&&e[r]===void 0&&(t[r]=n[r]),t),{})}var Ff=L.createContext(void 0);function If(){return L.useContext(Ff)}function Lf(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function Rf(e,t=!1){return e&&(Lf(e.value)&&e.value!==``||t&&Lf(e.defaultValue)&&e.defaultValue!==``)}function zf(e){return e.startAdornment}function Bf(e){return B(`MuiInputBase`,e)}var Vf=Jr(`MuiInputBase`,[`root`,`formControl`,`focused`,`disabled`,`adornedStart`,`adornedEnd`,`error`,`sizeSmall`,`multiline`,`colorSecondary`,`fullWidth`,`hiddenLabel`,`readOnly`,`input`,`inputSizeSmall`,`inputMultiline`,`inputTypeSearch`,`inputAdornedStart`,`inputAdornedEnd`,`inputHiddenLabel`]),Hf,Uf=(e,t)=>{let{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size===`small`&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${U(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},Wf=(e,t)=>{let{ownerState:n}=e;return[t.input,n.size===`small`&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type===`search`&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},Gf=e=>{let{classes:t,color:n,disabled:r,error:i,endAdornment:a,focused:o,formControl:s,fullWidth:c,hiddenLabel:l,multiline:u,readOnly:d,size:f,startAdornment:p,type:m}=e;return Sa({root:[`root`,`color${U(n)}`,r&&`disabled`,i&&`error`,c&&`fullWidth`,o&&`focused`,s&&`formControl`,f&&f!==`medium`&&`size${U(f)}`,u&&`multiline`,p&&`adornedStart`,a&&`adornedEnd`,l&&`hiddenLabel`,d&&`readOnly`],input:[`input`,r&&`disabled`,m===`search`&&`inputTypeSearch`,u&&`inputMultiline`,f===`small`&&`inputSizeSmall`,l&&`inputHiddenLabel`,p&&`inputAdornedStart`,a&&`inputAdornedEnd`,d&&`readOnly`]},Bf,t)},Kf=H(`div`,{name:`MuiInputBase`,slot:`Root`,overridesResolver:Uf})(gs(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:`1.4375em`,boxSizing:`border-box`,position:`relative`,cursor:`text`,display:`inline-flex`,alignItems:`center`,[`&.${Vf.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:`default`},variants:[{props:({ownerState:e})=>e.multiline,style:{padding:`4px 0 5px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{paddingTop:1}},{props:({ownerState:e})=>e.fullWidth,style:{width:`100%`}}]}))),qf=H(`input`,{name:`MuiInputBase`,slot:`Input`,overridesResolver:Wf})(gs(({theme:e})=>{let t=e.palette.mode===`light`,n={color:`currentColor`,...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create(`opacity`,{duration:e.transitions.duration.shorter})},r={opacity:`0 !important`},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:`inherit`,letterSpacing:`inherit`,color:`currentColor`,padding:`4px 0 5px`,border:0,boxSizing:`content-box`,background:`none`,height:`1.4375em`,margin:0,WebkitTapHighlightColor:`transparent`,display:`block`,minWidth:0,width:`100%`,"&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:`none`},"&::-webkit-search-decoration":{WebkitAppearance:`none`},[`label[data-shrink=false] + .${Vf.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${Vf.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:e})=>!e.disableInjectingGlobalStyles,style:{animationName:`mui-auto-fill-cancel`,animationDuration:`10ms`,"&:-webkit-autofill":{animationDuration:`5000s`,animationName:`mui-auto-fill`}}},{props:{size:`small`},style:{paddingTop:1}},{props:({ownerState:e})=>e.multiline,style:{height:`auto`,resize:`none`,padding:0,paddingTop:0}},{props:{type:`search`},style:{MozAppearance:`textfield`}}]}})),Jf=ms({"@keyframes mui-auto-fill":{from:{display:`block`}},"@keyframes mui-auto-fill-cancel":{from:{display:`block`}}}),Yf=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiInputBase`}),{"aria-describedby":r,autoComplete:i,autoFocus:a,className:o,color:s,components:c={},componentsProps:l={},defaultValue:u,disabled:d,disableInjectingGlobalStyles:f,endAdornment:p,error:m,fullWidth:h=!1,id:g,inputComponent:_=`input`,inputProps:v={},inputRef:y,margin:b,maxRows:x,minRows:S,multiline:C=!1,name:w,onBlur:T,onChange:E,onClick:O,onFocus:k,onKeyDown:ee,onKeyUp:A,placeholder:j,readOnly:te,renderSuffix:M,rows:ne,size:N,slotProps:P={},slots:re={},startAdornment:ie,type:ae=`text`,value:oe,...se}=n,ce=v.value==null?oe:v.value,{current:le}=L.useRef(ce!=null),ue=L.useRef(),de=L.useCallback(e=>{},[]),F=Rs(ue,y,v.ref,de),[fe,pe]=L.useState(!1),me=If(),he=Pf({props:n,muiFormControl:me,states:[`color`,`disabled`,`error`,`hiddenLabel`,`size`,`required`,`filled`]});he.focused=me?me.focused:fe,L.useEffect(()=>{!me&&d&&fe&&(pe(!1),T&&T())},[me,d,fe,T]);let ge=me&&me.onFilled,_e=me&&me.onEmpty,I=L.useCallback(e=>{Rf(e)?ge&&ge():_e&&_e()},[ge,_e]);js(()=>{le&&I({value:ce})},[ce,I,le]);let ve=e=>{k&&k(e),v.onFocus&&v.onFocus(e),me&&me.onFocus?me.onFocus(e):pe(!0)},ye=e=>{T&&T(e),v.onBlur&&v.onBlur(e),me&&me.onBlur?me.onBlur(e):pe(!1)},be=(e,...t)=>{if(!le){let t=e.target||ue.current;if(t==null)throw Error(D(1));I({value:t.value})}v.onChange&&v.onChange(e,...t),E&&E(e,...t)};L.useEffect(()=>{I(ue.current)},[]);let xe=e=>{ue.current&&e.currentTarget===e.target&&ue.current.focus(),O&&O(e)},Se=_,Ce=v;C&&Se===`input`&&(Ce=ne?{type:void 0,minRows:ne,maxRows:ne,...Ce}:{type:void 0,maxRows:x,minRows:S,...Ce},Se=Nf);let we=e=>{I(e.animationName===`mui-auto-fill-cancel`?ue.current:{value:`x`})};L.useEffect(()=>{me&&me.setAdornedStart(!!ie)},[me,ie]);let Te={...n,color:he.color||`primary`,disabled:he.disabled,endAdornment:p,error:he.error,focused:he.focused,formControl:me,fullWidth:h,hiddenLabel:he.hiddenLabel,multiline:C,size:he.size,startAdornment:ie,type:ae},Ee=Gf(Te),De=re.root||c.Root||Kf,Oe=P.root||l.root||{},ke=re.input||c.Input||qf;return Ce={...Ce,...P.input??l.input},(0,R.jsxs)(L.Fragment,{children:[!f&&typeof Jf==`function`&&(Hf||=(0,R.jsx)(Jf,{})),(0,R.jsxs)(De,{...Oe,ref:t,onClick:xe,...se,...!vc(De)&&{ownerState:{...Te,...Oe.ownerState}},className:z(Ee.root,Oe.className,o,te&&`MuiInputBase-readOnly`),children:[ie,(0,R.jsx)(Ff.Provider,{value:null,children:(0,R.jsx)(ke,{"aria-invalid":he.error,"aria-describedby":r,autoComplete:i,autoFocus:a,defaultValue:u,disabled:he.disabled,id:g,onAnimationStart:we,name:w,placeholder:j,readOnly:te,required:he.required,rows:ne,value:ce,onKeyDown:ee,onKeyUp:A,type:ae,...Ce,...!vc(ke)&&{as:Se,ownerState:{...Te,...Ce.ownerState}},ref:F,className:z(Ee.input,Ce.className,te&&`MuiInputBase-readOnly`),onBlur:ye,onChange:be,onFocus:ve})}),p,M?M({...he,startAdornment:ie}):null]})]})});function Xf(e){return B(`MuiInput`,e)}var Zf={...Vf,...Jr(`MuiInput`,[`root`,`underline`,`input`])};function Qf(e){return B(`MuiOutlinedInput`,e)}var $f={...Vf,...Jr(`MuiOutlinedInput`,[`root`,`notchedOutline`,`input`])};function ep(e){return B(`MuiFilledInput`,e)}var tp={...Vf,...Jr(`MuiFilledInput`,[`root`,`underline`,`input`,`adornedStart`,`adornedEnd`,`sizeSmall`,`multiline`,`hiddenLabel`])},np=Ss((0,R.jsx)(`path`,{d:`M7 10l5 5 5-5z`}),`ArrowDropDown`);function rp(e){return B(`MuiAutocomplete`,e)}var ip=Jr(`MuiAutocomplete`,`root.expanded.fullWidth.focused.focusVisible.tag.tagSizeSmall.tagSizeMedium.hasPopupIcon.hasClearIcon.inputRoot.input.inputFocused.endAdornment.clearIndicator.popupIndicator.popupIndicatorOpen.popper.popperDisablePortal.paper.listbox.loading.noOptions.option.groupLabel.groupUl`.split(`.`)),ap,op,sp=e=>{let{classes:t,disablePortal:n,expanded:r,focused:i,fullWidth:a,hasClearIcon:o,hasPopupIcon:s,inputFocused:c,popupOpen:l,size:u}=e;return Sa({root:[`root`,r&&`expanded`,i&&`focused`,a&&`fullWidth`,o&&`hasClearIcon`,s&&`hasPopupIcon`],inputRoot:[`inputRoot`],input:[`input`,c&&`inputFocused`],tag:[`tag`,`tagSize${U(u)}`],endAdornment:[`endAdornment`],clearIndicator:[`clearIndicator`],popupIndicator:[`popupIndicator`,l&&`popupIndicatorOpen`],popper:[`popper`,n&&`popperDisablePortal`],paper:[`paper`],listbox:[`listbox`],loading:[`loading`],noOptions:[`noOptions`],option:[`option`],groupLabel:[`groupLabel`],groupUl:[`groupUl`]},rp,t)},cp=H(`div`,{name:`MuiAutocomplete`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e,{fullWidth:r,hasClearIcon:i,hasPopupIcon:a,inputFocused:o,size:s}=n;return[{[`& .${ip.tag}`]:t.tag},{[`& .${ip.tag}`]:t[`tagSize${U(s)}`]},{[`& .${ip.inputRoot}`]:t.inputRoot},{[`& .${ip.input}`]:t.input},{[`& .${ip.input}`]:o&&t.inputFocused},t.root,r&&t.fullWidth,a&&t.hasPopupIcon,i&&t.hasClearIcon]}})({[`&.${ip.focused} .${ip.clearIndicator}`]:{visibility:`visible`},"@media (pointer: fine)":{[`&:hover .${ip.clearIndicator}`]:{visibility:`visible`}},[`& .${ip.tag}`]:{margin:3,maxWidth:`calc(100% - 6px)`},[`& .${ip.inputRoot}`]:{[`.${ip.hasPopupIcon}&, .${ip.hasClearIcon}&`]:{paddingRight:30},[`.${ip.hasPopupIcon}.${ip.hasClearIcon}&`]:{paddingRight:56},[`& .${ip.input}`]:{width:0,minWidth:30}},[`& .${Zf.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:`4px 4px 4px 0px`}},[`& .${Zf.root}.${Vf.sizeSmall}`]:{[`& .${Zf.input}`]:{padding:`2px 4px 3px 0`}},[`& .${$f.root}`]:{padding:9,[`.${ip.hasPopupIcon}&, .${ip.hasClearIcon}&`]:{paddingRight:39},[`.${ip.hasPopupIcon}.${ip.hasClearIcon}&`]:{paddingRight:65},[`& .${ip.input}`]:{padding:`7.5px 4px 7.5px 5px`},[`& .${ip.endAdornment}`]:{right:9}},[`& .${$f.root}.${Vf.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${ip.input}`]:{padding:`2.5px 4px 2.5px 8px`}},[`& .${tp.root}`]:{paddingTop:19,paddingLeft:8,[`.${ip.hasPopupIcon}&, .${ip.hasClearIcon}&`]:{paddingRight:39},[`.${ip.hasPopupIcon}.${ip.hasClearIcon}&`]:{paddingRight:65},[`& .${tp.input}`]:{padding:`7px 4px`},[`& .${ip.endAdornment}`]:{right:9}},[`& .${tp.root}.${Vf.sizeSmall}`]:{paddingBottom:1,[`& .${tp.input}`]:{padding:`2.5px 4px`}},[`& .${Vf.hiddenLabel}`]:{paddingTop:8},[`& .${tp.root}.${Vf.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${ip.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${tp.root}.${Vf.hiddenLabel}.${Vf.sizeSmall}`]:{[`& .${ip.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${ip.input}`]:{flexGrow:1,textOverflow:`ellipsis`,opacity:0},variants:[{props:{fullWidth:!0},style:{width:`100%`}},{props:{size:`small`},style:{[`& .${ip.tag}`]:{margin:2,maxWidth:`calc(100% - 4px)`}}},{props:{inputFocused:!0},style:{[`& .${ip.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${ip.inputRoot}`]:{flexWrap:`wrap`}}}]}),lp=H(`div`,{name:`MuiAutocomplete`,slot:`EndAdornment`})({position:`absolute`,right:0,top:`50%`,transform:`translate(0, -50%)`}),up=H(zl,{name:`MuiAutocomplete`,slot:`ClearIndicator`})({marginRight:-2,padding:4,visibility:`hidden`}),dp=H(zl,{name:`MuiAutocomplete`,slot:`PopupIndicator`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.popupIndicator,n.popupOpen&&t.popupIndicatorOpen]}})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:`rotate(180deg)`}}]}),fp=H(gf,{name:`MuiAutocomplete`,slot:`Popper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${ip.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(gs(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:`absolute`}}]}))),pp=H(Pc,{name:`MuiAutocomplete`,slot:`Paper`})(gs(({theme:e})=>({...e.typography.body1,overflow:`auto`}))),mp=H(`div`,{name:`MuiAutocomplete`,slot:`Loading`})(gs(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:`14px 16px`}))),hp=H(`div`,{name:`MuiAutocomplete`,slot:`NoOptions`})(gs(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:`14px 16px`}))),gp=H(`ul`,{name:`MuiAutocomplete`,slot:`Listbox`})(gs(({theme:e})=>({listStyle:`none`,margin:0,padding:`8px 0`,maxHeight:`40vh`,overflow:`auto`,position:`relative`,[`& .${ip.option}`]:{minHeight:48,display:`flex`,overflow:`hidden`,justifyContent:`flex-start`,alignItems:`center`,cursor:`pointer`,paddingTop:6,boxSizing:`border-box`,outline:`0`,WebkitTapHighlightColor:`transparent`,paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up(`sm`)]:{minHeight:`auto`},[`&.${ip.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:`none`},[`&.${ip.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${ip.focused}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${ip.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}}}))),_p=H(bf,{name:`MuiAutocomplete`,slot:`GroupLabel`})(gs(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),vp=H(`ul`,{name:`MuiAutocomplete`,slot:`GroupUl`})({padding:0,[`& .${ip.option}`]:{paddingLeft:24}}),yp=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiAutocomplete`}),{autoComplete:r=!1,autoHighlight:i=!1,autoSelect:a=!1,blurOnSelect:o=!1,ChipProps:s,className:c,clearIcon:l=ap||=(0,R.jsx)(Bl,{fontSize:`small`}),clearOnBlur:u=!n.freeSolo,clearOnEscape:d=!1,clearText:f=`Clear`,closeText:p=`Close`,componentsProps:m,defaultValue:h=n.multiple?[]:null,disableClearable:g=!1,disableCloseOnSelect:_=!1,disabled:v=!1,disabledItemsFocusable:y=!1,disableListWrap:b=!1,disablePortal:x=!1,filterOptions:S,filterSelectedOptions:C=!1,forcePopupIcon:w=`auto`,freeSolo:T=!1,fullWidth:E=!1,getLimitTagsText:D=e=>`+${e}`,getOptionDisabled:O,getOptionKey:k,getOptionLabel:ee,isOptionEqualToValue:A,groupBy:j,handleHomeEndKeys:te=!n.freeSolo,id:M,includeInputInList:ne=!1,inputValue:N,limitTags:P=-1,ListboxComponent:re,ListboxProps:ie,loading:ae=!1,loadingText:oe=`Loading…`,multiple:se=!1,noOptionsText:ce=`No options`,onChange:le,onClose:ue,onHighlightChange:de,onInputChange:F,onOpen:fe,open:pe,openOnFocus:me=!1,openText:he=`Open`,options:ge,PaperComponent:_e,PopperComponent:I,popupIcon:ve=op||=(0,R.jsx)(np,{}),readOnly:ye=!1,renderGroup:be,renderInput:xe,renderOption:Se,renderTags:Ce,renderValue:we,selectOnFocus:Te=!n.freeSolo,size:Ee=`medium`,slots:De={},slotProps:Oe={},value:ke,...Ae}=n,{getRootProps:je,getInputProps:Me,getInputLabelProps:Ne,getPopupIndicatorProps:Pe,getClearProps:Fe,getItemProps:Ie,getListboxProps:Le,getOptionProps:Re,value:ze,dirty:Be,expanded:Ve,id:He,popupOpen:Ue,focused:We,focusedItem:Ge,anchorEl:Ke,setAnchorEl:qe,inputValue:Je,groupedOptions:Ye}=cu({...n,componentName:`Autocomplete`}),Xe=!g&&!v&&Be&&!ye,Ze=(!T||w===!0)&&w!==!1,{onMouseDown:Qe}=Me(),{ref:$e,...et}=Le(),tt=ee||(e=>e.label??e),nt={...n,disablePortal:x,expanded:Ve,focused:We,fullWidth:E,getOptionLabel:tt,hasClearIcon:Xe,hasPopupIcon:Ze,inputFocused:Ge===-1,popupOpen:Ue,size:Ee},rt=sp(nt),it={slots:{paper:_e,popper:I,...De},slotProps:{chip:s,listbox:ie,...m,...Oe}},[at,ot]=wc(`listbox`,{elementType:gp,externalForwardedProps:it,ownerState:nt,className:rt.listbox,additionalProps:et,ref:$e}),[st,ct]=wc(`paper`,{elementType:Pc,externalForwardedProps:it,ownerState:nt,className:rt.paper}),[lt,ut]=wc(`popper`,{elementType:gf,externalForwardedProps:it,ownerState:nt,className:rt.popper,additionalProps:{disablePortal:x,style:{width:Ke?Ke.clientWidth:null},role:`presentation`,anchorEl:Ke,open:Ue}}),dt,ft=e=>({className:rt.tag,disabled:v,...Ie(e)});if(se?ze.length>0&&(dt=Ce?Ce(ze,ft,nt):we?we(ze,ft,nt):ze.map((e,t)=>{let{key:n,...r}=ft({index:t});return(0,R.jsx)(Of,{label:tt(e),size:Ee,...r,...it.slotProps.chip},n)})):we&&ze!=null&&(dt=we(ze,ft,nt)),P>-1&&Array.isArray(dt)){let e=dt.length-P;!We&&e>0&&(dt=dt.splice(0,P),dt.push((0,R.jsx)(`span`,{className:rt.tag,children:D(e)},dt.length)))}let pt=be||(e=>(0,R.jsxs)(`li`,{children:[(0,R.jsx)(_p,{className:rt.groupLabel,ownerState:nt,component:`div`,children:e.group}),(0,R.jsx)(vp,{className:rt.groupUl,ownerState:nt,children:e.children})]},e.key)),mt=Se||((e,t)=>{let{key:n,...r}=e;return(0,R.jsx)(`li`,{...r,children:tt(t)},n)}),ht=(e,t)=>{let n=Re({option:e,index:t});return mt({...n,className:rt.option},e,{selected:n[`aria-selected`],index:t,inputValue:Je},nt)},gt=it.slotProps.clearIndicator,_t=it.slotProps.popupIndicator;return(0,R.jsxs)(L.Fragment,{children:[(0,R.jsx)(cp,{ref:t,className:z(rt.root,c),ownerState:nt,...je(Ae),children:xe({id:He,disabled:v,fullWidth:n.fullWidth??!0,size:Ee===`small`?`small`:void 0,InputLabelProps:Ne(),InputProps:{ref:qe,className:rt.inputRoot,startAdornment:dt,onMouseDown:e=>{e.target===e.currentTarget&&Qe(e)},...(Xe||Ze)&&{endAdornment:(0,R.jsxs)(lp,{className:rt.endAdornment,ownerState:nt,children:[Xe?(0,R.jsx)(up,{...Fe(),"aria-label":f,title:f,ownerState:nt,...gt,className:z(rt.clearIndicator,gt?.className),children:l}):null,Ze?(0,R.jsx)(dp,{...Pe(),disabled:v,"aria-label":Ue?p:he,title:Ue?p:he,ownerState:nt,..._t,className:z(rt.popupIndicator,_t?.className),children:ve}):null]})}},inputProps:{className:rt.input,disabled:v,readOnly:ye,...Me()}})}),Ke?(0,R.jsx)(fp,{as:lt,...ut,children:(0,R.jsxs)(pp,{as:st,...ct,children:[ae&&Ye.length===0?(0,R.jsx)(mp,{className:rt.loading,ownerState:nt,children:oe}):null,Ye.length===0&&!T&&!ae?(0,R.jsx)(hp,{className:rt.noOptions,ownerState:nt,role:`presentation`,onMouseDown:e=>{e.preventDefault()},children:ce}):null,Ye.length>0?(0,R.jsx)(at,{as:re,...ot,children:Ye.map((e,t)=>j?pt({key:e.key,group:e.group,children:e.options.map((t,n)=>ht(t,e.index+n))}):ht(e,t))}):null]})}):null]})}),bp=Ss((0,R.jsx)(`path`,{d:`M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z`}),`Person`);function xp(e){return B(`MuiAvatar`,e)}Jr(`MuiAvatar`,[`root`,`colorDefault`,`circular`,`rounded`,`square`,`img`,`fallback`]);var Sp=e=>{let{classes:t,variant:n,colorDefault:r}=e;return Sa({root:[`root`,n,r&&`colorDefault`],img:[`img`],fallback:[`fallback`]},xp,t)},Cp=H(`div`,{name:`MuiAvatar`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(gs(({theme:e})=>({position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:`50%`,overflow:`hidden`,userSelect:`none`,variants:[{props:{variant:`rounded`},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:`square`},style:{borderRadius:0}},{props:{colorDefault:!0},style:{color:(e.vars||e).palette.background.default,...e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.grey[400],...e.applyStyles(`dark`,{backgroundColor:e.palette.grey[600]})}}}]}))),wp=H(`img`,{name:`MuiAvatar`,slot:`Img`})({width:`100%`,height:`100%`,textAlign:`center`,objectFit:`cover`,color:`transparent`,textIndent:1e4}),Tp=H(bp,{name:`MuiAvatar`,slot:`Fallback`})({width:`75%`,height:`75%`});function Ep({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){let[i,a]=L.useState(!1);return L.useEffect(()=>{if(!n&&!r)return;a(!1);let i=!0,o=new Image;return o.onload=()=>{i&&a(`loaded`)},o.onerror=()=>{i&&a(`error`)},o.crossOrigin=e,o.referrerPolicy=t,o.src=n,r&&(o.srcset=r),()=>{i=!1}},[e,t,n,r]),i}var Dp=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiAvatar`}),{alt:r,children:i,className:a,component:o=`div`,slots:s={},slotProps:c={},imgProps:l,sizes:u,src:d,srcSet:f,variant:p=`circular`,...m}=n,h=null,g={...n,component:o,variant:p},_=Ep({...l,...typeof c.img==`function`?c.img(g):c.img,src:d,srcSet:f}),v=d||f,y=v&&_!==`error`;g.colorDefault=!y,delete g.ownerState;let b=Sp(g),[x,S]=wc(`root`,{ref:t,className:z(b.root,a),elementType:Cp,externalForwardedProps:{slots:s,slotProps:c,component:o,...m},ownerState:g}),[C,w]=wc(`img`,{className:b.img,elementType:wp,externalForwardedProps:{slots:s,slotProps:{img:{...l,...c.img}}},additionalProps:{alt:r,src:d,srcSet:f,sizes:u},ownerState:g}),[T,E]=wc(`fallback`,{className:b.fallback,elementType:Tp,externalForwardedProps:{slots:s,slotProps:c},shouldForwardComponentProp:!0,ownerState:g});return h=y?(0,R.jsx)(C,{...w}):i||i===0?i:v&&r?r[0]:(0,R.jsx)(T,{...E}),(0,R.jsx)(x,{...S,children:h})}),Op={entering:{opacity:1},entered:{opacity:1}},kp=L.forwardRef(function(e,t){let n=ts(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:o,easing:s,in:c,onEnter:l,onEntered:u,onEntering:d,onExit:f,onExited:p,onExiting:m,style:h,timeout:g=r,TransitionComponent:_=$s,...v}=e,y=L.useRef(null),b=Rs(y,af(o),t),x=e=>t=>{if(e){let n=y.current;t===void 0?e(n):e(n,t)}},S=x(d),C=x((e,t)=>{gc(e);let r=_c({style:h,timeout:g,easing:s},{mode:`enter`});e.style.webkitTransition=n.transitions.create(`opacity`,r),e.style.transition=n.transitions.create(`opacity`,r),l&&l(e,t)}),w=x(u),T=x(m),E=x(e=>{let t=_c({style:h,timeout:g,easing:s},{mode:`exit`});e.style.webkitTransition=n.transitions.create(`opacity`,t),e.style.transition=n.transitions.create(`opacity`,t),f&&f(e)}),D=x(p);return(0,R.jsx)(_,{appear:a,in:c,nodeRef:y,onEnter:C,onEntered:w,onEntering:S,onExit:E,onExited:D,onExiting:T,addEndListener:e=>{i&&i(y.current,e)},timeout:g,...v,children:(e,{ownerState:t,...n})=>L.cloneElement(o,{style:{opacity:0,visibility:e===`exited`&&!c?`hidden`:void 0,...Op[e],...h,...o.props.style},ref:b,...n})})});function Ap(e){return B(`MuiBackdrop`,e)}Jr(`MuiBackdrop`,[`root`,`invisible`]);var jp=e=>{let{classes:t,invisible:n}=e;return Sa({root:[`root`,n&&`invisible`]},Ap,t)},Mp=H(`div`,{name:`MuiBackdrop`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:`fixed`,display:`flex`,alignItems:`center`,justifyContent:`center`,right:0,bottom:0,top:0,left:0,backgroundColor:`rgba(0, 0, 0, 0.5)`,WebkitTapHighlightColor:`transparent`,variants:[{props:{invisible:!0},style:{backgroundColor:`transparent`}}]}),Np=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiBackdrop`}),{children:r,className:i,component:a=`div`,invisible:o=!1,open:s,components:c={},componentsProps:l={},slotProps:u={},slots:d={},TransitionComponent:f,transitionDuration:p,...m}=n,h={...n,component:a,invisible:o},g=jp(h),_={component:a,slots:{transition:f,root:c.Root,...d},slotProps:{...l,...u}},[v,y]=wc(`root`,{elementType:Mp,externalForwardedProps:_,className:z(g.root,i),ownerState:h}),[b,x]=wc(`transition`,{elementType:kp,externalForwardedProps:_,ownerState:h});return(0,R.jsx)(b,{in:s,timeout:p,...m,...x,children:(0,R.jsx)(v,{"aria-hidden":!0,...y,ref:t,children:r})})});function Pp(e){let{badgeContent:t,invisible:n=!1,max:r=99,showZero:i=!1}=e,a=$l({badgeContent:t,max:r}),o=n;n===!1&&t===0&&!i&&(o=!0);let{badgeContent:s,max:c=r}=o?a:e,l=s&&Number(s)>c?`${c}+`:s;return{badgeContent:s,invisible:o,max:c,displayValue:l}}function Fp(e){return B(`MuiBadge`,e)}var Ip=Jr(`MuiBadge`,[`root`,`badge`,`dot`,`standard`,`anchorOriginTopRight`,`anchorOriginBottomRight`,`anchorOriginTopLeft`,`anchorOriginBottomLeft`,`invisible`,`colorError`,`colorInfo`,`colorPrimary`,`colorSecondary`,`colorSuccess`,`colorWarning`,`overlapRectangular`,`overlapCircular`,`anchorOriginTopLeftCircular`,`anchorOriginTopLeftRectangular`,`anchorOriginTopRightCircular`,`anchorOriginTopRightRectangular`,`anchorOriginBottomLeftCircular`,`anchorOriginBottomLeftRectangular`,`anchorOriginBottomRightCircular`,`anchorOriginBottomRightRectangular`]),Lp=10,Rp=4,zp=e=>{let{color:t,anchorOrigin:n,invisible:r,overlap:i,variant:a,classes:o={}}=e;return Sa({root:[`root`],badge:[`badge`,a,r&&`invisible`,`anchorOrigin${U(n.vertical)}${U(n.horizontal)}`,`anchorOrigin${U(n.vertical)}${U(n.horizontal)}${U(i)}`,`overlap${U(i)}`,t!==`default`&&`color${U(t)}`]},Fp,o)},Bp=H(`span`,{name:`MuiBadge`,slot:`Root`})({position:`relative`,display:`inline-flex`,verticalAlign:`middle`,flexShrink:0}),Vp=H(`span`,{name:`MuiBadge`,slot:`Badge`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${U(n.anchorOrigin.vertical)}${U(n.anchorOrigin.horizontal)}${U(n.overlap)}`],n.color!==`default`&&t[`color${U(n.color)}`],n.invisible&&t.invisible]}})(gs(({theme:e})=>({display:`flex`,flexDirection:`row`,flexWrap:`wrap`,justifyContent:`center`,alignContent:`center`,alignItems:`center`,position:`absolute`,boxSizing:`border-box`,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:Lp*2,lineHeight:1,padding:`0 6px`,height:Lp*2,borderRadius:Lp,zIndex:1,transition:e.transitions.create(`transform`,{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.entries(e.palette).filter(xl([`contrastText`])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText}})),{props:{variant:`dot`},style:{borderRadius:Rp,height:Rp*2,minWidth:Rp*2,padding:0}},{props:{invisible:!0},style:{transition:e.transitions.create(`transform`,{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}},{style:({ownerState:e})=>{let{vertical:t,horizontal:n}=e.anchorOrigin,r=e.overlap===`circular`?`14%`:0;return{"--Badge-translateX":n===`right`?`50%`:`-50%`,"--Badge-translateY":t===`top`?`-50%`:`50%`,top:t===`top`?r:`initial`,bottom:t===`bottom`?r:`initial`,right:n===`right`?r:`initial`,left:n===`left`?r:`initial`,transform:`scale(1) translate(var(--Badge-translateX), var(--Badge-translateY))`,transformOrigin:`${n===`right`?`100%`:`0%`} ${t===`top`?`0%`:`100%`}`,[`&.${Ip.invisible}`]:{transform:`scale(0) translate(var(--Badge-translateX), var(--Badge-translateY))`}}}}]})));function Hp(e){return{vertical:e?.vertical??`top`,horizontal:e?.horizontal??`right`}}var Up=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiBadge`}),{anchorOrigin:r,className:i,classes:a,component:o,components:s={},componentsProps:c={},children:l,overlap:u=`rectangular`,color:d=`default`,invisible:f=!1,max:p=99,badgeContent:m,slots:h,slotProps:g,showZero:_=!1,variant:v=`standard`,...y}=n,{badgeContent:b,invisible:x,max:S,displayValue:C}=Pp({max:p,invisible:f,badgeContent:m,showZero:_}),w=$l({anchorOrigin:Hp(r),color:d,overlap:u,variant:v,badgeContent:m}),T=x||b==null&&v!==`dot`,{color:E=d,overlap:D=u,anchorOrigin:O,variant:k=v}=T?w:n,ee=Hp(O),A=k===`dot`?void 0:C,j={...n,badgeContent:b,invisible:T,max:S,displayValue:A,showZero:_,anchorOrigin:ee,color:E,overlap:D,variant:k},te=zp(j),M={slots:{root:h?.root??s.Root,badge:h?.badge??s.Badge},slotProps:{root:g?.root??c.root,badge:g?.badge??c.badge}},[ne,N]=wc(`root`,{elementType:Bp,externalForwardedProps:{...M,...y},ownerState:j,className:z(te.root,i),ref:t,additionalProps:{as:o}}),[P,re]=wc(`badge`,{elementType:Vp,externalForwardedProps:M,ownerState:j,className:te.badge});return(0,R.jsxs)(ne,{...N,children:[l,(0,R.jsx)(P,{...re,children:A})]})}),Wp=Jr(`MuiBox`,[`root`]),G=Kr({themeId:O,defaultTheme:$o(),defaultClassName:Wp.root,generateClassName:Wr.generate});function Gp(e){return B(`MuiButton`,e)}var Kp=Jr(`MuiButton`,`root.text.textInherit.textPrimary.textSecondary.textSuccess.textError.textInfo.textWarning.outlined.outlinedInherit.outlinedPrimary.outlinedSecondary.outlinedSuccess.outlinedError.outlinedInfo.outlinedWarning.contained.containedInherit.containedPrimary.containedSecondary.containedSuccess.containedError.containedInfo.containedWarning.disableElevation.focusVisible.disabled.colorInherit.colorPrimary.colorSecondary.colorSuccess.colorError.colorInfo.colorWarning.textSizeSmall.textSizeMedium.textSizeLarge.outlinedSizeSmall.outlinedSizeMedium.outlinedSizeLarge.containedSizeSmall.containedSizeMedium.containedSizeLarge.sizeMedium.sizeSmall.sizeLarge.fullWidth.startIcon.endIcon.icon.iconSizeSmall.iconSizeMedium.iconSizeLarge.loading.loadingWrapper.loadingIconPlaceholder.loadingIndicator.loadingPositionCenter.loadingPositionStart.loadingPositionEnd`.split(`.`)),qp=L.createContext({}),Jp=L.createContext(void 0),Yp=e=>{let{color:t,disableElevation:n,fullWidth:r,size:i,variant:a,loading:o,loadingPosition:s,classes:c}=e,l=Sa({root:[`root`,o&&`loading`,a,`${a}${U(t)}`,`size${U(i)}`,`${a}Size${U(i)}`,`color${U(t)}`,n&&`disableElevation`,r&&`fullWidth`,o&&`loadingPosition${U(s)}`],startIcon:[`icon`,`startIcon`,`iconSize${U(i)}`],endIcon:[`icon`,`endIcon`,`iconSize${U(i)}`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},Gp,c);return{...c,...l}},Xp=[{props:{size:`small`},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:`medium`},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:`large`},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],Zp=H(ul,{shouldForwardProp:e=>rs(e)||e===`classes`,name:`MuiButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${U(n.color)}`],t[`size${U(n.size)}`],t[`${n.variant}Size${U(n.size)}`],n.color===`inherit`&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(gs(({theme:e})=>{let t=e.palette.mode===`light`?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode===`light`?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:`6px 16px`,border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create([`background-color`,`box-shadow`,`border-color`,`color`],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:`none`},[`&.${Kp.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:`contained`},style:{color:`var(--variant-containedColor)`,backgroundColor:`var(--variant-containedBg)`,boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${Kp.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${Kp.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:`outlined`},style:{padding:`5px 15px`,border:`1px solid currentColor`,borderColor:`var(--variant-outlinedBorder, currentColor)`,backgroundColor:`var(--variant-outlinedBg)`,color:`var(--variant-outlinedColor)`,[`&.${Kp.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:`text`},style:{padding:`6px 8px`,color:`var(--variant-textColor)`,backgroundColor:`var(--variant-textBg)`}},...Object.entries(e.palette).filter(xl()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:`inherit`},style:{color:`inherit`,borderColor:`currentColor`,"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:`small`,variant:`text`},style:{padding:`4px 5px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`text`},style:{padding:`8px 11px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`outlined`},style:{padding:`3px 9px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`outlined`},style:{padding:`7px 21px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`contained`},style:{padding:`4px 10px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`contained`},style:{padding:`8px 22px`,fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:`none`,"&:hover":{boxShadow:`none`},[`&.${Kp.focusVisible}`]:{boxShadow:`none`},"&:active":{boxShadow:`none`},[`&.${Kp.disabled}`]:{boxShadow:`none`}}},{props:{fullWidth:!0},style:{width:`100%`}},{props:{loadingPosition:`center`},style:{transition:e.transitions.create([`background-color`,`box-shadow`,`border-color`],{duration:e.transitions.duration.short}),[`&.${Kp.loading}`]:{color:`transparent`}}}]}})),Qp=H(`span`,{name:`MuiButton`,slot:`StartIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${U(n.size)}`]]}})(({theme:e})=>({display:`inherit`,marginRight:8,marginLeft:-4,variants:[{props:{size:`small`},style:{marginLeft:-2}},{props:{loadingPosition:`start`,loading:!0},style:{transition:e.transitions.create([`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`start`,loading:!0,fullWidth:!0},style:{marginRight:-8}},...Xp]})),$p=H(`span`,{name:`MuiButton`,slot:`EndIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${U(n.size)}`]]}})(({theme:e})=>({display:`inherit`,marginRight:-4,marginLeft:8,variants:[{props:{size:`small`},style:{marginRight:-2}},{props:{loadingPosition:`end`,loading:!0},style:{transition:e.transitions.create([`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`end`,loading:!0,fullWidth:!0},style:{marginLeft:-8}},...Xp]})),eee=H(`span`,{name:`MuiButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,variants:[{props:{loading:!0},style:{display:`flex`}},{props:{loadingPosition:`start`},style:{left:14}},{props:{loadingPosition:`start`,size:`small`},style:{left:10}},{props:{variant:`text`,loadingPosition:`start`},style:{left:6}},{props:{loadingPosition:`center`},style:{left:`50%`,transform:`translate(-50%)`,color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:`end`},style:{right:14}},{props:{loadingPosition:`end`,size:`small`},style:{right:10}},{props:{variant:`text`,loadingPosition:`end`},style:{right:6}},{props:{loadingPosition:`start`,fullWidth:!0},style:{position:`relative`,left:-10}},{props:{loadingPosition:`end`,fullWidth:!0},style:{position:`relative`,right:-10}}]})),em=H(`span`,{name:`MuiButton`,slot:`LoadingIconPlaceholder`})({display:`inline-block`,width:`1em`,height:`1em`}),K=L.forwardRef(function(e,t){let n=L.useContext(qp),r=L.useContext(Jp),i=_s({props:ci(n,e),name:`MuiButton`}),{children:a,color:o=`primary`,component:s=`button`,className:c,disabled:l=!1,disableElevation:u=!1,disableFocusRipple:d=!1,endIcon:f,focusVisibleClassName:p,fullWidth:m=!1,id:h,loading:g=null,loadingIndicator:_,loadingPosition:v=`center`,size:y=`medium`,startIcon:b,type:x,variant:S=`text`,...C}=i,w=Ms(h),T=_??(0,R.jsx)(Nl,{"aria-labelledby":w,color:`inherit`,size:16}),E={...i,color:o,component:s,disabled:l,disableElevation:u,disableFocusRipple:d,fullWidth:m,loading:g,loadingIndicator:T,loadingPosition:v,size:y,type:x,variant:S},D=Yp(E),O=(b||g&&v===`start`)&&(0,R.jsx)(Qp,{className:D.startIcon,ownerState:E,children:b||(0,R.jsx)(em,{className:D.loadingIconPlaceholder,ownerState:E})}),k=(f||g&&v===`end`)&&(0,R.jsx)($p,{className:D.endIcon,ownerState:E,children:f||(0,R.jsx)(em,{className:D.loadingIconPlaceholder,ownerState:E})}),ee=r||``,A=typeof g==`boolean`?(0,R.jsx)(`span`,{className:D.loadingWrapper,style:{display:`contents`},children:g&&(0,R.jsx)(eee,{className:D.loadingIndicator,ownerState:E,children:T})}):null;return(0,R.jsxs)(Zp,{ownerState:E,className:z(n.className,D.root,c,ee),component:s,disabled:l||g,focusRipple:!d,focusVisibleClassName:z(D.focusVisible,p),ref:t,type:x,id:g?w:h,...C,classes:D,children:[O,v!==`end`&&A,a,v===`end`&&A,k]})});function tm(e){return B(`MuiCard`,e)}Jr(`MuiCard`,[`root`]);var nm=e=>{let{classes:t}=e;return Sa({root:[`root`]},tm,t)},rm=H(Pc,{name:`MuiCard`,slot:`Root`})({overflow:`hidden`}),im=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiCard`}),{className:r,raised:i=!1,...a}=n,o={...n,raised:i};return(0,R.jsx)(rm,{className:z(nm(o).root,r),elevation:i?8:void 0,ref:t,ownerState:o,...a})});function am(e){return B(`MuiCardContent`,e)}Jr(`MuiCardContent`,[`root`]);var om=e=>{let{classes:t}=e;return Sa({root:[`root`]},am,t)},sm=H(`div`,{name:`MuiCardContent`,slot:`Root`})({padding:16,"&:last-child":{paddingBottom:24}}),cm=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiCardContent`}),{className:r,component:i=`div`,...a}=n,o={...n,component:i};return(0,R.jsx)(sm,{as:i,className:z(om(o).root,r),ownerState:o,ref:t,...a})});function lm(e){return B(`PrivateSwitchBase`,e)}Jr(`PrivateSwitchBase`,[`root`,`checked`,`disabled`,`input`,`edgeStart`,`edgeEnd`]);var um=e=>{let{classes:t,checked:n,disabled:r,edge:i}=e;return Sa({root:[`root`,n&&`checked`,r&&`disabled`,i&&`edge${U(i)}`],input:[`input`]},lm,t)},dm=H(ul,{name:`MuiSwitchBase`})({padding:9,borderRadius:`50%`,variants:[{props:{edge:`start`,size:`small`},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e===`start`&&t.size!==`small`,style:{marginLeft:-12}},{props:{edge:`end`,size:`small`},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e===`end`&&t.size!==`small`,style:{marginRight:-12}}]}),fm=H(`input`,{name:`MuiSwitchBase`,shouldForwardProp:rs})({cursor:`inherit`,position:`absolute`,opacity:0,width:`100%`,height:`100%`,top:0,left:0,margin:0,padding:0,zIndex:1}),pm=L.forwardRef(function(e,t){let{autoFocus:n,checked:r,checkedIcon:i,defaultChecked:a,disabled:o,disableFocusRipple:s=!1,edge:c=!1,icon:l,id:u,inputProps:d,inputRef:f,name:p,onBlur:m,onChange:h,onFocus:g,readOnly:_,required:v=!1,tabIndex:y,type:b,value:x,slots:S={},slotProps:C={},...w}=e,[T,E]=Ps({controlled:r,default:!!a,name:`SwitchBase`,state:`checked`}),D=If(),O=e=>{g&&g(e),D&&D.onFocus&&D.onFocus(e)},k=e=>{m&&m(e),D&&D.onBlur&&D.onBlur(e)},ee=e=>{if(e.nativeEvent.defaultPrevented||_)return;let t=e.target.checked;E(t),h&&h(e,t)},A=o;D&&A===void 0&&(A=D.disabled);let j=b===`checkbox`||b===`radio`,te={...e,checked:T,disabled:A,disableFocusRipple:s,edge:c},M=um(te),ne={slots:S,slotProps:{input:d,...C}},[N,P]=wc(`root`,{ref:t,elementType:dm,className:M.root,shouldForwardComponentProp:!0,externalForwardedProps:{...ne,component:`span`,...w},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),O(t)},onBlur:t=>{e.onBlur?.(t),k(t)}}),ownerState:te,additionalProps:{centerRipple:!0,focusRipple:!s,role:void 0,tabIndex:null}}),[re,ie]=wc(`input`,{ref:f,elementType:fm,className:M.input,externalForwardedProps:ne,getSlotProps:e=>({...e,onChange:t=>{e.onChange?.(t),ee(t)}}),ownerState:te,additionalProps:{autoFocus:n,checked:r,defaultChecked:a,disabled:A,id:j?u:void 0,name:p,readOnly:_,required:v,tabIndex:y,type:b,...b===`checkbox`&&x===void 0?{}:{value:x}}});return(0,R.jsxs)(N,{...P,children:[(0,R.jsx)(re,{...ie}),T?i:l]})}),mm=Ss((0,R.jsx)(`path`,{d:`M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z`}),`CheckBoxOutlineBlank`),tee=Ss((0,R.jsx)(`path`,{d:`M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z`}),`CheckBox`),nee=Ss((0,R.jsx)(`path`,{d:`M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z`}),`IndeterminateCheckBox`);function ree(e){return B(`MuiCheckbox`,e)}var hm=Jr(`MuiCheckbox`,[`root`,`checked`,`disabled`,`indeterminate`,`colorPrimary`,`colorSecondary`,`sizeSmall`,`sizeMedium`]),iee=e=>{let{classes:t,indeterminate:n,color:r,size:i}=e,a=Sa({root:[`root`,n&&`indeterminate`,`color${U(r)}`,`size${U(i)}`]},ree,t);return{...t,...a}},aee=H(pm,{shouldForwardProp:e=>rs(e)||e===`classes`,name:`MuiCheckbox`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${U(n.size)}`],n.color!==`default`&&t[`color${U(n.color)}`]]}})(gs(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:`default`,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(xl()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(xl()).map(([t])=>({props:{color:t},style:{[`&.${hm.checked}, &.${hm.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${hm.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:`transparent`}}}}]}))),oee=(0,R.jsx)(tee,{}),see=(0,R.jsx)(mm,{}),gm=(0,R.jsx)(nee,{}),_m=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiCheckbox`}),{checkedIcon:r=oee,color:i=`primary`,icon:a=see,indeterminate:o=!1,indeterminateIcon:s=gm,inputProps:c,size:l=`medium`,disableRipple:u=!1,className:d,slots:f={},slotProps:p={},...m}=n,h=o?s:a,g=o?s:r,_={...n,disableRipple:u,color:i,indeterminate:o,size:l},v=iee(_),y=p.input??c,[b,x]=wc(`root`,{ref:t,elementType:aee,className:z(v.root,d),shouldForwardComponentProp:!0,externalForwardedProps:{slots:f,slotProps:p,...m},ownerState:_,additionalProps:{type:`checkbox`,icon:L.cloneElement(h,{fontSize:h.props.fontSize??l}),checkedIcon:L.cloneElement(g,{fontSize:g.props.fontSize??l}),disableRipple:u,slots:f,slotProps:{input:Bs(typeof y==`function`?y(_):y,{"data-indeterminate":o})}}});return(0,R.jsx)(b,{...x,classes:v})}),vm=typeof ms({})==`function`,ym=(e,t)=>({WebkitFontSmoothing:`antialiased`,MozOsxFontSmoothing:`grayscale`,boxSizing:`border-box`,WebkitTextSizeAdjust:`100%`,...t&&!e.vars&&{colorScheme:e.palette.mode}}),bm=e=>({color:(e.vars||e).palette.text.primary,...e.typography.body1,backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),xm=(e,t=!1)=>{let n={};t&&e.colorSchemes&&typeof e.getColorSchemeSelector==`function`&&Object.entries(e.colorSchemes).forEach(([t,r])=>{let i=e.getColorSchemeSelector(t);i.startsWith(`@`)?n[i]={":root":{colorScheme:r.palette?.mode}}:n[i.replace(/\s*&/,``)]={colorScheme:r.palette?.mode}});let r={html:ym(e,t),"*, *::before, *::after":{boxSizing:`inherit`},"strong, b":{fontWeight:e.typography.fontWeightBold},body:{margin:0,...bm(e),"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}},...n},i=e.components?.MuiCssBaseline?.styleOverrides;return i&&(r=[r,i]),r},Sm=`mui-ecs`,Cm=e=>{let t=xm(e,!1),n=Array.isArray(t)?t[0]:t;return!e.vars&&n&&(n.html[`:root:has(${Sm})`]={colorScheme:e.palette.mode}),e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([t,r])=>{let i=e.getColorSchemeSelector(t);i.startsWith(`@`)?n[i]={[`:root:not(:has(.${Sm}))`]:{colorScheme:r.palette?.mode}}:n[i.replace(/\s*&/,``)]={[`&:not(:has(.${Sm}))`]:{colorScheme:r.palette?.mode}}}),t},wm=ms(vm?({theme:e,enableColorScheme:t})=>xm(e,t):({theme:e})=>Cm(e));function Tm(e){let{children:t,enableColorScheme:n=!1}=_s({props:e,name:`MuiCssBaseline`});return(0,R.jsxs)(L.Fragment,{children:[vm&&(0,R.jsx)(wm,{enableColorScheme:n}),!vm&&!n&&(0,R.jsx)(`span`,{className:Sm,style:{display:`none`}}),t]})}function Em(e=window){let t=e.document.documentElement.clientWidth;return e.innerWidth-t}function Dm(e){let t=Es(e);return t.body===e?Os(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Om(e,t){t?e.setAttribute(`aria-hidden`,`true`):e.removeAttribute(`aria-hidden`)}function km(e){return parseFloat(Os(e).getComputedStyle(e).paddingRight)||0}function Am(e){let t=[`TEMPLATE`,`SCRIPT`,`STYLE`,`LINK`,`MAP`,`META`,`NOSCRIPT`,`PICTURE`,`COL`,`COLGROUP`,`PARAM`,`SLOT`,`SOURCE`,`TRACK`].includes(e.tagName),n=e.tagName===`INPUT`&&e.getAttribute(`type`)===`hidden`;return t||n}function jm(e,t,n,r,i){let a=[t,n,...r];[].forEach.call(e.children,e=>{let t=!a.includes(e),n=!Am(e);t&&n&&Om(e,i)})}function Mm(e,t){let n=-1;return e.some((e,r)=>t(e)?(n=r,!0):!1),n}function Nm(e,t){let n=[],r=e.container;if(!t.disableScrollLock){if(Dm(r)){let e=Em(Os(r));n.push({value:r.style.paddingRight,property:`padding-right`,el:r}),r.style.paddingRight=`${km(r)+e}px`;let t=Es(r).querySelectorAll(`.mui-fixed`);[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:`padding-right`,el:t}),t.style.paddingRight=`${km(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=Es(r).body;else{let t=r.parentElement,n=Os(r);e=t?.nodeName===`HTML`&&n.getComputedStyle(t).overflowY===`scroll`?t:r}n.push({value:e.style.overflow,property:`overflow`,el:e},{value:e.style.overflowX,property:`overflow-x`,el:e},{value:e.style.overflowY,property:`overflow-y`,el:e}),e.style.overflow=`hidden`}return()=>{n.forEach(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}function Pm(e){let t=[];return[].forEach.call(e.children,e=>{e.getAttribute(`aria-hidden`)===`true`&&t.push(e)}),t}var Fm=class{constructor(){this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(n!==-1)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&Om(e.modalRef,!1);let r=Pm(t);jm(t,e.mount,e.modalRef,r,!0);let i=Mm(this.containers,e=>e.container===t);return i===-1?(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n):(this.containers[i].modals.push(e),n)}mount(e,t){let n=Mm(this.containers,t=>t.modals.includes(e)),r=this.containers[n];r.restore||=Nm(r,t)}remove(e,t=!0){let n=this.modals.indexOf(e);if(n===-1)return n;let r=Mm(this.containers,t=>t.modals.includes(e)),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),i.modals.length===0)i.restore&&i.restore(),e.modalRef&&Om(e.modalRef,t),jm(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{let e=i.modals[i.modals.length-1];e.modalRef&&Om(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function Im(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}var Lm=Im,Rm=[`input`,`select`,`textarea`,`a[href]`,`button`,`[tabindex]`,`audio[controls]`,`video[controls]`,`[contenteditable]:not([contenteditable="false"])`].join(`,`);function zm(e){let t=parseInt(e.getAttribute(`tabindex`)||``,10);return Number.isNaN(t)?e.contentEditable===`true`||(e.nodeName===`AUDIO`||e.nodeName===`VIDEO`||e.nodeName===`DETAILS`)&&e.getAttribute(`tabindex`)===null?0:e.tabIndex:t}function Bm(e){if(e.tagName!==`INPUT`||e.type!==`radio`||!e.name)return!1;let t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`),n=t(`[name="${e.name}"]:checked`);return n||=t(`[name="${e.name}"]`),n!==e}function Vm(e){return!(e.disabled||e.tagName===`INPUT`&&e.type===`hidden`||Bm(e))}function Hm(e){let t=[],n=[];return Array.from(e.querySelectorAll(Rm)).forEach((e,r)=>{let i=zm(e);i===-1||!Vm(e)||(i===0?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function Um(){return!0}function Wm(e){let{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:a=Hm,isEnabled:o=Um,open:s}=e,c=L.useRef(!1),l=L.useRef(null),u=L.useRef(null),d=L.useRef(null),f=L.useRef(null),p=L.useRef(!1),m=L.useRef(null),h=Ls(af(t),m),g=L.useRef(null);L.useEffect(()=>{!s||!m.current||(p.current=!n)},[n,s]),L.useEffect(()=>{if(!s||!m.current)return;let e=Lm(Es(m.current));return m.current.contains(e)||(m.current.hasAttribute(`tabIndex`)||m.current.setAttribute(`tabIndex`,`-1`),p.current&&m.current.focus()),()=>{i||(d.current&&d.current.focus&&(c.current=!0,d.current.focus()),d.current=null)}},[s]),L.useEffect(()=>{if(!s||!m.current)return;let e=Es(m.current),t=t=>{g.current=t,!(r||!o()||t.key!==`Tab`)&&Lm(e)===m.current&&t.shiftKey&&(c.current=!0,u.current&&u.current.focus())},n=()=>{let t=m.current;if(t===null)return;let n=Lm(e);if(!e.hasFocus()||!o()||c.current){c.current=!1;return}if(t.contains(n)||r&&n!==l.current&&n!==u.current)return;if(n!==f.current)f.current=null;else if(f.current!==null)return;if(!p.current)return;let i=[];if((n===l.current||n===u.current)&&(i=a(m.current)),i.length>0){let e=!!(g.current?.shiftKey&&g.current?.key===`Tab`),t=i[0],n=i[i.length-1];typeof t!=`string`&&typeof n!=`string`&&(e?n.focus():t.focus())}else t.focus()};e.addEventListener(`focusin`,n),e.addEventListener(`keydown`,t,!0);let i=setInterval(()=>{let t=Lm(e);t&&t.tagName===`BODY`&&n()},50);return()=>{clearInterval(i),e.removeEventListener(`focusin`,n),e.removeEventListener(`keydown`,t,!0)}},[n,r,i,o,s,a]);let _=e=>{d.current===null&&(d.current=e.relatedTarget),p.current=!0,f.current=e.target;let n=t.props.onFocus;n&&n(e)},v=e=>{d.current===null&&(d.current=e.relatedTarget),p.current=!0};return(0,R.jsxs)(L.Fragment,{children:[(0,R.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:l,"data-testid":`sentinelStart`}),L.cloneElement(t,{ref:h,onFocus:_}),(0,R.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:u,"data-testid":`sentinelEnd`})]})}function Gm(e){return typeof e==`function`?e():e}function Km(e){return e?e.props.hasOwnProperty(`in`):!1}var qm=()=>{},Jm=new Fm;function Ym(e){let{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:o,children:s,onClose:c,open:l,rootRef:u}=e,d=L.useRef({}),f=L.useRef(null),p=L.useRef(null),m=Ls(p,u),[h,g]=L.useState(!l),_=Km(s),v=!0;(e[`aria-hidden`]===`false`||e[`aria-hidden`]===!1)&&(v=!1);let y=()=>Es(f.current),b=()=>(d.current.modalRef=p.current,d.current.mount=f.current,d.current),x=()=>{Jm.mount(b(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},S=Fs(()=>{let e=Gm(t)||y().body;Jm.add(b(),e),p.current&&x()}),C=()=>Jm.isTopModal(b()),w=Fs(e=>{f.current=e,e&&(l&&C()?x():p.current&&Om(p.current,v))}),T=L.useCallback(()=>{Jm.remove(b(),v)},[v]);L.useEffect(()=>()=>{T()},[T]),L.useEffect(()=>{l?S():(!_||!i)&&T()},[l,T,_,i,S]);let E=e=>t=>{e.onKeyDown?.(t),!(t.key!==`Escape`||t.which===229||!C())&&(n||(t.stopPropagation(),c&&c(t,`escapeKeyDown`)))},D=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&c&&c(t,`backdropClick`)};return{getRootProps:(t={})=>{let n=xc(e);delete n.onTransitionEnter,delete n.onTransitionExited;let r={...n,...t};return{role:`presentation`,...r,onKeyDown:E(r),ref:m}},getBackdropProps:(e={})=>{let t=e;return{"aria-hidden":!0,...t,onClick:D(t),open:l}},getTransitionProps:()=>({onEnter:ds(()=>{g(!1),a&&a()},s?.props.onEnter??qm),onExited:ds(()=>{g(!0),o&&o(),i&&T()},s?.props.onExited??qm)}),rootRef:m,portalRef:w,isTopModal:C,exited:h,hasTransition:_}}function Xm(e){return B(`MuiModal`,e)}Jr(`MuiModal`,[`root`,`hidden`,`backdrop`]);var Zm=e=>{let{open:t,exited:n,classes:r}=e;return Sa({root:[`root`,!t&&n&&`hidden`],backdrop:[`backdrop`]},Xm,r)},Qm=H(`div`,{name:`MuiModal`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(gs(({theme:e})=>({position:`fixed`,zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:`hidden`}}]}))),$m=H(Np,{name:`MuiModal`,slot:`Backdrop`})({zIndex:-1}),eh=L.forwardRef(function(e,t){let n=_s({name:`MuiModal`,props:e}),{BackdropComponent:r=$m,BackdropProps:i,classes:a,className:o,closeAfterTransition:s=!1,children:c,container:l,component:u,components:d={},componentsProps:f={},disableAutoFocus:p=!1,disableEnforceFocus:m=!1,disableEscapeKeyDown:h=!1,disablePortal:g=!1,disableRestoreFocus:_=!1,disableScrollLock:v=!1,hideBackdrop:y=!1,keepMounted:b=!1,onClose:x,onTransitionEnter:S,onTransitionExited:C,open:w,slotProps:T={},slots:E={},theme:D,...O}=n,k={...n,closeAfterTransition:s,disableAutoFocus:p,disableEnforceFocus:m,disableEscapeKeyDown:h,disablePortal:g,disableRestoreFocus:_,disableScrollLock:v,hideBackdrop:y,keepMounted:b},{getRootProps:ee,getBackdropProps:A,getTransitionProps:j,portalRef:te,isTopModal:M,exited:ne,hasTransition:N}=Ym({...k,rootRef:t}),P={...k,exited:ne},re=Zm(P),ie={};if(c.props.tabIndex===void 0&&(ie.tabIndex=`-1`),N){let{onEnter:e,onExited:t}=j();ie.onEnter=e,ie.onExited=t}let ae={slots:{root:d.Root,backdrop:d.Backdrop,...E},slotProps:{...f,...T}},[oe,se]=wc(`root`,{ref:t,elementType:Qm,externalForwardedProps:{...ae,...O,component:u},getSlotProps:ee,ownerState:P,className:z(o,re?.root,!P.open&&P.exited&&re?.hidden)}),[ce,le]=wc(`backdrop`,{ref:i?.ref,elementType:r,externalForwardedProps:ae,shouldForwardComponentProp:!0,additionalProps:i,getSlotProps:e=>A({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:z(i?.className,re?.backdrop),ownerState:P});return!b&&!w&&(!N||ne)?null:(0,R.jsx)(sf,{ref:te,container:l,disablePortal:g,children:(0,R.jsxs)(oe,{...se,children:[!y&&r?(0,R.jsx)(ce,{...le}):null,(0,R.jsx)(Wm,{disableEnforceFocus:m,disableAutoFocus:p,disableRestoreFocus:_,isEnabled:M,open:w,children:L.cloneElement(c,ie)})]})})});function th(e){return B(`MuiDialog`,e)}var nh=Jr(`MuiDialog`,[`root`,`backdrop`,`scrollPaper`,`scrollBody`,`container`,`paper`,`paperScrollPaper`,`paperScrollBody`,`paperWidthFalse`,`paperWidthXs`,`paperWidthSm`,`paperWidthMd`,`paperWidthLg`,`paperWidthXl`,`paperFullWidth`,`paperFullScreen`]),rh=L.createContext({}),ih=H(Np,{name:`MuiDialog`,slot:`Backdrop`})({zIndex:-1}),ah=e=>{let{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:a}=e;return Sa({root:[`root`],backdrop:[`backdrop`],container:[`container`,`scroll${U(n)}`],paper:[`paper`,`paperScroll${U(n)}`,`paperWidth${U(String(r))}`,i&&`paperFullWidth`,a&&`paperFullScreen`]},th,t)},oh=H(eh,{name:`MuiDialog`,slot:`Root`})({"@media print":{position:`absolute !important`}}),sh=H(`div`,{name:`MuiDialog`,slot:`Container`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.container,t[`scroll${U(n.scroll)}`]]}})({height:`100%`,"@media print":{height:`auto`},outline:0,variants:[{props:{scroll:`paper`},style:{display:`flex`,justifyContent:`center`,alignItems:`center`}},{props:{scroll:`body`},style:{overflowY:`auto`,overflowX:`hidden`,textAlign:`center`,"&::after":{content:`""`,display:`inline-block`,verticalAlign:`middle`,height:`100%`,width:`0`}}}]}),ch=H(Pc,{name:`MuiDialog`,slot:`Paper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.paper,t[`scrollPaper${U(n.scroll)}`],t[`paperWidth${U(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(gs(({theme:e})=>({margin:32,position:`relative`,overflowY:`auto`,"@media print":{overflowY:`visible`,boxShadow:`none`},variants:[{props:{scroll:`paper`},style:{display:`flex`,flexDirection:`column`,maxHeight:`calc(100% - 64px)`}},{props:{scroll:`body`},style:{display:`inline-block`,verticalAlign:`middle`,textAlign:`initial`}},{props:({ownerState:e})=>!e.maxWidth,style:{maxWidth:`calc(100% - 64px)`}},{props:{maxWidth:`xs`},style:{maxWidth:e.breakpoints.unit===`px`?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${nh.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:`calc(100% - 64px)`}}}},...Object.keys(e.breakpoints.values).filter(e=>e!==`xs`).map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${nh.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:`calc(100% - 64px)`}}}})),{props:({ownerState:e})=>e.fullWidth,style:{width:`calc(100% - 64px)`}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:`100%`,maxWidth:`100%`,height:`100%`,maxHeight:`none`,borderRadius:0,[`&.${nh.paperScrollBody}`]:{margin:0,maxWidth:`100%`}}}]}))),lh=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiDialog`}),r=ts(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":o,"aria-modal":s=!0,BackdropComponent:c,BackdropProps:l,children:u,className:d,disableEscapeKeyDown:f=!1,fullScreen:p=!1,fullWidth:m=!1,maxWidth:h=`sm`,onClick:g,onClose:_,open:v,PaperComponent:y=Pc,PaperProps:b={},scroll:x=`paper`,slots:S={},slotProps:C={},TransitionComponent:w=kp,transitionDuration:T=i,TransitionProps:E,...D}=n,O={...n,disableEscapeKeyDown:f,fullScreen:p,fullWidth:m,maxWidth:h,scroll:x},k=ah(O),ee=L.useRef(),A=e=>{ee.current=e.target===e.currentTarget},j=e=>{g&&g(e),ee.current&&(ee.current=null,_&&_(e,`backdropClick`))},te=Yi(o),M=L.useMemo(()=>({titleId:te}),[te]),ne={slots:{transition:w,...S},slotProps:{transition:E,paper:b,backdrop:l,...C}},[N,P]=wc(`root`,{elementType:oh,shouldForwardComponentProp:!0,externalForwardedProps:ne,ownerState:O,className:z(k.root,d),ref:t}),[re,ie]=wc(`backdrop`,{elementType:ih,shouldForwardComponentProp:!0,externalForwardedProps:ne,ownerState:O,className:k.backdrop}),[ae,oe]=wc(`paper`,{elementType:ch,shouldForwardComponentProp:!0,externalForwardedProps:ne,ownerState:O,className:z(k.paper,b.className)}),[se,ce]=wc(`container`,{elementType:sh,externalForwardedProps:ne,ownerState:O,className:k.container}),[le,ue]=wc(`transition`,{elementType:kp,externalForwardedProps:ne,ownerState:O,additionalProps:{appear:!0,in:v,timeout:T,role:`presentation`}});return(0,R.jsx)(N,{closeAfterTransition:!0,slots:{backdrop:re},slotProps:{backdrop:{transitionDuration:T,as:c,...ie}},disableEscapeKeyDown:f,onClose:_,open:v,onClick:j,...P,...D,children:(0,R.jsx)(le,{...ue,children:(0,R.jsx)(se,{onMouseDown:A,...ce,children:(0,R.jsx)(ae,{as:y,elevation:24,role:`dialog`,"aria-describedby":a,"aria-labelledby":te,"aria-modal":s,...oe,children:(0,R.jsx)(rh.Provider,{value:M,children:u})})})})})});function cee(e){return B(`MuiDialogActions`,e)}Jr(`MuiDialogActions`,[`root`,`spacing`]);var lee=e=>{let{classes:t,disableSpacing:n}=e;return Sa({root:[`root`,!n&&`spacing`]},cee,t)},uee=H(`div`,{name:`MuiDialogActions`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:`flex`,alignItems:`center`,padding:8,justifyContent:`flex-end`,flex:`0 0 auto`,variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),uh=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiDialogActions`}),{className:r,disableSpacing:i=!1,...a}=n,o={...n,disableSpacing:i};return(0,R.jsx)(uee,{className:z(lee(o).root,r),ownerState:o,ref:t,...a})});function dee(e){return B(`MuiDialogContent`,e)}Jr(`MuiDialogContent`,[`root`,`dividers`]);function fee(e){return B(`MuiDialogTitle`,e)}var pee=Jr(`MuiDialogTitle`,[`root`]),mee=e=>{let{classes:t,dividers:n}=e;return Sa({root:[`root`,n&&`dividers`]},dee,t)},hee=H(`div`,{name:`MuiDialogContent`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(gs(({theme:e})=>({flex:`1 1 auto`,WebkitOverflowScrolling:`touch`,overflowY:`auto`,padding:`20px 24px`,variants:[{props:({ownerState:e})=>e.dividers,style:{padding:`16px 24px`,borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>!e.dividers,style:{[`.${pee.root} + &`]:{paddingTop:0}}}]}))),dh=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiDialogContent`}),{className:r,dividers:i=!1,...a}=n,o={...n,dividers:i};return(0,R.jsx)(hee,{className:z(mee(o).root,r),ownerState:o,ref:t,...a})}),gee=e=>{let{classes:t}=e;return Sa({root:[`root`]},fee,t)},_ee=H(W,{name:`MuiDialogTitle`,slot:`Root`})({padding:`16px 24px`,flex:`0 0 auto`}),fh=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiDialogTitle`}),{className:r,id:i,...a}=n,o=n,s=gee(o),{titleId:c=i}=L.useContext(rh);return(0,R.jsx)(_ee,{component:`h2`,className:z(s.root,r),ownerState:o,ref:t,variant:`h6`,id:i??c,...a})});function vee(e){return B(`MuiDivider`,e)}var ph=Jr(`MuiDivider`,[`root`,`absolute`,`fullWidth`,`inset`,`middle`,`flexItem`,`light`,`vertical`,`withChildren`,`withChildrenVertical`,`textAlignRight`,`textAlignLeft`,`wrapper`,`wrapperVertical`]),yee=e=>{let{absolute:t,children:n,classes:r,flexItem:i,light:a,orientation:o,textAlign:s,variant:c}=e;return Sa({root:[`root`,t&&`absolute`,c,a&&`light`,o===`vertical`&&`vertical`,i&&`flexItem`,n&&`withChildren`,n&&o===`vertical`&&`withChildrenVertical`,s===`right`&&o!==`vertical`&&`textAlignRight`,s===`left`&&o!==`vertical`&&`textAlignLeft`],wrapper:[`wrapper`,o===`vertical`&&`wrapperVertical`]},vee,r)},bee=H(`div`,{name:`MuiDivider`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation===`vertical`&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation===`vertical`&&t.withChildrenVertical,n.textAlign===`right`&&n.orientation!==`vertical`&&t.textAlignRight,n.textAlign===`left`&&n.orientation!==`vertical`&&t.textAlignLeft]}})(gs(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:`solid`,borderColor:(e.vars||e).palette.divider,borderBottomWidth:`thin`,variants:[{props:{absolute:!0},style:{position:`absolute`,bottom:0,left:0,width:`100%`}},{props:{light:!0},style:{borderColor:e.alpha((e.vars||e).palette.divider,.08)}},{props:{variant:`inset`},style:{marginLeft:72}},{props:{variant:`middle`,orientation:`horizontal`},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:`middle`,orientation:`vertical`},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:`vertical`},style:{height:`100%`,borderBottomWidth:0,borderRightWidth:`thin`}},{props:{flexItem:!0},style:{alignSelf:`stretch`,height:`auto`}},{props:({ownerState:e})=>!!e.children,style:{display:`flex`,textAlign:`center`,border:0,borderTopStyle:`solid`,borderLeftStyle:`solid`,"&::before, &::after":{content:`""`,alignSelf:`center`}}},{props:({ownerState:e})=>e.children&&e.orientation!==`vertical`,style:{"&::before, &::after":{width:`100%`,borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:`inherit`}}},{props:({ownerState:e})=>e.orientation===`vertical`&&e.children,style:{flexDirection:`column`,"&::before, &::after":{height:`100%`,borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:`inherit`}}},{props:({ownerState:e})=>e.textAlign===`right`&&e.orientation!==`vertical`,style:{"&::before":{width:`90%`},"&::after":{width:`10%`}}},{props:({ownerState:e})=>e.textAlign===`left`&&e.orientation!==`vertical`,style:{"&::before":{width:`10%`},"&::after":{width:`90%`}}}]}))),xee=H(`span`,{name:`MuiDivider`,slot:`Wrapper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.wrapper,n.orientation===`vertical`&&t.wrapperVertical]}})(gs(({theme:e})=>({display:`inline-block`,paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:`nowrap`,variants:[{props:{orientation:`vertical`},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),mh=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiDivider`}),{absolute:r=!1,children:i,className:a,orientation:o=`horizontal`,component:s=i||o===`vertical`?`div`:`hr`,flexItem:c=!1,light:l=!1,role:u=s===`hr`?void 0:`separator`,textAlign:d=`center`,variant:f=`fullWidth`,...p}=n,m={...n,absolute:r,component:s,flexItem:c,light:l,orientation:o,role:u,textAlign:d,variant:f},h=yee(m);return(0,R.jsx)(bee,{as:s,className:z(h.root,a),role:u,ref:t,ownerState:m,"aria-orientation":u===`separator`&&(s!==`hr`||o===`vertical`)?o:void 0,...p,children:i?(0,R.jsx)(xee,{className:h.wrapper,ownerState:m,children:i}):null})});mh&&(mh.muiSkipListHighlight=!0);function See(e){return B(`MuiFab`,e)}var hh=Jr(`MuiFab`,[`root`,`primary`,`secondary`,`extended`,`circular`,`focusVisible`,`disabled`,`colorInherit`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`info`,`error`,`warning`,`success`]),Cee=e=>{let{color:t,variant:n,classes:r,size:i}=e,a=Sa({root:[`root`,n,`size${U(i)}`,t===`inherit`?`colorInherit`:t]},See,r);return{...r,...a}},wee=H(ul,{name:`MuiFab`,slot:`Root`,shouldForwardProp:e=>rs(e)||e===`classes`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`size${U(n.size)}`],n.color===`inherit`&&t.colorInherit,t[U(n.size)],t[n.color]]}})(gs(({theme:e})=>({...e.typography.button,minHeight:36,transition:e.transitions.create([`background-color`,`box-shadow`,`border-color`],{duration:e.transitions.duration.short}),borderRadius:`50%`,padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.grey[900]:e.palette.getContrastText?.(e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:`none`},[`&.${hh.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},variants:[{props:{size:`small`},style:{width:40,height:40}},{props:{size:`medium`},style:{width:48,height:48}},{props:{variant:`extended`},style:{borderRadius:48/2,padding:`0 16px`,width:`auto`,minHeight:`auto`,minWidth:48,height:48}},{props:{variant:`extended`,size:`small`},style:{width:`auto`,padding:`0 8px`,borderRadius:34/2,minWidth:34,height:34}},{props:{variant:`extended`,size:`medium`},style:{width:`auto`,padding:`0 16px`,borderRadius:40/2,minWidth:40,height:40}},{props:{color:`inherit`},style:{color:`inherit`}}]})),gs(({theme:e})=>({variants:[...Object.entries(e.palette).filter(xl([`dark`,`contrastText`])).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}}}}))]})),gs(({theme:e})=>({[`&.${hh.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}))),gh=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiFab`}),{children:r,className:i,color:a=`default`,component:o=`button`,disabled:s=!1,disableFocusRipple:c=!1,focusVisibleClassName:l,size:u=`large`,variant:d=`circular`,...f}=n,p={...n,color:a,component:o,disabled:s,disableFocusRipple:c,size:u,variant:d},m=Cee(p);return(0,R.jsx)(wee,{className:z(m.root,i),component:o,disabled:s,focusRipple:!c,focusVisibleClassName:z(m.focusVisible,l),ownerState:p,ref:t,...f,classes:m,children:r})}),Tee=e=>{let{classes:t,disableUnderline:n,startAdornment:r,endAdornment:i,size:a,hiddenLabel:o,multiline:s}=e,c=Sa({root:[`root`,!n&&`underline`,r&&`adornedStart`,i&&`adornedEnd`,a===`small`&&`size${U(a)}`,o&&`hiddenLabel`,s&&`multiline`],input:[`input`]},ep,t);return{...t,...c}},Eee=H(Kf,{shouldForwardProp:e=>rs(e)||e===`classes`,name:`MuiFilledInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...Uf(e,t),!n.disableUnderline&&t.underline]}})(gs(({theme:e})=>{let t=e.palette.mode===`light`,n=t?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`,r=t?`rgba(0, 0, 0, 0.06)`:`rgba(255, 255, 255, 0.09)`,i=t?`rgba(0, 0, 0, 0.09)`:`rgba(255, 255, 255, 0.13)`,a=t?`rgba(0, 0, 0, 0.12)`:`rgba(255, 255, 255, 0.12)`;return{position:`relative`,backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${tp.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${tp.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a},variants:[{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${tp.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${tp.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:`"\\00a0"`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${tp.disabled}, .${tp.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${tp.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(xl()).map(([t])=>({props:{disableUnderline:!1,color:t},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}})),{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:12}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:12}},{props:({ownerState:e})=>e.multiline,style:{padding:`25px 12px 8px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel&&e.size===`small`,style:{paddingTop:8,paddingBottom:9}}]}})),Dee=H(qf,{name:`MuiFilledInput`,slot:`Input`,overridesResolver:Wf})(gs(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode===`light`?null:`0 0 0 100px #266798 inset`,WebkitTextFillColor:e.palette.mode===`light`?null:`#fff`,caretColor:e.palette.mode===`light`?null:`#fff`,borderTopLeftRadius:`inherit`,borderTopRightRadius:`inherit`}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:`inherit`,borderTopRightRadius:`inherit`},[e.getColorSchemeSelector(`dark`)]:{"&:-webkit-autofill":{WebkitBoxShadow:`0 0 0 100px #266798 inset`,WebkitTextFillColor:`#fff`,caretColor:`#fff`}}},variants:[{props:{size:`small`},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}},{props:({ownerState:e})=>e.hiddenLabel&&e.size===`small`,style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:e})=>e.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),_h=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiFilledInput`}),{disableUnderline:r=!1,components:i={},componentsProps:a,fullWidth:o=!1,hiddenLabel:s,inputComponent:c=`input`,multiline:l=!1,slotProps:u,slots:d={},type:f=`text`,...p}=n,m={...n,disableUnderline:r,fullWidth:o,inputComponent:c,multiline:l,type:f},h=Tee(n),g={root:{ownerState:m},input:{ownerState:m}},_=u??a?hn(g,u??a):g;return(0,R.jsx)(Yf,{slots:{root:d.root??i.Root??Eee,input:d.input??i.Input??Dee},slotProps:_,fullWidth:o,inputComponent:c,multiline:l,ref:t,type:f,...p,classes:h})});_h.muiName=`Input`;function Oee(e){return B(`MuiFormControl`,e)}Jr(`MuiFormControl`,[`root`,`marginNone`,`marginNormal`,`marginDense`,`fullWidth`,`disabled`]);var vh=e=>{let{classes:t,margin:n,fullWidth:r}=e;return Sa({root:[`root`,n!==`none`&&`margin${U(n)}`,r&&`fullWidth`]},Oee,t)},yh=H(`div`,{name:`MuiFormControl`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`margin${U(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:`inline-flex`,flexDirection:`column`,position:`relative`,minWidth:0,padding:0,margin:0,border:0,verticalAlign:`top`,variants:[{props:{margin:`normal`},style:{marginTop:16,marginBottom:8}},{props:{margin:`dense`},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:`100%`}}]}),bh=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiFormControl`}),{children:r,className:i,color:a=`primary`,component:o=`div`,disabled:s=!1,error:c=!1,focused:l,fullWidth:u=!1,hiddenLabel:d=!1,margin:f=`none`,required:p=!1,size:m=`medium`,variant:h=`outlined`,...g}=n,_={...n,color:a,component:o,disabled:s,error:c,fullWidth:u,hiddenLabel:d,margin:f,required:p,size:m,variant:h},v=vh(_),[y,b]=L.useState(()=>{let e=!1;return r&&L.Children.forEach(r,t=>{if(!Ts(t,[`Input`,`Select`]))return;let n=Ts(t,[`Select`])?t.props.input:t;n&&zf(n.props)&&(e=!0)}),e}),[x,S]=L.useState(()=>{let e=!1;return r&&L.Children.forEach(r,t=>{Ts(t,[`Input`,`Select`])&&(Rf(t.props,!0)||Rf(t.props.inputProps,!0))&&(e=!0)}),e}),[C,w]=L.useState(!1);s&&C&&w(!1);let T=l!==void 0&&!s?l:C;L.useRef(!1);let E=L.useCallback(()=>{S(!0)},[]),D=L.useCallback(()=>{S(!1)},[]),O=L.useMemo(()=>({adornedStart:y,setAdornedStart:b,color:a,disabled:s,error:c,filled:x,focused:T,fullWidth:u,hiddenLabel:d,size:m,onBlur:()=>{w(!1)},onFocus:()=>{w(!0)},onEmpty:D,onFilled:E,registerEffect:void 0,required:p,variant:h}),[y,a,s,c,x,T,u,d,void 0,D,E,p,m,h]);return(0,R.jsx)(Ff.Provider,{value:O,children:(0,R.jsx)(yh,{as:o,ownerState:_,className:z(v.root,i),ref:t,...g,children:r})})});function xh(e){return B(`MuiFormControlLabel`,e)}var Sh=Jr(`MuiFormControlLabel`,[`root`,`labelPlacementStart`,`labelPlacementTop`,`labelPlacementBottom`,`disabled`,`label`,`error`,`required`,`asterisk`]),Ch=e=>{let{classes:t,disabled:n,labelPlacement:r,error:i,required:a}=e;return Sa({root:[`root`,n&&`disabled`,`labelPlacement${U(r)}`,i&&`error`,a&&`required`],label:[`label`,n&&`disabled`],asterisk:[`asterisk`,i&&`error`]},xh,t)},wh=H(`label`,{name:`MuiFormControlLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${Sh.label}`]:t.label},t.root,t[`labelPlacement${U(n.labelPlacement)}`]]}})(gs(({theme:e})=>({display:`inline-flex`,alignItems:`center`,cursor:`pointer`,verticalAlign:`middle`,WebkitTapHighlightColor:`transparent`,marginLeft:-11,marginRight:16,[`&.${Sh.disabled}`]:{cursor:`default`},[`& .${Sh.label}`]:{[`&.${Sh.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:`start`},style:{flexDirection:`row-reverse`,marginRight:-11}},{props:{labelPlacement:`top`},style:{flexDirection:`column-reverse`}},{props:{labelPlacement:`bottom`},style:{flexDirection:`column`}},{props:({labelPlacement:e})=>e===`start`||e===`top`||e===`bottom`,style:{marginLeft:16}}]}))),Th=H(`span`,{name:`MuiFormControlLabel`,slot:`Asterisk`})(gs(({theme:e})=>({[`&.${Sh.error}`]:{color:(e.vars||e).palette.error.main}}))),Eh=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiFormControlLabel`}),{checked:r,className:i,componentsProps:a={},control:o,disabled:s,disableTypography:c,inputRef:l,label:u,labelPlacement:d=`end`,name:f,onChange:p,required:m,slots:h={},slotProps:g={},value:_,...v}=n,y=If(),b=s??o.props.disabled??y?.disabled,x=m??o.props.required,S={disabled:b,required:x};[`checked`,`name`,`onChange`,`value`,`inputRef`].forEach(e=>{o.props[e]===void 0&&n[e]!==void 0&&(S[e]=n[e])});let C=Pf({props:n,muiFormControl:y,states:[`error`]}),w={...n,disabled:b,labelPlacement:d,required:x,error:C.error},T=Ch(w),[E,D]=wc(`typography`,{elementType:W,externalForwardedProps:{slots:h,slotProps:{...a,...g}},ownerState:w}),O=u;return O!=null&&O.type!==W&&!c&&(O=(0,R.jsx)(E,{component:`span`,...D,className:z(T.label,D?.className),children:O})),(0,R.jsxs)(wh,{className:z(T.root,i),ownerState:w,ref:t,...v,children:[L.cloneElement(o,S),x?(0,R.jsxs)(`div`,{children:[O,(0,R.jsxs)(Th,{ownerState:w,"aria-hidden":!0,className:T.asterisk,children:[` `,`*`]})]}):O]})});function Dh(e){return B(`MuiFormGroup`,e)}Jr(`MuiFormGroup`,[`root`,`row`,`error`]);var Oh=e=>{let{classes:t,row:n,error:r}=e;return Sa({root:[`root`,n&&`row`,r&&`error`]},Dh,t)},kh=H(`div`,{name:`MuiFormGroup`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.row&&t.row]}})({display:`flex`,flexDirection:`column`,flexWrap:`wrap`,variants:[{props:{row:!0},style:{flexDirection:`row`}}]}),Ah=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiFormGroup`}),{className:r,row:i=!1,...a}=n,o=Pf({props:n,muiFormControl:If(),states:[`error`]}),s={...n,row:i,error:o.error};return(0,R.jsx)(kh,{className:z(Oh(s).root,r),ownerState:s,ref:t,...a})});function jh(e){return B(`MuiFormHelperText`,e)}var Mh=Jr(`MuiFormHelperText`,[`root`,`error`,`disabled`,`sizeSmall`,`sizeMedium`,`contained`,`focused`,`filled`,`required`]),Nh,Ph=e=>{let{classes:t,contained:n,size:r,disabled:i,error:a,filled:o,focused:s,required:c}=e;return Sa({root:[`root`,i&&`disabled`,a&&`error`,r&&`size${U(r)}`,n&&`contained`,s&&`focused`,o&&`filled`,c&&`required`]},jh,t)},Fh=H(`p`,{name:`MuiFormHelperText`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.size&&t[`size${U(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(gs(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:`left`,marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${Mh.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Mh.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:`small`},style:{marginTop:4}},{props:({ownerState:e})=>e.contained,style:{marginLeft:14,marginRight:14}}]}))),Ih=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiFormHelperText`}),{children:r,className:i,component:a=`p`,disabled:o,error:s,filled:c,focused:l,margin:u,required:d,variant:f,...p}=n,m=Pf({props:n,muiFormControl:If(),states:[`variant`,`size`,`disabled`,`error`,`filled`,`focused`,`required`]}),h={...n,component:a,contained:m.variant===`filled`||m.variant===`outlined`,variant:m.variant,size:m.size,disabled:m.disabled,error:m.error,filled:m.filled,focused:m.focused,required:m.required};return delete h.ownerState,(0,R.jsx)(Fh,{as:a,className:z(Ph(h).root,i),ref:t,...p,ownerState:h,children:r===` `?Nh||=(0,R.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``}):r})});function Lh(e){return B(`MuiFormLabel`,e)}var Rh=Jr(`MuiFormLabel`,[`root`,`colorSecondary`,`focused`,`disabled`,`error`,`filled`,`required`,`asterisk`]),zh=e=>{let{classes:t,color:n,focused:r,disabled:i,error:a,filled:o,required:s}=e;return Sa({root:[`root`,`color${U(n)}`,i&&`disabled`,a&&`error`,o&&`filled`,r&&`focused`,s&&`required`],asterisk:[`asterisk`,a&&`error`]},Lh,t)},Bh=H(`label`,{name:`MuiFormLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color===`secondary`&&t.colorSecondary,n.filled&&t.filled]}})(gs(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:`1.4375em`,padding:0,position:`relative`,variants:[...Object.entries(e.palette).filter(xl()).map(([t])=>({props:{color:t},style:{[`&.${Rh.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${Rh.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Rh.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),Vh=H(`span`,{name:`MuiFormLabel`,slot:`Asterisk`})(gs(({theme:e})=>({[`&.${Rh.error}`]:{color:(e.vars||e).palette.error.main}}))),Hh=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiFormLabel`}),{children:r,className:i,color:a,component:o=`label`,disabled:s,error:c,filled:l,focused:u,required:d,...f}=n,p=Pf({props:n,muiFormControl:If(),states:[`color`,`required`,`focused`,`disabled`,`error`,`filled`]}),m={...n,color:p.color||`primary`,component:o,disabled:p.disabled,error:p.error,filled:p.filled,focused:p.focused,required:p.required},h=zh(m);return(0,R.jsxs)(Bh,{as:o,ownerState:m,className:z(h.root,i),ref:t,...f,children:[r,p.required&&(0,R.jsxs)(Vh,{ownerState:m,"aria-hidden":!0,className:h.asterisk,children:[` `,`*`]})]})}),Uh=Wa({createStyledComponent:H(`div`,{name:`MuiGrid`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.container&&t.container]}}),componentName:`MuiGrid`,useThemeProps:e=>_s({props:e,name:`MuiGrid`}),useTheme:ts});function Wh(e){return`scale(${e}, ${e**2})`}var Gh={entering:{opacity:1,transform:Wh(1)},entered:{opacity:1,transform:`none`}},Kh=typeof navigator<`u`&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),qh=L.forwardRef(function(e,t){let{addEndListener:n,appear:r=!0,children:i,easing:a,in:o,onEnter:s,onEntered:c,onEntering:l,onExit:u,onExited:d,onExiting:f,style:p,timeout:m=`auto`,TransitionComponent:h=$s,...g}=e,_=hc(),v=L.useRef(),y=ts(),b=L.useRef(null),x=Rs(b,af(i),t),S=e=>t=>{if(e){let n=b.current;t===void 0?e(n):e(n,t)}},C=S(l),w=S((e,t)=>{gc(e);let{duration:n,delay:r,easing:i}=_c({style:p,timeout:m,easing:a},{mode:`enter`}),o;m===`auto`?(o=y.transitions.getAutoHeightDuration(e.clientHeight),v.current=o):o=n,e.style.transition=[y.transitions.create(`opacity`,{duration:o,delay:r}),y.transitions.create(`transform`,{duration:Kh?o:o*.666,delay:r,easing:i})].join(`,`),s&&s(e,t)}),T=S(c),E=S(f),D=S(e=>{let{duration:t,delay:n,easing:r}=_c({style:p,timeout:m,easing:a},{mode:`exit`}),i;m===`auto`?(i=y.transitions.getAutoHeightDuration(e.clientHeight),v.current=i):i=t,e.style.transition=[y.transitions.create(`opacity`,{duration:i,delay:n}),y.transitions.create(`transform`,{duration:Kh?i:i*.666,delay:Kh?n:n||i*.333,easing:r})].join(`,`),e.style.opacity=0,e.style.transform=Wh(.75),u&&u(e)}),O=S(d);return(0,R.jsx)(h,{appear:r,in:o,nodeRef:b,onEnter:w,onEntered:T,onEntering:C,onExit:D,onExited:O,onExiting:E,addEndListener:e=>{m===`auto`&&_.start(v.current||0,e),n&&n(b.current,e)},timeout:m===`auto`?null:m,...g,children:(e,{ownerState:t,...n})=>L.cloneElement(i,{style:{opacity:0,transform:Wh(.75),visibility:e===`exited`&&!o?`hidden`:void 0,...Gh[e],...p,...i.props.style},ref:x,...n})})});qh&&(qh.muiSupportAuto=!0);var Jh=e=>{let{classes:t,disableUnderline:n}=e,r=Sa({root:[`root`,!n&&`underline`],input:[`input`]},Xf,t);return{...t,...r}},Yh=H(Kf,{shouldForwardProp:e=>rs(e)||e===`classes`,name:`MuiInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...Uf(e,t),!n.disableUnderline&&t.underline]}})(gs(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`;return e.vars&&(t=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:`relative`,variants:[{props:({ownerState:e})=>e.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${Zf.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${Zf.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:`"\\00a0"`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${Zf.disabled}, .${Zf.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${Zf.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(xl()).map(([t])=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}}))]}})),Xh=H(qf,{name:`MuiInput`,slot:`Input`,overridesResolver:Wf})({}),Zh=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiInput`}),{disableUnderline:r=!1,components:i={},componentsProps:a,fullWidth:o=!1,inputComponent:s=`input`,multiline:c=!1,slotProps:l,slots:u={},type:d=`text`,...f}=n,p=Jh(n),m={root:{ownerState:{disableUnderline:r}}},h=l??a?hn(l??a,m):m;return(0,R.jsx)(Yf,{slots:{root:u.root??i.Root??Yh,input:u.input??i.Input??Xh},slotProps:h,fullWidth:o,inputComponent:s,multiline:c,ref:t,type:d,...f,classes:p})});Zh.muiName=`Input`;function Qh(e){return B(`MuiInputAdornment`,e)}var $h=Jr(`MuiInputAdornment`,[`root`,`filled`,`standard`,`outlined`,`positionStart`,`positionEnd`,`disablePointerEvents`,`hiddenLabel`,`sizeSmall`]),eg,tg=(e,t)=>{let{ownerState:n}=e;return[t.root,t[`position${U(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},ng=e=>{let{classes:t,disablePointerEvents:n,hiddenLabel:r,position:i,size:a,variant:o}=e;return Sa({root:[`root`,n&&`disablePointerEvents`,i&&`position${U(i)}`,o,r&&`hiddenLabel`,a&&`size${U(a)}`]},Qh,t)},rg=H(`div`,{name:`MuiInputAdornment`,slot:`Root`,overridesResolver:tg})(gs(({theme:e})=>({display:`flex`,maxHeight:`2em`,alignItems:`center`,whiteSpace:`nowrap`,color:(e.vars||e).palette.action.active,variants:[{props:{variant:`filled`},style:{[`&.${$h.positionStart}&:not(.${$h.hiddenLabel})`]:{marginTop:16}}},{props:{position:`start`},style:{marginRight:8}},{props:{position:`end`},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:`none`}}]}))),ig=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiInputAdornment`}),{children:r,className:i,component:a=`div`,disablePointerEvents:o=!1,disableTypography:s=!1,position:c,variant:l,...u}=n,d=If()||{},f=l;l&&d.variant,d&&!f&&(f=d.variant);let p={...n,hiddenLabel:d.hiddenLabel,size:d.size,disablePointerEvents:o,position:c,variant:f},m=ng(p);return(0,R.jsx)(Ff.Provider,{value:null,children:(0,R.jsx)(rg,{as:a,ownerState:p,className:z(m.root,i),ref:t,...u,children:typeof r==`string`&&!s?(0,R.jsx)(W,{color:`textSecondary`,children:r}):(0,R.jsxs)(L.Fragment,{children:[c===`start`?eg||=(0,R.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``}):null,r]})})})});function ag(e){return B(`MuiInputLabel`,e)}Jr(`MuiInputLabel`,[`root`,`focused`,`disabled`,`error`,`required`,`asterisk`,`formControl`,`sizeSmall`,`shrink`,`animated`,`standard`,`filled`,`outlined`]);var og=e=>{let{classes:t,formControl:n,size:r,shrink:i,disableAnimation:a,variant:o,required:s}=e,c=Sa({root:[`root`,n&&`formControl`,!a&&`animated`,i&&`shrink`,r&&r!==`medium`&&`size${U(r)}`,o],asterisk:[s&&`asterisk`]},ag,t);return{...t,...c}},sg=H(Hh,{shouldForwardProp:e=>rs(e)||e===`classes`,name:`MuiInputLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${Rh.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size===`small`&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(gs(({theme:e})=>({display:`block`,transformOrigin:`top left`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:`100%`,variants:[{props:({ownerState:e})=>e.formControl,style:{position:`absolute`,left:0,top:0,transform:`translate(0, 20px) scale(1)`}},{props:{size:`small`},style:{transform:`translate(0, 17px) scale(1)`}},{props:({ownerState:e})=>e.shrink,style:{transform:`translate(0, -1.5px) scale(0.75)`,transformOrigin:`top left`,maxWidth:`133%`}},{props:({ownerState:e})=>!e.disableAnimation,style:{transition:e.transitions.create([`color`,`transform`,`max-width`],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:`filled`},style:{zIndex:1,pointerEvents:`none`,transform:`translate(12px, 16px) scale(1)`,maxWidth:`calc(100% - 24px)`}},{props:{variant:`filled`,size:`small`},style:{transform:`translate(12px, 13px) scale(1)`}},{props:({variant:e,ownerState:t})=>e===`filled`&&t.shrink,style:{userSelect:`none`,pointerEvents:`auto`,transform:`translate(12px, 7px) scale(0.75)`,maxWidth:`calc(133% - 24px)`}},{props:({variant:e,ownerState:t,size:n})=>e===`filled`&&t.shrink&&n===`small`,style:{transform:`translate(12px, 4px) scale(0.75)`}},{props:{variant:`outlined`},style:{zIndex:1,pointerEvents:`none`,transform:`translate(14px, 16px) scale(1)`,maxWidth:`calc(100% - 24px)`}},{props:{variant:`outlined`,size:`small`},style:{transform:`translate(14px, 9px) scale(1)`}},{props:({variant:e,ownerState:t})=>e===`outlined`&&t.shrink,style:{userSelect:`none`,pointerEvents:`auto`,maxWidth:`calc(133% - 32px)`,transform:`translate(14px, -9px) scale(0.75)`}}]}))),cg=L.forwardRef(function(e,t){let n=_s({name:`MuiInputLabel`,props:e}),{disableAnimation:r=!1,margin:i,shrink:a,variant:o,className:s,...c}=n,l=If(),u=a;u===void 0&&l&&(u=l.filled||l.focused||l.adornedStart);let d=Pf({props:n,muiFormControl:l,states:[`size`,`variant`,`required`,`focused`]}),f={...n,disableAnimation:r,formControl:l,shrink:u,size:d.size,variant:d.variant,required:d.required,focused:d.focused},p=og(f);return(0,R.jsx)(sg,{"data-shrink":u,ref:t,className:z(p.root,s),...c,ownerState:f,classes:p})});function lg(e){return B(`MuiLinearProgress`,e)}Jr(`MuiLinearProgress`,[`root`,`colorPrimary`,`colorSecondary`,`determinate`,`indeterminate`,`buffer`,`query`,`dashed`,`dashedColorPrimary`,`dashedColorSecondary`,`bar`,`bar1`,`bar2`,`barColorPrimary`,`barColorSecondary`,`bar1Indeterminate`,`bar1Determinate`,`bar1Buffer`,`bar2Indeterminate`,`bar2Buffer`]);var ug=4,dg=Gt`
|
|
148
|
+
0% {
|
|
149
|
+
left: -35%;
|
|
150
|
+
right: 100%;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
60% {
|
|
154
|
+
left: 100%;
|
|
155
|
+
right: -90%;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
100% {
|
|
159
|
+
left: 100%;
|
|
160
|
+
right: -90%;
|
|
161
|
+
}
|
|
162
|
+
`,fg=typeof dg==`string`?null:Wt`
|
|
163
|
+
animation: ${dg} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
|
|
164
|
+
`,pg=Gt`
|
|
165
|
+
0% {
|
|
166
|
+
left: -200%;
|
|
167
|
+
right: 100%;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
60% {
|
|
171
|
+
left: 107%;
|
|
172
|
+
right: -8%;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
100% {
|
|
176
|
+
left: 107%;
|
|
177
|
+
right: -8%;
|
|
178
|
+
}
|
|
179
|
+
`,mg=typeof pg==`string`?null:Wt`
|
|
180
|
+
animation: ${pg} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
|
|
181
|
+
`,hg=Gt`
|
|
182
|
+
0% {
|
|
183
|
+
opacity: 1;
|
|
184
|
+
background-position: 0 -23px;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
60% {
|
|
188
|
+
opacity: 0;
|
|
189
|
+
background-position: 0 -23px;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
100% {
|
|
193
|
+
opacity: 1;
|
|
194
|
+
background-position: -200px -23px;
|
|
195
|
+
}
|
|
196
|
+
`,gg=typeof hg==`string`?null:Wt`
|
|
197
|
+
animation: ${hg} 3s infinite linear;
|
|
198
|
+
`,_g=e=>{let{classes:t,variant:n,color:r}=e;return Sa({root:[`root`,`color${U(r)}`,n],dashed:[`dashed`,`dashedColor${U(r)}`],bar1:[`bar`,`bar1`,`barColor${U(r)}`,(n===`indeterminate`||n===`query`)&&`bar1Indeterminate`,n===`determinate`&&`bar1Determinate`,n===`buffer`&&`bar1Buffer`],bar2:[`bar`,`bar2`,n!==`buffer`&&`barColor${U(r)}`,n===`buffer`&&`color${U(r)}`,(n===`indeterminate`||n===`query`)&&`bar2Indeterminate`,n===`buffer`&&`bar2Buffer`]},lg,t)},vg=(e,t)=>e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:e.palette.mode===`light`?e.lighten(e.palette[t].main,.62):e.darken(e.palette[t].main,.5),yg=H(`span`,{name:`MuiLinearProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`color${U(n.color)}`],t[n.variant]]}})(gs(({theme:e})=>({position:`relative`,overflow:`hidden`,display:`block`,height:4,zIndex:0,"@media print":{colorAdjust:`exact`},variants:[...Object.entries(e.palette).filter(xl()).map(([t])=>({props:{color:t},style:{backgroundColor:vg(e,t)}})),{props:({ownerState:e})=>e.color===`inherit`&&e.variant!==`buffer`,style:{"&::before":{content:`""`,position:`absolute`,left:0,top:0,right:0,bottom:0,backgroundColor:`currentColor`,opacity:.3}}},{props:{variant:`buffer`},style:{backgroundColor:`transparent`}},{props:{variant:`query`},style:{transform:`rotate(180deg)`}}]}))),bg=H(`span`,{name:`MuiLinearProgress`,slot:`Dashed`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.dashed,t[`dashedColor${U(n.color)}`]]}})(gs(({theme:e})=>({position:`absolute`,marginTop:0,height:`100%`,width:`100%`,backgroundSize:`10px 10px`,backgroundPosition:`0 -23px`,variants:[{props:{color:`inherit`},style:{opacity:.3,backgroundImage:`radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)`}},...Object.entries(e.palette).filter(xl()).map(([t])=>{let n=vg(e,t);return{props:{color:t},style:{backgroundImage:`radial-gradient(${n} 0%, ${n} 16%, transparent 42%)`}}})]})),gg||{animation:`${hg} 3s infinite linear`}),xg=H(`span`,{name:`MuiLinearProgress`,slot:`Bar1`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.bar,t.bar1,t[`barColor${U(n.color)}`],(n.variant===`indeterminate`||n.variant===`query`)&&t.bar1Indeterminate,n.variant===`determinate`&&t.bar1Determinate,n.variant===`buffer`&&t.bar1Buffer]}})(gs(({theme:e})=>({width:`100%`,position:`absolute`,left:0,bottom:0,top:0,transition:`transform 0.2s linear`,transformOrigin:`left`,variants:[{props:{color:`inherit`},style:{backgroundColor:`currentColor`}},...Object.entries(e.palette).filter(xl()).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main}})),{props:{variant:`determinate`},style:{transition:`transform .${ug}s linear`}},{props:{variant:`buffer`},style:{zIndex:1,transition:`transform .${ug}s linear`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:{width:`auto`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:fg||{animation:`${dg} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}}]}))),Sg=H(`span`,{name:`MuiLinearProgress`,slot:`Bar2`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.bar,t.bar2,t[`barColor${U(n.color)}`],(n.variant===`indeterminate`||n.variant===`query`)&&t.bar2Indeterminate,n.variant===`buffer`&&t.bar2Buffer]}})(gs(({theme:e})=>({width:`100%`,position:`absolute`,left:0,bottom:0,top:0,transition:`transform 0.2s linear`,transformOrigin:`left`,variants:[...Object.entries(e.palette).filter(xl()).map(([t])=>({props:{color:t},style:{"--LinearProgressBar2-barColor":(e.vars||e).palette[t].main}})),{props:({ownerState:e})=>e.variant!==`buffer`&&e.color!==`inherit`,style:{backgroundColor:`var(--LinearProgressBar2-barColor, currentColor)`}},{props:({ownerState:e})=>e.variant!==`buffer`&&e.color===`inherit`,style:{backgroundColor:`currentColor`}},{props:{color:`inherit`},style:{opacity:.3}},...Object.entries(e.palette).filter(xl()).map(([t])=>({props:{color:t,variant:`buffer`},style:{backgroundColor:vg(e,t),transition:`transform .${ug}s linear`}})),{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:{width:`auto`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:mg||{animation:`${pg} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}}]}))),Cg=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiLinearProgress`}),{className:r,color:i=`primary`,value:a,valueBuffer:o,variant:s=`indeterminate`,...c}=n,l={...n,color:i,variant:s},u=_g(l),d=Vi(),f={},p={bar1:{},bar2:{}};if((s===`determinate`||s===`buffer`)&&a!==void 0){f[`aria-valuenow`]=Math.round(a),f[`aria-valuemin`]=0,f[`aria-valuemax`]=100;let e=a-100;d&&(e=-e),p.bar1.transform=`translateX(${e}%)`}if(s===`buffer`&&o!==void 0){let e=(o||0)-100;d&&(e=-e),p.bar2.transform=`translateX(${e}%)`}return(0,R.jsxs)(yg,{className:z(u.root,r),ownerState:l,role:`progressbar`,...f,ref:t,...c,children:[s===`buffer`?(0,R.jsx)(bg,{className:u.dashed,ownerState:l}):null,(0,R.jsx)(xg,{className:u.bar1,ownerState:l,style:p.bar1}),s===`determinate`?null:(0,R.jsx)(Sg,{className:u.bar2,ownerState:l,style:p.bar2})]})});function wg(e){return B(`MuiLink`,e)}var Tg=Jr(`MuiLink`,[`root`,`underlineNone`,`underlineHover`,`underlineAlways`,`button`,`focusVisible`]),Eg=({theme:e,ownerState:t})=>{let n=t.color;if(`colorSpace`in e&&e.colorSpace){let r=Pn(e,`palette.${n}.main`)||Pn(e,`palette.${n}`)||t.color;return e.alpha(r,.4)}let r=Pn(e,`palette.${n}.main`,!1)||Pn(e,`palette.${n}`,!1)||t.color,i=Pn(e,`palette.${n}.mainChannel`)||Pn(e,`palette.${n}Channel`);return`vars`in e&&i?`rgba(${i} / 0.4)`:Ei(r,.4)},Dg={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Og=e=>{let{classes:t,component:n,focusVisible:r,underline:i}=e;return Sa({root:[`root`,`underline${U(i)}`,n===`button`&&`button`,r&&`focusVisible`]},wg,t)},kg=H(W,{name:`MuiLink`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`underline${U(n.underline)}`],n.component===`button`&&t.button]}})(gs(({theme:e})=>({variants:[{props:{underline:`none`},style:{textDecoration:`none`}},{props:{underline:`hover`},style:{textDecoration:`none`,"&:hover":{textDecoration:`underline`}}},{props:{underline:`always`},style:{textDecoration:`underline`,"&:hover":{textDecorationColor:`inherit`}}},{props:({underline:e,ownerState:t})=>e===`always`&&t.color!==`inherit`,style:{textDecorationColor:`var(--Link-underlineColor)`}},{props:({underline:e,ownerState:t})=>e===`always`&&t.color===`inherit`,style:e.colorSpace?{textDecorationColor:e.alpha(`currentColor`,.4)}:null},...Object.entries(e.palette).filter(xl()).map(([t])=>({props:{underline:`always`,color:t},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette[t].main,.4)}})),{props:{underline:`always`,color:`textPrimary`},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette.text.primary,.4)}},{props:{underline:`always`,color:`textSecondary`},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette.text.secondary,.4)}},{props:{underline:`always`,color:`textDisabled`},style:{"--Link-underlineColor":(e.vars||e).palette.text.disabled}},{props:{component:`button`},style:{position:`relative`,WebkitTapHighlightColor:`transparent`,backgroundColor:`transparent`,outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:`pointer`,userSelect:`none`,verticalAlign:`middle`,MozAppearance:`none`,WebkitAppearance:`none`,"&::-moz-focus-inner":{borderStyle:`none`},[`&.${Tg.focusVisible}`]:{outline:`auto`}}}]}))),Ag=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiLink`}),r=ts(),{className:i,color:a=`primary`,component:o=`a`,onBlur:s,onFocus:c,TypographyClasses:l,underline:u=`always`,variant:d=`inherit`,sx:f,...p}=n,[m,h]=L.useState(!1),g=e=>{qc(e.target)||h(!1),s&&s(e)},_=e=>{qc(e.target)&&h(!0),c&&c(e)},v={...n,color:a,component:o,focusVisible:m,underline:u,variant:d};return(0,R.jsx)(kg,{color:a,className:z(Og(v).root,i),classes:l,component:o,onBlur:g,onFocus:_,ref:t,ownerState:v,variant:d,...p,sx:[...Dg[a]===void 0?[{color:a}]:[],...Array.isArray(f)?f:[f]],style:{...p.style,...u===`always`&&a!==`inherit`&&!Dg[a]&&{"--Link-underlineColor":Eg({theme:r,ownerState:v})}}})}),jg=L.createContext({});function Mg(e){return B(`MuiList`,e)}Jr(`MuiList`,[`root`,`padding`,`dense`,`subheader`]);var Ng=e=>{let{classes:t,disablePadding:n,dense:r,subheader:i}=e;return Sa({root:[`root`,!n&&`padding`,r&&`dense`,i&&`subheader`]},Mg,t)},Pg=H(`ul`,{name:`MuiList`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:`none`,margin:0,padding:0,position:`relative`,variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),Fg=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiList`}),{children:r,className:i,component:a=`ul`,dense:o=!1,disablePadding:s=!1,subheader:c,...l}=n,u=L.useMemo(()=>({dense:o}),[o]),d={...n,component:a,dense:o,disablePadding:s},f=Ng(d);return(0,R.jsx)(jg.Provider,{value:u,children:(0,R.jsxs)(Pg,{as:a,className:z(f.root,i),ref:t,ownerState:d,...l,children:[c,r]})})});function Ig(e){return B(`MuiListItem`,e)}Jr(`MuiListItem`,[`root`,`container`,`dense`,`alignItemsFlexStart`,`divider`,`gutters`,`padding`,`secondaryAction`]);function Lg(e){return B(`MuiListItemButton`,e)}var Rg=Jr(`MuiListItemButton`,[`root`,`focusVisible`,`dense`,`alignItemsFlexStart`,`disabled`,`divider`,`gutters`,`selected`]),zg=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems===`flex-start`&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Bg=e=>{let{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:a,divider:o,selected:s}=e,c=Sa({root:[`root`,r&&`dense`,!a&&`gutters`,o&&`divider`,i&&`disabled`,t===`flex-start`&&`alignItemsFlexStart`,s&&`selected`]},Lg,n);return{...n,...c}},Vg=H(ul,{shouldForwardProp:e=>rs(e)||e===`classes`,name:`MuiListItemButton`,slot:`Root`,overridesResolver:zg})(gs(({theme:e})=>({display:`flex`,flexGrow:1,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,textDecoration:`none`,minWidth:0,boxSizing:`border-box`,textAlign:`left`,paddingTop:8,paddingBottom:8,transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:`none`,backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}},[`&.${Rg.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${Rg.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${Rg.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${Rg.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Rg.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:`padding-box`}},{props:{alignItems:`flex-start`},style:{alignItems:`flex-start`}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.dense,style:{paddingTop:4,paddingBottom:4}}]}))),Hg=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiListItemButton`}),{alignItems:r=`center`,autoFocus:i=!1,component:a=`div`,children:o,dense:s=!1,disableGutters:c=!1,divider:l=!1,focusVisibleClassName:u,selected:d=!1,className:f,...p}=n,m=L.useContext(jg),h=L.useMemo(()=>({dense:s||m.dense||!1,alignItems:r,disableGutters:c}),[r,m.dense,s,c]),g=L.useRef(null);js(()=>{i&&g.current&&g.current.focus()},[i]);let _={...n,alignItems:r,dense:h.dense,disableGutters:c,divider:l,selected:d},v=Bg(_),y=Rs(g,t);return(0,R.jsx)(jg.Provider,{value:h,children:(0,R.jsx)(Vg,{ref:y,href:p.href||p.to,component:(p.href||p.to)&&a===`div`?`button`:a,focusVisibleClassName:z(v.focusVisible,u),ownerState:_,className:z(v.root,f),...p,classes:v,children:o})})});function Ug(e){return B(`MuiListItemSecondaryAction`,e)}Jr(`MuiListItemSecondaryAction`,[`root`,`disableGutters`]);var Wg=e=>{let{disableGutters:t,classes:n}=e;return Sa({root:[`root`,t&&`disableGutters`]},Ug,n)},Gg=H(`div`,{name:`MuiListItemSecondaryAction`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:`absolute`,right:16,top:`50%`,transform:`translateY(-50%)`,variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),Kg=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiListItemSecondaryAction`}),{className:r,...i}=n,a=L.useContext(jg),o={...n,disableGutters:a.disableGutters};return(0,R.jsx)(Gg,{className:z(Wg(o).root,r),ownerState:o,ref:t,...i})});Kg.muiName=`ListItemSecondaryAction`;var qg=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems===`flex-start`&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.hasSecondaryAction&&t.secondaryAction]},Jg=e=>{let{alignItems:t,classes:n,dense:r,disableGutters:i,disablePadding:a,divider:o,hasSecondaryAction:s}=e;return Sa({root:[`root`,r&&`dense`,!i&&`gutters`,!a&&`padding`,o&&`divider`,t===`flex-start`&&`alignItemsFlexStart`,s&&`secondaryAction`],container:[`container`],secondaryAction:[`secondaryAction`]},Ig,n)},Yg=H(`div`,{name:`MuiListItem`,slot:`Root`,overridesResolver:qg})(gs(({theme:e})=>({display:`flex`,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,textDecoration:`none`,width:`100%`,boxSizing:`border-box`,textAlign:`left`,variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>!e.disablePadding&&e.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:e})=>!e.disablePadding&&!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>!e.disablePadding&&!!e.secondaryAction,style:{paddingRight:48}},{props:({ownerState:e})=>!!e.secondaryAction,style:{[`& > .${Rg.root}`]:{paddingRight:48}}},{props:{alignItems:`flex-start`},style:{alignItems:`flex-start`}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:`padding-box`}},{props:({ownerState:e})=>e.button,style:{transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:`none`,backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}}}},{props:({ownerState:e})=>e.hasSecondaryAction,style:{paddingRight:48}}]}))),Xg=H(`li`,{name:`MuiListItem`,slot:`Container`})({position:`relative`}),Zg=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiListItem`}),{alignItems:r=`center`,children:i,className:a,component:o,components:s={},componentsProps:c={},ContainerComponent:l=`li`,ContainerProps:{className:u,...d}={},dense:f=!1,disableGutters:p=!1,disablePadding:m=!1,divider:h=!1,secondaryAction:g,slotProps:_={},slots:v={},...y}=n,b=L.useContext(jg),x=L.useMemo(()=>({dense:f||b.dense||!1,alignItems:r,disableGutters:p}),[r,b.dense,f,p]),S=L.useRef(null),C=L.Children.toArray(i),w=C.length&&Ts(C[C.length-1],[`ListItemSecondaryAction`]),T={...n,alignItems:r,dense:x.dense,disableGutters:p,disablePadding:m,divider:h,hasSecondaryAction:w},E=Jg(T),D=Rs(S,t),[O,k]=wc(`secondaryAction`,{elementType:Kg,externalForwardedProps:{slots:v,slotProps:_},ownerState:T,className:E.secondaryAction}),ee=v.root||s.Root||Yg,A=_.root||c.root||{},j={className:z(E.root,A.className,a),...y},te=o||`li`;return w?(te=!j.component&&!o?`div`:te,l===`li`&&(te===`li`?te=`div`:j.component===`li`&&(j.component=`div`)),(0,R.jsx)(jg.Provider,{value:x,children:(0,R.jsxs)(Xg,{as:l,className:z(E.container,u),ref:D,ownerState:T,...d,children:[(0,R.jsx)(ee,{...A,...!vc(ee)&&{as:te,ownerState:{...T,...A.ownerState}},...j,children:C}),C.pop()]})})):(0,R.jsx)(jg.Provider,{value:x,children:(0,R.jsxs)(ee,{...A,as:te,ref:D,...!vc(ee)&&{ownerState:{...T,...A.ownerState}},...j,children:[C,g&&(0,R.jsx)(O,{...k,children:g})]})})});function Qg(e){return B(`MuiListItemIcon`,e)}var $g=Jr(`MuiListItemIcon`,[`root`,`alignItemsFlexStart`]),e_=e=>{let{alignItems:t,classes:n}=e;return Sa({root:[`root`,t===`flex-start`&&`alignItemsFlexStart`]},Qg,n)},t_=H(`div`,{name:`MuiListItemIcon`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.alignItems===`flex-start`&&t.alignItemsFlexStart]}})(gs(({theme:e})=>({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:`inline-flex`,variants:[{props:{alignItems:`flex-start`},style:{marginTop:8}}]}))),n_=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiListItemIcon`}),{className:r,...i}=n,a=L.useContext(jg),o={...n,alignItems:a.alignItems};return(0,R.jsx)(t_,{className:z(e_(o).root,r),ownerState:o,ref:t,...i})});function r_(e){return B(`MuiListItemText`,e)}var i_=Jr(`MuiListItemText`,[`root`,`multiline`,`dense`,`inset`,`primary`,`secondary`]),a_=e=>{let{classes:t,inset:n,primary:r,secondary:i,dense:a}=e;return Sa({root:[`root`,n&&`inset`,a&&`dense`,r&&i&&`multiline`],primary:[`primary`],secondary:[`secondary`]},r_,t)},o_=H(`div`,{name:`MuiListItemText`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${i_.primary}`]:t.primary},{[`& .${i_.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:`1 1 auto`,minWidth:0,marginTop:4,marginBottom:4,[`.${Hl.root}:where(& .${i_.primary}), .${Hl.root}:where(& .${i_.secondary})`]:{display:`block`},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),s_=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiListItemText`}),{children:r,className:i,disableTypography:a=!1,inset:o=!1,primary:s,primaryTypographyProps:c,secondary:l,secondaryTypographyProps:u,slots:d={},slotProps:f={},...p}=n,{dense:m}=L.useContext(jg),h=s??r,g=l,_={...n,disableTypography:a,inset:o,primary:!!h,secondary:!!g,dense:m},v=a_(_),y={slots:d,slotProps:{primary:c,secondary:u,...f}},[b,x]=wc(`root`,{className:z(v.root,i),elementType:o_,externalForwardedProps:{...y,...p},ownerState:_,ref:t}),[S,C]=wc(`primary`,{className:v.primary,elementType:W,externalForwardedProps:y,ownerState:_}),[w,T]=wc(`secondary`,{className:v.secondary,elementType:W,externalForwardedProps:y,ownerState:_});return h!=null&&h.type!==W&&!a&&(h=(0,R.jsx)(S,{variant:m?`body2`:`body1`,component:C?.variant?void 0:`span`,...C,children:h})),g!=null&&g.type!==W&&!a&&(g=(0,R.jsx)(w,{variant:`body2`,color:`textSecondary`,...T,children:g})),(0,R.jsxs)(b,{...x,children:[h,g]})}),c_=Em;function l_(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function u_(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function d_(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(``))}function f_(e,t,n,r,i,a){let o=!1,s=i(e,t,t?n:!1);for(;s;){if(s===e.firstChild){if(o)return!1;o=!0}let t=r?!1:s.disabled||s.getAttribute(`aria-disabled`)===`true`;if(!s.hasAttribute(`tabindex`)||!d_(s,a)||t)s=i(e,s,n);else return s.focus(),!0}return!1}var p_=L.forwardRef(function(e,t){let{actions:n,autoFocus:r=!1,autoFocusItem:i=!1,children:a,className:o,disabledItemsFocusable:s=!1,disableListWrap:c=!1,onKeyDown:l,variant:u=`selectedMenu`,...d}=e,f=L.useRef(null),p=L.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});js(()=>{r&&f.current.focus()},[r]),L.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{let n=!f.current.style.width;if(e.clientHeight<f.current.clientHeight&&n){let n=`${c_(ks(e))}px`;f.current.style[t===`rtl`?`paddingLeft`:`paddingRight`]=n,f.current.style.width=`calc(100% + ${n})`}return f.current}}),[]);let m=e=>{let t=f.current,n=e.key;if(e.ctrlKey||e.metaKey||e.altKey){l&&l(e);return}let r=Lm(Ds(t));if(n===`ArrowDown`)e.preventDefault(),f_(t,r,c,s,l_);else if(n===`ArrowUp`)e.preventDefault(),f_(t,r,c,s,u_);else if(n===`Home`)e.preventDefault(),f_(t,null,c,s,l_);else if(n===`End`)e.preventDefault(),f_(t,null,c,s,u_);else if(n.length===1){let i=p.current,a=n.toLowerCase(),o=performance.now();i.keys.length>0&&(o-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&a!==i.keys[0]&&(i.repeating=!1)),i.lastTime=o,i.keys.push(a);let c=r&&!i.repeating&&d_(r,i);i.previousKeyMatched&&(c||f_(t,r,!1,s,l_,i))?e.preventDefault():i.previousKeyMatched=!1}l&&l(e)},h=Rs(f,t),g=-1;L.Children.forEach(a,(e,t)=>{if(!L.isValidElement(e)){g===t&&(g+=1,g>=a.length&&(g=-1));return}e.props.disabled||(u===`selectedMenu`&&e.props.selected||g===-1)&&(g=t),g===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(g+=1,g>=a.length&&(g=-1))});let _=L.Children.map(a,(e,t)=>{if(t===g){let t={};return i&&(t.autoFocus=!0),e.props.tabIndex===void 0&&u===`selectedMenu`&&(t.tabIndex=0),L.cloneElement(e,t)}return e});return(0,R.jsx)(Fg,{role:`menu`,ref:h,className:o,onKeyDown:m,tabIndex:r?0:-1,...d,children:_})});function m_(e){return B(`MuiPopover`,e)}Jr(`MuiPopover`,[`root`,`paper`]);function h_(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.height/2:t===`bottom`&&(n=e.height),n}function g_(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.width/2:t===`right`&&(n=e.width),n}function __(e){return[e.horizontal,e.vertical].map(e=>typeof e==`number`?`${e}px`:e).join(` `)}function v_(e){return typeof e==`function`?e():e}var y_=e=>{let{classes:t}=e;return Sa({root:[`root`],paper:[`paper`]},m_,t)},b_=H(eh,{name:`MuiPopover`,slot:`Root`})({}),x_=H(Pc,{name:`MuiPopover`,slot:`Paper`})({position:`absolute`,overflowY:`auto`,overflowX:`hidden`,minWidth:16,minHeight:16,maxWidth:`calc(100% - 32px)`,maxHeight:`calc(100% - 32px)`,outline:0}),S_=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiPopover`}),{action:r,anchorEl:i,anchorOrigin:a={vertical:`top`,horizontal:`left`},anchorPosition:o,anchorReference:s=`anchorEl`,children:c,className:l,container:u,elevation:d=8,marginThreshold:f=16,open:p,PaperProps:m={},slots:h={},slotProps:g={},transformOrigin:_={vertical:`top`,horizontal:`left`},TransitionComponent:v,transitionDuration:y=`auto`,TransitionProps:b={},disableScrollLock:x=!1,...S}=n,C=L.useRef(),w={...n,anchorOrigin:a,anchorReference:s,elevation:d,marginThreshold:f,transformOrigin:_,TransitionComponent:v,transitionDuration:y,TransitionProps:b},T=y_(w),E=L.useCallback(()=>{if(s===`anchorPosition`)return o;let e=v_(i),t=(e&&e.nodeType===1?e:Ds(C.current).body).getBoundingClientRect();return{top:t.top+h_(t,a.vertical),left:t.left+g_(t,a.horizontal)}},[i,a.horizontal,a.vertical,o,s]),D=L.useCallback(e=>({vertical:h_(e,_.vertical),horizontal:g_(e,_.horizontal)}),[_.horizontal,_.vertical]),O=L.useCallback(e=>{let t={width:e.offsetWidth,height:e.offsetHeight},n=D(t);if(s===`none`)return{top:null,left:null,transformOrigin:__(n)};let r=E(),a=r.top-n.vertical,o=r.left-n.horizontal,c=a+t.height,l=o+t.width,u=ks(v_(i)),d=u.innerHeight-f,p=u.innerWidth-f;if(f!==null&&a<f){let e=a-f;a-=e,n.vertical+=e}else if(f!==null&&c>d){let e=c-d;a-=e,n.vertical+=e}if(f!==null&&o<f){let e=o-f;o-=e,n.horizontal+=e}else if(l>p){let e=l-p;o-=e,n.horizontal+=e}return{top:`${Math.round(a)}px`,left:`${Math.round(o)}px`,transformOrigin:__(n)}},[i,s,E,D,f]),[k,ee]=L.useState(p),A=L.useCallback(()=>{let e=C.current;if(!e)return;let t=O(e);t.top!==null&&e.style.setProperty(`top`,t.top),t.left!==null&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,ee(!0)},[O]);L.useEffect(()=>(x&&window.addEventListener(`scroll`,A),()=>window.removeEventListener(`scroll`,A)),[i,x,A]);let j=()=>{A()},te=()=>{ee(!1)};L.useEffect(()=>{p&&A()}),L.useImperativeHandle(r,()=>p?{updatePosition:()=>{A()}}:null,[p,A]),L.useEffect(()=>{if(!p)return;let e=ws(()=>{A()}),t=ks(v_(i));return t.addEventListener(`resize`,e),()=>{e.clear(),t.removeEventListener(`resize`,e)}},[i,p,A]);let M=y,ne={slots:{transition:v,...h},slotProps:{transition:b,paper:m,...g}},[N,P]=wc(`transition`,{elementType:qh,externalForwardedProps:ne,ownerState:w,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),j()},onExited:t=>{e.onExited?.(t),te()}}),additionalProps:{appear:!0,in:p}});y===`auto`&&!N.muiSupportAuto&&(M=void 0);let re=u||(i?Ds(v_(i)).body:void 0),[ie,{slots:ae,slotProps:oe,...se}]=wc(`root`,{ref:t,elementType:b_,externalForwardedProps:{...ne,...S},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:h.backdrop},slotProps:{backdrop:Bs(typeof g.backdrop==`function`?g.backdrop(w):g.backdrop,{invisible:!0})},container:re,open:p},ownerState:w,className:z(T.root,l)}),[ce,le]=wc(`paper`,{ref:C,className:T.paper,elementType:x_,externalForwardedProps:ne,shouldForwardComponentProp:!0,additionalProps:{elevation:d,style:k?void 0:{opacity:0}},ownerState:w});return(0,R.jsx)(ie,{...se,...!vc(ie)&&{slots:ae,slotProps:oe,disableScrollLock:x},children:(0,R.jsx)(N,{...P,timeout:M,children:(0,R.jsx)(ce,{...le,children:c})})})});function C_(e){return B(`MuiMenu`,e)}Jr(`MuiMenu`,[`root`,`paper`,`list`]);var w_={vertical:`top`,horizontal:`right`},T_={vertical:`top`,horizontal:`left`},E_=e=>{let{classes:t}=e;return Sa({root:[`root`],paper:[`paper`],list:[`list`]},C_,t)},D_=H(S_,{shouldForwardProp:e=>rs(e)||e===`classes`,name:`MuiMenu`,slot:`Root`})({}),O_=H(x_,{name:`MuiMenu`,slot:`Paper`})({maxHeight:`calc(100% - 96px)`,WebkitOverflowScrolling:`touch`}),k_=H(p_,{name:`MuiMenu`,slot:`List`})({outline:0}),A_=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiMenu`}),{autoFocus:r=!0,children:i,className:a,disableAutoFocusItem:o=!1,MenuListProps:s={},onClose:c,open:l,PaperProps:u={},PopoverClasses:d,transitionDuration:f=`auto`,TransitionProps:{onEntering:p,...m}={},variant:h=`selectedMenu`,slots:g={},slotProps:_={},...v}=n,y=Vi(),b={...n,autoFocus:r,disableAutoFocusItem:o,MenuListProps:s,onEntering:p,PaperProps:u,transitionDuration:f,TransitionProps:m,variant:h},x=E_(b),S=r&&!o&&l,C=L.useRef(null),w=(e,t)=>{C.current&&C.current.adjustStyleForScrollbar(e,{direction:y?`rtl`:`ltr`}),p&&p(e,t)},T=e=>{e.key===`Tab`&&(e.preventDefault(),c&&c(e,`tabKeyDown`))},E=-1;L.Children.map(i,(e,t)=>{L.isValidElement(e)&&(e.props.disabled||(h===`selectedMenu`&&e.props.selected||E===-1)&&(E=t))});let D={slots:g,slotProps:{list:s,transition:m,paper:u,..._}},O=rf({elementType:g.root,externalSlotProps:_.root,ownerState:b,className:[x.root,a]}),[k,ee]=wc(`paper`,{className:x.paper,elementType:O_,externalForwardedProps:D,shouldForwardComponentProp:!0,ownerState:b}),[A,j]=wc(`list`,{className:z(x.list,s.className),elementType:k_,shouldForwardComponentProp:!0,externalForwardedProps:D,getSlotProps:e=>({...e,onKeyDown:t=>{T(t),e.onKeyDown?.(t)}}),ownerState:b}),te=typeof D.slotProps.transition==`function`?D.slotProps.transition(b):D.slotProps.transition;return(0,R.jsx)(D_,{onClose:c,anchorOrigin:{vertical:`bottom`,horizontal:y?`right`:`left`},transformOrigin:y?w_:T_,slots:{root:g.root,paper:k,backdrop:g.backdrop,...g.transition&&{transition:g.transition}},slotProps:{root:O,paper:ee,backdrop:typeof _.backdrop==`function`?_.backdrop(b):_.backdrop,transition:{...te,onEntering:(...e)=>{w(...e),te?.onEntering?.(...e)}}},open:l,ref:t,transitionDuration:f,ownerState:b,...v,classes:d,children:(0,R.jsx)(A,{actions:C,autoFocus:r&&(E===-1||o),autoFocusItem:S,variant:h,...j,children:i})})});function j_(e){return B(`MuiMenuItem`,e)}var M_=Jr(`MuiMenuItem`,[`root`,`focusVisible`,`dense`,`disabled`,`divider`,`gutters`,`selected`]),N_=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},P_=e=>{let{disabled:t,dense:n,divider:r,disableGutters:i,selected:a,classes:o}=e,s=Sa({root:[`root`,n&&`dense`,t&&`disabled`,!i&&`gutters`,r&&`divider`,a&&`selected`]},j_,o);return{...o,...s}},F_=H(ul,{shouldForwardProp:e=>rs(e)||e===`classes`,name:`MuiMenuItem`,slot:`Root`,overridesResolver:N_})(gs(({theme:e})=>({...e.typography.body1,display:`flex`,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,textDecoration:`none`,minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:`border-box`,whiteSpace:`nowrap`,"&:hover":{textDecoration:`none`,backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}},[`&.${M_.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${M_.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${M_.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${M_.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${M_.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${ph.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${ph.inset}`]:{marginLeft:52},[`& .${i_.root}`]:{marginTop:0,marginBottom:0},[`& .${i_.inset}`]:{paddingLeft:36},[`& .${$g.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:`padding-box`}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up(`sm`)]:{minHeight:`auto`}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${$g.root} svg`]:{fontSize:`1.25rem`}}}]}))),I_=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiMenuItem`}),{autoFocus:r=!1,component:i=`li`,dense:a=!1,divider:o=!1,disableGutters:s=!1,focusVisibleClassName:c,role:l=`menuitem`,tabIndex:u,className:d,...f}=n,p=L.useContext(jg),m=L.useMemo(()=>({dense:a||p.dense||!1,disableGutters:s}),[p.dense,a,s]),h=L.useRef(null);js(()=>{r&&h.current&&h.current.focus()},[r]);let g={...n,dense:m.dense,divider:o,disableGutters:s},_=P_(n),v=Rs(h,t),y;return n.disabled||(y=u===void 0?-1:u),(0,R.jsx)(jg.Provider,{value:m,children:(0,R.jsx)(F_,{ref:v,role:l,tabIndex:y,component:i,focusVisibleClassName:z(_.focusVisible,c),className:z(_.root,d),...f,ownerState:g,classes:_})})});function L_(e){return B(`MuiNativeSelect`,e)}var R_=Jr(`MuiNativeSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`icon`,`iconOpen`,`iconFilled`,`iconOutlined`,`iconStandard`,`nativeInput`,`error`]),z_=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return Sa({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,`icon${U(n)}`,a&&`iconOpen`,r&&`disabled`]},L_,t)},B_=H(`select`,{name:`MuiNativeSelect`})(({theme:e})=>({MozAppearance:`none`,WebkitAppearance:`none`,userSelect:`none`,borderRadius:0,cursor:`pointer`,"&:focus":{borderRadius:0},[`&.${R_.disabled}`]:{cursor:`default`},"&[multiple]":{height:`auto`},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:e})=>e.variant!==`filled`&&e.variant!==`outlined`,style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:`filled`},style:{"&&&":{paddingRight:32}}},{props:{variant:`outlined`},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),V_=H(B_,{name:`MuiNativeSelect`,slot:`Select`,shouldForwardProp:rs,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${R_.multiple}`]:t.multiple}]}})({}),H_=H(`svg`,{name:`MuiNativeSelect`})(({theme:e})=>({position:`absolute`,right:0,top:`calc(50% - .5em)`,pointerEvents:`none`,color:(e.vars||e).palette.action.active,[`&.${R_.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.open,style:{transform:`rotate(180deg)`}},{props:{variant:`filled`},style:{right:7}},{props:{variant:`outlined`},style:{right:7}}]})),U_=H(H_,{name:`MuiNativeSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${U(n.variant)}`],n.open&&t.iconOpen]}})({}),W_=L.forwardRef(function(e,t){let{className:n,disabled:r,error:i,IconComponent:a,inputRef:o,variant:s=`standard`,...c}=e,l={...e,disabled:r,variant:s,error:i},u=z_(l);return(0,R.jsxs)(L.Fragment,{children:[(0,R.jsx)(V_,{ownerState:l,className:z(u.select,n),disabled:r,ref:o||t,...c}),e.multiple?null:(0,R.jsx)(U_,{as:a,ownerState:l,className:u.icon})]})}),G_,K_=H(`fieldset`,{name:`MuiNotchedOutlined`,shouldForwardProp:rs})({textAlign:`left`,position:`absolute`,bottom:0,right:0,top:-5,left:0,margin:0,padding:`0 8px`,pointerEvents:`none`,borderRadius:`inherit`,borderStyle:`solid`,borderWidth:1,overflow:`hidden`,minWidth:`0%`}),q_=H(`legend`,{name:`MuiNotchedOutlined`,shouldForwardProp:rs})(gs(({theme:e})=>({float:`unset`,width:`auto`,overflow:`hidden`,variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:`11px`,transition:e.transitions.create(`width`,{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:e})=>e.withLabel,style:{display:`block`,padding:0,height:11,fontSize:`0.75em`,visibility:`hidden`,maxWidth:.01,transition:e.transitions.create(`max-width`,{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:`nowrap`,"& > span":{paddingLeft:5,paddingRight:5,display:`inline-block`,opacity:0,visibility:`visible`}}},{props:({ownerState:e})=>e.withLabel&&e.notched,style:{maxWidth:`100%`,transition:e.transitions.create(`max-width`,{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function J_(e){let{children:t,classes:n,className:r,label:i,notched:a,...o}=e,s=i!=null&&i!==``,c={...e,notched:a,withLabel:s};return(0,R.jsx)(K_,{"aria-hidden":!0,className:r,ownerState:c,...o,children:(0,R.jsx)(q_,{ownerState:c,children:s?(0,R.jsx)(`span`,{children:i}):G_||=(0,R.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``})})})}var Y_=e=>{let{classes:t}=e,n=Sa({root:[`root`],notchedOutline:[`notchedOutline`],input:[`input`]},Qf,t);return{...t,...n}},X_=H(Kf,{shouldForwardProp:e=>rs(e)||e===`classes`,name:`MuiOutlinedInput`,slot:`Root`,overridesResolver:Uf})(gs(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{position:`relative`,borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${$f.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${$f.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${$f.focused} .${$f.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(xl()).map(([t])=>({props:{color:t},style:{[`&.${$f.focused} .${$f.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${$f.error} .${$f.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${$f.disabled} .${$f.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:14}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:14}},{props:({ownerState:e})=>e.multiline,style:{padding:`16.5px 14px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{padding:`8.5px 14px`}}]}})),Z_=H(J_,{name:`MuiOutlinedInput`,slot:`NotchedOutline`})(gs(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),Q_=H(qf,{name:`MuiOutlinedInput`,slot:`Input`,overridesResolver:Wf})(gs(({theme:e})=>({padding:`16.5px 14px`,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode===`light`?null:`0 0 0 100px #266798 inset`,WebkitTextFillColor:e.palette.mode===`light`?null:`#fff`,caretColor:e.palette.mode===`light`?null:`#fff`,borderRadius:`inherit`}},...e.vars&&{"&:-webkit-autofill":{borderRadius:`inherit`},[e.getColorSchemeSelector(`dark`)]:{"&:-webkit-autofill":{WebkitBoxShadow:`0 0 0 100px #266798 inset`,WebkitTextFillColor:`#fff`,caretColor:`#fff`}}},variants:[{props:{size:`small`},style:{padding:`8.5px 14px`}},{props:({ownerState:e})=>e.multiline,style:{padding:0}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}}]}))),$_=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiOutlinedInput`}),{components:r={},fullWidth:i=!1,inputComponent:a=`input`,label:o,multiline:s=!1,notched:c,slots:l={},slotProps:u={},type:d=`text`,...f}=n,p=Y_(n),m=If(),h=Pf({props:n,muiFormControl:m,states:[`color`,`disabled`,`error`,`focused`,`hiddenLabel`,`size`,`required`]}),g={...n,color:h.color||`primary`,disabled:h.disabled,error:h.error,focused:h.focused,formControl:m,fullWidth:i,hiddenLabel:h.hiddenLabel,multiline:s,size:h.size,type:d},_=l.root??r.Root??X_,v=l.input??r.Input??Q_,[y,b]=wc(`notchedOutline`,{elementType:Z_,className:p.notchedOutline,shouldForwardComponentProp:!0,ownerState:g,externalForwardedProps:{slots:l,slotProps:u},additionalProps:{label:o!=null&&o!==``&&h.required?(0,R.jsxs)(L.Fragment,{children:[o,` `,`*`]}):o}});return(0,R.jsx)(Yf,{slots:{root:_,input:v},slotProps:u,renderSuffix:e=>(0,R.jsx)(y,{...b,notched:c===void 0?!!(e.startAdornment||e.filled||e.focused):c}),fullWidth:i,inputComponent:a,multiline:s,ref:t,type:d,...f,classes:{...p,notchedOutline:null}})});$_.muiName=`Input`;var ev=Ss((0,R.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z`}),`RadioButtonUnchecked`),tv=Ss((0,R.jsx)(`path`,{d:`M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z`}),`RadioButtonChecked`),nv=H(`span`,{name:`MuiRadioButtonIcon`,shouldForwardProp:rs})({position:`relative`,display:`flex`}),rv=H(ev,{name:`MuiRadioButtonIcon`})({transform:`scale(1)`}),iv=H(tv,{name:`MuiRadioButtonIcon`})(gs(({theme:e})=>({left:0,position:`absolute`,transform:`scale(0)`,transition:e.transitions.create(`transform`,{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest}),variants:[{props:{checked:!0},style:{transform:`scale(1)`,transition:e.transitions.create(`transform`,{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}}]})));function av(e){let{checked:t=!1,classes:n={},fontSize:r}=e,i={...e,checked:t};return(0,R.jsxs)(nv,{className:n.root,ownerState:i,children:[(0,R.jsx)(rv,{fontSize:r,className:n.background,ownerState:i}),(0,R.jsx)(iv,{fontSize:r,className:n.dot,ownerState:i})]})}var ov=L.createContext(void 0);function sv(){return L.useContext(ov)}function cv(e){return B(`MuiRadio`,e)}var lv=Jr(`MuiRadio`,[`root`,`checked`,`disabled`,`colorPrimary`,`colorSecondary`,`sizeSmall`]),uv=e=>{let{classes:t,color:n,size:r}=e,i={root:[`root`,`color${U(n)}`,r!==`medium`&&`size${U(r)}`]};return{...t,...Sa(i,cv,t)}},dv=H(pm,{shouldForwardProp:e=>rs(e)||e===`classes`,name:`MuiRadio`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.size!==`medium`&&t[`size${U(n.size)}`],t[`color${U(n.color)}`]]}})(gs(({theme:e})=>({color:(e.vars||e).palette.text.secondary,[`&.${lv.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{color:`default`,disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(xl()).map(([t])=>({props:{color:t,disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(xl()).map(([t])=>({props:{color:t,disabled:!1},style:{[`&.${lv.checked}`]:{color:(e.vars||e).palette[t].main}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:`transparent`}}}}]})));function fv(e,t){return typeof t==`object`&&t?e===t:String(e)===String(t)}var pv=(0,R.jsx)(av,{checked:!0}),kee=(0,R.jsx)(av,{}),mv=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiRadio`}),{checked:r,checkedIcon:i=pv,color:a=`primary`,icon:o=kee,name:s,onChange:c,size:l=`medium`,className:u,disabled:d,disableRipple:f=!1,slots:p={},slotProps:m={},inputProps:h,...g}=n,_=If(),v=d;_&&v===void 0&&(v=_.disabled),v??=!1;let y={...n,disabled:v,disableRipple:f,color:a,size:l},b=uv(y),x=sv(),S=r,C=fs(c,x&&x.onChange),w=s;x&&(S===void 0&&(S=fv(x.value,n.value)),w===void 0&&(w=x.name));let T=m.input??h,[E,D]=wc(`root`,{ref:t,elementType:dv,className:z(b.root,u),shouldForwardComponentProp:!0,externalForwardedProps:{slots:p,slotProps:m,...g},getSlotProps:e=>({...e,onChange:(t,...n)=>{e.onChange?.(t,...n),C(t,...n)}}),ownerState:y,additionalProps:{type:`radio`,icon:L.cloneElement(o,{fontSize:o.props.fontSize??l}),checkedIcon:L.cloneElement(i,{fontSize:i.props.fontSize??l}),disabled:v,name:w,checked:S,slots:p,slotProps:{input:typeof T==`function`?T(y):T}}});return(0,R.jsx)(E,{...D,classes:b})});function Aee(e){return B(`MuiRadioGroup`,e)}Jr(`MuiRadioGroup`,[`root`,`row`,`error`]);var jee=e=>{let{classes:t,row:n,error:r}=e;return Sa({root:[`root`,n&&`row`,r&&`error`]},Aee,t)},hv=L.forwardRef(function(e,t){let{actions:n,children:r,className:i,defaultValue:a,name:o,onChange:s,value:c,...l}=e,u=L.useRef(null),d=jee(e),[f,p]=Ps({controlled:c,default:a,name:`RadioGroup`});L.useImperativeHandle(n,()=>({focus:()=>{let e=u.current.querySelector(`input:not(:disabled):checked`);e||=u.current.querySelector(`input:not(:disabled)`),e&&e.focus()}}),[]);let m=Rs(t,u),h=Ms(o),g=L.useMemo(()=>({name:h,onChange(e){p(e.target.value),s&&s(e,e.target.value)},value:f}),[h,s,p,f]);return(0,R.jsx)(ov.Provider,{value:g,children:(0,R.jsx)(Ah,{role:`radiogroup`,ref:m,className:z(d.root,i),...l,children:r})})}),Mee={border:0,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,whiteSpace:`nowrap`,width:`1px`};function gv(e){return B(`MuiSelect`,e)}var _v=Jr(`MuiSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`focused`,`icon`,`iconOpen`,`iconFilled`,`iconOutlined`,`iconStandard`,`nativeInput`,`error`]),Nee,Pee=H(B_,{name:`MuiSelect`,slot:`Select`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`&.${_v.select}`]:t.select},{[`&.${_v.select}`]:t[n.variant]},{[`&.${_v.error}`]:t.error},{[`&.${_v.multiple}`]:t.multiple}]}})({[`&.${_v.select}`]:{height:`auto`,minHeight:`1.4375em`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,overflow:`hidden`}}),Fee=H(H_,{name:`MuiSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${U(n.variant)}`],n.open&&t.iconOpen]}})({}),Iee=H(`input`,{shouldForwardProp:e=>ns(e)&&e!==`classes`,name:`MuiSelect`,slot:`NativeInput`})({bottom:0,left:0,position:`absolute`,opacity:0,pointerEvents:`none`,width:`100%`,boxSizing:`border-box`});function vv(e,t){return typeof t==`object`&&t?e===t:String(e)===String(t)}function Lee(e){return e==null||typeof e==`string`&&!e.trim()}var Ree=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return Sa({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,`icon${U(n)}`,a&&`iconOpen`,r&&`disabled`],nativeInput:[`nativeInput`]},gv,t)},zee=L.forwardRef(function(e,t){let{"aria-describedby":n,"aria-label":r,autoFocus:i,autoWidth:a,children:o,className:s,defaultOpen:c,defaultValue:l,disabled:u,displayEmpty:d,error:f=!1,IconComponent:p,inputRef:m,labelId:h,MenuProps:g={},multiple:_,name:v,onBlur:y,onChange:b,onClose:x,onFocus:S,onKeyDown:C,onMouseDown:w,onOpen:T,open:E,readOnly:O,renderValue:k,required:ee,SelectDisplayProps:A={},tabIndex:j,type:te,value:M,variant:ne=`standard`,...N}=e,[P,re]=Ps({controlled:M,default:l,name:`Select`}),[ie,ae]=Ps({controlled:E,default:c,name:`Select`}),oe=L.useRef(null),se=L.useRef(null),[ce,le]=L.useState(null),{current:ue}=L.useRef(E!=null),[de,F]=L.useState(),fe=Rs(t,m),pe=L.useCallback(e=>{se.current=e,e&&le(e)},[]),me=ce?.parentNode;L.useImperativeHandle(fe,()=>({focus:()=>{se.current.focus()},node:oe.current,value:P}),[P]);let he=ce!==null&&ie;L.useEffect(()=>{if(!he||!me||a||typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{F(me.clientWidth)});return e.observe(me),()=>{e.disconnect()}},[he,me,a]),L.useEffect(()=>{c&&ie&&ce&&!ue&&(F(a?null:me.clientWidth),se.current.focus())},[ce,a]),L.useEffect(()=>{i&&se.current.focus()},[i]),L.useEffect(()=>{if(!h)return;let e=Ds(se.current).getElementById(h);if(e){let t=()=>{getSelection().isCollapsed&&se.current.focus()};return e.addEventListener(`click`,t),()=>{e.removeEventListener(`click`,t)}}},[h]);let ge=(e,t)=>{e?T&&T(t):x&&x(t),ue||(F(a?null:me.clientWidth),ae(e))},_e=e=>{w?.(e),e.button===0&&(e.preventDefault(),se.current.focus(),ge(!0,e))},I=e=>{ge(!1,e)},ve=L.Children.toArray(o),ye=e=>{let t=ve.find(t=>t.props.value===e.target.value);t!==void 0&&(re(t.props.value),b&&b(e,t))},be=e=>t=>{let n;if(t.currentTarget.hasAttribute(`tabindex`)){if(_){n=Array.isArray(P)?P.slice():[];let t=P.indexOf(e.props.value);t===-1?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),P!==n&&(re(n),b)){let r=t.nativeEvent||t,i=new r.constructor(r.type,r);Object.defineProperty(i,`target`,{writable:!0,value:{value:n,name:v}}),b(i,e)}_||ge(!1,t)}},xe=e=>{O||([` `,`ArrowUp`,`ArrowDown`,`Enter`].includes(e.key)&&(e.preventDefault(),ge(!0,e)),C?.(e))},Se=e=>{!he&&y&&(Object.defineProperty(e,`target`,{writable:!0,value:{value:P,name:v}}),y(e))};delete N[`aria-invalid`];let Ce,we,Te=[],Ee=!1;(Rf({value:P})||d)&&(k?Ce=k(P):Ee=!0);let De=ve.map(e=>{if(!L.isValidElement(e))return null;let t;if(_){if(!Array.isArray(P))throw Error(D(2));t=P.some(t=>vv(t,e.props.value)),t&&Ee&&Te.push(e.props.children)}else t=vv(P,e.props.value),t&&Ee&&(we=e.props.children);return L.cloneElement(e,{"aria-selected":t?`true`:`false`,onClick:be(e),onKeyUp:t=>{t.key===` `&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:`option`,selected:t,value:void 0,"data-value":e.props.value})});Ee&&(Ce=_?Te.length===0?null:Te.reduce((e,t,n)=>(e.push(t),n<Te.length-1&&e.push(`, `),e),[]):we);let Oe=de;!a&&ue&&ce&&(Oe=me.clientWidth);let ke;ke=j===void 0?u?null:0:j;let Ae=A.id||(v?`mui-component-select-${v}`:void 0),je={...e,variant:ne,value:P,open:he,error:f},Me=Ree(je),Ne={...g.PaperProps,...typeof g.slotProps?.paper==`function`?g.slotProps.paper(je):g.slotProps?.paper},Pe={...g.MenuListProps,...typeof g.slotProps?.list==`function`?g.slotProps.list(je):g.slotProps?.list},Fe=Yi();return(0,R.jsxs)(L.Fragment,{children:[(0,R.jsx)(Pee,{as:`div`,ref:pe,tabIndex:ke,role:`combobox`,"aria-controls":he?Fe:void 0,"aria-disabled":u?`true`:void 0,"aria-expanded":he?`true`:`false`,"aria-haspopup":`listbox`,"aria-label":r,"aria-labelledby":[h,Ae].filter(Boolean).join(` `)||void 0,"aria-describedby":n,"aria-required":ee?`true`:void 0,"aria-invalid":f?`true`:void 0,onKeyDown:xe,onMouseDown:u||O?null:_e,onBlur:Se,onFocus:S,...A,ownerState:je,className:z(A.className,Me.select,s),id:Ae,children:Lee(Ce)?Nee||=(0,R.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``}):Ce}),(0,R.jsx)(Iee,{"aria-invalid":f,value:Array.isArray(P)?P.join(`,`):P,name:v,ref:oe,"aria-hidden":!0,onChange:ye,tabIndex:-1,disabled:u,className:Me.nativeInput,autoFocus:i,required:ee,...N,ownerState:je}),(0,R.jsx)(Fee,{as:p,className:Me.icon,ownerState:je}),(0,R.jsx)(A_,{id:`menu-${v||``}`,anchorEl:me,open:he,onClose:I,anchorOrigin:{vertical:`bottom`,horizontal:`center`},transformOrigin:{vertical:`top`,horizontal:`center`},...g,slotProps:{...g.slotProps,list:{"aria-labelledby":h,role:`listbox`,"aria-multiselectable":_?`true`:void 0,disableListWrap:!0,id:Fe,...Pe},paper:{...Ne,style:{minWidth:Oe,...Ne==null?null:Ne.style}}},children:De})]})}),Bee=e=>{let{classes:t}=e,n=Sa({root:[`root`]},gv,t);return{...t,...n}},yv={name:`MuiSelect`,slot:`Root`,shouldForwardProp:e=>rs(e)&&e!==`variant`},Vee=H(Zh,yv)(``),Hee=H($_,yv)(``),Uee=H(_h,yv)(``),bv=L.forwardRef(function(e,t){let n=_s({name:`MuiSelect`,props:e}),{autoWidth:r=!1,children:i,classes:a={},className:o,defaultOpen:s=!1,displayEmpty:c=!1,IconComponent:l=np,id:u,input:d,inputProps:f,label:p,labelId:m,MenuProps:h,multiple:g=!1,native:_=!1,onClose:v,onOpen:y,open:b,renderValue:x,SelectDisplayProps:S,variant:C=`outlined`,...w}=n,T=_?W_:zee,E=Pf({props:n,muiFormControl:If(),states:[`variant`,`error`]}),D=E.variant||C,O={...n,variant:D,classes:a},k=Bee(O),{root:ee,...A}=k,j=d||{standard:(0,R.jsx)(Vee,{ownerState:O}),outlined:(0,R.jsx)(Hee,{label:p,ownerState:O}),filled:(0,R.jsx)(Uee,{ownerState:O})}[D],te=Rs(t,af(j));return(0,R.jsx)(L.Fragment,{children:L.cloneElement(j,{inputComponent:T,inputProps:{children:i,error:E.error,IconComponent:l,variant:D,type:void 0,multiple:g,..._?{id:u}:{autoWidth:r,defaultOpen:s,displayEmpty:c,labelId:m,MenuProps:h,onClose:v,onOpen:y,open:b,renderValue:x,SelectDisplayProps:{id:u,...S}},...f,classes:f?hn(A,f.classes):A,...d?d.props.inputProps:{}},...(g&&_||c)&&D===`outlined`?{notched:!0}:{},ref:te,className:z(j.props.className,o,k.root),...!d&&{variant:D},...w})})});bv.muiName=`Select`;function Wee(e,t,n=(e,t)=>e===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}var Gee=2;function xv(e,t,n,r,i){return n===1?Math.min(e+t,i):Math.max(e-t,r)}function Sv(e,t){return e-t}function Cv(e,t){let{index:n}=e.reduce((e,n,r)=>{let i=Math.abs(t-n);return e===null||i<e.distance||i===e.distance?{distance:i,index:r}:e},null)??{};return n}function wv(e,t){if(t.current!==void 0&&e.changedTouches){let n=e;for(let e=0;e<n.changedTouches.length;e+=1){let r=n.changedTouches[e];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function Tv(e,t,n){return(e-t)*100/(n-t)}function Kee(e,t,n){return(n-t)*e+t}function qee(e){if(Math.abs(e)<1){let t=e.toExponential().split(`e-`),n=t[0].split(`.`)[1];return(n?n.length:0)+parseInt(t[1],10)}let t=e.toString().split(`.`)[1];return t?t.length:0}function Jee(e,t,n){let r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(qee(t)))}function Ev({values:e,newValue:t,index:n}){let r=e.slice();return r[n]=t,r.sort(Sv)}function Dv({sliderRef:e,activeIndex:t,setActive:n}){let r=Es(e.current);(!e.current?.contains(r.activeElement)||Number(r?.activeElement?.getAttribute(`data-index`))!==t)&&e.current?.querySelector(`[type="range"][data-index="${t}"]`).focus(),n&&n(t)}function Ov(e,t){return typeof e==`number`&&typeof t==`number`?e===t:typeof e==`object`&&typeof t==`object`?Wee(e,t):!1}var Yee={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}%`})}},Xee=e=>e,kv;function Av(){return kv===void 0&&(kv=typeof CSS<`u`&&typeof CSS.supports==`function`?CSS.supports(`touch-action`,`none`):!0),kv}function Zee(e){let{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:i=!1,isRtl:a=!1,marks:o=!1,max:s=100,min:c=0,name:l,onChange:u,onChangeCommitted:d,orientation:f=`horizontal`,rootRef:p,scale:m=Xee,step:h=1,shiftStep:g=10,tabIndex:_,value:v}=e,y=L.useRef(void 0),[b,x]=L.useState(-1),[S,C]=L.useState(-1),[w,T]=L.useState(!1),E=L.useRef(0),D=L.useRef(null),[O,k]=Ns({controlled:v,default:n??c,name:`Slider`}),ee=u&&((e,t,n)=>{let r=e.nativeEvent||e,i=new r.constructor(r.type,r);Object.defineProperty(i,`target`,{writable:!0,value:{value:t,name:l}}),D.current=t,u(i,t,n)}),A=Array.isArray(O),j=A?O.slice().sort(Sv):[O];j=j.map(e=>e==null?c:gi(e,c,s));let te=o===!0&&h!==null?[...Array(Math.floor((s-c)/h)+1)].map((e,t)=>({value:c+h*t})):o||[],M=te.map(e=>e.value),[ne,N]=L.useState(-1),P=L.useRef(null),re=Ls(p,P),ie=e=>t=>{let n=Number(t.currentTarget.getAttribute(`data-index`));qc(t.target)&&N(n),C(n),e?.onFocus?.(t)},ae=e=>t=>{qc(t.target)||N(-1),C(-1),e?.onBlur?.(t)},oe=(e,t)=>{let n=Number(e.currentTarget.getAttribute(`data-index`)),r=j[n],a=M.indexOf(r),o=t;if(te&&h==null){let e=M[M.length-1];o=o>=e?e:o<=M[0]?M[0]:o<r?M[a-1]:M[a+1]}if(o=gi(o,c,s),A){i&&(o=gi(o,j[n-1]||-1/0,j[n+1]||1/0));let e=o;o=Ev({values:j,newValue:o,index:n});let t=n;i||(t=o.indexOf(e)),Dv({sliderRef:P,activeIndex:t})}k(o),N(n),ee&&!Ov(o,O)&&ee(e,o,n),d&&d(e,D.current??o)},se=e=>t=>{if([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`PageUp`,`PageDown`,`Home`,`End`].includes(t.key)){t.preventDefault();let e=Number(t.currentTarget.getAttribute(`data-index`)),n=j[e],r=null;if(h!=null){let e=t.shiftKey?g:h;switch(t.key){case`ArrowUp`:r=xv(n,e,1,c,s);break;case`ArrowRight`:r=xv(n,e,a?-1:1,c,s);break;case`ArrowDown`:r=xv(n,e,-1,c,s);break;case`ArrowLeft`:r=xv(n,e,a?1:-1,c,s);break;case`PageUp`:r=xv(n,g,1,c,s);break;case`PageDown`:r=xv(n,g,-1,c,s);break;case`Home`:r=c;break;case`End`:r=s;break;default:break}}else if(te){let e=M[M.length-1],i=M.indexOf(n),o=[a?`ArrowRight`:`ArrowLeft`,`ArrowDown`,`PageDown`,`Home`],s=[a?`ArrowLeft`:`ArrowRight`,`ArrowUp`,`PageUp`,`End`];o.includes(t.key)?r=i===0?M[0]:M[i-1]:s.includes(t.key)&&(r=i===M.length-1?e:M[i+1])}r!=null&&oe(t,r)}e?.onKeyDown?.(t)};di(()=>{r&&P.current.contains(document.activeElement)&&document.activeElement?.blur()},[r]),r&&b!==-1&&x(-1),r&&ne!==-1&&N(-1);let ce=e=>t=>{e.onChange?.(t),oe(t,t.target.valueAsNumber)},le=L.useRef(void 0),ue=f;a&&f===`horizontal`&&(ue+=`-reverse`);let de=({finger:e,move:t=!1})=>{let{current:n}=P,{width:r,height:a,bottom:o,left:l}=n.getBoundingClientRect(),u;u=ue.startsWith(`vertical`)?(o-e.y)/a:(e.x-l)/r,ue.includes(`-reverse`)&&(u=1-u);let d;d=Kee(u,c,s),d=h?Jee(d,h,c):M[Cv(M,d)],d=gi(d,c,s);let f=0;if(A){f=t?le.current:Cv(j,d),i&&(d=gi(d,j[f-1]||-1/0,j[f+1]||1/0));let e=d;d=Ev({values:j,newValue:d,index:f}),i&&t||(f=d.indexOf(e),le.current=f)}return{newValue:d,activeIndex:f}},F=Fs(e=>{let t=wv(e,y);if(!t)return;if(E.current+=1,e.type===`mousemove`&&e.buttons===0){fe(e);return}let{newValue:n,activeIndex:r}=de({finger:t,move:!0});Dv({sliderRef:P,activeIndex:r,setActive:x}),k(n),!w&&E.current>Gee&&T(!0),ee&&!Ov(n,O)&&ee(e,n,r)}),fe=Fs(e=>{let t=wv(e,y);if(T(!1),!t)return;let{newValue:n}=de({finger:t,move:!0});x(-1),e.type===`touchend`&&C(-1),d&&d(e,D.current??n),y.current=void 0,me()}),pe=Fs(e=>{if(r)return;Av()||e.preventDefault();let t=e.changedTouches[0];t!=null&&(y.current=t.identifier);let n=wv(e,y);if(n!==!1){let{newValue:t,activeIndex:r}=de({finger:n});Dv({sliderRef:P,activeIndex:r,setActive:x}),k(t),ee&&!Ov(t,O)&&ee(e,t,r)}E.current=0;let i=Es(P.current);i.addEventListener(`touchmove`,F,{passive:!0}),i.addEventListener(`touchend`,fe,{passive:!0})}),me=L.useCallback(()=>{let e=Es(P.current);e.removeEventListener(`mousemove`,F),e.removeEventListener(`mouseup`,fe),e.removeEventListener(`touchmove`,F),e.removeEventListener(`touchend`,fe)},[fe,F]);L.useEffect(()=>{let{current:e}=P;return e.addEventListener(`touchstart`,pe,{passive:Av()}),()=>{e.removeEventListener(`touchstart`,pe),me()}},[me,pe]),L.useEffect(()=>{r&&me()},[r,me]);let he=e=>t=>{if(e.onMouseDown?.(t),r||t.defaultPrevented||t.button!==0)return;t.preventDefault();let n=wv(t,y);if(n!==!1){let{newValue:e,activeIndex:r}=de({finger:n});Dv({sliderRef:P,activeIndex:r,setActive:x}),k(e),ee&&!Ov(e,O)&&ee(t,e,r)}E.current=0;let i=Es(P.current);i.addEventListener(`mousemove`,F,{passive:!0}),i.addEventListener(`mouseup`,fe)},ge=Tv(A?j[0]:c,c,s),_e=Tv(j[j.length-1],c,s)-ge,I=(e={})=>{let t=xc(e),n={onMouseDown:he(t||{})},r={...t,...n};return{...e,ref:re,...r}},ve=e=>t=>{e.onMouseOver?.(t),C(Number(t.currentTarget.getAttribute(`data-index`)))},ye=e=>t=>{e.onMouseLeave?.(t),C(-1)},be=(e={})=>{let t=xc(e),n={onMouseOver:ve(t||{}),onMouseLeave:ye(t||{})};return{...e,...t,...n}},xe=e=>({pointerEvents:b!==-1&&b!==e?`none`:void 0}),Se;return f===`vertical`&&(Se=a?`vertical-rl`:`vertical-lr`),{active:b,axis:ue,axisProps:Yee,dragging:w,focusedThumbIndex:ne,getHiddenInputProps:(n={})=>{let i=xc(n),o={onChange:ce(i||{}),onFocus:ie(i||{}),onBlur:ae(i||{}),onKeyDown:se(i||{})},u={...i,...o};return{tabIndex:_,"aria-labelledby":t,"aria-orientation":f,"aria-valuemax":m(s),"aria-valuemin":m(c),name:l,type:`range`,min:e.min,max:e.max,step:e.step===null&&e.marks?`any`:e.step??void 0,disabled:r,...n,...u,style:{...Mee,direction:a?`rtl`:`ltr`,width:`100%`,height:`100%`,writingMode:Se}}},getRootProps:I,getThumbProps:be,marks:te,open:S,range:A,rootRef:re,trackLeap:_e,trackOffset:ge,values:j,getThumbStyle:xe}}var Qee=e=>!e||!vc(e);function $ee(e){return B(`MuiSlider`,e)}var jv=Jr(`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`.split(`.`)),ete=e=>{let{open:t}=e;return{offset:z(t&&jv.valueLabelOpen),circle:jv.valueLabelCircle,label:jv.valueLabelLabel}};function tte(e){let{children:t,className:n,value:r}=e,i=ete(e);return t?L.cloneElement(t,{className:t.props.className},(0,R.jsxs)(L.Fragment,{children:[t.props.children,(0,R.jsx)(`span`,{className:z(i.offset,n),"aria-hidden":!0,children:(0,R.jsx)(`span`,{className:i.circle,children:(0,R.jsx)(`span`,{className:i.label,children:r})})})]})):null}function Mv(e){return e}var nte=H(`span`,{name:`MuiSlider`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`color${U(n.color)}`],n.size!==`medium`&&t[`size${U(n.size)}`],n.marked&&t.marked,n.orientation===`vertical`&&t.vertical,n.track===`inverted`&&t.trackInverted,n.track===!1&&t.trackFalse]}})(gs(({theme:e})=>({borderRadius:12,boxSizing:`content-box`,display:`inline-block`,position:`relative`,cursor:`pointer`,touchAction:`none`,WebkitTapHighlightColor:`transparent`,"@media print":{colorAdjust:`exact`},[`&.${jv.disabled}`]:{pointerEvents:`none`,cursor:`default`,color:(e.vars||e).palette.grey[400]},[`&.${jv.dragging}`]:{[`& .${jv.thumb}, & .${jv.track}`]:{transition:`none`}},variants:[...Object.entries(e.palette).filter(xl()).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}}]}))),rte=H(`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}}]}),ite=H(`span`,{name:`MuiSlider`,slot:`Track`})(gs(({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(xl()).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:e.lighten(e.palette[t].main,.62),borderColor:e.lighten(e.palette[t].main,.62),...e.applyStyles(`dark`,{backgroundColor:e.darken(e.palette[t].main,.5)}),...e.applyStyles(`dark`,{borderColor:e.darken(e.palette[t].main,.5)})}}}))]}))),ate=H(`span`,{name:`MuiSlider`,slot:`Thumb`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.thumb,t[`thumbColor${U(n.color)}`],n.size!==`medium`&&t[`thumbSize${U(n.size)}`]]}})(gs(({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%)`},[`&.${jv.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(xl()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${jv.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.alpha((e.vars||e).palette[t].main,.16)}`,"@media (hover: none)":{boxShadow:`none`}},[`&.${jv.active}`]:{boxShadow:`0px 0px 0px 14px ${e.alpha((e.vars||e).palette[t].main,.16)}`}}}))]}))),ote=H(tte,{name:`MuiSlider`,slot:`ValueLabel`})(gs(({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%`},[`&.${jv.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%`},[`&.${jv.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`}}]}))),ste=H(`span`,{name:`MuiSlider`,slot:`Mark`,shouldForwardProp:e=>ns(e)&&e!==`markActive`,overridesResolver:(e,t)=>{let{markActive:n}=e;return[t.mark,n&&t.markActive]}})(gs(({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}}]}))),cte=H(`span`,{name:`MuiSlider`,slot:`MarkLabel`,shouldForwardProp:e=>ns(e)&&e!==`markLabelActive`})(gs(({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}}]}))),lte=e=>{let{disabled:t,dragging:n,marked:r,orientation:i,track:a,classes:o,color:s,size:c}=e;return Sa({root:[`root`,t&&`disabled`,n&&`dragging`,r&&`marked`,i===`vertical`&&`vertical`,a===`inverted`&&`trackInverted`,a===!1&&`trackFalse`,s&&`color${U(s)}`,c&&`size${U(c)}`],rail:[`rail`],track:[`track`],mark:[`mark`],markActive:[`markActive`],markLabel:[`markLabel`],markLabelActive:[`markLabelActive`],valueLabel:[`valueLabel`],thumb:[`thumb`,t&&`disabled`,c&&`thumbSize${U(c)}`,s&&`thumbColor${U(s)}`],active:[`active`],disabled:[`disabled`],focusVisible:[`focusVisible`]},$ee,o)},ute=({children:e})=>e,dte=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiSlider`}),r=Vi(),{"aria-label":i,"aria-valuetext":a,"aria-labelledby":o,component:s=`span`,components:c={},componentsProps:l={},color:u=`primary`,classes:d,className:f,disableSwap:p=!1,disabled:m=!1,getAriaLabel:h,getAriaValueText:g,marks:_=!1,max:v=100,min:y=0,name:b,onChange:x,onChangeCommitted:S,orientation:C=`horizontal`,shiftStep:w=10,size:T=`medium`,step:E=1,scale:D=Mv,slotProps:O,slots:k,tabIndex:ee,track:A=`normal`,value:j,valueLabelDisplay:te=`off`,valueLabelFormat:M=Mv,...ne}=n,N={...n,isRtl:r,max:v,min:y,classes:d,disabled:m,disableSwap:p,orientation:C,marks:_,color:u,size:T,step:E,shiftStep:w,scale:D,track:A,valueLabelDisplay:te,valueLabelFormat:M},{axisProps:P,getRootProps:re,getHiddenInputProps:ie,getThumbProps:ae,open:oe,active:se,axis:ce,focusedThumbIndex:le,range:ue,dragging:de,marks:F,values:fe,trackOffset:pe,trackLeap:me,getThumbStyle:he}=Zee({...N,rootRef:t});N.marked=F.length>0&&F.some(e=>e.label),N.dragging=de,N.focusedThumbIndex=le;let ge=lte(N),_e=k?.root??c.Root??nte,I=k?.rail??c.Rail??rte,ve=k?.track??c.Track??ite,ye=k?.thumb??c.Thumb??ate,be=k?.valueLabel??c.ValueLabel??ote,xe=k?.mark??c.Mark??ste,Se=k?.markLabel??c.MarkLabel??cte,Ce=k?.input??c.Input??`input`,we=O?.root??l.root,Te=O?.rail??l.rail,Ee=O?.track??l.track,De=O?.thumb??l.thumb,Oe=O?.valueLabel??l.valueLabel,ke=O?.mark??l.mark,Ae=O?.markLabel??l.markLabel,je=O?.input??l.input,Me=rf({elementType:_e,getSlotProps:re,externalSlotProps:we,externalForwardedProps:ne,additionalProps:{...Qee(_e)&&{as:s}},ownerState:{...N,...we?.ownerState},className:[ge.root,f]}),Ne=rf({elementType:I,externalSlotProps:Te,ownerState:N,className:ge.rail}),Pe=rf({elementType:ve,externalSlotProps:Ee,additionalProps:{style:{...P[ce].offset(pe),...P[ce].leap(me)}},ownerState:{...N,...Ee?.ownerState},className:ge.track}),Fe=rf({elementType:ye,getSlotProps:ae,externalSlotProps:De,ownerState:{...N,...De?.ownerState},className:ge.thumb}),Ie=rf({elementType:be,externalSlotProps:Oe,ownerState:{...N,...Oe?.ownerState},className:ge.valueLabel}),Le=rf({elementType:xe,externalSlotProps:ke,ownerState:N,className:ge.mark}),Re=rf({elementType:Se,externalSlotProps:Ae,ownerState:N,className:ge.markLabel}),ze=rf({elementType:Ce,getSlotProps:ie,externalSlotProps:je,ownerState:N});return(0,R.jsxs)(_e,{...Me,children:[(0,R.jsx)(I,{...Ne}),(0,R.jsx)(ve,{...Pe}),F.filter(e=>e.value>=y&&e.value<=v).map((e,t)=>{let n=Tv(e.value,y,v),r=P[ce].offset(n),i;return i=A===!1?fe.includes(e.value):A===`normal`&&(ue?e.value>=fe[0]&&e.value<=fe[fe.length-1]:e.value<=fe[0])||A===`inverted`&&(ue?e.value<=fe[0]||e.value>=fe[fe.length-1]:e.value>=fe[0]),(0,R.jsxs)(L.Fragment,{children:[(0,R.jsx)(xe,{"data-index":t,...Le,...!vc(xe)&&{markActive:i},style:{...r,...Le.style},className:z(Le.className,i&&ge.markActive)}),e.label==null?null:(0,R.jsx)(Se,{"aria-hidden":!0,"data-index":t,...Re,...!vc(Se)&&{markLabelActive:i},style:{...r,...Re.style},className:z(ge.markLabel,Re.className,i&&ge.markLabelActive),children:e.label})]},t)}),fe.map((e,t)=>{let n=Tv(e,y,v),r=P[ce].offset(n),s=te===`off`?ute:be;return(0,R.jsx)(s,{...!vc(s)&&{valueLabelFormat:M,valueLabelDisplay:te,value:typeof M==`function`?M(D(e),t):M,index:t,open:oe===t||se===t||te===`on`,disabled:m},...Ie,children:(0,R.jsx)(ye,{"data-index":t,...Fe,className:z(ge.thumb,Fe.className,se===t&&ge.active,le===t&&ge.focusVisible),style:{...r,...he(t),...Fe.style},children:(0,R.jsx)(Ce,{"data-index":t,"aria-label":h?h(t):i,"aria-valuenow":D(e),"aria-labelledby":o,"aria-valuetext":g?g(D(e),t):a,value:fe[t],...ze})})},t)})]})});function fte(e){return B(`MuiTooltip`,e)}var Nv=Jr(`MuiTooltip`,[`popper`,`popperInteractive`,`popperArrow`,`popperClose`,`tooltip`,`tooltipArrow`,`touch`,`tooltipPlacementLeft`,`tooltipPlacementRight`,`tooltipPlacementTop`,`tooltipPlacementBottom`,`arrow`]);function pte(e){return Math.round(e*1e5)/1e5}var mte=e=>{let{classes:t,disableInteractive:n,arrow:r,touch:i,placement:a}=e;return Sa({popper:[`popper`,!n&&`popperInteractive`,r&&`popperArrow`],tooltip:[`tooltip`,r&&`tooltipArrow`,i&&`touch`,`tooltipPlacement${U(a.split(`-`)[0])}`],arrow:[`arrow`]},fte,t)},hte=H(gf,{name:`MuiTooltip`,slot:`Popper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(gs(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:`none`,variants:[{props:({ownerState:e})=>!e.disableInteractive,style:{pointerEvents:`auto`}},{props:({open:e})=>!e,style:{pointerEvents:`none`}},{props:({ownerState:e})=>e.arrow,style:{[`&[data-popper-placement*="bottom"] .${Nv.arrow}`]:{top:0,marginTop:`-0.71em`,"&::before":{transformOrigin:`0 100%`}},[`&[data-popper-placement*="top"] .${Nv.arrow}`]:{bottom:0,marginBottom:`-0.71em`,"&::before":{transformOrigin:`100% 0`}},[`&[data-popper-placement*="right"] .${Nv.arrow}`]:{height:`1em`,width:`0.71em`,"&::before":{transformOrigin:`100% 100%`}},[`&[data-popper-placement*="left"] .${Nv.arrow}`]:{height:`1em`,width:`0.71em`,"&::before":{transformOrigin:`0 0`}}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="right"] .${Nv.arrow}`]:{left:0,marginLeft:`-0.71em`}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="right"] .${Nv.arrow}`]:{right:0,marginRight:`-0.71em`}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="left"] .${Nv.arrow}`]:{right:0,marginRight:`-0.71em`}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="left"] .${Nv.arrow}`]:{left:0,marginLeft:`-0.71em`}}}]}))),gte=H(`div`,{name:`MuiTooltip`,slot:`Tooltip`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${U(n.placement.split(`-`)[0])}`]]}})(gs(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:`4px 8px`,fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:`break-word`,fontWeight:e.typography.fontWeightMedium,[`.${Nv.popper}[data-popper-placement*="left"] &`]:{transformOrigin:`right center`},[`.${Nv.popper}[data-popper-placement*="right"] &`]:{transformOrigin:`left center`},[`.${Nv.popper}[data-popper-placement*="top"] &`]:{transformOrigin:`center bottom`,marginBottom:`14px`},[`.${Nv.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:`center top`,marginTop:`14px`},variants:[{props:({ownerState:e})=>e.arrow,style:{position:`relative`,margin:0}},{props:({ownerState:e})=>e.touch,style:{padding:`8px 16px`,fontSize:e.typography.pxToRem(14),lineHeight:`${pte(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:e})=>!e.isRtl,style:{[`.${Nv.popper}[data-popper-placement*="left"] &`]:{marginRight:`14px`},[`.${Nv.popper}[data-popper-placement*="right"] &`]:{marginLeft:`14px`}}},{props:({ownerState:e})=>!e.isRtl&&e.touch,style:{[`.${Nv.popper}[data-popper-placement*="left"] &`]:{marginRight:`24px`},[`.${Nv.popper}[data-popper-placement*="right"] &`]:{marginLeft:`24px`}}},{props:({ownerState:e})=>!!e.isRtl,style:{[`.${Nv.popper}[data-popper-placement*="left"] &`]:{marginLeft:`14px`},[`.${Nv.popper}[data-popper-placement*="right"] &`]:{marginRight:`14px`}}},{props:({ownerState:e})=>!!e.isRtl&&e.touch,style:{[`.${Nv.popper}[data-popper-placement*="left"] &`]:{marginLeft:`24px`},[`.${Nv.popper}[data-popper-placement*="right"] &`]:{marginRight:`24px`}}},{props:({ownerState:e})=>e.touch,style:{[`.${Nv.popper}[data-popper-placement*="top"] &`]:{marginBottom:`24px`}}},{props:({ownerState:e})=>e.touch,style:{[`.${Nv.popper}[data-popper-placement*="bottom"] &`]:{marginTop:`24px`}}}]}))),_te=H(`span`,{name:`MuiTooltip`,slot:`Arrow`})(gs(({theme:e})=>({overflow:`hidden`,position:`absolute`,width:`1em`,height:`0.71em`,boxSizing:`border-box`,color:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.9),"&::before":{content:`""`,margin:`auto`,display:`block`,width:`100%`,height:`100%`,backgroundColor:`currentColor`,transform:`rotate(45deg)`}}))),Pv=!1,Fv=new mc,Iv={x:0,y:0};function Lv(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}var q=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiTooltip`}),{arrow:r=!1,children:i,classes:a,components:o={},componentsProps:s={},describeChild:c=!1,disableFocusListener:l=!1,disableHoverListener:u=!1,disableInteractive:d=!1,disableTouchListener:f=!1,enterDelay:p=100,enterNextDelay:m=0,enterTouchDelay:h=700,followCursor:g=!1,id:_,leaveDelay:v=0,leaveTouchDelay:y=1500,onClose:b,onOpen:x,open:S,placement:C=`bottom`,PopperComponent:w,PopperProps:T={},slotProps:E={},slots:D={},title:O,TransitionComponent:k,TransitionProps:ee,...A}=n,j=L.isValidElement(i)?i:(0,R.jsx)(`span`,{children:i}),te=ts(),M=Vi(),[ne,N]=L.useState(),[P,re]=L.useState(null),ie=L.useRef(!1),ae=d||g,oe=hc(),se=hc(),ce=hc(),le=hc(),[ue,de]=Ps({controlled:S,default:!1,name:`Tooltip`,state:`open`}),F=ue,fe=Ms(_),pe=L.useRef(),me=Is(()=>{pe.current!==void 0&&(document.body.style.WebkitUserSelect=pe.current,pe.current=void 0),le.clear()});L.useEffect(()=>me,[me]);let he=e=>{Fv.clear(),Pv=!0,de(!0),x&&!F&&x(e)},ge=Is(e=>{Fv.start(800+v,()=>{Pv=!1}),de(!1),b&&F&&b(e),oe.start(te.transitions.duration.shortest,()=>{ie.current=!1})}),_e=e=>{ie.current&&e.type!==`touchstart`||(ne&&ne.removeAttribute(`title`),se.clear(),ce.clear(),p||Pv&&m?se.start(Pv?m:p,()=>{he(e)}):he(e))},I=e=>{se.clear(),ce.start(v,()=>{ge(e)})},[,ve]=L.useState(!1),ye=e=>{let t=e?.target??ne;if(!t||!qc(t)){ve(!1);let n=e??new Event(`blur`);!e&&t&&(Object.defineProperty(n,`target`,{value:t}),Object.defineProperty(n,`currentTarget`,{value:t})),I(n)}},be=e=>{ne||N(e.currentTarget),qc(e.target)&&(ve(!0),_e(e))},xe=e=>{ie.current=!0;let t=j.props;t.onTouchStart&&t.onTouchStart(e)},Se=e=>{xe(e),ce.clear(),oe.clear(),me(),pe.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect=`none`,le.start(h,()=>{document.body.style.WebkitUserSelect=pe.current,_e(e)})},Ce=e=>{j.props.onTouchEnd&&j.props.onTouchEnd(e),me(),ce.start(y,()=>{ge(e)})};L.useEffect(()=>{if(!F)return;function e(e){e.key===`Escape`&&ge(e)}return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[ge,F]);let we=Rs(af(j),N,t);!O&&O!==0&&(F=!1);let Te=L.useRef(),Ee=e=>{let t=j.props;t.onMouseMove&&t.onMouseMove(e),Iv={x:e.clientX,y:e.clientY},Te.current&&Te.current.update()},De={},Oe=typeof O==`string`;c?(De.title=!F&&Oe&&!u?O:null,De[`aria-describedby`]=F?fe:null):(De[`aria-label`]=Oe?O:null,De[`aria-labelledby`]=F&&!Oe?fe:null);let ke={...De,...A,...j.props,className:z(A.className,j.props.className),onTouchStart:xe,ref:we,...g?{onMouseMove:Ee}:{}},Ae={};f||(ke.onTouchStart=Se,ke.onTouchEnd=Ce),u||(ke.onMouseOver=Lv(_e,ke.onMouseOver),ke.onMouseLeave=Lv(I,ke.onMouseLeave),ae||(Ae.onMouseOver=_e,Ae.onMouseLeave=I)),l||(ke.onFocus=Lv(be,ke.onFocus),ke.onBlur=Lv(ye,ke.onBlur),ae||(Ae.onFocus=be,Ae.onBlur=ye));let je={...n,isRtl:M,arrow:r,disableInteractive:ae,placement:C,PopperComponentProp:w,touch:ie.current},Me=typeof E.popper==`function`?E.popper(je):E.popper,Ne=L.useMemo(()=>{let e=[{name:`arrow`,enabled:!!P,options:{element:P,padding:4}}];return T.popperOptions?.modifiers&&(e=e.concat(T.popperOptions.modifiers)),Me?.popperOptions?.modifiers&&(e=e.concat(Me.popperOptions.modifiers)),{...T.popperOptions,...Me?.popperOptions,modifiers:e}},[P,T.popperOptions,Me?.popperOptions]),Pe=mte(je),Fe=typeof E.transition==`function`?E.transition(je):E.transition,Ie={slots:{popper:o.Popper,transition:o.Transition??k,tooltip:o.Tooltip,arrow:o.Arrow,...D},slotProps:{arrow:E.arrow??s.arrow,popper:{...T,...Me??s.popper},tooltip:E.tooltip??s.tooltip,transition:{...ee,...Fe??s.transition}}},[Le,Re]=wc(`popper`,{elementType:hte,externalForwardedProps:Ie,ownerState:je,className:z(Pe.popper,T?.className)}),[ze,Be]=wc(`transition`,{elementType:qh,externalForwardedProps:Ie,ownerState:je}),[Ve,He]=wc(`tooltip`,{elementType:gte,className:Pe.tooltip,externalForwardedProps:Ie,ownerState:je}),[Ue,We]=wc(`arrow`,{elementType:_te,className:Pe.arrow,externalForwardedProps:Ie,ownerState:je,ref:re});return(0,R.jsxs)(L.Fragment,{children:[L.cloneElement(j,ke),(0,R.jsx)(Le,{as:w??gf,placement:C,anchorEl:g?{getBoundingClientRect:()=>({top:Iv.y,left:Iv.x,right:Iv.x,bottom:Iv.y,width:0,height:0})}:ne,popperRef:Te,open:ne?F:!1,id:fe,transition:!0,...Ae,...Re,popperOptions:Ne,children:({TransitionProps:e})=>(0,R.jsx)(ze,{timeout:te.transitions.duration.shorter,...e,...Be,children:(0,R.jsxs)(Ve,{...He,children:[O,r?(0,R.jsx)(Ue,{...We}):null]})})})]})}),Rv=Za({createStyledComponent:H(`div`,{name:`MuiStack`,slot:`Root`}),useThemeProps:e=>_s({props:e,name:`MuiStack`})}),zv=L.createContext({}),Bv=L.createContext({});function vte(e){return B(`MuiStep`,e)}Jr(`MuiStep`,[`root`,`horizontal`,`vertical`,`alternativeLabel`,`completed`]);var yte=e=>{let{classes:t,orientation:n,alternativeLabel:r,completed:i}=e;return Sa({root:[`root`,n,r&&`alternativeLabel`,i&&`completed`]},vte,t)},bte=H(`div`,{name:`MuiStep`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.completed&&t.completed]}})({variants:[{props:{orientation:`horizontal`},style:{paddingLeft:8,paddingRight:8}},{props:{alternativeLabel:!0},style:{flex:1,position:`relative`}}]}),Vv=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiStep`}),{active:r,children:i,className:a,component:o=`div`,completed:s,disabled:c,expanded:l=!1,index:u,last:d,...f}=n,{activeStep:p,connector:m,alternativeLabel:h,orientation:g,nonLinear:_}=L.useContext(zv),[v=!1,y=!1,b=!1]=[r,s,c];p===u?v=r===void 0?!0:r:!_&&p>u?y=s===void 0?!0:s:!_&&p<u&&(b=c===void 0?!0:c);let x=L.useMemo(()=>({index:u,last:d,expanded:l,icon:u+1,active:v,completed:y,disabled:b}),[u,d,l,v,y,b]),S={...n,active:v,orientation:g,alternativeLabel:h,completed:y,disabled:b,expanded:l,component:o},C=(0,R.jsxs)(bte,{as:o,className:z(yte(S).root,a),ref:t,ownerState:S,...f,children:[m&&h&&u!==0?m:null,i]});return(0,R.jsx)(Bv.Provider,{value:x,children:m&&!h&&u!==0?(0,R.jsxs)(L.Fragment,{children:[m,C]}):C})}),Hv=Ss((0,R.jsx)(`path`,{d:`M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z`}),`CheckCircle`),Uv=Ss((0,R.jsx)(`path`,{d:`M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z`}),`Warning`);function Wv(e){return B(`MuiStepIcon`,e)}var Gv=Jr(`MuiStepIcon`,[`root`,`active`,`completed`,`error`,`text`]),Kv,qv=e=>{let{classes:t,active:n,completed:r,error:i}=e;return Sa({root:[`root`,n&&`active`,r&&`completed`,i&&`error`],text:[`text`]},Wv,t)},Jv=H(xs,{name:`MuiStepIcon`,slot:`Root`})(gs(({theme:e})=>({display:`block`,transition:e.transitions.create(`color`,{duration:e.transitions.duration.shortest}),color:(e.vars||e).palette.text.disabled,[`&.${Gv.completed}, &.${Gv.active}`]:{color:(e.vars||e).palette.primary.main},[`&.${Gv.error}`]:{color:(e.vars||e).palette.error.main}}))),Yv=H(`text`,{name:`MuiStepIcon`,slot:`Text`})(gs(({theme:e})=>({fill:(e.vars||e).palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily}))),Xv=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiStepIcon`}),{active:r=!1,className:i,completed:a=!1,error:o=!1,icon:s,...c}=n,l={...n,active:r,completed:a,error:o},u=qv(l);if(typeof s==`number`||typeof s==`string`){let e=z(i,u.root);return o?(0,R.jsx)(Jv,{as:Uv,className:e,ref:t,ownerState:l,...c}):a?(0,R.jsx)(Jv,{as:Hv,className:e,ref:t,ownerState:l,...c}):(0,R.jsxs)(Jv,{className:e,ref:t,ownerState:l,...c,children:[Kv||=(0,R.jsx)(`circle`,{cx:`12`,cy:`12`,r:`12`}),(0,R.jsx)(Yv,{className:u.text,x:`12`,y:`12`,textAnchor:`middle`,dominantBaseline:`central`,ownerState:l,children:s})]})}return s});function Zv(e){return B(`MuiStepLabel`,e)}var Qv=Jr(`MuiStepLabel`,[`root`,`horizontal`,`vertical`,`label`,`active`,`completed`,`error`,`disabled`,`iconContainer`,`alternativeLabel`,`labelContainer`]),$v=e=>{let{classes:t,orientation:n,active:r,completed:i,error:a,disabled:o,alternativeLabel:s}=e;return Sa({root:[`root`,n,a&&`error`,o&&`disabled`,s&&`alternativeLabel`],label:[`label`,r&&`active`,i&&`completed`,a&&`error`,o&&`disabled`,s&&`alternativeLabel`],iconContainer:[`iconContainer`,r&&`active`,i&&`completed`,a&&`error`,o&&`disabled`,s&&`alternativeLabel`],labelContainer:[`labelContainer`,s&&`alternativeLabel`]},Zv,t)},ey=H(`span`,{name:`MuiStepLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation]]}})({display:`flex`,alignItems:`center`,[`&.${Qv.alternativeLabel}`]:{flexDirection:`column`},[`&.${Qv.disabled}`]:{cursor:`default`},variants:[{props:{orientation:`vertical`},style:{textAlign:`left`,padding:`8px 0`}}]}),ty=H(`span`,{name:`MuiStepLabel`,slot:`Label`})(gs(({theme:e})=>({...e.typography.body2,display:`block`,transition:e.transitions.create(`color`,{duration:e.transitions.duration.shortest}),[`&.${Qv.active}, &.${Qv.completed}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${Qv.alternativeLabel}`]:{marginTop:16},[`&.${Qv.error}`]:{color:(e.vars||e).palette.error.main}}))),ny=H(`span`,{name:`MuiStepLabel`,slot:`IconContainer`})({flexShrink:0,display:`flex`,paddingRight:8,[`&.${Qv.alternativeLabel}`]:{paddingRight:0}}),ry=H(`span`,{name:`MuiStepLabel`,slot:`LabelContainer`})(gs(({theme:e})=>({width:`100%`,color:(e.vars||e).palette.text.secondary,[`&.${Qv.alternativeLabel}`]:{textAlign:`center`}}))),iy=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiStepLabel`}),{children:r,className:i,componentsProps:a={},error:o=!1,icon:s,optional:c,slots:l={},slotProps:u={},StepIconComponent:d,StepIconProps:f,...p}=n,{alternativeLabel:m,orientation:h}=L.useContext(zv),{active:g,disabled:_,completed:v,icon:y}=L.useContext(Bv),b=s||y,x=d;b&&!x&&(x=Xv);let S={...n,active:g,alternativeLabel:m,completed:v,disabled:_,error:o,orientation:h},C=$v(S),w={slots:l,slotProps:{stepIcon:f,...a,...u}},[T,E]=wc(`root`,{elementType:ey,externalForwardedProps:{...w,...p},ownerState:S,ref:t,className:z(C.root,i)}),[D,O]=wc(`label`,{elementType:ty,externalForwardedProps:w,ownerState:S}),[k,ee]=wc(`stepIcon`,{elementType:x,externalForwardedProps:w,ownerState:S});return(0,R.jsxs)(T,{...E,children:[b||k?(0,R.jsx)(ny,{className:C.iconContainer,ownerState:S,children:(0,R.jsx)(k,{completed:v,active:g,error:o,icon:b,...ee})}):null,(0,R.jsxs)(ry,{className:C.labelContainer,ownerState:S,children:[r?(0,R.jsx)(D,{...O,className:z(C.label,O?.className),children:r}):null,c]})]})});iy.muiName=`StepLabel`;function ay(e){return B(`MuiStepConnector`,e)}Jr(`MuiStepConnector`,[`root`,`horizontal`,`vertical`,`alternativeLabel`,`active`,`completed`,`disabled`,`line`,`lineHorizontal`,`lineVertical`]);var oy=e=>{let{classes:t,orientation:n,alternativeLabel:r,active:i,completed:a,disabled:o}=e;return Sa({root:[`root`,n,r&&`alternativeLabel`,i&&`active`,a&&`completed`,o&&`disabled`],line:[`line`,`line${U(n)}`]},ay,t)},sy=H(`div`,{name:`MuiStepConnector`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.completed&&t.completed]}})({flex:`1 1 auto`,variants:[{props:{orientation:`vertical`},style:{marginLeft:12}},{props:{alternativeLabel:!0},style:{position:`absolute`,top:12,left:`calc(-50% + 20px)`,right:`calc(50% + 20px)`}}]}),cy=H(`span`,{name:`MuiStepConnector`,slot:`Line`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.line,t[`line${U(n.orientation)}`]]}})(gs(({theme:e})=>{let t=e.palette.mode===`light`?e.palette.grey[400]:e.palette.grey[600];return{display:`block`,borderColor:e.vars?e.vars.palette.StepConnector.border:t,variants:[{props:{orientation:`horizontal`},style:{borderTopStyle:`solid`,borderTopWidth:1}},{props:{orientation:`vertical`},style:{borderLeftStyle:`solid`,borderLeftWidth:1,minHeight:24}}]}})),ly=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiStepConnector`}),{className:r,...i}=n,{alternativeLabel:a,orientation:o=`horizontal`}=L.useContext(zv),{active:s,disabled:c,completed:l}=L.useContext(Bv),u={...n,alternativeLabel:a,orientation:o,active:s,completed:l,disabled:c},d=oy(u);return(0,R.jsx)(sy,{className:z(d.root,r),ref:t,ownerState:u,...i,children:(0,R.jsx)(cy,{className:d.line,ownerState:u})})});function uy(e){return B(`MuiStepper`,e)}Jr(`MuiStepper`,[`root`,`horizontal`,`vertical`,`nonLinear`,`alternativeLabel`]);var dy=e=>{let{orientation:t,nonLinear:n,alternativeLabel:r,classes:i}=e;return Sa({root:[`root`,t,n&&`nonLinear`,r&&`alternativeLabel`]},uy,i)},fy=H(`div`,{name:`MuiStepper`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.nonLinear&&t.nonLinear]}})({display:`flex`,variants:[{props:{orientation:`horizontal`},style:{flexDirection:`row`,alignItems:`center`}},{props:{orientation:`vertical`},style:{flexDirection:`column`}},{props:{alternativeLabel:!0},style:{alignItems:`flex-start`}}]}),py=(0,R.jsx)(ly,{}),my=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiStepper`}),{activeStep:r=0,alternativeLabel:i=!1,children:a,className:o,component:s=`div`,connector:c=py,nonLinear:l=!1,orientation:u=`horizontal`,...d}=n,f={...n,nonLinear:l,alternativeLabel:i,orientation:u,component:s},p=dy(f),m=L.Children.toArray(a).filter(Boolean),h=m.map((e,t)=>L.cloneElement(e,{index:t,last:t+1===m.length,...e.props})),g=L.useMemo(()=>({activeStep:r,alternativeLabel:i,connector:c,nonLinear:l,orientation:u}),[r,i,c,l,u]);return(0,R.jsx)(zv.Provider,{value:g,children:(0,R.jsx)(fy,{as:s,ownerState:f,className:z(p.root,o),ref:t,...d,children:h})})});function hy(e){return B(`MuiTab`,e)}var gy=Jr(`MuiTab`,[`root`,`labelIcon`,`textColorInherit`,`textColorPrimary`,`textColorSecondary`,`selected`,`disabled`,`fullWidth`,`wrapped`,`iconWrapper`,`icon`]),_y=e=>{let{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:a,label:o,selected:s,disabled:c}=e;return Sa({root:[`root`,a&&o&&`labelIcon`,`textColor${U(n)}`,r&&`fullWidth`,i&&`wrapped`,s&&`selected`,c&&`disabled`],icon:[`iconWrapper`,`icon`]},hy,t)},vy=H(ul,{name:`MuiTab`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${U(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${gy.iconWrapper}`]:t.iconWrapper},{[`& .${gy.icon}`]:t.icon}]}})(gs(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:`relative`,minHeight:48,flexShrink:0,padding:`12px 16px`,overflow:`hidden`,whiteSpace:`normal`,textAlign:`center`,lineHeight:1.25,variants:[{props:({ownerState:e})=>e.label&&(e.iconPosition===`top`||e.iconPosition===`bottom`),style:{flexDirection:`column`}},{props:({ownerState:e})=>e.label&&e.iconPosition!==`top`&&e.iconPosition!==`bottom`,style:{flexDirection:`row`}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`top`,style:{[`& > .${gy.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`bottom`,style:{[`& > .${gy.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`start`,style:{[`& > .${gy.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`end`,style:{[`& > .${gy.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:`inherit`},style:{color:`inherit`,opacity:.6,[`&.${gy.selected}`]:{opacity:1},[`&.${gy.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:`primary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${gy.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${gy.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:`secondary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${gy.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${gy.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:`none`}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),yy=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiTab`}),{className:r,disabled:i=!1,disableFocusRipple:a=!1,fullWidth:o,icon:s,iconPosition:c=`top`,indicator:l,label:u,onChange:d,onClick:f,onFocus:p,selected:m,selectionFollowsFocus:h,textColor:g=`inherit`,value:_,wrapped:v=!1,...y}=n,b={...n,disabled:i,disableFocusRipple:a,selected:m,icon:!!s,iconPosition:c,label:!!u,fullWidth:o,textColor:g,wrapped:v},x=_y(b),S=s&&u&&L.isValidElement(s)?L.cloneElement(s,{className:z(x.icon,s.props.className)}):s,C=e=>{!m&&d&&d(e,_),f&&f(e)},w=e=>{h&&!m&&d&&d(e,_),p&&p(e)};return(0,R.jsxs)(vy,{focusRipple:!a,className:z(x.root,r),ref:t,role:`tab`,"aria-selected":m,disabled:i,onClick:C,onFocus:w,ownerState:b,tabIndex:m?0:-1,...y,children:[c===`top`||c===`start`?(0,R.jsxs)(L.Fragment,{children:[S,u]}):(0,R.jsxs)(L.Fragment,{children:[u,S]}),l]})}),by=L.createContext();function xy(e){return B(`MuiTable`,e)}Jr(`MuiTable`,[`root`,`stickyHeader`]);var Sy=e=>{let{classes:t,stickyHeader:n}=e;return Sa({root:[`root`,n&&`stickyHeader`]},xy,t)},Cy=H(`table`,{name:`MuiTable`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})(gs(({theme:e})=>({display:`table`,width:`100%`,borderCollapse:`collapse`,borderSpacing:0,"& caption":{...e.typography.body2,padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:`left`,captionSide:`bottom`},variants:[{props:({ownerState:e})=>e.stickyHeader,style:{borderCollapse:`separate`}}]}))),wy=`table`,Ty=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiTable`}),{className:r,component:i=wy,padding:a=`normal`,size:o=`medium`,stickyHeader:s=!1,...c}=n,l={...n,component:i,padding:a,size:o,stickyHeader:s},u=Sy(l),d=L.useMemo(()=>({padding:a,size:o,stickyHeader:s}),[a,o,s]);return(0,R.jsx)(by.Provider,{value:d,children:(0,R.jsx)(Cy,{as:i,role:i===wy?null:`table`,ref:t,className:z(u.root,r),ownerState:l,...c})})}),Ey=L.createContext();function Dy(e){return B(`MuiTableBody`,e)}Jr(`MuiTableBody`,[`root`]);var Oy=e=>{let{classes:t}=e;return Sa({root:[`root`]},Dy,t)},ky=H(`tbody`,{name:`MuiTableBody`,slot:`Root`})({display:`table-row-group`}),Ay={variant:`body`},jy=`tbody`,My=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiTableBody`}),{className:r,component:i=jy,...a}=n,o={...n,component:i},s=Oy(o);return(0,R.jsx)(Ey.Provider,{value:Ay,children:(0,R.jsx)(ky,{className:z(s.root,r),as:i,ref:t,role:i===jy?null:`rowgroup`,ownerState:o,...a})})});function Ny(e){return B(`MuiTableCell`,e)}var Py=Jr(`MuiTableCell`,[`root`,`head`,`body`,`footer`,`sizeSmall`,`sizeMedium`,`paddingCheckbox`,`paddingNone`,`alignLeft`,`alignCenter`,`alignRight`,`alignJustify`,`stickyHeader`]),Fy=e=>{let{classes:t,variant:n,align:r,padding:i,size:a,stickyHeader:o}=e;return Sa({root:[`root`,n,o&&`stickyHeader`,r!==`inherit`&&`align${U(r)}`,i!==`normal`&&`padding${U(i)}`,`size${U(a)}`]},Ny,t)},Iy=H(`td`,{name:`MuiTableCell`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`size${U(n.size)}`],n.padding!==`normal`&&t[`padding${U(n.padding)}`],n.align!==`inherit`&&t[`align${U(n.align)}`],n.stickyHeader&&t.stickyHeader]}})(gs(({theme:e})=>({...e.typography.body2,display:`table-cell`,verticalAlign:`inherit`,borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid
|
|
199
|
+
${e.palette.mode===`light`?e.lighten(e.alpha(e.palette.divider,1),.88):e.darken(e.alpha(e.palette.divider,1),.68)}`,textAlign:`left`,padding:16,variants:[{props:{variant:`head`},style:{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium}},{props:{variant:`body`},style:{color:(e.vars||e).palette.text.primary}},{props:{variant:`footer`},style:{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)}},{props:{size:`small`},style:{padding:`6px 16px`,[`&.${Py.paddingCheckbox}`]:{width:24,padding:`0 12px 0 16px`,"& > *":{padding:0}}}},{props:{padding:`checkbox`},style:{width:48,padding:`0 0 0 4px`}},{props:{padding:`none`},style:{padding:0}},{props:{align:`left`},style:{textAlign:`left`}},{props:{align:`center`},style:{textAlign:`center`}},{props:{align:`right`},style:{textAlign:`right`,flexDirection:`row-reverse`}},{props:{align:`justify`},style:{textAlign:`justify`}},{props:({ownerState:e})=>e.stickyHeader,style:{position:`sticky`,top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}}]}))),J=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiTableCell`}),{align:r=`inherit`,className:i,component:a,padding:o,scope:s,size:c,sortDirection:l,variant:u,...d}=n,f=L.useContext(by),p=L.useContext(Ey),m=p&&p.variant===`head`,h;h=a||(m?`th`:`td`);let g=s;h===`td`?g=void 0:!g&&m&&(g=`col`);let _=u||p&&p.variant,v={...n,align:r,component:h,padding:o||(f&&f.padding?f.padding:`normal`),size:c||(f&&f.size?f.size:`medium`),sortDirection:l,stickyHeader:_===`head`&&f&&f.stickyHeader,variant:_},y=Fy(v),b=null;return l&&(b=l===`asc`?`ascending`:`descending`),(0,R.jsx)(Iy,{as:h,ref:t,className:z(y.root,i),"aria-sort":b,scope:g,ownerState:v,...d})});function Ly(e){return B(`MuiTableFooter`,e)}Jr(`MuiTableFooter`,[`root`]);var Ry=e=>{let{classes:t}=e;return Sa({root:[`root`]},Ly,t)},zy=H(`tfoot`,{name:`MuiTableFooter`,slot:`Root`})({display:`table-footer-group`}),By={variant:`footer`},Vy=`tfoot`,Hy=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiTableFooter`}),{className:r,component:i=Vy,...a}=n,o={...n,component:i},s=Ry(o);return(0,R.jsx)(Ey.Provider,{value:By,children:(0,R.jsx)(zy,{as:i,className:z(s.root,r),ref:t,role:i===Vy?null:`rowgroup`,ownerState:o,...a})})});function Uy(e){return B(`MuiTableHead`,e)}Jr(`MuiTableHead`,[`root`]);var Wy=e=>{let{classes:t}=e;return Sa({root:[`root`]},Uy,t)},Gy=H(`thead`,{name:`MuiTableHead`,slot:`Root`})({display:`table-header-group`}),Ky={variant:`head`},qy=`thead`,Jy=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiTableHead`}),{className:r,component:i=qy,...a}=n,o={...n,component:i},s=Wy(o);return(0,R.jsx)(Ey.Provider,{value:Ky,children:(0,R.jsx)(Gy,{as:i,className:z(s.root,r),ref:t,role:i===qy?null:`rowgroup`,ownerState:o,...a})})});function Yy(e){return B(`MuiToolbar`,e)}Jr(`MuiToolbar`,[`root`,`gutters`,`regular`,`dense`]);var Xy=e=>{let{classes:t,disableGutters:n,variant:r}=e;return Sa({root:[`root`,!n&&`gutters`,r]},Yy,t)},Zy=H(`div`,{name:`MuiToolbar`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(gs(({theme:e})=>({position:`relative`,display:`flex`,alignItems:`center`,variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up(`sm`)]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:`dense`},style:{minHeight:48}},{props:{variant:`regular`},style:e.mixins.toolbar}]}))),Qy=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiToolbar`}),{className:r,component:i=`div`,disableGutters:a=!1,variant:o=`regular`,...s}=n,c={...n,component:i,disableGutters:a,variant:o};return(0,R.jsx)(Zy,{as:i,className:z(Xy(c).root,r),ref:t,ownerState:c,...s})}),$y=Ss((0,R.jsx)(`path`,{d:`M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z`}),`KeyboardArrowLeft`),eb=Ss((0,R.jsx)(`path`,{d:`M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z`}),`KeyboardArrowRight`);function tb(e){return B(`MuiTableRow`,e)}var nb=Jr(`MuiTableRow`,[`root`,`selected`,`hover`,`head`,`footer`]),rb=e=>{let{classes:t,selected:n,hover:r,head:i,footer:a}=e;return Sa({root:[`root`,n&&`selected`,r&&`hover`,i&&`head`,a&&`footer`]},tb,t)},ib=H(`tr`,{name:`MuiTableRow`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})(gs(({theme:e})=>({color:`inherit`,display:`table-row`,verticalAlign:`middle`,outline:0,[`&.${nb.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${nb.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)}}}))),ab=`tr`,ob=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiTableRow`}),{className:r,component:i=ab,hover:a=!1,selected:o=!1,...s}=n,c=L.useContext(Ey),l={...n,component:i,hover:a,selected:o,head:c&&c.variant===`head`,footer:c&&c.variant===`footer`};return(0,R.jsx)(ib,{as:i,ref:t,className:z(rb(l).root,r),role:i===ab?null:`row`,ownerState:l,...s})}),sb=Ss((0,R.jsx)(`path`,{d:`M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z`}),`ArrowDownward`);function cb(e){return B(`MuiTableSortLabel`,e)}var lb=Jr(`MuiTableSortLabel`,[`root`,`active`,`icon`,`iconDirectionDesc`,`iconDirectionAsc`,`directionDesc`,`directionAsc`]),ub=e=>{let{classes:t,direction:n,active:r}=e;return Sa({root:[`root`,r&&`active`,`direction${U(n)}`],icon:[`icon`,`iconDirection${U(n)}`]},cb,t)},db=H(ul,{name:`MuiTableSortLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.active&&t.active]}})(gs(({theme:e})=>({cursor:`pointer`,display:`inline-flex`,justifyContent:`flex-start`,flexDirection:`inherit`,alignItems:`center`,"&:focus":{color:(e.vars||e).palette.text.secondary},"&:hover":{color:(e.vars||e).palette.text.secondary,[`& .${lb.icon}`]:{opacity:.5}},[`&.${lb.active}`]:{color:(e.vars||e).palette.text.primary,[`& .${lb.icon}`]:{opacity:1,color:(e.vars||e).palette.text.secondary}}}))),fb=H(`span`,{name:`MuiTableSortLabel`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,t[`iconDirection${U(n.direction)}`]]}})(gs(({theme:e})=>({fontSize:18,marginRight:4,marginLeft:4,opacity:0,transition:e.transitions.create([`opacity`,`transform`],{duration:e.transitions.duration.shorter}),userSelect:`none`,variants:[{props:{direction:`desc`},style:{transform:`rotate(0deg)`}},{props:{direction:`asc`},style:{transform:`rotate(180deg)`}}]}))),pb=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiTableSortLabel`}),{active:r=!1,children:i,className:a,direction:o=`asc`,hideSortIcon:s=!1,IconComponent:c=sb,slots:l={},slotProps:u={},...d}=n,f={...n,active:r,direction:o,hideSortIcon:s,IconComponent:c},p=ub(f),m={slots:l,slotProps:u},[h,g]=wc(`root`,{elementType:db,externalForwardedProps:m,ownerState:f,className:z(p.root,a),ref:t}),[_,v]=wc(`icon`,{elementType:fb,externalForwardedProps:m,ownerState:f,className:p.icon});return(0,R.jsxs)(h,{disableRipple:!0,component:`span`,...g,...d,children:[i,s&&!r?null:(0,R.jsx)(_,{as:c,...v})]})});function mb(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function hb(e,t,n,r={},i=()=>{}){let{ease:a=mb,duration:o=300}=r,s=null,c=t[e],l=!1,u=()=>{l=!0},d=r=>{if(l){i(Error(`Animation cancelled`));return}s===null&&(s=r);let u=Math.min(1,(r-s)/o);if(t[e]=a(u)*(n-c)+c,u>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(d)};return c===n?(i(Error(`Element already at target position`)),u):(requestAnimationFrame(d),u)}var gb={width:99,height:99,position:`absolute`,top:-9999,overflow:`scroll`};function _b(e){let{onChange:t,...n}=e,r=L.useRef(),i=L.useRef(null),a=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return js(()=>{let e=ws(()=>{let e=r.current;a(),e!==r.current&&t(r.current)}),n=ks(i.current);return n.addEventListener(`resize`,e),()=>{e.clear(),n.removeEventListener(`resize`,e)}},[t]),L.useEffect(()=>{a(),t(r.current)},[t]),(0,R.jsx)(`div`,{style:gb,...n,ref:i})}function vb(e){return B(`MuiTabScrollButton`,e)}var yb=Jr(`MuiTabScrollButton`,[`root`,`vertical`,`horizontal`,`disabled`]),bb=e=>{let{classes:t,orientation:n,disabled:r}=e;return Sa({root:[`root`,n,r&&`disabled`]},vb,t)},xb=H(ul,{name:`MuiTabScrollButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${yb.disabled}`]:{opacity:0},variants:[{props:{orientation:`vertical`},style:{width:`100%`,height:40,"& svg":{transform:`var(--TabScrollButton-svgRotate)`}}}]}),Sb=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiTabScrollButton`}),{className:r,slots:i={},slotProps:a={},direction:o,orientation:s,disabled:c,...l}=n,u=Vi(),d={isRtl:u,...n},f=bb(d),p=i.StartScrollButtonIcon??$y,m=i.EndScrollButtonIcon??eb,h=rf({elementType:p,externalSlotProps:a.startScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:d}),g=rf({elementType:m,externalSlotProps:a.endScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:d});return(0,R.jsx)(xb,{component:`div`,className:z(f.root,r),ref:t,role:null,ownerState:d,tabIndex:null,...l,style:{...l.style,...s===`vertical`&&{"--TabScrollButton-svgRotate":`rotate(${u?-90:90}deg)`}},children:o===`left`?(0,R.jsx)(p,{...h}):(0,R.jsx)(m,{...g})})});function Cb(e){return B(`MuiTabs`,e)}var wb=Jr(`MuiTabs`,[`root`,`vertical`,`list`,`flexContainer`,`flexContainerVertical`,`centered`,`scroller`,`fixed`,`scrollableX`,`scrollableY`,`hideScrollbar`,`scrollButtons`,`scrollButtonsHideMobile`,`indicator`]),Tb=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,Eb=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,Db=(e,t,n)=>{let r=!1,i=n(e,t);for(;i;){if(i===e.firstChild){if(r)return;r=!0}let t=i.disabled||i.getAttribute(`aria-disabled`)===`true`;if(!i.hasAttribute(`tabindex`)||t)i=n(e,i);else{i.focus();return}}},Ob=e=>{let{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:a,centered:o,scrollButtonsHideMobile:s,classes:c}=e;return Sa({root:[`root`,t&&`vertical`],scroller:[`scroller`,n&&`fixed`,r&&`hideScrollbar`,i&&`scrollableX`,a&&`scrollableY`],list:[`list`,`flexContainer`,t&&`flexContainerVertical`,t&&`vertical`,o&&`centered`],indicator:[`indicator`],scrollButtons:[`scrollButtons`,s&&`scrollButtonsHideMobile`],scrollableX:[i&&`scrollableX`],hideScrollbar:[r&&`hideScrollbar`]},Cb,c)},kb=H(`div`,{name:`MuiTabs`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${wb.scrollButtons}`]:t.scrollButtons},{[`& .${wb.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(gs(({theme:e})=>({overflow:`hidden`,minHeight:48,WebkitOverflowScrolling:`touch`,display:`flex`,variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:`column`}},{props:({ownerState:e})=>e.scrollButtonsHideMobile,style:{[`& .${wb.scrollButtons}`]:{[e.breakpoints.down(`sm`)]:{display:`none`}}}}]}))),Ab=H(`div`,{name:`MuiTabs`,slot:`Scroller`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:`relative`,display:`inline-block`,flex:`1 1 auto`,whiteSpace:`nowrap`,variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:`hidden`,width:`100%`}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:`auto`,overflowY:`hidden`}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:`auto`,overflowX:`hidden`}}]}),jb=H(`div`,{name:`MuiTabs`,slot:`List`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.list,t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})({display:`flex`,variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:`column`}},{props:({ownerState:e})=>e.centered,style:{justifyContent:`center`}}]}),Mb=H(`span`,{name:`MuiTabs`,slot:`Indicator`})(gs(({theme:e})=>({position:`absolute`,height:2,bottom:0,width:`100%`,transition:e.transitions.create(),variants:[{props:{indicatorColor:`primary`},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:`secondary`},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:e})=>e.vertical,style:{height:`100%`,width:2,right:0}}]}))),Nb=H(_b)({overflowX:`auto`,overflowY:`hidden`,scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`}}),Pb={},Fb=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiTabs`}),r=ts(),i=Vi(),{"aria-label":a,"aria-labelledby":o,action:s,centered:c=!1,children:l,className:u,component:d=`div`,allowScrollButtonsMobile:f=!1,indicatorColor:p=`primary`,onChange:m,orientation:h=`horizontal`,ScrollButtonComponent:g,scrollButtons:_=`auto`,selectionFollowsFocus:v,slots:y={},slotProps:b={},TabIndicatorProps:x={},TabScrollButtonProps:S={},textColor:C=`primary`,value:w,variant:T=`standard`,visibleScrollbar:E=!1,...D}=n,O=T===`scrollable`,k=h===`vertical`,ee=k?`scrollTop`:`scrollLeft`,A=k?`top`:`left`,j=k?`bottom`:`right`,te=k?`clientHeight`:`clientWidth`,M=k?`height`:`width`,ne={...n,component:d,allowScrollButtonsMobile:f,indicatorColor:p,orientation:h,vertical:k,scrollButtons:_,textColor:C,variant:T,visibleScrollbar:E,fixed:!O,hideScrollbar:O&&!E,scrollableX:O&&!k,scrollableY:O&&k,centered:c&&!O,scrollButtonsHideMobile:!f},N=Ob(ne),P=rf({elementType:y.StartScrollButtonIcon,externalSlotProps:b.startScrollButtonIcon,ownerState:ne}),re=rf({elementType:y.EndScrollButtonIcon,externalSlotProps:b.endScrollButtonIcon,ownerState:ne}),[ie,ae]=L.useState(!1),[oe,se]=L.useState(Pb),[ce,le]=L.useState(!1),[ue,de]=L.useState(!1),[F,fe]=L.useState(!1),[pe,me]=L.useState({overflow:`hidden`,scrollbarWidth:0}),he=new Map,ge=L.useRef(null),_e=L.useRef(null),I={slots:y,slotProps:{indicator:x,scrollButtons:S,...b}},ve=()=>{let e=ge.current,t;if(e){let n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}let n;if(e&&w!==!1){let e=_e.current.children;if(e.length>0){let t=e[he.get(w)];n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},ye=Is(()=>{let{tabsMeta:e,tabMeta:t}=ve(),n=0,r;k?(r=`top`,t&&e&&(n=t.top-e.top+e.scrollTop)):(r=i?`right`:`left`,t&&e&&(n=(i?-1:1)*(t[r]-e[r]+e.scrollLeft)));let a={[r]:n,[M]:t?t[M]:0};if(typeof oe[r]!=`number`||typeof oe[M]!=`number`)se(a);else{let e=Math.abs(oe[r]-a[r]),t=Math.abs(oe[M]-a[M]);(e>=1||t>=1)&&se(a)}}),be=(e,{animation:t=!0}={})=>{t?hb(ee,ge.current,e,{duration:r.transitions.duration.standard}):ge.current[ee]=e},xe=e=>{let t=ge.current[ee];k?t+=e:t+=e*(i?-1:1),be(t)},Se=()=>{let e=ge.current[te],t=0,n=Array.from(_e.current.children);for(let r=0;r<n.length;r+=1){let i=n[r];if(t+i[te]>e){r===0&&(t=e);break}t+=i[te]}return t},Ce=()=>{xe(-1*Se())},we=()=>{xe(Se())},[Te,{onChange:Ee,...De}]=wc(`scrollbar`,{className:z(N.scrollableX,N.hideScrollbar),elementType:Nb,shouldForwardComponentProp:!0,externalForwardedProps:I,ownerState:ne}),Oe=L.useCallback(e=>{Ee?.(e),me({overflow:null,scrollbarWidth:e})},[Ee]),[ke,Ae]=wc(`scrollButtons`,{className:z(N.scrollButtons,S.className),elementType:Sb,externalForwardedProps:I,ownerState:ne,additionalProps:{orientation:h,slots:{StartScrollButtonIcon:y.startScrollButtonIcon||y.StartScrollButtonIcon,EndScrollButtonIcon:y.endScrollButtonIcon||y.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:P,endScrollButtonIcon:re}}}),je=()=>{let e={};e.scrollbarSizeListener=O?(0,R.jsx)(Te,{...De,onChange:Oe}):null;let t=O&&(_===`auto`&&(ce||ue)||_===!0);return e.scrollButtonStart=t?(0,R.jsx)(ke,{direction:i?`right`:`left`,onClick:Ce,disabled:!ce,...Ae}):null,e.scrollButtonEnd=t?(0,R.jsx)(ke,{direction:i?`left`:`right`,onClick:we,disabled:!ue,...Ae}):null,e},Me=Is(e=>{let{tabsMeta:t,tabMeta:n}=ve();!n||!t||(n[A]<t[A]?be(t[ee]+(n[A]-t[A]),{animation:e}):n[j]>t[j]&&be(t[ee]+(n[j]-t[j]),{animation:e}))}),Ne=Is(()=>{O&&_!==!1&&fe(!F)});L.useEffect(()=>{let e=ws(()=>{ge.current&&ye()}),t,n=n=>{n.forEach(e=>{e.removedNodes.forEach(e=>{t?.unobserve(e)}),e.addedNodes.forEach(e=>{t?.observe(e)})}),e(),Ne()},r=ks(ge.current);r.addEventListener(`resize`,e);let i;return typeof ResizeObserver<`u`&&(t=new ResizeObserver(e),Array.from(_e.current.children).forEach(e=>{t.observe(e)})),typeof MutationObserver<`u`&&(i=new MutationObserver(n),i.observe(_e.current,{childList:!0})),()=>{e.clear(),r.removeEventListener(`resize`,e),i?.disconnect(),t?.disconnect()}},[ye,Ne]),L.useEffect(()=>{let e=Array.from(_e.current.children),t=e.length;if(typeof IntersectionObserver<`u`&&t>0&&O&&_!==!1){let n=e[0],r=e[t-1],i={root:ge.current,threshold:.99},a=new IntersectionObserver(e=>{le(!e[0].isIntersecting)},i);a.observe(n);let o=new IntersectionObserver(e=>{de(!e[0].isIntersecting)},i);return o.observe(r),()=>{a.disconnect(),o.disconnect()}}},[O,_,F,l?.length]),L.useEffect(()=>{ae(!0)},[]),L.useEffect(()=>{ye()}),L.useEffect(()=>{Me(Pb!==oe)},[Me,oe]),L.useImperativeHandle(s,()=>({updateIndicator:ye,updateScrollButtons:Ne}),[ye,Ne]);let[Pe,Fe]=wc(`indicator`,{className:z(N.indicator,x.className),elementType:Mb,externalForwardedProps:I,ownerState:ne,additionalProps:{style:oe}}),Ie=(0,R.jsx)(Pe,{...Fe}),Le=0,Re=L.Children.map(l,e=>{if(!L.isValidElement(e))return null;let t=e.props.value===void 0?Le:e.props.value;he.set(t,Le);let n=t===w;return Le+=1,L.cloneElement(e,{fullWidth:T===`fullWidth`,indicator:n&&!ie&&Ie,selected:n,selectionFollowsFocus:v,onChange:m,textColor:C,value:t,...Le===1&&w===!1&&!e.props.tabIndex?{tabIndex:0}:{}})}),ze=e=>{if(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)return;let t=_e.current,n=Lm(Ds(t));if(n?.getAttribute(`role`)!==`tab`)return;let r=h===`horizontal`?`ArrowLeft`:`ArrowUp`,a=h===`horizontal`?`ArrowRight`:`ArrowDown`;switch(h===`horizontal`&&i&&(r=`ArrowRight`,a=`ArrowLeft`),e.key){case r:e.preventDefault(),Db(t,n,Eb);break;case a:e.preventDefault(),Db(t,n,Tb);break;case`Home`:e.preventDefault(),Db(t,null,Tb);break;case`End`:e.preventDefault(),Db(t,null,Eb);break;default:break}},Be=je(),[Ve,He]=wc(`root`,{ref:t,className:z(N.root,u),elementType:kb,externalForwardedProps:{...I,...D,component:d},ownerState:ne}),[Ue,We]=wc(`scroller`,{ref:ge,className:N.scroller,elementType:Ab,externalForwardedProps:I,ownerState:ne,additionalProps:{style:{overflow:pe.overflow,[k?`margin${i?`Left`:`Right`}`:`marginBottom`]:E?void 0:-pe.scrollbarWidth}}}),[Ge,Ke]=wc(`list`,{ref:_e,className:z(N.list,N.flexContainer),elementType:jb,externalForwardedProps:I,ownerState:ne,getSlotProps:e=>({...e,onKeyDown:t=>{ze(t),e.onKeyDown?.(t)}})});return(0,R.jsxs)(Ve,{...He,children:[Be.scrollButtonStart,Be.scrollbarSizeListener,(0,R.jsxs)(Ue,{...We,children:[(0,R.jsx)(Ge,{"aria-label":a,"aria-labelledby":o,"aria-orientation":h===`vertical`?`vertical`:null,role:`tablist`,...Ke,children:Re}),ie&&Ie]}),Be.scrollButtonEnd]})});function Ib(e){return B(`MuiTextField`,e)}Jr(`MuiTextField`,[`root`]);var Lb={standard:Zh,filled:_h,outlined:$_},Rb=e=>{let{classes:t}=e;return Sa({root:[`root`]},Ib,t)},zb=H(bh,{name:`MuiTextField`,slot:`Root`})({}),Bb=L.forwardRef(function(e,t){let n=_s({props:e,name:`MuiTextField`}),{autoComplete:r,autoFocus:i=!1,children:a,className:o,color:s=`primary`,defaultValue:c,disabled:l=!1,error:u=!1,FormHelperTextProps:d,fullWidth:f=!1,helperText:p,id:m,InputLabelProps:h,inputProps:g,InputProps:_,inputRef:v,label:y,maxRows:b,minRows:x,multiline:S=!1,name:C,onBlur:w,onChange:T,onFocus:E,placeholder:D,required:O=!1,rows:k,select:ee=!1,SelectProps:A,slots:j={},slotProps:te={},type:M,value:ne,variant:N=`outlined`,...P}=n,re={...n,autoFocus:i,color:s,disabled:l,error:u,fullWidth:f,multiline:S,required:O,select:ee,variant:N},ie=Rb(re),ae=Yi(m),oe=p&&ae?`${ae}-helper-text`:void 0,se=y&&ae?`${ae}-label`:void 0,ce=Lb[N],le={slots:j,slotProps:{input:_,inputLabel:h,htmlInput:g,formHelperText:d,select:A,...te}},ue={},de=le.slotProps.inputLabel;N===`outlined`&&(de&&de.shrink!==void 0&&(ue.notched=de.shrink),ue.label=y),ee&&((!A||!A.native)&&(ue.id=void 0),ue[`aria-describedby`]=void 0);let[F,fe]=wc(`root`,{elementType:zb,shouldForwardComponentProp:!0,externalForwardedProps:{...le,...P},ownerState:re,className:z(ie.root,o),ref:t,additionalProps:{disabled:l,error:u,fullWidth:f,required:O,color:s,variant:N}}),[pe,me]=wc(`input`,{elementType:ce,externalForwardedProps:le,additionalProps:ue,ownerState:re}),[he,ge]=wc(`inputLabel`,{elementType:cg,externalForwardedProps:le,ownerState:re}),[_e,I]=wc(`htmlInput`,{elementType:`input`,externalForwardedProps:le,ownerState:re}),[ve,ye]=wc(`formHelperText`,{elementType:Ih,externalForwardedProps:le,ownerState:re}),[be,xe]=wc(`select`,{elementType:bv,externalForwardedProps:le,ownerState:re}),Se=(0,R.jsx)(pe,{"aria-describedby":oe,autoComplete:r,autoFocus:i,defaultValue:c,fullWidth:f,multiline:S,name:C,rows:k,maxRows:b,minRows:x,type:M,value:ne,id:ae,inputRef:v,onBlur:w,onChange:T,onFocus:E,placeholder:D,inputProps:I,slots:{input:j.htmlInput?_e:void 0},...me});return(0,R.jsxs)(F,{...fe,children:[y!=null&&y!==``&&(0,R.jsx)(he,{htmlFor:ae,id:se,...ge,children:y}),ee?(0,R.jsx)(be,{"aria-describedby":oe,id:ae,labelId:se,value:ne,input:Se,...xe,children:a}):Se,p&&(0,R.jsx)(ve,{id:oe,...ye,children:p})]})});function Vb(e){return B(`MuiToggleButton`,e)}var Hb=Jr(`MuiToggleButton`,[`root`,`disabled`,`selected`,`standard`,`primary`,`secondary`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`fullWidth`]),Ub=L.createContext({}),Wb=L.createContext(void 0);function Gb(e,t){return t===void 0||e===void 0?!1:Array.isArray(t)?t.includes(e):e===t}var Kb=e=>{let{classes:t,fullWidth:n,selected:r,disabled:i,size:a,color:o}=e;return Sa({root:[`root`,r&&`selected`,i&&`disabled`,n&&`fullWidth`,`size${U(a)}`,o]},Vb,t)},qb=H(ul,{name:`MuiToggleButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`size${U(n.size)}`]]}})(gs(({theme:e})=>({...e.typography.button,borderRadius:(e.vars||e).shape.borderRadius,padding:11,border:`1px solid ${(e.vars||e).palette.divider}`,color:(e.vars||e).palette.action.active,[`&.${Hb.disabled}`]:{color:(e.vars||e).palette.action.disabled,border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"&:hover":{textDecoration:`none`,backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:`transparent`}},variants:[{props:{color:`standard`},style:{[`&.${Hb.selected}`]:{color:(e.vars||e).palette.text.primary,backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.text.primary,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.selectedOpacity)}}}}},...Object.entries(e.palette).filter(xl()).map(([t])=>({props:{color:t},style:{[`&.${Hb.selected}`]:{color:(e.vars||e).palette[t].main,backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.selectedOpacity)}}}}})),{props:{fullWidth:!0},style:{width:`100%`}},{props:{size:`small`},style:{padding:7,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`},style:{padding:15,fontSize:e.typography.pxToRem(15)}}]}))),Jb=L.forwardRef(function(e,t){let{value:n,...r}=L.useContext(Ub),i=L.useContext(Wb),a=_s({props:ci({...r,selected:Gb(e.value,n)},e),name:`MuiToggleButton`}),{children:o,className:s,color:c=`standard`,disabled:l=!1,disableFocusRipple:u=!1,fullWidth:d=!1,onChange:f,onClick:p,selected:m,size:h=`medium`,value:g,..._}=a,v={...a,color:c,disabled:l,disableFocusRipple:u,fullWidth:d,size:h},y=Kb(v),b=e=>{p&&(p(e,g),e.defaultPrevented)||f&&f(e,g)},x=i||``;return(0,R.jsx)(qb,{className:z(r.className,y.root,s,x),disabled:l,focusRipple:!u,ref:t,onClick:b,onChange:f,value:g,ownerState:v,"aria-pressed":m,..._,children:o})}),Yb=hi({themeId:O}),Xb=_(),Zb=Ss((0,R.jsx)(`path`,{d:`M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-7 3c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6m7 13H5v-.23c0-.62.28-1.2.76-1.58C7.47 15.82 9.64 15 12 15s4.53.82 6.24 2.19c.48.38.76.97.76 1.58z`}),`AccountBox`),Qb=Ss((0,R.jsx)(`path`,{d:`M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z`}),`Add`),$b=Ss((0,R.jsx)(`path`,{d:`m9.78 11.16-1.42 1.42c-.68-.69-1.34-1.58-1.79-2.94l1.94-.49c.32.89.77 1.5 1.27 2.01M11 6 7 2 3 6h3.02c.02.81.08 1.54.19 2.17l1.94-.49C8.08 7.2 8.03 6.63 8.02 6zm10 0-4-4-4 4h2.99c-.1 3.68-1.28 4.75-2.54 5.88-.5.44-1.01.92-1.45 1.55-.34-.49-.73-.88-1.13-1.24L9.46 13.6c.93.85 1.54 1.54 1.54 3.4v5h2v-5c0-2.02.71-2.66 1.79-3.63 1.38-1.24 3.08-2.78 3.2-7.37z`}),`AltRoute`),ex=Ss((0,R.jsx)(`path`,{d:`M19 3h-4.18C14.4 1.84 13.3 1 12 1s-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m4 12h-4v3l-5-5 5-5v3h4z`}),`AssignmentReturn`),tx=Ss((0,R.jsx)(`path`,{d:`M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4`}),`AttachMoney`),nx=Ss((0,R.jsx)(`path`,{d:`M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5s-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20zm-6 8h-4v-2h4zm0-4h-4v-2h4z`}),`BugReport`),rx=Ss((0,R.jsx)(`path`,{d:`m22.7 19-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4`}),`Build`),ix=Ss((0,R.jsx)(`path`,{d:`M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 16H5V10h14zM9 14H7v-2h2zm4 0h-2v-2h2zm4 0h-2v-2h2zm-8 4H7v-2h2zm4 0h-2v-2h2zm4 0h-2v-2h2z`}),`CalendarMonth`),ax=Ss((0,R.jsx)(`path`,{d:`M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z`}),`CalendarToday`),ox=Ss((0,R.jsx)(`path`,{d:`M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2M8 11H4V6h4zm6 0h-4V6h4zm6 0h-4V6h4zM8 18H4v-5h4zm6 0h-4v-5h4zm6 0h-4v-5h4z`}),`CalendarViewMonth`),sx=Ss((0,R.jsx)(`path`,{d:`m14 4 2.29 2.29-2.88 2.88 1.42 1.42 2.88-2.88L20 10V4zm-4 0H4v6l2.29-2.29 4.71 4.7V20h2v-8.41l-5.29-5.3z`}),`CallSplit`),cx=Ss([(0,R.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3.2`},`0`),(0,R.jsx)(`path`,{d:`M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5`},`1`)],`CameraAlt`),lx=Ss((0,R.jsx)(`path`,{d:`M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z`}),`Check`),ux=Ss((0,R.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z`}),`CheckCircle`),dx=Ss((0,R.jsx)(`path`,{d:`M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z`}),`ChevronRight`),fx=Ss((0,R.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`),px=Ss((0,R.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`}),`Close`),mx=Ss((0,R.jsx)(`path`,{d:`M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z`}),`Code`),hx=Ss((0,R.jsx)(`path`,{d:`M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z`}),`Delete`),gx=Ss((0,R.jsx)(`path`,{d:`m21.41 10.59-7.99-8c-.78-.78-2.05-.78-2.83 0l-8.01 8c-.78.78-.78 2.05 0 2.83l8.01 8c.78.78 2.05.78 2.83 0l7.99-8c.79-.79.79-2.05 0-2.83M13.5 14.5V12H10v3H8v-4c0-.55.45-1 1-1h4.5V7.5L17 11z`}),`Directions`),_x=Ss((0,R.jsx)(`path`,{d:`M20 13H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1M7 19c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2M20 3H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1M7 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2`}),`Dns`),vx=Ss((0,R.jsx)(`path`,{d:`M11 9.16V2c-5 .5-9 4.79-9 10s4 9.5 9 10v-7.16c-1-.41-2-1.52-2-2.84s1-2.43 2-2.84M14.86 11H22c-.48-4.75-4-8.53-9-9v7.16c1 .3 1.52.98 1.86 1.84M13 14.84V22c5-.47 8.52-4.25 9-9h-7.14c-.34.86-.86 1.54-1.86 1.84`}),`DonutSmall`),yx=Ss((0,R.jsx)(`path`,{d:`M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2m-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2`}),`DragIndicator`),bx=Ss((0,R.jsx)(`path`,{d:`M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z`}),`Edit`),xx=Ss((0,R.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`),Sx=Ss((0,R.jsx)(`path`,{d:`M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8`}),`ErrorOutline`),Cx=Ss((0,R.jsx)(`path`,{d:`M10.09 15.59 11.5 17l5-5-5-5-1.41 1.41L12.67 11H3v2h9.67zM19 3H5c-1.11 0-2 .9-2 2v4h2V5h14v14H5v-4H3v4c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2`}),`ExitToApp`),wx=Ss((0,R.jsx)(`path`,{d:`M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z`}),`ExpandMore`),Tx=Ss((0,R.jsx)(`path`,{d:`M20.5 11H19V7c0-1.1-.9-2-2-2h-4V3.5C13 2.12 11.88 1 10.5 1S8 2.12 8 3.5V5H4c-1.1 0-1.99.9-1.99 2v3.8H3.5c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-1.5c0-1.49 1.21-2.7 2.7-2.7s2.7 1.21 2.7 2.7V22H17c1.1 0 2-.9 2-2v-4h1.5c1.38 0 2.5-1.12 2.5-2.5S21.88 11 20.5 11`}),`Extension`),Ex=Ss((0,R.jsx)(`path`,{d:`M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z`}),`FilterList`),Dx=Ss((0,R.jsx)(`path`,{d:`M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z`}),`FirstPage`),Ox=Ss((0,R.jsx)(`path`,{d:`M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m0 12H4V8h16z`}),`FolderOpen`),kx=Ss((0,R.jsx)(`path`,{d:`M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4`}),`HelpOutline`),Ax=Ss((0,R.jsx)(`path`,{d:`M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z`}),`History`),jx=Ss((0,R.jsx)(`path`,{d:`M6 2v6h.01L6 8.01 10 12l-4 4 .01.01H6V22h12v-5.99h-.01L18 16l-4-4 4-3.99-.01-.01H18V2z`}),`HourglassFull`),Mx=Ss((0,R.jsx)(`path`,{d:`M9 3 5 6.99h3V14h2V6.99h3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99z`}),`ImportExport`),Nx=Ss((0,R.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-6h2zm0-8h-2V7h2z`}),`Info`),Px=Ss((0,R.jsx)(`path`,{d:`M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2M9 17H7v-7h2zm4 0h-2V7h2zm4 0h-2v-4h2z`}),`InsertChart`),Fx=Ss((0,R.jsx)(`path`,{d:`M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z`}),`KeyboardArrowDown`),Ix=Ss((0,R.jsx)(`path`,{d:`M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6z`}),`KeyboardArrowLeft`),Lx=Ss((0,R.jsx)(`path`,{d:`M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z`}),`KeyboardArrowRight`),Rx=Ss((0,R.jsx)(`path`,{d:`M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z`}),`KeyboardArrowUp`),zx=Ss((0,R.jsx)(`path`,{d:`M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z`}),`LastPage`),Bx=Ss((0,R.jsx)(`path`,{d:`M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8m0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4z`}),`Loop`),Vx=Ss((0,R.jsx)(`path`,{d:`M15 9H9v6h6zm-2 4h-2v-2h2zm8-2V9h-2V7c0-1.1-.9-2-2-2h-2V3h-2v2h-2V3H9v2H7c-1.1 0-2 .9-2 2v2H3v2h2v2H3v2h2v2c0 1.1.9 2 2 2h2v2h2v-2h2v2h2v-2h2c1.1 0 2-.9 2-2v-2h2v-2h-2v-2zm-4 6H7V7h10z`}),`Memory`),Hx=Ss((0,R.jsx)(`path`,{d:`M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2`}),`MoreHoriz`),Ux=Ss((0,R.jsx)(`path`,{d:`M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2m6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1z`}),`Notifications`),Wx=Ss((0,R.jsx)(`path`,{d:`M17.66 8 12 2.35 6.34 8C4.78 9.56 4 11.64 4 13.64s.78 4.11 2.34 5.67 3.61 2.35 5.66 2.35 4.1-.79 5.66-2.35S20 15.64 20 13.64 19.22 9.56 17.66 8M6 14c.01-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 17.99 12 18 14z`}),`Opacity`),Gx=Ss((0,R.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m.88 15.76V19h-1.75v-1.29c-.74-.18-2.39-.77-3.02-2.96l1.65-.67c.06.22.58 2.09 2.4 2.09.93 0 1.98-.48 1.98-1.61 0-.96-.7-1.46-2.28-2.03-1.1-.39-3.35-1.03-3.35-3.31 0-.1.01-2.4 2.62-2.96V5h1.75v1.24c1.84.32 2.51 1.79 2.66 2.23l-1.58.67c-.11-.35-.59-1.34-1.9-1.34-.7 0-1.81.37-1.81 1.39 0 .95.86 1.31 2.64 1.9 2.4.83 3.01 2.05 3.01 3.45 0 2.63-2.5 3.13-3.02 3.22`}),`Paid`),Kx=Ss((0,R.jsx)(`path`,{d:`M18 17H6v-2h12zm0-4H6v-2h12zm0-4H6V7h12zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2z`}),`Receipt`),qx=Ss((0,R.jsx)(`path`,{d:`M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z`}),`Refresh`),Jx=Ss((0,R.jsx)(`path`,{d:`M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8`}),`Replay`),Yx=Ss((0,R.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 14m-2.17-1.5 2.14-1.53 2.14 1.53-.83-2.46 2.15-1.5h-2.62L9.47 6l-.84 2.54H6l2.14 1.49z`}),`SavedSearch`),Xx=Ss((0,R.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`),Zx=Ss((0,R.jsx)(`path`,{d:`M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6`}),`Settings`),Qx=Ss((0,R.jsx)(`path`,{d:`m17.21 9-4.38-6.56c-.19-.28-.51-.42-.83-.42s-.64.14-.83.43L6.79 9H2c-.55 0-1 .45-1 1 0 .09.01.18.04.27l2.54 9.27c.23.84 1 1.46 1.92 1.46h13c.92 0 1.69-.62 1.93-1.46l2.54-9.27L23 10c0-.55-.45-1-1-1zM9 9l3-4.4L15 9zm3 8c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2`}),`ShoppingBasket`),$x=Ss((0,R.jsx)(`path`,{d:`m6 18 8.5-6L6 6zM16 6v12h2V6z`}),`SkipNext`),eS=Ss((0,R.jsx)(`path`,{d:`M6 6h2v12H6zm3.5 6 8.5 6V6z`}),`SkipPrevious`),tS=Ss((0,R.jsx)(`path`,{d:`M14.43 10 12 2l-2.43 8H2l6.18 4.41L5.83 22 12 17.31 18.18 22l-2.35-7.59L22 10z`}),`StarRate`),nS=Ss((0,R.jsx)(`path`,{d:`M15 3H5c-1.1 0-1.99.9-1.99 2L3 19c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V9zM8 17c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m0-4c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m0-4c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m6 1V4.5l5.5 5.5z`}),`Summarize`),rS=Ss((0,R.jsx)(`path`,{d:`M23 8c0 1.1-.9 2-2 2-.18 0-.35-.02-.51-.07l-3.56 3.55c.05.16.07.34.07.52 0 1.1-.9 2-2 2s-2-.9-2-2c0-.18.02-.36.07-.52l-2.55-2.55c-.16.05-.34.07-.52.07s-.36-.02-.52-.07l-4.55 4.56c.05.16.07.33.07.51 0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.18 0 .35.02.51.07l4.56-4.55C8.02 9.36 8 9.18 8 9c0-1.1.9-2 2-2s2 .9 2 2c0 .18-.02.36-.07.52l2.55 2.55c.16-.05.34-.07.52-.07s.36.02.52.07l3.55-3.56C19.02 8.35 19 8.18 19 8c0-1.1.9-2 2-2s2 .9 2 2`}),`Timeline`),iS=Ss((0,R.jsx)(`path`,{d:`M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3`}),`Visibility`),aS=Ss((0,R.jsx)(`path`,{d:`M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z`}),`VisibilityOff`),oS=Ss((0,R.jsx)(`path`,{d:`M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z`}),`Warning`),sS=Ss([(0,R.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`},`0`),(0,R.jsx)(`path`,{d:`M12 10h-2v2H9v-2H7V9h2V7h1v2h2z`},`1`)],`ZoomIn`),cS=Ss((0,R.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 14M7 9h5v1H7z`}),`ZoomOut`),lS=class{constructor(e,t){this.jsonParseReviver=void 0,this.http=t||window,this.baseUrl=e??``}fMSInformation(e){let t=this.baseUrl+`/api/v1/fms/fms-information`;t=t.replace(/[?&]$/,``);let n={method:`GET`,signal:e,headers:{Accept:`application/json`}};return this.http.fetch(t,n).then(e=>this.processFMSInformation(e))}processFMSInformation(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=pS.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}findInstructions(e,t,n,r,i,a,o){let s=this.baseUrl+`/api/v1/fms/find-instructions/{part}?`;if(e==null)throw new globalThis.Error(`The parameter 'part' must be defined.`);if(s=s.replace(`{part}`,encodeURIComponent(``+e)),t==null)throw new globalThis.Error(`The parameter 'type' must be defined and cannot be null.`);if(s+=`type=`+encodeURIComponent(``+t)+`&`,n!=null&&(s+=`process=`+encodeURIComponent(``+n)+`&`),r!=null&&(s+=`materialID=`+encodeURIComponent(``+r)+`&`),i!=null&&(s+=`operatorName=`+encodeURIComponent(``+i)+`&`),a===null)throw new globalThis.Error(`The parameter 'pallet' cannot be null.`);a!==void 0&&(s+=`pallet=`+encodeURIComponent(``+a)+`&`),s=s.replace(/[?&]$/,``);let c={method:`GET`,signal:o,headers:{}};return this.http.fetch(s,c).then(e=>this.processFindInstructions(e))}processFindInstructions(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===302?e.text().then(e=>SC(`A server side error occurred.`,t,e,n)):t===404?e.text().then(e=>{let r=null,i=e===``?null:JSON.parse(e,this.jsonParseReviver);return r=rC.fromJS(i),SC(`A server side error occurred.`,t,e,n,r)}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}printLabel(e,t,n){let r=this.baseUrl+`/api/v1/fms/print-label/{materialId}?`;if(e==null)throw new globalThis.Error(`The parameter 'materialId' must be defined.`);if(r=r.replace(`{materialId}`,encodeURIComponent(``+e)),t===null)throw new globalThis.Error(`The parameter 'process' cannot be null.`);t!==void 0&&(r+=`process=`+encodeURIComponent(``+t)+`&`),r=r.replace(/[?&]$/,``);let i={method:`POST`,signal:n,headers:{}};return this.http.fetch(r,i).then(e=>this.processPrintLabel(e))}processPrintLabel(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t===400?e.text().then(e=>{let r=null,i=e===``?null:JSON.parse(e,this.jsonParseReviver);return r=rC.fromJS(i),SC(`A server side error occurred.`,t,e,n,r)}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}parseBarcode(e,t,n){let r=this.baseUrl+`/api/v1/fms/parse-barcode?`;if(e==null)throw new globalThis.Error(`The parameter 'barcode' must be defined and cannot be null.`);r+=`barcode=`+encodeURIComponent(``+e)+`&`,t!=null&&t&&t.forEach(e=>{r+=`queuesToAddTo=`+encodeURIComponent(``+e)+`&`}),r=r.replace(/[?&]$/,``);let i={method:`POST`,signal:n,headers:{Accept:`application/json`}};return this.http.fetch(r,i).then(e=>this.processParseBarcode(e))}processParseBarcode(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=n?iC.fromJS(n):null,t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}enableVerboseLoggingForFiveMinutes(e){let t=this.baseUrl+`/api/v1/fms/enable-verbose-logging-for-five-minutes`;t=t.replace(/[?&]$/,``);let n={method:`POST`,signal:e,headers:{}};return this.http.fetch(t,n).then(e=>this.processEnableVerboseLoggingForFiveMinutes(e))}processEnableVerboseLoggingForFiveMinutes(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}},uS=class{constructor(e,t){this.jsonParseReviver=void 0,this.http=t||window,this.baseUrl=e??``}history(e,t,n){let r=this.baseUrl+`/api/v1/jobs/history?`;if(e==null)throw new globalThis.Error(`The parameter 'startUTC' must be defined and cannot be null.`);if(r+=`startUTC=`+encodeURIComponent(e?``+e.toISOString():``)+`&`,t==null)throw new globalThis.Error(`The parameter 'endUTC' must be defined and cannot be null.`);r+=`endUTC=`+encodeURIComponent(t?``+t.toISOString():``)+`&`,r=r.replace(/[?&]$/,``);let i={method:`GET`,signal:n,headers:{Accept:`application/json`}};return this.http.fetch(r,i).then(e=>this.processHistory(e))}processHistory(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=cC.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}filteredHistory(e,t,n,r){let i=this.baseUrl+`/api/v1/jobs/history?`;if(e==null)throw new globalThis.Error(`The parameter 'startUTC' must be defined and cannot be null.`);if(i+=`startUTC=`+encodeURIComponent(e?``+e.toISOString():``)+`&`,t==null)throw new globalThis.Error(`The parameter 'endUTC' must be defined and cannot be null.`);i+=`endUTC=`+encodeURIComponent(t?``+t.toISOString():``)+`&`,i=i.replace(/[?&]$/,``);let a={body:JSON.stringify(n),method:`POST`,signal:r,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(i,a).then(e=>this.processFilteredHistory(e))}processFilteredHistory(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=cC.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}recent(e,t,n){let r=this.baseUrl+`/api/v1/jobs/recent?`;if(e==null)throw new globalThis.Error(`The parameter 'startUTC' must be defined and cannot be null.`);r+=`startUTC=`+encodeURIComponent(e?``+e.toISOString():``)+`&`,r=r.replace(/[?&]$/,``);let i={body:JSON.stringify(t),method:`POST`,signal:n,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(r,i).then(e=>this.processRecent(e))}processRecent(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=lC.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}latestSchedule(e){let t=this.baseUrl+`/api/v1/jobs/latest-schedule`;t=t.replace(/[?&]$/,``);let n={method:`GET`,signal:e,headers:{Accept:`application/json`}};return this.http.fetch(t,n).then(e=>this.processLatestSchedule(e))}processLatestSchedule(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=uC.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}currentStatus(e){let t=this.baseUrl+`/api/v1/jobs/status`;t=t.replace(/[?&]$/,``);let n={method:`GET`,signal:e,headers:{Accept:`application/json`}};return this.http.fetch(t,n).then(e=>this.processCurrentStatus(e))}processCurrentStatus(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=IS.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}unscheduledRebookings(e){let t=this.baseUrl+`/api/v1/jobs/unscheduled-rebookings`;t=t.replace(/[?&]$/,``);let n={method:`GET`,signal:e,headers:{Accept:`application/json`}};return this.http.fetch(t,n).then(e=>this.processUnscheduledRebookings(e))}processUnscheduledRebookings(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(dC.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}addFromSim(e,t,n){let r=this.baseUrl+`/api/v1/jobs/add-from-sim?`;if(e===void 0)throw new globalThis.Error(`The parameter 'expectedPreviousScheduleId' must be defined.`);e!==null&&(r+=`expectedPreviousScheduleId=`+encodeURIComponent(``+e)+`&`),r=r.replace(/[?&]$/,``);let i={body:JSON.stringify(t),method:`POST`,signal:n,headers:{"Content-Type":`application/json`}};return this.http.fetch(r,i).then(e=>this.processAddFromSim(e))}processAddFromSim(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}add(e,t,n){let r=this.baseUrl+`/api/v1/jobs/add?`;if(e===void 0)throw new globalThis.Error(`The parameter 'expectedPreviousScheduleId' must be defined.`);e!==null&&(r+=`expectedPreviousScheduleId=`+encodeURIComponent(``+e)+`&`),r=r.replace(/[?&]$/,``);let i={body:JSON.stringify(t),method:`POST`,signal:n,headers:{"Content-Type":`application/json`}};return this.http.fetch(r,i).then(e=>this.processAdd(e))}processAdd(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}addUnallocatedCastingToQueue(e,t,n,r,i,a,o){let s=this.baseUrl+`/api/v1/jobs/casting/{castingName}?`;if(e==null)throw new globalThis.Error(`The parameter 'castingName' must be defined.`);if(s=s.replace(`{castingName}`,encodeURIComponent(``+e)),t==null)throw new globalThis.Error(`The parameter 'queue' must be defined and cannot be null.`);if(s+=`queue=`+encodeURIComponent(``+t)+`&`,n===null)throw new globalThis.Error(`The parameter 'qty' cannot be null.`);n!==void 0&&(s+=`qty=`+encodeURIComponent(``+n)+`&`),r!=null&&(s+=`operName=`+encodeURIComponent(``+r)+`&`),i!=null&&(s+=`workorder=`+encodeURIComponent(``+i)+`&`),s=s.replace(/[?&]$/,``);let c={body:JSON.stringify(a),method:`POST`,signal:o,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(s,c).then(e=>this.processAddUnallocatedCastingToQueue(e))}processAddUnallocatedCastingToQueue(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(US.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}getJobPlan(e,t){let n=this.baseUrl+`/api/v1/jobs/job/{jobUnique}/plan`;if(e==null)throw new globalThis.Error(`The parameter 'jobUnique' must be defined.`);n=n.replace(`{jobUnique}`,encodeURIComponent(``+e)),n=n.replace(/[?&]$/,``);let r={method:`GET`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processGetJobPlan(e))}processGetJobPlan(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=LS.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}addUnprocessedMaterialToQueue(e,t,n,r,i,a,o,s){let c=this.baseUrl+`/api/v1/jobs/job/{jobUnique}/unprocessed-material?`;if(e==null)throw new globalThis.Error(`The parameter 'jobUnique' must be defined.`);if(c=c.replace(`{jobUnique}`,encodeURIComponent(``+e)),t==null)throw new globalThis.Error(`The parameter 'lastCompletedProcess' must be defined and cannot be null.`);if(c+=`lastCompletedProcess=`+encodeURIComponent(``+t)+`&`,n==null)throw new globalThis.Error(`The parameter 'queue' must be defined and cannot be null.`);if(c+=`queue=`+encodeURIComponent(``+n)+`&`,r==null)throw new globalThis.Error(`The parameter 'pos' must be defined and cannot be null.`);c+=`pos=`+encodeURIComponent(``+r)+`&`,i!=null&&(c+=`operName=`+encodeURIComponent(``+i)+`&`),a!=null&&(c+=`workorder=`+encodeURIComponent(``+a)+`&`),c=c.replace(/[?&]$/,``);let l={body:JSON.stringify(o),method:`POST`,signal:s,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(c,l).then(e=>this.processAddUnprocessedMaterialToQueue(e))}processAddUnprocessedMaterialToQueue(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=US.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}setJobComment(e,t,n){let r=this.baseUrl+`/api/v1/jobs/job/{jobUnique}/comment`;if(e==null)throw new globalThis.Error(`The parameter 'jobUnique' must be defined.`);r=r.replace(`{jobUnique}`,encodeURIComponent(``+e)),r=r.replace(/[?&]$/,``);let i={body:JSON.stringify(t),method:`PUT`,signal:n,headers:{"Content-Type":`application/json`}};return this.http.fetch(r,i).then(e=>this.processSetJobComment(e))}processSetJobComment(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}setMaterialInQueue(e,t,n,r){let i=this.baseUrl+`/api/v1/jobs/material/{materialId}/queue?`;if(e==null)throw new globalThis.Error(`The parameter 'materialId' must be defined.`);i=i.replace(`{materialId}`,encodeURIComponent(``+e)),t!=null&&(i+=`operName=`+encodeURIComponent(``+t)+`&`),i=i.replace(/[?&]$/,``);let a={body:JSON.stringify(n),method:`PUT`,signal:r,headers:{"Content-Type":`application/json`}};return this.http.fetch(i,a).then(e=>this.processSetMaterialInQueue(e))}processSetMaterialInQueue(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}removeMaterialFromAllQueues(e,t,n){let r=this.baseUrl+`/api/v1/jobs/material/{materialId}/queue?`;if(e==null)throw new globalThis.Error(`The parameter 'materialId' must be defined.`);r=r.replace(`{materialId}`,encodeURIComponent(``+e)),t!=null&&(r+=`operName=`+encodeURIComponent(``+t)+`&`),r=r.replace(/[?&]$/,``);let i={method:`DELETE`,signal:n,headers:{}};return this.http.fetch(r,i).then(e=>this.processRemoveMaterialFromAllQueues(e))}processRemoveMaterialFromAllQueues(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}signalMaterialForQuarantine(e,t,n,r){let i=this.baseUrl+`/api/v1/jobs/material/{materialId}/signal-quarantine?`;if(e==null)throw new globalThis.Error(`The parameter 'materialId' must be defined.`);i=i.replace(`{materialId}`,encodeURIComponent(``+e)),t!=null&&(i+=`operName=`+encodeURIComponent(``+t)+`&`),i=i.replace(/[?&]$/,``);let a={body:JSON.stringify(n),method:`PUT`,signal:r,headers:{"Content-Type":`application/json`}};return this.http.fetch(i,a).then(e=>this.processSignalMaterialForQuarantine(e))}processSignalMaterialForQuarantine(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}invalidatePalletCycle(e,t,n,r,i,a){let o=this.baseUrl+`/api/v1/jobs/material/{materialId}/invalidate-process?`;if(e==null)throw new globalThis.Error(`The parameter 'materialId' must be defined.`);o=o.replace(`{materialId}`,encodeURIComponent(``+e)),t!=null&&(o+=`operName=`+encodeURIComponent(``+t)+`&`),n!=null&&(o+=`changeCastingTo=`+encodeURIComponent(``+n)+`&`),r!=null&&(o+=`changeJobUniqueTo=`+encodeURIComponent(``+r)+`&`),o=o.replace(/[?&]$/,``);let s={body:JSON.stringify(i),method:`PUT`,signal:a,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(o,s).then(e=>this.processInvalidatePalletCycle(e))}processInvalidatePalletCycle(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=aC.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}swapMaterialOnPallet(e,t,n,r){let i=this.baseUrl+`/api/v1/jobs/material/{materialId}/swap-off-pallet?`;if(e==null)throw new globalThis.Error(`The parameter 'materialId' must be defined.`);i=i.replace(`{materialId}`,encodeURIComponent(``+e)),t!=null&&(i+=`operName=`+encodeURIComponent(``+t)+`&`),i=i.replace(/[?&]$/,``);let a={body:JSON.stringify(n),method:`PUT`,signal:r,headers:{"Content-Type":`application/json`}};return this.http.fetch(i,a).then(e=>this.processSwapMaterialOnPallet(e))}processSwapMaterialOnPallet(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}bulkRemoveMaterialFromQueues(e,t,n){let r=this.baseUrl+`/api/v1/jobs/material?`;e!=null&&(r+=`operName=`+encodeURIComponent(``+e)+`&`),r=r.replace(/[?&]$/,``);let i={body:JSON.stringify(t),method:`DELETE`,signal:n,headers:{"Content-Type":`application/json`}};return this.http.fetch(r,i).then(e=>this.processBulkRemoveMaterialFromQueues(e))}processBulkRemoveMaterialFromQueues(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}decrementQuantities(e,t,n){let r=this.baseUrl+`/api/v1/jobs/planned-cycles?`;e!=null&&(r+=`loadDecrementsStrictlyAfterDecrementId=`+encodeURIComponent(``+e)+`&`),t!=null&&(r+=`loadDecrementsAfterTimeUTC=`+encodeURIComponent(t?``+t.toISOString():``)+`&`),r=r.replace(/[?&]$/,``);let i={method:`DELETE`,signal:n,headers:{Accept:`application/json`}};return this.http.fetch(r,i).then(e=>this.processDecrementQuantities(e))}processDecrementQuantities(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(pC.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}},dS=class{constructor(e,t){this.jsonParseReviver=void 0,this.http=t||window,this.baseUrl=e??``}get(e,t,n){let r=this.baseUrl+`/api/v1/log/events/all?`;if(e==null)throw new globalThis.Error(`The parameter 'startUTC' must be defined and cannot be null.`);if(r+=`startUTC=`+encodeURIComponent(e?``+e.toISOString():``)+`&`,t==null)throw new globalThis.Error(`The parameter 'endUTC' must be defined and cannot be null.`);r+=`endUTC=`+encodeURIComponent(t?``+t.toISOString():``)+`&`,r=r.replace(/[?&]$/,``);let i={method:`GET`,signal:n,headers:{Accept:`application/json`}};return this.http.fetch(r,i).then(e=>this.processGet(e))}processGet(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(gS.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}getEventCSV(e,t,n){let r=this.baseUrl+`/api/v1/log/events.csv?`;if(e==null)throw new globalThis.Error(`The parameter 'startUTC' must be defined and cannot be null.`);if(r+=`startUTC=`+encodeURIComponent(e?``+e.toISOString():``)+`&`,t==null)throw new globalThis.Error(`The parameter 'endUTC' must be defined and cannot be null.`);r+=`endUTC=`+encodeURIComponent(t?``+t.toISOString():``)+`&`,r=r.replace(/[?&]$/,``);let i={method:`GET`,signal:n,headers:{Accept:`application/octet-stream`}};return this.http.fetch(r,i).then(e=>this.processGetEventCSV(e))}processGetEventCSV(e){let t=e.status,n={};if(e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200||t===206){let r=e.headers?e.headers.get(`content-disposition`):void 0,i=r?/filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(r):void 0,a=i&&i.length>1?i[3]||i[2]:void 0;return a?a=decodeURIComponent(a):(i=r?/filename="?([^"]*?)"?(;|$)/g.exec(r):void 0,a=i&&i.length>1?i[1]:void 0),e.blob().then(e=>({fileName:a,data:e,status:t,headers:n}))}else if(t!==200&&t!==204)return e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n));return Promise.resolve(null)}getCompletedParts(e,t,n){let r=this.baseUrl+`/api/v1/log/events/all-completed-parts?`;if(e==null)throw new globalThis.Error(`The parameter 'startUTC' must be defined and cannot be null.`);if(r+=`startUTC=`+encodeURIComponent(e?``+e.toISOString():``)+`&`,t==null)throw new globalThis.Error(`The parameter 'endUTC' must be defined and cannot be null.`);r+=`endUTC=`+encodeURIComponent(t?``+t.toISOString():``)+`&`,r=r.replace(/[?&]$/,``);let i={method:`GET`,signal:n,headers:{Accept:`application/json`}};return this.http.fetch(r,i).then(e=>this.processGetCompletedParts(e))}processGetCompletedParts(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(gS.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}recent(e,t,n){let r=this.baseUrl+`/api/v1/log/events/recent?`;if(e==null)throw new globalThis.Error(`The parameter 'lastSeenCounter' must be defined and cannot be null.`);r+=`lastSeenCounter=`+encodeURIComponent(``+e)+`&`,t!=null&&(r+=`expectedEndUTCofLastSeen=`+encodeURIComponent(t?``+t.toISOString():``)+`&`),r=r.replace(/[?&]$/,``);let i={method:`GET`,signal:n,headers:{Accept:`application/json`}};return this.http.fetch(r,i).then(e=>this.processRecent(e))}processRecent(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(gS.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}logForMaterial(e,t){let n=this.baseUrl+`/api/v1/log/events/for-material/{materialID}`;if(e==null)throw new globalThis.Error(`The parameter 'materialID' must be defined.`);n=n.replace(`{materialID}`,encodeURIComponent(``+e)),n=n.replace(/[?&]$/,``);let r={method:`GET`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processLogForMaterial(e))}processLogForMaterial(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(gS.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}logForMaterials(e,t){let n=this.baseUrl+`/api/v1/log/events/for-material?`;e!=null&&e&&e.forEach(e=>{n+=`id=`+encodeURIComponent(``+e)+`&`}),n=n.replace(/[?&]$/,``);let r={method:`GET`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processLogForMaterials(e))}processLogForMaterials(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(gS.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}logForSerial(e,t){let n=this.baseUrl+`/api/v1/log/events/for-serial/{serial}`;if(e==null)throw new globalThis.Error(`The parameter 'serial' must be defined.`);n=n.replace(`{serial}`,encodeURIComponent(``+e)),n=n.replace(/[?&]$/,``);let r={method:`GET`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processLogForSerial(e))}processLogForSerial(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(gS.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}logForWorkorder(e,t){let n=this.baseUrl+`/api/v1/log/events/for-workorder/{workorder}`;if(e==null)throw new globalThis.Error(`The parameter 'workorder' must be defined.`);n=n.replace(`{workorder}`,encodeURIComponent(``+e)),n=n.replace(/[?&]$/,``);let r={method:`GET`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processLogForWorkorder(e))}processLogForWorkorder(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(gS.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}materialDetails(e,t){let n=this.baseUrl+`/api/v1/log/material-details/{materialID}`;if(e==null)throw new globalThis.Error(`The parameter 'materialID' must be defined.`);n=n.replace(`{materialID}`,encodeURIComponent(``+e)),n=n.replace(/[?&]$/,``);let r={method:`GET`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processMaterialDetails(e))}processMaterialDetails(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=aC.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}materialDetailsForJob(e,t){let n=this.baseUrl+`/api/v1/log/material-for-job/{jobUnique}`;if(e==null)throw new globalThis.Error(`The parameter 'jobUnique' must be defined.`);n=n.replace(`{jobUnique}`,encodeURIComponent(``+e)),n=n.replace(/[?&]$/,``);let r={method:`GET`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processMaterialDetailsForJob(e))}processMaterialDetailsForJob(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(aC.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}materialForSerial(e,t){let n=this.baseUrl+`/api/v1/log/material-for-serial/{serial}`;if(e==null)throw new globalThis.Error(`The parameter 'serial' must be defined.`);n=n.replace(`{serial}`,encodeURIComponent(``+e)),n=n.replace(/[?&]$/,``);let r={method:`GET`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processMaterialForSerial(e))}processMaterialForSerial(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(aC.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}setSerial(e,t,n,r){let i=this.baseUrl+`/api/v1/log/material-details/{materialID}/serial?`;if(e==null)throw new globalThis.Error(`The parameter 'materialID' must be defined.`);if(i=i.replace(`{materialID}`,encodeURIComponent(``+e)),t===null)throw new globalThis.Error(`The parameter 'process' cannot be null.`);t!==void 0&&(i+=`process=`+encodeURIComponent(``+t)+`&`),i=i.replace(/[?&]$/,``);let a={body:JSON.stringify(n),method:`POST`,signal:r,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(i,a).then(e=>this.processSetSerial(e))}processSetSerial(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=gS.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}setWorkorder(e,t,n,r){let i=this.baseUrl+`/api/v1/log/material-details/{materialID}/workorder?`;if(e==null)throw new globalThis.Error(`The parameter 'materialID' must be defined.`);if(i=i.replace(`{materialID}`,encodeURIComponent(``+e)),t===null)throw new globalThis.Error(`The parameter 'process' cannot be null.`);t!==void 0&&(i+=`process=`+encodeURIComponent(``+t)+`&`),i=i.replace(/[?&]$/,``);let a={body:JSON.stringify(n),method:`POST`,signal:r,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(i,a).then(e=>this.processSetWorkorder(e))}processSetWorkorder(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=gS.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}setInspectionDecision(e,t,n,r,i){let a=this.baseUrl+`/api/v1/log/material-details/{materialID}/inspections/{inspType}?`;if(e==null)throw new globalThis.Error(`The parameter 'materialID' must be defined.`);if(a=a.replace(`{materialID}`,encodeURIComponent(``+e)),t==null)throw new globalThis.Error(`The parameter 'inspType' must be defined.`);if(a=a.replace(`{inspType}`,encodeURIComponent(``+t)),n===null)throw new globalThis.Error(`The parameter 'process' cannot be null.`);n!==void 0&&(a+=`process=`+encodeURIComponent(``+n)+`&`),a=a.replace(/[?&]$/,``);let o={body:JSON.stringify(r),method:`POST`,signal:i,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(a,o).then(e=>this.processSetInspectionDecision(e))}processSetInspectionDecision(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=gS.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}recordOperatorNotes(e,t,n,r,i){let a=this.baseUrl+`/api/v1/log/material-details/{materialID}/notes?`;if(e==null)throw new globalThis.Error(`The parameter 'materialID' must be defined.`);if(a=a.replace(`{materialID}`,encodeURIComponent(``+e)),t===null)throw new globalThis.Error(`The parameter 'process' cannot be null.`);t!==void 0&&(a+=`process=`+encodeURIComponent(``+t)+`&`),n!=null&&(a+=`operatorName=`+encodeURIComponent(``+n)+`&`),a=a.replace(/[?&]$/,``);let o={body:JSON.stringify(r),method:`POST`,signal:i,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(a,o).then(e=>this.processRecordOperatorNotes(e))}processRecordOperatorNotes(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=gS.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}requestRebooking(e,t,n,r,i,a){let o=this.baseUrl+`/api/v1/log/events/rebooking?`;if(e==null)throw new globalThis.Error(`The parameter 'partName' must be defined and cannot be null.`);if(o+=`partName=`+encodeURIComponent(``+e)+`&`,t===null)throw new globalThis.Error(`The parameter 'qty' cannot be null.`);t!==void 0&&(o+=`qty=`+encodeURIComponent(``+t)+`&`),n!=null&&(o+=`workorder=`+encodeURIComponent(``+n)+`&`),r!=null&&(o+=`priority=`+encodeURIComponent(``+r)+`&`),o=o.replace(/[?&]$/,``);let s={body:JSON.stringify(i),method:`POST`,signal:a,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(o,s).then(e=>this.processRequestRebooking(e))}processRequestRebooking(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=gS.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}cancelRebooking(e,t){let n=this.baseUrl+`/api/v1/log/events/cancel-rebooking/{bookingId}`;if(e==null)throw new globalThis.Error(`The parameter 'bookingId' must be defined.`);n=n.replace(`{bookingId}`,encodeURIComponent(``+e)),n=n.replace(/[?&]$/,``);let r={method:`POST`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processCancelRebooking(e))}processCancelRebooking(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=gS.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}recordInspectionCompleted(e,t){let n=this.baseUrl+`/api/v1/log/events/inspection-result`;n=n.replace(/[?&]$/,``);let r={body:JSON.stringify(e),method:`POST`,signal:t,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processRecordInspectionCompleted(e))}processRecordInspectionCompleted(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=gS.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}recordCloseoutCompleted(e,t){let n=this.baseUrl+`/api/v1/log/events/closeout`;n=n.replace(/[?&]$/,``);let r={body:JSON.stringify(e),method:`POST`,signal:t,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processRecordCloseoutCompleted(e))}processRecordCloseoutCompleted(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=gS.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}recordWorkorderComment(e,t,n,r){let i=this.baseUrl+`/api/v1/log/workorder/{workorder}/comment?`;if(e==null)throw new globalThis.Error(`The parameter 'workorder' must be defined.`);i=i.replace(`{workorder}`,encodeURIComponent(``+e)),t!=null&&(i+=`operatorName=`+encodeURIComponent(``+t)+`&`),i=i.replace(/[?&]$/,``);let a={body:JSON.stringify(n),method:`POST`,signal:r,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(i,a).then(e=>this.processRecordWorkorderComment(e))}processRecordWorkorderComment(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=gS.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}getActiveWorkorder(e,t){let n=this.baseUrl+`/api/v1/log/workorder/{workorder}`;if(e==null)throw new globalThis.Error(`The parameter 'workorder' must be defined.`);n=n.replace(`{workorder}`,encodeURIComponent(``+e)),n=n.replace(/[?&]$/,``);let r={method:`GET`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processGetActiveWorkorder(e))}processGetActiveWorkorder(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(ZS.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}},fS=class{constructor(e,t){this.jsonParseReviver=void 0,this.http=t||window,this.baseUrl=e??``}getToolsInMachines(e){let t=this.baseUrl+`/api/v1/machines/tools`;t=t.replace(/[?&]$/,``);let n={method:`GET`,signal:e,headers:{Accept:`application/json`}};return this.http.fetch(t,n).then(e=>this.processGetToolsInMachines(e))}processGetToolsInMachines(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(_C.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}getProgramsInCellController(e){let t=this.baseUrl+`/api/v1/machines/programs-in-cell-controller`;t=t.replace(/[?&]$/,``);let n={method:`GET`,signal:e,headers:{Accept:`application/json`}};return this.http.fetch(t,n).then(e=>this.processGetProgramsInCellController(e))}processGetProgramsInCellController(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(vC.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}getProgramRevisionsInDescendingOrderOfRevision(e,t,n,r){let i=this.baseUrl+`/api/v1/machines/program/{programName}/revisions?`;if(e==null)throw new globalThis.Error(`The parameter 'programName' must be defined.`);if(i=i.replace(`{programName}`,encodeURIComponent(``+e)),t==null)throw new globalThis.Error(`The parameter 'count' must be defined and cannot be null.`);i+=`count=`+encodeURIComponent(``+t)+`&`,n!=null&&(i+=`revisionToStart=`+encodeURIComponent(``+n)+`&`),i=i.replace(/[?&]$/,``);let a={method:`GET`,signal:r,headers:{Accept:`application/json`}};return this.http.fetch(i,a).then(e=>this.processGetProgramRevisionsInDescendingOrderOfRevision(e))}processGetProgramRevisionsInDescendingOrderOfRevision(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(yC.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}getProgramRevisionContent(e,t,n){let r=this.baseUrl+`/api/v1/machines/program/{programName}/revision/{revision}/content`;if(e==null)throw new globalThis.Error(`The parameter 'programName' must be defined.`);if(r=r.replace(`{programName}`,encodeURIComponent(``+e)),t==null)throw new globalThis.Error(`The parameter 'revision' must be defined.`);r=r.replace(`{revision}`,encodeURIComponent(``+t)),r=r.replace(/[?&]$/,``);let i={method:`GET`,signal:n,headers:{Accept:`application/json`}};return this.http.fetch(r,i).then(e=>this.processGetProgramRevisionContent(e))}processGetProgramRevisionContent(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=n===void 0?null:n,t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}getLatestProgramRevisionContent(e,t){let n=this.baseUrl+`/api/v1/machines/program/{programName}/latest-revision/content`;if(e==null)throw new globalThis.Error(`The parameter 'programName' must be defined.`);n=n.replace(`{programName}`,encodeURIComponent(``+e)),n=n.replace(/[?&]$/,``);let r={method:`GET`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processGetLatestProgramRevisionContent(e))}processGetLatestProgramRevisionContent(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=n===void 0?null:n,t}):t!==200&&t!==204?e.text().then(e=>SC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}},pS=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){if(e){if(this.name=e.Name,this.version=e.Version,this.licenseExpires=e.LicenseExpires?new Date(e.LicenseExpires.toString()):void 0,Array.isArray(e.AdditionalLogServers)){this.additionalLogServers=[];for(let t of e.AdditionalLogServers)this.additionalLogServers.push(t)}if(this.openIDConnectAuthority=e.OpenIDConnectAuthority,this.localhostOpenIDConnectAuthority=e.LocalhostOpenIDConnectAuthority,this.openIDConnectClientId=e.OpenIDConnectClientId,this.usingLabelPrinterForSerials=e.UsingLabelPrinterForSerials,this.useClientPrinterForLabels=e.UseClientPrinterForLabels,this.allowQuarantineToCancelLoad=e.AllowQuarantineToCancelLoad,this.quarantineQueue=e.QuarantineQueue,this.customStationMonitorDialogUrl=e.CustomStationMonitorDialogUrl,this.supportsRebookings=e.SupportsRebookings,this.allowChangeWorkorderAtLoadStation=e.AllowChangeWorkorderAtLoadStation,this.allowSwapSerialAtLoadStation=e.AllowSwapSerialAtLoadStation,this.allowInvalidateMaterialAtLoadStation=e.AllowInvalidateMaterialAtLoadStation,e.LoadStationNames){this.loadStationNames={};for(let t in e.LoadStationNames)e.LoadStationNames.hasOwnProperty(t)&&(this.loadStationNames[t]=e.LoadStationNames[t])}this.requireScanAtCloseout=e.RequireScanAtCloseout,this.requireWorkorderBeforeAllowCloseoutComplete=e.RequireWorkorderBeforeAllowCloseoutComplete,this.addToQueueButton=e.AddToQueueButton,this.requireOperatorNamePromptWhenAddingMaterial=e.RequireOperatorNamePromptWhenAddingMaterial,this.allowEditJobPlanQuantityFromQueuesPage=e.AllowEditJobPlanQuantityFromQueuesPage,this.allowInvalidateMaterialOnQueuesPage=e.AllowInvalidateMaterialOnQueuesPage,this.basketName=e.BasketName}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.Name=this.name,e.Version=this.version,e.LicenseExpires=this.licenseExpires?this.licenseExpires.toISOString():void 0,Array.isArray(this.additionalLogServers)){e.AdditionalLogServers=[];for(let t of this.additionalLogServers)e.AdditionalLogServers.push(t)}if(e.OpenIDConnectAuthority=this.openIDConnectAuthority,e.LocalhostOpenIDConnectAuthority=this.localhostOpenIDConnectAuthority,e.OpenIDConnectClientId=this.openIDConnectClientId,e.UsingLabelPrinterForSerials=this.usingLabelPrinterForSerials,e.UseClientPrinterForLabels=this.useClientPrinterForLabels,e.AllowQuarantineToCancelLoad=this.allowQuarantineToCancelLoad,e.QuarantineQueue=this.quarantineQueue,e.CustomStationMonitorDialogUrl=this.customStationMonitorDialogUrl,e.SupportsRebookings=this.supportsRebookings,e.AllowChangeWorkorderAtLoadStation=this.allowChangeWorkorderAtLoadStation,e.AllowSwapSerialAtLoadStation=this.allowSwapSerialAtLoadStation,e.AllowInvalidateMaterialAtLoadStation=this.allowInvalidateMaterialAtLoadStation,this.loadStationNames){e.LoadStationNames={};for(let t in this.loadStationNames)this.loadStationNames.hasOwnProperty(t)&&(e.LoadStationNames[t]=this.loadStationNames[t])}return e.RequireScanAtCloseout=this.requireScanAtCloseout,e.RequireWorkorderBeforeAllowCloseoutComplete=this.requireWorkorderBeforeAllowCloseoutComplete,e.AddToQueueButton=this.addToQueueButton,e.RequireOperatorNamePromptWhenAddingMaterial=this.requireOperatorNamePromptWhenAddingMaterial,e.AllowEditJobPlanQuantityFromQueuesPage=this.allowEditJobPlanQuantityFromQueuesPage,e.AllowInvalidateMaterialOnQueuesPage=this.allowInvalidateMaterialOnQueuesPage,e.BasketName=this.basketName,e}},mS=function(e){return e.DoNotShow=`DoNotShow`,e.AddBulkUnassigned=`AddBulkUnassigned`,e.LookupExistingSerial=`LookupExistingSerial`,e.ManualBarcodeScan=`ManualBarcodeScan`,e}({}),hS=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.logEntry=e.LogEntry?gS.fromJS(e.LogEntry):void 0,this.newJobs=e.NewJobs?xS.fromJS(e.NewJobs):void 0,this.newCurrentStatus=e.NewCurrentStatus?IS.fromJS(e.NewCurrentStatus):void 0,this.editMaterialInLog=e.EditMaterialInLog?nC.fromJS(e.EditMaterialInLog):void 0)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.LogEntry=this.logEntry?this.logEntry.toJSON():void 0,e.NewJobs=this.newJobs?this.newJobs.toJSON():void 0,e.NewCurrentStatus=this.newCurrentStatus?this.newCurrentStatus.toJSON():void 0,e.EditMaterialInLog=this.editMaterialInLog?this.editMaterialInLog.toJSON():void 0,e}},gS=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.material=[])}init(e){if(e){if(this.counter=e.counter,Array.isArray(e.material)){this.material=[];for(let t of e.material)this.material.push(_S.fromJS(t))}if(this.type=e.type,this.startofcycle=e.startofcycle,this.endUTC=e.endUTC?new Date(e.endUTC.toString()):void 0,this.loc=e.loc,this.locnum=e.locnum,this.pal=e.pal,this.program=e.program,this.result=e.result,this.elapsed=e.elapsed,this.active=e.active,e.details){this.details={};for(let t in e.details)e.details.hasOwnProperty(t)&&(this.details[t]=e.details[t])}if(Array.isArray(e.tooluse)){this.tooluse=[];for(let t of e.tooluse)this.tooluse.push(vS.fromJS(t))}}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.counter=this.counter,Array.isArray(this.material)){e.material=[];for(let t of this.material)e.material.push(t?t.toJSON():void 0)}if(e.type=this.type,e.startofcycle=this.startofcycle,e.endUTC=this.endUTC?this.endUTC.toISOString():void 0,e.loc=this.loc,e.locnum=this.locnum,e.pal=this.pal,e.program=this.program,e.result=this.result,e.elapsed=this.elapsed,e.active=this.active,this.details){e.details={};for(let t in this.details)this.details.hasOwnProperty(t)&&(e.details[t]=this.details[t])}if(Array.isArray(this.tooluse)){e.tooluse=[];for(let t of this.tooluse)e.tooluse.push(t?t.toJSON():void 0)}return e}},_S=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.id=e.id,this.uniq=e.uniq,this.part=e.part,this.proc=e.proc,this.path=e.path,this.numproc=e.numproc,this.face=e.face,this.serial=e.serial,this.workorder=e.workorder)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.id=this.id,e.uniq=this.uniq,e.part=this.part,e.proc=this.proc,e.path=this.path,e.numproc=this.numproc,e.face=this.face,e.serial=this.serial,e.workorder=this.workorder,e}},Y=function(e){return e.LoadUnloadCycle=`LoadUnloadCycle`,e.MachineCycle=`MachineCycle`,e.PartMark=`PartMark`,e.Inspection=`Inspection`,e.OrderAssignment=`OrderAssignment`,e.GeneralMessage=`GeneralMessage`,e.PalletCycle=`PalletCycle`,e.WorkorderComment=`WorkorderComment`,e.InspectionResult=`InspectionResult`,e.CloseOut=`CloseOut`,e.AddToQueue=`AddToQueue`,e.RemoveFromQueue=`RemoveFromQueue`,e.InspectionForce=`InspectionForce`,e.PalletOnRotaryInbound=`PalletOnRotaryInbound`,e.PalletInStocker=`PalletInStocker`,e.SignalQuarantine=`SignalQuarantine`,e.InvalidateCycle=`InvalidateCycle`,e.SwapMaterialOnPallet=`SwapMaterialOnPallet`,e.Rebooking=`Rebooking`,e.CancelRebooking=`CancelRebooking`,e.BasketLoadUnload=`BasketLoadUnload`,e.BasketCycle=`BasketCycle`,e.BasketInLocation=`BasketInLocation`,e}({}),vS=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.tool=e.Tool,this.pocket=e.Pocket,this.toolChangeOccurred=e.ToolChangeOccurred,this.toolSerialAtStartOfCycle=e.ToolSerialAtStartOfCycle,this.toolSerialAtEndOfCycle=e.ToolSerialAtEndOfCycle,this.toolUseDuringCycle=e.ToolUseDuringCycle,this.totalToolUseAtEndOfCycle=e.TotalToolUseAtEndOfCycle,this.configuredToolLife=e.ConfiguredToolLife,this.toolUseCountDuringCycle=e.ToolUseCountDuringCycle,this.totalToolUseCountAtEndOfCycle=e.TotalToolUseCountAtEndOfCycle,this.configuredToolLifeCount=e.ConfiguredToolLifeCount)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.Tool=this.tool,e.Pocket=this.pocket,e.ToolChangeOccurred=this.toolChangeOccurred,e.ToolSerialAtStartOfCycle=this.toolSerialAtStartOfCycle,e.ToolSerialAtEndOfCycle=this.toolSerialAtEndOfCycle,e.ToolUseDuringCycle=this.toolUseDuringCycle,e.TotalToolUseAtEndOfCycle=this.totalToolUseAtEndOfCycle,e.ConfiguredToolLife=this.configuredToolLife,e.ToolUseCountDuringCycle=this.toolUseCountDuringCycle,e.TotalToolUseCountAtEndOfCycle=this.totalToolUseCountAtEndOfCycle,e.ConfiguredToolLifeCount=this.configuredToolLifeCount,e}},yS=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.stops=[])}init(e){if(e){if(this.materialID=e.MaterialID,this.process=e.Process,this.pallet=e.Pallet,this.loadStation=e.LoadStation,Array.isArray(e.Stops)){this.stops=[];for(let t of e.Stops)this.stops.push(bS.fromJS(t))}this.unloadStation=e.UnloadStation}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.MaterialID=this.materialID,e.Process=this.process,e.Pallet=this.pallet,e.LoadStation=this.loadStation,Array.isArray(this.stops)){e.Stops=[];for(let t of this.stops)e.Stops.push(t?t.toJSON():void 0)}return e.UnloadStation=this.unloadStation,e}},bS=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.stationName=e.StationName,this.stationNum=e.StationNum)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.StationName=this.stationName,e.StationNum=this.stationNum,e}},xS=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.jobs=[])}init(e){if(e){if(this.scheduleId=e.ScheduleId,Array.isArray(e.Jobs)){this.jobs=[];for(let t of e.Jobs)this.jobs.push(SS.fromJS(t))}if(e.ExtraParts){this.extraParts={};for(let t in e.ExtraParts)e.ExtraParts.hasOwnProperty(t)&&(this.extraParts[t]=e.ExtraParts[t])}if(Array.isArray(e.StationUse)){this.stationUse=[];for(let t of e.StationUse)this.stationUse.push(kS.fromJS(t))}if(Array.isArray(e.StationUseForCurrentStatus)){this.stationUseForCurrentStatus=[];for(let t of e.StationUseForCurrentStatus)this.stationUseForCurrentStatus.push(kS.fromJS(t))}if(Array.isArray(e.SimDayUsage)){this.simDayUsage=[];for(let t of e.SimDayUsage)this.simDayUsage.push(jS.fromJS(t))}if(Array.isArray(e.SimWorkordersFilled)){this.simWorkordersFilled=[];for(let t of e.SimWorkordersFilled)this.simWorkordersFilled.push(MS.fromJS(t))}if(Array.isArray(e.CurrentUnfilledWorkorders)){this.currentUnfilledWorkorders=[];for(let t of e.CurrentUnfilledWorkorders)this.currentUnfilledWorkorders.push(NS.fromJS(t))}if(Array.isArray(e.Programs)){this.programs=[];for(let t of e.Programs)this.programs.push(FS.fromJS(t))}if(Array.isArray(e.AllocationWarning)){this.allocationWarning=[];for(let t of e.AllocationWarning)this.allocationWarning.push(t)}this.debugMessage=e.DebugMessage}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.ScheduleId=this.scheduleId,Array.isArray(this.jobs)){e.Jobs=[];for(let t of this.jobs)e.Jobs.push(t?t.toJSON():void 0)}if(this.extraParts){e.ExtraParts={};for(let t in this.extraParts)this.extraParts.hasOwnProperty(t)&&(e.ExtraParts[t]=this.extraParts[t])}if(Array.isArray(this.stationUse)){e.StationUse=[];for(let t of this.stationUse)e.StationUse.push(t?t.toJSON():void 0)}if(Array.isArray(this.stationUseForCurrentStatus)){e.StationUseForCurrentStatus=[];for(let t of this.stationUseForCurrentStatus)e.StationUseForCurrentStatus.push(t?t.toJSON():void 0)}if(Array.isArray(this.simDayUsage)){e.SimDayUsage=[];for(let t of this.simDayUsage)e.SimDayUsage.push(t?t.toJSON():void 0)}if(Array.isArray(this.simWorkordersFilled)){e.SimWorkordersFilled=[];for(let t of this.simWorkordersFilled)e.SimWorkordersFilled.push(t?t.toJSON():void 0)}if(Array.isArray(this.currentUnfilledWorkorders)){e.CurrentUnfilledWorkorders=[];for(let t of this.currentUnfilledWorkorders)e.CurrentUnfilledWorkorders.push(t?t.toJSON():void 0)}if(Array.isArray(this.programs)){e.Programs=[];for(let t of this.programs)e.Programs.push(t?t.toJSON():void 0)}if(Array.isArray(this.allocationWarning)){e.AllocationWarning=[];for(let t of this.allocationWarning)e.AllocationWarning.push(t)}return e.DebugMessage=this.debugMessage,e}},SS=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.procsAndPaths=[])}init(e){if(e){if(this.unique=e.Unique,this.routeStartUTC=e.RouteStartUTC?new Date(e.RouteStartUTC.toString()):void 0,this.routeEndUTC=e.RouteEndUTC?new Date(e.RouteEndUTC.toString()):void 0,this.archived=e.Archived,this.partName=e.PartName,this.comment=e.Comment,this.allocationAlgorithm=e.AllocationAlgorithm,Array.isArray(e.Bookings)){this.bookings=[];for(let t of e.Bookings)this.bookings.push(t)}if(this.provisionalWorkorderId=e.ProvisionalWorkorderId,this.manuallyCreated=e.ManuallyCreated,this.holdEntireJob=e.HoldEntireJob?CS.fromJS(e.HoldEntireJob):void 0,this.cycles=e.Cycles,Array.isArray(e.ProcsAndPaths)){this.procsAndPaths=[];for(let t of e.ProcsAndPaths)this.procsAndPaths.push(wS.fromJS(t))}}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.Unique=this.unique,e.RouteStartUTC=this.routeStartUTC?this.routeStartUTC.toISOString():void 0,e.RouteEndUTC=this.routeEndUTC?this.routeEndUTC.toISOString():void 0,e.Archived=this.archived,e.PartName=this.partName,e.Comment=this.comment,e.AllocationAlgorithm=this.allocationAlgorithm,Array.isArray(this.bookings)){e.Bookings=[];for(let t of this.bookings)e.Bookings.push(t)}if(e.ProvisionalWorkorderId=this.provisionalWorkorderId,e.ManuallyCreated=this.manuallyCreated,e.HoldEntireJob=this.holdEntireJob?this.holdEntireJob.toJSON():void 0,e.Cycles=this.cycles,Array.isArray(this.procsAndPaths)){e.ProcsAndPaths=[];for(let t of this.procsAndPaths)e.ProcsAndPaths.push(t?t.toJSON():void 0)}return e}},CS=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.holdUnholdPattern=[])}init(e){if(e){if(this.userHold=e.UserHold,this.reasonForUserHold=e.ReasonForUserHold,Array.isArray(e.HoldUnholdPattern)){this.holdUnholdPattern=[];for(let t of e.HoldUnholdPattern)this.holdUnholdPattern.push(t)}this.holdUnholdPatternStartUTC=e.HoldUnholdPatternStartUTC?new Date(e.HoldUnholdPatternStartUTC.toString()):void 0,this.holdUnholdPatternRepeats=e.HoldUnholdPatternRepeats}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.UserHold=this.userHold,e.ReasonForUserHold=this.reasonForUserHold,Array.isArray(this.holdUnholdPattern)){e.HoldUnholdPattern=[];for(let t of this.holdUnholdPattern)e.HoldUnholdPattern.push(t)}return e.HoldUnholdPatternStartUTC=this.holdUnholdPatternStartUTC?this.holdUnholdPatternStartUTC.toISOString():void 0,e.HoldUnholdPatternRepeats=this.holdUnholdPatternRepeats,e}},wS=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.paths=[])}init(e){if(e&&Array.isArray(e.paths)){this.paths=[];for(let t of e.paths)this.paths.push(TS.fromJS(t))}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},Array.isArray(this.paths)){e.paths=[];for(let t of this.paths)e.paths.push(t?t.toJSON():void 0)}return e}},TS=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.palletNums=[],this.load=[],this.unload=[],this.stops=[])}init(e){if(e){if(Array.isArray(e.PalletNums)){this.palletNums=[];for(let t of e.PalletNums)this.palletNums.push(t)}if(this.fixture=e.Fixture,this.face=e.Face,Array.isArray(e.Load)){this.load=[];for(let t of e.Load)this.load.push(t)}if(this.expectedLoadTime=e.ExpectedLoadTime,Array.isArray(e.Unload)){this.unload=[];for(let t of e.Unload)this.unload.push(t)}if(this.expectedUnloadTime=e.ExpectedUnloadTime,Array.isArray(e.Stops)){this.stops=[];for(let t of e.Stops)this.stops.push(ES.fromJS(t))}if(Array.isArray(e.SimulatedProduction)){this.simulatedProduction=[];for(let t of e.SimulatedProduction)this.simulatedProduction.push(DS.fromJS(t))}if(e.SimulatedStartTimePerPallet){this.simulatedStartTimePerPallet={};for(let t in e.SimulatedStartTimePerPallet)e.SimulatedStartTimePerPallet.hasOwnProperty(t)&&(this.simulatedStartTimePerPallet[t]=e.SimulatedStartTimePerPallet[t]?new Date(e.SimulatedStartTimePerPallet[t].toString()):void 0)}if(this.simulatedStartingUTC=e.SimulatedStartingUTC?new Date(e.SimulatedStartingUTC.toString()):void 0,this.simulatedAverageFlowTime=e.SimulatedAverageFlowTime,this.holdMachining=e.HoldMachining?CS.fromJS(e.HoldMachining):void 0,this.holdLoadUnload=e.HoldLoadUnload?CS.fromJS(e.HoldLoadUnload):void 0,this.partsPerPallet=e.PartsPerPallet,this.inputQueue=e.InputQueue,this.outputQueue=e.OutputQueue,Array.isArray(e.Inspections)){this.inspections=[];for(let t of e.Inspections)this.inspections.push(OS.fromJS(t))}this.casting=e.Casting}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},Array.isArray(this.palletNums)){e.PalletNums=[];for(let t of this.palletNums)e.PalletNums.push(t)}if(e.Fixture=this.fixture,e.Face=this.face,Array.isArray(this.load)){e.Load=[];for(let t of this.load)e.Load.push(t)}if(e.ExpectedLoadTime=this.expectedLoadTime,Array.isArray(this.unload)){e.Unload=[];for(let t of this.unload)e.Unload.push(t)}if(e.ExpectedUnloadTime=this.expectedUnloadTime,Array.isArray(this.stops)){e.Stops=[];for(let t of this.stops)e.Stops.push(t?t.toJSON():void 0)}if(Array.isArray(this.simulatedProduction)){e.SimulatedProduction=[];for(let t of this.simulatedProduction)e.SimulatedProduction.push(t?t.toJSON():void 0)}if(this.simulatedStartTimePerPallet){e.SimulatedStartTimePerPallet={};for(let t in this.simulatedStartTimePerPallet)this.simulatedStartTimePerPallet.hasOwnProperty(t)&&(e.SimulatedStartTimePerPallet[t]=this.simulatedStartTimePerPallet[t]?this.simulatedStartTimePerPallet[t].toISOString():void 0)}if(e.SimulatedStartingUTC=this.simulatedStartingUTC?this.simulatedStartingUTC.toISOString():void 0,e.SimulatedAverageFlowTime=this.simulatedAverageFlowTime,e.HoldMachining=this.holdMachining?this.holdMachining.toJSON():void 0,e.HoldLoadUnload=this.holdLoadUnload?this.holdLoadUnload.toJSON():void 0,e.PartsPerPallet=this.partsPerPallet,e.InputQueue=this.inputQueue,e.OutputQueue=this.outputQueue,Array.isArray(this.inspections)){e.Inspections=[];for(let t of this.inspections)e.Inspections.push(t?t.toJSON():void 0)}return e.Casting=this.casting,e}},ES=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.stationNums=[])}init(e){if(e){if(this.stationGroup=e.StationGroup,Array.isArray(e.StationNums)){this.stationNums=[];for(let t of e.StationNums)this.stationNums.push(t)}this.expectedCycleTime=e.ExpectedCycleTime,this.program=e.Program,this.programRevision=e.ProgramRevision}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.StationGroup=this.stationGroup,Array.isArray(this.stationNums)){e.StationNums=[];for(let t of this.stationNums)e.StationNums.push(t)}return e.ExpectedCycleTime=this.expectedCycleTime,e.Program=this.program,e.ProgramRevision=this.programRevision,e}},DS=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.timeUTC=e.TimeUTC?new Date(e.TimeUTC.toString()):void 0,this.quantity=e.Quantity)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.TimeUTC=this.timeUTC?this.timeUTC.toISOString():void 0,e.Quantity=this.quantity,e}},OS=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.inspectionType=e.InspectionType,this.counter=e.Counter,this.maxVal=e.MaxVal,this.randomFreq=e.RandomFreq,this.timeInterval=e.TimeInterval,this.expectedInspectionTime=e.ExpectedInspectionTime)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.InspectionType=this.inspectionType,e.Counter=this.counter,e.MaxVal=this.maxVal,e.RandomFreq=this.randomFreq,e.TimeInterval=this.timeInterval,e.ExpectedInspectionTime=this.expectedInspectionTime,e}},kS=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){if(e&&(this.scheduleId=e.ScheduleId,this.stationGroup=e.StationGroup,this.stationNum=e.StationNum,this.startUTC=e.StartUTC?new Date(e.StartUTC.toString()):void 0,this.endUTC=e.EndUTC?new Date(e.EndUTC.toString()):void 0,this.planDown=e.PlanDown,this.pallet=e.Pallet,Array.isArray(e.Parts))){this.parts=[];for(let t of e.Parts)this.parts.push(AS.fromJS(t))}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.ScheduleId=this.scheduleId,e.StationGroup=this.stationGroup,e.StationNum=this.stationNum,e.StartUTC=this.startUTC?this.startUTC.toISOString():void 0,e.EndUTC=this.endUTC?this.endUTC.toISOString():void 0,e.PlanDown=this.planDown,e.Pallet=this.pallet,Array.isArray(this.parts)){e.Parts=[];for(let t of this.parts)e.Parts.push(t?t.toJSON():void 0)}return e}},AS=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.jobUnique=e.JobUnique,this.process=e.Process,this.path=e.Path)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.JobUnique=this.jobUnique,e.Process=this.process,e.Path=this.path,e}},jS=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.day=e.Day?new Date(e.Day.toString()):void 0,this.machineGroup=e.MachineGroup,this.usage=e.Usage)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.Day=this.day?bC(this.day):void 0,e.MachineGroup=this.machineGroup,e.Usage=this.usage,e}},MS=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.workorderId=e.WorkorderId,this.part=e.Part,this.started=e.Started?new Date(e.Started.toString()):void 0,this.filled=e.Filled?new Date(e.Filled.toString()):void 0)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.WorkorderId=this.workorderId,e.Part=this.part,e.Started=this.started?bC(this.started):void 0,e.Filled=this.filled?bC(this.filled):void 0,e}},NS=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){if(e&&(this.workorderId=e.WorkorderId,this.part=e.Part,this.quantity=e.Quantity,this.dueDate=e.DueDate?new Date(e.DueDate.toString()):void 0,this.priority=e.Priority,Array.isArray(e.Programs))){this.programs=[];for(let t of e.Programs)this.programs.push(PS.fromJS(t))}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.WorkorderId=this.workorderId,e.Part=this.part,e.Quantity=this.quantity,e.DueDate=this.dueDate?this.dueDate.toISOString():void 0,e.Priority=this.priority,Array.isArray(this.programs)){e.Programs=[];for(let t of this.programs)e.Programs.push(t?t.toJSON():void 0)}return e}},PS=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.processNumber=e.ProcessNumber,this.stopIndex=e.StopIndex,this.programName=e.ProgramName,this.revision=e.Revision)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.ProcessNumber=this.processNumber,e.StopIndex=this.stopIndex,e.ProgramName=this.programName,e.Revision=this.revision,e}},FS=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.programName=e.ProgramName,this.comment=e.Comment,this.programContent=e.ProgramContent,this.revision=e.Revision)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.ProgramName=this.programName,e.Comment=this.comment,e.ProgramContent=this.programContent,e.Revision=this.revision,e}},IS=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.jobs={},this.pallets={},this.material=[],this.alarms=[],this.queues={})}init(e){if(e){if(this.timeOfCurrentStatusUTC=e.TimeOfCurrentStatusUTC?new Date(e.TimeOfCurrentStatusUTC.toString()):void 0,e.Jobs){this.jobs={};for(let t in e.Jobs)e.Jobs.hasOwnProperty(t)&&(this.jobs[t]=e.Jobs[t]?RS.fromJS(e.Jobs[t]):new RS)}if(e.Pallets){this.pallets={};for(let t in e.Pallets)e.Pallets.hasOwnProperty(t)&&(this.pallets[t]=e.Pallets[t]?BS.fromJS(e.Pallets[t]):new BS)}if(Array.isArray(e.Material)){this.material=[];for(let t of e.Material)this.material.push(US.fromJS(t))}if(Array.isArray(e.Alarms)){this.alarms=[];for(let t of e.Alarms)this.alarms.push(t)}if(e.Queues){this.queues={};for(let t in e.Queues)e.Queues.hasOwnProperty(t)&&(this.queues[t]=e.Queues[t]?JS.fromJS(e.Queues[t]):new JS)}if(Array.isArray(e.MachineLocations)){this.machineLocations=[];for(let t of e.MachineLocations)this.machineLocations.push(XS.fromJS(t))}if(Array.isArray(e.Workorders)){this.workorders=[];for(let t of e.Workorders)this.workorders.push(ZS.fromJS(t))}if(e.Baskets){this.baskets={};for(let t in e.Baskets)e.Baskets.hasOwnProperty(t)&&(this.baskets[t]=e.Baskets[t]?tC.fromJS(e.Baskets[t]):new tC)}}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.TimeOfCurrentStatusUTC=this.timeOfCurrentStatusUTC?this.timeOfCurrentStatusUTC.toISOString():void 0,this.jobs){e.Jobs={};for(let t in this.jobs)this.jobs.hasOwnProperty(t)&&(e.Jobs[t]=this.jobs[t]?this.jobs[t].toJSON():void 0)}if(this.pallets){e.Pallets={};for(let t in this.pallets)this.pallets.hasOwnProperty(t)&&(e.Pallets[t]=this.pallets[t]?this.pallets[t].toJSON():void 0)}if(Array.isArray(this.material)){e.Material=[];for(let t of this.material)e.Material.push(t?t.toJSON():void 0)}if(Array.isArray(this.alarms)){e.Alarms=[];for(let t of this.alarms)e.Alarms.push(t)}if(this.queues){e.Queues={};for(let t in this.queues)this.queues.hasOwnProperty(t)&&(e.Queues[t]=this.queues[t]?this.queues[t].toJSON():void 0)}if(Array.isArray(this.machineLocations)){e.MachineLocations=[];for(let t of this.machineLocations)e.MachineLocations.push(t?t.toJSON():void 0)}if(Array.isArray(this.workorders)){e.Workorders=[];for(let t of this.workorders)e.Workorders.push(t?t.toJSON():void 0)}if(this.baskets){e.Baskets={};for(let t in this.baskets)this.baskets.hasOwnProperty(t)&&(e.Baskets[t]=this.baskets[t]?this.baskets[t].toJSON():void 0)}return e}},LS=class e extends SS{constructor(e){super(e)}init(e){if(super.init(e),e&&(this.scheduleId=e.ScheduleId,this.copiedToSystem=e.CopiedToSystem,Array.isArray(e.Decrements))){this.decrements=[];for(let t of e.Decrements)this.decrements.push(zS.fromJS(t))}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.ScheduleId=this.scheduleId,e.CopiedToSystem=this.copiedToSystem,Array.isArray(this.decrements)){e.Decrements=[];for(let t of this.decrements)e.Decrements.push(t?t.toJSON():void 0)}return super.toJSON(e),e}},RS=class e extends LS{constructor(e){super(e)}init(e){if(super.init(e),e){if(Array.isArray(e.Completed)){this.completed=[];for(let t of e.Completed)this.completed.push(t)}if(Array.isArray(e.Precedence)){this.precedence=[];for(let t of e.Precedence)this.precedence.push(t)}if(Array.isArray(e.AssignedWorkorders)){this.assignedWorkorders=[];for(let t of e.AssignedWorkorders)this.assignedWorkorders.push(t)}this.remainingToStart=e.RemainingToStart}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},Array.isArray(this.completed)){e.Completed=[];for(let t of this.completed)e.Completed.push(t)}if(Array.isArray(this.precedence)){e.Precedence=[];for(let t of this.precedence)e.Precedence.push(t)}if(Array.isArray(this.assignedWorkorders)){e.AssignedWorkorders=[];for(let t of this.assignedWorkorders)e.AssignedWorkorders.push(t)}return e.RemainingToStart=this.remainingToStart,super.toJSON(e),e}},zS=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.decrementId=e.DecrementId,this.timeUTC=e.TimeUTC?new Date(e.TimeUTC.toString()):void 0,this.quantity=e.Quantity)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.DecrementId=this.decrementId,e.TimeUTC=this.timeUTC?this.timeUTC.toISOString():void 0,e.Quantity=this.quantity,e}},BS=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.currentPalletLocation=new VS)}init(e){if(e){if(this.palletNum=e.PalletNum,this.fixtureOnPallet=e.FixtureOnPallet,this.onHold=e.OnHold,this.currentPalletLocation=e.CurrentPalletLocation?VS.fromJS(e.CurrentPalletLocation):new VS,this.newFixture=e.NewFixture,this.numFaces=e.NumFaces,Array.isArray(e.FaceNames)){this.faceNames=[];for(let t of e.FaceNames)this.faceNames.push(t)}this.targetLocation=e.TargetLocation?VS.fromJS(e.TargetLocation):void 0,this.percentMoveCompleted=e.PercentMoveCompleted}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.PalletNum=this.palletNum,e.FixtureOnPallet=this.fixtureOnPallet,e.OnHold=this.onHold,e.CurrentPalletLocation=this.currentPalletLocation?this.currentPalletLocation.toJSON():void 0,e.NewFixture=this.newFixture,e.NumFaces=this.numFaces,Array.isArray(this.faceNames)){e.FaceNames=[];for(let t of this.faceNames)e.FaceNames.push(t)}return e.TargetLocation=this.targetLocation?this.targetLocation.toJSON():void 0,e.PercentMoveCompleted=this.percentMoveCompleted,e}},VS=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.loc=e.loc,this.group=e.group,this.num=e.num)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.loc=this.loc,e.group=this.group,e.num=this.num,e}},HS=function(e){return e.LoadUnload=`LoadUnload`,e.Machine=`Machine`,e.MachineQueue=`MachineQueue`,e.Buffer=`Buffer`,e.Cart=`Cart`,e}({}),US=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.signaledInspections=[],this.location=new WS,this.action=new KS)}init(e){if(e){if(this.materialID=e.MaterialID,this.jobUnique=e.JobUnique,this.partName=e.PartName,this.process=e.Process,this.path=e.Path,this.serial=e.Serial,this.workorderId=e.WorkorderId,Array.isArray(e.SignaledInspections)){this.signaledInspections=[];for(let t of e.SignaledInspections)this.signaledInspections.push(t)}this.quarantineAfterUnload=e.QuarantineAfterUnload,this.problem=e.Problem,this.lastCompletedMachiningRouteStopIndex=e.LastCompletedMachiningRouteStopIndex,this.location=e.Location?WS.fromJS(e.Location):new WS,this.action=e.Action?KS.fromJS(e.Action):new KS}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.MaterialID=this.materialID,e.JobUnique=this.jobUnique,e.PartName=this.partName,e.Process=this.process,e.Path=this.path,e.Serial=this.serial,e.WorkorderId=this.workorderId,Array.isArray(this.signaledInspections)){e.SignaledInspections=[];for(let t of this.signaledInspections)e.SignaledInspections.push(t)}return e.QuarantineAfterUnload=this.quarantineAfterUnload,e.Problem=this.problem,e.LastCompletedMachiningRouteStopIndex=this.lastCompletedMachiningRouteStopIndex,e.Location=this.location?this.location.toJSON():void 0,e.Action=this.action?this.action.toJSON():void 0,e}},WS=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.type=e.Type,this.palletNum=e.PalletNum,this.face=e.Face,this.currentQueue=e.CurrentQueue,this.queuePosition=e.QueuePosition,this.basketId=e.BasketId,this.basketSubPosition=e.BasketSubPosition)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.Type=this.type,e.PalletNum=this.palletNum,e.Face=this.face,e.CurrentQueue=this.currentQueue,e.QueuePosition=this.queuePosition,e.BasketId=this.basketId,e.BasketSubPosition=this.basketSubPosition,e}},GS=function(e){return e.Free=`Free`,e.OnPallet=`OnPallet`,e.InQueue=`InQueue`,e.InBasket=`InBasket`,e}({}),KS=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.type=e.Type,this.loadOntoPalletNum=e.LoadOntoPalletNum,this.loadOntoFace=e.LoadOntoFace,this.processAfterLoad=e.ProcessAfterLoad,this.pathAfterLoad=e.PathAfterLoad,this.loadFromBasketId=e.LoadFromBasketId,this.unloadIntoQueue=e.UnloadIntoQueue,this.unloadToBasketId=e.UnloadToBasketId,this.unloadToBasketSubPosition=e.UnloadToBasketSubPosition,this.elapsedLoadUnloadTime=e.ElapsedLoadUnloadTime,this.program=e.Program,this.elapsedMachiningTime=e.ElapsedMachiningTime,this.expectedRemainingMachiningTime=e.ExpectedRemainingMachiningTime)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.Type=this.type,e.LoadOntoPalletNum=this.loadOntoPalletNum,e.LoadOntoFace=this.loadOntoFace,e.ProcessAfterLoad=this.processAfterLoad,e.PathAfterLoad=this.pathAfterLoad,e.LoadFromBasketId=this.loadFromBasketId,e.UnloadIntoQueue=this.unloadIntoQueue,e.UnloadToBasketId=this.unloadToBasketId,e.UnloadToBasketSubPosition=this.unloadToBasketSubPosition,e.ElapsedLoadUnloadTime=this.elapsedLoadUnloadTime,e.Program=this.program,e.ElapsedMachiningTime=this.elapsedMachiningTime,e.ExpectedRemainingMachiningTime=this.expectedRemainingMachiningTime,e}},qS=function(e){return e.Waiting=`Waiting`,e.Loading=`Loading`,e.UnloadToInProcess=`UnloadToInProcess`,e.UnloadToCompletedMaterial=`UnloadToCompletedMaterial`,e.Machining=`Machining`,e}({}),JS=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.maxSizeBeforeStopUnloading=e.MaxSizeBeforeStopUnloading,this.role=e.Role)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.MaxSizeBeforeStopUnloading=this.maxSizeBeforeStopUnloading,e.Role=this.role,e}},YS=function(e){return e.RawMaterial=`RawMaterial`,e.InProcessTransfer=`InProcessTransfer`,e.Quarantine=`Quarantine`,e.Other=`Other`,e}({}),XS=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.possibleLoadStations=[])}init(e){if(e){if(this.machineGroup=e.MachineGroup,this.machineNum=e.MachineNum,this.moving=e.Moving,Array.isArray(e.PossibleLoadStations)){this.possibleLoadStations=[];for(let t of e.PossibleLoadStations)this.possibleLoadStations.push(t)}this.currentLoadStation=e.CurrentLoadStation}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.MachineGroup=this.machineGroup,e.MachineNum=this.machineNum,e.Moving=this.moving,Array.isArray(this.possibleLoadStations)){e.PossibleLoadStations=[];for(let t of this.possibleLoadStations)e.PossibleLoadStations.push(t)}return e.CurrentLoadStation=this.currentLoadStation,e}},ZS=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.elapsedStationTime={},this.activeStationTime={})}init(e){if(e){if(this.workorderId=e.WorkorderId,this.part=e.Part,this.plannedQuantity=e.PlannedQuantity,this.dueDate=e.DueDate?new Date(e.DueDate.toString()):void 0,this.priority=e.Priority,this.simulatedStart=e.SimulatedStart?new Date(e.SimulatedStart.toString()):void 0,this.simulatedFilled=e.SimulatedFilled?new Date(e.SimulatedFilled.toString()):void 0,this.completedQuantity=e.CompletedQuantity,Array.isArray(e.Comments)){this.comments=[];for(let t of e.Comments)this.comments.push(QS.fromJS(t))}if(e.ElapsedStationTime){this.elapsedStationTime={};for(let t in e.ElapsedStationTime)e.ElapsedStationTime.hasOwnProperty(t)&&(this.elapsedStationTime[t]=e.ElapsedStationTime[t])}if(e.ActiveStationTime){this.activeStationTime={};for(let t in e.ActiveStationTime)e.ActiveStationTime.hasOwnProperty(t)&&(this.activeStationTime[t]=e.ActiveStationTime[t])}if(Array.isArray(e.Material)){this.material=[];for(let t of e.Material)this.material.push($S.fromJS(t))}}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.WorkorderId=this.workorderId,e.Part=this.part,e.PlannedQuantity=this.plannedQuantity,e.DueDate=this.dueDate?this.dueDate.toISOString():void 0,e.Priority=this.priority,e.SimulatedStart=this.simulatedStart?bC(this.simulatedStart):void 0,e.SimulatedFilled=this.simulatedFilled?bC(this.simulatedFilled):void 0,e.CompletedQuantity=this.completedQuantity,Array.isArray(this.comments)){e.Comments=[];for(let t of this.comments)e.Comments.push(t?t.toJSON():void 0)}if(this.elapsedStationTime){e.ElapsedStationTime={};for(let t in this.elapsedStationTime)this.elapsedStationTime.hasOwnProperty(t)&&(e.ElapsedStationTime[t]=this.elapsedStationTime[t])}if(this.activeStationTime){e.ActiveStationTime={};for(let t in this.activeStationTime)this.activeStationTime.hasOwnProperty(t)&&(e.ActiveStationTime[t]=this.activeStationTime[t])}if(Array.isArray(this.material)){e.Material=[];for(let t of this.material)e.Material.push(t?t.toJSON():void 0)}return e}},QS=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.comment=e.Comment,this.timeUTC=e.TimeUTC?new Date(e.TimeUTC.toString()):void 0)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.Comment=this.comment,e.TimeUTC=this.timeUTC?this.timeUTC.toISOString():void 0,e}},$S=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.materialID=e.MaterialID,this.serial=e.Serial,this.quarantined=e.Quarantined,this.inspectionFailed=e.InspectionFailed,this.closeout=e.Closeout)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.MaterialID=this.materialID,e.Serial=this.serial,e.Quarantined=this.quarantined,e.InspectionFailed=this.inspectionFailed,e.Closeout=this.closeout,e}},eC=function(e){return e.None=`None`,e.ClosedOut=`ClosedOut`,e.CloseOutFailed=`CloseOutFailed`,e}({}),tC=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.basketId=e.BasketId,this.locationName=e.LocationName,this.locationPosition=e.LocationPosition)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.BasketId=this.basketId,e.LocationName=this.locationName,e.LocationPosition=this.locationPosition,e}},nC=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.editedEvents=[])}init(e){if(e&&(this.oldMaterialID=e.OldMaterialID,this.newMaterialID=e.NewMaterialID,Array.isArray(e.EditedEvents))){this.editedEvents=[];for(let t of e.EditedEvents)this.editedEvents.push(gS.fromJS(t))}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.OldMaterialID=this.oldMaterialID,e.NewMaterialID=this.newMaterialID,Array.isArray(this.editedEvents)){e.EditedEvents=[];for(let t of this.editedEvents)e.EditedEvents.push(t?t.toJSON():void 0)}return e}},rC=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){if(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);this.type=e.type,this.title=e.title,this.status=e.status,this.detail=e.detail,this.instance=e.instance}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){for(var t in e=typeof e==`object`?e:{},this)this.hasOwnProperty(t)&&(e[t]=this[t]);return e.type=this.type,e.title=this.title,e.status=this.status,e.detail=this.detail,e.instance=this.instance,e}},iC=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.existingMaterial=e.ExistingMaterial?aC.fromJS(e.ExistingMaterial):void 0,this.potentialNewMaterial=e.PotentialNewMaterial?oC.fromJS(e.PotentialNewMaterial):void 0)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.ExistingMaterial=this.existingMaterial?this.existingMaterial.toJSON():void 0,e.PotentialNewMaterial=this.potentialNewMaterial?this.potentialNewMaterial.toJSON():void 0,e}},aC=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){if(e&&(this.materialID=e.MaterialID,this.jobUnique=e.JobUnique,this.partName=e.PartName,this.numProcesses=e.NumProcesses,this.workorder=e.Workorder,this.serial=e.Serial,e.Paths)){this.paths={};for(let t in e.Paths)e.Paths.hasOwnProperty(t)&&(this.paths[t]=e.Paths[t])}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.MaterialID=this.materialID,e.JobUnique=this.jobUnique,e.PartName=this.partName,e.NumProcesses=this.numProcesses,e.Workorder=this.workorder,e.Serial=this.serial,this.paths){e.Paths={};for(let t in this.paths)this.paths.hasOwnProperty(t)&&(e.Paths[t]=this.paths[t])}return e}},oC=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){if(e){if(e.PossibleCastingsByQueue){this.possibleCastingsByQueue={};for(let t in e.PossibleCastingsByQueue)e.PossibleCastingsByQueue.hasOwnProperty(t)&&(this.possibleCastingsByQueue[t]=e.PossibleCastingsByQueue[t]===void 0?[]:e.PossibleCastingsByQueue[t])}if(e.PossibleJobsByQueue){this.possibleJobsByQueue={};for(let t in e.PossibleJobsByQueue)e.PossibleJobsByQueue.hasOwnProperty(t)&&(this.possibleJobsByQueue[t]=e.PossibleJobsByQueue[t]?e.PossibleJobsByQueue[t].map(e=>sC.fromJS(e)):[])}this.workorder=e.Workorder,this.serial=e.Serial}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},this.possibleCastingsByQueue){e.PossibleCastingsByQueue={};for(let t in this.possibleCastingsByQueue)this.possibleCastingsByQueue.hasOwnProperty(t)&&(e.PossibleCastingsByQueue[t]=this.possibleCastingsByQueue[t])}if(this.possibleJobsByQueue){e.PossibleJobsByQueue={};for(let t in this.possibleJobsByQueue)this.possibleJobsByQueue.hasOwnProperty(t)&&(e.PossibleJobsByQueue[t]=this.possibleJobsByQueue[t])}return e.Workorder=this.workorder,e.Serial=this.serial,e}},sC=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.jobUnique=e.JobUnique,this.lastCompletedProcess=e.LastCompletedProcess,this.workorder=e.Workorder)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.JobUnique=this.jobUnique,e.LastCompletedProcess=this.lastCompletedProcess,e.Workorder=this.workorder,e}},cC=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.jobs={},this.stationUse=[])}init(e){if(e){if(e.Jobs){this.jobs={};for(let t in e.Jobs)e.Jobs.hasOwnProperty(t)&&(this.jobs[t]=e.Jobs[t]?LS.fromJS(e.Jobs[t]):new LS)}if(Array.isArray(e.StationUse)){this.stationUse=[];for(let t of e.StationUse)this.stationUse.push(kS.fromJS(t))}}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},this.jobs){e.Jobs={};for(let t in this.jobs)this.jobs.hasOwnProperty(t)&&(e.Jobs[t]=this.jobs[t]?this.jobs[t].toJSON():void 0)}if(Array.isArray(this.stationUse)){e.StationUse=[];for(let t of this.stationUse)e.StationUse.push(t?t.toJSON():void 0)}return e}},lC=class e extends cC{constructor(e){super(e)}init(e){if(super.init(e),e&&(this.mostRecentSimulationId=e.MostRecentSimulationId,Array.isArray(e.MostRecentSimDayUsage))){this.mostRecentSimDayUsage=[];for(let t of e.MostRecentSimDayUsage)this.mostRecentSimDayUsage.push(jS.fromJS(t))}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.MostRecentSimulationId=this.mostRecentSimulationId,Array.isArray(this.mostRecentSimDayUsage)){e.MostRecentSimDayUsage=[];for(let t of this.mostRecentSimDayUsage)e.MostRecentSimDayUsage.push(t?t.toJSON():void 0)}return super.toJSON(e),e}},uC=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.jobs=[],this.extraParts={})}init(e){if(e){if(this.latestScheduleId=e.LatestScheduleId,Array.isArray(e.Jobs)){this.jobs=[];for(let t of e.Jobs)this.jobs.push(LS.fromJS(t))}if(e.ExtraParts){this.extraParts={};for(let t in e.ExtraParts)e.ExtraParts.hasOwnProperty(t)&&(this.extraParts[t]=e.ExtraParts[t])}if(Array.isArray(e.UnscheduledRebookings)){this.unscheduledRebookings=[];for(let t of e.UnscheduledRebookings)this.unscheduledRebookings.push(dC.fromJS(t))}}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.LatestScheduleId=this.latestScheduleId,Array.isArray(this.jobs)){e.Jobs=[];for(let t of this.jobs)e.Jobs.push(t?t.toJSON():void 0)}if(this.extraParts){e.ExtraParts={};for(let t in this.extraParts)this.extraParts.hasOwnProperty(t)&&(e.ExtraParts[t]=this.extraParts[t])}if(Array.isArray(this.unscheduledRebookings)){e.UnscheduledRebookings=[];for(let t of this.unscheduledRebookings)e.UnscheduledRebookings.push(t?t.toJSON():void 0)}return e}},dC=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.bookingId=e.BookingId,this.partName=e.PartName,this.quantity=e.Quantity,this.timeUTC=e.TimeUTC?new Date(e.TimeUTC.toString()):void 0,this.priority=e.Priority,this.notes=e.Notes,this.workorder=e.Workorder)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.BookingId=this.bookingId,e.PartName=this.partName,e.Quantity=this.quantity,e.TimeUTC=this.timeUTC?this.timeUTC.toISOString():void 0,e.Priority=this.priority,e.Notes=this.notes,e.Workorder=this.workorder,e}},fC=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.queue=e.Queue,this.position=e.Position)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.Queue=this.queue,e.Position=this.position,e}},pC=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.decrementId=e.DecrementId,this.jobUnique=e.JobUnique,this.timeUTC=e.TimeUTC?new Date(e.TimeUTC.toString()):void 0,this.part=e.Part,this.quantity=e.Quantity)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.DecrementId=this.decrementId,e.JobUnique=this.jobUnique,e.TimeUTC=this.timeUTC?this.timeUTC.toISOString():void 0,e.Part=this.part,e.Quantity=this.quantity,e}},mC=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){if(e){if(this.materialID=e.MaterialID,this.process=e.Process,this.inspectionLocationNum=e.InspectionLocationNum,this.inspectionType=e.InspectionType,this.success=e.Success,e.ExtraData){this.extraData={};for(let t in e.ExtraData)e.ExtraData.hasOwnProperty(t)&&(this.extraData[t]=e.ExtraData[t])}this.elapsed=e.Elapsed,this.active=e.Active}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.MaterialID=this.materialID,e.Process=this.process,e.InspectionLocationNum=this.inspectionLocationNum,e.InspectionType=this.inspectionType,e.Success=this.success,this.extraData){e.ExtraData={};for(let t in this.extraData)this.extraData.hasOwnProperty(t)&&(e.ExtraData[t]=this.extraData[t])}return e.Elapsed=this.elapsed,e.Active=this.active,e}},hC=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){if(e){if(this.materialID=e.MaterialID,this.process=e.Process,this.locationNum=e.LocationNum,this.closeoutType=e.CloseoutType,e.ExtraData){this.extraData={};for(let t in e.ExtraData)e.ExtraData.hasOwnProperty(t)&&(this.extraData[t]=e.ExtraData[t])}this.elapsed=e.Elapsed,this.active=e.Active,this.failed=e.Failed}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.MaterialID=this.materialID,e.Process=this.process,e.LocationNum=this.locationNum,e.CloseoutType=this.closeoutType,this.extraData){e.ExtraData={};for(let t in this.extraData)this.extraData.hasOwnProperty(t)&&(e.ExtraData[t]=this.extraData[t])}return e.Elapsed=this.elapsed,e.Active=this.active,e.Failed=this.failed,e}},gC=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.pocket=e.Pocket,this.toolName=e.ToolName,this.serial=e.Serial,this.currentUse=e.CurrentUse,this.totalLifeTime=e.TotalLifeTime,this.currentUseCount=e.CurrentUseCount,this.totalLifeCount=e.TotalLifeCount)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.Pocket=this.pocket,e.ToolName=this.toolName,e.Serial=this.serial,e.CurrentUse=this.currentUse,e.TotalLifeTime=this.totalLifeTime,e.CurrentUseCount=this.currentUseCount,e.TotalLifeCount=this.totalLifeCount,e}},_C=class e extends gC{constructor(e){super(e)}init(e){super.init(e),e&&(this.machineGroupName=e.MachineGroupName,this.machineNum=e.MachineNum)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.MachineGroupName=this.machineGroupName,e.MachineNum=this.machineNum,super.toJSON(e),e}},vC=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.cellControllerProgramName=e.CellControllerProgramName,this.programName=e.ProgramName,this.revision=e.Revision,this.comment=e.Comment)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.CellControllerProgramName=this.cellControllerProgramName,e.ProgramName=this.programName,e.Revision=this.revision,e.Comment=this.comment,e}},yC=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.programName=e.ProgramName,this.revision=e.Revision,this.comment=e.Comment,this.cellControllerProgramName=e.CellControllerProgramName)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.ProgramName=this.programName,e.Revision=this.revision,e.Comment=this.comment,e.CellControllerProgramName=this.cellControllerProgramName,e}};function bC(e){return e.getUTCFullYear()+`-`+(e.getUTCMonth()<9?`0`+(e.getUTCMonth()+1):e.getUTCMonth()+1)+`-`+(e.getUTCDate()<10?`0`+e.getUTCDate():e.getUTCDate())}var xC=class extends Error{constructor(e,t,n,r,i){super(),this.isApiException=!0,this.message=e,this.status=t,this.response=n,this.headers=r,this.result=i}static isApiException(e){return e.isApiException===!0}};function SC(e,t,n,r,i){throw i??new xC(e,t,n,r,null)}var CC,wC,TC,EC,DC=[],OC=[];function kC(){TC=new dS,EC=new fS,wC=new uS,CC=new lS}function AC(e){DC=e,OC=e.map(e=>new dS(e))}function jC(e){let t=e.access_token;function n(e,n){return window.fetch(e,n?{...n,headers:{...n.headers,Authorization:`Bearer `+t}}:{headers:{Authorization:`Bearer `+t}})}CC=new lS(void 0,{fetch:n}),wC=new uS(void 0,{fetch:n}),TC=new dS(void 0,{fetch:n}),OC=DC.map(e=>new dS(e,{fetch:n}))}function MC(e,t,n,r,i,a){return`/api/v1/fms/find-instructions/`+encodeURIComponent(e)+`?type=`+encodeURIComponent(t)+(`&materialID=`+n.toString())+(i==null?``:`&process=`+i.toString())+(a===null?``:`&operatorName=`+encodeURIComponent(a))+(r?`&pallet=`+encodeURIComponent(r):``)}var NC=365.2425,PC=864e5,FC=6e4,IC=36e5,LC=3600*24;LC*7,LC*NC/12*3;var RC=Symbol.for(`constructDateFrom`);function zC(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&RC in e?e[RC](t):e instanceof Date?new e.constructor(t):new Date(t)}function BC(e,t){return zC(t||e,e)}function VC(e,t,n){let r=BC(e,n?.in);return isNaN(t)?zC(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function HC(e,t,n){let r=BC(e,n?.in);if(isNaN(t))return zC(n?.in||e,NaN);if(!t)return r;let i=r.getDate(),a=zC(n?.in||e,r.getTime());return a.setMonth(r.getMonth()+t+1,0),i>=a.getDate()?a:(r.setFullYear(a.getFullYear(),a.getMonth(),i),r)}function UC(e,t,n){return zC(n?.in||e,+BC(e)+t)}function WC(e,t,n){return UC(e,t*IC,n)}var GC={};function KC(){return GC}function qC(e,t){let n=KC(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=BC(e,t?.in),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function JC(e){let t=BC(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-+n}function YC(e,...t){let n=zC.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function XC(e,t){let n=BC(e,t?.in);return n.setHours(0,0,0,0),n}function ZC(e,t,n){let[r,i]=YC(n?.in,e,t),a=XC(r),o=XC(i),s=+a-JC(a),c=+o-JC(o);return Math.round((s-c)/PC)}function QC(e,t,n){let r=BC(e,n?.in);return r.setTime(r.getTime()+t*FC),r}function $C(e,t,n){return UC(e,t*1e3,n)}function ew(e,t,n){return HC(e,t*12,n)}function tw(e,t){let n,r=t?.in;return e.forEach(e=>{!r&&typeof e==`object`&&(r=zC.bind(null,e));let t=BC(e,r);(!n||n<t||isNaN(+t))&&(n=t)}),zC(r,n||NaN)}function nw(e,t){let n,r=t?.in;return e.forEach(e=>{!r&&typeof e==`object`&&(r=zC.bind(null,e));let t=BC(e,r);(!n||n>t||isNaN(+t))&&(n=t)}),zC(r,n||NaN)}function rw(e,t,n){let[r,i]=YC(n?.in,e,t),a=iw(r,i),o=Math.abs(ZC(r,i));r.setDate(r.getDate()-a*o);let s=a*(o-Number(iw(r,i)===-a));return s===0?0:s}function iw(e,t){let n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function aw(e){return t=>{let n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function ow(e,t){return BC(e)-+BC(t)}function sw(e,t,n){let r=ow(e,t)/FC;return aw(n?.roundingMethod)(r)}function cw(e,t){let n=BC(e,t?.in);return n.setHours(23,59,59,999),n}function lw(e,t,n){let r=ow(e,t)/1e3;return aw(n?.roundingMethod)(r)}function uw(e,t){let n=BC(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function dw(e,t){let n=BC(e,t?.in),r=n.getFullYear(),i=n.getMonth(),a=zC(n,0);return a.setFullYear(r,i+1,0),a.setHours(0,0,0,0),a.getDate()}function fw(e){return XC(Date.now(),e)}var pw=3,mw=2;function hw(e,t,n){let r=n.left,i=n.right;return r===null?i===null?{key:e,val:t,size:2,left:null,right:n}:{key:n.key,val:n.val,size:3,left:{key:e,val:t,size:1,left:null,right:null},right:i}:i===null?{key:r.key,val:r.val,size:3,left:{key:e,val:t,size:1,left:null,right:null},right:{key:n.key,val:n.val,size:1,left:null,right:null}}:{key:n.key,val:n.val,size:1+n.size,left:{key:e,val:t,size:1+r.size,left:null,right:r},right:i}}function gw(e,t,n){let r=n.left,i=n.right;return r===null?i===null?{key:e,val:t,size:2,left:n,right:null}:{key:i.key,val:i.val,size:3,left:{key:n.key,val:n.val,size:1,left:null,right:null},right:{key:e,val:t,size:1,left:null,right:null}}:i===null?{key:n.key,val:n.val,size:3,left:r,right:{key:e,val:t,size:1,left:null,right:null}}:{key:n.key,val:n.val,size:1+n.size,left:r,right:{key:e,val:t,size:1+i.size,left:i,right:null}}}function _w(e,t,n,r){let i=r.left,a=r.right;return i.size<mw*a.size?{key:r.key,val:r.val,size:1+n.size+r.size,left:{key:e,val:t,size:1+n.size+i.size,left:n,right:i},right:a}:{key:i.key,val:i.val,size:1+n.size+r.size,left:{key:e,val:t,size:1+n.size+(i.left?.size??0),left:n,right:i.left},right:{key:r.key,val:r.val,size:1+a.size+(i.right?.size??0),left:i.right,right:a}}}function vw(e,t,n,r){let i=n.left,a=n.right;return a.size<mw*i.size?{key:n.key,val:n.val,size:1+n.size+r.size,left:i,right:{key:e,val:t,size:1+r.size+a.size,left:a,right:r}}:{key:a.key,val:a.val,size:1+n.size+r.size,left:{key:n.key,val:n.val,size:1+i.size+(a.left?.size??0),left:i,right:a.left},right:{key:e,val:t,size:1+r.size+(a.right?.size??0),left:a.right,right:r}}}function yw(e,t,n,r){if(r===null)return e===null?{key:t,val:n,size:1,left:null,right:null}:gw(t,n,e);let i=e;return i.size>pw*r.size?vw(t,n,i,r):{key:t,val:n,size:1+i.size+r.size,left:e,right:r}}function bw(e,t,n,r){if(e===null)return r===null?{key:t,val:n,size:1,left:null,right:null}:hw(t,n,r);let i=r;return i.size>pw*e.size?_w(t,n,e,i):{key:t,val:n,size:1+e.size+i.size,left:e,right:r}}function xw(e,t,n,r){return e===null?r===null?{key:t,val:n,size:1,left:null,right:null}:hw(t,n,r):r===null?gw(t,n,e):r.size>pw*e.size?_w(t,n,e,r):e.size>pw*r.size?vw(t,n,e,r):{key:t,val:n,size:1+e.size+r.size,left:e,right:r}}function Sw(e,t,n){return n===null?{key:e,val:t,size:1,left:null,right:null}:yw(Sw(e,t,n.left),n.key,n.val,n.right)}function Cw(e,t,n){if(n===null)return{key:e,val:t,size:1,left:null,right:null};let r=Cw(e,t,n.right);return bw(n.left,n.key,n.val,r)}function ww(e,t,n,r){return e===null?Sw(t,n,r):r===null?Cw(t,n,e):r.size>pw*e.size?yw(ww(e,t,n,r.left),r.key,r.val,r.right):e.size>pw*r.size?bw(e.left,e.key,e.val,ww(e.right,t,n,r)):{key:t,val:n,size:1+e.size+r.size,left:e,right:r}}function Tw(e){let t=e.left;if(t===null)return{k:e.key,v:e.val,rest:e.right};{let n=Tw(t);return n.rest=bw(n.rest,e.key,e.val,e.right),n}}function Ew(e){let t=e.right;if(t===null)return{k:e.key,v:e.val,rest:e.left};{let n=Ew(t);return n.rest=yw(e.left,e.key,e.val,n.rest),n}}function Dw(e,t){if(e===null)return t;if(t===null)return e;if(e.size>t.size){let{k:n,v:r,rest:i}=Ew(e);return bw(i,n,r,t)}else{let{k:n,v:r,rest:i}=Tw(t);return yw(e,n,r,i)}}function Ow(e,t){return e===null?t:t===null?e:t.size>pw*e.size?yw(Ow(e,t.left),t.key,t.val,t.right):e.size>pw*t.size?bw(e.left,e.key,e.val,Ow(e.right,t)):Dw(e,t)}function kw(e,t,n,r,i){return e<0?{key:t,val:n,size:2,left:null,right:{key:r,val:i,size:1,left:null,right:null}}:{key:t,val:n,size:2,left:{key:r,val:i,size:1,left:null,right:null},right:null}}function Aw(e){let t=e.right,n=t.size;return t.size=e.size,e.right=t.left,e.size=e.size-n+(e.right?.size??0),t.left=e,t}function jw(e){let t=e.left,n=t.size;return t.size=e.size,e.left=t.right,e.size=e.size-n+(e.left?.size??0),t.right=e,t}function Mw(e){let t=e.left.size,n=e.right?.size??0;if(t>pw*n&&t+n>1){let t=e.left.left?.size??0;return(e.left.right?.size??0)<mw*t||(e.left=Aw(e.left)),jw(e)}return e}function Nw(e){let t=e.left?.size??0,n=e.right.size;return n>pw*t&&t+n>1?((e.right.left?.size??0)<mw*(e.right.right?.size??0)||(e.right=jw(e.right)),Aw(e)):e}function Pw(e){return typeof e==`object`&&!!e&&`compare`in e}function Fw(e,t){return`asc`in e?e.asc(t):`desc`in e?e.desc(t):e(t)}function Iw(...e){return(t,n)=>{for(let r of e)if(`desc`in r){let e=r.desc(t),i=r.desc(n);if(typeof e==`string`&&typeof i==`string`){let t=e.localeCompare(i);if(t===0)continue;return t<0?1:-1}else if(Pw(e)&&i!==null){let t=e.compare(i);if(t===0)continue;return t<0?1:-1}else if(e===i)continue;else if(e===null)return-1;else if(i===null)return 1;else return e<i?1:-1}else{let e=`asc`in r?r.asc:r,i=e(t),a=e(n);if(typeof i==`string`&&typeof a==`string`){let e=i.localeCompare(a);if(e===0)continue;return e<0?-1:1}else if(Pw(i)&&a!==null){let e=i.compare(a);if(e===0)continue;return e<0?-1:1}else if(i===a)continue;else if(i===null)return 1;else if(a===null)return-1;else return i<a?-1:1}return 0}}function Lw(e,t){return e===t?0:e?1:-1}function Rw(e,t){return e-t}function zw(e,t){return e.localeCompare(t)}function Bw(e,t){return e.getTime()-t.getTime()}function Vw(e,t){return e.compare(t)}function Hw(){let e;function t(t){switch(typeof t){case`object`:if(t instanceof Date){e.compare=Bw;return}else if(Pw(t)){e.compare=Vw;return}else throw Error(`key type must have compare method`);case`string`:e.compare=zw;return;case`number`:e.compare=Rw;return;case`boolean`:e.compare=Lw;return;default:throw Error(`cannot compare keys`)}}function n(n,r){return t(n),e.compare(n,r)}return e={compare:n},e}function Uw({compare:e},t,n){let r=n;for(;r;){let n=e(t,r.key);if(n===0)return r.val;r=n<0?r.left:r.right}}function Ww(e){let t=e;for(;;){let e=t.left;if(e)t=e;else return[t.key,t.val]}}function Gw(e){let t=e;for(;;){let e=t.right;if(e)t=e;else return[t.key,t.val]}}function Kw({compare:e},t,n,r){function i(r){if(r===null){let e=n(void 0);return e===void 0?null:{key:t,val:e,size:1,left:null,right:null}}let a=e(t,r.key);if(a===0){let e=n(r.val);return e===void 0?Dw(r.left,r.right):e===r.val?r:{key:t,val:e,size:r.size,left:r.left,right:r.right}}else if(a<0){let e=i(r.left);return e===r.left?r:xw(e,r.key,r.val,r.right)}else{let e=i(r.right);return e===r.right?r:xw(r.left,r.key,r.val,e)}}return i(r)}function qw({compare:e},t,n,r,i){let a=!0;function o(i){if(i===null)return{key:t,val:r(void 0,n),size:1,left:null,right:null};let s=e(t,i.key);if(s<0)return i.left=o(i.left),a&&(i.size+=1),Mw(i);if(s>0)return i.right=o(i.right),a&&(i.size+=1),Nw(i);{let e=r(i.val,n);return e===i.val?(a=!1,i):(a=!1,{key:i.key,val:e,size:i.size,left:i.left,right:i.right})}}return o(i)}function xte({compare:e},t,n){let r,i,a=null,o=!0;function s(t){if(t===null)return{key:r,val:i,size:1,left:null,right:null};let a=e(r,t.key);return a<0?(t.left=s(t.left),o&&(t.size+=1),Mw(t)):a>0?(t.right=s(t.right),o&&(t.size+=1),Nw(t)):i===t.val?(o=!1,t):(o=!1,{key:t.key,val:n?n(t.val,i):i,size:t.size,left:t.left,right:t.right})}for([r,i]of t)a=s(a),o=!0;return a}function Jw({compare:e},t,n,r){let i,a,o=null,s=!0;function c(t){if(t===null)return{key:i,val:r?r(void 0,a):a,size:1,left:null,right:null};let n=e(i,t.key);if(n<0)return t.left=c(t.left),s&&(t.size+=1),Mw(t);if(n>0)return t.right=c(t.right),s&&(t.size+=1),Nw(t);{s=!1;let e=r?r(t.val,a):a;return e===t.val?t:{key:t.key,val:e,size:t.size,left:t.left,right:t.right}}}for(a of t)i=n(a),o=c(o),s=!0;return o}function*Yw(e,t){let n=[],r=t;for(;r!==null||n.length>0;)r===null?(r=n.pop(),yield e(r.key,r.val),r=r.right):(n.push(r),r=r.left)}function*Xw(e,t){let n=[],r=t;for(;r!==null||n.length>0;)r===null?(r=n.pop(),yield e(r.key,r.val),r=r.left):(n.push(r),r=r.right)}function Zw(e,t,n){let r=[],i=n,a=t;for(;i!==null||r.length>0;)i===null?(i=r.pop(),a=e(a,i.key,i.val),i=i.right):(r.push(i),i=i.left);return a}function Qw(e,t,n){let r=[],i=n,a=t;for(;i!==null||r.length>0;)i===null?(i=r.pop(),a=e(i.key,i.val,a),i=i.left):(r.push(i),i=i.right);return a}function $w(e,t){function n(t){if(!t)return null;let r=n(t.left),i=e(t.val,t.key),a=n(t.right);return i===t.val&&r===t.left&&a===t.right?t:{key:t.key,val:i,size:t.size,left:r,right:a}}return n(t)}function eT(e,t,n){function r(n){if(!n)return null;let i=r(n.left),a=e(n.val,n.key),o=r(n.right);return a===void 0||t&&a===null?Ow(i,o):a===n.val&&i===n.left&&o===n.right?n:ww(i,n.key,a,o)}return r(n)}function tT({compare:e},t,n){function r(n){if(!n)return{below:null,val:void 0,above:null};let i=e(t,n.key);if(i<0){let e=r(n.left),t=ww(e.above,n.key,n.val,n.right);return{below:e.below,val:e.val,above:t}}else if(i>0){let e=r(n.right);return{below:ww(n.left,n.key,n.val,e.below),val:e.val,above:e.above}}else return{below:n.left,val:n.val,above:n.right}}return r(n)}function nT(e,t){function n(t){if(t===null)return[null,null];let[r,i]=n(t.left),[a,o]=n(t.right);if(e(t.key,t.val))return[r===t.left&&a===t.right?t:ww(r,t.key,t.val,a),Ow(i,o)];{let e=o===t.right&&i===t.left?t:ww(i,t.key,t.val,o);return[Ow(r,a),e]}}return n(t)}function rT(e){return Tw(e)}function iT(e){return Ew(e)}function aT(e,t,n){if(!t)return!0;if(!n||t.size>n.size)return!1;function r(t,n){if(!t)return!0;let i=tT(e,t.key,n);return i.val===void 0||(t.left?.size??0)>(i.below?.size??0)||(t.right?.size??0)>(i.above?.size??0)?!1:r(t.left,i.below)&&r(t.right,i.above)}return r(t,n)}function Ste(e,t,n){if(!t||!n)return!0;function r(t,n){if(!t||!n)return!0;if(t.size===1)return Uw(e,t.key,n)===void 0;let i=tT(e,t.key,n);return i.val===void 0?r(t.left,i.below)&&r(t.right,i.above):!1}return r(t,n)}function oT({compare:e},t,n){let r=n,i=0;for(;r;){let n=e(t,r.key);if(n===0)return r.left&&(i+=r.left.size),i;n<0?r=r.left:(r.left&&(i+=r.left.size),i+=1,r=r.right)}return-1}function sT(e,t){let n=t,r=e;for(;n;){let e=n.left?n.left.size:0;if(r<e)n=n.left;else if(r===e)return[n.key,n.val];else r-=e+1,n=n.right}}function cT(e,t){if(e<=0||t===null)return null;if(e>=t.size)return t;let n=t.left?t.left.size:0;if(e<=n)return cT(e,t.left);{let r=cT(e-n-1,t.right);return ww(t.left,t.key,t.val,r)}}function lT(e,t){if(e<=0||t===null)return t;if(e>=t.size)return null;let n=t.left?t.left.size:0;return e<n?ww(lT(e,t.left),t.key,t.val,t.right):e===n?Sw(t.key,t.val,t.right):lT(e-n-1,t.right)}function uT(e,t,n){if(e<0||n===null)return n;let r=n.left?n.left.size:0;if(e<r){let r=uT(e,t,n.left);return r===n.left?n:xw(r,n.key,n.val,n.right)}else if(e===r){let e=t(n.key,n.val);return e===void 0?Dw(n.left,n.right):e===n.val?n:{key:n.key,val:e,size:n.size,left:n.left,right:n.right}}else{let i=uT(e-r-1,t,n.right);return i===n.right?n:xw(n.left,n.key,n.val,i)}}function dT(e,t,n,r){function i(n,r){if(!n)return r;if(!r)return n;if(!n.left&&!n.right)return Kw(e,n.key,e=>e===void 0?n.val:t(n.val,e,n.key),r);if(!r.left&&!r.right)return Kw(e,r.key,e=>e===void 0?r.val:t(e,r.val,r.key),n);let a=tT(e,n.key,r),o=i(n.left,a.below),s=i(n.right,a.above);return o===n.left&&s===n.right&&(a.val===void 0||a.val===n.val)?n:a.val===void 0?ww(o,n.key,n.val,s):ww(o,n.key,t(n.val,a.val,n.key),s)}return i(n,r)}function fT(e,t,n,r){function i(n,r){if(!n||!r)return null;let a=tT(e,n.key,r),o=i(n.left,a.below),s=i(n.right,a.above);return a.val===void 0?Ow(o,s):o===n.left&&s===n.right&&a.val===n.val?n:ww(o,n.key,t(n.val,a.val,n.key),s)}return i(n,r)}function pT(e,t,n){function r(t,n){if(!t)return null;if(!n)return t;let i=tT(e,t.key,n),a=r(t.left,i.below),o=r(t.right,i.above);return i.val===void 0?a===t.left&&o===t.right?t:ww(a,t.key,t.val,o):Ow(a,o)}return r(t,n)}function mT(e,t,n){function r(t,n){if(!t)return n;if(!n)return t;if(!t.left&&!t.right)return Kw(e,t.key,e=>e===void 0?t.val:void 0,n);if(!n.left&&!n.right)return Kw(e,n.key,e=>e===void 0?n.val:void 0,t);let i=tT(e,t.key,n),a=r(t.left,i.below),o=r(t.right,i.above);return i.val===void 0?ww(a,t.key,t.val,o):Ow(a,o)}return r(t,n)}function hT(e,t,n,r){function i(e,n){return t(void 0,e,n)}function a(n,r){if(!r)return n;if(!n)return eT(i,!1,r);let o=tT(e,n.key,r),s=a(n.left,o.below),c=a(n.right,o.above);if(o.val!==void 0){let e=t(n.val,o.val,n.key);return e===void 0?Ow(s,c):e===n.val&&s===n.left&&c===n.right?n:ww(s,n.key,e,c)}else if(s===n.left&&c===n.right)return n;else return ww(s,n.key,n.val,c)}return a(n,r)}function gT(e){return typeof e==`object`&&!!e&&`hash`in e}function _T(e,t){return e*16777619^t}function vT(e){let t=2166136261;for(let n=0;n<e.length;n++)t=_T(t,e.charCodeAt(n));return _T(t,e.length)}function yT(e){return e?1:0}function bT(e){if(Number.isInteger(e)&&e>=-2147483648&&e<=2147483647)return e;if(Object.is(e,1/0)||Object.is(e,NaN))return 0;{let t=new ArrayBuffer(8);new Float64Array(t)[0]=e;let n=new Int32Array(t);return _T(_T(2166136261,n[0]),n[1])}}function Cte(e){return bT(e.getTime())}function xT(...e){let t=e.length===1?0:2166136261;for(let n=0;n<e.length;n++){let r=e[n];if(r==null)t=_T(t,0);else switch(typeof r){case`string`:t=_T(t,vT(r));break;case`number`:t=_T(t,bT(r));break;case`boolean`:t=_T(t,yT(r));break;default:t=r instanceof Date?_T(t,bT(r.getTime())):gT(r)?_T(t,r.hash()):_T(t,vT(r.toString()));break}}return e.length===1?t:_T(t,e.length)}function ST(){let e;function t(t){switch(typeof t){case`object`:if(t instanceof Date){e.compare=Bw,e.hash=Cte;return}else if(gT(t)){e.compare=Vw,e.hash=e=>e.hash();return}else throw Error(`key type must have compare and hash methods`);case`string`:e.compare=zw,e.hash=vT;return;case`number`:e.compare=Rw,e.hash=bT;return;case`boolean`:e.compare=Lw,e.hash=yT;return}}function n(n,r){return t(n),e.compare(n,r)}function r(n){return t(n),e.hash(n)}return e={compare:n,hash:r},e}var CT=5,wT=(1<<CT)-1,TT=-1;function ET(e,t){return 1<<(e>>>t&wT)}function wte(e){return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),(e+(e>>4)&252645135)*16843009>>24}function DT(e,t){return wte(e&t-1)}function OT(e,t){return e>>>t&wT}function Tte(){}function kT(e,t,n,r,i){r===void 0&&(r=e.hash(t)),i===void 0&&(i=0);let a=n;do if(`children`in a){let e=a.bitmap;if(e!==TT){let t=ET(r,i);if((e&t)===0)return;a=a.children[DT(e,t)],i+=CT}else a=a.children[OT(r,i)],i+=CT}else if(`key`in a)return r===a.hash&&e.compare(t,a.key)===0?a.val:void 0;else if(r===a.hash)return Uw(e,t,a.collision);else return;while(a);throw Error(`Internal immutable-collections violation: node undefined during lookup`)}function AT(e,t,n){let r=t.hash,i=n.hash,a,o;for(;;){let s=ET(r,e),c=ET(i,e);if(s===c){let t=[,],n={bitmap:s,children:t};a===void 0&&(a=n),o!==void 0&&(o[0]=n),o=t,e+=CT}else{let l={bitmap:s|c,children:OT(r,e)<OT(i,e)?[t,n]:[n,t]};return o!==void 0&&(o[0]=l),a??l}}}function jT(e,t,n,r){let i=e.hash(t);if(r===null)return[{hash:i,key:t,val:n(void 0)},!0];let a,o,s=0,c=0,l=r;do if(`children`in l){let e,r,u=l.bitmap;if(u!==TT){let d=ET(i,c);if(e=DT(u,d),(u&d)===0){let r=l.children,c={hash:i,key:t,val:n(void 0)},f=[...r.slice(0,e),c,...r.slice(e)],p={bitmap:u|d,children:f};return o!==void 0&&(o[s]=p),[a??p,!0]}r={bitmap:u,children:[...l.children]}}else e=OT(i,c),r={bitmap:TT,children:[...l.children]};a===void 0&&(a=r),o!==void 0&&(o[s]=r),o=r.children,s=e,c+=CT,l=r.children[e]}else if(`key`in l){let u,d=!0;if(i===l.hash){let a=e.compare(t,l.key);if(a===0){let e=n(l.val);if(e===l.val)return[r,!1];u={hash:i,key:t,val:e},d=!1}else u={hash:i,collision:kw(a,t,n(void 0),l.key,l.val)}}else u=AT(c,{hash:i,key:t,val:n(void 0)},l);return o!==void 0&&(o[s]=u),[a??u,d]}else{let u,d=!0;if(i===l.hash){let a=Kw(e,t,n,l.collision);if(a===l.collision)return[r,!1];d=a.size!==l.collision.size,u={hash:i,collision:a}}else u=AT(c,l,{hash:i,key:t,val:n(void 0)});return o!==void 0&&(o[s]=u),[a??u,d]}while(l);throw Error(`Internal immutable-collections violation: hamt insert reached null`)}function MT(e,t,n,r,i){let a=e.hash(t);if(i===null)return{hash:a,key:t,val:r(void 0,n)};let o,s=0,c=0,l=i;do if(`children`in l){let e,u=l.bitmap;if(u!==TT){let o=ET(a,c);if(e=DT(u,o),(u&o)===0){let s={hash:a,key:t,val:r(void 0,n)};return l.children.splice(e,0,s),l.bitmap|=o,i}}else e=OT(a,c);o=l.children,s=e,c+=CT,l=o[e]}else if(`key`in l){let u;if(a===l.hash){let o=e.compare(t,l.key);if(e.compare(t,l.key)===0)return l.val=r(l.val,n),i;u={hash:a,collision:kw(o,t,r(void 0,n),l.key,l.val)}}else u=AT(c,{hash:a,key:t,val:r(void 0,n)},l);return o===void 0?i=u:o[s]=u,i}else if(a===l.hash)return l.collision=qw(e,t,n,r,l.collision),i;else{let e=AT(c,l,{hash:a,key:t,val:r(void 0,n)});return o===void 0?i=e:o[s]=e,i}while(l);throw Error(`Internal immutable-collections violation: hamt mutate insert reached null`)}function Ete(e,t,n){let r=null,i=0,a;a=n?function(e,t){return e===void 0?(i++,t):n(e,t)}:function(e,t){return e===void 0&&i++,t};for(let[n,i]of t)r=MT(e,n,i,a,r);return[r,i]}function Dte(e,t,n,r){let i=null,a=0,o;o=r?function(e,t){return e===void 0?(a++,r(void 0,t)):r(e,t)}:function(e,t){return e===void 0&&a++,t};for(let r of t)i=MT(e,n(r),r,o,i);return[i,a]}function NT(e){for(;;)if(`children`in e)if(e.children.length===1)e=e.children[0];else return null;else return e}function PT(e,t,n){let r=e[e.length-1];if(r.node.bitmap===TT){let t=r.node.children;t.splice(r.childIdx,1);let n=~(1<<r.childIdx);if(e.length===1)return{bitmap:n,children:t};{let r=e[e.length-2];return r.node.children[r.childIdx]={bitmap:n,children:t},e[0].node}}if(r.node.children.length===2){let t=NT(r.node.children[1-r.childIdx]);if(t){for(let n=e.length-2;n>=0;n--){let r=e[n];if(r.node.children.length!==1)return r.node.children[r.childIdx]=t,e[0].node}return t}}return r.node.bitmap&=~ET(t,n-CT),r.node.children.splice(r.childIdx,1),e[0].node}function FT(e,t,n){if(e.length>0){let n=e[e.length-1];n.node.children[n.childIdx]=t}e.push({node:t,childIdx:n})}function IT(e,t,n,r,i){if(n===null)return null;r===void 0&&(r=e.hash(t)),i===void 0&&(i=0);let a=[],o=n;do if(`children`in o){let e,t=o.bitmap;if(t!==TT){let a=ET(r,i);if((t&a)===0)return n;e=DT(t,a)}else e=OT(r,i);let s={bitmap:t,children:[...o.children]};FT(a,s,e),i+=CT,o=s.children[e]}else if(`key`in o)return r===o.hash&&e.compare(t,o.key)===0?a.length===0?null:PT(a,r,i):n;else if(r===o.hash){let i=Kw(e,t,Tte,o.collision);if(i===o.collision)return n;let s;if(s=i.size===1?{hash:r,key:i.key,val:i.val}:{hash:r,collision:i},a.length>0){let e=a[a.length-1];return e.node.children[e.childIdx]=s,a[0].node}else return s}else return n;while(o);throw Error(`Internal immutable-collections violation: hamt remove reached null`)}function Ote(e,t,n,r){if(r===null){let r=n(void 0);return r===void 0?[null,0]:[{hash:e.hash(t),key:t,val:r},1]}let i=e.hash(t),a=[],o=0,s=r;do if(`children`in s){let e,c=s.bitmap;if(c!==TT){let l=ET(i,o);if((c&l)===0){let e=n(void 0);if(e===void 0)return[r,0];{let n=s.children,r=DT(c,l),o=[...n.slice(0,r),{hash:i,key:t,val:e},...n.slice(r)],u={bitmap:c|l,children:o};if(a.length>0){let e=a[a.length-1];return e.node.children[e.childIdx]=u,[a[0].node,1]}else return[u,1]}}else e=DT(c,l)}else e=OT(i,o);let l={bitmap:c,children:[...s.children]};FT(a,l,e),o+=CT,s=l.children[e]}else if(`key`in s){let c,l;if(i===s.hash){let u=e.compare(t,s.key);if(u===0){let e=n(s.val);if(e===void 0)return a.length===0?[null,-1]:[PT(a,i,o),-1];if(e===s.val)return[r,0];c={hash:i,key:t,val:e},l=0}else{let e=n(void 0);if(e===void 0)return[r,0];c={hash:i,collision:kw(u,t,e,s.key,s.val)},l=1}}else{let e=n(void 0);if(e===void 0)return[r,0];c=AT(o,{hash:i,key:t,val:e},s),l=1}if(a.length>0){let e=a[a.length-1];return e.node.children[e.childIdx]=c,[a[0].node,l]}else return[c,l]}else{let c,l;if(i===s.hash){let a=Kw(e,t,n,s.collision);if(a===s.collision)return[r,0];l=a.size-s.collision.size,c=a.size===1?{hash:i,key:a.key,val:a.val}:{hash:i,collision:a}}else{let e=n(void 0);if(e===void 0)return[r,0];c=AT(o,{hash:i,key:t,val:e},s),l=1}if(a.length>0){let e=a[a.length-1];return e.node.children[e.childIdx]=c,[a[0].node,l]}else return[c,l]}while(s);throw Error(`Internal immutable-collections violation: hamt alter reached null`)}function*LT(e,t){if(t===null)return;let n=[t],r;for(;r=n.pop();)if(`children`in r)for(let e=0,t=r.children,i=t.length;e<i;e++)n.push(t[e]);else `key`in r?yield e(r.key,r.val):yield*Yw(e,r.collision)}function RT(e,t,n){let r=t;if(n===null)return r;let i=[n],a;for(;a=i.pop();)if(`children`in a)for(let e=0,t=a.children,n=t.length;e<n;e++)i.push(t[e]);else r=`key`in a?e(r,a.key,a.val):Zw(e,r,a.collision);return r}function kte(e,t){if(t===null)return null;function n(t){if(`children`in t){let e;for(let r=0,i=t.children,a=i.length;r<a;r++){let t=i[r],a=n(t);e?e.push(a):t!==a&&(e=[...i.slice(0,r),a])}return e?{bitmap:t.bitmap,children:e}:t}else if(`key`in t){let n=e(t.val,t.key);return t.val===n?t:{hash:t.hash,key:t.key,val:n}}else{let n=$w(e,t.collision);return n===t.collision?t:{hash:t.hash,collision:n}}}return n(t)}function zT(e,t,n){if(n===null)return[null,0];let r=0;function i(n){if(`children`in n){let e=n.bitmap,t,r=e;for(let a=1,o=0,s=e;s!==0;s&=~a,a<<=1)if(e&a){let e=n.children[o],s=i(e);t?s?t.push(s):r&=~a:s?e!==s&&(t=[...n.children.slice(0,o),s]):(t=[...n.children.slice(0,o)],r&=~a),o++}return t?t.length===0?null:t.length===1&&NT(t[0])||{bitmap:r,children:t}:n}else if(`key`in n){let i=e(n.val,n.key);return i===void 0||t&&i===null?null:n.val===i?(r++,n):(r++,{hash:n.hash,key:n.key,val:i})}else{let i=eT(e,t,n.collision);return i===n.collision?(r+=n.collision.size,n):i===null?null:i.size===1?(r+=1,{hash:n.hash,key:i.key,val:i.val}):(r+=i.size,{hash:n.hash,collision:i})}}return[i(n),r]}function BT(e,t,n,r){if(n===null)return[r,0];if(r===null)return[n,0];let i=0;function a(n,r,o){if(`key`in r&&`key`in o)if(r.hash===o.hash){let n=e.compare(r.key,o.key);if(n===0){i++;let e=t(r.val,o.val,r.key);return e===r.val?r:e===o.val?o:{hash:r.hash,key:r.key,val:e}}else return{hash:r.hash,collision:kw(n,r.key,r.val,o.key,o.val)}}else return AT(n,r,o);else if(`key`in r&&`collision`in o)if(r.hash===o.hash){let n=Kw(e,r.key,e=>e===void 0?r.val:(i++,t(r.val,e,r.key)),o.collision);return n===o.collision?o:{hash:r.hash,collision:n}}else return AT(n,r,o);else if(`collision`in r&&`key`in o)if(r.hash===o.hash){let n=Kw(e,o.key,e=>e===void 0?o.val:(i++,t(e,o.val,o.key)),r.collision);return n===r.collision?r:{hash:o.hash,collision:n}}else return AT(n,r,o);else if(`collision`in r&&`collision`in o)if(r.hash===o.hash){let n=dT(e,t,r.collision,o.collision);return n===r.collision?r:(i+=r.collision.size+o.collision.size-n.size,{hash:r.hash,collision:n})}else return AT(n,r,o);else if(`children`in r&&`children`in o){let e=r.bitmap,t=o.bitmap,i=e&t,s;for(let c=1,l=0,u=0,d=e|t;d!==0;d&=~c,c<<=1)if(c&i){let e=a(n+CT,r.children[l],o.children[u]);s?s.push(e):e!==r.children[l]&&(s=[...r.children.slice(0,l),e]),l++,u++}else c&e?(s&&s.push(r.children[l]),l++):c&t&&(s?s.push(o.children[u]):s=[...r.children.slice(0,l),o.children[u]],u++);return s?{bitmap:e|t,children:s}:r}else if(`children`in r){let e=o.hash,t=r.bitmap,i=r.children,s;if(t===TT)s=OT(e,n);else{let r=ET(e,n);if(t&r)s=DT(t,r);else{let e=DT(t,r),n=[...i.slice(0,e),o,...i.slice(e)];return{bitmap:t|r,children:n}}}let c=i[s],l=a(n+CT,c,o);if(l===c)return r;{let e=[...i];return e[s]=l,{bitmap:t,children:e}}}else{let e=r.hash,t=o,i=t.bitmap,s=t.children,c;if(i===TT)c=OT(e,n);else{let t=ET(e,n);if(i&t)c=DT(i,t);else{let e=DT(i,t),n=[...s.slice(0,e),r,...s.slice(e)];return{bitmap:i|t,children:n}}}let l=s[c],u=a(n+CT,r,l);if(u===l)return o;{let e=[...s];return e[c]=u,{bitmap:i,children:e}}}}return[a(0,n,r),i]}function VT(e,t,n,r){if(n===null||r===null)return[null,0];let i=0;function a(n,r,o){if(`key`in r){let a=kT(e,r.key,o,r.hash,n);if(a!==void 0){i++;let e=t(r.val,a,r.key);return e===r.val?r:{hash:r.hash,key:r.key,val:e}}else return null}else if(`key`in o){let a=kT(e,o.key,r,o.hash,n);if(a!==void 0){i++;let e=t(a,o.val,o.key);return e===o.val?o:{hash:o.hash,key:o.key,val:e}}else return null}else if(`collision`in r&&`collision`in o){let n=fT(e,t,r.collision,o.collision);return n===r.collision?(i+=r.collision.size,r):n===null?null:n.size===1?(i+=1,{hash:r.hash,key:n.key,val:n.val}):(i+=n.size,{hash:r.hash,collision:n})}else if(`children`in r&&`children`in o){let e=r.bitmap,t=o.bitmap,i=e&t,s,c=i;for(let l=1,u=0,d=0,f=e|t;f!==0;f&=~l,l<<=1)if(l&i){let e=a(n+CT,r.children[u],o.children[d]);s?e===null?c&=~l:s.push(e):e!==r.children[u]&&(e===null?(s=[...r.children.slice(0,u)],c&=~l):s=[...r.children.slice(0,u),e]),u++,d++}else l&e?(s||=[...r.children.slice(0,u)],u++):l&t&&d++;return s?s.length===0?null:s.length===1?NT(s[0])??{bitmap:c,children:s}:{bitmap:c,children:s}:r}else if(`children`in r){let e=o.hash,t=r.bitmap,i;if(t===TT)i=OT(e,n);else{let r=ET(e,n);if(r&t)i=DT(t,r);else return null}return a(n+CT,r.children[i],o)}else{let e=r.hash,t=o,i=t.bitmap,s;if(i===TT)s=OT(e,n);else{let t=ET(e,n);if(t&i)s=DT(i,t);else return null}return a(n+CT,r,t.children[s])}}return[a(0,n,r),i]}function HT(e,t,n){if(n===null)return[t,0];if(t===null)return[null,0];let r=0;function i(t,n,a){if(`key`in n)return kT(e,n.key,a,n.hash,t)===void 0?n:(r+=1,null);if(`key`in a){let i=IT(e,a.key,n,a.hash,t);return i===n?n:(r+=1,i)}else if(`children`in n&&`children`in a){let e=n.bitmap,r=a.bitmap,o=e&r,s,c=e;for(let l=1,u=0,d=0,f=e;f!==0;f&=~l,l<<=1)if(l&o){let e=i(t+CT,n.children[u],a.children[d]);s?e===null?c&=~l:s.push(e):e!==n.children[u]&&(e===null?(s=[...n.children.slice(0,u)],c&=~l):s=[...n.children.slice(0,u),e]),u++,d++}else l&e?(s&&s.push(n.children[u]),u++):l&r&&d++;return s?s.length===0?null:s.length===1?NT(s[0])??{bitmap:c,children:s}:{bitmap:c,children:s}:n}else if(`collision`in n&&`collision`in a){let t=pT(e,n.collision,a.collision);return t===null?(r+=n.collision.size,null):t.size===1?(r+=n.collision.size-1,{hash:n.hash,key:t.key,val:t.val}):t===n.collision?n:(r+=n.collision.size-t.size,{hash:n.hash,collision:t})}else if(`children`in n){let e=a.hash,r=n.bitmap,o,s;if(r===TT)o=OT(e,t),s=1<<o;else if(s=ET(e,t),r&s)o=DT(r,s);else return n;let c=n.children,l=c[o],u=i(t+CT,l,a);if(u===l)return n;if(u===null)if(c.length===2){let e=c[1-o];return NT(e)??{bitmap:r&~s,children:[e]}}else{let e=[...c.slice(0,o),...c.slice(o+1)];return{bitmap:r&~s,children:e}}else{let e=[...c];return e[o]=u,{bitmap:r,children:e}}}else{let e=n.hash,r=a,o=r.bitmap,s;if(o===TT)s=OT(e,t);else{let r=ET(e,t);if(r&o)s=DT(o,r);else return n}return i(t+CT,n,r.children[s])}}return[i(0,t,n),r]}function UT(e,t,n,r){if(r===null)return[n,0];if(n===null){let[e,t]=zT(i,!1,r);return[e,-t]}function i(e,n){return t(void 0,e,n)}let a=0;function o(n,r,s){if(`key`in r&&`key`in s)if(r.hash===s.hash){let n=e.compare(r.key,s.key);if(n===0){let e=t(r.val,s.val,r.key);return e===void 0?(a+=1,null):e===r.val?r:e===s.val?s:{hash:r.hash,key:r.key,val:e}}else{let e=t(void 0,s.val,s.key);return e===void 0?r:(--a,{hash:r.hash,collision:kw(n,r.key,r.val,s.key,e)})}}else{let e=t(void 0,s.val,s.key);return e===void 0?r:(--a,AT(n,r,{hash:s.hash,key:s.key,val:e}))}else if(`collision`in r&&`key`in s)if(r.hash===s.hash){let n=Kw(e,s.key,e=>t(e,s.val,s.key),r.collision);return n===r.collision?r:n.size===1?(a+=r.collision.size-1,{hash:r.hash,key:n.key,val:n.val}):(a+=r.collision.size-n.size,{hash:r.hash,collision:n})}else{let e=t(void 0,s.val,s.key);return e===void 0?r:(--a,AT(n,r,{hash:s.hash,key:s.key,val:e}))}else if(`key`in r&&`collision`in s)if(r.hash===s.hash){let n=hT(e,t,{key:r.key,val:r.val,size:1,left:null,right:null},s.collision);return n===null?(a+=1,null):(a+=1-n.size,{hash:r.hash,collision:n})}else{let e=eT(i,!1,s.collision);return e===null?r:e.size===1?(--a,AT(n,r,{hash:s.hash,key:e.key,val:e.val})):(a-=e.size,AT(n,r,{hash:s.hash,collision:e}))}else if(`collision`in r&&`collision`in s)if(r.hash===s.hash){let n=hT(e,t,r.collision,s.collision);return n===null?(a+=r.collision.size,null):n===r.collision?r:n.size===1?(a+=r.collision.size-1,{hash:r.hash,key:n.key,val:n.val}):(a+=r.collision.size-n.size,{hash:r.hash,collision:n})}else{let e=eT(i,!1,s.collision);return e===null?r:e.size===1?(--a,AT(n,r,{hash:s.hash,key:e.key,val:e.val})):(a-=e.size,AT(n,r,{hash:s.hash,collision:e}))}else if(`children`in r&&`children`in s){let e=r.bitmap,t=s.bitmap,c=e&t,l,u=e;for(let d=1,f=0,p=0,m=e|t;m!==0;m&=~d,d<<=1)if(d&c){let e=o(n+CT,r.children[f],s.children[p]);l?e===null?u&=~d:l.push(e):e!==r.children[f]&&(e===null?(l=[...r.children.slice(0,f)],u&=~d):l=[...r.children.slice(0,f),e]),f++,p++}else if(d&e)l&&l.push(r.children[f]),f++;else if(d&t){let[e,t]=zT(i,!1,s.children[p]);e!==null&&(a-=t,u|=d,l?l.push(e):l=[...r.children.slice(0,f),e]),p++}return l?l.length===0?null:l.length===1?NT(l[0])??{bitmap:u,children:l}:{bitmap:u,children:l}:r}else if(`children`in r){let e=s,t=e.hash,c=r.bitmap,l,u;if(c===TT?(l=OT(t,n),u=1<<l):(u=ET(t,n),l=DT(c,u)),c&u){let e=r.children,t=e[l],i=o(n+CT,t,s);if(i===null)if(e.length===2){let t=e[1-l];return NT(t)??{bitmap:c&~u,children:[t]}}else{let t=[...e.slice(0,l),...e.slice(l+1)];return{bitmap:c&~u,children:t}}else if(i===t)return r;else{let t=[...e];return t[l]=i,{bitmap:c,children:t}}}else{let t=DT(c,u),[n,o]=zT(i,!1,e);if(n!==null){a-=o;let e=r.children,i=[...e.slice(0,t),n,...e.slice(t)];return{bitmap:c|u,children:i}}else return r}}else{let e=s,t=r.hash,c=ET(t,n),l=e.bitmap,u,d=l;for(let t=1,s=0,f=l|c;f!==0;f&=~t,t<<=1)if(t&l){let l;if(t&c)l=o(n+CT,r,e.children[s]);else{let t;[l,t]=zT(i,!1,e.children[s]),a-=t}u?l===null?d&=~t:u.push(l):l!==e.children[s]&&(l===null?(u=[...e.children.slice(0,s)],d&=~t):u=[...e.children.slice(0,s),l]),s++}else t&c&&(d|=t,u?u.push(r):u=[...e.children.slice(0,s),r]);return u?u.length===0?null:u.length===1?NT(u[0])??{bitmap:d,children:u}:{bitmap:d,children:u}:s}}return[o(0,n,r),a]}function WT(){return!0}var GT=class e{static empty(){return new e(ST(),null,0)}static ofKeys(t){let n=t;return new e(n.cfg,n.root,n.size)}static from(t){let n=null,r=0,i=ST();function a(e){return e===void 0&&r++,!0}for(let e of t)n=MT(i,e,void 0,a,n);return new e(i,n,r)}static build(t,n){let r=null,i=0,a=ST();function o(e){return e===void 0&&i++,!0}for(let e of t)r=MT(a,n(e),void 0,o,r);return new e(a,r,i)}has(e){return this.root===null?!1:kT(this.cfg,e,this.root)!==void 0}[Symbol.iterator](){return LT(e=>e,this.root)}entries(){return LT(e=>[e,e],this.root)}keys(){return LT(e=>e,this.root)}values(){return LT(e=>e,this.root)}forEach(e){RT((t,n)=>{e(n,n,this)},void 0,this.root)}fold(e,t){return RT((t,n)=>e(t,n),t,this.root)}toLazySeq(){let e=this.root;return X.ofIterator(()=>LT(e=>e,e))}add(t){let[n,r]=jT(this.cfg,t,WT,this.root);return n===this.root?this:new e(this.cfg,n,this.size+(r?1:0))}delete(t){let n=IT(this.cfg,t,this.root);return n===this.root?this:new e(this.cfg,n,this.size-1)}union(t){let[n,r]=BT(this.cfg,WT,this.root,t.root);return n===this.root?this:new e(this.cfg,n,this.size+t.size-r)}static union(...t){let n=t.filter(e=>e.size>0);if(n.length===0)return e.empty();{let t=n[0].root,r=n[0].size;for(let e=1;e<n.length;e++){let i=n[e],[a,o]=BT(i.cfg,WT,t,i.root);t=a,r+=i.size-o}return t===n[0].root?n[0]:new e(n[0].cfg,t,r)}}append(t){return this.union(e.from(t))}intersection(t){let[n,r]=VT(this.cfg,WT,this.root,t.root);return n===this.root?this:new e(this.cfg,n,r)}static intersection(...t){if(t.length===0)return e.empty();{let n=t[0].root,r=0;for(let e=1;e<t.length;e++){let i=t[e],[a,o]=VT(i.cfg,WT,n,i.root);n=a,r+=o}return n===t[0].root?t[0]:new e(t[0].cfg,n,r)}}difference(t){let[n,r]=HT(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n,this.size-r)}symmetricDifference(t){let[n,r]=UT(this.cfg,e=>e===void 0?!0:void 0,this.root,t.root);return n===this.root?this:new e(this.cfg,n,this.size-r)}filter(t){let[n,r]=zT((e,n)=>t(n)?e:void 0,!1,this.root);return n===this.root?this:new e(this.cfg,n,r)}transform(e){return e(this)}isSubsetOf(e){if(this.size>e.size)return!1;for(let t of this)if(!e.has(t))return!1;return!0}isSupersetOf(e){return e.isSubsetOf(this)}isDisjointFrom(e){if(this.size<=e.size){for(let t of this)if(e.has(t))return!1}else for(let t of e)if(this.has(t))return!1;return!0}constructor(e,t,n){this.cfg=e,this.root=t,this.size=n}};Object.defineProperty(GT.prototype,`@@__IMMUTABLE_SET__@@`,{value:!0});function KT(){return!0}function qT(){}var JT=class e{static empty(){return new e(Hw(),null)}static ofKeys(t){let n=t;return new e(n.cfg,n.root)}static from(t){let n=Hw();return new e(n,Jw(n,t,e=>e,KT))}static build(t,n){let r=Hw();return new e(r,Jw(r,t,n,KT))}get size(){return this.root===null?0:this.root.size}has(e){return this.root===null?!1:Uw(this.cfg,e,this.root)!==void 0}[Symbol.iterator](){return Yw(e=>e,this.root)}entries(){return Yw(e=>[e,e],this.root)}keys(){return Yw(e=>e,this.root)}values(){return Yw(e=>e,this.root)}forEach(e){Zw((t,n)=>{e(n,n,this)},void 0,this.root)}foldl(e,t){return Zw((t,n)=>e(t,n),t,this.root)}foldr(e,t){return Qw((t,n,r)=>e(t,r),t,this.root)}toAscLazySeq(){let e=this.root;return X.ofIterator(()=>Yw(e=>e,e))}toDescLazySeq(){let e=this.root;return X.ofIterator(()=>Xw(e=>e,e))}add(t){let n=Kw(this.cfg,t,KT,this.root);return n===this.root?this:new e(this.cfg,n)}delete(t){let n=Kw(this.cfg,t,qT,this.root);return n===this.root?this:new e(this.cfg,n)}partition(t){let[n,r]=nT(t,this.root);return n===this.root?[this,new e(this.cfg,null)]:r===this.root?[new e(this.cfg,null),this]:[new e(this.cfg,n),new e(this.cfg,r)]}filter(t){let n=eT((e,n)=>t(n)?!0:void 0,!1,this.root);return n===this.root?this:new e(this.cfg,n)}split(t){let n=tT(this.cfg,t,this.root);return{below:new e(this.cfg,n.below),present:n.val!==void 0,above:new e(this.cfg,n.above)}}transform(e){return e(this)}lookupMin(){if(this.root!==null)return Ww(this.root)[0]}lookupMax(){if(this.root!==null)return Gw(this.root)[0]}deleteMin(){if(this.root===null)return this;let t=rT(this.root);return new e(this.cfg,t.rest)}deleteMax(){if(this.root===null)return this;let t=iT(this.root);return new e(this.cfg,t.rest)}minView(){if(this.root!==null){let t=rT(this.root);return{min:t.k,rest:new e(this.cfg,t.rest)}}}maxView(){if(this.root!==null){let t=iT(this.root);return{max:t.k,rest:new e(this.cfg,t.rest)}}}indexOf(e){return oT(this.cfg,e,this.root)}getByIndex(e){return sT(e,this.root)?.[0]}take(t){let n=cT(t,this.root);return n===this.root?this:new e(this.cfg,n)}drop(t){let n=lT(t,this.root);return n===this.root?this:new e(this.cfg,n)}deleteByIndex(t){let n=uT(t,qT,this.root);return n===this.root?this:new e(this.cfg,n)}union(t){let n=dT(this.cfg,KT,this.root,t.root);return n===this.root?this:new e(this.cfg,n)}static union(...t){let n=t.filter(e=>e.size>0);if(n.length===0)return e.empty();{let t=n[0].root;for(let e=1;e<n.length;e++){let r=n[e];t=dT(r.cfg,KT,t,r.root)}return t===n[0].root?n[0]:new e(n[0].cfg,t)}}intersection(t){let n=fT(this.cfg,KT,this.root,t.root);return n===this.root?this:new e(this.cfg,n)}static intersection(...t){if(t.length===0)return e.empty();{let n=t[0].root;for(let e=1;e<t.length;e++){let r=t[e];n=fT(r.cfg,KT,n,r.root)}return n===t[0].root?t[0]:new e(t[0].cfg,n)}}difference(t){let n=pT(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n)}symmetricDifference(t){let n=mT(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n)}isSubsetOf(e){return aT(this.cfg,this.root,e.root)}isSupersetOf(e){return aT(this.cfg,e.root,this.root)}isDisjointFrom(e){return Ste(this.cfg,this.root,e.root)}constructor(e,t){this.cfg=e,this.root=t}};Object.defineProperty(JT.prototype,`@@__IMMUTABLE_SET__@@`,{value:!0}),Object.defineProperty(JT.prototype,`@@__IMMUTABLE_ORDERED__@@`,{value:!0});function YT(){}var XT=class e{static empty(){return new e(Hw(),null)}static from(t,n){let r=Hw();return new e(r,xte(r,t,n))}static build(t,n,r){let i=Hw();return new e(i,Jw(i,t,n,r))}get size(){return this.root===null?0:this.root.size}get(e){return Uw(this.cfg,e,this.root)}has(e){return Uw(this.cfg,e,this.root)!==void 0}[Symbol.iterator](){return Yw((e,t)=>[e,t],this.root)}entries(){return Yw((e,t)=>[e,t],this.root)}keys(){return Yw(e=>e,this.root)}values(){return Yw((e,t)=>t,this.root)}forEach(e){Zw((t,n,r)=>{e(r,n,this)},void 0,this.root)}foldl(e,t){return Zw(e,t,this.root)}foldr(e,t){return Qw(e,t,this.root)}toAscLazySeq(){let e=this.root;return X.ofIterator(()=>Yw((e,t)=>[e,t],e))}keysToAscLazySeq(){let e=this.root;return X.ofIterator(()=>Yw(e=>e,e))}valuesToAscLazySeq(){let e=this.root;return X.ofIterator(()=>Yw((e,t)=>t,e))}toDescLazySeq(){let e=this.root;return X.ofIterator(()=>Xw((e,t)=>[e,t],e))}keysToDescLazySeq(){let e=this.root;return X.ofIterator(()=>Xw(e=>e,e))}valuesToDescLazySeq(){let e=this.root;return X.ofIterator(()=>Xw((e,t)=>t,e))}keySet(){return JT.ofKeys(this)}set(t,n){let r=Kw(this.cfg,t,()=>n,this.root);return r===this.root?this:new e(this.cfg,r)}alter(t,n){let r=Kw(this.cfg,t,n,this.root);return r===this.root?this:new e(this.cfg,r)}delete(t){let n=Kw(this.cfg,t,YT,this.root);return n===this.root?this:new e(this.cfg,n)}partition(t){let[n,r]=nT(t,this.root);return n===this.root?[this,new e(this.cfg,null)]:r===this.root?[new e(this.cfg,null),this]:[new e(this.cfg,n),new e(this.cfg,r)]}mapValues(t){let n=$w(t,this.root);return n===this.root?this:new e(this.cfg,n)}collectValues(t){let n=eT(t,!0,this.root);return n===this.root?this:new e(this.cfg,n)}filter(t){let n=eT((e,n)=>t(e,n)?e:void 0,!1,this.root);return n===this.root?this:new e(this.cfg,n)}split(t){let n=tT(this.cfg,t,this.root);return{below:new e(this.cfg,n.below),val:n.val,above:new e(this.cfg,n.above)}}transform(e){return e(this)}lookupMin(){if(this.root!==null)return Ww(this.root)}lookupMax(){if(this.root!==null)return Gw(this.root)}deleteMin(){if(this.root===null)return this;let t=rT(this.root);return new e(this.cfg,t.rest)}deleteMax(){if(this.root===null)return this;let t=iT(this.root);return new e(this.cfg,t.rest)}minView(){if(this.root!==null){let t=rT(this.root);return{minKey:t.k,minVal:t.v,rest:new e(this.cfg,t.rest)}}}maxView(){if(this.root!==null){let t=iT(this.root);return{maxKey:t.k,maxVal:t.v,rest:new e(this.cfg,t.rest)}}}indexOf(e){return oT(this.cfg,e,this.root)}getByIndex(e){return sT(e,this.root)}take(t){let n=cT(t,this.root);return n===this.root?this:new e(this.cfg,n)}drop(t){let n=lT(t,this.root);return n===this.root?this:new e(this.cfg,n)}setByIndex(t,n){let r=uT(t,()=>n,this.root);return r===this.root?this:new e(this.cfg,r)}deleteByIndex(t){let n=uT(t,YT,this.root);return n===this.root?this:new e(this.cfg,n)}alterByIndex(t,n){let r=uT(t,n,this.root);return r===this.root?this:new e(this.cfg,r)}union(t,n){let r=dT(this.cfg,n??((e,t)=>t),this.root,t.root);return r===this.root?this:new e(this.cfg,r)}static union(t,...n){let r=n.filter(e=>e.size>0);if(r.length===0)return e.empty();{let n=r[0].root;for(let e=1;e<r.length;e++){let i=r[e];n=dT(i.cfg,t,n,i.root)}return n===r[0].root?r[0]:new e(r[0].cfg,n)}}intersection(t,n){let r=fT(this.cfg,n??((e,t)=>t),this.root,t.root);return r===this.root?this:new e(this.cfg,r)}static intersection(t,...n){if(n.length===0)return e.empty();{let r=n[0].root;for(let e=1;e<n.length;e++){let i=n[e];r=fT(i.cfg,t,r,i.root)}return r===n[0].root?n[0]:new e(n[0].cfg,r)}}difference(t){let n=pT(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n)}symmetricDifference(t){let n=mT(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n)}withoutKeys(t){let n=t,r=pT(this.cfg,this.root,n.root);return r===this.root?this:new e(this.cfg,r)}adjust(t,n){let r=hT(this.cfg,n,this.root,t.root);return r===this.root?this:new e(this.cfg,r)}constructor(e,t){this.cfg=e,this.root=t}};Object.defineProperty(XT.prototype,`@@__IMMUTABLE_KEYED__@@`,{value:!0}),Object.defineProperty(XT.prototype,`@@__IMMUTABLE_ORDERED__@@`,{value:!0});var ZT=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},Ate=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},QT,X=class e{static of(t){return new e(t)}static ofIterator(t){return new e({[Symbol.iterator](){return t()}})}static ofObject(t){return e.ofIterator(function*(){for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(yield[e,t[e]])})}static ofRange(t,n,r){let i=r||1;return i>0?e.ofIterator(function*(){for(let e=t;e<n;e+=i)yield e}):e.ofIterator(function*(){for(let e=t;e>n;e+=i)yield e})}[(QT=new WeakMap,Symbol.iterator)](){return ZT(this,QT,`f`)[Symbol.iterator]()}aggregate(t,n,r){let i=new Map;for(let e of ZT(this,QT,`f`)){let a=t(e),o=i.get(a);o===void 0?i.set(a,n(e)):i.set(a,r(o,n(e)))}return e.of(i)}append(t){let n=ZT(this,QT,`f`);return e.ofIterator(function*(){yield*n,yield t})}chunk(t){let n=ZT(this,QT,`f`);return e.ofIterator(function*(){let e=[];for(let r of n)e.push(r),e.length===t&&(yield e,e=[]);e.length>0&&(yield e)})}concat(t){let n=ZT(this,QT,`f`);return e.ofIterator(function*(){yield*n,yield*t})}distinct(){let t=ZT(this,QT,`f`);return e.ofIterator(function*(){let e=new Set;for(let n of t)e.has(n)||(e.add(n),yield n)})}distinctBy(t,...n){n.unshift(t);let r=ZT(this,QT,`f`),i={hash:e=>xT(...n.map(t=>t(e))),compare:Iw(...n)};return e.ofIterator(function*(){let e=null,t=!1;function n(e){return t=e===void 0,!0}for(let a of r)e=MT(i,a,!0,n,e),t&&(yield a)})}distinctAndSortBy(t,...n){n.unshift(t);let r={compare:Iw(...n)},i=null;function a(e,t){return e===void 0?t:e}for(let e of ZT(this,QT,`f`))i=qw(r,e,e,a,i);return e.ofIterator(()=>Yw(e=>e,i))}drop(t){let n=ZT(this,QT,`f`);return e.ofIterator(function*(){let e=0;for(let r of n)e>=t?yield r:e+=1})}dropWhile(t){let n=ZT(this,QT,`f`);return e.ofIterator(function*(){let e=!0;for(let r of n)e?t(r)||(e=!1,yield r):yield r})}filter(t){let n=ZT(this,QT,`f`);return e.ofIterator(function*(){for(let e of n)t(e)&&(yield e)})}flatMap(t){let n=ZT(this,QT,`f`);return e.ofIterator(function*(){for(let e of n)yield*t(e)})}groupBy(t,...n){n.unshift(t);let r={hash:e=>xT(...n.map(t=>t(e))),compare:Iw(...n)},i=null;function a(e,t){return e===void 0?[t]:(e.push(t),e)}for(let e of ZT(this,QT,`f`))i=MT(r,e,e,a,i);return e.ofIterator(()=>LT((e,t)=>n.length===1?[n[0](e),t]:[n.map(t=>t(e)),t],i))}orderedGroupBy(t,...n){n.unshift(t);let r={compare:Iw(...n)},i=null;function a(e,t){return e===void 0?[t]:(e.push(t),e)}for(let e of ZT(this,QT,`f`))i=qw(r,e,e,a,i);return e.ofIterator(()=>Yw((e,t)=>n.length===1?[Fw(n[0],e),t]:[n.map(t=>Fw(t,e)),t],i))}map(t){let n=ZT(this,QT,`f`);return e.ofIterator(function*(){let e=0;for(let r of n)yield t(r,e),e+=1})}collect(t){let n=ZT(this,QT,`f`);return e.ofIterator(function*(){for(let e of n){let n=t(e);n!=null&&(yield n)}})}prepend(t){let n=ZT(this,QT,`f`);return e.ofIterator(function*(){yield t,yield*n})}prependAll(t){let n=ZT(this,QT,`f`);return e.ofIterator(function*(){yield*t,yield*n})}sortWith(t){return e.of(Array.from(ZT(this,QT,`f`)).sort(t))}sortBy(t,...n){return e.of(Array.from(ZT(this,QT,`f`)).sort(Iw(t,...n)))}tail(){let t=ZT(this,QT,`f`);return e.ofIterator(function*(){let e=!1;for(let n of t)e?yield n:e=!0})}take(t){let n=ZT(this,QT,`f`);return e.ofIterator(function*(){let e=0;for(let r of n){if(e>=t)return;yield r,e+=1}})}takeWhile(t){let n=ZT(this,QT,`f`);return e.ofIterator(function*(){for(let e of n)if(t(e))yield e;else return})}zip(t){let n=ZT(this,QT,`f`);return e.ofIterator(function*(){let e=n[Symbol.iterator](),r=t[Symbol.iterator]();for(;;){let t=e.next(),n=r.next();if(t.done||n.done)return;yield[t.value,n.value]}})}every(e){for(let t of ZT(this,QT,`f`))if(!e(t))return!1;return!0}some(e){for(let t of ZT(this,QT,`f`))if(e(t))return!0;return!1}isEmpty(){return ZT(this,QT,`f`)[Symbol.iterator]().next().done===!0}find(e){for(let t of ZT(this,QT,`f`))if(e(t))return t}head(){let e=ZT(this,QT,`f`)[Symbol.iterator]().next();if(!e.done)return e.value}length(){let e=0;for(let t of ZT(this,QT,`f`))e+=1;return e}maxBy(e,...t){let n=Iw(e,...t),r;for(let e of ZT(this,QT,`f`))(r===void 0||n(r,e)<=0)&&(r=e);return r}minBy(e,...t){let n=Iw(e,...t),r;for(let e of ZT(this,QT,`f`))(r===void 0||n(r,e)>=0)&&(r=e);return r}sumBy(e){let t=0;for(let n of ZT(this,QT,`f`))t+=e(n);return t}toRArray(){return Array.from(ZT(this,QT,`f`))}toMutableArray(){return Array.from(ZT(this,QT,`f`))}toSortedArray(e,...t){return Array.from(ZT(this,QT,`f`)).sort(Iw(e,...t))}toHashMap(e,t){return $T.from(this.map(e),t)}buildHashMap(e,t){return $T.build(ZT(this,QT,`f`),e,t)}toOrderedMap(e,t){return XT.from(this.map(e),t)}buildOrderedMap(e,t){return XT.build(ZT(this,QT,`f`),e,t)}toRMap(e,t){return this.toMutableMap(e,t)}toMutableMap(e,t){let n=new Map;for(let r of ZT(this,QT,`f`)){let[i,a]=e(r);if(t!==void 0){let e=n.get(i);e?n.set(i,t(e,a)):n.set(i,a)}else n.set(i,a)}return n}toObject(e,t){let n={};for(let r of ZT(this,QT,`f`)){let[i,a]=e(r);if(t!==void 0){let e=n[i];e?n[i]=t(e,a):n[i]=a}else n[i]=a}return n}toHashSet(e){return GT.build(ZT(this,QT,`f`),e)}toOrderedSet(e){return JT.build(ZT(this,QT,`f`),e)}toRSet(e){return this.toMutableSet(e)}toMutableSet(e){let t=new Set;for(let n of ZT(this,QT,`f`))t.add(e(n));return t}fold(e,t){let n=e;for(let e of ZT(this,QT,`f`))n=t(n,e);return n}reduce(e,t){if(t===void 0){let t=!0,n;for(let r of ZT(this,QT,`f`))t?(t=!1,n=r):n=e(n,r);if(t)throw Error(`Empty sequence`);return n}else return this.fold(t,e)}transform(e){return e(this)}toLookup(e,t){let n;return n=t===void 0?(e,t)=>e===void 0?[t]:(e.push(t),e):(e,n)=>e===void 0?[t(n)]:(e.push(t(n)),e),$T.build(ZT(this,QT,`f`),e,n)}toOrderedLookup(e,t){let n;return n=t===void 0?(e,t)=>e===void 0?[t]:(e.push(t),e):(e,n)=>e===void 0?[t(n)]:(e.push(t(n)),e),XT.build(ZT(this,QT,`f`),e,n)}toLookupMap(e,t,n,r){let i;return i=n===void 0?(e,n)=>(e??$T.empty()).set(t(n),n):r===void 0?(e,r)=>(e??$T.empty()).set(t(r),n(r)):(e,i)=>(e??$T.empty()).alter(t(i),e=>e===void 0?n(i):r(e,n(i))),$T.build(ZT(this,QT,`f`),e,i)}toLookupOrderedMap(e,t,n,r){let i;return i=n===void 0?(e,n)=>(e??XT.empty()).set(t(n),n):r===void 0?(e,r)=>(e??XT.empty()).set(t(r),n(r)):(e,i)=>(e??XT.empty()).alter(t(i),e=>e===void 0?n(i):r(e,n(i))),XT.build(ZT(this,QT,`f`),e,i)}toRLookup(e,t){let n=new Map;for(let r of ZT(this,QT,`f`)){let i=e(r),a=t===void 0?r:t(r),o=n.get(i);o===void 0?n.set(i,[a]):o.push(a)}return n}constructor(e){QT.set(this,void 0),Ate(this,QT,e,`f`)}},$T=class e{static empty(){return new e(ST(),null,0)}static from(t,n){let r=ST(),[i,a]=Ete(r,t,n);return new e(r,i,a)}static build(t,n,r){let i=ST(),[a,o]=Dte(i,t,n,r);return new e(i,a,o)}get(e){if(this.root!==null)return kT(this.cfg,e,this.root)}has(e){return this.get(e)!==void 0}[Symbol.iterator](){return LT((e,t)=>[e,t],this.root)}entries(){return LT((e,t)=>[e,t],this.root)}keys(){return LT(e=>e,this.root)}values(){return LT((e,t)=>t,this.root)}forEach(e){RT((t,n,r)=>{e(r,n,this)},void 0,this.root)}fold(e,t){return RT(e,t,this.root)}toLazySeq(){let e=this.root;return X.ofIterator(()=>LT((e,t)=>[e,t],e))}keysToLazySeq(){let e=this.root;return X.ofIterator(()=>LT(e=>e,e))}valuesToLazySeq(){let e=this.root;return X.ofIterator(()=>LT((e,t)=>t,e))}keySet(){return GT.ofKeys(this)}set(e,t){return this.modify(e,()=>t)}modify(t,n){let[r,i]=jT(this.cfg,t,n,this.root);return r===this.root?this:new e(this.cfg,r,this.size+(i?1:0))}delete(t){let n=IT(this.cfg,t,this.root);return n===this.root?this:new e(this.cfg,n,this.size-1)}alter(t,n){let[r,i]=Ote(this.cfg,t,n,this.root);return r===this.root?this:new e(this.cfg,r,this.size+i)}mapValues(t){let n=kte(t,this.root);return n===this.root?this:new e(this.cfg,n,this.size)}collectValues(t){let[n,r]=zT(t,!0,this.root);return n===this.root?this:new e(this.cfg,n,r)}filter(t){let[n,r]=zT((e,n)=>t(e,n)?e:void 0,!1,this.root);return n===this.root?this:new e(this.cfg,n,r)}transform(e){return e(this)}union(t,n){let[r,i]=BT(this.cfg,n??((e,t)=>t),this.root,t.root);return r===this.root?this:new e(this.cfg,r,this.size+t.size-i)}static union(t,...n){let r=n.filter(e=>e.size>0);if(r.length===0)return e.empty();{let n=r[0].root,i=r[0].size;for(let e=1;e<r.length;e++){let a=r[e],[o,s]=BT(a.cfg,t,n,a.root);n=o,i+=a.size-s}return n===r[0].root?r[0]:new e(r[0].cfg,n,i)}}append(t){return this.union(e.from(t))}intersection(t,n){let[r,i]=VT(this.cfg,n??((e,t)=>t),this.root,t.root);return r===this.root?this:new e(this.cfg,r,i)}static intersection(t,...n){if(n.length===0)return e.empty();{let r=n[0].root,i=0;for(let e=1;e<n.length;e++){let a=n[e],[o,s]=VT(a.cfg,t,r,a.root);r=o,i+=s}return r===n[0].root?n[0]:new e(n[0].cfg,r,i)}}difference(t){let[n,r]=HT(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n,this.size-r)}symmetricDifference(t){let[n,r]=UT(this.cfg,(e,t)=>e===void 0?t:void 0,this.root,t.root);return n===this.root?this:new e(this.cfg,n,this.size-r)}withoutKeys(t){let[n,r]=HT(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n,this.size-r)}adjust(t,n){let[r,i]=UT(this.cfg,n,this.root,t.root);return r===this.root?this:new e(this.cfg,r,this.size-i)}constructor(e,t,n){this.cfg=e,this.root=t,this.size=n}};Object.defineProperty($T.prototype,`@@__IMMUTABLE_KEYED__@@`,{value:!0});function eE(e){return`init`in e}function tE(e){return!!e.write}function nE(e){return`v`in e||`e`in e}function rE(e){if(`e`in e)throw e.e;return e.v}function iE(e){return typeof e?.then==`function`}function aE(e,t,n){if(!n.p.has(e)){n.p.add(e);let r=()=>n.p.delete(e);t.then(r,r)}}function oE(e,t,n){let r=new Set;for(let t of n.get(e)?.t||[])r.add(t);for(let e of t.p)r.add(e);return r}var jte=(e,t,...n)=>t.read(...n),sE=(e,t,...n)=>t.write(...n),cE=(e,t)=>t.INTERNAL_onInit?.call(t,e),lE=(e,t,n)=>t.onMount?.call(t,n),uE=(e,t)=>{var n;let r=EE(e),i=r[0],a=r[6],o=r[9],s=i.get(t);return s||(s={d:new Map,p:new Set,n:0},i.set(t,s),(n=a.i)==null||n.call(a,t),o?.(e,t)),s},dE=e=>{let t=EE(e),n=t[1],r=t[3],i=t[4],a=t[5],o=t[6],s=t[13],c=[],l=e=>{try{e()}catch(e){c.push(e)}};do{o.f&&l(o.f);let t=new Set,c=t.add.bind(t);r.forEach(e=>n.get(e)?.l.forEach(c)),r.clear(),a.forEach(c),a.clear(),i.forEach(c),i.clear(),t.forEach(l),r.size&&s(e)}while(r.size||a.size||i.size);if(c.length)throw AggregateError(c)},fE=e=>{let t=EE(e),n=t[1],r=t[2],i=t[3],a=t[11],o=t[14],s=t[17],c=[],l=new WeakSet,u=new WeakSet,d=Array.from(i);for(;d.length;){let t=d[d.length-1],i=a(e,t);if(u.has(t)){d.pop();continue}if(l.has(t)){r.get(t)===i.n&&c.push([t,i]),u.add(t),d.pop();continue}l.add(t);for(let e of oE(t,i,n))l.has(e)||d.push(e)}for(let t=c.length-1;t>=0;--t){let[n,a]=c[t],l=!1;for(let e of a.d.keys())if(e!==n&&i.has(e)){l=!0;break}l&&(r.set(n,a.n),o(e,n),s(e,n)),r.delete(n)}},pE=(e,t)=>{var n,r;let i=EE(e),a=i[1],o=i[2],s=i[3],c=i[6],l=i[7],u=i[11],d=i[12],f=i[13],p=i[14],m=i[16],h=i[17],g=i[20],_=i[26],v=i[28],y=u(e,t),b=v[0];if(nE(y)){if(a.has(t)&&o.get(t)!==y.n||y.m===b)return y.m=b,y;let n=!1;for(let[t,r]of y.d)if(p(e,t).n!==r){n=!0;break}if(!n)return y.m=b,y}let x=!0,S=new Set(y.d.keys()),C=new Map,w=()=>{for(let e of S)C.has(e)||y.d.delete(e)},T=()=>{if(a.has(t)){let n=!s.size;h(e,t),n&&(f(e),d(e))}},E=n=>{var r;if(n===t){let t=u(e,n);if(!nE(t))if(eE(n))g(e,n,n.init);else throw Error(`no atom init`);return rE(t)}let i=p(e,n);try{return rE(i)}finally{C.set(n,i.n),y.d.set(n,i.n),iE(y.v)&&aE(t,y.v,i),a.has(t)&&((r=a.get(n))==null||r.t.add(t)),x||T()}},D,O,k={get signal(){return D||=new AbortController,D.signal},get setSelf(){return!O&&tE(t)&&(O=(...n)=>{if(!x)try{return m(e,t,...n)}finally{f(e),d(e)}}),O}},ee=y.n,A=o.get(t)===ee;try{let r=l(e,t,E,k);if(g(e,t,r),iE(r)){_(e,r,()=>D?.abort());let t=()=>{w(),T()};r.then(t,t)}else w();return(n=c.r)==null||n.call(c,t),y.m=b,y}catch(e){return delete y.v,y.e=e,++y.n,y.m=b,y}finally{x=!1,y.n!==ee&&A&&(o.set(t,y.n),s.add(t),(r=c.c)==null||r.call(c,t))}},mE=(e,t)=>{let n=EE(e),r=n[1],i=n[2],a=n[11],o=[t];for(;o.length;){let t=o.pop(),n=a(e,t);for(let s of oE(t,n,r)){let t=a(e,s);i.get(s)!==t.n&&(i.set(s,t.n),o.push(s))}}},hE=(e,t,...n)=>{let r=EE(e),i=r[3],a=r[6],o=r[8],s=r[11],c=r[12],l=r[13],u=r[14],d=r[15],f=r[16],p=r[17],m=r[20],h=r[28],g=!0,_=t=>rE(u(e,t)),v=(n,...r)=>{var o;let u=s(e,n);try{if(n===t){if(!eE(n))throw Error(`atom not writable`);let t=u.n,s=r[0];m(e,n,s),p(e,n),t!==u.n&&(++h[0],i.add(n),d(e,n),(o=a.c)==null||o.call(a,n));return}else return f(e,n,...r)}finally{g||(l(e),c(e))}};try{return o(e,t,_,v,...n)}finally{g=!1}},gE=(e,t)=>{var n;let r=EE(e),i=r[1],a=r[3],o=r[6],s=r[11],c=r[15],l=r[18],u=r[19],d=s(e,t),f=i.get(t);if(f){for(let[r,i]of d.d)if(!f.d.has(r)){let u=s(e,r);l(e,r).t.add(t),f.d.add(r),i!==u.n&&(a.add(r),c(e,r),(n=o.c)==null||n.call(o,r))}for(let n of f.d)d.d.has(n)||(f.d.delete(n),u(e,n)?.t.delete(t))}},_E=(e,t)=>{var n;let r=EE(e),i=r[1],a=r[4],o=r[6],s=r[10],c=r[11],l=r[12],u=r[13],d=r[14],f=r[16],p=r[18],m=c(e,t),h=i.get(t);if(!h){d(e,t);for(let n of m.d.keys())p(e,n).t.add(t);h={l:new Set,d:new Set(m.d.keys()),t:new Set},i.set(t,h),tE(t)&&a.add(()=>{let n=!0,r=(...r)=>{try{return f(e,t,...r)}finally{n||(u(e),l(e))}};try{let i=s(e,t,r);i&&(h.u=()=>{n=!0;try{i()}finally{n=!1}})}finally{n=!1}}),(n=o.m)==null||n.call(o,t)}return h},vE=(e,t)=>{var n;let r=EE(e),i=r[1],a=r[5],o=r[6],s=r[11],c=r[19],l=s(e,t),u=i.get(t);if(!u||u.l.size)return u;let d=!1;for(let e of u.t)if(i.get(e)?.d.has(t)){d=!0;break}if(!d){u.u&&a.add(u.u),u=void 0,i.delete(t);for(let n of l.d.keys())c(e,n)?.t.delete(t);(n=o.u)==null||n.call(o,t);return}return u},yE=(e,t,n)=>{let r=EE(e),i=r[11],a=r[27],o=i(e,t),s=`v`in o,c=o.v;if(iE(n))for(let r of o.d.keys())aE(t,n,i(e,r));o.v=n,delete o.e,(!s||!Object.is(c,o.v))&&(++o.n,iE(c)&&a(e,c))},bE=(e,t)=>{let n=EE(e)[14];return rE(n(e,t))},xE=(e,t,...n)=>{let r=EE(e),i=r[3],a=r[12],o=r[13],s=r[16],c=i.size;try{return s(e,t,...n)}finally{i.size!==c&&(o(e),a(e))}},SE=(e,t,n)=>{let r=EE(e),i=r[12],a=r[18],o=r[19],s=a(e,t).l;return s.add(n),i(e),()=>{s.delete(n),o(e,t),i(e)}},CE=(e,t,n)=>{let r=EE(e)[25],i=r.get(t);if(!i){i=new Set,r.set(t,i);let e=()=>r.delete(t);t.then(e,e)}i.add(n)},wE=(e,t)=>{EE(e)[25].get(t)?.forEach(e=>e())},TE=new WeakMap,EE=e=>TE.get(e);function DE(e){let t=EE(e),n=t[24];return n?n(t):t}function OE(...e){let t={get(e){let n=EE(t)[21];return n(t,e)},set(e,...n){let r=EE(t)[22];return r(t,e,...n)},sub(e,n){let r=EE(t)[23];return r(t,e,n)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},jte,sE,cE,lE,uE,dE,fE,pE,mE,hE,gE,_E,vE,yE,bE,xE,SE,void 0,new WeakMap,CE,wE,[0]].map((t,n)=>e[n]||t);return TE.set(t,Object.freeze(n)),t}var kE=0;function Z(e,t){let n=`atom${++kE}`,r={toString(){return n}};return typeof e==`function`?r.read=e:(r.init=e,r.read=AE,r.write=jE),t&&(r.write=t),r}function AE(e){return e(this)}function jE(e,t,n){return t(this,typeof n==`function`?n(e(this)):n)}var ME;function NE(){return ME?ME():OE()}var PE;function FE(){return PE||=NE(),PE}var IE=(0,L.createContext)(void 0);function LE(e){let t=(0,L.useContext)(IE);return e?.store||t||FE()}function RE({children:e,store:t}){let n=(0,L.useRef)(null);return t?(0,L.createElement)(IE.Provider,{value:t},e):(n.current===null&&(n.current=NE()),(0,L.createElement)(IE.Provider,{value:n.current},e))}var zE=e=>typeof e?.then==`function`,BE=e=>{e.status||(e.status=`pending`,e.then(t=>{e.status=`fulfilled`,e.value=t},t=>{e.status=`rejected`,e.reason=t}))},VE=L.use||(e=>{if(e.status===`pending`)throw e;if(e.status===`fulfilled`)return e.value;throw e.status===`rejected`?e.reason:(BE(e),e)}),HE=new WeakMap,UE=(e,t,n)=>{let r=DE(e)[26],i=HE.get(t);return i||(i=new Promise((a,o)=>{let s=t,c=e=>t=>{s===e&&a(t)},l=e=>t=>{s===e&&o(t)},u=()=>{try{let t=n();zE(t)?(HE.set(t,i),s=t,t.then(c(t),l(t)),r(e,t,u)):a(t)}catch(e){o(e)}};t.then(c(t),l(t)),r(e,t,u)}),HE.set(t,i)),i};function Q(e,t){let{delay:n,unstable_promiseStatus:r=!L.use}=t||{},i=LE(t),[[a,o,s],c]=(0,L.useReducer)(t=>{let n=i.get(e);return Object.is(t[0],n)&&t[1]===i&&t[2]===e?t:[n,i,e]},void 0,()=>[i.get(e),i,e]),l=a;if((o!==i||s!==e)&&(c(),l=i.get(e)),(0,L.useEffect)(()=>{let t=i.sub(e,()=>{if(r)try{let t=i.get(e);zE(t)&&BE(UE(i,t,()=>i.get(e)))}catch{}if(typeof n==`number`){console.warn(`[DEPRECATED] delay option is deprecated and will be removed in v3.
|
|
200
|
+
|
|
201
|
+
Migration guide:
|
|
202
|
+
|
|
203
|
+
Create a custom hook like the following.
|
|
204
|
+
|
|
205
|
+
function useAtomValueWithDelay<Value>(
|
|
206
|
+
atom: Atom<Value>,
|
|
207
|
+
options: { delay: number },
|
|
208
|
+
): Value {
|
|
209
|
+
const { delay } = options
|
|
210
|
+
const store = useStore(options)
|
|
211
|
+
const [value, setValue] = useState(() => store.get(atom))
|
|
212
|
+
useEffect(() => {
|
|
213
|
+
const unsub = store.sub(atom, () => {
|
|
214
|
+
setTimeout(() => setValue(store.get(atom)), delay)
|
|
215
|
+
})
|
|
216
|
+
return unsub
|
|
217
|
+
}, [store, atom, delay])
|
|
218
|
+
return value
|
|
219
|
+
}
|
|
220
|
+
`),setTimeout(c,n);return}c()});return c(),t},[i,e,n,r]),(0,L.useDebugValue)(l),zE(l)){let t=UE(i,l,()=>i.get(e));return r&&BE(t),VE(t)}return l}function WE(e,t){let n=LE(t);return(0,L.useCallback)((...t)=>n.set(e,...t),[n,e])}function GE(e,t){return[Q(e,t),WE(e,t)]}function KE(e,t){let n=null,r=new Map,i=new Set;function a(i){let s;if(t===void 0)s=r.get(i);else for(let[e,n]of r)if(t(e,i)){s=n;break}if(s!==void 0)if(n?.(s[1],i))a.remove(i);else return s[0];let c=e(i);return r.set(i,[c,Date.now()]),o(`CREATE`,i,c),c}function o(e,t,n){for(let r of i)r({type:e,param:t,atom:n})}return a.unstable_listen=e=>(i.add(e),()=>{i.delete(e)}),a.getParams=()=>r.keys(),a.remove=e=>{if(t===void 0){if(!r.has(e))return;let[t]=r.get(e);r.delete(e),o(`REMOVE`,e,t)}else for(let[n,[i]]of r)if(t(n,e)){r.delete(n),o(`REMOVE`,n,i);break}},a.setShouldRemove=e=>{if(n=e,n)for(let[e,[t,i]]of r)n(i,e)&&(r.delete(e),o(`REMOVE`,e,t))},a}var qE=Z($T.empty()),JE=qE,YE=Z(GT.empty()),XE=YE,ZE=Z($T.empty()),QE=ZE;function $E(e,t){if(e.size===0)return t;let n={...t,jobs:{...t.jobs},stationUse:t.stationUse.filter(t=>!e.has(t.scheduleId))};for(let[r,i]of Object.entries(t.jobs))i.scheduleId&&e.has(i.scheduleId)&&delete n.jobs[r];return n}var eD=Z(null,(e,t,n)=>{t(qE,e=>e.union(X.ofObject(n.jobs).toHashMap(e=>e))),t(YE,e=>e.union(X.ofObject(n.jobs).collect(([,e])=>e.scheduleId).toHashSet(e=>e)))}),tD=Z(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.newJobs){let e=n.newJobs.scheduleId,a=X.of(n.newJobs.jobs);t(qE,e=>{if(i){let t=VC(r,-30);e=e.filter(e=>e.routeStartUTC>=t)}return e.union(a.toHashMap(e=>[e.unique,{...e,copiedToSystem:!0}]))}),e&&t(YE,t=>t.add(e))}}),nD=Z(null,(e,t,n)=>{t(ZE,X.ofObject(n.jobs).toHashMap(e=>e))}),rD=KE(e=>Z(t=>t(JE).get(e)?.comment??null,(t,n,r)=>{let i=r===null?``:r;n(qE,t=>{let n=t.get(e);return n===void 0?t:t.set(e,{...n,comment:i??void 0})})})),iD=class extends Error{};iD.prototype.name=`InvalidTokenError`;function aD(e){return decodeURIComponent(atob(e).replace(/(.)/g,(e,t)=>{let n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n=`0`+n),`%`+n}))}function oD(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`);switch(t.length%4){case 0:break;case 2:t+=`==`;break;case 3:t+=`=`;break;default:throw Error(`base64 string is not of the correct length`)}try{return aD(t)}catch{return atob(t)}}function sD(e,t){if(typeof e!=`string`)throw new iD(`Invalid token specified: must be a string`);t||={};let n=t.header===!0?0:1,r=e.split(`.`)[n];if(typeof r!=`string`)throw new iD(`Invalid token specified: missing part #${n+1}`);let i;try{i=oD(r)}catch(e){throw new iD(`Invalid token specified: invalid base64 for part #${n+1} (${e.message})`)}try{return JSON.parse(i)}catch(e){throw new iD(`Invalid token specified: invalid json for part #${n+1} (${e.message})`)}}var cD={debug:()=>void 0,info:()=>void 0,warn:()=>void 0,error:()=>void 0},lD,uD,dD=(e=>(e[e.NONE=0]=`NONE`,e[e.ERROR=1]=`ERROR`,e[e.WARN=2]=`WARN`,e[e.INFO=3]=`INFO`,e[e.DEBUG=4]=`DEBUG`,e))(dD||{});(e=>{function t(){lD=3,uD=cD}e.reset=t;function n(e){if(!(0<=e&&e<=4))throw Error(`Invalid log level`);lD=e}e.setLevel=n;function r(e){uD=e}e.setLogger=r})(dD||={});var fD=class e{constructor(e){this._name=e}debug(...t){lD>=4&&uD.debug(e._format(this._name,this._method),...t)}info(...t){lD>=3&&uD.info(e._format(this._name,this._method),...t)}warn(...t){lD>=2&&uD.warn(e._format(this._name,this._method),...t)}error(...t){lD>=1&&uD.error(e._format(this._name,this._method),...t)}throw(e){throw this.error(e),e}create(e){let t=Object.create(this);return t._method=e,t.debug(`begin`),t}static createStatic(t,n){let r=new e(`${t}.${n}`);return r.debug(`begin`),r}static _format(e,t){let n=`[${e}]`;return t?`${n} ${t}:`:n}static debug(t,...n){lD>=4&&uD.debug(e._format(t),...n)}static info(t,...n){lD>=3&&uD.info(e._format(t),...n)}static warn(t,...n){lD>=2&&uD.warn(e._format(t),...n)}static error(t,...n){lD>=1&&uD.error(e._format(t),...n)}};dD.reset();var pD=class{static decode(e){try{return sD(e)}catch(e){throw fD.error(`JwtUtils.decode`,e),e}}static async generateSignedJwt(e,t,n){let r=`${_D.encodeBase64Url(new TextEncoder().encode(JSON.stringify(e)))}.${_D.encodeBase64Url(new TextEncoder().encode(JSON.stringify(t)))}`,i=await window.crypto.subtle.sign({name:`ECDSA`,hash:{name:`SHA-256`}},n,new TextEncoder().encode(r));return`${r}.${_D.encodeBase64Url(new Uint8Array(i))}`}static async generateSignedJwtWithHmac(e,t,n){let r=`${_D.encodeBase64Url(new TextEncoder().encode(JSON.stringify(e)))}.${_D.encodeBase64Url(new TextEncoder().encode(JSON.stringify(t)))}`,i=await window.crypto.subtle.sign(`HMAC`,n,new TextEncoder().encode(r));return`${r}.${_D.encodeBase64Url(new Uint8Array(i))}`}},mD=`10000000-1000-4000-8000-100000000000`,hD=e=>btoa([...new Uint8Array(e)].map(e=>String.fromCharCode(e)).join(``)),gD=class e{static _randomWord(){let e=new Uint32Array(1);return crypto.getRandomValues(e),e[0]}static generateUUIDv4(){return mD.replace(/[018]/g,t=>(t^e._randomWord()&15>>t/4).toString(16)).replace(/-/g,``)}static generateCodeVerifier(){return e.generateUUIDv4()+e.generateUUIDv4()+e.generateUUIDv4()}static async generateCodeChallenge(e){if(!crypto.subtle)throw Error(`Crypto.subtle is available only in secure contexts (HTTPS).`);try{let t=new TextEncoder().encode(e);return hD(await crypto.subtle.digest(`SHA-256`,t)).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}catch(e){throw fD.error(`CryptoUtils.generateCodeChallenge`,e),e}}static generateBasicAuth(e,t){return hD(new TextEncoder().encode([e,t].join(`:`)))}static async hash(e,t){let n=new TextEncoder().encode(t),r=await crypto.subtle.digest(e,n);return new Uint8Array(r)}static async customCalculateJwkThumbprint(t){let n;switch(t.kty){case`RSA`:n={e:t.e,kty:t.kty,n:t.n};break;case`EC`:n={crv:t.crv,kty:t.kty,x:t.x,y:t.y};break;case`OKP`:n={crv:t.crv,kty:t.kty,x:t.x};break;case`oct`:n={crv:t.k,kty:t.kty};break;default:throw Error(`Unknown jwk type`)}let r=await e.hash(`SHA-256`,JSON.stringify(n));return e.encodeBase64Url(r)}static async generateDPoPProof({url:t,accessToken:n,httpMethod:r,keyPair:i,nonce:a}){let o,s,c={jti:window.crypto.randomUUID(),htm:r??`GET`,htu:t,iat:Math.floor(Date.now()/1e3)};n&&(o=await e.hash(`SHA-256`,n),s=e.encodeBase64Url(o),c.ath=s),a&&(c.nonce=a);try{let e=await crypto.subtle.exportKey(`jwk`,i.publicKey),t={alg:`ES256`,typ:`dpop+jwt`,jwk:{crv:e.crv,kty:e.kty,x:e.x,y:e.y}};return await pD.generateSignedJwt(t,c,i.privateKey)}catch(e){throw e instanceof TypeError?Error(`Error exporting dpop public key: ${e.message}`):e}}static async generateDPoPJkt(t){try{let n=await crypto.subtle.exportKey(`jwk`,t.publicKey);return await e.customCalculateJwkThumbprint(n)}catch(e){throw e instanceof TypeError?Error(`Could not retrieve dpop keys from storage: ${e.message}`):e}}static async generateDPoPKeys(){return await window.crypto.subtle.generateKey({name:`ECDSA`,namedCurve:`P-256`},!1,[`sign`,`verify`])}static async generateClientAssertionJwt(t,n,r,i=`HS256`){let a=Math.floor(Date.now()/1e3),o={alg:i,typ:`JWT`},s={iss:t,sub:t,aud:r,jti:e.generateUUIDv4(),exp:a+300,iat:a},c={HS256:`SHA-256`,HS384:`SHA-384`,HS512:`SHA-512`}[i];if(!c)throw Error(`Unsupported algorithm: ${i}. Supported algorithms are: HS256, HS384, HS512`);let l=new TextEncoder,u=await crypto.subtle.importKey(`raw`,l.encode(n),{name:`HMAC`,hash:c},!1,[`sign`]);return await pD.generateSignedJwtWithHmac(o,s,u)}};gD.encodeBase64Url=e=>hD(e).replace(/=/g,``).replace(/\+/g,`-`).replace(/\//g,`_`);var _D=gD,vD=class{constructor(e){this._name=e,this._callbacks=[],this._logger=new fD(`Event('${this._name}')`)}addHandler(e){return this._callbacks.push(e),()=>this.removeHandler(e)}removeHandler(e){let t=this._callbacks.lastIndexOf(e);t>=0&&this._callbacks.splice(t,1)}async raise(...e){this._logger.debug(`raise:`,...e);for(let t of this._callbacks)await t(...e)}},yD=class{static center({...e}){return e.width??=[800,720,600,480].find(e=>e<=window.outerWidth/1.618)??360,e.left??=Math.max(0,Math.round(window.screenX+(window.outerWidth-e.width)/2)),e.height!=null&&(e.top??=Math.max(0,Math.round(window.screenY+(window.outerHeight-e.height)/2))),e}static serialize(e){return Object.entries(e).filter(([,e])=>e!=null).map(([e,t])=>`${e}=${typeof t==`boolean`?t?`yes`:`no`:t}`).join(`,`)}},bD=class e extends vD{constructor(){super(...arguments),this._logger=new fD(`Timer('${this._name}')`),this._timerHandle=null,this._expiration=0,this._callback=()=>{let t=this._expiration-e.getEpochTime();this._logger.debug(`timer completes in`,t),this._expiration<=e.getEpochTime()&&(this.cancel(),super.raise())}}static getEpochTime(){return Math.floor(Date.now()/1e3)}init(t){let n=this._logger.create(`init`);t=Math.max(Math.floor(t),1);let r=e.getEpochTime()+t;if(this.expiration===r&&this._timerHandle){n.debug(`skipping since already initialized for expiration at`,this.expiration);return}this.cancel(),n.debug(`using duration`,t),this._expiration=r;let i=Math.min(t,5);this._timerHandle=setInterval(this._callback,i*1e3)}get expiration(){return this._expiration}cancel(){this._logger.create(`cancel`),this._timerHandle&&=(clearInterval(this._timerHandle),null)}},xD=class{static readParams(e,t=`query`){if(!e)throw TypeError(`Invalid URL`);let n=new URL(e,`http://127.0.0.1`)[t===`fragment`?`hash`:`search`];return new URLSearchParams(n.slice(1))}},SD=`;`,CD=class extends Error{constructor(e,t){if(super(e.error_description||e.error||``),this.form=t,this.name=`ErrorResponse`,!e.error)throw fD.error(`ErrorResponse`,`No error passed`),Error(`No error passed`);this.error=e.error,this.error_description=e.error_description??null,this.error_uri=e.error_uri??null,this.state=e.userState,this.session_state=e.session_state??null,this.url_state=e.url_state}},wD=class extends Error{constructor(e){super(e),this.name=`ErrorTimeout`}},TD=class{constructor(e){this._logger=new fD(`AccessTokenEvents`),this._expiringTimer=new bD(`Access token expiring`),this._expiredTimer=new bD(`Access token expired`),this._expiringNotificationTimeInSeconds=e.expiringNotificationTimeInSeconds}async load(e){let t=this._logger.create(`load`);if(e.access_token&&e.expires_in!==void 0){let n=e.expires_in;if(t.debug(`access token present, remaining duration:`,n),n>0){let e=n-this._expiringNotificationTimeInSeconds;e<=0&&(e=1),t.debug(`registering expiring timer, raising in`,e,`seconds`),this._expiringTimer.init(e)}else t.debug(`canceling existing expiring timer because we're past expiration.`),this._expiringTimer.cancel();let r=n+1;t.debug(`registering expired timer, raising in`,r,`seconds`),this._expiredTimer.init(r)}else this._expiringTimer.cancel(),this._expiredTimer.cancel()}async unload(){this._logger.debug(`unload: canceling existing access token timers`),this._expiringTimer.cancel(),this._expiredTimer.cancel()}addAccessTokenExpiring(e){return this._expiringTimer.addHandler(e)}removeAccessTokenExpiring(e){this._expiringTimer.removeHandler(e)}addAccessTokenExpired(e){return this._expiredTimer.addHandler(e)}removeAccessTokenExpired(e){this._expiredTimer.removeHandler(e)}},ED=class{constructor(e,t,n,r,i){this._callback=e,this._client_id=t,this._intervalInSeconds=r,this._stopOnError=i,this._logger=new fD(`CheckSessionIFrame`),this._timer=null,this._session_state=null,this._message=e=>{e.origin===this._frame_origin&&e.source===this._frame.contentWindow&&(e.data===`error`?(this._logger.error(`error message from check session op iframe`),this._stopOnError&&this.stop()):e.data===`changed`?(this._logger.debug(`changed message from check session op iframe`),this.stop(),this._callback()):this._logger.debug(e.data+` message from check session op iframe`))};let a=new URL(n);this._frame_origin=a.origin,this._frame=window.document.createElement(`iframe`),this._frame.style.visibility=`hidden`,this._frame.style.position=`fixed`,this._frame.style.left=`-1000px`,this._frame.style.top=`0`,this._frame.width=`0`,this._frame.height=`0`,this._frame.src=a.href}load(){return new Promise(e=>{this._frame.onload=()=>{e()},window.document.body.appendChild(this._frame),window.addEventListener(`message`,this._message,!1)})}start(e){if(this._session_state===e)return;this._logger.create(`start`),this.stop(),this._session_state=e;let t=()=>{!this._frame.contentWindow||!this._session_state||this._frame.contentWindow.postMessage(this._client_id+` `+this._session_state,this._frame_origin)};t(),this._timer=setInterval(t,this._intervalInSeconds*1e3)}stop(){this._logger.create(`stop`),this._session_state=null,this._timer&&=(clearInterval(this._timer),null)}},DD=class{constructor(){this._logger=new fD(`InMemoryWebStorage`),this._data={}}clear(){this._logger.create(`clear`),this._data={}}getItem(e){return this._logger.create(`getItem('${e}')`),this._data[e]}setItem(e,t){this._logger.create(`setItem('${e}')`),this._data[e]=t}removeItem(e){this._logger.create(`removeItem('${e}')`),delete this._data[e]}get length(){return Object.getOwnPropertyNames(this._data).length}key(e){return Object.getOwnPropertyNames(this._data)[e]}},OD=class extends Error{constructor(e,t){super(t),this.name=`ErrorDPoPNonce`,this.nonce=e}},kD=class{constructor(e=[],t=null,n={}){this._jwtHandler=t,this._extraHeaders=n,this._logger=new fD(`JsonService`),this._contentTypes=[],this._contentTypes.push(...e,`application/json`),t&&this._contentTypes.push(`application/jwt`)}async fetchWithTimeout(e,t={}){let{timeoutInSeconds:n,...r}=t;if(!n)return await fetch(e,r);let i=new AbortController,a=setTimeout(()=>i.abort(),n*1e3);try{return await fetch(e,{...t,signal:i.signal})}catch(e){throw e instanceof DOMException&&e.name===`AbortError`?new wD(`Network timed out`):e}finally{clearTimeout(a)}}async getJson(e,{token:t,credentials:n,timeoutInSeconds:r}={}){let i=this._logger.create(`getJson`),a={Accept:this._contentTypes.join(`, `)};t&&(i.debug(`token passed, setting Authorization header`),a.Authorization=`Bearer `+t),this._appendExtraHeaders(a);let o;try{i.debug(`url:`,e),o=await this.fetchWithTimeout(e,{method:`GET`,headers:a,timeoutInSeconds:r,credentials:n})}catch(e){throw i.error(`Network Error`),e}i.debug(`HTTP response received, status`,o.status);let s=o.headers.get(`Content-Type`);if(s&&!this._contentTypes.find(e=>s.startsWith(e))&&i.throw(Error(`Invalid response Content-Type: ${s??`undefined`}, from URL: ${e}`)),o.ok&&this._jwtHandler&&s?.startsWith(`application/jwt`))return await this._jwtHandler(await o.text());let c;try{c=await o.json()}catch(e){throw i.error(`Error parsing JSON response`,e),o.ok?e:Error(`${o.statusText} (${o.status})`)}if(!o.ok)throw i.error(`Error from server:`,c),c.error?new CD(c):Error(`${o.statusText} (${o.status}): ${JSON.stringify(c)}`);return c}async postForm(e,{body:t,basicAuth:n,timeoutInSeconds:r,initCredentials:i,extraHeaders:a}){let o=this._logger.create(`postForm`),s={Accept:this._contentTypes.join(`, `),"Content-Type":`application/x-www-form-urlencoded`,...a};n!==void 0&&(s.Authorization=`Basic `+n),this._appendExtraHeaders(s);let c;try{o.debug(`url:`,e),c=await this.fetchWithTimeout(e,{method:`POST`,headers:s,body:t,timeoutInSeconds:r,credentials:i})}catch(e){throw o.error(`Network error`),e}o.debug(`HTTP response received, status`,c.status);let l=c.headers.get(`Content-Type`);if(l&&!this._contentTypes.find(e=>l.startsWith(e)))throw Error(`Invalid response Content-Type: ${l??`undefined`}, from URL: ${e}`);let u=await c.text(),d={};if(u)try{d=JSON.parse(u)}catch(e){throw o.error(`Error parsing JSON response`,e),c.ok?e:Error(`${c.statusText} (${c.status})`)}if(!c.ok)throw o.error(`Error from server:`,d),c.headers.has(`dpop-nonce`)?new OD(c.headers.get(`dpop-nonce`),`${JSON.stringify(d)}`):d.error?new CD(d,t):Error(`${c.statusText} (${c.status}): ${JSON.stringify(d)}`);return d}_appendExtraHeaders(e){let t=this._logger.create(`appendExtraHeaders`),n=Object.keys(this._extraHeaders),r=[`accept`,`content-type`],i=[`authorization`];n.length!==0&&n.forEach(n=>{if(r.includes(n.toLocaleLowerCase())){t.warn(`Protected header could not be set`,n,r);return}if(i.includes(n.toLocaleLowerCase())&&Object.keys(e).includes(n)){t.warn(`Header could not be overridden`,n,i);return}let a=typeof this._extraHeaders[n]==`function`?this._extraHeaders[n]():this._extraHeaders[n];a&&a!==``&&(e[n]=a)})}},AD=class{constructor(e){this._settings=e,this._logger=new fD(`MetadataService`),this._signingKeys=null,this._metadata=null,this._metadataUrl=this._settings.metadataUrl,this._jsonService=new kD([`application/jwk-set+json`],null,this._settings.extraHeaders),this._settings.signingKeys&&(this._logger.debug(`using signingKeys from settings`),this._signingKeys=this._settings.signingKeys),this._settings.metadata&&(this._logger.debug(`using metadata from settings`),this._metadata=this._settings.metadata),this._settings.fetchRequestCredentials&&(this._logger.debug(`using fetchRequestCredentials from settings`),this._fetchRequestCredentials=this._settings.fetchRequestCredentials)}resetSigningKeys(){this._signingKeys=null}async getMetadata(){let e=this._logger.create(`getMetadata`);if(this._metadata)return e.debug(`using cached values`),this._metadata;if(!this._metadataUrl)throw e.throw(Error(`No authority or metadataUrl configured on settings`)),null;e.debug(`getting metadata from`,this._metadataUrl);let t=await this._jsonService.getJson(this._metadataUrl,{credentials:this._fetchRequestCredentials,timeoutInSeconds:this._settings.requestTimeoutInSeconds});return e.debug(`merging remote JSON with seed metadata`),this._metadata=Object.assign({},t,this._settings.metadataSeed),this._metadata}getIssuer(){return this._getMetadataProperty(`issuer`)}getAuthorizationEndpoint(){return this._getMetadataProperty(`authorization_endpoint`)}getUserInfoEndpoint(){return this._getMetadataProperty(`userinfo_endpoint`)}getTokenEndpoint(e=!0){return this._getMetadataProperty(`token_endpoint`,e)}getCheckSessionIframe(){return this._getMetadataProperty(`check_session_iframe`,!0)}getEndSessionEndpoint(){return this._getMetadataProperty(`end_session_endpoint`,!0)}getRevocationEndpoint(e=!0){return this._getMetadataProperty(`revocation_endpoint`,e)}getKeysEndpoint(e=!0){return this._getMetadataProperty(`jwks_uri`,e)}async _getMetadataProperty(e,t=!1){let n=this._logger.create(`_getMetadataProperty('${e}')`),r=await this.getMetadata();if(n.debug(`resolved`),r[e]===void 0){if(t===!0){n.warn(`Metadata does not contain optional property`);return}n.throw(Error(`Metadata does not contain property `+e))}return r[e]}async getSigningKeys(){let e=this._logger.create(`getSigningKeys`);if(this._signingKeys)return e.debug(`returning signingKeys from cache`),this._signingKeys;let t=await this.getKeysEndpoint(!1);e.debug(`got jwks_uri`,t);let n=await this._jsonService.getJson(t,{timeoutInSeconds:this._settings.requestTimeoutInSeconds});if(e.debug(`got key set`,n),!Array.isArray(n.keys))throw e.throw(Error(`Missing keys on keyset`)),null;return this._signingKeys=n.keys,this._signingKeys}},jD=class{constructor({prefix:e=`oidc.`,store:t=localStorage}={}){this._logger=new fD(`WebStorageStateStore`),this._store=t,this._prefix=e}async set(e,t){this._logger.create(`set('${e}')`),e=this._prefix+e,await this._store.setItem(e,t)}async get(e){return this._logger.create(`get('${e}')`),e=this._prefix+e,await this._store.getItem(e)}async remove(e){this._logger.create(`remove('${e}')`),e=this._prefix+e;let t=await this._store.getItem(e);return await this._store.removeItem(e),t}async getAllKeys(){this._logger.create(`getAllKeys`);let e=await this._store.length,t=[];for(let n=0;n<e;n++){let e=await this._store.key(n);e&&e.indexOf(this._prefix)===0&&t.push(e.substr(this._prefix.length))}return t}},MD=`code`,ND=`openid`,PD=`client_secret_post`,FD=900,ID=class{constructor({authority:e,metadataUrl:t,metadata:n,signingKeys:r,metadataSeed:i,client_id:a,client_secret:o,response_type:s=MD,scope:c=ND,redirect_uri:l,post_logout_redirect_uri:u,client_authentication:d=PD,token_endpoint_auth_signing_alg:f=`HS256`,prompt:p,display:m,max_age:h,ui_locales:g,acr_values:_,resource:v,response_mode:y,filterProtocolClaims:b=!0,loadUserInfo:x=!1,requestTimeoutInSeconds:S,staleStateAgeInSeconds:C=FD,mergeClaimsStrategy:w={array:`replace`},disablePKCE:T=!1,stateStore:E,revokeTokenAdditionalContentTypes:D,fetchRequestCredentials:O,refreshTokenAllowedScope:k,extraQueryParams:ee={},extraTokenParams:A={},extraHeaders:j={},dpop:te,omitScopeWhenRequesting:M=!1}){if(this.authority=e,t?this.metadataUrl=t:(this.metadataUrl=e,e&&(this.metadataUrl.endsWith(`/`)||(this.metadataUrl+=`/`),this.metadataUrl+=`.well-known/openid-configuration`)),this.metadata=n,this.metadataSeed=i,this.signingKeys=r,this.client_id=a,this.client_secret=o,this.response_type=s,this.scope=c,this.redirect_uri=l,this.post_logout_redirect_uri=u,this.client_authentication=d,this.token_endpoint_auth_signing_alg=f,this.prompt=p,this.display=m,this.max_age=h,this.ui_locales=g,this.acr_values=_,this.resource=v,this.response_mode=y,this.filterProtocolClaims=b??!0,this.loadUserInfo=!!x,this.staleStateAgeInSeconds=C,this.mergeClaimsStrategy=w,this.omitScopeWhenRequesting=M,this.disablePKCE=!!T,this.revokeTokenAdditionalContentTypes=D,this.fetchRequestCredentials=O||`same-origin`,this.requestTimeoutInSeconds=S,E?this.stateStore=E:this.stateStore=new jD({store:typeof window<`u`?window.localStorage:new DD}),this.refreshTokenAllowedScope=k,this.extraQueryParams=ee,this.extraTokenParams=A,this.extraHeaders=j,this.dpop=te,this.dpop&&!this.dpop?.store)throw Error(`A DPoPStore is required when dpop is enabled`)}},LD=class{constructor(e,t){this._settings=e,this._metadataService=t,this._logger=new fD(`UserInfoService`),this._getClaimsFromJwt=async e=>{let t=this._logger.create(`_getClaimsFromJwt`);try{let n=pD.decode(e);return t.debug(`JWT decoding successful`),n}catch(e){throw t.error(`Error parsing JWT response`),e}},this._jsonService=new kD(void 0,this._getClaimsFromJwt,this._settings.extraHeaders)}async getClaims(e){let t=this._logger.create(`getClaims`);e||this._logger.throw(Error(`No token passed`));let n=await this._metadataService.getUserInfoEndpoint();t.debug(`got userinfo url`,n);let r=await this._jsonService.getJson(n,{token:e,credentials:this._settings.fetchRequestCredentials,timeoutInSeconds:this._settings.requestTimeoutInSeconds});return t.debug(`got claims`,r),r}},RD=class{constructor(e,t){this._settings=e,this._metadataService=t,this._logger=new fD(`TokenClient`),this._jsonService=new kD(this._settings.revokeTokenAdditionalContentTypes,null,this._settings.extraHeaders)}async exchangeCode({grant_type:e=`authorization_code`,redirect_uri:t=this._settings.redirect_uri,client_id:n=this._settings.client_id,client_secret:r=this._settings.client_secret,extraHeaders:i,...a}){let o=this._logger.create(`exchangeCode`);n||o.throw(Error(`A client_id is required`)),t||o.throw(Error(`A redirect_uri is required`)),a.code||o.throw(Error(`A code is required`));let s=new URLSearchParams({grant_type:e,redirect_uri:t});for(let[e,t]of Object.entries(a))t!=null&&s.set(e,t);if((this._settings.client_authentication===`client_secret_basic`||this._settings.client_authentication===`client_secret_jwt`)&&r==null)throw o.throw(Error(`A client_secret is required`)),null;let c,l=await this._metadataService.getTokenEndpoint(!1);switch(this._settings.client_authentication){case`client_secret_basic`:c=_D.generateBasicAuth(n,r);break;case`client_secret_post`:s.append(`client_id`,n),r&&s.append(`client_secret`,r);break;case`client_secret_jwt`:{let e=await _D.generateClientAssertionJwt(n,r,l,this._settings.token_endpoint_auth_signing_alg);s.append(`client_id`,n),s.append(`client_assertion_type`,`urn:ietf:params:oauth:client-assertion-type:jwt-bearer`),s.append(`client_assertion`,e);break}}o.debug(`got token endpoint`);let u=await this._jsonService.postForm(l,{body:s,basicAuth:c,timeoutInSeconds:this._settings.requestTimeoutInSeconds,initCredentials:this._settings.fetchRequestCredentials,extraHeaders:i});return o.debug(`got response`),u}async exchangeCredentials({grant_type:e=`password`,client_id:t=this._settings.client_id,client_secret:n=this._settings.client_secret,scope:r=this._settings.scope,...i}){let a=this._logger.create(`exchangeCredentials`);t||a.throw(Error(`A client_id is required`));let o=new URLSearchParams({grant_type:e});this._settings.omitScopeWhenRequesting||o.set(`scope`,r);for(let[e,t]of Object.entries(i))t!=null&&o.set(e,t);if((this._settings.client_authentication===`client_secret_basic`||this._settings.client_authentication===`client_secret_jwt`)&&n==null)throw a.throw(Error(`A client_secret is required`)),null;let s,c=await this._metadataService.getTokenEndpoint(!1);switch(this._settings.client_authentication){case`client_secret_basic`:s=_D.generateBasicAuth(t,n);break;case`client_secret_post`:o.append(`client_id`,t),n&&o.append(`client_secret`,n);break;case`client_secret_jwt`:{let e=await _D.generateClientAssertionJwt(t,n,c,this._settings.token_endpoint_auth_signing_alg);o.append(`client_id`,t),o.append(`client_assertion_type`,`urn:ietf:params:oauth:client-assertion-type:jwt-bearer`),o.append(`client_assertion`,e);break}}a.debug(`got token endpoint`);let l=await this._jsonService.postForm(c,{body:o,basicAuth:s,timeoutInSeconds:this._settings.requestTimeoutInSeconds,initCredentials:this._settings.fetchRequestCredentials});return a.debug(`got response`),l}async exchangeRefreshToken({grant_type:e=`refresh_token`,client_id:t=this._settings.client_id,client_secret:n=this._settings.client_secret,timeoutInSeconds:r,extraHeaders:i,...a}){let o=this._logger.create(`exchangeRefreshToken`);t||o.throw(Error(`A client_id is required`)),a.refresh_token||o.throw(Error(`A refresh_token is required`));let s=new URLSearchParams({grant_type:e});for(let[e,t]of Object.entries(a))Array.isArray(t)?t.forEach(t=>s.append(e,t)):t!=null&&s.set(e,t);if((this._settings.client_authentication===`client_secret_basic`||this._settings.client_authentication===`client_secret_jwt`)&&n==null)throw o.throw(Error(`A client_secret is required`)),null;let c,l=await this._metadataService.getTokenEndpoint(!1);switch(this._settings.client_authentication){case`client_secret_basic`:c=_D.generateBasicAuth(t,n);break;case`client_secret_post`:s.append(`client_id`,t),n&&s.append(`client_secret`,n);break;case`client_secret_jwt`:{let e=await _D.generateClientAssertionJwt(t,n,l,this._settings.token_endpoint_auth_signing_alg);s.append(`client_id`,t),s.append(`client_assertion_type`,`urn:ietf:params:oauth:client-assertion-type:jwt-bearer`),s.append(`client_assertion`,e);break}}o.debug(`got token endpoint`);let u=await this._jsonService.postForm(l,{body:s,basicAuth:c,timeoutInSeconds:r,initCredentials:this._settings.fetchRequestCredentials,extraHeaders:i});return o.debug(`got response`),u}async revoke(e){let t=this._logger.create(`revoke`);e.token||t.throw(Error(`A token is required`));let n=await this._metadataService.getRevocationEndpoint(!1);t.debug(`got revocation endpoint, revoking ${e.token_type_hint??`default token type`}`);let r=new URLSearchParams;for(let[t,n]of Object.entries(e))n!=null&&r.set(t,n);r.set(`client_id`,this._settings.client_id),this._settings.client_secret&&r.set(`client_secret`,this._settings.client_secret),await this._jsonService.postForm(n,{body:r,timeoutInSeconds:this._settings.requestTimeoutInSeconds}),t.debug(`got response`)}},zD=class{constructor(e,t,n){this._settings=e,this._metadataService=t,this._claimsService=n,this._logger=new fD(`ResponseValidator`),this._userInfoService=new LD(this._settings,this._metadataService),this._tokenClient=new RD(this._settings,this._metadataService)}async validateSigninResponse(e,t,n){let r=this._logger.create(`validateSigninResponse`);this._processSigninState(e,t),r.debug(`state processed`),await this._processCode(e,t,n),r.debug(`code processed`),e.isOpenId&&this._validateIdTokenAttributes(e,``,t.nonce),r.debug(`tokens validated`),await this._processClaims(e,t?.skipUserInfo,e.isOpenId),r.debug(`claims processed`)}async validateCredentialsResponse(e,t){let n=this._logger.create(`validateCredentialsResponse`),r=e.isOpenId&&!!e.id_token;r&&this._validateIdTokenAttributes(e),n.debug(`tokens validated`),await this._processClaims(e,t,r),n.debug(`claims processed`)}async validateRefreshResponse(e,t){let n=this._logger.create(`validateRefreshResponse`);e.userState=t.data,e.session_state??=t.session_state,e.scope??=t.scope,e.isOpenId&&e.id_token&&(this._validateIdTokenAttributes(e,t.id_token),n.debug(`ID Token validated`)),e.id_token||(e.id_token=t.id_token,e.profile=t.profile);let r=e.isOpenId&&!!e.id_token;await this._processClaims(e,!1,r),n.debug(`claims processed`)}validateSignoutResponse(e,t){let n=this._logger.create(`validateSignoutResponse`);if(t.id!==e.state&&n.throw(Error(`State does not match`)),n.debug(`state validated`),e.userState=t.data,e.error)throw n.warn(`Response was error`,e.error),new CD(e)}_processSigninState(e,t){let n=this._logger.create(`_processSigninState`);if(t.id!==e.state&&n.throw(Error(`State does not match`)),t.client_id||n.throw(Error(`No client_id on state`)),t.authority||n.throw(Error(`No authority on state`)),this._settings.authority!==t.authority&&n.throw(Error(`authority mismatch on settings vs. signin state`)),this._settings.client_id&&this._settings.client_id!==t.client_id&&n.throw(Error(`client_id mismatch on settings vs. signin state`)),n.debug(`state validated`),e.userState=t.data,e.url_state=t.url_state,e.scope??=t.scope,e.error)throw n.warn(`Response was error`,e.error),new CD(e);t.code_verifier&&!e.code&&n.throw(Error(`Expected code in response`))}async _processClaims(e,t=!1,n=!0){let r=this._logger.create(`_processClaims`);if(e.profile=this._claimsService.filterProtocolClaims(e.profile),t||!this._settings.loadUserInfo||!e.access_token){r.debug(`not loading user info`);return}r.debug(`loading user info`);let i=await this._userInfoService.getClaims(e.access_token);r.debug(`user info claims received from user info endpoint`),n&&i.sub!==e.profile.sub&&r.throw(Error(`subject from UserInfo response does not match subject in ID Token`)),e.profile=this._claimsService.mergeClaims(e.profile,this._claimsService.filterProtocolClaims(i)),r.debug(`user info claims received, updated profile:`,e.profile)}async _processCode(e,t,n){let r=this._logger.create(`_processCode`);if(e.code){r.debug(`Validating code`);let i=await this._tokenClient.exchangeCode({client_id:t.client_id,client_secret:t.client_secret,code:e.code,redirect_uri:t.redirect_uri,code_verifier:t.code_verifier,extraHeaders:n,...t.extraTokenParams});Object.assign(e,i)}else r.debug(`No code to process`)}_validateIdTokenAttributes(e,t,n){let r=this._logger.create(`_validateIdTokenAttributes`);r.debug(`decoding ID Token JWT`);let i=pD.decode(e.id_token??``);if(i.sub||r.throw(Error(`ID Token is missing a subject claim`)),n&&i.nonce!==n&&r.throw(Error(`nonce in id_token does not match nonce in client storage`)),t){let e=pD.decode(t);i.sub!==e.sub&&r.throw(Error(`sub in id_token does not match current sub`)),i.auth_time&&i.auth_time!==e.auth_time&&r.throw(Error(`auth_time in id_token does not match original auth_time`)),i.azp&&i.azp!==e.azp&&r.throw(Error(`azp in id_token does not match original azp`)),!i.azp&&e.azp&&r.throw(Error(`azp not in id_token, but present in original id_token`))}e.profile=i}},BD=class e{constructor(e){this.id=e.id||_D.generateUUIDv4(),this.data=e.data,e.created&&e.created>0?this.created=e.created:this.created=bD.getEpochTime(),this.request_type=e.request_type,this.url_state=e.url_state}toStorageString(){return new fD(`State`).create(`toStorageString`),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,url_state:this.url_state})}static fromStorageString(t){return fD.createStatic(`State`,`fromStorageString`),Promise.resolve(new e(JSON.parse(t)))}static async clearStaleState(t,n){let r=fD.createStatic(`State`,`clearStaleState`),i=bD.getEpochTime()-n,a=await t.getAllKeys();r.debug(`got keys`,a);for(let n=0;n<a.length;n++){let o=a[n],s=await t.get(o),c=!1;if(s)try{let t=await e.fromStorageString(s);r.debug(`got item from key:`,o,t.created),t.created<=i&&(c=!0)}catch(e){r.error(`Error parsing state for key:`,o,e),c=!0}else r.debug(`no item in storage for key:`,o),c=!0;c&&(r.debug(`removed item for key:`,o),t.remove(o))}}},VD=class e extends BD{constructor(e){super(e),this.code_verifier=e.code_verifier,this.code_challenge=e.code_challenge,this.authority=e.authority,this.client_id=e.client_id,this.redirect_uri=e.redirect_uri,this.scope=e.scope,this.client_secret=e.client_secret,this.extraTokenParams=e.extraTokenParams,this.response_mode=e.response_mode,this.skipUserInfo=e.skipUserInfo,this.nonce=e.nonce}static async create(t){let n=t.code_verifier===!0?_D.generateCodeVerifier():t.code_verifier||void 0,r=n?await _D.generateCodeChallenge(n):void 0;return new e({...t,code_verifier:n,code_challenge:r})}toStorageString(){return new fD(`SigninState`).create(`toStorageString`),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,url_state:this.url_state,code_verifier:this.code_verifier,authority:this.authority,client_id:this.client_id,redirect_uri:this.redirect_uri,scope:this.scope,client_secret:this.client_secret,extraTokenParams:this.extraTokenParams,response_mode:this.response_mode,skipUserInfo:this.skipUserInfo,nonce:this.nonce})}static fromStorageString(t){fD.createStatic(`SigninState`,`fromStorageString`);let n=JSON.parse(t);return e.create(n)}},HD=class e{constructor(e){this.url=e.url,this.state=e.state}static async create({url:t,authority:n,client_id:r,redirect_uri:i,response_type:a,scope:o,state_data:s,response_mode:c,request_type:l,client_secret:u,nonce:d,url_state:f,resource:p,skipUserInfo:m,extraQueryParams:h,extraTokenParams:g,disablePKCE:_,dpopJkt:v,omitScopeWhenRequesting:y,...b}){if(!t)throw this._logger.error(`create: No url passed`),Error(`url`);if(!r)throw this._logger.error(`create: No client_id passed`),Error(`client_id`);if(!i)throw this._logger.error(`create: No redirect_uri passed`),Error(`redirect_uri`);if(!a)throw this._logger.error(`create: No response_type passed`),Error(`response_type`);if(!o)throw this._logger.error(`create: No scope passed`),Error(`scope`);if(!n)throw this._logger.error(`create: No authority passed`),Error(`authority`);let x=await VD.create({data:s,request_type:l,url_state:f,code_verifier:!_,client_id:r,authority:n,redirect_uri:i,response_mode:c,client_secret:u,scope:o,extraTokenParams:g,skipUserInfo:m,nonce:d}),S=new URL(t);S.searchParams.append(`client_id`,r),S.searchParams.append(`redirect_uri`,i),S.searchParams.append(`response_type`,a),y||S.searchParams.append(`scope`,o),d&&S.searchParams.append(`nonce`,d),v&&S.searchParams.append(`dpop_jkt`,v);let C=x.id;f&&(C=`${C}${SD}${f}`),S.searchParams.append(`state`,C),x.code_challenge&&(S.searchParams.append(`code_challenge`,x.code_challenge),S.searchParams.append(`code_challenge_method`,`S256`)),p&&(Array.isArray(p)?p:[p]).forEach(e=>S.searchParams.append(`resource`,e));for(let[e,t]of Object.entries({response_mode:c,...b,...h}))t!=null&&S.searchParams.append(e,t.toString());return new e({url:S.href,state:x})}};HD._logger=new fD(`SigninRequest`);var UD=HD,WD=`openid`,GD=class{constructor(e){if(this.access_token=``,this.token_type=``,this.profile={},this.state=e.get(`state`),this.session_state=e.get(`session_state`),this.state){let e=decodeURIComponent(this.state).split(SD);this.state=e[0],e.length>1&&(this.url_state=e.slice(1).join(SD))}this.error=e.get(`error`),this.error_description=e.get(`error_description`),this.error_uri=e.get(`error_uri`),this.code=e.get(`code`)}get expires_in(){if(this.expires_at!==void 0)return this.expires_at-bD.getEpochTime()}set expires_in(e){typeof e==`string`&&(e=Number(e)),e!==void 0&&e>=0&&(this.expires_at=Math.floor(e)+bD.getEpochTime())}get isOpenId(){return this.scope?.split(` `).includes(WD)||!!this.id_token}},KD=class{constructor({url:e,state_data:t,id_token_hint:n,post_logout_redirect_uri:r,extraQueryParams:i,request_type:a,client_id:o,url_state:s}){if(this._logger=new fD(`SignoutRequest`),!e)throw this._logger.error(`ctor: No url passed`),Error(`url`);let c=new URL(e);if(n&&c.searchParams.append(`id_token_hint`,n),o&&c.searchParams.append(`client_id`,o),r&&(c.searchParams.append(`post_logout_redirect_uri`,r),t||s)){this.state=new BD({data:t,request_type:a,url_state:s});let e=this.state.id;s&&(e=`${e}${SD}${s}`),c.searchParams.append(`state`,e)}for(let[e,t]of Object.entries({...i}))t!=null&&c.searchParams.append(e,t.toString());this.url=c.href}},qD=class{constructor(e){if(this.state=e.get(`state`),this.state){let e=decodeURIComponent(this.state).split(SD);this.state=e[0],e.length>1&&(this.url_state=e.slice(1).join(SD))}this.error=e.get(`error`),this.error_description=e.get(`error_description`),this.error_uri=e.get(`error_uri`)}},JD=[`nbf`,`jti`,`auth_time`,`nonce`,`acr`,`amr`,`azp`,`at_hash`],YD=[`sub`,`iss`,`aud`,`exp`,`iat`],XD=class{constructor(e){this._settings=e,this._logger=new fD(`ClaimsService`)}filterProtocolClaims(e){let t={...e};if(this._settings.filterProtocolClaims){let e;e=Array.isArray(this._settings.filterProtocolClaims)?this._settings.filterProtocolClaims:JD;for(let n of e)YD.includes(n)||delete t[n]}return t}mergeClaims(e,t){let n={...e};for(let[e,r]of Object.entries(t))if(n[e]!==r)if(Array.isArray(n[e])||Array.isArray(r))if(this._settings.mergeClaimsStrategy.array==`replace`)n[e]=r;else{let t=Array.isArray(n[e])?n[e]:[n[e]];for(let e of Array.isArray(r)?r:[r])t.includes(e)||t.push(e);n[e]=t}else typeof n[e]==`object`&&typeof r==`object`?n[e]=this.mergeClaims(n[e],r):n[e]=r;return n}},ZD=class{constructor(e,t){this.keys=e,this.nonce=t}},QD=class{constructor(e,t){this._logger=new fD(`OidcClient`),this.settings=e instanceof ID?e:new ID(e),this.metadataService=t??new AD(this.settings),this._claimsService=new XD(this.settings),this._validator=new zD(this.settings,this.metadataService,this._claimsService),this._tokenClient=new RD(this.settings,this.metadataService)}async createSigninRequest({state:e,request:t,request_uri:n,request_type:r,id_token_hint:i,login_hint:a,skipUserInfo:o,nonce:s,url_state:c,response_type:l=this.settings.response_type,scope:u=this.settings.scope,redirect_uri:d=this.settings.redirect_uri,prompt:f=this.settings.prompt,display:p=this.settings.display,max_age:m=this.settings.max_age,ui_locales:h=this.settings.ui_locales,acr_values:g=this.settings.acr_values,resource:_=this.settings.resource,response_mode:v=this.settings.response_mode,extraQueryParams:y=this.settings.extraQueryParams,extraTokenParams:b=this.settings.extraTokenParams,dpopJkt:x,omitScopeWhenRequesting:S=this.settings.omitScopeWhenRequesting}){let C=this._logger.create(`createSigninRequest`);if(l!==`code`)throw Error(`Only the Authorization Code flow (with PKCE) is supported`);let w=await this.metadataService.getAuthorizationEndpoint();C.debug(`Received authorization endpoint`,w);let T=await UD.create({url:w,authority:this.settings.authority,client_id:this.settings.client_id,redirect_uri:d,response_type:l,scope:u,state_data:e,url_state:c,prompt:f,display:p,max_age:m,ui_locales:h,id_token_hint:i,login_hint:a,acr_values:g,dpopJkt:x,resource:_,request:t,request_uri:n,extraQueryParams:y,extraTokenParams:b,request_type:r,response_mode:v,client_secret:this.settings.client_secret,skipUserInfo:o,nonce:s,disablePKCE:this.settings.disablePKCE,omitScopeWhenRequesting:S});await this.clearStaleState();let E=T.state;return await this.settings.stateStore.set(E.id,E.toStorageString()),T}async readSigninResponseState(e,t=!1){let n=this._logger.create(`readSigninResponseState`),r=new GD(xD.readParams(e,this.settings.response_mode));if(!r.state)throw n.throw(Error(`No state in response`)),null;let i=await this.settings.stateStore[t?`remove`:`get`](r.state);if(!i)throw n.throw(Error(`No matching state found in storage`)),null;return{state:await VD.fromStorageString(i),response:r}}async processSigninResponse(e,t,n=!0){let r=this._logger.create(`processSigninResponse`),{state:i,response:a}=await this.readSigninResponseState(e,n);if(r.debug(`received state from storage; validating response`),this.settings.dpop&&this.settings.dpop.store){let e=await this.getDpopProof(this.settings.dpop.store);t={...t,DPoP:e}}try{await this._validator.validateSigninResponse(a,i,t)}catch(e){if(e instanceof OD&&this.settings.dpop){let n=await this.getDpopProof(this.settings.dpop.store,e.nonce);t.DPoP=n,await this._validator.validateSigninResponse(a,i,t)}else throw e}return a}async getDpopProof(e,t){let n,r;return(await e.getAllKeys()).includes(this.settings.client_id)?(r=await e.get(this.settings.client_id),r.nonce!==t&&t&&(r.nonce=t,await e.set(this.settings.client_id,r))):(n=await _D.generateDPoPKeys(),r=new ZD(n,t),await e.set(this.settings.client_id,r)),await _D.generateDPoPProof({url:await this.metadataService.getTokenEndpoint(!1),httpMethod:`POST`,keyPair:r.keys,nonce:r.nonce})}async processResourceOwnerPasswordCredentials({username:e,password:t,skipUserInfo:n=!1,extraTokenParams:r={}}){let i=await this._tokenClient.exchangeCredentials({username:e,password:t,...r}),a=new GD(new URLSearchParams);return Object.assign(a,i),await this._validator.validateCredentialsResponse(a,n),a}async useRefreshToken({state:e,redirect_uri:t,resource:n,timeoutInSeconds:r,extraHeaders:i,extraTokenParams:a}){let o=this._logger.create(`useRefreshToken`),s;if(this.settings.refreshTokenAllowedScope===void 0)s=e.scope;else{let t=this.settings.refreshTokenAllowedScope.split(` `);s=(e.scope?.split(` `)||[]).filter(e=>t.includes(e)).join(` `)}if(this.settings.dpop&&this.settings.dpop.store){let e=await this.getDpopProof(this.settings.dpop.store);i={...i,DPoP:e}}let c;try{c=await this._tokenClient.exchangeRefreshToken({refresh_token:e.refresh_token,scope:s,redirect_uri:t,resource:n,timeoutInSeconds:r,extraHeaders:i,...a})}catch(o){if(o instanceof OD&&this.settings.dpop)i.DPoP=await this.getDpopProof(this.settings.dpop.store,o.nonce),c=await this._tokenClient.exchangeRefreshToken({refresh_token:e.refresh_token,scope:s,redirect_uri:t,resource:n,timeoutInSeconds:r,extraHeaders:i,...a});else throw o}let l=new GD(new URLSearchParams);return Object.assign(l,c),o.debug(`validating response`,l),await this._validator.validateRefreshResponse(l,{...e,scope:s}),l}async createSignoutRequest({state:e,id_token_hint:t,client_id:n,request_type:r,url_state:i,post_logout_redirect_uri:a=this.settings.post_logout_redirect_uri,extraQueryParams:o=this.settings.extraQueryParams}={}){let s=this._logger.create(`createSignoutRequest`),c=await this.metadataService.getEndSessionEndpoint();if(!c)throw s.throw(Error(`No end session endpoint`)),null;s.debug(`Received end session endpoint`,c),!n&&a&&!t&&(n=this.settings.client_id);let l=new KD({url:c,id_token_hint:t,client_id:n,post_logout_redirect_uri:a,state_data:e,extraQueryParams:o,request_type:r,url_state:i});await this.clearStaleState();let u=l.state;return u&&(s.debug(`Signout request has state to persist`),await this.settings.stateStore.set(u.id,u.toStorageString())),l}async readSignoutResponseState(e,t=!1){let n=this._logger.create(`readSignoutResponseState`),r=new qD(xD.readParams(e,this.settings.response_mode));if(!r.state){if(n.debug(`No state in response`),r.error)throw n.warn(`Response was error:`,r.error),new CD(r);return{state:void 0,response:r}}let i=await this.settings.stateStore[t?`remove`:`get`](r.state);if(!i)throw n.throw(Error(`No matching state found in storage`)),null;return{state:await BD.fromStorageString(i),response:r}}async processSignoutResponse(e){let t=this._logger.create(`processSignoutResponse`),{state:n,response:r}=await this.readSignoutResponseState(e,!0);return n?(t.debug(`Received state from storage; validating response`),this._validator.validateSignoutResponse(r,n)):t.debug(`No state from storage; skipping response validation`),r}clearStaleState(){return this._logger.create(`clearStaleState`),BD.clearStaleState(this.settings.stateStore,this.settings.staleStateAgeInSeconds)}async revokeToken(e,t){return this._logger.create(`revokeToken`),await this._tokenClient.revoke({token:e,token_type_hint:t})}},$D=class{constructor(e){this._userManager=e,this._logger=new fD(`SessionMonitor`),this._start=async e=>{let t=e.session_state;if(!t)return;let n=this._logger.create(`_start`);if(e.profile?(this._sub=e.profile.sub,n.debug(`session_state`,t,`, sub`,this._sub)):(this._sub=void 0,n.debug(`session_state`,t,`, anonymous user`)),this._checkSessionIFrame){this._checkSessionIFrame.start(t);return}try{let e=await this._userManager.metadataService.getCheckSessionIframe();if(e){n.debug(`initializing check session iframe`);let r=this._userManager.settings.client_id,i=this._userManager.settings.checkSessionIntervalInSeconds,a=this._userManager.settings.stopCheckSessionOnError,o=new ED(this._callback,r,e,i,a);await o.load(),this._checkSessionIFrame=o,o.start(t)}else n.warn(`no check session iframe found in the metadata`)}catch(e){n.error(`Error from getCheckSessionIframe:`,e instanceof Error?e.message:e)}},this._stop=()=>{let e=this._logger.create(`_stop`);if(this._sub=void 0,this._checkSessionIFrame&&this._checkSessionIFrame.stop(),this._userManager.settings.monitorAnonymousSession){let t=setInterval(async()=>{clearInterval(t);try{let e=await this._userManager.querySessionStatus();if(e){let t={session_state:e.session_state,profile:e.sub?{sub:e.sub}:null};this._start(t)}}catch(t){e.error(`error from querySessionStatus`,t instanceof Error?t.message:t)}},1e3)}},this._callback=async()=>{let e=this._logger.create(`_callback`);try{let t=await this._userManager.querySessionStatus(),n=!0;t&&this._checkSessionIFrame?t.sub===this._sub?(n=!1,this._checkSessionIFrame.start(t.session_state),e.debug(`same sub still logged in at OP, session state has changed, restarting check session iframe; session_state`,t.session_state),await this._userManager.events._raiseUserSessionChanged()):e.debug(`different subject signed into OP`,t.sub):e.debug(`subject no longer signed into OP`),n?this._sub?await this._userManager.events._raiseUserSignedOut():await this._userManager.events._raiseUserSignedIn():e.debug(`no change in session detected, no event to raise`)}catch(t){this._sub&&(e.debug(`Error calling queryCurrentSigninSession; raising signed out event`,t),await this._userManager.events._raiseUserSignedOut())}},e||this._logger.throw(Error(`No user manager passed`)),this._userManager.events.addUserLoaded(this._start),this._userManager.events.addUserUnloaded(this._stop),this._init().catch(e=>{this._logger.error(e)})}async _init(){this._logger.create(`_init`);let e=await this._userManager.getUser();if(e)this._start(e);else if(this._userManager.settings.monitorAnonymousSession){let e=await this._userManager.querySessionStatus();if(e){let t={session_state:e.session_state,profile:e.sub?{sub:e.sub}:null};this._start(t)}}}},eO=class e{constructor(e){this.id_token=e.id_token,this.session_state=e.session_state??null,this.access_token=e.access_token,this.refresh_token=e.refresh_token,this.token_type=e.token_type,this.scope=e.scope,this.profile=e.profile,this.expires_at=e.expires_at,this.state=e.userState,this.url_state=e.url_state}get expires_in(){if(this.expires_at!==void 0)return this.expires_at-bD.getEpochTime()}set expires_in(e){e!==void 0&&(this.expires_at=Math.floor(e)+bD.getEpochTime())}get expired(){let e=this.expires_in;if(e!==void 0)return e<=0}get scopes(){return this.scope?.split(` `)??[]}toStorageString(){return new fD(`User`).create(`toStorageString`),JSON.stringify({id_token:this.id_token,session_state:this.session_state,access_token:this.access_token,refresh_token:this.refresh_token,token_type:this.token_type,scope:this.scope,profile:this.profile,expires_at:this.expires_at})}static fromStorageString(t){return fD.createStatic(`User`,`fromStorageString`),new e(JSON.parse(t))}},tO=`oidc-client`,nO=class{constructor(){this._abort=new vD(`Window navigation aborted`),this._disposeHandlers=new Set,this._window=null}async navigate(e){let t=this._logger.create(`navigate`);if(!this._window)throw Error(`Attempted to navigate on a disposed window`);t.debug(`setting URL in window`),this._window.location.replace(e.url);let{url:n,keepOpen:r}=await new Promise((n,r)=>{let i=i=>{let a=i.data,o=e.scriptOrigin??window.location.origin;if(!(i.origin!==o||a?.source!==tO)){try{let n=xD.readParams(a.url,e.response_mode).get(`state`);if(n||t.warn(`no state found in response url`),i.source!==this._window&&n!==e.state)return}catch{this._dispose(),r(Error(`Invalid response from window`))}n(a)}};window.addEventListener(`message`,i,!1),this._disposeHandlers.add(()=>window.removeEventListener(`message`,i,!1));let a=new BroadcastChannel(`oidc-client-popup-${e.state}`);a.addEventListener(`message`,i,!1),this._disposeHandlers.add(()=>a.close()),this._disposeHandlers.add(this._abort.addHandler(e=>{this._dispose(),r(e)}))});return t.debug(`got response from window`),this._dispose(),r||this.close(),{url:n}}_dispose(){this._logger.create(`_dispose`);for(let e of this._disposeHandlers)e();this._disposeHandlers.clear()}static _notifyParent(e,t,n=!1,r=window.location.origin){let i={source:tO,url:t,keepOpen:n},a=new fD(`_notifyParent`);if(e)a.debug(`With parent. Using parent.postMessage.`),e.postMessage(i,r);else{a.debug(`No parent. Using BroadcastChannel.`);let e=new URL(t).searchParams.get(`state`);if(!e)throw Error(`No parent and no state in URL. Can't complete notification.`);let n=new BroadcastChannel(`oidc-client-popup-${e}`);n.postMessage(i),n.close()}}},rO={location:!1,toolbar:!1,height:640,closePopupWindowAfterInSeconds:-1},iO=`_blank`,aO=60,oO=2,sO=10,cO=class extends ID{constructor(e){let{popup_redirect_uri:t=e.redirect_uri,popup_post_logout_redirect_uri:n=e.post_logout_redirect_uri,popupWindowFeatures:r=rO,popupWindowTarget:i=iO,redirectMethod:a=`assign`,redirectTarget:o=`self`,iframeNotifyParentOrigin:s=e.iframeNotifyParentOrigin,iframeScriptOrigin:c=e.iframeScriptOrigin,requestTimeoutInSeconds:l,silent_redirect_uri:u=e.redirect_uri,silentRequestTimeoutInSeconds:d,automaticSilentRenew:f=!0,validateSubOnSilentRenew:p=!0,includeIdTokenInSilentRenew:m=!1,monitorSession:h=!1,monitorAnonymousSession:g=!1,checkSessionIntervalInSeconds:_=oO,query_status_response_type:v=`code`,stopCheckSessionOnError:y=!0,revokeTokenTypes:b=[`access_token`,`refresh_token`],revokeTokensOnSignout:x=!1,includeIdTokenInSilentSignout:S=!1,accessTokenExpiringNotificationTimeInSeconds:C=aO,maxSilentRenewTimeoutRetries:w,userStore:T}=e;super(e),this.popup_redirect_uri=t,this.popup_post_logout_redirect_uri=n,this.popupWindowFeatures=r,this.popupWindowTarget=i,this.redirectMethod=a,this.redirectTarget=o,this.iframeNotifyParentOrigin=s,this.iframeScriptOrigin=c,this.silent_redirect_uri=u,this.silentRequestTimeoutInSeconds=d||l||sO,this.automaticSilentRenew=f,this.validateSubOnSilentRenew=p,this.includeIdTokenInSilentRenew=m,this.monitorSession=h,this.monitorAnonymousSession=g,this.checkSessionIntervalInSeconds=_,this.stopCheckSessionOnError=y,this.query_status_response_type=v,this.revokeTokenTypes=b,this.revokeTokensOnSignout=x,this.includeIdTokenInSilentSignout=S,this.accessTokenExpiringNotificationTimeInSeconds=C,this.maxSilentRenewTimeoutRetries=w,T?this.userStore=T:this.userStore=new jD({store:typeof window<`u`?window.sessionStorage:new DD})}},lO=class e extends nO{constructor({silentRequestTimeoutInSeconds:t=sO}){super(),this._logger=new fD(`IFrameWindow`),this._timeoutInSeconds=t,this._frame=e.createHiddenIframe(),this._window=this._frame.contentWindow}static createHiddenIframe(){let e=window.document.createElement(`iframe`);return e.style.visibility=`hidden`,e.style.position=`fixed`,e.style.left=`-1000px`,e.style.top=`0`,e.width=`0`,e.height=`0`,window.document.body.appendChild(e),e}async navigate(e){this._logger.debug(`navigate: Using timeout of:`,this._timeoutInSeconds);let t=setTimeout(()=>void this._abort.raise(new wD(`IFrame timed out without a response`)),this._timeoutInSeconds*1e3);return this._disposeHandlers.add(()=>clearTimeout(t)),await super.navigate(e)}close(){var e;this._frame&&=(this._frame.parentNode&&(this._frame.addEventListener(`load`,e=>{var t;let n=e.target;(t=n.parentNode)==null||t.removeChild(n),this._abort.raise(Error(`IFrame removed from DOM`))},!0),(e=this._frame.contentWindow)==null||e.location.replace(`about:blank`)),null),this._window=null}static notifyParent(e,t){return super._notifyParent(window.parent,e,!1,t)}},uO=class{constructor(e){this._settings=e,this._logger=new fD(`IFrameNavigator`)}async prepare({silentRequestTimeoutInSeconds:e=this._settings.silentRequestTimeoutInSeconds}){return new lO({silentRequestTimeoutInSeconds:e})}async callback(e){this._logger.create(`callback`),lO.notifyParent(e,this._settings.iframeNotifyParentOrigin)}},dO=500,fO=1e3,pO=class extends nO{constructor({popupWindowTarget:e=iO,popupWindowFeatures:t={},popupSignal:n,popupAbortOnClose:r}){super(),this._logger=new fD(`PopupWindow`);let i=yD.center({...rO,...t});this._window=window.open(void 0,e,yD.serialize(i)),this.abortOnClose=!!r,n&&n.addEventListener(`abort`,()=>{this._abort.raise(Error(n.reason??`Popup aborted`))}),t.closePopupWindowAfterInSeconds&&t.closePopupWindowAfterInSeconds>0&&setTimeout(()=>{if(!this._window||typeof this._window.closed!=`boolean`||this._window.closed){this._abort.raise(Error(`Popup blocked by user`));return}this.close()},t.closePopupWindowAfterInSeconds*fO)}async navigate(e){var t;(t=this._window)==null||t.focus();let n=setInterval(()=>{(!this._window||this._window.closed)&&(this._logger.debug(`Popup closed by user or isolated by redirect`),r(),this._disposeHandlers.delete(r),this.abortOnClose&&this._abort.raise(Error(`Popup closed by user`)))},dO),r=()=>clearInterval(n);return this._disposeHandlers.add(r),await super.navigate(e)}close(){this._window&&(this._window.closed||(this._window.close(),this._abort.raise(Error(`Popup closed`)))),this._window=null}static notifyOpener(e,t){super._notifyParent(window.opener,e,t),!t&&!window.opener&&window.close()}},mO=class{constructor(e){this._settings=e,this._logger=new fD(`PopupNavigator`)}async prepare({popupWindowFeatures:e=this._settings.popupWindowFeatures,popupWindowTarget:t=this._settings.popupWindowTarget,popupSignal:n,popupAbortOnClose:r}){return new pO({popupWindowFeatures:e,popupWindowTarget:t,popupSignal:n,popupAbortOnClose:r})}async callback(e,{keepOpen:t=!1}){this._logger.create(`callback`),pO.notifyOpener(e,t)}},hO=class{constructor(e){this._settings=e,this._logger=new fD(`RedirectNavigator`)}async prepare({redirectMethod:e=this._settings.redirectMethod,redirectTarget:t=this._settings.redirectTarget}){this._logger.create(`prepare`);let n=window.self;t===`top`&&(n=window.top??window.self);let r=n.location[e].bind(n.location),i;return{navigate:async e=>(this._logger.create(`navigate`),await new Promise((t,n)=>{i=n,window.addEventListener(`pageshow`,()=>t(window.location.href)),r(e.url)})),close:()=>{this._logger.create(`close`),i?.(Error(`Redirect aborted`)),n.stop()}}}async callback(){}},gO=class extends TD{constructor(e){super({expiringNotificationTimeInSeconds:e.accessTokenExpiringNotificationTimeInSeconds}),this._logger=new fD(`UserManagerEvents`),this._userLoaded=new vD(`User loaded`),this._userUnloaded=new vD(`User unloaded`),this._silentRenewError=new vD(`Silent renew error`),this._userSignedIn=new vD(`User signed in`),this._userSignedOut=new vD(`User signed out`),this._userSessionChanged=new vD(`User session changed`)}async load(e,t=!0){await super.load(e),t&&await this._userLoaded.raise(e)}async unload(){await super.unload(),await this._userUnloaded.raise()}addUserLoaded(e){return this._userLoaded.addHandler(e)}removeUserLoaded(e){return this._userLoaded.removeHandler(e)}addUserUnloaded(e){return this._userUnloaded.addHandler(e)}removeUserUnloaded(e){return this._userUnloaded.removeHandler(e)}addSilentRenewError(e){return this._silentRenewError.addHandler(e)}removeSilentRenewError(e){return this._silentRenewError.removeHandler(e)}async _raiseSilentRenewError(e){await this._silentRenewError.raise(e)}addUserSignedIn(e){return this._userSignedIn.addHandler(e)}removeUserSignedIn(e){this._userSignedIn.removeHandler(e)}async _raiseUserSignedIn(){await this._userSignedIn.raise()}addUserSignedOut(e){return this._userSignedOut.addHandler(e)}removeUserSignedOut(e){this._userSignedOut.removeHandler(e)}async _raiseUserSignedOut(){await this._userSignedOut.raise()}addUserSessionChanged(e){return this._userSessionChanged.addHandler(e)}removeUserSessionChanged(e){this._userSessionChanged.removeHandler(e)}async _raiseUserSessionChanged(){await this._userSessionChanged.raise()}},_O=class{constructor(e){this._userManager=e,this._logger=new fD(`SilentRenewService`),this._isStarted=!1,this._retryTimer=new bD(`Retry Silent Renew`),this._timeoutRetryCount=0,this._tokenExpiring=async()=>{let e=this._logger.create(`_tokenExpiring`);try{await this._userManager.signinSilent(),this._timeoutRetryCount=0,e.debug(`silent token renewal successful`)}catch(t){if(t instanceof wD){this._timeoutRetryCount++;let n=this._userManager.settings.maxSilentRenewTimeoutRetries;if(n!==void 0&&this._timeoutRetryCount>n){e.error(`Timeout retry limit reached (${this._timeoutRetryCount} > ${n}), raising silentRenewError:`,t),this._timeoutRetryCount=0,await this._userManager.events._raiseSilentRenewError(t);return}e.warn(`ErrorTimeout from signinSilent (attempt ${this._timeoutRetryCount}), retry in 5s:`,t),this._retryTimer.init(5);return}e.error(`Error from signinSilent:`,t),this._timeoutRetryCount=0,await this._userManager.events._raiseSilentRenewError(t)}}}async start(){let e=this._logger.create(`start`);if(!this._isStarted){this._isStarted=!0,this._userManager.events.addAccessTokenExpiring(this._tokenExpiring),this._retryTimer.addHandler(this._tokenExpiring);try{await this._userManager.getUser()}catch(t){e.error(`getUser error`,t)}}}stop(){this._isStarted&&=(this._retryTimer.cancel(),this._retryTimer.removeHandler(this._tokenExpiring),this._userManager.events.removeAccessTokenExpiring(this._tokenExpiring),!1)}},vO=class{constructor(e){this.refresh_token=e.refresh_token,this.id_token=e.id_token,this.session_state=e.session_state,this.scope=e.scope,this.profile=e.profile,this.data=e.state}},yO=class{constructor(e,t,n,r){this._logger=new fD(`UserManager`),this.settings=new cO(e),this._client=new QD(e),this._redirectNavigator=t??new hO(this.settings),this._popupNavigator=n??new mO(this.settings),this._iframeNavigator=r??new uO(this.settings),this._events=new gO(this.settings),this._silentRenewService=new _O(this),this.settings.automaticSilentRenew&&this.startSilentRenew(),this._sessionMonitor=null,this.settings.monitorSession&&(this._sessionMonitor=new $D(this))}get events(){return this._events}get metadataService(){return this._client.metadataService}async getUser(e=!1){let t=this._logger.create(`getUser`),n=await this._loadUser();return n?(t.info(`user loaded`),await this._events.load(n,e),n):(t.info(`user not found in storage`),null)}async removeUser(){let e=this._logger.create(`removeUser`);await this.storeUser(null),e.info(`user removed from storage`),await this._events.unload()}async signinRedirect(e={}){this._logger.create(`signinRedirect`);let{redirectMethod:t,...n}=e,r;this.settings.dpop?.bind_authorization_code&&(r=await this.generateDPoPJkt(this.settings.dpop));let i=await this._redirectNavigator.prepare({redirectMethod:t});await this._signinStart({request_type:`si:r`,dpopJkt:r,...n},i)}async signinRedirectCallback(e=window.location.href){let t=this._logger.create(`signinRedirectCallback`),n=await this._signinEnd(e);return n.profile&&n.profile.sub?t.info(`success, signed in subject`,n.profile.sub):t.info(`no subject`),n}async signinResourceOwnerCredentials({username:e,password:t,skipUserInfo:n=!1}){let r=this._logger.create(`signinResourceOwnerCredential`),i=await this._client.processResourceOwnerPasswordCredentials({username:e,password:t,skipUserInfo:n,extraTokenParams:this.settings.extraTokenParams});r.debug(`got signin response`);let a=await this._buildUser(i);return a.profile&&a.profile.sub?r.info(`success, signed in subject`,a.profile.sub):r.info(`no subject`),a}async signinPopup(e={}){let t=this._logger.create(`signinPopup`),n;this.settings.dpop?.bind_authorization_code&&(n=await this.generateDPoPJkt(this.settings.dpop));let{popupWindowFeatures:r,popupWindowTarget:i,popupSignal:a,popupAbortOnClose:o,...s}=e,c=this.settings.popup_redirect_uri;c||t.throw(Error(`No popup_redirect_uri configured`));let l=await this._popupNavigator.prepare({popupWindowFeatures:r,popupWindowTarget:i,popupSignal:a,popupAbortOnClose:o}),u=await this._signin({request_type:`si:p`,redirect_uri:c,display:`popup`,dpopJkt:n,...s},l);return u&&(u.profile&&u.profile.sub?t.info(`success, signed in subject`,u.profile.sub):t.info(`no subject`)),u}async signinPopupCallback(e=window.location.href,t=!1){let n=this._logger.create(`signinPopupCallback`);await this._popupNavigator.callback(e,{keepOpen:t}),n.info(`success`)}async signinSilent(e={}){let t=this._logger.create(`signinSilent`),{silentRequestTimeoutInSeconds:n,...r}=e,i=await this._loadUser();if(!e.forceIframeAuth&&i?.refresh_token){t.debug(`using refresh token`);let e=new vO(i);return await this._useRefreshToken({state:e,redirect_uri:r.redirect_uri,resource:r.resource,extraTokenParams:r.extraTokenParams,timeoutInSeconds:n})}let a;this.settings.dpop?.bind_authorization_code&&(a=await this.generateDPoPJkt(this.settings.dpop));let o=this.settings.silent_redirect_uri;o||t.throw(Error(`No silent_redirect_uri configured`));let s;i&&this.settings.validateSubOnSilentRenew&&(t.debug(`subject prior to silent renew:`,i.profile.sub),s=i.profile.sub);let c=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:n});return i=await this._signin({request_type:`si:s`,redirect_uri:o,prompt:`none`,id_token_hint:this.settings.includeIdTokenInSilentRenew?i?.id_token:void 0,dpopJkt:a,...r},c,s),i&&(i.profile?.sub?t.info(`success, signed in subject`,i.profile.sub):t.info(`no subject`)),i}async _useRefreshToken(e){let t=await this._client.useRefreshToken({timeoutInSeconds:this.settings.silentRequestTimeoutInSeconds,...e}),n=new eO({...e.state,...t});return await this.storeUser(n),await this._events.load(n),n}async signinSilentCallback(e=window.location.href){let t=this._logger.create(`signinSilentCallback`);await this._iframeNavigator.callback(e),t.info(`success`)}async signinCallback(e=window.location.href){let{state:t}=await this._client.readSigninResponseState(e);switch(t.request_type){case`si:r`:return await this.signinRedirectCallback(e);case`si:p`:await this.signinPopupCallback(e);break;case`si:s`:await this.signinSilentCallback(e);break;default:throw Error(`invalid request_type in state`)}}async signoutCallback(e=window.location.href,t=!1){let{state:n}=await this._client.readSignoutResponseState(e);if(n)switch(n.request_type){case`so:r`:return await this.signoutRedirectCallback(e);case`so:p`:await this.signoutPopupCallback(e,t);break;case`so:s`:await this.signoutSilentCallback(e);break;default:throw Error(`invalid request_type in state`)}}async querySessionStatus(e={}){let t=this._logger.create(`querySessionStatus`),{silentRequestTimeoutInSeconds:n,...r}=e,i=this.settings.silent_redirect_uri;i||t.throw(Error(`No silent_redirect_uri configured`));let a=await this._loadUser(),o=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:n}),s=await this._signinStart({request_type:`si:s`,redirect_uri:i,prompt:`none`,id_token_hint:this.settings.includeIdTokenInSilentRenew?a?.id_token:void 0,response_type:this.settings.query_status_response_type,scope:`openid`,skipUserInfo:!0,...r},o);try{let e=await this._client.processSigninResponse(s.url,{});return t.debug(`got signin response`),e.session_state&&e.profile.sub?(t.info(`success for subject`,e.profile.sub),{session_state:e.session_state,sub:e.profile.sub}):(t.info(`success, user not authenticated`),null)}catch(e){if(this.settings.monitorAnonymousSession&&e instanceof CD)switch(e.error){case`login_required`:case`consent_required`:case`interaction_required`:case`account_selection_required`:return t.info(`success for anonymous user`),{session_state:e.session_state}}throw e}}async _signin(e,t,n){let r=await this._signinStart(e,t);return await this._signinEnd(r.url,n)}async _signinStart(e,t){let n=this._logger.create(`_signinStart`);try{let r=await this._client.createSigninRequest(e);return n.debug(`got signin request`),await t.navigate({url:r.url,state:r.state.id,response_mode:r.state.response_mode,scriptOrigin:this.settings.iframeScriptOrigin})}catch(e){throw n.debug(`error after preparing navigator, closing navigator window`),t.close(),e}}async _signinEnd(e,t){let n=this._logger.create(`_signinEnd`),r=await this._client.processSigninResponse(e,{});return n.debug(`got signin response`),await this._buildUser(r,t)}async _buildUser(e,t){let n=this._logger.create(`_buildUser`),r=new eO(e);if(t){if(t!==r.profile.sub)throw n.debug(`current user does not match user returned from signin. sub from signin:`,r.profile.sub),new CD({...e,error:`login_required`});n.debug(`current user matches user returned from signin`)}return await this.storeUser(r),n.debug(`user stored`),await this._events.load(r),r}async signoutRedirect(e={}){let t=this._logger.create(`signoutRedirect`),{redirectMethod:n,...r}=e,i=await this._redirectNavigator.prepare({redirectMethod:n});await this._signoutStart({request_type:`so:r`,post_logout_redirect_uri:this.settings.post_logout_redirect_uri,...r},i),t.info(`success`)}async signoutRedirectCallback(e=window.location.href){let t=this._logger.create(`signoutRedirectCallback`),n=await this._signoutEnd(e);return t.info(`success`),n}async signoutPopup(e={}){let t=this._logger.create(`signoutPopup`),{popupWindowFeatures:n,popupWindowTarget:r,popupSignal:i,...a}=e,o=this.settings.popup_post_logout_redirect_uri,s=await this._popupNavigator.prepare({popupWindowFeatures:n,popupWindowTarget:r,popupSignal:i});await this._signout({request_type:`so:p`,post_logout_redirect_uri:o,state:o==null?void 0:{},...a},s),t.info(`success`)}async signoutPopupCallback(e=window.location.href,t=!1){let n=this._logger.create(`signoutPopupCallback`);await this._popupNavigator.callback(e,{keepOpen:t}),n.info(`success`)}async _signout(e,t){let n=await this._signoutStart(e,t);return await this._signoutEnd(n.url)}async _signoutStart(e={},t){let n=this._logger.create(`_signoutStart`);try{let r=await this._loadUser();n.debug(`loaded current user from storage`),this.settings.revokeTokensOnSignout&&await this._revokeInternal(r);let i=e.id_token_hint||r&&r.id_token;i&&(n.debug(`setting id_token_hint in signout request`),e.id_token_hint=i),await this.removeUser(),n.debug(`user removed, creating signout request`);let a=await this._client.createSignoutRequest(e);return n.debug(`got signout request`),await t.navigate({url:a.url,state:a.state?.id,scriptOrigin:this.settings.iframeScriptOrigin})}catch(e){throw n.debug(`error after preparing navigator, closing navigator window`),t.close(),e}}async _signoutEnd(e){let t=this._logger.create(`_signoutEnd`),n=await this._client.processSignoutResponse(e);return t.debug(`got signout response`),n}async signoutSilent(e={}){let t=this._logger.create(`signoutSilent`),{silentRequestTimeoutInSeconds:n,...r}=e,i=this.settings.includeIdTokenInSilentSignout?(await this._loadUser())?.id_token:void 0,a=this.settings.popup_post_logout_redirect_uri,o=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:n});await this._signout({request_type:`so:s`,post_logout_redirect_uri:a,id_token_hint:i,...r},o),t.info(`success`)}async signoutSilentCallback(e=window.location.href){let t=this._logger.create(`signoutSilentCallback`);await this._iframeNavigator.callback(e),t.info(`success`)}async revokeTokens(e){let t=await this._loadUser();await this._revokeInternal(t,e)}async _revokeInternal(e,t=this.settings.revokeTokenTypes){let n=this._logger.create(`_revokeInternal`);if(!e)return;let r=t.filter(t=>typeof e[t]==`string`);if(!r.length){n.debug(`no need to revoke due to no token(s)`);return}for(let t of r)await this._client.revokeToken(e[t],t),n.info(`${t} revoked successfully`),t!==`access_token`&&(e[t]=null);await this.storeUser(e),n.debug(`user stored`),await this._events.load(e)}startSilentRenew(){this._logger.create(`startSilentRenew`),this._silentRenewService.start()}stopSilentRenew(){this._silentRenewService.stop()}get _userStoreKey(){return`user:${this.settings.authority}:${this.settings.client_id}`}async _loadUser(){let e=this._logger.create(`_loadUser`),t=await this.settings.userStore.get(this._userStoreKey);return t?(e.debug(`user storageString loaded`),eO.fromStorageString(t)):(e.debug(`no user storageString`),null)}async storeUser(e){let t=this._logger.create(`storeUser`);if(e){t.debug(`storing user`);let n=e.toStorageString();await this.settings.userStore.set(this._userStoreKey,n)}else this._logger.debug(`removing user`),await this.settings.userStore.remove(this._userStoreKey),this.settings.dpop&&await this.settings.dpop.store.remove(this.settings.client_id)}async clearStaleState(){await this._client.clearStaleState()}async dpopProof(e,t,n,r){let i=await(this.settings.dpop?.store)?.get(this.settings.client_id);if(i)return await _D.generateDPoPProof({url:e,accessToken:t?.access_token,httpMethod:n,keyPair:i.keys,nonce:r})}async generateDPoPJkt(e){let t=await e.store.get(this.settings.client_id);return t||(t=new ZD(await _D.generateDPoPKeys()),await e.store.set(this.settings.client_id,t)),await _D.generateDPoPJkt(t.keys)}},bO;function xO(e){return e.openIDConnectClientId?location.hostname===`localhost`?!!e.localhostOpenIDConnectAuthority:!!e.openIDConnectAuthority:!1}async function SO(){let e=await CC.fMSInformation();e.additionalLogServers&&e.additionalLogServers.length>0&&AC(e.additionalLogServers);let t=null;if(xO(e)){if(bO=new yO({authority:(location.hostname===`localhost`?e.localhostOpenIDConnectAuthority:e.openIDConnectAuthority)??``,client_id:e.openIDConnectClientId??``,redirect_uri:window.location.protocol+`//`+window.location.host+`/`,post_logout_redirect_uri:window.location.protocol+`//`+window.location.host+`/`,automaticSilentRenew:!0,loadUserInfo:!0,scope:`openid profile`}),t=await bO.getUser(),!t){try{t=await bO.signinRedirectCallback()}catch{t=null}window.history.replaceState({},``,`/`)}t&&(jC(t),localStorage.setItem(`current-operator`,t.profile.name||t.profile.sub))}return{...e,user:t===null?void 0:t}}var CO=Z({name:`FMS Insight`,version:``});function wO(e){bO&&!e.user&&bO.signinRedirect().catch(e=>console.log(e))}function TO(){bO&&bO.signoutRedirect().catch(e=>console.log(e))}var EO=Symbol(``);function DO(e){let t=Symbol(),n=Z(t),r=Z((r,i)=>{let a=r(n);return a===t?e(r,i):a},(e,i,a)=>{let o=typeof a==`function`?a(e(r)):a;i(n,o===EO?t:o)});return r}var OO=e=>typeof e?.then==`function`;function kO(e=()=>{try{return window.localStorage}catch{return}},t){let n,r,i={getItem:(i,a)=>{let o=e=>{if(e||=``,n!==e){try{r=JSON.parse(e,t?.reviver)}catch{return a}n=e}return r},s=e()?.getItem(i)??null;return OO(s)?s.then(o):o(s)},setItem:(n,r)=>e()?.setItem(n,JSON.stringify(r,t?.replacer)),removeItem:t=>e()?.removeItem(t)},a=e=>(t,n,r)=>e(t,e=>{let t;try{t=JSON.parse(e||``)}catch{t=r}n(t)}),o;try{o=e()?.subscribe}catch{}return!o&&typeof window<`u`&&typeof window.addEventListener==`function`&&window.Storage&&(o=(t,n)=>{if(!(e()instanceof window.Storage))return()=>{};let r=r=>{r.storageArea===e()&&r.key===t&&n(r.newValue)};return window.addEventListener(`storage`,r),()=>{window.removeEventListener(`storage`,r)}}),o&&(i.subscribe=a(o)),i}var AO=kO();function jO(e,t,n=AO,r){let i=Z(r?.getOnInit?n.getItem(e,t):t);return i.onMount=r=>(r(n.getItem(e,t)),n.subscribe?.call(n,e,r,t)),Z(e=>e(i),(r,a,o)=>{let s=typeof o==`function`?o(r(i)):o;return s===EO?(a(i,t),n.removeItem(e)):OO(s)?s.then(t=>(a(i,t),n.setItem(e,t))):(a(i,s),n.setItem(e,s))})}var MO=(e,t,n)=>(t.has(n)?t:t.set(n,e())).get(n),NO=new WeakMap,PO=(e,t,n)=>MO(e,MO(()=>new WeakMap,NO,t),n),FO=e=>typeof e?.then==`function`,IO=()=>void 0;function LO(e,t=IO){return PO(()=>{let n=new WeakMap,r=new WeakMap,i=Z(0),a=Z([]);a.INTERNAL_onInit=e=>{e.set(a,[()=>e.set(i,e=>e+1)])};let o=Z(s=>{s(i);let c;try{c=s(o)}catch{}let l=s(e);if(!FO(l))return{v:l};if(l!==c?.p&&l.then(e=>{r.set(l,e);let[t]=s(a);t()},e=>{n.set(l,e);let[t]=s(a);t()}),n.has(l))throw n.get(l);return r.has(l)?{p:l,v:r.get(l)}:c&&`v`in c?{p:l,f:t(c.v),v:c.v}:{p:l,f:t()}});return o.init=void 0,Z(e=>{let t=e(o);return`f`in t?t.f:t.v},(t,n,...r)=>n(e,...r))},e,t)}var RO=new WeakMap,zO=(e,t)=>(RO.has(t)?RO:RO.set(t,e())).get(t);function BO(e){return zO(()=>{let t={state:`loading`},n=LO(e,()=>t);return Z(e=>{try{let r=e(n);return r===t?t:{state:`hasData`,data:r}}catch(e){return{state:`hasError`,error:e}}})},e)}var VO=jO(`current-operator`,null),HO=jO(`operators`,[]),UO=Z(e=>{let t=e(VO),n=e(CO);return n.user?n.user.profile.name||n.user.profile.sub||null:t},(e,t,n)=>{t(VO,n)}),WO=Z({timeOfCurrentStatusUTC:new Date,jobs:{},pallets:{},material:[],alarms:[],queues:{}}),GO=WO,KO=Z(Math.floor(Date.now()/1e3));KO.onMount=e=>{let t=setInterval(()=>{e(Math.floor(Date.now()/1e3))},1e3);return()=>clearInterval(t)};var qO=Z(null,(e,t,n,r)=>{let i=r===null?``:r;t(WO,e=>{let t=e.jobs[n];if(t){let r=new RS(t);return r.comment=i,{...e,jobs:{...e.jobs,[n]:r}}}else return e}),t(rD(n),i),wC.setJobComment(n,i)}),JO=Z(null,(e,t,{workorder:n,comment:r})=>{let i=e(UO);t(WO,e=>e.workorders?{...e,workorders:e.workorders.map(e=>e.workorderId===n?new ZS({...e,comments:[...e.comments??[],new QS({comment:r,timeUTC:new Date})]}):e)}:e),TC.recordWorkorderComment(n,i,r)}),YO=Z(null,(e,t,n)=>t(WO,n)),XO=Z(null,(e,t,{evt:n})=>{n.logEntry?t(WO,ZO(n.logEntry)):n.newCurrentStatus&&t(WO,n.newCurrentStatus)});function ZO(e){return t=>{let n=new Map;function r(e,r){if(n.size===0)for(let e of t.material)n.set(e.materialID,e);let i=n.get(e);i!==void 0&&n.set(e,new US(r(i)))}switch(e.type){case Y.PartMark:for(let t of e.material)r(t.id,t=>({...t,serial:e.result}));break;case Y.OrderAssignment:for(let t of e.material)r(t.id,t=>({...t,workorderId:e.result}));break;case Y.Inspection:case Y.InspectionForce:if(e.result.toLowerCase()===`true`||e.result===`1`){let t;if(t=e.type===Y.InspectionForce?e.program:(e.details||{}).InspectionType,t)for(let n of e.material)r(n.id,e=>({...e,signaledInspections:[...e.signaledInspections,t]}))}break}return n.size===0?t:{...t,material:Array.from(n.values())}}}var QO=Z(null,(e,t,{queue:n,matId:r,newIdx:i})=>{t(WO,e=>{let t=e.material.find(e=>e.materialID===r);if(!t||t.location.type!==GS.InQueue||t.location.currentQueue===n&&t.location.queuePosition===i)return e;let a=t.location.currentQueue,o=t.location.queuePosition;if(o===void 0||a===void 0)return e;let s=e.material.map(e=>{if(e.location.type!==GS.InQueue||e.location.queuePosition===void 0||e.location.currentQueue===void 0)return e;if(e.materialID===r)return new US({...e,location:{type:GS.InQueue,currentQueue:n,queuePosition:i}});let t=e.location.queuePosition;return e.location.currentQueue===a&&e.location.queuePosition>o&&--t,e.location.currentQueue===n&&t>=i&&(t+=1),t===e.location.queuePosition?e:new US({...e,location:{...e.location,queuePosition:t}})});return{...e,material:s}})}),$O=`-?\\d+(?:[\\.,]\\d+)?`,ek=`(`+$O+`Y)?(-?\\d+(?:[\\.,]\\d+)?M)?(-?\\d+(?:[\\.,]\\d+)?D)?`;``+$O;var tk=RegExp(`P`+ek+`(?:T(-?\\d+(?:[\\.,]\\d+)?H)?(-?\\d+(?:[\\.,]\\d+)?M)?(-?\\d+(?:[\\.,]\\d+)?S)?)?`);function nk(e){let t=tk.exec(e);if(!t||!t[1]&&!t[2]&&!t[3]&&!t[4]&&!t[5]&&!t[6])return null;let n={};return t[1]&&(n.years=parseFloat(t[1])),t[2]&&(n.months=parseFloat(t[2])),t[3]&&(n.days=parseFloat(t[3])),t[4]&&(n.hours=parseFloat(t[4])),t[5]&&(n.minutes=parseFloat(t[5])),t[6]&&(n.seconds=parseFloat(t[6])),n}function rk(e){let t=nk(e);return t?((((t.years??0)*365+(t.months??0)*30+(t.days??0))*24+(t.hours??0))*60+(t.minutes??0))*60+(t.seconds??0):0}function ik(e){return rk(e)/60}var ak=class e{constructor(e,t,n){this.part=e,this.statGroup=t,this.operation=n}static ofLogCycle(t){return new e(t.material[0].part,t.loc,t.type===Y.LoadUnloadCycle&&t.material.length>0?t.result+`-`+t.material[0].proc.toString():t.program)}static ofPartCycle(t){return new e(t.part,t.stationGroup,t.isLabor&&t.material.length>0?t.operation+`-`+t.material[0].proc.toString():t.operation)}compare(e){let t=this.part.localeCompare(e.part);return t!==0||(t=this.statGroup.localeCompare(e.statGroup),t!==0)?t:this.operation.localeCompare(e.operation)}hash(){return xT(this.part,this.statGroup,this.operation)}toString(){return`{part: ${this.part}}, statGroup: ${this.statGroup}, operation: ${this.operation}}`}},ok=Z($T.empty()),sk=ok,ck=Z($T.empty()),lk=ck;function uk(e,t){return e.medianMinutesForSingleMat===0?!1:t<e.medianMinutesForSingleMat?(e.medianMinutesForSingleMat-t)/e.MAD_belowMinutes>2:(t-e.medianMinutesForSingleMat)/e.MAD_aboveMinutes>2}function dk(e,t){return e.medianMinutesForSingleMat===0||t<e.medianMinutesForSingleMat?!1:(t-e.medianMinutesForSingleMat)/e.MAD_aboveMinutes>2}function fk(e){let t=e.toMutableArray().sort((e,t)=>e-t);if(t.length===0)return 0;let n=Math.floor(t.length/2);return t.length%2==0?(t[n-1]+t[n])/2:t[n]}function pk(e){let t=fk(X.of(e)),n=1.4826*fk(X.of(e).filter(e=>e<=t).map(e=>t-e));n<.25&&(n=.25);let r=1.4826*fk(X.of(e).filter(e=>e>=t).map(e=>e-t));r<.25&&(r=.25);let i={medianMinutesForSingleMat:t,MAD_belowMinutes:n,MAD_aboveMinutes:r,expectedCycleMinutesForSingleMat:0},a=X.of(e).filter(e=>!uk(i,e)).toRArray(),o=a.reduce((e,t)=>e+t,0)/a.length;return{...i,expectedCycleMinutesForSingleMat:o}}function mk(e,t,n){return e.toLookupOrderedMap(t,n,e=>[e],(e,t)=>e.concat(t)).toAscLazySeq().map(([e,t])=>{let r=[],i=[];for(let e of t.valuesToAscLazySeq().flatMap(e=>e))i.length===0?i=[e]:lw(n(e),n(i[i.length-1]))<10?i.push(e):(r.push(i),i=[e]);return i.length>0&&r.push(i),[e,r]})}function hk(e,t,n){let r=0,i=0,a=!0;for(let t of e)n(t)<0&&(a=!1),i+=t.material.length,r+=n(t);return a&&r>0?e.map(e=>({cycle:e,elapsedForSingleMaterialMinutes:t(e)*n(e)/r/e.material.length})):i>0?e.map(e=>({cycle:e,elapsedForSingleMaterialMinutes:t(e)/i})):e.map(e=>({cycle:e,elapsedForSingleMaterialMinutes:t(e)}))}function gk(e){let t=new Set;for(let n of e)if(n.type===Y.PalletCycle&&n.material.length>0)for(let e of n.material)t.add(e.id);return mk(X.of(e).filter(e=>(e.type===Y.LoadUnloadCycle||e.type===Y.MachineCycle)&&!e.startofcycle&&e.loc!==``&&e.material.length>0),e=>e.loc+` #`+e.locnum.toString(),e=>e.endUTC).flatMap(([e,t])=>t).flatMap(e=>{let n=ik(e[0].elapsed);return e.length>=2&&e.every(e=>ik(e.elapsed)===n&&e.material.every(e=>!t.has(e.id)))?hk(e,e=>ik(e.elapsed),e=>e.active===``?-1:ik(e.active)):e.map(e=>({cycle:e,elapsedForSingleMaterialMinutes:e.material.length>0?ik(e.elapsed)/e.material.length:0}))})}function _k(e){return gk(e).toLookup(e=>ak.ofLogCycle(e.cycle),e=>e.elapsedForSingleMaterialMinutes).mapValues(pk)}var vk=Z(null,(e,t,n)=>{t(ok,e=>e.size===0?_k(n):e)}),yk=Z(null,(e,t,n)=>{t(ck,_k(n))});function bk(e,t){return e.startsWith(`Inspect`)?e:e+` #`+t.toString()}var xk=Z($T.empty()),Sk=xk,Ck=Z($T.empty()),wk=Ck;function Tk(e,t,n){if(t.startofcycle||t.type!==Y.LoadUnloadCycle&&t.type!==Y.MachineCycle||t.loc===``)return null;let r=t.material.length>0?t.material[0].part:``,i=t.material.length>0?e.get(ak.ofLogCycle(t)):void 0,a=ik(t.active);return(t.active===``||a<=0||t.material.length==0)&&(a=(i?.expectedCycleMinutesForSingleMat??0)*t.material.length),{endTime:t.endUTC,elapsedMinsPerMaterial:n,cntr:t.counter,activeMinutes:a,medianCycleMinutes:(i?.medianMinutesForSingleMat??0)*t.material.length,MAD_aboveMinutes:i?.MAD_aboveMinutes??0,part:r,pallet:t.pal,material:t.material,isLabor:t.type===Y.LoadUnloadCycle,isOutlier:i?uk(i,n):!1,stationGroup:t.loc,stationNumber:t.locnum,operation:t.type===Y.LoadUnloadCycle?t.result:t.program,operator:t.details&&t.details.operator||``}}function Ek(e,t){return gk(t).collect(t=>Tk(e,t.cycle,t.elapsedForSingleMaterialMinutes)).buildHashMap(e=>e.cntr)}function Dk(e,t){for(let n of e.editedEvents){let e=t.get(n.counter);if(e!==void 0){let r={...e,material:n.material};t=t.set(n.counter,r)}}return t}var Ok=Z(null,(e,t,n)=>{let r=e(sk);t(xk,e=>e.union(Ek(r,n)))}),kk=Z(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.logEntry&&n.logEntry.type===Y.InvalidateCycle){let e=n.logEntry.details?.EditedCounters,r=e?new Set(e.split(`,`).map(e=>parseInt(e))):new Set;r.size>0&&t(xk,e=>{for(let t of r){let n=e.get(t);n!==void 0&&(e=e.set(t,{...n,activeMinutes:0}))}return e})}else if(n.logEntry){let a=e(sk),o=n.logEntry.material.length>0?ik(n.logEntry.elapsed)/n.logEntry.material.length:0,s=Tk(a,n.logEntry,o);if(!s)return;t(xk,e=>{if(i){let t=VC(r,-30);e=e.filter(e=>e.endTime>=t)}return e=e.set(s.cntr,s),e})}else if(n.editMaterialInLog){let e=n.editMaterialInLog;t(xk,t=>Dk(e,t))}}),Ak=Z(null,(e,t,n)=>{t(Ck,Ek(e(lk),n))}),jk=o(((e,t)=>{t.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case`INPUT`:case`TEXTAREA`:t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type===`Caret`&&e.removeAllRanges(),e.rangeCount||n.forEach(function(t){e.addRange(t)}),t&&t.focus()}}})),Mk=l(o(((e,t)=>{var n=jk(),r={"text/plain":`Text`,"text/html":`Url`,default:`Text`},i=`Copy to clipboard: #{key}, Enter`;function a(e){var t=(/mac os x/i.test(navigator.userAgent)?`⌘`:`Ctrl`)+`+C`;return e.replace(/#{\s*key\s*}/g,t)}function o(e,t){var o,s,c,l,u,d,f=!1;t||={},o=t.debug||!1;try{if(c=n(),l=document.createRange(),u=document.getSelection(),d=document.createElement(`span`),d.textContent=e,d.ariaHidden=`true`,d.style.all=`unset`,d.style.position=`fixed`,d.style.top=0,d.style.clip=`rect(0, 0, 0, 0)`,d.style.whiteSpace=`pre`,d.style.webkitUserSelect=`text`,d.style.MozUserSelect=`text`,d.style.msUserSelect=`text`,d.style.userSelect=`text`,d.addEventListener(`copy`,function(n){if(n.stopPropagation(),t.format)if(n.preventDefault(),n.clipboardData===void 0){o&&console.warn(`unable to use e.clipboardData`),o&&console.warn(`trying IE specific stuff`),window.clipboardData.clearData();var i=r[t.format]||r.default;window.clipboardData.setData(i,e)}else n.clipboardData.clearData(),n.clipboardData.setData(t.format,e);t.onCopy&&(n.preventDefault(),t.onCopy(n.clipboardData))}),document.body.appendChild(d),l.selectNodeContents(d),u.addRange(l),!document.execCommand(`copy`))throw Error(`copy command was unsuccessful`);f=!0}catch(n){o&&console.error(`unable to copy using execCommand: `,n),o&&console.warn(`trying IE specific stuff`);try{window.clipboardData.setData(t.format||`text`,e),t.onCopy&&t.onCopy(window.clipboardData),f=!0}catch(n){o&&console.error(`unable to copy using clipboardData: `,n),o&&console.error(`falling back to prompt`),s=a(`message`in t?t.message:i),window.prompt(s,e)}}finally{u&&(typeof u.removeRange==`function`?u.removeRange(l):u.removeAllRanges()),d&&document.body.removeChild(d),c()}return f}t.exports=o}))(),1);function Nk(e,t){let n=JT.empty(),r=JT.empty(),i=JT.empty(),a=XT.empty(),o=JT.empty();for(let s of e){n=n.add(s.pallet),s.isLabor?r=r.add(bk(s.stationGroup,s.stationNumber)):(i=i.add(bk(s.stationGroup,s.stationNumber)),t&&s.part==t.part&&s.material.some(e=>e.proc===t.proc)&&(o=o.add(ak.ofPartCycle(s))));for(let e of s.material)a=a.alter(e.part,t=>(t??JT.empty()).add(e.proc))}return{allPalletNames:n.toAscLazySeq().toRArray(),allLoadStationNames:r.toAscLazySeq().toRArray(),allMachineNames:i.toAscLazySeq().toRArray(),allPartAndProcNames:a.toAscLazySeq().flatMap(([e,t])=>t.toAscLazySeq().map(t=>({part:e,proc:t}))).toRArray(),allMachineOperations:o.toAscLazySeq().toRArray()}}var Pk=`@@@_FMSInsight_FilterAnyMachineKey_@@@`,Fk=`@@@_FMSInsigt_FilterAnyLoadKey_@@@`;function Ik(e){return{...Nk(e),seriesLabel:`Station`,data:new Map}}function Lk(e,{zoom:t,partAndProc:n,pallet:r,station:i,operation:a}){let o=n&&i&&i!==`@@@_FMSInsight_FilterAnyMachineKey_@@@`&&i!==`@@@_FMSInsigt_FilterAnyLoadKey_@@@`,s=r&&!a&&i&&i!==`@@@_FMSInsight_FilterAnyMachineKey_@@@`&&i!==`@@@_FMSInsigt_FilterAnyLoadKey_@@@`;return{...Nk(e,n),seriesLabel:o?`Pallet`:s?`Part`:`Station`,data:X.of(e).filter(e=>{if(t&&(e.endTime<t.start||e.endTime>t.end)||n&&(e.part!==n.part||!e.material.some(e=>e.proc===n.proc))||r&&e.pallet!==r)return!1;if(i===`@@@_FMSInsight_FilterAnyMachineKey_@@@`){if(e.isLabor)return!1}else if(i===`@@@_FMSInsigt_FilterAnyLoadKey_@@@`){if(!e.isLabor)return!1}else if(i&&bk(e.stationGroup,e.stationNumber)!==i)return!1;return!(a&&a.compare(ak.ofPartCycle(e))!==0)}).toRLookup(e=>o?e.pallet.toString():s?e.part+`-`+X.of(e.material).map(e=>e.proc).distinctAndSortBy(e=>e).toRArray().join(`:`):bk(e.stationGroup,e.stationNumber),e=>({...e,x:e.endTime,y:e.elapsedMinsPerMaterial*e.material.length}))}}function Rk(e,{zoom:t,partAndProc:n,pallet:r,station:i}){let a=X.of(e).filter(e=>!i||i===`@@@_FMSInsigt_FilterAnyLoadKey_@@@`?e.isLabor:bk(e.stationGroup,e.stationNumber)===i);return{...Nk(e,n),seriesLabel:`Station`,data:mk(a,e=>bk(e.stationGroup,e.stationNumber),e=>e.endTime).map(([e,i])=>[e,X.of(i).collect(e=>{let i=e.find(e=>!(t&&(e.endTime<t.start||e.endTime>t.end)||n&&(e.part!==n.part||!e.material.some(e=>e.proc===n.proc))||r&&e.pallet!==r));return i?{...i,x:i.endTime,y:e.reduce((e,t)=>e+t.elapsedMinsPerMaterial*t.material.length,0),operations:X.of(e).flatMap(e=>e.material.map(t=>({mat:t,operation:e.operation}))).toRArray()}:null}).toRArray()]).filter(([,e])=>e.length>0).toRMap(e=>e)}}function zk(e,t){let n=null;for(let[,r]of e.data)for(let e of r)if(e.material.length>0&&(n===null||n.time<e.x)){let r=t?e.activeMinutes/e.material.length:e.activeMinutes;n={time:e.x,mins:r}}return n?.mins}function Bk(e){return mk(e,e=>bk(e.stationGroup,e.stationNumber),e=>e.endTime).flatMap(function*([e,t]){for(let n of t){let t=X.of(n).sumBy(e=>e.elapsedMinsPerMaterial*e.material.length),r=$C(n[0].endTime,-t*60),i=X.of(n).sumBy(e=>e.activeMinutes);yield{station:e,startTime:r,endActive:i>0?QC(r,i):void 0,endOccupied:n[0].endTime,outlier:n.some(e=>e.isOutlier),parts:X.of(n).flatMap(e=>X.of(e.material).distinctBy(e=>e.proc).map(t=>({part:e.part,proc:t.proc,oper:e.operation}))).distinctAndSortBy(e=>e.part,e=>e.proc,e=>e.oper).map(e=>({part:e.part+`-`+e.proc.toString(),oper:e.oper})).toRArray()}}}).toRArray()}function Vk(e,t){let n=[],r=new Set,i=new Set,a=new Set;for(let n of e.material){let e=t.get(n.id);if(e!==void 0){for(let t of e.signaledInspections)r.add(t);for(let[t,n]of X.ofObject(e.completedInspections??{}))r.add(t),i.add(t),n.success&&a.add(t)}}for(let e of X.of(r).toSortedArray(e=>e))i.has(e)?n.push(e+`[`+(a.has(e)?`success`:`failed`)+`]`):n.push(e);return n.join(`, `)}function Hk(e,t,n,r,i){let a=`<table>
|
|
221
|
+
<thead><tr>`;a+=`<th>Date</th><th>Part</th><th>Station</th><th>Pallet</th>`,a+=`<th>Serial</th><th>Workorder</th><th>Inspection</th>`,a+=`<th>Elapsed Min</th><th>Target Min</th>`,i||(a+=`<th>Median Elapsed Min</th><th>Median Deviation</th>`),a+=`</tr></thead>
|
|
222
|
+
<tbody>
|
|
223
|
+
`;let o=X.of(e.data).flatMap(([e,t])=>t).filter(e=>(!n||e.endTime>=n)&&(!r||e.endTime<r)).toSortedArray(e=>e.endTime.getTime());for(let e of o)a+=`<tr>`,a+=`<td>`+e.endTime.toLocaleString(void 0,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`})+`</td>`,a+=`<td>`+e.part+`-`+X.of(e.material).map(e=>e.proc).distinctAndSortBy(e=>e).toRArray().join(`:`)+`</td>`,a+=`<td>`+bk(e.stationGroup,e.stationNumber)+`</td>`,a+=`<td>`+e.pallet.toString()+`</td>`,a+=`<td>`+e.material.filter(e=>e.serial).map(e=>e.serial).join(`,`)+`</td>`,a+=`<td>`+e.material.filter(e=>e.workorder).map(e=>e.workorder).join(`,`)+`</td>`,a+=`<td>`+Vk(e,t)+`</td>`,a+=`<td>`+(e.elapsedMinsPerMaterial*e.material.length).toFixed(1)+`</td>`,a+=`<td>`+e.activeMinutes.toFixed(1)+`</td>`,i||(a+=`<td>`+e.medianCycleMinutes.toFixed(1)+`</td>`,a+=`<td>`+e.MAD_aboveMinutes.toFixed(1)+`</td>`),a+=`</tr>
|
|
224
|
+
`;return a+=`</tbody>
|
|
225
|
+
</table>`,a}function Uk(e,t,n,r){(0,Mk.default)(Hk(e,t,n?n.start:void 0,n?n.end:void 0,r))}function Wk(e){let t=`<table>
|
|
226
|
+
<thead><tr>`;t+=`<th>Pallet</th><th>Date</th><th>Elapsed (min)</th>`,t+=`</tr></thead>
|
|
227
|
+
<tbody>
|
|
228
|
+
`;let n=e.keysToLazySeq().toSortedArray(e=>e);for(let r of n)for(let n of e.get(r)?.valuesToLazySeq()??[])t+=`<tr>`,t+=`<td>`+r.toString()+`</td>`,t+=`<td>`+n.x.toLocaleString(void 0,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`})+`</td>`,t+=`<td>`+n.y.toFixed(1)+`</td>`,t+=`</tr>
|
|
229
|
+
`;return t+=`</tbody>
|
|
230
|
+
</table>`,t}function Gk(e){(0,Mk.default)(Wk(e))}function Kk(e){switch(e.type){case Y.LoadUnloadCycle:case Y.MachineCycle:return e.loc+` #`+e.locnum.toString();case Y.AddToQueue:case Y.RemoveFromQueue:return e.loc;case Y.PartMark:return`Mark`;case Y.OrderAssignment:return`Workorder`;case Y.CloseOut:return`CloseOut`;case Y.Inspection:return`Signal `+((e.details||{}).InspectionType||``);case Y.InspectionForce:return`Signal `+e.program;case Y.InspectionResult:return`Inspect `+e.program;default:return e.loc}}function qk(e){switch(e.type){case Y.Inspection:case Y.InspectionForce:case Y.LoadUnloadCycle:case Y.PartMark:case Y.OrderAssignment:return e.result;case Y.AddToQueue:return`Add`;case Y.RemoveFromQueue:return`Remove`;case Y.MachineCycle:return e.program;case Y.InspectionResult:return e.result.toLowerCase()===`false`?`Failed`:`Succeeded`;default:return``}}function Jk(e){let t=`<table>
|
|
231
|
+
<thead><tr>`;t+=`<th>Date</th><th>Part</th><th>Station</th><th>Pallet</th>`,t+=`<th>Serial</th><th>Workorder</th><th>Result</th><th>Elapsed Min</th><th>Active Min</th>`,t+=`</tr></thead>
|
|
232
|
+
<tbody>
|
|
233
|
+
`;for(let n of e)if(!n.startofcycle)for(let e of n.material)t+=`<tr>`,t+=`<td>`+n.endUTC.toLocaleString(void 0,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`})+`</td>`,t+=`<td>`+e.part+`-`+e.proc.toString()+`</td>`,t+=`<td>`+Kk(n)+`</td>`,t+=`<td>`+n.pal.toString()+`</td>`,t+=`<td>`+(e.serial||``)+`</td>`,t+=`<td>`+(e.workorder||``)+`</td>`,t+=`<td>`+qk(n)+`</td>`,t+=`<td>`+ik(n.elapsed).toFixed(1)+`</td>`,t+=`<td>`+ik(n.active).toFixed(1)+`</td>`,t+=`</tr>
|
|
234
|
+
`;return t+=`</tbody>
|
|
235
|
+
</table>`,t}function Yk(e){(0,Mk.default)(Jk(e))}var Xk=Z([]),Zk=Xk,Qk=Z([]),$k=Qk;function eA(e){return e.map(e=>({station:e.stationGroup+` #`+e.stationNum.toString(),start:e.startUTC,end:e.endUTC,plannedDown:e.planDown??!1,part:e.parts?.map(e=>({uniq:e.jobUnique,proc:e.process,path:e.path}))}))}var tA=Z(null,(e,t,n)=>{t(Xk,e=>e.concat(eA(n.stationUse)))}),nA=Z(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.newJobs?.stationUse){let e=n.newJobs?.stationUse;t(Xk,t=>{if(i){let n=VC(r,-30),i=X.of(t).minBy(e=>e.end.getTime());if((i===void 0||i.start>=n)&&e.length===0)return t;t=t.filter(e=>e.start>=n)}return t.concat(eA(e))})}}),rA=Z(null,(e,t,n)=>{t(Qk,eA(n.stationUse))});function iA(e){let t=e.target;if(!t||!(t instanceof SVGElement))return null;let n=t instanceof SVGSVGElement?t:t.ownerSVGElement;if(!n)return null;let r=n.getScreenCTM();if(!r)return null;let i=n.createSVGPoint();return`changedTouches`in e?(i.x=e.changedTouches[0].clientX,i.y=e.changedTouches[0].clientY):(i.x=e.clientX,i.y=e.clientY),i.matrixTransform(r.inverse())}var aA=`__bms_measure_text_element`;function oA(e,t){try{let n=document.getElementById(aA);if(!n){let e=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);e.setAttribute(`aria-hidden`,`true`),e.style.position=`absolute`,e.style.top=`-100%`,e.style.left=`-100%`,e.style.width=`0`,e.style.height=`0`,e.style.opacity=`0`,n=document.createElementNS(`http://www.w3.org/2000/svg`,`text`),n.setAttribute(`id`,aA),t&&(n.style.fontSize=t.toString()),e.appendChild(n),document.body.appendChild(e)}return n.textContent=e,n.getComputedTextLength()}catch{return null}}function sA(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}function cA(e,t=0,n={}){typeof n!=`object`&&(n={});let{leading:r=!1,trailing:i=!0,maxWait:a}=n,o=[,,];r&&(o[0]=`leading`),i&&(o[1]=`trailing`);let s,c=null,l=sA(function(...t){s=e.apply(this,t),c=null},t,{edges:o}),u=function(...t){return a!=null&&(c===null&&(c=Date.now()),Date.now()-c>=a)?(s=e.apply(this,t),c=Date.now(),l.cancel(),l.schedule(),s):(l.apply(this,t),s)};return u.cancel=l.cancel,u.flush=()=>(l.flush(),s),u}function lA(e,t=0,n={}){let{leading:r=!0,trailing:i=!0}=n;return cA(e,t,{leading:r,maxWait:t,trailing:i})}var uA=(e,t,n,r)=>{switch(t){case`debounce`:return cA(e,n,r);case`throttle`:return lA(e,n,r);default:return e}},dA=e=>{let t=L.useRef(e);return L.useEffect(()=>{t.current=e}),L.useMemo(()=>((...e)=>t.current?.call(t,...e)),[])},fA=e=>{let[t,n]=L.useState(e?.current||null);return e&&setTimeout(()=>{e.current!==t&&n(e.current)},0),{refProxy:L.useMemo(()=>new Proxy(e=>{e!==t&&n(e)},{get(e,n){return n===`current`?t:e[n]},set(e,t,r){return t===`current`?n(r):e[t]=r,!0}}),[t]),refElement:t,setRefElement:n}},pA=(e,t)=>{let n=e.borderBoxSize?.[0],r=e.contentBoxSize?.[0];return t===`border-box`&&n?{width:n.inlineSize,height:n.blockSize}:t===`content-box`&&r?{width:r.inlineSize,height:r.blockSize}:{width:e.contentRect.width,height:e.contentRect.height}};function mA({skipOnMount:e=!1,refreshMode:t,refreshRate:n=1e3,refreshOptions:r,handleWidth:i=!0,handleHeight:a=!0,targetRef:o,observerOptions:s,onResize:c,disableRerender:l=!1}={}){let u=(0,L.useRef)(e),d=dA(c),[f,p]=(0,L.useState)({width:void 0,height:void 0}),m=(0,L.useRef)({width:void 0,height:void 0}),{refProxy:h,refElement:g}=fA(o),{box:_}=s||{},v=(0,L.useCallback)(e=>{if(!i&&!a)return;if(u.current){u.current=!1;return}let t=(e,t)=>i&&e.width!==t.width||a&&e.height!==t.height;e.forEach(e=>{let n=pA(e,_);l?t(m.current,n)&&(m.current.width=n.width,m.current.height=n.height,d?.({width:n.width,height:n.height,entry:e})):p(r=>t(r,n)?(d?.({width:n.width,height:n.height,entry:e}),n):r)})},[i,a,u,_,l]),y=(0,L.useCallback)(uA(v,t,n,r),[v,t,n,r]);return(0,L.useEffect)(()=>{let e;if(g)try{e=new window.ResizeObserver(y),e.observe(g,s)}catch(e){console.warn(`ResizeObserver not supported or failed to initialize:`,e)}else (f.width||f.height)&&(d?.({width:null,height:null,entry:null}),m.current.width=void 0,m.current.height=void 0,l||p({width:void 0,height:void 0}));return()=>{var t,n,r;(t=e?.disconnect)==null||t.call(e),(r=(n=y).cancel)==null||r.call(n)}},[y,g]),Object.assign({ref:h},l?m.current:f)}var hA=H(`div`)({backgroundColor:E[700],color:`white`,padding:`0.3rem 0.5rem`,borderRadius:`3px`,boxShadow:`0 1px 2px rgba(33, 33, 33, 0.2)`,pointerEvents:`none`});function gA({chartHeight:e,chartWidth:t,atom:n,TooltipContent:r}){let i=Q(n),{ref:a,width:o,height:s}=mA({refreshMode:`debounce`,refreshRate:100});if(!i)return null;let c=i.left,l=i.top;return o!==void 0&&(c+10+o>t&&c+10>t/2?c=c-o-30:c+=10),s!==void 0&&(l+10+s>e&&l+10>e/2?l=l-s-10:l+=10),(0,R.jsx)(`div`,{style:{visibility:s!==void 0&&o!==void 0?`visible`:`hidden`,position:`absolute`,left:c,top:l,zIndex:10},children:(0,R.jsx)(hA,{ref:a,style:i?.zIndex?{zIndex:i.zIndex}:void 0,children:(0,R.jsx)(r,{tooltip:i})})})}function _A({chart:e,tooltipAtom:t,TooltipContent:n,sx:r,autoHeight:i}){let{ref:a,width:o,height:s}=mA({refreshMode:`debounce`,refreshRate:100});return(0,R.jsx)(G,{ref:a,sx:r,children:(0,R.jsxs)(G,{sx:{position:`relative`,overflow:`hidden`},children:[o&&(s||i)?e({width:o,height:s??0}):void 0,s&&o?(0,R.jsx)(gA,{chartHeight:s,chartWidth:o,atom:t,TooltipContent:n}):void 0]})})}function vA(e,t,n){return X.of(e.material).collect(e=>{if(e.action.type!==qS.Machining||!e.location.palletNum)return null;let t=n.get(e.location.palletNum);return t?{mat:e,loc:t}:null}).groupBy(({loc:e})=>e.group,({loc:e})=>e.num).map(([[n,r],i])=>{let a=t.get(new ak(i[0].mat.partName,n,i[0].mat.action.program??``)),o=rk(i[0].mat.action.elapsedMachiningTime??`PT0S`),s=rk(i[0].mat.action.expectedRemainingMachiningTime??`PT0S`);return{station:bk(n,r),start:$C(e.timeOfCurrentStatusUTC,-o),expectedEnd:$C(e.timeOfCurrentStatusUTC,s),isOutlier:a?dk(a,o/60/i.length):!1,parts:[{part:i[0].mat.partName,oper:i[0].mat.action.program??``}]}})}function yA(e,t,n){return X.of(e.material).collect(e=>{if(e.action.type===qS.UnloadToCompletedMaterial||e.action.type===qS.UnloadToInProcess){if(!e.location.palletNum)return null;let t=n.get(e.location.palletNum);return t?{mat:e,material:[e],proc:e.process,path:e.path,loc:t}:null}else if(e.action.type===qS.Loading){if(!e.action.loadOntoPalletNum)return null;let t=n.get(e.action.loadOntoPalletNum);return t?{mat:e,material:[e],proc:e.action.processAfterLoad??e.process,path:e.action.pathAfterLoad??e.path,loc:t}:null}return null}).map(t=>{let n=e.jobs[t.mat.jobUnique]?.procsAndPaths?.[t.proc-1]?.paths?.[t.path-1];return t.mat.action.type===qS.Loading?{...t,expectedLoadSecs:rk(n?.expectedLoadTime??`PT0S`)}:{...t,expectedLoadSecs:rk(n?.expectedUnloadTime??`PT0S`)}}).groupBy(({loc:e})=>e.group,({loc:e})=>e.num).map(([[n,r],i])=>{let a=hk(i,e=>ik(e.mat.action.elapsedLoadUnloadTime??`PT0S`),e=>e.expectedLoadSecs/60),o=!1,s=0;for(let{cycle:e,elapsedForSingleMaterialMinutes:r}of a){let i=t.get(new ak(e.mat.partName,n,e.mat.action.type===qS.Loading?`LOAD-`+e.proc.toString():`UNLOAD-`+e.proc.toString()));i&&dk(i,r)&&(o=!0),e.expectedLoadSecs>0?s+=e.expectedLoadSecs:i?.expectedCycleMinutesForSingleMat&&(s+=i.expectedCycleMinutesForSingleMat*60)}let c=rk(i[0].mat.action.elapsedLoadUnloadTime??`PT0S`);return{station:bk(n,r),start:$C(e.timeOfCurrentStatusUTC,-c),expectedEnd:$C(e.timeOfCurrentStatusUTC,-c+s),isOutlier:o,parts:X.of(i).distinctAndSortBy(e=>e.mat.partName,e=>e.proc,e=>e.mat.action.type===qS.Loading?`LOAD`:`UNLOAD`).map(e=>({part:e.mat.partName+`-`+e.proc.toString(),oper:e.mat.action.type===qS.Loading?`LOAD`:`UNLOAD`})).toRArray()}})}function bA(e,t){let n=X.ofObject(e.pallets).buildHashMap(([,e])=>e.palletNum,(e,[,t])=>t.currentPalletLocation);return vA(e,t,n).concat(yA(e,t,n)).toRArray()}function xA({scale:e,width:t,tickOverride:n}){return(0,R.jsx)(`g`,{children:(n??e.ticks()).map((n,r)=>(0,R.jsx)(`line`,{x1:0,y1:e(n),x2:t,y2:e(n),stroke:`#eaf0f6`,strokeWidth:1},r))})}function SA({scale:e,height:t,tickOverride:n}){return(0,R.jsx)(`g`,{children:(n??e.ticks()).map((n,r)=>(0,R.jsx)(`line`,{x1:e(n),y1:0,x2:e(n),y2:t,stroke:`#eaf0f6`,strokeWidth:1},r))})}function CA({xScale:e,yScale:t,width:n,height:r,rowTickOverride:i,colTickOverride:a}){return(0,R.jsxs)(`g`,{children:[(0,R.jsx)(xA,{scale:t,width:n,tickOverride:i}),(0,R.jsx)(SA,{scale:e,height:r,tickOverride:a})]})}var wA=8;function TA(e,t){if(t)return t.map(t=>({tick:t,pos:e(t)??0}));if(`ticks`in e&&e.ticks)return e.ticks().map(t=>({tick:t,pos:e(t)??0}));if(`bandwidth`in e&&e.bandwidth){let t=e.bandwidth();return e.domain().map(n=>({tick:n,pos:(e(n)??0)+t/2}))}else return e.domain().map(t=>({tick:t,pos:e(t)??0}))}function EA({top:e,scale:t,label:n,fontSize:r,tickFormat:i,tickOverride:a}){r??=10,i??=`tickFormat`in t&&t.tickFormat?t.tickFormat():e=>String(e);let o=TA(t,a),s=t.range();return(0,R.jsxs)(`g`,{transform:`translate(0, ${e})`,children:[(0,R.jsx)(`line`,{x1:s[0],y1:0,x2:s[1],y2:0,stroke:`#222`,strokeWidth:1,shapeRendering:`crispEdges`}),o.map((e,t)=>(0,R.jsxs)(`g`,{transform:`translate(${e.pos}, 0)`,children:[(0,R.jsx)(`line`,{y1:wA,y2:0,stroke:`#222`,strokeWidth:1,shapeRendering:`crispEdges`}),(0,R.jsx)(`text`,{dy:wA+5,textAnchor:`middle`,fontSize:r,fill:`#222`,dominantBaseline:`hanging`,children:i(e.tick)})]},t)),n?(0,R.jsx)(`text`,{x:(s[0]+s[1])/2,y:wA+r+20,textAnchor:`middle`,fontSize:r+2,fill:`#222`,children:n}):void 0]})}function DA({left:e,scale:t,label:n,fontSize:r,tickFormat:i,tickOverride:a}){r??=10,i??=`tickFormat`in t&&t.tickFormat?t.tickFormat():e=>String(e);let o=TA(t,a),s=t.range();return(0,R.jsxs)(`g`,{transform:`translate(${e}, 0)`,children:[(0,R.jsx)(`line`,{x1:0,y1:s[0],x2:0,y2:s[1],stroke:`#222`,strokeWidth:1,shapeRendering:`crispEdges`}),o.map((e,t)=>(0,R.jsxs)(`g`,{transform:`translate(0, ${e.pos})`,children:[(0,R.jsx)(`line`,{x1:-wA,x2:0,y1:0,y2:0,stroke:`#222`,strokeWidth:1,shapeRendering:`crispEdges`}),(0,R.jsx)(`text`,{dx:-wA-5,textAnchor:`end`,fontSize:r,fill:`#222`,dominantBaseline:`middle`,children:i(e.tick)})]},t)),n?(0,R.jsx)(`text`,{x:-(s[0]+s[1])/2,y:-wA-r-20,textAnchor:`middle`,fontSize:r+2,fill:`#222`,transform:`rotate(-90)`,children:n}):void 0]})}function OA({top:e,scale:t,label:n,fontSize:r,tickFormat:i,tickOverride:a}){r??=10,i??=`tickFormat`in t&&t.tickFormat?t.tickFormat():e=>String(e);let o=TA(t,a),s=t.range();return(0,R.jsxs)(`g`,{transform:`translate(0, ${e})`,children:[(0,R.jsx)(`line`,{x1:s[0],y1:0,x2:s[1],y2:0,stroke:`#222`,strokeWidth:1,shapeRendering:`crispEdges`}),o.map((e,t)=>(0,R.jsxs)(`g`,{transform:`translate(${e.pos}, 0)`,children:[(0,R.jsx)(`line`,{y1:0,y2:-wA,stroke:`#222`,strokeWidth:1,shapeRendering:`crispEdges`}),(0,R.jsx)(`text`,{dy:-wA-5,textAnchor:`middle`,fontSize:r,fill:`#222`,children:i(e.tick)})]},t)),n?(0,R.jsx)(`text`,{x:(s[0]+s[1])/2,y:-wA-r-20,textAnchor:`middle`,fontSize:r+2,fill:`#222`,children:n}):void 0]})}function kA(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function AA(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function jA(e){let t,n,r;e.length===2?(t=e===kA||e===AA?e:MA,n=e,r=e):(t=kA,n=(t,n)=>kA(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function MA(){return 0}function NA(e){return e===null?NaN:+e}var PA=jA(kA),FA=PA.right;PA.left,jA(NA).center;var IA=class extends Map{constructor(e,t=BA){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(LA(this,e))}has(e){return super.has(LA(this,e))}set(e,t){return super.set(RA(this,e),t)}delete(e){return super.delete(zA(this,e))}};function LA({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function RA({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function zA({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function BA(e){return typeof e==`object`&&e?e.valueOf():e}var VA=Math.sqrt(50),HA=Math.sqrt(10),UA=Math.sqrt(2);function WA(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=VA?10:a>=HA?5:a>=UA?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?WA(e,t,n*2):[s,c,l]}function GA(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?WA(t,e,n):WA(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r)if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o;else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function KA(e,t,n){return t=+t,e=+e,n=+n,WA(e,t,n)[2]}function qA(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?KA(t,e,n):KA(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function JA(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}function YA(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}var XA=Symbol(`implicit`);function ZA(){var e=new IA,t=[],n=[],r=XA;function i(i){let a=e.get(i);if(a===void 0){if(r!==XA)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new IA;for(let r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return ZA(t,n).unknown(r)},YA.apply(i,arguments),i}function QA(){var e=ZA().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var e=t().length,d=i<r,f=d?i:r,p=d?r:i;a=(p-f)/Math.max(1,e-c+l*2),s&&(a=Math.floor(a)),f+=(p-f-a*(e-c))*u,o=a*(1-c),s&&(f=Math.round(f),o=Math.round(o));var m=JA(e).map(function(e){return f+a*e});return n(d?m.reverse():m)}return e.domain=function(e){return arguments.length?(t(e),d()):t()},e.range=function(e){return arguments.length?([r,i]=e,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(e){return[r,i]=e,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(e){return arguments.length?(s=!!e,d()):s},e.padding=function(e){return arguments.length?(c=Math.min(1,l=+e),d()):c},e.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),d()):c},e.paddingOuter=function(e){return arguments.length?(l=+e,d()):l},e.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},e.copy=function(){return QA(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},YA.apply(d(),arguments)}function $A(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ej(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function tj(){}var nj=.7,rj=1/nj,ij=`\\s*([+-]?\\d+)\\s*`,aj=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,oj=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,sj=/^#([0-9a-f]{3,8})$/,cj=RegExp(`^rgb\\(${ij},${ij},${ij}\\)$`),lj=RegExp(`^rgb\\(${oj},${oj},${oj}\\)$`),uj=RegExp(`^rgba\\(${ij},${ij},${ij},${aj}\\)$`),dj=RegExp(`^rgba\\(${oj},${oj},${oj},${aj}\\)$`),fj=RegExp(`^hsl\\(${aj},${oj},${oj}\\)$`),pj=RegExp(`^hsla\\(${aj},${oj},${oj},${aj}\\)$`),mj={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};$A(tj,yj,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:hj,formatHex:hj,formatHex8:gj,formatHsl:_j,formatRgb:vj,toString:vj});function hj(){return this.rgb().formatHex()}function gj(){return this.rgb().formatHex8()}function _j(){return Mj(this).formatHsl()}function vj(){return this.rgb().formatRgb()}function yj(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=sj.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?bj(t):n===3?new wj(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?xj(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?xj(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=cj.exec(e))?new wj(t[1],t[2],t[3],1):(t=lj.exec(e))?new wj(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=uj.exec(e))?xj(t[1],t[2],t[3],t[4]):(t=dj.exec(e))?xj(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=fj.exec(e))?jj(t[1],t[2]/100,t[3]/100,1):(t=pj.exec(e))?jj(t[1],t[2]/100,t[3]/100,t[4]):mj.hasOwnProperty(e)?bj(mj[e]):e===`transparent`?new wj(NaN,NaN,NaN,0):null}function bj(e){return new wj(e>>16&255,e>>8&255,e&255,1)}function xj(e,t,n,r){return r<=0&&(e=t=n=NaN),new wj(e,t,n,r)}function Sj(e){return e instanceof tj||(e=yj(e)),e?(e=e.rgb(),new wj(e.r,e.g,e.b,e.opacity)):new wj}function Cj(e,t,n,r){return arguments.length===1?Sj(e):new wj(e,t,n,r??1)}function wj(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}$A(wj,Cj,ej(tj,{brighter(e){return e=e==null?rj:rj**+e,new wj(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?nj:nj**+e,new wj(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new wj(kj(this.r),kj(this.g),kj(this.b),Oj(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:Tj,formatHex:Tj,formatHex8:Ej,formatRgb:Dj,toString:Dj}));function Tj(){return`#${Aj(this.r)}${Aj(this.g)}${Aj(this.b)}`}function Ej(){return`#${Aj(this.r)}${Aj(this.g)}${Aj(this.b)}${Aj((isNaN(this.opacity)?1:this.opacity)*255)}`}function Dj(){let e=Oj(this.opacity);return`${e===1?`rgb(`:`rgba(`}${kj(this.r)}, ${kj(this.g)}, ${kj(this.b)}${e===1?`)`:`, ${e})`}`}function Oj(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function kj(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Aj(e){return e=kj(e),(e<16?`0`:``)+e.toString(16)}function jj(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Pj(e,t,n,r)}function Mj(e){if(e instanceof Pj)return new Pj(e.h,e.s,e.l,e.opacity);if(e instanceof tj||(e=yj(e)),!e)return new Pj;if(e instanceof Pj)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new Pj(o,s,c,e.opacity)}function Nj(e,t,n,r){return arguments.length===1?Mj(e):new Pj(e,t,n,r??1)}function Pj(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}$A(Pj,Nj,ej(tj,{brighter(e){return e=e==null?rj:rj**+e,new Pj(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?nj:nj**+e,new Pj(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,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new wj(Lj(e>=240?e-240:e+120,i,r),Lj(e,i,r),Lj(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Pj(Fj(this.h),Ij(this.s),Ij(this.l),Oj(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(){let e=Oj(this.opacity);return`${e===1?`hsl(`:`hsla(`}${Fj(this.h)}, ${Ij(this.s)*100}%, ${Ij(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function Fj(e){return e=(e||0)%360,e<0?e+360:e}function Ij(e){return Math.max(0,Math.min(1,e||0))}function Lj(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var Rj=e=>()=>e;function zj(e,t){return function(n){return e+n*t}}function Bj(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function Vj(e){return(e=+e)==1?Hj:function(t,n){return n-t?Bj(t,n,e):Rj(isNaN(t)?n:t)}}function Hj(e,t){var n=t-e;return n?zj(e,n):Rj(isNaN(e)?t:e)}var Uj=(function e(t){var n=Vj(t);function r(e,t){var r=n((e=Cj(e)).r,(t=Cj(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=Hj(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function Wj(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function Gj(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Kj(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=tM(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function qj(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Jj(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Yj(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=tM(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var Xj=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Zj=new RegExp(Xj.source,`g`);function Qj(e){return function(){return e}}function $j(e){return function(t){return e(t)+``}}function eM(e,t){var n=Xj.lastIndex=Zj.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=Xj.exec(e))&&(i=Zj.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:Jj(r,i)})),n=Zj.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?$j(c[0].x):Qj(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function tM(e,t){var n=typeof t,r;return t==null||n===`boolean`?Rj(t):(n===`number`?Jj:n===`string`?(r=yj(t))?(t=r,Uj):eM:t instanceof yj?Uj:t instanceof Date?qj:Gj(t)?Wj:Array.isArray(t)?Kj:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?Yj:Jj)(e,t)}function nM(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function rM(e){return function(){return e}}function iM(e){return+e}var aM=[0,1];function oM(e){return e}function sM(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:rM(isNaN(t)?NaN:.5)}function cM(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function lM(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=sM(i,r),a=n(o,a)):(r=sM(r,i),a=n(a,o)),function(e){return a(r(e))}}function uM(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=sM(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=FA(e,t,1,r)-1;return a[n](i[n](t))}}function dM(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function fM(){var e=aM,t=aM,n=tM,r,i,a,o=oM,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==oM&&(o=cM(e[0],e[n-1])),s=n>2?uM:lM,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||=s(e.map(r),t,n))(r(o(i)))}return d.invert=function(n){return o(i((l||=s(t,e.map(r),Jj))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,iM),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=nM,u()},d.clamp=function(e){return arguments.length?(o=e?!0:oM,u()):o!==oM},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function pM(){return fM()(oM,oM)}function mM(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function hM(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function gM(e){return e=hM(Math.abs(e)),e?e[1]:NaN}function _M(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function vM(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var yM=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function bM(e){if(!(t=yM.exec(e)))throw Error(`invalid format: `+e);var t;return new xM({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]})}bM.prototype=xM.prototype;function xM(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+``}xM.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 SM(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var CM;function wM(e,t){var n=hM(e,t);if(!n)return CM=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(CM=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+hM(e,Math.max(0,t+a-1))[0]}function TM(e,t){var n=hM(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var EM={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:mM,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)=>TM(e*100,t),r:TM,s:wM,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function DM(e){return e}var OM=Array.prototype.map,kM=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function AM(e){var t=e.grouping===void 0||e.thousands===void 0?DM:_M(OM.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?DM:vM(OM.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e,l){e=bM(e);var u=e.fill,d=e.align,f=e.sign,p=e.symbol,m=e.zero,h=e.width,g=e.comma,_=e.precision,v=e.trim,y=e.type;y===`n`?(g=!0,y=`g`):EM[y]||(_===void 0&&(_=12),v=!0,y=`g`),(m||u===`0`&&d===`=`)&&(m=!0,u=`0`,d=`=`);var b=(l&&l.prefix!==void 0?l.prefix:``)+(p===`$`?n:p===`#`&&/[boxX]/.test(y)?`0`+y.toLowerCase():``),x=(p===`$`?r:/[%p]/.test(y)?o:``)+(l&&l.suffix!==void 0?l.suffix:``),S=EM[y],C=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function w(e){var n=b,r=x,o,l,p;if(y===`c`)r=S(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:S(Math.abs(e),_),v&&(e=SM(e)),w&&+e==0&&f!==`+`&&(w=!1),n=(w?f===`(`?f:s:f===`-`||f===`(`?``:f)+n,r=(y===`s`&&!isNaN(e)&&CM!==void 0?kM[8+CM/3]:``)+r+(w&&f===`(`?`)`:``),C){for(o=-1,l=e.length;++o<l;)if(p=e.charCodeAt(o),48>p||p>57){r=(p===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}g&&!m&&(e=t(e,1/0));var T=n.length+e.length+r.length,E=T<h?Array(h-T+1).join(u):``;switch(g&&m&&(e=t(E+e,E.length?h-r.length:1/0),E=``),d){case`<`:e=n+e+r+E;break;case`=`:e=n+E+e+r;break;case`^`:e=E.slice(0,T=E.length>>1)+n+e+r+E.slice(T);break;default:e=E+n+e+r;break}return a(e)}return w.toString=function(){return e+``},w}function u(e,t){var n=Math.max(-8,Math.min(8,Math.floor(gM(t)/3)))*3,r=10**-n,i=l((e=bM(e),e.type=`f`,e),{suffix:kM[8+n/3]});return function(e){return i(r*e)}}return{format:l,formatPrefix:u}}var jM,MM,NM;PM({thousands:`,`,grouping:[3],currency:[`$`,``]});function PM(e){return jM=AM(e),MM=jM.format,NM=jM.formatPrefix,jM}function FM(e){return Math.max(0,-gM(Math.abs(e)))}function IM(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(gM(t)/3)))*3-gM(Math.abs(e)))}function LM(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,gM(t)-gM(e))+1}function RM(e,t,n,r){var i=qA(e,t,n),a;switch(r=bM(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=IM(i,o))&&(r.precision=a),NM(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=LM(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=FM(i))&&(r.precision=a-(r.type===`%`)*2);break}return MM(r)}function zM(e){var t=e.domain;return e.ticks=function(e){var n=t();return GA(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return RM(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-- >0;){if(l=KA(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function BM(){var e=pM();return e.copy=function(){return dM(e,BM())},YA.apply(e,arguments),zM(e)}function VM(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}var HM=new Date,UM=new Date;function WM(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>WM(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(HM.setTime(+t),UM.setTime(+r),e(HM),e(UM),Math.floor(n(HM,UM))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var GM=WM(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);GM.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?WM(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):GM),GM.range;var KM=1e3,qM=KM*60,JM=qM*60,YM=JM*24,XM=YM*7,ZM=YM*30,QM=YM*365,$M=WM(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*KM)},(e,t)=>(t-e)/KM,e=>e.getUTCSeconds());$M.range;var eN=WM(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*KM)},(e,t)=>{e.setTime(+e+t*qM)},(e,t)=>(t-e)/qM,e=>e.getMinutes());eN.range;var tN=WM(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*qM)},(e,t)=>(t-e)/qM,e=>e.getUTCMinutes());tN.range;var nN=WM(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*KM-e.getMinutes()*qM)},(e,t)=>{e.setTime(+e+t*JM)},(e,t)=>(t-e)/JM,e=>e.getHours());nN.range;var rN=WM(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*JM)},(e,t)=>(t-e)/JM,e=>e.getUTCHours());rN.range;var iN=WM(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*qM)/YM,e=>e.getDate()-1);iN.range;var aN=WM(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/YM,e=>e.getUTCDate()-1);aN.range;var oN=WM(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/YM,e=>Math.floor(e/YM));oN.range;function sN(e){return WM(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*qM)/XM)}var cN=sN(0),lN=sN(1),uN=sN(2),dN=sN(3),fN=sN(4),pN=sN(5),mN=sN(6);cN.range,lN.range,uN.range,dN.range,fN.range,pN.range,mN.range;function hN(e){return WM(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/XM)}var gN=hN(0),_N=hN(1),vN=hN(2),yN=hN(3),bN=hN(4),xN=hN(5),SN=hN(6);gN.range,_N.range,vN.range,yN.range,bN.range,xN.range,SN.range;var CN=WM(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());CN.range;var wN=WM(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());wN.range;var TN=WM(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());TN.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:WM(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),TN.range;var EN=WM(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());EN.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:WM(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),EN.range;function DN(e,t,n,r,i,a){let o=[[$M,1,KM],[$M,5,5*KM],[$M,15,15*KM],[$M,30,30*KM],[a,1,qM],[a,5,5*qM],[a,15,15*qM],[a,30,30*qM],[i,1,JM],[i,3,3*JM],[i,6,6*JM],[i,12,12*JM],[r,1,YM],[r,2,2*YM],[n,1,XM],[t,1,ZM],[t,3,3*ZM],[e,1,QM]];function s(e,t,n){let r=t<e;r&&([e,t]=[t,e]);let i=n&&typeof n.range==`function`?n:c(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a}function c(t,n,r){let i=Math.abs(n-t)/r,a=jA(([,,e])=>e).right(o,i);if(a===o.length)return e.every(qA(t/QM,n/QM,r));if(a===0)return GM.every(Math.max(qA(t,n,r),1));let[s,c]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(c)}return[s,c]}var[Mte,Nte]=DN(EN,wN,gN,oN,rN,tN),[ON,kN]=DN(TN,CN,cN,iN,nN,eN);function AN(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 jN(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 MN(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function NN(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=BN(i),u=VN(i),d=BN(a),f=VN(a),p=BN(o),m=VN(o),h=BN(s),g=VN(s),_=BN(c),v=VN(c),y={a:te,A:M,b:ne,B:N,c:null,d:cP,e:cP,f:pP,g:wP,G:EP,H:lP,I:uP,j:dP,L:fP,m:mP,M:hP,p:P,q:re,Q:YP,s:XP,S:gP,u:_P,U:vP,V:bP,w:xP,W:SP,x:null,X:null,y:CP,Y:TP,Z:DP,"%":JP},b={a:ie,A:ae,b:oe,B:se,c:null,d:OP,e:OP,f:NP,g:WP,G:KP,H:kP,I:AP,j:jP,L:MP,m:PP,M:FP,p:ce,q:le,Q:YP,s:XP,S:IP,u:LP,U:RP,V:BP,w:VP,W:HP,x:null,X:null,y:UP,Y:GP,Z:qP,"%":JP},x={a:E,A:D,b:O,B:k,c:ee,d:QN,e:QN,f:iP,g:JN,G:qN,H:eP,I:eP,j:$N,L:rP,m:ZN,M:tP,p:T,q:XN,Q:oP,s:sP,S:nP,u:UN,U:WN,V:GN,w:HN,W:KN,x:A,X:j,y:JN,Y:qN,Z:YN,"%":aP};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=PN[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=MN(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=jN(MN(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?_N.ceil(a):_N(a),a=aN.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=AN(MN(r.y,0,1)),o=a.getDay(),a=o>4||o===0?lN.ceil(a):lN(a),a=iN.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else (`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:`W`in r?1:0),o=`Z`in r?jN(MN(r.y,0,1)).getUTCDay():AN(MN(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,jN(r)):AN(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in PN?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function ee(e,n,r){return w(e,t,n,r)}function A(e,t,r){return w(e,n,t,r)}function j(e,t,n){return w(e,r,t,n)}function te(e){return o[e.getDay()]}function M(e){return a[e.getDay()]}function ne(e){return c[e.getMonth()]}function N(e){return s[e.getMonth()]}function P(e){return i[+(e.getHours()>=12)]}function re(e){return 1+~~(e.getMonth()/3)}function ie(e){return o[e.getUTCDay()]}function ae(e){return a[e.getUTCDay()]}function oe(e){return c[e.getUTCMonth()]}function se(e){return s[e.getUTCMonth()]}function ce(e){return i[+(e.getUTCHours()>=12)]}function le(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var PN={"-":``,_:` `,0:`0`},FN=/^\s*\d+/,IN=/^%/,LN=/[\\^$*+?|[\]().{}]/g;function RN(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function zN(e){return e.replace(LN,`\\$&`)}function BN(e){return RegExp(`^(?:`+e.map(zN).join(`|`)+`)`,`i`)}function VN(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function HN(e,t,n){var r=FN.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function UN(e,t,n){var r=FN.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function WN(e,t,n){var r=FN.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function GN(e,t,n){var r=FN.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function KN(e,t,n){var r=FN.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function qN(e,t,n){var r=FN.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function JN(e,t,n){var r=FN.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function YN(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function XN(e,t,n){var r=FN.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function ZN(e,t,n){var r=FN.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function QN(e,t,n){var r=FN.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function $N(e,t,n){var r=FN.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function eP(e,t,n){var r=FN.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function tP(e,t,n){var r=FN.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function nP(e,t,n){var r=FN.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function rP(e,t,n){var r=FN.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function iP(e,t,n){var r=FN.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function aP(e,t,n){var r=IN.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function oP(e,t,n){var r=FN.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function sP(e,t,n){var r=FN.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function cP(e,t){return RN(e.getDate(),t,2)}function lP(e,t){return RN(e.getHours(),t,2)}function uP(e,t){return RN(e.getHours()%12||12,t,2)}function dP(e,t){return RN(1+iN.count(TN(e),e),t,3)}function fP(e,t){return RN(e.getMilliseconds(),t,3)}function pP(e,t){return fP(e,t)+`000`}function mP(e,t){return RN(e.getMonth()+1,t,2)}function hP(e,t){return RN(e.getMinutes(),t,2)}function gP(e,t){return RN(e.getSeconds(),t,2)}function _P(e){var t=e.getDay();return t===0?7:t}function vP(e,t){return RN(cN.count(TN(e)-1,e),t,2)}function yP(e){var t=e.getDay();return t>=4||t===0?fN(e):fN.ceil(e)}function bP(e,t){return e=yP(e),RN(fN.count(TN(e),e)+(TN(e).getDay()===4),t,2)}function xP(e){return e.getDay()}function SP(e,t){return RN(lN.count(TN(e)-1,e),t,2)}function CP(e,t){return RN(e.getFullYear()%100,t,2)}function wP(e,t){return e=yP(e),RN(e.getFullYear()%100,t,2)}function TP(e,t){return RN(e.getFullYear()%1e4,t,4)}function EP(e,t){var n=e.getDay();return e=n>=4||n===0?fN(e):fN.ceil(e),RN(e.getFullYear()%1e4,t,4)}function DP(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+RN(t/60|0,`0`,2)+RN(t%60,`0`,2)}function OP(e,t){return RN(e.getUTCDate(),t,2)}function kP(e,t){return RN(e.getUTCHours(),t,2)}function AP(e,t){return RN(e.getUTCHours()%12||12,t,2)}function jP(e,t){return RN(1+aN.count(EN(e),e),t,3)}function MP(e,t){return RN(e.getUTCMilliseconds(),t,3)}function NP(e,t){return MP(e,t)+`000`}function PP(e,t){return RN(e.getUTCMonth()+1,t,2)}function FP(e,t){return RN(e.getUTCMinutes(),t,2)}function IP(e,t){return RN(e.getUTCSeconds(),t,2)}function LP(e){var t=e.getUTCDay();return t===0?7:t}function RP(e,t){return RN(gN.count(EN(e)-1,e),t,2)}function zP(e){var t=e.getUTCDay();return t>=4||t===0?bN(e):bN.ceil(e)}function BP(e,t){return e=zP(e),RN(bN.count(EN(e),e)+(EN(e).getUTCDay()===4),t,2)}function VP(e){return e.getUTCDay()}function HP(e,t){return RN(_N.count(EN(e)-1,e),t,2)}function UP(e,t){return RN(e.getUTCFullYear()%100,t,2)}function WP(e,t){return e=zP(e),RN(e.getUTCFullYear()%100,t,2)}function GP(e,t){return RN(e.getUTCFullYear()%1e4,t,4)}function KP(e,t){var n=e.getUTCDay();return e=n>=4||n===0?bN(e):bN.ceil(e),RN(e.getUTCFullYear()%1e4,t,4)}function qP(){return`+0000`}function JP(){return`%`}function YP(e){return+e}function XP(e){return Math.floor(e/1e3)}var ZP,QP;$P({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 $P(e){return ZP=NN(e),QP=ZP.format,ZP.parse,ZP.utcFormat,ZP.utcParse,ZP}function eF(e){return new Date(e)}function tF(e){return e instanceof Date?+e:+new Date(+e)}function nF(e,t,n,r,i,a,o,s,c,l){var u=pM(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e)<e?p:s(e)<e?m:o(e)<e?h:a(e)<e?g:r(e)<e?i(e)<e?_:v:n(e)<e?y:b)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,tF)):f().map(eF)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return t==null?x:l(t)},u.nice=function(e){var n=f();return(!e||typeof e.range!=`function`)&&(e=t(n[0],n[n.length-1],e??10)),e?f(VM(n,e)):u},u.copy=function(){return dM(u,nF(e,t,n,r,i,a,o,s,c,l))},u}function rF(){return YA.apply(nF(ON,kN,TN,CN,cN,iN,nN,eN,$M,QP).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var iF=C[200],aF=C[600],oF=C[900],sF=y[700],cF=E[400],lF=E[100];function uF(){let e=Q(JE),t=Q(Zk);return(0,L.useMemo)(()=>{let n=WC(new Date,-12);return X.of(t).filter(e=>e.end>=n).sortBy(e=>e.plannedDown?1:0).map(t=>({station:t.station,start:t.start,end:t.end,plannedDown:t.plannedDown,parts:X.of(t.parts??[]).collect(t=>{let n=e.get(t.uniq);return n?n.partName+`-`+t.proc.toString():null}).distinctAndSortBy(e=>e).toRArray()})).toRArray()},[e,t])}var dF=Z(null),fF=14,pF=20,mF=10,hF=2;function gF(e,t,n,r,i){let a=JT.build(e,e=>e.station).union(JT.build(t,e=>e.station)),o=(a.toAscLazySeq().map(e=>oA(e,fF)).maxBy(e=>e??0)??20)+30,s=Math.max(r-o-hF,5),c=Math.max(i-mF-pF,5),l=rF().domain([WC(n,-12),WC(n,8)]).range([0,s]),u=QA().domain(Array.from(a)).range([0,c]).padding(.3);return{xScale:l,yScale:u,actualPlannedScale:QA().domain([`actual`,`planned`]).range([0,u.bandwidth()]).padding(.1),marginLeft:o}}function _F({xScale:e,yScale:t}){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(EA,{scale:e,top:t.range()[1]}),(0,R.jsx)(DA,{scale:t,left:e.range()[0],fontSize:fF}),(0,R.jsx)(SA,{scale:e,height:t.range()[1]-t.range()[0]})]})}function vF({cycles:e,xScale:t,yScale:n,actualPlannedScale:r,hideTooltipRef:i}){let a=r(`actual`)??0,o=WE(dF);function s(e){return t=>{let n=iA(t);n&&(i.current!==null&&(clearTimeout(i.current),i.current=null),o({left:n.x,top:n.y,data:{kind:`actual`,cycle:e}}))}}let c=(0,L.useCallback)(()=>{i.current=setTimeout(()=>{o(null)},300)},[i,o]);return(0,R.jsx)(`g`,{children:e.map((e,i)=>e.endActive&&e.endActive<e.endOccupied?(0,R.jsxs)(`g`,{onMouseOver:s(e),onMouseLeave:c,children:[(0,R.jsx)(`rect`,{x:t(e.startTime),y:(n(e.station)??0)+a,width:t(e.endOccupied)-t(e.startTime),height:r.bandwidth(),fill:aF}),(0,R.jsx)(`rect`,{x:t(e.endActive),y:(n(e.station)??0)+a+r.bandwidth()/10,width:t(e.endOccupied)-t(e.endActive),height:r.bandwidth()*8/10,fill:e.outlier?sF:oF})]},i):(0,R.jsx)(`g`,{onMouseOver:s(e),onMouseLeave:c,children:(0,R.jsx)(`rect`,{x:t(e.startTime),y:(n(e.station)??0)+a,width:t(e.endOccupied)-t(e.startTime),height:r.bandwidth(),fill:aF})},i))})}function yF(e,t,n,r){return`M ${e} ${t} A ${n} ${r} 0 0 1 ${e} ${t+r}`}function bF({now:e,cycles:t,xScale:n,yScale:r,actualPlannedScale:i,hideTooltipRef:a}){let o=i(`actual`)??0,s=WE(dF);function c(t){return n=>{let r=iA(n);r&&(a.current!==null&&(clearTimeout(a.current),a.current=null),s({left:r.x,top:r.y,data:{kind:`current`,cycle:t,now:e}}))}}let l=(0,L.useCallback)(()=>{a.current=setTimeout(()=>{s(null)},300)},[a,s]);return(0,R.jsx)(`g`,{children:t.map((t,a)=>(0,R.jsxs)(`g`,{onMouseOver:c(t),onMouseLeave:l,children:[(0,R.jsx)(`rect`,{x:n(t.start),y:(r(t.station)??0)+o,width:n(e)-n(t.start),height:i.bandwidth(),fill:aF}),t.expectedEnd<e?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`rect`,{x:n(t.expectedEnd),y:(r(t.station)??0)+o+i.bandwidth()/10,width:n(e)-n(t.expectedEnd),height:i.bandwidth()*8/10,fill:t.isOutlier?sF:oF}),(0,R.jsx)(`path`,{d:yF(n(e),(r(t.station)??0)+o,80,i.bandwidth()),fill:iF})]}):(0,R.jsx)(`rect`,{x:n(e),y:(r(t.station)??0)+o,width:n(t.expectedEnd)-n(e),height:i.bandwidth(),fill:iF})]},a))})}function xF({sim:e,xScale:t,yScale:n,actualPlannedScale:r,hideTooltipRef:i}){let a=r(`planned`)??0,o=WE(dF);function s(e){return t=>{let n=iA(t);n&&(i.current!==null&&(clearTimeout(i.current),i.current=null),o({left:n.x,top:n.y,data:{kind:`sim`,cycle:e}}))}}let c=(0,L.useCallback)(()=>{i.current=setTimeout(()=>{o(null)},300)},[i,o]);return(0,R.jsx)(`g`,{children:e.map((e,i)=>(0,R.jsx)(`g`,{onMouseOver:s(e),onMouseLeave:c,children:(0,R.jsx)(`rect`,{x:t(e.start),y:(n(e.station)??0)+a,width:t(e.end)-t(e.start),height:r.bandwidth(),fill:e.plannedDown?lF:cF})},i))})}function SF({tooltip:e}){return(0,R.jsx)(Rv,{children:e.data.kind===`actual`?(0,R.jsxs)(R.Fragment,{children:[e.data.cycle.outlier?(0,R.jsxs)(`div`,{children:[`Outlier Cycle for `,e.data.cycle.station]}):(0,R.jsx)(`div`,{children:e.data.cycle.station}),(0,R.jsxs)(`div`,{children:[`Start: `,e.data.cycle.startTime.toLocaleString()]}),(0,R.jsxs)(`div`,{children:[`End: `,e.data.cycle.endOccupied.toLocaleString()]}),e.data.cycle.endActive===void 0?void 0:(0,R.jsxs)(`div`,{children:[`Active Minutes:`,` `,sw(e.data.cycle.endActive,e.data.cycle.startTime)]}),(0,R.jsxs)(`div`,{children:[`Occupied Minutes:`,` `,sw(e.data.cycle.endOccupied,e.data.cycle.startTime)]}),e.data.cycle.parts.map((e,t)=>(0,R.jsxs)(`div`,{children:[`Part: `,e.part,` `,e.oper]},t))]}):e.data.kind===`sim`?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(`div`,{children:[`Simulation of `,e.data.cycle.station]}),e.data.cycle.parts.map((e,t)=>(0,R.jsxs)(`div`,{children:[`Part: `,e]},t)),(0,R.jsxs)(`div`,{children:[`Predicted Start: `,e.data.cycle.start.toLocaleString()]}),(0,R.jsxs)(`div`,{children:[`Predicted End: `,e.data.cycle.end.toLocaleString()]}),e.data.cycle.plannedDown?(0,R.jsx)(`div`,{children:`Planned Downtime`}):void 0]}):(0,R.jsxs)(R.Fragment,{children:[e.data.cycle.isOutlier?(0,R.jsxs)(`div`,{children:[`Current Outlier Cycle for `,e.data.cycle.station]}):(0,R.jsxs)(`div`,{children:[`Current `,e.data.cycle.station]}),(0,R.jsxs)(`div`,{children:[`Start: `,e.data.cycle.start.toLocaleString()]}),(0,R.jsxs)(`div`,{children:[`Expected End: `,e.data.cycle.expectedEnd.toLocaleString()]}),e.data.cycle.expectedEnd<e.data.now?(0,R.jsxs)(`div`,{children:[`Cycle Exceeding Expected By`,` `,sw(e.data.now,e.data.cycle.expectedEnd),` Minutes`]}):(0,R.jsxs)(`div`,{children:[`Expected Remaining Minutes:`,` `,sw(e.data.cycle.expectedEnd,e.data.now)]}),(0,R.jsxs)(`div`,{children:[`Occupied Minutes: `,sw(e.data.now,e.data.cycle.start)]}),e.data.cycle.parts.map((e,t)=>(0,R.jsxs)(`div`,{children:[`Part: `,e.part,` `,e.oper]},t))]})})}function CF({now:e,xScale:t,yScale:n}){let r=t(e);return(0,R.jsxs)(`g`,{children:[(0,R.jsx)(`line`,{x1:r,x2:r,y1:n.range()[0],y2:n.range()[1]+8,stroke:`black`}),(0,R.jsx)(`text`,{x:r,y:n.range()[1]+8+11,textAnchor:`middle`,fontSize:11,children:`Now`})]})}function wF({height:e,width:t}){let n=Q(Sk),r=Q(sk),i=uF(),a=Q(GO),o=(0,L.useMemo)(()=>{let e=WC(new Date,-12);return Bk(n.valuesToLazySeq().filter(t=>t.endTime>=e))},[n]),s=(0,L.useMemo)(()=>bA(a,r),[a,r]),c=new Date,[,l]=(0,L.useState)(0),u=(0,L.useRef)(null);(0,L.useEffect)(()=>{u.current!==null&&clearTimeout(u.current),u.current=setTimeout(()=>{l(e=>e+1)},300*1e3)});let{xScale:d,yScale:f,actualPlannedScale:p,marginLeft:m}=gF(o,s,c,t,e),h=(0,L.useRef)(null);return e<=0||t<=0?null:(0,R.jsxs)(`div`,{style:{position:`relative`,overflow:`hidden`},children:[(0,R.jsx)(`svg`,{height:e,width:t,children:(0,R.jsxs)(`g`,{transform:`translate(${m}, ${mF})`,children:[(0,R.jsx)(`clipPath`,{id:`recent-cycle-clip-body`,children:(0,R.jsx)(`rect`,{x:0,y:0,width:t-hF-m,height:e-pF-mF})}),(0,R.jsx)(_F,{xScale:d,yScale:f}),(0,R.jsxs)(`g`,{clipPath:`url(#recent-cycle-clip-body)`,children:[(0,R.jsx)(vF,{cycles:o,xScale:d,yScale:f,hideTooltipRef:h,actualPlannedScale:p}),(0,R.jsx)(bF,{now:c,cycles:s,xScale:d,yScale:f,hideTooltipRef:h,actualPlannedScale:p}),(0,R.jsx)(xF,{sim:i,xScale:d,yScale:f,actualPlannedScale:p,hideTooltipRef:h})]}),(0,R.jsx)(CF,{now:c,xScale:d,yScale:f})]})}),(0,R.jsx)(gA,{chartHeight:e,chartWidth:t,atom:dF,TooltipContent:SF})]})}var TF=Object.defineProperty,EF=(e,t)=>TF(e,`name`,{value:t,configurable:!0}),DF=class{type=3;name=``;prefix=``;value=``;suffix=``;modifier=3;constructor(e,t,n,r,i,a){this.type=e,this.name=t,this.prefix=n,this.value=r,this.suffix=i,this.modifier=a}hasCustomName(){return this.name!==``&&typeof this.name!=`number`}};EF(DF,`Part`);var OF=/[$_\p{ID_Start}]/u,kF=/[$_\u200C\u200D\p{ID_Continue}]/u,AF=`.*`;function jF(e,t){return(t?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(e)}EF(jF,`isASCII`);function MF(e,t=!1){let n=[],r=0;for(;r<e.length;){let i=e[r],a=EF(function(i){if(!t)throw TypeError(i);n.push({type:`INVALID_CHAR`,index:r,value:e[r++]})},`ErrorOrInvalid`);if(i===`*`){n.push({type:`ASTERISK`,index:r,value:e[r++]});continue}if(i===`+`||i===`?`){n.push({type:`OTHER_MODIFIER`,index:r,value:e[r++]});continue}if(i===`\\`){n.push({type:`ESCAPED_CHAR`,index:r++,value:e[r++]});continue}if(i===`{`){n.push({type:`OPEN`,index:r,value:e[r++]});continue}if(i===`}`){n.push({type:`CLOSE`,index:r,value:e[r++]});continue}if(i===`:`){let t=``,i=r+1;for(;i<e.length;){let n=e.substr(i,1);if(i===r+1&&OF.test(n)||i!==r+1&&kF.test(n)){t+=e[i++];continue}break}if(!t){a(`Missing parameter name at ${r}`);continue}n.push({type:`NAME`,index:r,value:t}),r=i;continue}if(i===`(`){let t=1,i=``,o=r+1,s=!1;if(e[o]===`?`){a(`Pattern cannot start with "?" at ${o}`);continue}for(;o<e.length;){if(!jF(e[o],!1)){a(`Invalid character '${e[o]}' at ${o}.`),s=!0;break}if(e[o]===`\\`){i+=e[o++]+e[o++];continue}if(e[o]===`)`){if(t--,t===0){o++;break}}else if(e[o]===`(`&&(t++,e[o+1]!==`?`)){a(`Capturing groups are not allowed at ${o}`),s=!0;break}i+=e[o++]}if(s)continue;if(t){a(`Unbalanced pattern at ${r}`);continue}if(!i){a(`Missing pattern at ${r}`);continue}n.push({type:`REGEX`,index:r,value:i}),r=o;continue}n.push({type:`CHAR`,index:r,value:e[r++]})}return n.push({type:`END`,index:r,value:``}),n}EF(MF,`lexer`);function NF(e,t={}){let n=MF(e);t.delimiter??=`/#?`,t.prefixes??=`./`;let r=`[^${PF(t.delimiter)}]+?`,i=[],a=0,o=0,s=new Set,c=EF(e=>{if(o<n.length&&n[o].type===e)return n[o++].value},`tryConsume`),l=EF(()=>c(`OTHER_MODIFIER`)??c(`ASTERISK`),`tryConsumeModifier`),u=EF(e=>{let t=c(e);if(t!==void 0)return t;let{type:r,index:i}=n[o];throw TypeError(`Unexpected ${r} at ${i}, expected ${e}`)},`mustConsume`),d=EF(()=>{let e=``,t;for(;t=c(`CHAR`)??c(`ESCAPED_CHAR`);)e+=t;return e},`consumeText`),f=EF(e=>e,`DefaultEncodePart`),p=t.encodePart||f,m=``,h=EF(e=>{m+=e},`appendToPendingFixedValue`),g=EF(()=>{m.length&&(i.push(new DF(3,``,``,p(m),``,3)),m=``)},`maybeAddPartFromPendingFixedValue`),_=EF((e,t,n,o,c)=>{let l=3;switch(c){case`?`:l=1;break;case`*`:l=0;break;case`+`:l=2;break}if(!t&&!n&&l===3){h(e);return}if(g(),!t&&!n){if(!e)return;i.push(new DF(3,``,``,p(e),``,l));return}let u;u=n?n===`*`?AF:n:r;let d=2;u===r?(d=1,u=``):u===AF&&(d=0,u=``);let f;if(t?f=t:n&&(f=a++),s.has(f))throw TypeError(`Duplicate name '${f}'.`);s.add(f),i.push(new DF(d,f,p(e),u,p(o),l))},`addPart`);for(;o<n.length;){let e=c(`CHAR`),n=c(`NAME`),r=c(`REGEX`);if(!n&&!r&&(r=c(`ASTERISK`)),n||r){let i=e??``;t.prefixes.indexOf(i)===-1&&(h(i),i=``),g();let a=l();_(i,n,r,``,a);continue}let i=e??c(`ESCAPED_CHAR`);if(i){h(i);continue}if(c(`OPEN`)){let e=d(),t=c(`NAME`),n=c(`REGEX`);!t&&!n&&(n=c(`ASTERISK`));let r=d();u(`CLOSE`);let i=l();_(e,t,n,r,i);continue}g(),u(`END`)}return i}EF(NF,`parse`);function PF(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,`\\$1`)}EF(PF,`escapeString`);function FF(e){return e&&e.ignoreCase?`ui`:`u`}EF(FF,`flags`);function IF(e,t,n){return RF(NF(e,n),t,n)}EF(IF,`stringToRegexp`);function LF(e){switch(e){case 0:return`*`;case 1:return`?`;case 2:return`+`;case 3:return``}}EF(LF,`modifierToString`);function RF(e,t,n={}){n.delimiter??=`/#?`,n.prefixes??=`./`,n.sensitive??=!1,n.strict??=!1,n.end??=!0,n.start??=!0,n.endsWith=``;let r=n.start?`^`:``;for(let i of e){if(i.type===3){i.modifier===3?r+=PF(i.value):r+=`(?:${PF(i.value)})${LF(i.modifier)}`;continue}t&&t.push(i.name);let e=`[^${PF(n.delimiter)}]+?`,a=i.value;if(i.type===1?a=e:i.type===0&&(a=AF),!i.prefix.length&&!i.suffix.length){i.modifier===3||i.modifier===1?r+=`(${a})${LF(i.modifier)}`:r+=`((?:${a})${LF(i.modifier)})`;continue}if(i.modifier===3||i.modifier===1){r+=`(?:${PF(i.prefix)}(${a})${PF(i.suffix)})`,r+=LF(i.modifier);continue}r+=`(?:${PF(i.prefix)}`,r+=`((?:${a})(?:`,r+=PF(i.suffix),r+=PF(i.prefix),r+=`(?:${a}))*)${PF(i.suffix)})`,i.modifier===0&&(r+=`?`)}let i=`[${PF(n.endsWith)}]|$`,a=`[${PF(n.delimiter)}]`;if(n.end)return n.strict||(r+=`${a}?`),n.endsWith.length?r+=`(?=${i})`:r+=`$`,new RegExp(r,FF(n));n.strict||(r+=`(?:${a}(?=${i}))?`);let o=!1;if(e.length){let t=e[e.length-1];t.type===3&&t.modifier===3&&(o=n.delimiter.indexOf(t)>-1)}return o||(r+=`(?=${a}|${i})`),new RegExp(r,FF(n))}EF(RF,`partsToRegexp`);var zF={delimiter:``,prefixes:``,sensitive:!0,strict:!0},BF={delimiter:`.`,prefixes:``,sensitive:!0,strict:!0},VF={delimiter:`/`,prefixes:`/`,sensitive:!0,strict:!0};function HF(e,t){return e.length?e[0]===`/`?!0:!t||e.length<2?!1:(e[0]==`\\`||e[0]==`{`)&&e[1]==`/`:!1}EF(HF,`isAbsolutePathname`);function UF(e,t){return e.startsWith(t)?e.substring(t.length,e.length):e}EF(UF,`maybeStripPrefix`);function WF(e,t){return e.endsWith(t)?e.substr(0,e.length-t.length):e}EF(WF,`maybeStripSuffix`);function GF(e){return!e||e.length<2?!1:e[0]===`[`||(e[0]===`\\`||e[0]===`{`)&&e[1]===`[`}EF(GF,`treatAsIPv6Hostname`);var KF=[`ftp`,`file`,`http`,`https`,`ws`,`wss`];function qF(e){if(!e)return!0;for(let t of KF)if(e.test(t))return!0;return!1}EF(qF,`isSpecialScheme`);function JF(e,t){if(e=UF(e,`#`),t||e===``)return e;let n=new URL(`https://example.com`);return n.hash=e,n.hash?n.hash.substring(1,n.hash.length):``}EF(JF,`canonicalizeHash`);function YF(e,t){if(e=UF(e,`?`),t||e===``)return e;let n=new URL(`https://example.com`);return n.search=e,n.search?n.search.substring(1,n.search.length):``}EF(YF,`canonicalizeSearch`);function XF(e,t){return t||e===``?e:GF(e)?sI(e):oI(e)}EF(XF,`canonicalizeHostname`);function ZF(e,t){if(t||e===``)return e;let n=new URL(`https://example.com`);return n.password=e,n.password}EF(ZF,`canonicalizePassword`);function QF(e,t){if(t||e===``)return e;let n=new URL(`https://example.com`);return n.username=e,n.username}EF(QF,`canonicalizeUsername`);function $F(e,t,n){if(n||e===``)return e;if(t&&!KF.includes(t))return new URL(`${t}:${e}`).pathname;let r=e[0]==`/`;return e=new URL(r?e:`/-`+e,`https://example.com`).pathname,r||(e=e.substring(2,e.length)),e}EF($F,`canonicalizePathname`);function eI(e,t,n){return nI(t)===e&&(e=``),n||e===``?e:cI(e)}EF(eI,`canonicalizePort`);function tI(e,t){return e=WF(e,`:`),t||e===``?e:rI(e)}EF(tI,`canonicalizeProtocol`);function nI(e){switch(e){case`ws`:case`http`:return`80`;case`wws`:case`https`:return`443`;case`ftp`:return`21`;default:return``}}EF(nI,`defaultPortForProtocol`);function rI(e){if(e===``)return e;if(/^[-+.A-Za-z0-9]*$/.test(e))return e.toLowerCase();throw TypeError(`Invalid protocol '${e}'.`)}EF(rI,`protocolEncodeCallback`);function iI(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.username=e,t.username}EF(iI,`usernameEncodeCallback`);function aI(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.password=e,t.password}EF(aI,`passwordEncodeCallback`);function oI(e){if(e===``)return e;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(e))throw TypeError(`Invalid hostname '${e}'`);let t=new URL(`https://example.com`);return t.hostname=e,t.hostname}EF(oI,`hostnameEncodeCallback`);function sI(e){if(e===``)return e;if(/[^0-9a-fA-F[\]:]/g.test(e))throw TypeError(`Invalid IPv6 hostname '${e}'`);return e.toLowerCase()}EF(sI,`ipv6HostnameEncodeCallback`);function cI(e){if(e===``||/^[0-9]*$/.test(e)&&parseInt(e)<=65535)return e;throw TypeError(`Invalid port '${e}'.`)}EF(cI,`portEncodeCallback`);function lI(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.pathname=e[0]===`/`?e:`/-`+e,e[0]===`/`?t.pathname:t.pathname.substring(2,t.pathname.length)}EF(lI,`standardURLPathnameEncodeCallback`);function uI(e){return e===``?e:new URL(`data:${e}`).pathname}EF(uI,`pathURLPathnameEncodeCallback`);function dI(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.search=e,t.search.substring(1,t.search.length)}EF(dI,`searchEncodeCallback`);function fI(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.hash=e,t.hash.substring(1,t.hash.length)}EF(fI,`hashEncodeCallback`);var pI=class{#e;#t=[];#n={};#r=0;#i=1;#a=0;#o=0;#s=0;#c=0;#l=!1;constructor(e){this.#e=e}get result(){return this.#n}parse(){for(this.#t=MF(this.#e,!0);this.#r<this.#t.length;this.#r+=this.#i){if(this.#i=1,this.#t[this.#r].type===`END`){if(this.#o===0){this.#f(),this.#C()?this.#u(9,1):this.#S()?this.#u(8,1):this.#u(7,0);continue}else if(this.#o===2){this.#p(5);continue}this.#u(10,0);break}if(this.#s>0)if(this.#T())--this.#s;else continue;if(this.#w()){this.#s+=1;continue}switch(this.#o){case 0:this.#g()&&this.#p(1);break;case 1:if(this.#g()){this.#k();let e=7,t=1;this.#_()?(e=2,t=3):this.#l&&(e=2),this.#u(e,t)}break;case 2:this.#v()?this.#p(3):(this.#x()||this.#S()||this.#C())&&this.#p(5);break;case 3:this.#y()?this.#u(4,1):this.#v()&&this.#u(5,1);break;case 4:this.#v()&&this.#u(5,1);break;case 5:this.#E()?this.#c+=1:this.#D()&&--this.#c,this.#b()&&!this.#c?this.#u(6,1):this.#x()?this.#u(7,0):this.#S()?this.#u(8,1):this.#C()&&this.#u(9,1);break;case 6:this.#x()?this.#u(7,0):this.#S()?this.#u(8,1):this.#C()&&this.#u(9,1);break;case 7:this.#S()?this.#u(8,1):this.#C()&&this.#u(9,1);break;case 8:this.#C()&&this.#u(9,1);break;case 9:break;case 10:break}}this.#n.hostname!==void 0&&this.#n.port===void 0&&(this.#n.port=``)}#u(e,t){switch(this.#o){case 0:break;case 1:this.#n.protocol=this.#O();break;case 2:break;case 3:this.#n.username=this.#O();break;case 4:this.#n.password=this.#O();break;case 5:this.#n.hostname=this.#O();break;case 6:this.#n.port=this.#O();break;case 7:this.#n.pathname=this.#O();break;case 8:this.#n.search=this.#O();break;case 9:this.#n.hash=this.#O();break;case 10:break}this.#o!==0&&e!==10&&([1,2,3,4].includes(this.#o)&&[6,7,8,9].includes(e)&&(this.#n.hostname??=``),[1,2,3,4,5,6].includes(this.#o)&&[8,9].includes(e)&&(this.#n.pathname??=this.#l?`/`:``),[1,2,3,4,5,6,7].includes(this.#o)&&e===9&&(this.#n.search??=``)),this.#d(e,t)}#d(e,t){this.#o=e,this.#a=this.#r+t,this.#r+=t,this.#i=0}#f(){this.#r=this.#a,this.#i=0}#p(e){this.#f(),this.#o=e}#m(e){return e<0&&(e=this.#t.length-e),e<this.#t.length?this.#t[e]:this.#t[this.#t.length-1]}#h(e,t){let n=this.#m(e);return n.value===t&&(n.type===`CHAR`||n.type===`ESCAPED_CHAR`||n.type===`INVALID_CHAR`)}#g(){return this.#h(this.#r,`:`)}#_(){return this.#h(this.#r+1,`/`)&&this.#h(this.#r+2,`/`)}#v(){return this.#h(this.#r,`@`)}#y(){return this.#h(this.#r,`:`)}#b(){return this.#h(this.#r,`:`)}#x(){return this.#h(this.#r,`/`)}#S(){if(this.#h(this.#r,`?`))return!0;if(this.#t[this.#r].value!==`?`)return!1;let e=this.#m(this.#r-1);return e.type!==`NAME`&&e.type!==`REGEX`&&e.type!==`CLOSE`&&e.type!==`ASTERISK`}#C(){return this.#h(this.#r,`#`)}#w(){return this.#t[this.#r].type==`OPEN`}#T(){return this.#t[this.#r].type==`CLOSE`}#E(){return this.#h(this.#r,`[`)}#D(){return this.#h(this.#r,`]`)}#O(){let e=this.#t[this.#r],t=this.#m(this.#a).index;return this.#e.substring(t,e.index)}#k(){let e={};Object.assign(e,zF),e.encodePart=rI,this.#l=qF(IF(this.#O(),void 0,e))}};EF(pI,`Parser`);var mI=[`protocol`,`username`,`password`,`hostname`,`port`,`pathname`,`search`,`hash`],hI=`*`;function gI(e,t){if(typeof e!=`string`)throw TypeError(`parameter 1 is not of type 'string'.`);let n=new URL(e,t);return{protocol:n.protocol.substring(0,n.protocol.length-1),username:n.username,password:n.password,hostname:n.hostname,port:n.port,pathname:n.pathname,search:n.search===``?void 0:n.search.substring(1,n.search.length),hash:n.hash===``?void 0:n.hash.substring(1,n.hash.length)}}EF(gI,`extractValues`);function _I(e,t){return t?yI(e):e}EF(_I,`processBaseURLString`);function vI(e,t,n){let r;if(typeof t.baseURL==`string`)try{r=new URL(t.baseURL),t.protocol===void 0&&(e.protocol=_I(r.protocol.substring(0,r.protocol.length-1),n)),!n&&t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.username===void 0&&(e.username=_I(r.username,n)),!n&&t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.username===void 0&&t.password===void 0&&(e.password=_I(r.password,n)),t.protocol===void 0&&t.hostname===void 0&&(e.hostname=_I(r.hostname,n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&(e.port=_I(r.port,n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&(e.pathname=_I(r.pathname,n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&t.search===void 0&&(e.search=_I(r.search.substring(1,r.search.length),n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&t.search===void 0&&t.hash===void 0&&(e.hash=_I(r.hash.substring(1,r.hash.length),n))}catch{throw TypeError(`invalid baseURL '${t.baseURL}'.`)}if(typeof t.protocol==`string`&&(e.protocol=tI(t.protocol,n)),typeof t.username==`string`&&(e.username=QF(t.username,n)),typeof t.password==`string`&&(e.password=ZF(t.password,n)),typeof t.hostname==`string`&&(e.hostname=XF(t.hostname,n)),typeof t.port==`string`&&(e.port=eI(t.port,e.protocol,n)),typeof t.pathname==`string`){if(e.pathname=t.pathname,r&&!HF(e.pathname,n)){let t=r.pathname.lastIndexOf(`/`);t>=0&&(e.pathname=_I(r.pathname.substring(0,t+1),n)+e.pathname)}e.pathname=$F(e.pathname,e.protocol,n)}return typeof t.search==`string`&&(e.search=YF(t.search,n)),typeof t.hash==`string`&&(e.hash=JF(t.hash,n)),e}EF(vI,`applyInit`);function yI(e){return e.replace(/([+*?:{}()\\])/g,`\\$1`)}EF(yI,`escapePatternString`);function bI(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,`\\$1`)}EF(bI,`escapeRegexpString`);function xI(e,t){t.delimiter??=`/#?`,t.prefixes??=`./`,t.sensitive??=!1,t.strict??=!1,t.end??=!0,t.start??=!0,t.endsWith=``;let n=`[^${bI(t.delimiter)}]+?`,r=/[$_\u200C\u200D\p{ID_Continue}]/u,i=``;for(let a=0;a<e.length;++a){let o=e[a];if(o.type===3){if(o.modifier===3){i+=yI(o.value);continue}i+=`{${yI(o.value)}}${LF(o.modifier)}`;continue}let s=o.hasCustomName(),c=!!o.suffix.length||!!o.prefix.length&&(o.prefix.length!==1||!t.prefixes.includes(o.prefix)),l=a>0?e[a-1]:null,u=a<e.length-1?e[a+1]:null;if(!c&&s&&o.type===1&&o.modifier===3&&u&&!u.prefix.length&&!u.suffix.length)if(u.type===3){let e=u.value.length>0?u.value[0]:``;c=r.test(e)}else c=!u.hasCustomName();if(!c&&!o.prefix.length&&l&&l.type===3){let e=l.value[l.value.length-1];c=t.prefixes.includes(e)}c&&(i+=`{`),i+=yI(o.prefix),s&&(i+=`:${o.name}`),o.type===2?i+=`(${o.value})`:o.type===1?s||(i+=`(${n})`):o.type===0&&(!s&&(!l||l.type===3||l.modifier!==3||c||o.prefix!==``)?i+=`*`:i+=`(.*)`),o.type===1&&s&&o.suffix.length&&r.test(o.suffix[0])&&(i+=`\\`),i+=yI(o.suffix),c&&(i+=`}`),o.modifier!==3&&(i+=LF(o.modifier))}return i}EF(xI,`partsToPattern`);var SI=class{#e;#t={};#n={};#r={};#i={};#a=!1;constructor(e={},t,n){try{let r;if(typeof t==`string`?r=t:n=t,typeof e==`string`){let t=new pI(e);if(t.parse(),e=t.result,r===void 0&&typeof e.protocol!=`string`)throw TypeError(`A base URL must be provided for a relative constructor string.`);e.baseURL=r}else{if(!e||typeof e!=`object`)throw TypeError(`parameter 1 is not of type 'string' and cannot convert to dictionary.`);if(r)throw TypeError(`parameter 1 is not of type 'string'.`)}typeof n>`u`&&(n={ignoreCase:!1});let i={ignoreCase:n.ignoreCase===!0};this.#e=vI({pathname:hI,protocol:hI,username:hI,password:hI,hostname:hI,port:hI,search:hI,hash:hI},e,!0),nI(this.#e.protocol)===this.#e.port&&(this.#e.port=``);let a;for(a of mI){if(!(a in this.#e))continue;let e={},t=this.#e[a];switch(this.#n[a]=[],a){case`protocol`:Object.assign(e,zF),e.encodePart=rI;break;case`username`:Object.assign(e,zF),e.encodePart=iI;break;case`password`:Object.assign(e,zF),e.encodePart=aI;break;case`hostname`:Object.assign(e,BF),GF(t)?e.encodePart=sI:e.encodePart=oI;break;case`port`:Object.assign(e,zF),e.encodePart=cI;break;case`pathname`:qF(this.#t.protocol)?(Object.assign(e,VF,i),e.encodePart=lI):(Object.assign(e,zF,i),e.encodePart=uI);break;case`search`:Object.assign(e,zF,i),e.encodePart=dI;break;case`hash`:Object.assign(e,zF,i),e.encodePart=fI;break}try{this.#i[a]=NF(t,e),this.#t[a]=RF(this.#i[a],this.#n[a],e),this.#r[a]=xI(this.#i[a],e),this.#a=this.#a||this.#i[a].some(e=>e.type===2)}catch{throw TypeError(`invalid ${a} pattern '${this.#e[a]}'.`)}}}catch(e){throw TypeError(`Failed to construct 'URLPattern': ${e.message}`)}}get[Symbol.toStringTag](){return`URLPattern`}test(e={},t){let n={pathname:``,protocol:``,username:``,password:``,hostname:``,port:``,search:``,hash:``};if(typeof e!=`string`&&t)throw TypeError(`parameter 1 is not of type 'string'.`);if(typeof e>`u`)return!1;try{n=typeof e==`object`?vI(n,e,!1):vI(n,gI(e,t),!1)}catch{return!1}let r;for(r of mI)if(!this.#t[r].exec(n[r]))return!1;return!0}exec(e={},t){let n={pathname:``,protocol:``,username:``,password:``,hostname:``,port:``,search:``,hash:``};if(typeof e!=`string`&&t)throw TypeError(`parameter 1 is not of type 'string'.`);if(typeof e>`u`)return;try{n=typeof e==`object`?vI(n,e,!1):vI(n,gI(e,t),!1)}catch{return null}let r={};t?r.inputs=[e,t]:r.inputs=[e];let i;for(i of mI){let e=this.#t[i].exec(n[i]);if(!e)return null;let t={};for(let[n,r]of this.#n[i].entries())(typeof r==`string`||typeof r==`number`)&&(t[r]=e[n+1]);r[i]={input:n[i]??``,groups:t}}return r}static compareComponent(e,t,n){let r=EF((e,t)=>{for(let n of[`type`,`modifier`,`prefix`,`value`,`suffix`]){if(e[n]<t[n])return-1;if(e[n]!==t[n])return 1}return 0},`comparePart`),i=new DF(3,``,``,``,``,3),a=new DF(0,``,``,``,``,3),o=EF((e,t)=>{let n=0;for(;n<Math.min(e.length,t.length);++n){let i=r(e[n],t[n]);if(i)return i}return e.length===t.length?0:r(e[n]??i,t[n]??i)},`comparePartList`);return!t.#r[e]&&!n.#r[e]?0:t.#r[e]&&!n.#r[e]?o(t.#i[e],[a]):!t.#r[e]&&n.#r[e]?o([a],n.#i[e]):o(t.#i[e],n.#i[e])}get protocol(){return this.#r.protocol}get username(){return this.#r.username}get password(){return this.#r.password}get hostname(){return this.#r.hostname}get port(){return this.#r.port}get pathname(){return this.#r.pathname}get search(){return this.#r.search}get hash(){return this.#r.hash}get hasRegExpGroups(){return this.#a}};EF(SI,`URLPattern`),globalThis.URLPattern||(globalThis.URLPattern=SI);var CI=H(`span`,{shouldForwardProp:e=>e.toString()[0]!==`$`})(({$type:e})=>{switch(e){case`machine`:return{color:`#1565C0`};case`loadStation`:return{color:`#795548`};case`pallet`:return{color:`#00695C`};case`queue`:return{color:`#6A1B9A`};case`inspectionNotSignaled`:return{color:`#4527A0`};case`inspectionSignaled`:return{color:`red`};case`closeoutFailed`:return{color:`red`}}});function wI(e){switch(e.type){case Y.LoadUnloadCycle:return e.startofcycle?`Start `+e.result.charAt(0).toUpperCase()+e.result.substring(1).toLowerCase():`End `+e.result.charAt(0).toUpperCase()+e.result.substring(1).toLowerCase();case Y.MachineCycle:return e.startofcycle?`Start Cycle`:`End Cycle`;case Y.PartMark:return`Serial`;case Y.OrderAssignment:return`Workorder`;case Y.Inspection:case Y.InspectionForce:return`Signal`;case Y.PalletCycle:return`Pallet Cycle`;case Y.WorkorderComment:return`Workorder`;case Y.CloseOut:return`CloseOut`;case Y.InspectionResult:return`Inspection`;case Y.AddToQueue:return`Queue`;case Y.RemoveFromQueue:return`Queue`;case Y.PalletInStocker:return`Stocker`;case Y.PalletOnRotaryInbound:return`Rotary`;case Y.SignalQuarantine:return`Quarantine`;case Y.SwapMaterialOnPallet:return`Swap Serial`;case Y.InvalidateCycle:return`Invalidate Cycle`;case Y.Rebooking:return`Rebooking`;case Y.CancelRebooking:return`Cancel Rebooking`;default:return`Message`}}function TI(e){return e.details?.PalletCycleInvalidated===`1`}function EI(e){return e.length>1?e[0].numproc==1?`${e[0].part} x${e.length}`:`${e[0].part}-${X.of(e).map(e=>e.proc).distinctAndSortBy(e=>e).toRArray().join(`&`)} x${e.length}`:e.length==1?e[0].numproc==1?`${e[0].part}`:`${e[0].part}-${e[0].proc}`:``}function DI(e){return e.length>1?`${e[0].part} x${e.length}`:e.length===1?e[0].part:``}function OI(e){let t=e.entry;switch(t.type){case Y.LoadUnloadCycle:return(0,R.jsxs)(`span`,{children:[EI(t.material),` on `,(0,R.jsxs)(CI,{$type:`pallet`,children:[`pallet `,t.pal]}),` at`,` `,(0,R.jsxs)(CI,{$type:`loadStation`,children:[`station `,t.locnum.toString()]})]});case Y.MachineCycle:return(0,R.jsxs)(`span`,{children:[EI(t.material),` on `,(0,R.jsxs)(CI,{$type:`pallet`,children:[`pallet `,t.pal]}),` at`,` `,(0,R.jsxs)(CI,{$type:`machine`,children:[t.loc,` `,t.locnum.toString()]}),t.program&&t.program!==``?(0,R.jsxs)(`span`,{children:[` with program `,t.program]}):void 0]});case Y.PartMark:return(0,R.jsxs)(`span`,{children:[EI(t.material),` marked with `,t.result]});case Y.OrderAssignment:return(0,R.jsxs)(`span`,{children:[EI(t.material),` assigned to workorder `,t.result]});case Y.PalletCycle:return t.startofcycle?(0,R.jsxs)(`span`,{children:[`Pallet `,t.pal,` started route`]}):(0,R.jsxs)(`span`,{children:[`Pallet `,t.pal,` completed route`]});case Y.Inspection:{let e=(t.details||{}).InspectionType||``;return t.result.toLowerCase()===`true`||t.result===`1`?(0,R.jsxs)(`span`,{children:[EI(t.material),` signaled for inspection`,` `,(0,R.jsx)(CI,{$type:`inspectionSignaled`,children:e})]}):(0,R.jsxs)(`span`,{children:[EI(t.material),` skipped inspection`,` `,(0,R.jsx)(CI,{$type:`inspectionNotSignaled`,children:e})]})}case Y.InspectionForce:{let e=t.program;return t.result.toLowerCase()===`true`||t.result===`1`?(0,R.jsxs)(`span`,{children:[EI(t.material),` declared for inspection`,` `,(0,R.jsx)(CI,{$type:`inspectionSignaled`,children:e})]}):(0,R.jsxs)(`span`,{children:[EI(t.material),` passed over for inspection`,` `,(0,R.jsx)(CI,{$type:`inspectionNotSignaled`,children:e})]})}case Y.WorkorderComment:return(0,R.jsxs)(`span`,{children:[`Workorder `,t.result,` Comment`]});case Y.InspectionResult:return t.result.toLowerCase()===`false`?(0,R.jsxs)(CI,{$type:`inspectionSignaled`,children:[t.program,` Failed`]}):(0,R.jsxs)(CI,{$type:`inspectionSignaled`,children:[t.program,` Succeeded`]});case Y.CloseOut:return t.result.toLowerCase()===`failed`?(0,R.jsxs)(CI,{$type:`closeoutFailed`,children:[t.program&&t.program!==``?t.program:`CloseOut`,` Failed`]}):(0,R.jsxs)(`span`,{children:[t.program&&t.program!==``?t.program:`CloseOut`,` Completed`]});case Y.AddToQueue:switch(t.program){case`Unloaded`:return(0,R.jsxs)(`span`,{children:[DI(t.material),` unloaded into queue`,` `,(0,R.jsx)(CI,{$type:`queue`,children:t.loc})]});case`SetByOperator`:return(0,R.jsxs)(`span`,{children:[DI(t.material),` set manually into queue`,` `,(0,R.jsx)(CI,{$type:`queue`,children:t.loc})]});case`Quarantine`:return(0,R.jsxs)(`span`,{children:[DI(t.material),` quarantined into queue`,` `,(0,R.jsx)(CI,{$type:`queue`,children:t.loc})]});case`SwapMaterial`:return(0,R.jsxs)(`span`,{children:[DI(t.material),` swapped off pallet into queue`,` `,(0,R.jsx)(CI,{$type:`queue`,children:t.loc})]});case`MaterialMissingOnPallet`:return(0,R.jsxs)(`span`,{children:[DI(t.material),` removed from cell controller, added to queue`,` `,(0,R.jsx)(CI,{$type:`queue`,children:t.loc})]});default:return(0,R.jsxs)(`span`,{children:[DI(t.material),` added to queue`,` `,(0,R.jsx)(CI,{$type:`queue`,children:t.loc}),t.program&&t.program!==``?` (`+t.program+`)`:void 0]})}case Y.RemoveFromQueue:return(0,R.jsxs)(`span`,{children:[DI(t.material),` removed from queue`,` `,(0,R.jsx)(CI,{$type:`queue`,children:t.loc})]});case Y.PalletInStocker:return t.startofcycle?(0,R.jsxs)(`span`,{children:[(0,R.jsxs)(CI,{$type:`pallet`,children:[`Pallet `,t.pal]}),` arrived at stocker `,t.locnum]}):(0,R.jsxs)(`span`,{children:[(0,R.jsxs)(CI,{$type:`pallet`,children:[`Pallet `,t.pal]}),` departed stocker `,t.locnum]});case Y.PalletOnRotaryInbound:return t.startofcycle?(0,R.jsxs)(`span`,{children:[(0,R.jsxs)(CI,{$type:`pallet`,children:[`Pallet `,t.pal]}),` arrived at`,` `,(0,R.jsxs)(CI,{$type:`machine`,children:[t.loc,` `,t.locnum.toString()]})]}):t.result==`RotateIntoWorktable`?(0,R.jsxs)(`span`,{children:[(0,R.jsxs)(CI,{$type:`pallet`,children:[`Pallet `,t.pal]}),` rotated into`,` `,(0,R.jsxs)(CI,{$type:`machine`,children:[t.loc,` `,t.locnum.toString()]}),` `,`worktable`]}):(0,R.jsxs)(`span`,{children:[(0,R.jsxs)(CI,{$type:`pallet`,children:[`Pallet `,t.pal]}),` left`,` `,(0,R.jsxs)(CI,{$type:`machine`,children:[t.loc,` `,t.locnum.toString()]})]});case Y.SignalQuarantine:return(0,R.jsxs)(`span`,{children:[EI(t.material),` signaled for quarantine after unload`]});case Y.SwapMaterialOnPallet:return(0,R.jsx)(`span`,{children:t.result});case Y.InvalidateCycle:return(0,R.jsx)(`span`,{children:t.result});case Y.Rebooking:return(0,R.jsxs)(`span`,{children:[`Rebooking requested with ID `,t.result]});case Y.CancelRebooking:return(0,R.jsxs)(`span`,{children:[`Rebooking `,t.result,` canceled`]});default:return(0,R.jsx)(`span`,{children:t.result})}}function kI(e){let t=[];if(e.details&&e.details.operator&&t.push({name:`Operator`,value:e.details.operator}),e.details&&e.details.note&&t.push({name:`Note`,value:e.details.note}),e.tooluse)for(let n of e.tooluse){let e=null;if(n.toolUseDuringCycle&&n.toolUseDuringCycle!==``&&(e=ik(n.toolUseDuringCycle).toFixed(1)+` minutes used during cycle.`,n.totalToolUseAtEndOfCycle&&n.configuredToolLife&&n.totalToolUseAtEndOfCycle!==``&&n.configuredToolLife!==``)){let t=rk(n.totalToolUseAtEndOfCycle),r=rk(n.configuredToolLife),i=t/r;e+=` Total use at end of cycle: ${(t/60).toFixed(1)}/${(r/60).toFixed(1)} minutes (${(i*100).toFixed(0)}%).`}if(n.toolUseCountDuringCycle&&n.toolUseCountDuringCycle>0&&(e=(e===null?``:` | `)+`${n.toolUseCountDuringCycle} use${n.toolUseCountDuringCycle>1?`s`:``} during cycle.`,n.totalToolUseCountAtEndOfCycle&&n.configuredToolLifeCount&&(e+=` Total use count at end of cycle: ${n.totalToolUseCountAtEndOfCycle}/${n.configuredToolLifeCount} (${(n.totalToolUseCountAtEndOfCycle/n.configuredToolLifeCount*100).toFixed(0)}%).`)),e!==null){let r=n.pocket>0?`${n.tool} [${n.pocket}]`:n.tool,i=n.toolSerialAtEndOfCycle??n.toolSerialAtStartOfCycle;i&&i!==``&&(r+=` (${i})`),t.push({name:r,value:e})}}return t}var AI=[Y.AddToQueue,Y.RemoveFromQueue,Y.LoadUnloadCycle,Y.MachineCycle],jI=H(ob,{shouldForwardProp:e=>e.toString()[0]!==`$`})(({$highlightProc:e,$invalidCycle:t})=>({...e&&{backgroundColor:`#eeeeee`},...t&&{textDecoration:`line-through`}})),MI=(0,L.memo)(function(e){let t=kI(e.entry),n=e.highlightProcsGreaterOrEqualTo;return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(jI,{$highlightProc:n!==void 0&&e.entry.material.findIndex(e=>e.proc>=n)>=0&&AI.indexOf(e.entry.type)>=0,$invalidCycle:TI(e.entry),children:[(0,R.jsx)(J,{size:`small`,children:e.entry.endUTC.toLocaleDateString(void 0,{month:`short`,day:`numeric`,year:`2-digit`})}),(0,R.jsx)(J,{size:`small`,children:e.entry.endUTC.toLocaleTimeString(void 0,{hour:`numeric`,minute:`2-digit`})}),(0,R.jsx)(J,{size:`small`,children:wI(e.entry)}),(0,R.jsx)(J,{size:`small`,children:OI(e)}),(0,R.jsx)(J,{padding:`checkbox`,children:t.length>0?(0,R.jsx)(zl,{style:{transition:`all ease 200ms`,transform:e.entry.counter===e.detailLogCounter?`rotate(90deg)`:`none`},onClick:t=>{e.setDetail(e.entry.counter===e.detailLogCounter?null:e.entry.counter),t.stopPropagation()},size:`small`,children:(0,R.jsx)(dx,{fontSize:`inherit`})}):void 0})]}),t.length>0&&e.entry.counter===e.detailLogCounter?(0,R.jsx)(ob,{children:(0,R.jsx)(J,{colSpan:5,children:(0,R.jsx)(`ul`,{children:t.map((e,t)=>(0,R.jsxs)(`li`,{children:[e.name,`: `,e.value]},t))})})}):void 0]})});function*NI(e){let t=null;for(let n of e)t!=null&&t.type===Y.RemoveFromQueue&&n.type===Y.AddToQueue&&t.loc===n.loc?t=null:(t!==null&&(yield t),t=n);t!==null&&(yield t)}var PI=(0,L.memo)(function(e){let[t,n]=(0,L.useState)(null);return(0,R.jsxs)(Ty,{children:[(0,R.jsx)(Jy,{children:(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{children:`Date`}),(0,R.jsx)(J,{children:`Time`}),(0,R.jsx)(J,{children:`Type`}),(0,R.jsx)(J,{children:`Details`}),(0,R.jsx)(J,{padding:`checkbox`,children:e.copyToClipboard?(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(zl,{onClick:()=>Yk(e.entries),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,R.jsx)(Mx,{})})}):void 0})]})}),(0,R.jsx)(My,{children:Array.from(NI(e.entries)).map((r,i)=>(0,R.jsx)(MI,{entry:r,detailLogCounter:t,setDetail:n,highlightProcsGreaterOrEqualTo:e.highlightProcsGreaterOrEqualTo},i))})]})}),FI=Z(null),II=Z(e=>e(FI),(e,t,n)=>{n===null?(t(FI,null),t(UI,[])):t(FI,n)}),LI=Z(async e=>{let t=e(FI);if(t&&t.type===`Barcode`){let n=e(uL),r=t.toQueue?[t.toQueue]:n.route===$.Station_LoadMonitor||n.route===$.Station_Queues?n.queues:null;return await CC.parseBarcode(t.barcode,r)}else return null}),RI=Z(async e=>(await e(LI))?.potentialNewMaterial??null),zI=Z(async e=>{let t=e(FI);if(t===null)return null;switch(t.type){case`InProcMat`:return t.inproc;case`MatSummary`:return t.summary;case`MatDetails`:return t.details;case`LogMat`:return{materialID:t.logMat.id,partName:t.logMat.part,serial:t.logMat.serial,workorderId:t.logMat.workorder};case`Barcode`:{let t=await e(LI);return t?.existingMaterial&&t.existingMaterial.materialID>=0?t.existingMaterial:null}case`ManuallyEnteredSerial`:case`AddMatWithEnteredSerial`:return(await TC.materialForSerial(t.serial))?.[0]??null}}),BI=Z(async e=>{let t=e(GO),n=e(FI);if(n===null)return null;if(n.type===`InProcMat`)return n.inproc;let r=(await e(zI))?.materialID??null;return r!==null&&r>=0?t.material.find(e=>e.materialID===r)??null:null}),VI=Z(async e=>{let t=e(FI);if(t===null)return null;switch(t.type){case`InProcMat`:return t.inproc.serial??null;case`MatSummary`:return t.summary.serial??null;case`MatDetails`:return t.details.serial??null;case`LogMat`:return t.logMat.serial??null;case`Barcode`:{let t=await e(LI);return t?.existingMaterial?.serial??t?.potentialNewMaterial?.serial??null}case`ManuallyEnteredSerial`:case`AddMatWithEnteredSerial`:return t.serial}}),HI=Z(async e=>{let t=e(FI);if(t===null)return null;switch(t.type){case`InProcMat`:return t.inproc.workorderId??null;case`MatSummary`:return t.summary.workorderId??null;case`MatDetails`:return t.details.workorder??null;case`LogMat`:return t.logMat.workorder??null;case`Barcode`:{let t=await e(LI);return t?.existingMaterial?.workorder??t?.potentialNewMaterial?.workorder??null}case`ManuallyEnteredSerial`:case`AddMatWithEnteredSerial`:return null}}),UI=Z([]),WI=BO(Z(async(e,{signal:t})=>{let n=await e(zI);return n===null?[]:n.materialID>=0?await TC.logForMaterial(n.materialID,t):n.serial&&n.serial!==``?await TC.logForSerial(n.serial):[]})),GI=BO(Z(async(e,{signal:t})=>{let n=await e(VI);if(n===null||n===``)return[];let r=[];for(let e of OC)r.push.apply(await e.logForSerial(n,t));return r})),KI=Z(e=>{let t=e(WI),n=e(GI),r=e(UI);return X.of(t.state===`hasData`?t.data:[]).concat(n.state===`hasData`?n.data:[]).sortBy(e=>e.endUTC.getTime(),e=>e.counter).concat(r).toRArray()}),qI=Z(async e=>{let t=await e(zI);if(t===null)return null;let n=e(KI),r=X.of(n).filter(e=>!TI(e)&&(e.type===Y.LoadUnloadCycle||e.type===Y.MachineCycle||e.type===Y.AddToQueue)).flatMap(e=>e.material).filter(e=>e.id===t.materialID).maxBy(e=>e.proc);return r?{process:r.proc,totalNumProcesses:r.numproc}:null}),JI=Z(e=>{let t=e(FI),n=e(KI);if(t===null)return{signaledInspections:[],completedInspections:[]};let r=new Set(t.type===`InProcMat`?t.inproc.signaledInspections:[]),i=new Set;return n.forEach(e=>{switch(e.type){case Y.Inspection:if(e.result.toLowerCase()===`true`||e.result===`1`){let t=(e.details||{}).InspectionType;t&&r.add(t)}break;case Y.InspectionForce:(e.result.toLowerCase()===`true`||e.result===`1`)&&r.add(e.program);break;case Y.InspectionResult:i.add(e.program);break}}),{signaledInspections:X.of(r).toSortedArray(e=>e),completedInspections:X.of(i).toSortedArray(e=>e)}}),YI=Z(async e=>{let t=await e(zI);if(t===null||t.partName===``)return[];let n=e(GO)?.workorders??[];return X.of(n).filter(e=>e.part===t.partName).toSortedArray(e=>e.dueDate.getTime(),e=>-e.priority)});function XI(){let[e,t]=(0,L.useState)(!1),n=WE(UI);return[(0,L.useCallback)(e=>{t(!0),TC.setInspectionDecision(e.mat.materialID,e.inspType,1,e.inspect).then(e=>n(t=>[...t,e])).catch(console.log).finally(()=>t(!1))},[n]),e]}function ZI(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(e=>{t(!0),TC.recordInspectionCompleted(new mC({materialID:e.mat.materialID,process:1,inspectionLocationNum:1,inspectionType:e.inspType,success:e.success,active:`PT0S`,elapsed:`PT0S`,extraData:e.operator?{operator:e.operator}:void 0})).catch(console.log).finally(()=>t(!1))},[]),e]}function QI(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(e=>{t(!0),TC.recordCloseoutCompleted(new hC({materialID:e.mat.materialID,process:1,locationNum:1,closeoutType:``,active:`PT0S`,elapsed:`PT0S`,extraData:e.operator?{operator:e.operator}:void 0,failed:e.failed})).catch(console.log).finally(()=>t(!1))},[]),e]}function $I(){let[e,t]=(0,L.useState)(!1),n=WE(UI);return[(0,L.useCallback)((e,r)=>{t(!0),TC.setWorkorder(e.materialID,1,r).then(e=>n(t=>[...t,e])).catch(console.log).finally(()=>t(!1))},[n]),e]}function eL(){let[e,t]=(0,L.useState)(!1),n=WE(UI);return[(0,L.useCallback)(e=>{t(!0),TC.recordOperatorNotes(e.matId,e.process,e.operator,e.notes).then(e=>n(t=>[...t,e])).catch(console.log).finally(()=>t(!1))},[n]),e]}function tL(){let[e,t]=(0,L.useState)(!1),[n,r]=(0,L.useState)(!1);return[(0,L.useCallback)(e=>{t(!0),CC.printLabel(e.materialId,e.proc).catch(console.log).finally(()=>{t(!1),r(!0)})},[]),e,n]}function nL(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)((e,n)=>{t(!0),wC.removeMaterialFromAllQueues(e,n??void 0).catch(console.log).finally(()=>t(!1))},[]),e]}function rL(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)((e,n,r)=>{t(!0),wC.signalMaterialForQuarantine(e,n,r===``?void 0:r).catch(console.log).finally(()=>t(!1))},[]),e]}function iL(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(e=>{t(!0),wC.setMaterialInQueue(e.materialId,e.operator,new fC({queue:e.queue,position:e.queuePosition})).catch(console.log).finally(()=>t(!1))},[]),e]}function Pte(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(e=>{t(!0),wC.addUnprocessedMaterialToQueue(e.jobUnique,e.lastCompletedProcess,e.queue,e.queuePosition,e.operator,e.workorder,e.serial||``).then(t=>{e.onNewMaterial&&t?e.onNewMaterial(t):e.onError&&e.onError(`No material returned`)},e.onError).catch(console.log).finally(()=>t(!1))},[]),e]}function aL(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(e=>{t(!0),wC.addUnallocatedCastingToQueue(e.casting,e.queue,e.quantity,e.operator,e.workorder,[...e.serials||[]]).then(t=>{e.onNewMaterial&&e.onNewMaterial(t)},e.onError).catch(console.log).finally(()=>t(!1))},[]),e]}var $=function(e){return e.ChooseMode=`/`,e.Station_LoadMonitor=`/station/loadunload/:num`,e.Station_InspectionMonitor=`/station/inspection`,e.Station_InspectionMonitorWithType=`/station/inspection/:type`,e.Station_Closeout=`/station/closeout`,e.Station_Queues=`/station/queues`,e.Station_Overview=`/station/overview`,e.Operations_Dashboard=`/operations`,e.Operations_LoadOutliers=`/operations/load-outliers`,e.Operations_LoadHours=`/operations/load-hours`,e.Operations_LoadCycles=`/operations/load-cycles`,e.Operations_MachineOutliers=`/operations/machine-outliers`,e.Operations_MachineHours=`/operations/machine-hours`,e.Operations_MachineCycles=`/operations/machine-cycles`,e.Operations_SystemOverview=`/operations/system-overview`,e.Operations_AllMaterial=`/operations/material`,e.Operations_RecentSchedules=`/operations/recent-schedules`,e.Operations_CurrentWorkorders=`/operations/current-workorders`,e.Operations_Production=`/operations/recent-production`,e.Operations_Tools=`/operations/tools`,e.Operations_Programs=`/operations/programs`,e.Operations_Quality=`/operations/quality`,e.Operations_Inspections=`/operations/inspections`,e.Operations_CloseoutReport=`/operations/closeout`,e.Operations_Rebookings=`/analysis/rebookings`,e.Operations_Parts=`/operations/parts`,e.Engineering_Cycles=`/engineering`,e.Engineering_Hours=`/engineering/hours`,e.Engineering_Outliers=`/engineering/outliers`,e.Quality_Dashboard=`/quality`,e.Quality_Paths=`/quality/paths`,e.Quality_Quarantine=`/quality/quarantine`,e.Tools_Dashboard=`/tools`,e.Tools_Programs=`/tools/programs`,e.Analysis_Buffers=`/analysis/buffers`,e.Analysis_StationOEE=`/analysis/station-oee`,e.Analysis_PartsCompleted=`/analysis/parts-completed`,e.Analysis_MachineCycles=`/analysis/machine-cycles`,e.Analysis_LoadCycles=`/analysis/load-cycles`,e.Analysis_PalletCycles=`/analysis/pallet-cycles`,e.Analysis_Schedules=`/analysis/schedules`,e.Analysis_Quality=`/analysis/quality`,e.Analysis_ToolReplacements=`/analysis/tool-replacements`,e.Analysis_CostPercents=`/analysis/cost-percents`,e.Analysis_CostPerPiece=`/analysis/cost`,e.Sales_Dashboard=`/sales`,e.Sales_ProjectedUsage=`/sales/projected-usage`,e.VerboseLogging=`/logging`,e.Client_Custom=`/client/:custom+`,e}({}),Fte=X.ofObject($).map(([,e])=>[e,new URLPattern(e,location.origin)]).append([$.Operations_RecentSchedules,new URLPattern(`/operations/completed`,location.origin)]).append([$.Station_Closeout,new URLPattern(`/station/wash`,location.origin)]).toRArray();function oL(e){switch(e.route){case $.Station_LoadMonitor:if(e.queues.length>0||e.completed){let t=new URLSearchParams;for(let n of e.queues)t.append(`queue`,n);return e.completed&&t.append(`completed`,`t`),`/station/loadunload/${e.loadNum}?${t.toString()}`}else return`/station/loadunload/${e.loadNum}`;case $.Station_InspectionMonitorWithType:return`/station/inspection/${encodeURIComponent(e.inspType)}`;case $.Station_Queues:if(e.queues.length>0){let t=new URLSearchParams;for(let n of e.queues)t.append(`queue`,n);return`/station/queues?${t.toString()}`}else return`/station/queues`;case $.Operations_CurrentWorkorders:if(e.workorder){let t=new URLSearchParams;return t.append(`workorder`,e.workorder),`/operations/current-workorders?${t.toString()}`}else return`/operations/current-workorders`;case $.Client_Custom:return`/client/`+e.custom.map(e=>encodeURIComponent(e)).join(`/`);default:return e.route}}function sL(e){for(let[t,n]of Fte){let r=n.exec(e.origin+e.pathname)?.pathname?.groups;if(r)switch(t){case $.Station_LoadMonitor:return{route:t,loadNum:parseInt(r.num??`1`),queues:e.searchParams.getAll(`queue`),completed:e.searchParams.has(`completed`)};case $.Station_InspectionMonitorWithType:{let e=r.type;return e?{route:$.Station_InspectionMonitorWithType,inspType:e}:{route:$.Station_InspectionMonitor}}case $.Station_Queues:return{route:$.Station_Queues,queues:e.searchParams.getAll(`queue`)};case $.Operations_CurrentWorkorders:{let t=e.searchParams.get(`workorder`);return{route:$.Operations_CurrentWorkorders,workorder:t??void 0}}case $.Client_Custom:return{route:$.Client_Custom,custom:r?.custom?.split(`/`)?.map(e=>decodeURIComponent(e))??[]};default:return{route:t}}}return{route:$.ChooseMode}}var cL=Z(sL(new URL(location.href))),lL=Z(!1),uL=Z(e=>e(cL),(e,t,n)=>{let r=e(lL);t(cL,n),t(II,null),r||history.pushState(null,``,oL(n))});function Ite({to:e,children:t}){let n=WE(uL);return(0,L.createElement)(Ag,{href:oL(e),onClick:t=>{t.preventDefault(),t.stopPropagation(),n(e)}},t)}function Lte(){let e=Q(lL),t=WE(cL);(0,L.useEffect)(()=>{if(e)return;function n(){t(sL(new URL(location.href)))}return addEventListener(`popstate`,n),()=>removeEventListener(`popstate`,n)},[e,t])}function dL(){return Q(lL)}function fL(e){(0,L.useEffect)(()=>{document.title=e+` - FMS Insight`},[dL(),e])}function Rte(e){switch(e.route){case $.Station_LoadMonitor:case $.Station_InspectionMonitor:case $.Station_InspectionMonitorWithType:case $.Station_Closeout:case $.Station_Queues:case $.Station_Overview:return`https://www.seedtactics.com/docs/fms-insight/client-station-monitor`;case $.Operations_Dashboard:case $.Operations_LoadOutliers:case $.Operations_LoadHours:case $.Operations_LoadCycles:case $.Operations_SystemOverview:case $.Operations_AllMaterial:case $.Operations_RecentSchedules:case $.Operations_CurrentWorkorders:case $.Operations_CloseoutReport:case $.Operations_Production:case $.Operations_Rebookings:case $.Operations_Parts:return`https://www.seedtactics.com/docs/fms-insight/client-operations`;case $.Operations_MachineOutliers:case $.Operations_MachineHours:case $.Operations_MachineCycles:return`https://www.seedtactics.com/docs/fms-insight/client-engineering`;case $.Operations_Quality:case $.Operations_Inspections:return`https://www.seedtactics.com/docs/fms-insight/client-quality`;case $.Operations_Tools:case $.Operations_Programs:return`https://www.seedtactics.com/docs/fms-insight/client-tools-programs`;case $.Engineering_Cycles:case $.Engineering_Outliers:case $.Engineering_Hours:return`https://www.seedtactics.com/docs/fms-insight/client-engineering`;case $.Quality_Dashboard:case $.Quality_Paths:case $.Quality_Quarantine:return`https://www.seedtactics.com/docs/fms-insight/client-quality`;case $.Tools_Dashboard:case $.Tools_Programs:return`https://www.seedtactics.com/docs/fms-insight/client-tools-programs`;case $.Analysis_Schedules:case $.Analysis_Buffers:case $.Analysis_StationOEE:case $.Analysis_PartsCompleted:case $.Analysis_MachineCycles:case $.Analysis_LoadCycles:case $.Analysis_PalletCycles:case $.Analysis_Quality:case $.Analysis_CostPercents:case $.Analysis_ToolReplacements:case $.Analysis_CostPerPiece:return`https://www.seedtactics.com/docs/fms-insight/client-efficiency`;case $.Sales_Dashboard:case $.Sales_ProjectedUsage:return`https://www.seedtactics.com/docs/fms-insight/client-sales`;case $.ChooseMode:case $.VerboseLogging:case $.Client_Custom:default:return`https://www.seedtactics.com/docs/fms-insight/client-launch`}}var pL=new Intl.NumberFormat(void 0,{style:`percent`,minimumFractionDigits:1});function zte(){let e=new Date;return t=>{if(!t.simulatedProduction)return 0;let n=0;for(let r of t.simulatedProduction){if(r.timeUTC>e)break;n=r.quantity}return n}}var mL=(0,L.memo)(function(){let e=Q(GO),t=X.ofObject(e.jobs).sumBy(([,e])=>X.of(e.completed??[]).sumBy(e=>X.of(e).sumBy(e=>e))),n=X.ofObject(e.jobs).flatMap(([,e])=>e.procsAndPaths).flatMap(e=>e.paths).sumBy(zte()),r=X.ofObject(e.jobs).sumBy(([,e])=>(e.cycles??0)*e.procsAndPaths.length);return(0,R.jsx)(G,{sx:{maxWidth:`60em`,ml:`auto`,mr:`auto`,pt:`1em`},children:(0,R.jsxs)(G,{sx:{display:`grid`,gridTemplateColumns:`auto 1fr auto`,gridColumnGap:`0.5em`,alignItems:`center`},children:[(0,R.jsx)(G,{sx:{gridRow:1,gridColumn:1},children:(0,R.jsxs)(W,{variant:`body2`,children:[`Completed Parts: `,t,`/`,r]})}),(0,R.jsx)(G,{sx:{gridRow:1,gridColumn:2},children:(0,R.jsx)(Cg,{variant:`determinate`,value:t/r*100,color:`secondary`})}),(0,R.jsx)(G,{sx:{gridRow:1,gridColumn:3},children:(0,R.jsx)(W,{variant:`body2`,children:pL.format(t/r)})}),(0,R.jsx)(G,{sx:{gridRow:2,gridColumn:1},children:(0,R.jsxs)(W,{variant:`body2`,children:[`Simulated Parts: `,n,`/`,r]})}),(0,R.jsx)(G,{sx:{gridRow:2,gridColumn:2},children:(0,R.jsx)(Cg,{variant:`determinate`,value:n/r*100,color:`secondary`})}),(0,R.jsx)(G,{sx:{gridRow:2,gridColumn:3},children:(0,R.jsx)(W,{variant:`body2`,children:pL.format(n/r)})})]})})});function Bte(){let{ref:e,width:t,height:n}=mA({refreshMode:`debounce`,refreshRate:100});return(0,R.jsxs)(`main`,{style:{height:`calc(100vh - 64px)`,display:`flex`,flexDirection:`column`},children:[(0,R.jsx)(`div`,{children:(0,R.jsx)(mL,{})}),(0,R.jsx)(`div`,{ref:e,style:{flexGrow:1,overflow:`hidden`,margin:`8px`},children:t&&n&&(0,R.jsx)(wF,{width:t,height:n})})]})}function Vte(){let{ref:e,width:t}=mA({refreshMode:`debounce`,refreshRate:100,handleHeight:!1});return(0,R.jsxs)(`main`,{style:{padding:`8px`},children:[(0,R.jsx)(mL,{}),(0,R.jsx)(`div`,{ref:e,style:{overflow:`hidden`},children:t&&(0,R.jsx)(wF,{width:t,height:500})})]})}function Hte(){return fL(`Dashboard`),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(G,{sx:{display:{xs:`none`,md:`block`}},children:(0,R.jsx)(Bte,{})}),(0,R.jsx)(G,{sx:{display:{xs:`block`,md:`none`}},children:(0,R.jsx)(Vte,{})})]})}var hL=Z([]),gL=hL,_L=Z([]),Ute=_L;function*vL(e){for(let t of e)for(let e=0;e<t.procsAndPaths.length;e++){let n=t.procsAndPaths[e];for(let r=0;r<n.paths.length;r++){let i=n.paths[r],a=0;for(let e of i.stops)a+=ik(e.expectedCycleTime);let o=0;for(let n of i.simulatedProduction||[])yield{partName:t.partName,process:e+1,finalProcess:e===t.procsAndPaths.length-1,completeTime:n.timeUTC,quantity:n.quantity-o,expectedMachineMins:a},o=n.quantity}}}var Wte=Z(null,(e,t,n)=>{t(hL,e=>[...e,...vL(Object.values(n.jobs))])}),Gte=Z(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.newJobs){let e=n.newJobs.jobs;t(hL,t=>{if(i){let n=VC(r,-30),i=X.of(t).minBy(e=>e.completeTime.getTime());if((i===void 0||i.completeTime>=n)&&e.length===0)return t;t=t.filter(e=>e.completeTime>=n)}return[...t,...vL(e)]})}}),Kte=Z(null,(e,t,n)=>{t(_L,Array.from(vL(Object.values(n.jobs))))}),yL=Z($T.empty()),qte=yL,bL=Z($T.empty()),Jte=bL;function xL(e){if(e.elapsed===``)return null;let t=rk(e.elapsed);if(t<=0)return null;switch(e.type){case Y.RemoveFromQueue:return[e.counter,{buffer:{type:`Queue`,queue:e.loc},endTime:e.endUTC,elapsedSeconds:t,numMaterial:e.material.length}];case Y.PalletInStocker:return!e.startofcycle&&e.result===`WaitForMachine`?[e.counter,{buffer:{type:`StockerWaitForMC`,stockerNum:e.locnum},endTime:e.endUTC,elapsedSeconds:t,numMaterial:e.material.length}]:e.startofcycle?null:[e.counter,{buffer:{type:`StockerWaitForUnload`,stockerNum:e.locnum},endTime:e.endUTC,elapsedSeconds:t,numMaterial:e.material.length}];case Y.PalletOnRotaryInbound:return e.startofcycle?null:[e.counter,{buffer:{type:`Rotary`,machineGroup:e.loc,machineNum:e.locnum},endTime:e.endUTC,elapsedSeconds:t,numMaterial:e.material.length}];default:return null}}var Yte=Z(null,(e,t,n)=>{t(yL,e=>e.union(X.of(n).collect(xL).toHashMap(e=>e)))}),Xte=Z(null,(e,t,{evt:n,now:r,expire:i})=>{if(!n.logEntry)return;let a=xL(n.logEntry);a&&t(yL,e=>{if(i){let t=VC(r,-30);e=e.filter(e=>e.endTime>=t)}return e.set(a[0],a[1])})}),Zte=Z(null,(e,t,n)=>{t(bL,X.of(n).collect(xL).toHashMap(e=>e))}),SL=function(e){return e[e.Triggered=0]=`Triggered`,e[e.Forced=1]=`Forced`,e[e.Completed=2]=`Completed`,e}({}),CL=class{constructor(e,t){this.part=e,this.inspType=t}compare(e){let t=this.part.localeCompare(e.part);return t===0?this.inspType.localeCompare(e.inspType):t}hash(){return xT(this.part,this.inspType)}toString(){return`{part: ${this.part}}, inspType: ${this.inspType}}`}},wL=Z($T.empty()),TL=wL,EL=Z($T.empty()),Qte=EL;function DL(e){return e.type!==Y.Inspection&&e.type!==Y.InspectionForce&&e.type!==Y.InspectionResult?[]:e.material.map(t=>{if(e.type===Y.Inspection){let n=JSON.parse((e.details||{}).ActualPath||`[]`),r=[];for(let e of n)r.push(yS.fromJS(e));let i=(e.details||{}).InspectionType||``,a;return a=e.result.toLowerCase()===`true`||e.result===`1`,{key:new CL(t.part,i),entry:{cntr:e.counter,time:e.endUTC,materialID:t.id,serial:t.serial,workorder:t.workorder,result:{type:SL.Triggered,actualPath:r,toInspect:a},part:t.part,inspType:i}}}else if(e.type===Y.InspectionForce){let n;return n=e.result.toLowerCase()===`true`||e.result===`1`,{key:new CL(t.part,e.program),entry:{cntr:e.counter,time:e.endUTC,materialID:t.id,serial:t.serial,workorder:t.workorder,result:{type:SL.Forced,toInspect:n},part:t.part,inspType:e.program}}}else{let n;return n=e.result.toLowerCase()===`true`||e.result===`1`,{key:new CL(t.part,e.program),entry:{cntr:e.counter,time:e.endUTC,materialID:t.id,serial:t.serial,workorder:t.workorder,result:{type:SL.Completed,success:n},part:t.part,inspType:e.program}}}})}var $te=Z(null,(e,t,n)=>{t(wL,e=>e.union(X.of(n).flatMap(DL).toLookupMap(e=>e.key,e=>e.entry.cntr,e=>e.entry),(e,t)=>e.union(t)))}),ene=Z(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.logEntry){let e=DL(n.logEntry);if(e.length===0)return;t(wL,t=>{if(i){let e=VC(r,-30);t=t.collectValues(t=>{let n=t.filter(t=>t.time>=e);return n.size===0?null:n})}return t.union(X.of(e).toLookupMap(e=>e.key,e=>e.entry.cntr,e=>e.entry),(e,t)=>e.union(t))})}else if(n.editMaterialInLog){let e=n.editMaterialInLog.editedEvents;t(wL,t=>t.collectValues(t=>{for(let n of e){let e=n?.material[0],r=t.get(n.counter);if(r!==void 0&&e){let i={...r,materialID:e.id,serial:e.serial,workorder:e.workorder};t=t.set(n.counter,i)}}return t}))}}),tne=Z(null,(e,t,n)=>{t(EL,X.of(n).flatMap(DL).toLookupMap(e=>e.key,e=>e.entry.cntr,e=>e.entry))}),OL=Z({matsById:$T.empty(),matIdsForJob:$T.empty()}),kL=OL,AL=Z({matsById:$T.empty(),matIdsForJob:$T.empty()}),jL=AL;function ML(e){return{materialID:e.materialID,jobUnique:e.jobUnique,partName:e.partName,startedProcess1:e.process>0,serial:e.serial,workorderId:e.workorderId,signaledInspections:e.signaledInspections,quarantineAfterUnload:e.quarantineAfterUnload}}function NL(e,t){let n=e.matsById,r=e.matIdsForJob;if(t.startofcycle||t.material.length===0)return e;for(let e of t.material){if(e.uniq&&e.uniq!==``){let t=r.get(e.uniq);t===void 0?r=r.set(e.uniq,GT.empty().add(e.id)):t.has(e.id)||(r=r.set(e.uniq,t.add(e.id)))}let i=n.get(e.id),a;switch(a=i===void 0?{materialID:e.id,jobUnique:e.uniq,partName:e.part,last_event:t.endUTC,startedProcess1:!1,numProcesses:e.numproc,unloaded_processes:{},signaledInspections:[],quarantineAfterUnload:null,completedInspections:{}}:{...i,last_event:t.endUTC},t.type){case Y.PartMark:a={...a,serial:t.result};break;case Y.OrderAssignment:a={...a,workorderId:t.result};break;case Y.Inspection:if(t.result.toLowerCase()===`true`||t.result===`1`){let e=(t.details||{}).InspectionType;e&&(a={...a,signaledInspections:[...a.signaledInspections,e]})}break;case Y.InspectionForce:if(t.result.toLowerCase()===`true`||t.result===`1`){let e=t.program;a={...a,signaledInspections:[...a.signaledInspections,e]}}break;case Y.InspectionResult:{let e=t.result.toLowerCase()==`true`||t.result===`1`;a={...a,completedInspections:{...a.completedInspections,[t.program]:{time:t.endUTC,success:e}},completed_inspect_time:t.endUTC};break}case Y.LoadUnloadCycle:t.result===`UNLOAD`?(a={...a,unloaded_processes:{...a.unloaded_processes,[e.proc]:t.endUTC},quarantineAfterUnload:!1,currently_quarantined:!1},a=e.proc===e.numproc?{...a,last_unload_time:t.endUTC,completed_last_proc_machining:!0}:{...a,last_unload_time:t.endUTC}):t.result===`LOAD`&&(a={...a,startedProcess1:!0,quarantineAfterUnload:!1,currently_quarantined:!1});break;case Y.MachineCycle:a.currently_quarantined&&(a={...a,currently_quarantined:!1});break;case Y.AddToQueue:t.program===`Quarantine`&&(a={...a,currently_quarantined:!0});break;case Y.CloseOut:a={...a,closeout_completed:t.endUTC,closeout_failed:t.result===`Failed`};break;case Y.SignalQuarantine:a={...a,quarantineAfterUnload:!0}}n=n.set(e.id,a)}return{matsById:n,matIdsForJob:r}}function nne(e,{matIdsForJob:t,matsById:n}){let r=n.valuesToLazySeq().filter(t=>t.last_event<e).toRSet(e=>e.materialID);return r.size>0&&(t=t.collectValues(e=>{let t=X.of(r).fold(e,(e,t)=>e.delete(t));return t.size>0?t:null})),n=n.filter(t=>t.last_event>=e),{matIdsForJob:t,matsById:n}}function rne(e,t){let n=t.matIdsForJob,r=t.matsById.get(e.oldMaterialID)??null,i=t.matsById.get(e.newMaterialID)??null;if(r===null)return t;let a=r,o;if(o=i===null?{materialID:e.newMaterialID,jobUnique:a.jobUnique,partName:a.partName,last_event:a.last_event,numProcesses:a.numProcesses,startedProcess1:!0,unloaded_processes:{},signaledInspections:[],quarantineAfterUnload:null,completedInspections:{}}:i,a.jobUnique&&a.jobUnique!==``&&(!o.jobUnique||o.jobUnique===``)){let e=n.get(a.jobUnique);e!==void 0&&(n=n.set(a.jobUnique,e.delete(a.materialID).add(o.materialID))),o={...o,jobUnique:a.jobUnique},a={...a,jobUnique:``}}let s=a.unloaded_processes;a={...a,unloaded_processes:o.unloaded_processes},o={...o,unloaded_processes:s};for(let t of e.editedEvents){let n=t.material.find(t=>t.id===e.newMaterialID);switch(n&&(o={...o,serial:n.serial??o.serial,workorderId:n.workorder??o.workorderId}),t.type){case Y.Inspection:case Y.InspectionForce:{let e=t.program,n;n=t.result.toLowerCase()===`true`||t.result===`1`,n&&(a={...a,signaledInspections:X.of(a.signaledInspections).filter(t=>t!==e).toRArray()},o={...o,signaledInspections:X.of([...o.signaledInspections,e]).distinct().toSortedArray(e=>e)})}}}return{matsById:t.matsById.set(a.materialID,a).set(o.materialID,o),matIdsForJob:n}}var ine=Z(null,(e,t,n)=>{t(OL,e=>n.reduce(NL,e))}),ane=Z(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.logEntry){let e=n.logEntry;t(OL,t=>{let n=NL(t,e);return n===t||!i?t:nne(VC(r,-30),n)})}else if(n.editMaterialInLog){let e=n.editMaterialInLog;t(OL,t=>rne(e,t))}}),one=Z(null,(e,t,n)=>{t(AL,n.reduce(NL,{matsById:$T.empty(),matIdsForJob:$T.empty()}))}),PL=Z(new Set),FL=PL,IL=Z(new Set),sne=IL,LL=Z(new Set),cne=LL,RL=Z(new Set),zL=RL,lne=Z(null,(e,t,{evt:n})=>{n.newJobs?BL(t,n.newJobs.jobs):n.logEntry?HL(t,[n.logEntry]):n.newCurrentStatus&&VL(e,t,n.newCurrentStatus)}),une=Z(null,(e,t,n)=>{BL(t,Object.values(n.jobs))}),dne=Z(null,(e,t,n)=>HL(t,n)),fne=Z(null,VL);function BL(e,t){e(LL,e=>{let n=new Set;for(let r of t)for(let t of r.procsAndPaths[0].paths)t.casting&&t.casting!==``&&!e.has(t.casting)&&n.add(t.casting);return n.size===0?e:new Set([...e,...n])})}function VL(e,t,n){BL(t,Object.values(n.jobs));let r=e(PL),i=e(IL),a=new Set,o=new Set;for(let[e,t]of X.ofObject(n.queues))t.role===YS.RawMaterial?r.has(e)||a.add(e):t.role===YS.InProcessTransfer&&(i.has(e)||o.add(e));a.size>0&&t(PL,new Set([...r,...a])),o.size>0&&t(IL,new Set([...i,...o]))}function HL(e,t){e(RL,e=>{let n=new Set;for(let r of t)switch(r.type){case Y.Inspection:{let t=(r.details||{}).InspectionType;t&&!e.has(t)&&n.add(t)}break;case Y.InspectionForce:case Y.InspectionResult:{let t=r.program;e.has(t)||n.add(t)}break}return n.size===0?e:new Set([...e,...n])})}var UL=Z($T.empty()),WL=UL;function GL(e,t,n){if(e.tooluse===void 0||e.tooluse.length===0||e.type!==Y.MachineCycle)return n;let r=e.material.length>0?t.get(ak.ofLogCycle(e)):void 0,i=ik(e.elapsed);if(r===void 0||uk(r,i))return n;let a=ak.ofLogCycle(e),o=X.of(e.tooluse).groupBy(e=>e.tool).map(([e,t])=>({toolName:e,cycleUsageMinutes:X.of(t).sumBy(e=>e.toolUseDuringCycle&&e.toolUseDuringCycle!==``?ik(e.toolUseDuringCycle):0),cycleUsageCnt:X.of(t).sumBy(e=>e.toolUseCountDuringCycle??0),toolChangedDuringMiddleOfCycle:X.of(t).some(e=>e.toolChangeOccurred??!1)})).toRArray();return o.length===0&&n.has(a)?n:n.modify(a,t=>{if(t){let n=t.recentCycles.slice(-4);return n.push({tools:o}),{machines:t.machines.add(bk(e.loc,e.locnum)),recentCycles:n}}else return{machines:JT.empty().add(bk(e.loc,e.locnum)),recentCycles:[{tools:o}]}})}var pne=Z(null,(e,t,n)=>{let r=e(sk);t(UL,e=>n.reduce((e,t)=>GL(t,r,e),e))}),mne=Z(null,(e,t,{evt:n})=>{if(n.logEntry){let r=n.logEntry,i=e(sk);t(UL,e=>GL(r,i,e))}}),KL=Z($T.empty()),qL=KL,JL=Z($T.empty()),YL=JL;function XL(e){return{cntr:e.counter,x:e.endUTC,y:ik(e.elapsed),active:ik(e.active),mats:e.material}}var hne=Z(null,(e,t,n)=>{t(KL,e=>e.union(X.of(n).filter(e=>!e.startofcycle&&e.type===Y.PalletCycle&&e.pal!==0).toLookupMap(e=>e.pal,e=>e.counter,XL),(e,t)=>e.union(t)))}),gne=Z(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.logEntry&&!n.logEntry.startofcycle&&n.logEntry.type===Y.PalletCycle&&n.logEntry.pal!==0){let e=n.logEntry;t(KL,t=>{if(i){let e=VC(r,-30);t=t.collectValues(t=>{let n=t.filter(t=>t.x>=e);return n.size>0?n:null})}return t.modify(e.pal,t=>(t??$T.empty()).set(e.counter,XL(e)))})}}),_ne=Z(null,(e,t,n)=>{t(JL,X.of(n).filter(e=>!e.startofcycle&&e.type===Y.PalletCycle&&e.pal!==0).toLookupMap(e=>e.pal,e=>e.counter,XL))}),vne=class e{constructor(e,t){this.group=e,this.num=t}static ofLogCycle(t){return new e(t.loc,t.locnum)}hash(){return xT(this.group,this.num)}compare(e){return this.group===e.group?this.num-e.num:this.group.localeCompare(e.group)}toString(){return this.group+` #`+this.num.toString()}},ZL={replacements:XT.empty(),recentUse:$T.empty()},QL=Z(ZL),$L=Z(e=>e(QL).replacements),eR=Z(ZL),tR=Z(e=>e(eR).replacements);function nR(e,t){let n=vne.ofLogCycle(t);return{replacements:e.replacements.alter(n,r=>{let i=[];for(let r of t.tooluse??[]){let t=r.toolUseDuringCycle!==null&&r.toolUseDuringCycle!==void 0?ik(r.toolUseDuringCycle):null,a=r.totalToolUseAtEndOfCycle!==null&&r.totalToolUseAtEndOfCycle!==void 0?ik(r.totalToolUseAtEndOfCycle):null,o=r.toolUseCountDuringCycle??null,s=r.totalToolUseCountAtEndOfCycle??null;if((t||o)&&t===a&&o===s){let t=e.recentUse.get(n)?.find(e=>e.tool===r.tool&&e.pocket===r.pocket);if(t){let e=t.totalToolUseAtEndOfCycle?ik(t.totalToolUseAtEndOfCycle):null;(e||t.totalToolUseCountAtEndOfCycle)&&i.push({tool:r.tool,pocket:r.pocket,type:`ReplaceBeforeCycleStart`,useAtReplacement:e,cntAtReplacement:t.totalToolUseCountAtEndOfCycle??null})}}else if(r.toolChangeOccurred&&(t&&r.configuredToolLife||o&&r.configuredToolLifeCount)){let e=r.configuredToolLife!==null&&r.configuredToolLife!==void 0?ik(r.configuredToolLife):null,n=r.configuredToolLifeCount??null;i.push({tool:r.tool,pocket:r.pocket,type:`ReplaceInCycle`,totalUseAtBeginningOfCycle:e!==null&&t!==null?e-t+(a??0):null,totalUseAtEndOfCycle:a,totalCntAtBeginningOfCycle:n!==null&&o!==null?n-o+(s??0):null,totalCntAtEndOfCycle:s})}}return i.length>0?(r??XT.empty()).set(t.counter,{time:t.endUTC,replacements:i}):r}),recentUse:t.tooluse?e.recentUse.set(n,t.tooluse):e.recentUse}}var yne=Z(null,(e,t,n)=>{t(QL,e=>X.of(n).filter(e=>e.type===Y.MachineCycle&&!e.startofcycle&&!!e.tooluse&&e.tooluse.length>0).fold(e,nR))}),bne=Z(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.logEntry&&!n.logEntry.startofcycle&&n.logEntry.type===Y.MachineCycle&&n.logEntry.tooluse&&n.logEntry.tooluse.length>0){let e=n.logEntry;t(QL,t=>{if(i){let e=VC(r,-30);t={replacements:t.replacements.collectValues(t=>{let n=t.filter(t=>t.time>=e);return n.size>0?n:null}),recentUse:t.recentUse}}return nR(t,e)})}}),xne=Z(null,(e,t,n)=>{t(eR,X.of(n).filter(e=>e.type===Y.MachineCycle&&!e.startofcycle&&!!e.tooluse&&e.tooluse.length>0).fold(ZL,nR))}),rR=Z(null),iR=rR;function aR(e,t,n,r){let i=e(iR);(i===null||i.simId<n)&&t(rR,{simId:n,usage:r})}var Sne=Z(null,(e,t,n)=>{!n.mostRecentSimulationId||!n.mostRecentSimDayUsage||n.mostRecentSimDayUsage.length===0||aR(e,t,n.mostRecentSimulationId,n.mostRecentSimDayUsage)}),Cne=Z(null,(e,t,{evt:n})=>{n.newJobs&&n.newJobs.simDayUsage&&n.newJobs.simDayUsage.length>0&&aR(e,t,n.newJobs.scheduleId,n.newJobs.simDayUsage)}),oR=Z(XT.empty()),wne=BO(Z(async(e,{signal:t})=>{let n=await wC.unscheduledRebookings(t);return XT.build(n,e=>e.bookingId)})),sR=Z(e=>{let t=e(oR),n=e(wne);return n.state===`hasData`?t.union(n.data,(e,t)=>e??t):t}),cR=Z(XT.empty()),Tne=cR,lR=Z(XT.empty()),Ene=lR;function uR(e){let t=1;return e.details?.Quantity&&(t=parseInt(e.details.Quantity,10)),{bookingId:e.result,partName:e.program,quantity:t,timeUTC:e.endUTC,priority:e.locnum,notes:e.details?.Notes,workorder:e.details?.Workorder??e.material?.[0]?.workorder}}var Dne=Z(null,(e,t,n)=>{t(oR,e=>e.union(X.of(n).filter(e=>e.type===Y.Rebooking).toOrderedMap(e=>[e.result,uR(e)]))),t(cR,e=>e.union(X.of(n).filter(e=>e.type===Y.CancelRebooking).toOrderedMap(e=>[e.result,e.endUTC])))});function dR(e,t,n){e(lR,e=>(n&&(e=e.filter(e=>e.scheduledTime>=n)),e.union(t.flatMap(e=>(e.bookings??[]).map(t=>[t,{scheduledTime:e.routeStartUTC,jobUnique:e.unique}])).toOrderedMap(e=>e))))}var One=Z(null,(e,t,n)=>{dR(t,X.ofObject(n.jobs).map(([e,t])=>t))}),kne=Z(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.newJobs)dR(t,X.of(n.newJobs.jobs),i?VC(r,-30):void 0);else if(n.logEntry){let e=n.logEntry;e.type===Y.Rebooking?t(oR,t=>t.set(e.result,uR(e))):e.type===Y.CancelRebooking&&t(cR,t=>t.set(e.result,e.endUTC))}});function Ane(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(e=>(t(!0),TC.cancelRebooking(e).then(()=>{}).catch(console.log).finally(()=>t(!1))),[]),e]}function jne(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(e=>(t(!0),TC.requestRebooking(e.part,e.qty&&!isNaN(e.qty)?e.qty:1,e.workorder,e.priority!==void 0&&e.priority!==null&&!isNaN(e.priority)?e.priority:void 0,e.notes).then(()=>{}).catch(console.log).finally(()=>t(!1))),[]),e]}var fR=Z(null),Mne=fR,Nne=Z(null,(e,t,n)=>{if(t(Gte,n),t(nA,n),t(tD,n),t(Xte,n),t(XO,n),t(ane,n),t(ene,n),t(lne,n),t(mne,n),t(gne,n),t(bne,n),t(kk,n),t(kne,n),t(Cne,n),n.evt.logEntry){let e=n.evt.logEntry.counter;t(fR,t=>t===null?t:Math.max(t,e))}}),pR=Z(null,(e,t,n)=>{let r=$E(e(XE),n);t(tA,r),t(Wte,r),t(eD,r),t(une,r),t(Sne,r),t(One,r)}),mR=Z(null,(e,t,n)=>{t(vk,n),t(Yte,n),t($te,n),t(ine,n),t(dne,n),t(pne,n),t(hne,n),t(yne,n),t(Ok,n),t(Dne,n);let r=X.of(n).maxBy(e=>e.counter)?.counter??null;t(fR,e=>e===null?r:Math.max(e,r??-1))}),hR=Z(null,(e,t,n)=>{t(YO,n),t(fne,n)}),Pne=Z(null,(e,t,n)=>{t(rA,n),t(Kte,n),t(nD,n)}),Fne=Z(null,(e,t,n)=>{t(yk,n),t(Zte,n),t(tne,n),t(one,n),t(_ne,n),t(xne,n),t(Ak,n)}),gR=Z(`Last30`),_R=Z(uw(new Date)),Ine=Z(e=>e(_R),(e,t,n)=>{t(gR,`SpecificMonth`),t(_R,n),e(yR)!==n&&!e(bR)&&zne(n,t)}),vR=Z(e=>e(gR)===`Last30`?{type:`Last30`}:{type:`SpecificMonth`,month:e(_R)}),yR=Z(null),bR=Z(!1),Lne=bR,xR=Z(null),Rne=xR;function zne(e,t){t(bR,!0),t(xR,null);let n=HC(e,1),r=wC.history(e,n).then(e=>t(Pne,e)),i=TC.get(e,n).then(e=>t(Fne,e));Promise.all([r,i]).then(()=>t(yR,e)).catch(e=>t(xR,e.message??`Error`)).finally(()=>t(bR,!1))}function Bne(){let e=WE(gR);return()=>e(`Last30`)}function Vne(){return WE(_R)}function SR(e){return e.isLabor&&e.operation===`UNLOAD`}function CR(e){return Object.prototype.hasOwnProperty.call(e,`month`)}function Hne(e,t,n,r){let i=CR(r)?r.month:r.thirtyDaysAgo,a=CR(r)?HC(r.month,1):VC(r.thirtyDaysAgo,31),o=0,s=new Map,c=0,l=new Map,u=e.filter(e=>e.endTime>=i&&e.endTime<=a&&!e.material.some(e=>t.has(e.part)));for(let e of u)if(SR(e)&&(o+=1),e.isLabor)c+=e.activeMinutes;else{s.set(e.stationGroup,e.activeMinutes+(s.get(e.stationGroup)??0));let t=l.get(e.stationGroup);t?t.add(e.stationNumber):l.set(e.stationGroup,new Set([e.stationNumber]))}let d=X.of(n).filter(([,e])=>{if(t.has(e.partName)||e.numProcesses===void 0)return!1;let n=e.unloaded_processes?.[e.numProcesses];return!!n&&n>=i&&n<=a}).toRMap(([,e])=>[e.partName,1],(e,t)=>e+t);return{parts:u.groupBy(e=>e.part).map(([e,t])=>({part:e,parts_completed:d.get(e)??0,machine:X.of(t).filter(e=>!e.isLabor).buildOrderedMap(e=>e.stationGroup,(e,t)=>(e??0)+t.activeMinutes).mapValues((e,t)=>e/(s.get(t)??1)),labor:X.of(t).filter(e=>e.isLabor).sumBy(e=>e.activeMinutes/c),automation:t.reduce((e,t)=>SR(t)?e+1:e,0)/o})).toRArray(),machineQuantities:X.of(l).toOrderedMap(([e,t])=>[e,t.size]),type:r}}function Une(e,t,n,r){let i=CR(e.type)?dw(e.type.month):30,a=n?n*i/365:0,o=e.machineQuantities.mapValues((e,n)=>(t[n]??0)*e*i/365);return{machineQuantities:e.machineQuantities,type:e.type,parts:e.parts.map(e=>({part:e.part,parts_completed:e.parts_completed,machine:e.machine.mapValues((t,n)=>e.parts_completed>0?t*(o.get(n)??0)/e.parts_completed:0),labor:e.parts_completed>0?e.labor*r/e.parts_completed:0,automation:e.parts_completed>0?e.automation*a/e.parts_completed:0}))}}function Wne(e){let t=`<table>
|
|
236
|
+
<thead><tr>`;t+=`<th>Part</th>`,t+=`<th>Completed Quantity</th>`;for(let n of e.machineQuantities.keys())t+=`<th>`+n+` Cost %</th>`;t+=`<th>Labor Cost</th>`,t+=`<th>Automation Cost</th>`,t+=`</tr></thead>
|
|
237
|
+
<tbody>
|
|
238
|
+
`;let n=X.of(e.parts).sortBy(e=>e.part),r=Intl.NumberFormat(void 0,{maximumFractionDigits:1});for(let i of n){t+=`<tr><td>`+i.part+`</td>`,t+=`<td>`+i.parts_completed.toString()+`</td>`;for(let n of e.machineQuantities.keys())t+=`<td>`+r.format(i.machine.get(n)??0)+`</td>`;t+=`<td>`+(i.parts_completed>0?r.format(i.labor):`0`)+`</td>`,t+=`<td>`+(i.parts_completed>0?r.format(i.automation):`0`)+`</td>`,t+=`</tr>
|
|
239
|
+
`}return t+=`</tbody>
|
|
240
|
+
</table>`,t}function Gne(e){(0,Mk.default)(Wne(e))}function Kne(e){let t=`<table>
|
|
241
|
+
<thead><tr>`;t+=`<th>Part</th>`,t+=`<th>Completed Quantity</th>`;for(let n of e.machineQuantities.keys())t+=`<th>`+n+` Cost %</th>`;t+=`<th>Labor Cost %</th>`,t+=`<th>Automation Cost %</th>`,t+=`</tr></thead>
|
|
242
|
+
<tbody>
|
|
243
|
+
`;let n=X.of(e.parts).sortBy(e=>e.part),r=new Intl.NumberFormat(void 0,{style:`percent`,minimumFractionDigits:1,maximumFractionDigits:1});for(let i of n){t+=`<tr><td>`+i.part+`</td>`,t+=`<td>`+i.parts_completed.toString()+`</td>`;for(let n of e.machineQuantities.keys())t+=`<td>`+r.format(i.machine.get(n)??0)+`</td>`;t+=`<td>`+r.format(i.labor)+`</td>`,t+=`<td>`+r.format(i.automation)+`</td>`,t+=`</tr>
|
|
244
|
+
`}return t+=`</tbody>
|
|
245
|
+
</table>`,t}function qne(e){(0,Mk.default)(Kne(e))}function wR(e,t,n){return parseInt(e.substr(t,n),16)}function TR(e){return e|=0,e<0?`00`:e<16?`0`+e.toString(16):e<256?e.toString(16):`ff`}function ER(e,t,n){return n=n<0?n+6:n>6?n-6:n,TR(255*(n<1?e+(t-e)*n:n<3?t:n<4?e+(t-e)*(4-n):e))}function Jne(e){if(/^#[0-9a-f]{3,8}$/i.test(e)){let t,n=e.length;if(n<6){let n=e[1],r=e[2],i=e[3],a=e[4]||``;t=`#`+n+n+r+r+i+i+a+a}return(n==7||n>8)&&(t=e),t}}function Yne(e,t,n){let r;if(t==0){let e=TR(n*255);r=e+e+e}else{let i=n<=.5?n*(t+1):n+t-n*t,a=n*2-i;r=ER(a,i,e*6+2)+ER(a,i,e*6)+ER(a,i,e*6-2)}return`#`+r}function DR(e,t,n){let r=[.55,.5,.5,.46,.6,.55,.55][e*6+.5|0];return n=n<.5?n*r*2:r+(n-.5)*(1-r)*2,Yne(e,t,n)}var Xne=typeof window<`u`?window:typeof self<`u`?self:typeof global<`u`?global:{},OR={V:`jdenticon_config`,n:`config`},Zne={};function Qne(e,t){let n=typeof e==`object`&&e||Zne[OR.n]||Xne[OR.V]||{},r=n.lightness||{},i=n.saturation||{},a=`color`in i?i.color:i,o=i.grayscale,s=n.backColor,c=n.padding;function l(e,t){let n=r[e];return n&&n.length>1||(n=t),function(e){return e=n[0]+e*(n[1]-n[0]),e<0?0:e>1?1:e}}function u(e){let t=n.hues,r;return t&&t.length>0&&(r=t[0|.999*e*t.length]),typeof r==`number`?(r/360%1+1)%1:e}return{W:u,o:typeof a==`number`?a:.5,D:typeof o==`number`?o:0,p:l(`color`,[.4,.8]),F:l(`grayscale`,[.3,.9]),G:Jne(s),X:typeof e==`number`?e:typeof c==`number`?c:t}}var kR=class{constructor(e,t){this.x=e,this.y=t}},AR=class{constructor(e,t,n,r){this.q=e,this.t=t,this.H=n,this.Y=r}I(e,t,n,r){let i=this.q+this.H,a=this.t+this.H,o=this.Y;return o===1?new kR(i-t-(r||0),this.t+e):o===2?new kR(i-e-(n||0),a-t-(r||0)):o===3?new kR(this.q+t,a-e-(n||0)):new kR(this.q+e,this.t+t)}},$ne=new AR(0,0,0,0),ere=class{constructor(e){this.J=e,this.u=$ne}g(e,t){let n=t?-2:2,r=[];for(let i=t?e.length-2:0;i<e.length&&i>=0;i+=n)r.push(this.u.I(e[i],e[i+1]));this.J.g(r)}h(e,t,n,r){let i=this.u.I(e,t,n,n);this.J.h(i,n,r)}i(e,t,n,r,i){this.g([e,t,e+n,t,e+n,t+r,e,t+r],i)}j(e,t,n,r,i,a){let o=[e+n,t,e+n,t+r,e,t+r,e,t];o.splice((i||0)%4*2,2),this.g(o,a)}K(e,t,n,r,i){this.g([e+n/2,t,e+n,t+r/2,e+n/2,t+r,e,t+r/2],i)}};function tre(e,t,n,r){e%=14;let i,a,o,s,c,l;e?e==1?(o=0|n*.5,s=0|n*.8,t.j(n-o,0,o,s,2)):e==2?(o=0|n/3,t.i(o,o,n-o,n-o)):e==3?(c=n*.1,l=n<6?1:n<8?2:0|n*.25,c=c>1?0|c:c>.5?1:c,t.i(l,l,n-c-l,n-c-l)):e==4?(a=0|n*.15,o=0|n*.5,t.h(n-o-a,n-o-a,o)):e==5?(c=n*.1,l=c*4,l>3&&(l=0|l),t.i(0,0,n,n),t.g([l,l,n-c,l,l+(n-l-c)/2,n-c],!0)):e==6?t.g([0,0,n,0,n,n*.7,n*.4,n*.4,n*.7,n,0,n]):e==7?t.j(n/2,n/2,n/2,n/2,3):e==8?(t.i(0,0,n,n/2),t.i(0,n/2,n/2,n/2),t.j(n/2,n/2,n/2,n/2,1)):e==9?(c=n*.14,l=n<4?1:n<6?2:0|n*.35,c=n<8?c:0|c,t.i(0,0,n,n),t.i(l,l,n-l-c,n-l-c,!0)):e==10?(c=n*.12,l=c*3,t.i(0,0,n,n),t.h(l,l,n-c-l,!0)):e==11?t.j(n/2,n/2,n/2,n/2,3):e==12?(a=n*.25,t.i(0,0,n,n),t.K(a,a,n-a,n-a,!0)):!r&&(a=n*.4,o=n*1.2,t.h(a,a,o)):(i=n*.42,t.g([0,0,n,0,n,n-i*2,n-i,n,0,n]))}function jR(e,t,n){e%=4;let r;e?e==1?t.j(0,n/2,n,n/2,0):e==2?t.K(0,0,n,n):(r=n/6,t.h(r,r,n-2*r)):t.j(0,0,n,n,0)}function nre(e,t){return e=t.W(e),[DR(e,t.D,t.F(0)),DR(e,t.o,t.p(.5)),DR(e,t.D,t.F(1)),DR(e,t.o,t.p(1)),DR(e,t.o,t.p(0))]}function rre(e,t,n){let r=Qne(n,.08);r.G&&e.m(r.G);let i=e.k,a=.5+i*r.X|0;i-=a*2;let o=new ere(e),s=0|i/4,c=0|a+i/2-s*2,l=0|a+i/2-s*2;function u(n,r,i,a,u){let p=wR(t,i,1),m=a?wR(t,a,1):0;e.L(d[f[n]]);for(let e=0;e<u.length;e++)o.u=new AR(c+u[e][0]*s,l+u[e][1]*s,s,m++%4),r(p,o,s,e);e.M()}let d=nre(wR(t,-7)/268435455,r),f=[],p;function m(e){if(e.indexOf(p)>=0){for(let t=0;t<e.length;t++)if(f.indexOf(e[t])>=0)return!0}}for(let e=0;e<3;e++)p=wR(t,8+e,1)%d.length,(m([0,4])||m([2,3]))&&(p=1),f.push(p);u(0,jR,2,3,[[1,0],[2,0],[2,3],[1,3],[0,1],[3,1],[3,2],[0,2]]),u(1,jR,4,5,[[0,0],[3,0],[3,3],[0,3]]),u(2,tre,1,null,[[1,1],[2,1],[2,2],[1,2]]),e.finish()}function ire(e){var t=0,n=0,r=encodeURI(e)+`%80`,i=[],a,o=[],s=1732584193,c=4023233417,l=~s,u=~c,d=3285377520,f=[s,c,l,u,d],p=0,m=``;function h(e,t){return e<<t|e>>>32-t}for(;t<r.length;n++)i[n>>2]=i[n>>2]|(r[t]==`%`?parseInt(r.substring(t+1,t+=3),16):r.charCodeAt(t++))<<(3-(n&3))*8;for(a=((n+7>>6)+1)*16,i[a-1]=n*8-8;p<a;p+=16){for(t=0;t<80;t++)n=h(s,5)+d+(t<20?(c&l^~c&u)+1518500249:t<40?(c^l^u)+1859775393:t<60?(c&l^c&u^l&u)+2400959708:(c^l^u)+3395469782)+(o[t]=t<16?i[p+t]|0:h(o[t-3]^o[t-8]^o[t-14]^o[t-16],1)),d=u,u=l,l=h(c,30),c=s,s=n;f[0]=s=f[0]+s|0,f[1]=c=f[1]+c|0,f[2]=l=f[2]+l|0,f[3]=u=f[3]+u|0,f[4]=d=f[4]+d|0}for(t=0;t<40;t++)m+=(f[t>>3]>>>(7-(t&7))*4&15).toString(16);return m}function are(e){return/^[0-9a-f]{11,}$/i.test(e)&&e}function ore(e){return ire(e==null?``:``+e)}typeof document<`u`&&document.querySelectorAll.bind(document);function MR(e){return(e*10+.5|0)/10}var sre=class{constructor(){this.v=``}g(e){let t=``;for(let n=0;n<e.length;n++)t+=(n?`L`:`M`)+MR(e[n].x)+` `+MR(e[n].y);this.v+=t+`Z`}h(e,t,n){let r=n?0:1,i=MR(t/2),a=MR(t),o=`a`+i+`,`+i+` 0 1,`+r+` `;this.v+=`M`+MR(e.x)+` `+MR(e.y+t/2)+o+a+`,0`+o+-a+`,0`}},cre=class{constructor(e){this.A,this.B={},this.O=e,this.k=e.k}m(e){let t=/^(#......)(..)?/.exec(e),n=t[2]?wR(t[2],0)/255:1;this.O.m(t[1],n)}L(e){this.A=this.B[e]||(this.B[e]=new sre)}M(){}g(e){this.A.g(e)}h(e,t,n){this.A.h(e,t,n)}finish(){let e=this.B;for(let t in e)e.hasOwnProperty(t)&&this.O.P(t,e[t].v)}},lre={R:`http://www.w3.org/2000/svg`,S:`width`,T:`height`},ure=class{constructor(e){this.k=e,this.C=`<svg xmlns="`+lre.R+`" width="`+e+`" height="`+e+`" viewBox="0 0 `+e+` `+e+`">`}m(e,t){t&&(this.C+=`<rect width="100%" height="100%" fill="`+e+`" opacity="`+t.toFixed(2)+`"/>`)}P(e,t){this.C+=`<path fill="`+e+`" d="`+t+`"/>`}toString(){return this.C+`</svg>`}};function dre(e,t,n){let r=new ure(t);return rre(new cre(r),are(e)||ore(e),n),r.toString()}function NR(e){let t=new Date(e);if(!Number.isNaN(t.valueOf()))return t;let n=String(e).match(/\d+/g);if(n==null||n.length<=2)return t;{let[e,t,...r]=n.map(e=>parseInt(e)),i=[e,t-1,...r];return new Date(Date.UTC(...i))}}var PR=(e,t,n)=>{let r=e===1?t:t+`s`;return e+` `+r+` `+n};function FR(){return FR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},FR.apply(null,arguments)}var IR=60,LR=IR*60,RR=LR*24,zR=RR*7,BR=RR*30,VR=RR*365,HR=()=>Date.now();function UR({date:e,formatter:t,component:n=`time`,live:r=!0,minPeriod:i=0,maxPeriod:a=zR,title:o,now:s=HR,...c}){let[l,u]=(0,L.useState)(s());(0,L.useEffect)(()=>{if(!r)return;let t=(()=>{let t=NR(e).valueOf();if(!t)return console.warn(`[react-timeago] Invalid Date provided`),0;let n=Math.round(Math.abs(l-t)/1e3),r=n<IR?1e3:n<LR?1e3*IR:n<RR?1e3*LR:1e3*zR,o=Math.min(Math.max(r,i*1e3),a*1e3);return o?setTimeout(()=>{u(s())},o):0})();return()=>{t&&clearTimeout(t)}},[e,r,a,i,s,l]),(0,L.useEffect)(()=>{u(s())},[e]);let d=n,f=NR(e).valueOf();if(!f)return null;let p=Math.round(Math.abs(l-f)/1e3),m=f<l?`ago`:`from now`,[h,g]=p<IR?[Math.round(p),`second`]:p<LR?[Math.round(p/IR),`minute`]:p<RR?[Math.round(p/LR),`hour`]:p<zR?[Math.round(p/RR),`day`]:p<BR?[Math.round(p/zR),`week`]:p<VR?[Math.round(p/BR),`month`]:[Math.round(p/VR),`year`],_=o===void 0?typeof e==`string`?e:NR(e).toISOString().substring(0,16).replace(`T`,` `):o,v=d===`time`?{...c,dateTime:NR(e).toISOString()}:c,y=(e=e,t=t,n=n,r=f,i=PR,a=a)=>PR(e,t,n,r,i,a),b=t||PR,x;try{x=b(h,g,m,f,y,s),x||=PR(h,g,m,f,y,s)}catch(e){console.error(`[react-timeago] Formatter threw an error:`,e),x=PR(h,g,m,f,y,s)}return L.createElement(d,FR({},v,{title:_}),x)}function WR(){var e=[...arguments];return(0,L.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var GR=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function KR(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function qR(e){return`nodeType`in e}function JR(e){return e?KR(e)?e:qR(e)?e.ownerDocument?.defaultView??window:window:window}function YR(e){let{Document:t}=JR(e);return e instanceof t}function XR(e){return KR(e)?!1:e instanceof JR(e).HTMLElement}function ZR(e){return e instanceof JR(e).SVGElement}function QR(e){return e?KR(e)?e.document:qR(e)?YR(e)?e:XR(e)||ZR(e)?e.ownerDocument:document:document:document}var $R=GR?L.useLayoutEffect:L.useEffect;function ez(e){let t=(0,L.useRef)(e);return $R(()=>{t.current=e}),(0,L.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function tz(){let e=(0,L.useRef)(null);return[(0,L.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,L.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function nz(e,t){t===void 0&&(t=[e]);let n=(0,L.useRef)(e);return $R(()=>{n.current!==e&&(n.current=e)},t),n}function rz(e,t){let n=(0,L.useRef)();return(0,L.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function iz(e){let t=ez(e),n=(0,L.useRef)(null);return[n,(0,L.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function az(e){let t=(0,L.useRef)();return(0,L.useEffect)(()=>{t.current=e},[e]),t.current}var oz={};function sz(e,t){return(0,L.useMemo)(()=>{if(t)return t;let n=oz[e]==null?0:oz[e]+1;return oz[e]=n,e+`-`+n},[e,t])}function cz(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var lz=cz(1),uz=cz(-1);function dz(e){return`clientX`in e&&`clientY`in e}function fz(e){if(!e)return!1;let{KeyboardEvent:t}=JR(e.target);return t&&e instanceof t}function pz(e){if(!e)return!1;let{TouchEvent:t}=JR(e.target);return t&&e instanceof t}function mz(e){if(pz(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return dz(e)?{x:e.clientX,y:e.clientY}:null}var hz=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[hz.Translate.toString(e),hz.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),gz=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function _z(e){return e.matches(gz)?e:e.querySelector(gz)}var vz={display:`none`};function yz(e){let{id:t,value:n}=e;return L.createElement(`div`,{id:t,style:vz},n)}function bz(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return L.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function xz(){let[e,t]=(0,L.useState)(``);return{announce:(0,L.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var Sz=(0,L.createContext)(null);function Cz(e){let t=(0,L.useContext)(Sz);(0,L.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function wz(){let[e]=(0,L.useState)(()=>new Set),t=(0,L.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,L.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var Tz={draggable:`
|
|
246
|
+
To pick up a draggable item, press the space bar.
|
|
247
|
+
While dragging, use the arrow keys to move the item.
|
|
248
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
249
|
+
`},Ez={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function Dz(e){let{announcements:t=Ez,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=Tz}=e,{announce:a,announcement:o}=xz(),s=sz(`DndLiveRegion`),[c,l]=(0,L.useState)(!1);if((0,L.useEffect)(()=>{l(!0)},[]),Cz((0,L.useMemo)(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;let u=L.createElement(L.Fragment,null,L.createElement(yz,{id:r,value:i.draggable}),L.createElement(bz,{id:s,announcement:o}));return n?(0,qs.createPortal)(u,n):u}var Oz;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(Oz||={});function kz(){}function Az(e,t){return(0,L.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function jz(){var e=[...arguments];return(0,L.useMemo)(()=>[...e].filter(e=>e!=null),[...e])}var Mz=Object.freeze({x:0,y:0});function Nz(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function Pz(e,t){let n=mz(e);if(!n)return`0 0`;let r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+`% `+r.y+`%`}function Fz(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Iz(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Lz(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function Rz(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function zz(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}var Bz=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=zz(t,t.left,t.top),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=Nz(zz(r),i);a.push({id:t,data:{droppableContainer:e,value:n}})}}return a.sort(Fz)},Vz=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=Lz(t),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=Lz(r),o=i.reduce((e,t,r)=>e+Nz(n[r],t),0),s=Number((o/4).toFixed(4));a.push({id:t,data:{droppableContainer:e,value:s}})}}return a.sort(Fz)};function Hz(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s,a=i/(n+r-i);return Number(a.toFixed(4))}return 0}var Uz=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=Hz(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(Iz)};function Wz(e,t){let{top:n,left:r,bottom:i,right:a}=t;return n<=e.y&&e.y<=i&&r<=e.x&&e.x<=a}var Gz=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(!r)return[];let i=[];for(let e of t){let{id:t}=e,a=n.get(t);if(a&&Wz(r,a)){let n=Lz(a).reduce((e,t)=>e+Nz(r,t),0),o=Number((n/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:o}})}}return i.sort(Fz)};function Kz(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function qz(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Mz}function Jz(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var Yz=Jz(1);function Xz(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Zz(e,t,n){let r=Xz(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var Qz={ignoreTransform:!1};function $z(e,t){t===void 0&&(t=Qz);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=JR(e).getComputedStyle(e);t&&(n=Zz(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function eB(e){return $z(e,{ignoreTransform:!0})}function tB(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function nB(e,t){return t===void 0&&(t=JR(e).getComputedStyle(e)),t.position===`fixed`}function rB(e,t){t===void 0&&(t=JR(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`?n.test(r):!1})}function iB(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(YR(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!XR(i)||ZR(i)||n.includes(i))return n;let a=JR(e).getComputedStyle(i);return i!==e&&rB(i,a)&&n.push(i),nB(i,a)?n:r(i.parentNode)}return e?r(e):n}function aB(e){let[t]=iB(e,1);return t??null}function oB(e){return!GR||!e?null:KR(e)?e:qR(e)?YR(e)||e===QR(e).scrollingElement?window:XR(e)?e:null:null}function sB(e){return KR(e)?e.scrollX:e.scrollLeft}function cB(e){return KR(e)?e.scrollY:e.scrollTop}function lB(e){return{x:sB(e),y:cB(e)}}var uB;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(uB||={});function dB(e){return!GR||!e?!1:e===document.scrollingElement}function fB(e){let t={x:0,y:0},n=dB(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}var pB={x:.2,y:.2};function mB(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=pB);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=fB(e),p={x:0,y:0},m={x:0,y:0},h={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+h.height?(p.y=uB.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=uB.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=uB.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=uB.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function hB(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function gB(e){return e.reduce((e,t)=>lz(e,lB(t)),Mz)}function _B(e){return e.reduce((e,t)=>e+sB(t),0)}function vB(e){return e.reduce((e,t)=>e+cB(t),0)}function yB(e,t){if(t===void 0&&(t=$z),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);aB(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var bB=[[`x`,[`left`,`right`],_B],[`y`,[`top`,`bottom`],vB]],xB=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=iB(t),r=gB(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of bB)for(let a of t)Object.defineProperty(this,a,{get:()=>{let t=i(n),o=r[e]-t;return this.rect[a]+o},enumerable:!0});Object.defineProperty(this,`rect`,{enumerable:!1})}},SB=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function CB(e){let{EventTarget:t}=JR(e);return e instanceof t?e:QR(e)}function wB(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t?r>t.y:!1}var TB;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(TB||={});function EB(e){e.preventDefault()}function DB(e){e.stopPropagation()}var OB;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})(OB||={});var kB={start:[OB.Space,OB.Enter],cancel:[OB.Esc],end:[OB.Space,OB.Enter,OB.Tab]},AB=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case OB.Right:return{...n,x:n.x+25};case OB.Left:return{...n,x:n.x-25};case OB.Down:return{...n,y:n.y+25};case OB.Up:return{...n,y:n.y-25}}},jB=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new SB(QR(t)),this.windowListeners=new SB(JR(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(TB.Resize,this.handleCancel),this.windowListeners.add(TB.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(TB.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&yB(n),t(Mz)}handleKeyDown(e){if(fz(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=kB,coordinateGetter:a=AB,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:Mz;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=uz(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=fB(n),p=hB(n),m={x:Math.min(i===OB.Right?p.right-p.width/2:p.right,Math.max(i===OB.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===OB.Down?p.bottom-p.height/2:p.bottom,Math.max(i===OB.Down?p.top:p.top+p.height/2,u.y))},h=i===OB.Right&&!s||i===OB.Left&&!c,g=i===OB.Down&&!l||i===OB.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===OB.Right&&e<=d.x||i===OB.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}a?r.x=n.scrollLeft-e:r.x=i===OB.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}else if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===OB.Down&&e<=d.y||i===OB.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}a?r.y=n.scrollTop-e:r.y=i===OB.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,lz(uz(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};jB.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=kB,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function MB(e){return!!(e&&`distance`in e)}function NB(e){return!!(e&&`delay`in e)}var PB=class{constructor(e,t,n){n===void 0&&(n=CB(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=QR(i),this.documentListeners=new SB(this.document),this.listeners=new SB(n),this.windowListeners=new SB(JR(i)),this.initialCoordinates=mz(r)??Mz,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(TB.Resize,this.handleCancel),this.windowListeners.add(TB.DragStart,EB),this.windowListeners.add(TB.VisibilityChange,this.handleCancel),this.windowListeners.add(TB.ContextMenu,EB),this.documentListeners.add(TB.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(NB(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(MB(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(TB.Click,DB,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(TB.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=mz(e)??Mz,s=uz(n,o);if(!t&&a){if(MB(a)){if(a.tolerance!=null&&wB(s,a.tolerance))return this.handleCancel();if(wB(s,a.distance))return this.handleStart()}if(NB(a)&&wB(s,a.tolerance))return this.handleCancel();this.handlePending(a,s);return}e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===OB.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},FB={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},IB=class extends PB{constructor(e){let{event:t}=e,n=QR(t.target);super(e,FB,n)}};IB.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var LB={move:{name:`mousemove`},end:{name:`mouseup`}},RB;(function(e){e[e.RightClick=2]=`RightClick`})(RB||={});var zB=class extends PB{constructor(e){super(e,LB,QR(e.event.target))}};zB.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===RB.RightClick?!1:(r?.({event:n}),!0)}}];var BB={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},VB=class extends PB{constructor(e){super(e,BB)}static setup(){return window.addEventListener(BB.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(BB.move.name,e)};function e(){}}};VB.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var HB;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(HB||={});var UB;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(UB||={});function WB(e){let{acceleration:t,activator:n=HB.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:s=UB.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:u,delta:d,threshold:f}=e,p=KB({delta:d,disabled:!a}),[m,h]=tz(),g=(0,L.useRef)({x:0,y:0}),_=(0,L.useRef)({x:0,y:0}),v=(0,L.useMemo)(()=>{switch(n){case HB.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case HB.DraggableRect:return i}},[n,i,c]),y=(0,L.useRef)(null),b=(0,L.useCallback)(()=>{let e=y.current;if(!e)return;let t=g.current.x*_.current.x,n=g.current.y*_.current.y;e.scrollBy(t,n)},[]),x=(0,L.useMemo)(()=>s===UB.TreeOrder?[...l].reverse():l,[s,l]);(0,L.useEffect)(()=>{if(!a||!l.length||!v){h();return}for(let e of x){if(r?.(e)===!1)continue;let n=u[l.indexOf(e)];if(!n)continue;let{direction:i,speed:a}=mB(e,n,v,t,f);for(let e of[`x`,`y`])p[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0){h(),y.current=e,m(b,o),g.current=a,_.current=i;return}}g.current={x:0,y:0},_.current={x:0,y:0},h()},[t,b,r,h,a,o,JSON.stringify(v),JSON.stringify(p),m,l,x,u,JSON.stringify(f)])}var GB={x:{[uB.Backward]:!1,[uB.Forward]:!1},y:{[uB.Backward]:!1,[uB.Forward]:!1}};function KB(e){let{delta:t,disabled:n}=e,r=az(t);return rz(e=>{if(n||!r||!e)return GB;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[uB.Backward]:e.x[uB.Backward]||i.x===-1,[uB.Forward]:e.x[uB.Forward]||i.x===1},y:{[uB.Backward]:e.y[uB.Backward]||i.y===-1,[uB.Forward]:e.y[uB.Forward]||i.y===1}}},[n,t,r])}function qB(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return rz(e=>t==null?null:r??e??null,[r,t])}function JB(e,t){return(0,L.useMemo)(()=>e.reduce((e,n)=>{let{sensor:r}=n,i=r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}));return[...e,...i]},[]),[e,t])}var YB;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(YB||={});var XB;(function(e){e.Optimized=`optimized`})(XB||={});var ZB=new Map;function QB(e,t){let{dragging:n,dependencies:r,config:i}=t,[a,o]=(0,L.useState)(null),{frequency:s,measure:c,strategy:l}=i,u=(0,L.useRef)(e),d=g(),f=nz(d),p=(0,L.useCallback)(function(e){e===void 0&&(e=[]),!f.current&&o(t=>t===null?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),m=(0,L.useRef)(null),h=rz(t=>{if(d&&!n)return ZB;if(!t||t===ZB||u.current!==e||a!=null){let t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new xB(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,d,c]);return(0,L.useEffect)(()=>{u.current=e},[e]),(0,L.useEffect)(()=>{d||p()},[n,d]),(0,L.useEffect)(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),(0,L.useEffect)(()=>{d||typeof s!=`number`||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,d,p,...r]),{droppableRects:h,measureDroppableContainers:p,measuringScheduled:a!=null};function g(){switch(l){case YB.Always:return!1;case YB.BeforeDragging:return n;default:return!n}}}function $B(e,t){return rz(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function eV(e,t){return $B(e,t)}function tV(e){let{callback:t,disabled:n}=e,r=ez(t),i=(0,L.useMemo)(()=>{if(n||typeof window>`u`||window.MutationObserver===void 0)return;let{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,L.useEffect)(()=>()=>i?.disconnect(),[i]),i}function nV(e){let{callback:t,disabled:n}=e,r=ez(t),i=(0,L.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,L.useEffect)(()=>()=>i?.disconnect(),[i]),i}function rV(e){return new xB($z(e),e)}function iV(e,t,n){t===void 0&&(t=rV);let[r,i]=(0,L.useState)(null);function a(){i(r=>{if(!e)return null;if(e.isConnected===!1)return r??n??null;let i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}let o=tV({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if(t===`childList`&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=nV({callback:a});return $R(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),r}function aV(e){return qz(e,$B(e))}var oV=[];function sV(e){let t=(0,L.useRef)(e),n=rz(n=>e?n&&n!==oV&&e&&t.current&&e.parentNode===t.current.parentNode?n:iB(e):oV,[e]);return(0,L.useEffect)(()=>{t.current=e},[e]),n}function cV(e){let[t,n]=(0,L.useState)(null),r=(0,L.useRef)(e),i=(0,L.useCallback)(e=>{let t=oB(e.target);t&&n(e=>e?(e.set(t,lB(t)),new Map(e)):null)},[]);return(0,L.useEffect)(()=>{let t=r.current;if(e!==t){a(t);let o=e.map(e=>{let t=oB(e);return t?(t.addEventListener(`scroll`,i,{passive:!0}),[t,lB(t)]):null}).filter(e=>e!=null);n(o.length?new Map(o):null),r.current=e}return()=>{a(e),a(t)};function a(e){e.forEach(e=>{oB(e)?.removeEventListener(`scroll`,i)})}},[i,e]),(0,L.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>lz(e,t),Mz):gB(e):Mz,[e,t])}function lV(e,t){t===void 0&&(t=[]);let n=(0,L.useRef)(null);return(0,L.useEffect)(()=>{n.current=null},t),(0,L.useEffect)(()=>{let t=e!==Mz;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?uz(e,n.current):Mz}function uV(e){(0,L.useEffect)(()=>{if(!GR)return;let t=e.map(e=>{let{sensor:t}=e;return t.setup==null?void 0:t.setup()});return()=>{for(let e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))}function dV(e,t){return(0,L.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}function fV(e){return(0,L.useMemo)(()=>e?tB(e):null,[e])}var pV=[];function mV(e,t){t===void 0&&(t=$z);let[n]=e,r=fV(n?JR(n):null),[i,a]=(0,L.useState)(pV);function o(){a(()=>e.length?e.map(e=>dB(e)?r:new xB(t(e),e)):pV)}let s=nV({callback:o});return $R(()=>{s?.disconnect(),o(),e.forEach(e=>s?.observe(e))},[e]),i}function hV(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return XR(t)?t:e}function gV(e){let{measure:t}=e,[n,r]=(0,L.useState)(null),i=nV({callback:(0,L.useCallback)(e=>{for(let{target:n}of e)if(XR(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[a,o]=iz((0,L.useCallback)(e=>{let n=hV(e);i?.disconnect(),n&&i?.observe(n),r(n?t(n):null)},[t,i]));return(0,L.useMemo)(()=>({nodeRef:a,rect:n,setRef:o}),[n,a,o])}var _V=[{sensor:IB,options:{}},{sensor:jB,options:{}}],vV={current:{}},yV={draggable:{measure:eB},droppable:{measure:eB,strategy:YB.WhileDragging,frequency:XB.Optimized},dragOverlay:{measure:$z}},bV=class extends Map{get(e){return e==null?void 0:super.get(e)??void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){return this.get(e)?.node.current??void 0}},xV={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new bV,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:kz},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:yV,measureDroppableContainers:kz,windowRect:null,measuringScheduled:!1},SV={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:kz,draggableNodes:new Map,over:null,measureDroppableContainers:kz},CV=(0,L.createContext)(SV),wV=(0,L.createContext)(xV);function TV(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new bV}}}function EV(e,t){switch(t.type){case Oz.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Oz.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Oz.DragEnd:case Oz.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Oz.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new bV(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case Oz.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;let o=new bV(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case Oz.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new bV(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function DV(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,L.useContext)(CV),a=az(r),o=az(n?.id);return(0,L.useEffect)(()=>{if(!t&&!r&&a&&o!=null){if(!fz(a)||document.activeElement===a.target)return;let e=i.get(o);if(!e)return;let{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=_z(e);if(t){t.focus();break}}})}},[r,t,i,o,a]),null}function OV(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}function kV(e){return(0,L.useMemo)(()=>({draggable:{...yV.draggable,...e?.draggable},droppable:{...yV.droppable,...e?.droppable},dragOverlay:{...yV.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function AV(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,a=(0,L.useRef)(!1),{x:o,y:s}=typeof i==`boolean`?{x:i,y:i}:i;$R(()=>{if(!o&&!s||!t){a.current=!1;return}if(a.current||!r)return;let e=t?.node.current;if(!e||e.isConnected===!1)return;let i=qz(n(e),r);if(o||(i.x=0),s||(i.y=0),a.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){let t=aB(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,s,r,n])}var jV=(0,L.createContext)({...Mz,scaleX:1,scaleY:1}),MV;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(MV||={});var NV=(0,L.memo)(function(e){let{id:t,accessibility:n,autoScroll:r=!0,children:i,sensors:a=_V,collisionDetection:o=Uz,measuring:s,modifiers:c,...l}=e,[u,d]=(0,L.useReducer)(EV,void 0,TV),[f,p]=wz(),[m,h]=(0,L.useState)(MV.Uninitialized),g=m===MV.Initialized,{draggable:{active:_,nodes:v,translate:y},droppable:{containers:b}}=u,x=_==null?null:v.get(_),S=(0,L.useRef)({initial:null,translated:null}),C=(0,L.useMemo)(()=>_==null?null:{id:_,data:x?.data??vV,rect:S},[_,x]),w=(0,L.useRef)(null),[T,E]=(0,L.useState)(null),[D,O]=(0,L.useState)(null),k=nz(l,Object.values(l)),ee=sz(`DndDescribedBy`,t),A=(0,L.useMemo)(()=>b.getEnabled(),[b]),j=kV(s),{droppableRects:te,measureDroppableContainers:M,measuringScheduled:ne}=QB(A,{dragging:g,dependencies:[y.x,y.y],config:j.droppable}),N=qB(v,_),P=(0,L.useMemo)(()=>D?mz(D):null,[D]),re=Me(),ie=eV(N,j.draggable.measure);AV({activeNode:_==null?null:v.get(_),config:re.layoutShiftCompensation,initialRect:ie,measure:j.draggable.measure});let ae=iV(N,j.draggable.measure,ie),oe=iV(N?N.parentElement:null),se=(0,L.useRef)({activatorEvent:null,active:null,activeNode:N,collisionRect:null,collisions:null,droppableRects:te,draggableNodes:v,draggingNode:null,draggingNodeRect:null,droppableContainers:b,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ce=b.getNodeFor(se.current.over?.id),le=gV({measure:j.dragOverlay.measure}),ue=le.nodeRef.current??N,de=g?le.rect??ae:null,F=!!(le.nodeRef.current&&le.rect),fe=aV(F?null:ae),pe=fV(ue?JR(ue):null),me=sV(g?ce??N:null),he=mV(me),ge=OV(c,{transform:{x:y.x-fe.x,y:y.y-fe.y,scaleX:1,scaleY:1},activatorEvent:D,active:C,activeNodeRect:ae,containerNodeRect:oe,draggingNodeRect:de,over:se.current.over,overlayNodeRect:le.rect,scrollableAncestors:me,scrollableAncestorRects:he,windowRect:pe}),_e=P?lz(P,y):null,I=cV(me),ve=lV(I),ye=lV(I,[ae]),be=lz(ge,ve),xe=de?Yz(de,ge):null,Se=C&&xe?o({active:C,collisionRect:xe,droppableRects:te,droppableContainers:A,pointerCoordinates:_e}):null,Ce=Rz(Se,`id`),[we,Te]=(0,L.useState)(null),Ee=Kz(F?ge:lz(ge,ye),we?.rect??null,ae),De=(0,L.useRef)(null),Oe=(0,L.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(w.current==null)return;let i=v.get(w.current);if(!i)return;let a=e.nativeEvent;De.current=new n({active:w.current,activeNode:i,event:a,options:r,context:se,onAbort(e){if(!v.get(e))return;let{onDragAbort:t}=k.current,n={id:e};t?.(n),f({type:`onDragAbort`,event:n})},onPending(e,t,n,r){if(!v.get(e))return;let{onDragPending:i}=k.current,a={id:e,constraint:t,initialCoordinates:n,offset:r};i?.(a),f({type:`onDragPending`,event:a})},onStart(e){let t=w.current;if(t==null)return;let n=v.get(t);if(!n)return;let{onDragStart:r}=k.current,i={activatorEvent:a,active:{id:t,data:n.data,rect:S}};(0,qs.unstable_batchedUpdates)(()=>{r?.(i),h(MV.Initializing),d({type:Oz.DragStart,initialCoordinates:e,active:t}),f({type:`onDragStart`,event:i}),E(De.current),O(a)})},onMove(e){d({type:Oz.DragMove,coordinates:e})},onEnd:o(Oz.DragEnd),onCancel:o(Oz.DragCancel)});function o(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=se.current,o=null;if(t&&i){let{cancelDrop:s}=k.current;o={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===Oz.DragEnd&&typeof s==`function`&&await Promise.resolve(s(o))&&(e=Oz.DragCancel)}w.current=null,(0,qs.unstable_batchedUpdates)(()=>{d({type:e}),h(MV.Uninitialized),Te(null),E(null),O(null),De.current=null;let t=e===Oz.DragEnd?`onDragEnd`:`onDragCancel`;if(o){let e=k.current[t];e?.(o),f({type:t,event:o})}})}}},[v]),ke=JB(a,(0,L.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,a=v.get(r);if(w.current!==null||!a||i.dndKit||i.defaultPrevented)return;let o={active:a};e(n,t.options,o)===!0&&(i.dndKit={capturedBy:t.sensor},w.current=r,Oe(n,t))},[v,Oe]));uV(a),$R(()=>{ae&&m===MV.Initializing&&h(MV.Initialized)},[ae,m]),(0,L.useEffect)(()=>{let{onDragMove:e}=k.current,{active:t,activatorEvent:n,collisions:r,over:i}=se.current;if(!t||!n)return;let a={active:t,activatorEvent:n,collisions:r,delta:{x:be.x,y:be.y},over:i};(0,qs.unstable_batchedUpdates)(()=>{e?.(a),f({type:`onDragMove`,event:a})})},[be.x,be.y]),(0,L.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=se.current;if(!e||w.current==null||!t||!i)return;let{onDragOver:a}=k.current,o=r.get(Ce),s=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,qs.unstable_batchedUpdates)(()=>{Te(s),a?.(c),f({type:`onDragOver`,event:c})})},[Ce]),$R(()=>{se.current={activatorEvent:D,active:C,activeNode:N,collisionRect:xe,collisions:Se,droppableRects:te,draggableNodes:v,draggingNode:ue,draggingNodeRect:de,droppableContainers:b,over:we,scrollableAncestors:me,scrollAdjustedTranslate:be},S.current={initial:de,translated:xe}},[C,N,Se,xe,v,ue,de,te,b,we,me,be]),WB({...re,delta:y,draggingRect:xe,pointerCoordinates:_e,scrollableAncestors:me,scrollableAncestorRects:he});let Ae=(0,L.useMemo)(()=>({active:C,activeNode:N,activeNodeRect:ae,activatorEvent:D,collisions:Se,containerNodeRect:oe,dragOverlay:le,draggableNodes:v,droppableContainers:b,droppableRects:te,over:we,measureDroppableContainers:M,scrollableAncestors:me,scrollableAncestorRects:he,measuringConfiguration:j,measuringScheduled:ne,windowRect:pe}),[C,N,ae,D,Se,oe,le,v,b,te,we,M,me,he,j,ne,pe]),je=(0,L.useMemo)(()=>({activatorEvent:D,activators:ke,active:C,activeNodeRect:ae,ariaDescribedById:{draggable:ee},dispatch:d,draggableNodes:v,over:we,measureDroppableContainers:M}),[D,ke,C,ae,d,ee,v,we,M]);return L.createElement(Sz.Provider,{value:p},L.createElement(CV.Provider,{value:je},L.createElement(wV.Provider,{value:Ae},L.createElement(jV.Provider,{value:Ee},i)),L.createElement(DV,{disabled:n?.restoreFocus===!1})),L.createElement(Dz,{...n,hiddenTextDescribedById:ee}));function Me(){let e=T?.autoScrollEnabled===!1,t=typeof r==`object`?r.enabled===!1:r===!1,n=g&&!e&&!t;return typeof r==`object`?{...r,enabled:n}:{enabled:n}}}),PV=(0,L.createContext)(null),FV=`button`,IV=`Draggable`;function LV(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=sz(IV),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,L.useContext)(CV),{role:p=FV,roleDescription:m=`draggable`,tabIndex:h=0}=i??{},g=c?.id===t,_=(0,L.useContext)(g?jV:PV),[v,y]=iz(),[b,x]=iz(),S=dV(o,t),C=nz(n);return $R(()=>(d.set(t,{id:t,key:a,node:v,activatorNode:b,data:C}),()=>{let e=d.get(t);e&&e.key===a&&d.delete(t)}),[d,t]),{active:c,activatorEvent:s,activeNodeRect:l,attributes:(0,L.useMemo)(()=>({role:p,tabIndex:h,"aria-disabled":r,"aria-pressed":g&&p===FV?!0:void 0,"aria-roledescription":m,"aria-describedby":u.draggable}),[r,p,h,g,m,u.draggable]),isDragging:g,listeners:r?void 0:S,node:v,over:f,setNodeRef:y,setActivatorNodeRef:x,transform:_}}function RV(){return(0,L.useContext)(wV)}var zV=`Droppable`,BV={timeout:25};function VV(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=sz(zV),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,L.useContext)(CV),u=(0,L.useRef)({disabled:n}),d=(0,L.useRef)(!1),f=(0,L.useRef)(null),p=(0,L.useRef)(null),{disabled:m,updateMeasurementsFor:h,timeout:g}={...BV,...i},_=nz(h??r),v=nV({callback:(0,L.useCallback)(()=>{if(!d.current){d.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{l(Array.isArray(_.current)?_.current:[_.current]),p.current=null},g)},[g]),disabled:m||!o}),[y,b]=iz((0,L.useCallback)((e,t)=>{v&&(t&&(v.unobserve(t),d.current=!1),e&&v.observe(e))},[v])),x=nz(t);return(0,L.useEffect)(()=>{!v||!y.current||(v.disconnect(),d.current=!1,v.observe(y.current))},[y,v]),(0,L.useEffect)(()=>(s({type:Oz.RegisterDroppable,element:{id:r,key:a,disabled:n,node:y,rect:f,data:x}}),()=>s({type:Oz.UnregisterDroppable,key:a,id:r})),[r]),(0,L.useEffect)(()=>{n!==u.current.disabled&&(s({type:Oz.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:o,rect:f,isOver:c?.id===r,node:y,over:c,setNodeRef:b}}function HV(e){let{animation:t,children:n}=e,[r,i]=(0,L.useState)(null),[a,o]=(0,L.useState)(null),s=az(n);return!n&&!r&&s&&i(s),$R(()=>{if(!a)return;let e=r?.key,n=r?.props.id;if(e==null||n==null){i(null);return}Promise.resolve(t(n,a)).then(()=>{i(null)})},[t,r,a]),L.createElement(L.Fragment,null,n,r?(0,L.cloneElement)(r,{ref:o}):null)}var UV={x:0,y:0,scaleX:1,scaleY:1};function WV(e){let{children:t}=e;return L.createElement(CV.Provider,{value:SV},L.createElement(jV.Provider,{value:UV},t))}var GV={position:`fixed`,touchAction:`none`},KV=e=>fz(e)?`transform 250ms ease`:void 0,qV=(0,L.forwardRef)((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:a,className:o,rect:s,style:c,transform:l,transition:u=KV}=e;if(!s)return null;let d=i?l:{...l,scaleX:1,scaleY:1},f={...GV,width:s.width,height:s.height,top:s.top,left:s.left,transform:hz.Transform.toString(d),transformOrigin:i&&r?Pz(r,s):void 0,transition:typeof u==`function`?u(r):u,...c};return L.createElement(n,{className:o,style:f,ref:t},a)}),JV={duration:250,easing:`ease`,keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:hz.Transform.toString(t)},{transform:hz.Transform.toString(n)}]},sideEffects:(e=>t=>{let{active:n,dragOverlay:r}=t,i={},{styles:a,className:o}=e;if(a!=null&&a.active)for(let[e,t]of Object.entries(a.active))t!==void 0&&(i[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(a!=null&&a.dragOverlay)for(let[e,t]of Object.entries(a.dragOverlay))t!==void 0&&r.node.style.setProperty(e,t);return o!=null&&o.active&&n.node.classList.add(o.active),o!=null&&o.dragOverlay&&r.node.classList.add(o.dragOverlay),function(){for(let[e,t]of Object.entries(i))n.node.style.setProperty(e,t);o!=null&&o.active&&n.node.classList.remove(o.active)}})({styles:{active:{opacity:`0`}}})};function YV(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return ez((e,a)=>{if(t===null)return;let o=n.get(e);if(!o)return;let s=o.node.current;if(!s)return;let c=hV(a);if(!c)return;let{transform:l}=JR(a).getComputedStyle(a),u=Xz(l);if(!u)return;let d=typeof t==`function`?t:XV(t);return yB(s,i.draggable.measure),d({active:{id:e,data:o.data,node:s,rect:i.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:i,transform:u})})}function XV(e){let{duration:t,easing:n,sideEffects:r,keyframes:i}={...JV,...e};return e=>{let{active:a,dragOverlay:o,transform:s,...c}=e;if(!t)return;let l={x:o.rect.left-a.rect.left,y:o.rect.top-a.rect.top},u={scaleX:s.scaleX===1?1:a.rect.width*s.scaleX/o.rect.width,scaleY:s.scaleY===1?1:a.rect.height*s.scaleY/o.rect.height},d={x:s.x-l.x,y:s.y-l.y,...u},f=i({...c,active:a,dragOverlay:o,transform:{initial:s,final:d}}),[p]=f,m=f[f.length-1];if(JSON.stringify(p)===JSON.stringify(m))return;let h=r?.({active:a,dragOverlay:o,...c}),g=o.node.animate(f,{duration:t,easing:n,fill:`forwards`});return new Promise(e=>{g.onfinish=()=>{h?.(),e()}})}}var ZV=0;function QV(e){return(0,L.useMemo)(()=>{if(e!=null)return ZV++,ZV},[e])}var $V=L.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:a,modifiers:o,wrapperElement:s=`div`,className:c,zIndex:l=999}=e,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggableNodes:m,droppableContainers:h,dragOverlay:g,over:_,measuringConfiguration:v,scrollableAncestors:y,scrollableAncestorRects:b,windowRect:x}=RV(),S=(0,L.useContext)(jV),C=QV(d?.id),w=OV(o,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggingNodeRect:g.rect,over:_,overlayNodeRect:g.rect,scrollableAncestors:y,scrollableAncestorRects:b,transform:S,windowRect:x}),T=$B(f),E=YV({config:r,draggableNodes:m,droppableContainers:h,measuringConfiguration:v}),D=T?g.setRef:void 0;return L.createElement(WV,null,L.createElement(HV,{animation:E},d&&C?L.createElement(qV,{key:C,id:d.id,ref:D,as:s,activatorEvent:u,adjustScale:t,className:c,transition:a,rect:T,style:{zIndex:l,...i},transform:w},n):null))});function eH(e,t,n){let r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function tH(e,t){return e.reduce((e,n,r)=>{let i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function nH(e){return e!==null&&e>=0}function rH(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function iH(e){return typeof e==`boolean`?{draggable:e,droppable:e}:e}var aH={scaleX:1,scaleY:1},oH=e=>{let{rects:t,activeNodeRect:n,activeIndex:r,overIndex:i,index:a}=e,o=t[r]??n;if(!o)return null;let s=sH(t,a,r);if(a===r){let e=t[i];return e?{x:r<i?e.left+e.width-(o.left+o.width):e.left-o.left,y:0,...aH}:null}return a>r&&a<=i?{x:-o.width-s,y:0,...aH}:a<r&&a>=i?{x:o.width+s,y:0,...aH}:{x:0,y:0,...aH}};function sH(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return!r||!i&&!a?0:n<t?i?r.left-(i.left+i.width):a.left-(r.left+r.width):a?a.left-(r.left+r.width):r.left-(i.left+i.width)}var cH=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e,a=eH(t,r,n),o=t[i],s=a[i];return!s||!o?null:{x:s.left-o.left,y:s.top-o.top,scaleX:s.width/o.width,scaleY:s.height/o.height}},lH={scaleX:1,scaleY:1},uH=e=>{let{activeIndex:t,activeNodeRect:n,index:r,rects:i,overIndex:a}=e,o=i[t]??n;if(!o)return null;if(r===t){let e=i[a];return e?{x:0,y:t<a?e.top+e.height-(o.top+o.height):e.top-o.top,...lH}:null}let s=dH(i,r,t);return r>t&&r<=a?{x:0,y:-o.height-s,...lH}:r<t&&r>=a?{x:0,y:o.height+s,...lH}:{x:0,y:0,...lH}};function dH(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return r?n<t?i?r.top-(i.top+i.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}var fH=`Sortable`,pH=L.createContext({activeIndex:-1,containerId:fH,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:cH,disabled:{draggable:!1,droppable:!1}});function mH(e){let{children:t,id:n,items:r,strategy:i=cH,disabled:a=!1}=e,{active:o,dragOverlay:s,droppableRects:c,over:l,measureDroppableContainers:u}=RV(),d=sz(fH,n),f=s.rect!==null,p=(0,L.useMemo)(()=>r.map(e=>typeof e==`object`&&`id`in e?e.id:e),[r]),m=o!=null,h=o?p.indexOf(o.id):-1,g=l?p.indexOf(l.id):-1,_=(0,L.useRef)(p),v=!rH(p,_.current),y=g!==-1&&h===-1||v,b=iH(a);$R(()=>{v&&m&&u(p)},[v,p,m,u]),(0,L.useEffect)(()=>{_.current=p},[p]);let x=(0,L.useMemo)(()=>({activeIndex:h,containerId:d,disabled:b,disableTransforms:y,items:p,overIndex:g,useDragOverlay:f,sortedRects:tH(p,c),strategy:i}),[h,d,b.draggable,b.droppable,y,p,g,c,f,i]);return L.createElement(pH.Provider,{value:x},t)}var hH=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return eH(n,r,i).indexOf(t)},gH=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:o,previousItems:s,previousContainerId:c,transition:l}=e;return!l||!r||s!==a&&i===o?!1:n?!0:o!==i&&t===c},_H={duration:200,easing:`ease`},vH=`transform`,yH=hz.Transition.toString({property:vH,duration:0,easing:`linear`}),bH={roleDescription:`sortable`};function xH(e){let{disabled:t,index:n,node:r,rect:i}=e,[a,o]=(0,L.useState)(null),s=(0,L.useRef)(n);return $R(()=>{if(!t&&n!==s.current&&r.current){let e=i.current;if(e){let t=$z(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&o(n)}}n!==s.current&&(s.current=n)},[t,n,r,i]),(0,L.useEffect)(()=>{a&&o(null)},[a]),a}function SH(e){let{animateLayoutChanges:t=gH,attributes:n,disabled:r,data:i,getNewIndex:a=hH,id:o,strategy:s,resizeObserverConfig:c,transition:l=_H}=e,{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:m,sortedRects:h,overIndex:g,useDragOverlay:_,strategy:v}=(0,L.useContext)(pH),y=CH(r,p),b=u.indexOf(o),x=(0,L.useMemo)(()=>({sortable:{containerId:d,index:b,items:u},...i}),[d,i,b,u]),S=(0,L.useMemo)(()=>u.slice(u.indexOf(o)),[u,o]),{rect:C,node:w,isOver:T,setNodeRef:E}=VV({id:o,data:x,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:S,...c}}),{active:D,activatorEvent:O,activeNodeRect:k,attributes:ee,setNodeRef:A,listeners:j,isDragging:te,over:M,setActivatorNodeRef:ne,transform:N}=LV({id:o,data:x,attributes:{...bH,...n},disabled:y.draggable}),P=WR(E,A),re=!!D,ie=re&&!m&&nH(f)&&nH(g),ae=!_&&te,oe=ie?(ae&&ie?N:null)??(s??v)({rects:h,activeNodeRect:k,activeIndex:f,overIndex:g,index:b}):null,se=nH(f)&&nH(g)?a({id:o,items:u,activeIndex:f,overIndex:g}):b,ce=D?.id,le=(0,L.useRef)({activeId:ce,items:u,newIndex:se,containerId:d}),ue=u!==le.current.items,de=t({active:D,containerId:d,isDragging:te,isSorting:re,id:o,index:b,items:u,newIndex:le.current.newIndex,previousItems:le.current.items,previousContainerId:le.current.containerId,transition:l,wasDragging:le.current.activeId!=null}),F=xH({disabled:!de,index:b,node:w,rect:C});return(0,L.useEffect)(()=>{re&&le.current.newIndex!==se&&(le.current.newIndex=se),d!==le.current.containerId&&(le.current.containerId=d),u!==le.current.items&&(le.current.items=u)},[re,se,d,u]),(0,L.useEffect)(()=>{if(ce===le.current.activeId)return;if(ce!=null&&le.current.activeId==null){le.current.activeId=ce;return}let e=setTimeout(()=>{le.current.activeId=ce},50);return()=>clearTimeout(e)},[ce]),{active:D,activeIndex:f,attributes:ee,data:x,rect:C,index:b,newIndex:se,items:u,isOver:T,isSorting:re,isDragging:te,listeners:j,node:w,overIndex:g,over:M,setNodeRef:P,setActivatorNodeRef:ne,setDroppableNodeRef:E,setDraggableNodeRef:A,transform:F??oe,transition:fe()};function fe(){if(F||ue&&le.current.newIndex===b)return yH;if(!(ae&&!fz(O)||!l)&&(re||de))return hz.Transition.toString({...l,property:vH})}}function CH(e,t){return typeof e==`boolean`?{draggable:e,droppable:!1}:{draggable:e?.draggable??t.draggable,droppable:e?.droppable??t.droppable}}function wH(e){if(!e)return!1;let t=e.data.current;return!!(t&&`sortable`in t&&typeof t.sortable==`object`&&`containerId`in t.sortable&&`items`in t.sortable&&`index`in t.sortable)}var TH=[OB.Down,OB.Right,OB.Up,OB.Left],EH=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:a,over:o,scrollableAncestors:s}}=t;if(TH.includes(e.code)){if(e.preventDefault(),!n||!r)return;let t=[];a.getEnabled().forEach(n=>{if(!n||n!=null&&n.disabled)return;let a=i.get(n.id);if(a)switch(e.code){case OB.Down:r.top<a.top&&t.push(n);break;case OB.Up:r.top>a.top&&t.push(n);break;case OB.Left:r.left>a.left&&t.push(n);break;case OB.Right:r.left<a.left&&t.push(n);break}});let c=Vz({active:n,collisionRect:r,droppableRects:i,droppableContainers:t,pointerCoordinates:null}),l=Rz(c,`id`);if(l===o?.id&&c.length>1&&(l=c[1].id),l!=null){let e=a.get(n.id),t=a.get(l),o=t?i.get(t.id):null,c=t?.node.current;if(c&&o&&e&&t){let n=iB(c).some((e,t)=>s[t]!==e),i=DH(e,t),a=OH(e,t),l=n||!i?{x:0,y:0}:{x:a?r.width-o.width:0,y:a?r.height-o.height:0},u={x:o.left,y:o.top};return l.x&&l.y?u:uz(u,l)}}}};function DH(e,t){return!wH(e)||!wH(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function OH(e,t){return!wH(e)||!wH(t)||!DH(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}var kH=(0,L.createContext)(null),AH={didCatch:!1,error:null},jH=class extends L.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=AH}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(...e){let{error:t}=this.state;t!==null&&(this.props.onReset?.({args:e,reason:`imperative-api`}),this.setState(AH))}componentDidCatch(e,t){this.props.onError?.(e,t)}componentDidUpdate(e,t){let{didCatch:n}=this.state,{resetKeys:r}=this.props;n&&t.error!==null&&MH(e.resetKeys,r)&&(this.props.onReset?.({next:r,prev:e.resetKeys,reason:`keys`}),this.setState(AH))}render(){let{children:e,fallbackRender:t,FallbackComponent:n,fallback:r}=this.props,{didCatch:i,error:a}=this.state,o=e;if(i){let e={error:a,resetErrorBoundary:this.resetErrorBoundary};if(typeof t==`function`)o=t(e);else if(n)o=(0,L.createElement)(n,e);else if(r!==void 0)o=r;else throw a}return(0,L.createElement)(kH.Provider,{value:{didCatch:i,error:a,resetErrorBoundary:this.resetErrorBoundary}},o)}};function MH(e=[],t=[]){return e.length!==t.length||e.some((e,n)=>!Object.is(e,t[n]))}function NH(){return(0,R.jsxs)(`div`,{style:{textAlign:`center`,marginTop:`4em`},children:[(0,R.jsx)(Nl,{}),(0,R.jsx)(`p`,{children:`Loading`})]})}function PH({error:e}){return e===void 0?(0,R.jsx)(R.Fragment,{}):xC.isApiException(e)?(0,R.jsx)(im,{children:(0,R.jsxs)(cm,{children:[(0,R.jsx)(`h3`,{children:`FMS Insight Server Error`}),(0,R.jsx)(`p`,{children:e.response})]})}):e instanceof Error?(0,R.jsx)(im,{children:(0,R.jsx)(cm,{children:e.message})}):(0,R.jsx)(im,{children:(0,R.jsxs)(cm,{children:[(0,R.jsx)(`h3`,{children:`Unknown Error`}),(0,R.jsx)(`p`,{children:String(e)})]})})}function FH(e){return(0,R.jsx)(jH,{FallbackComponent:PH,children:(0,R.jsx)(L.Suspense,{fallback:e.fallback??(0,R.jsx)(NH,{}),children:e.children})})}var IH=class extends L.PureComponent{render(){let e=this.props.size||50,t=dre(this.props.part,e);return(0,R.jsx)(`div`,{style:{width:e,height:e},dangerouslySetInnerHTML:{__html:t}})}},LH=2,RH=Gt`
|
|
250
|
+
from, to { transform: translate(0, 0) }
|
|
251
|
+
10% { transform: translate(${LH}px, 0) }
|
|
252
|
+
20% { transform: translate(0, 0) }
|
|
253
|
+
30% { transform: translate(${LH}px, 0) }
|
|
254
|
+
40% { transform: translate(0, 0) }
|
|
255
|
+
50% { transform: translate(${LH}px, 0) }
|
|
256
|
+
60% { transform: translate(0, 0) }
|
|
257
|
+
`,zH=`${RH} 1s ease-in-out infinite`;function BH(e){let t=e.currentTarget.getAnimations().find(e=>e.animationName===RH.name);if(t&&typeof t.startTime==`number`)t.startTime-=t.startTime%1e3;else if(t&&typeof t.startTime==`object`&&t.startTime instanceof CSSNumericValue){let e=t.startTime.to(`ms`).value;t.startTime=CSS.ms(e-e%1e3)}}var VH=H(`div`,{shouldForwardProp:e=>e!==`fsize`})(({fsize:e,theme:t})=>{if(!e)return{fontSize:`1.25rem`};switch(e){case`normal`:return{fontSize:`1rem`,[t.breakpoints.up(`md`)]:{fontSize:`1.25rem`},[t.breakpoints.up(`lg`)]:{fontSize:`1.5rem`}};case`large`:return{fontSize:`1.5rem`,[t.breakpoints.up(`lg`)]:{fontSize:`1.75rem`},[t.breakpoints.up(`xl`)]:{fontSize:`2rem`}};case`x-large`:return{fontSize:`1.5rem`,[t.breakpoints.up(`md`)]:{fontSize:`1.75rem`},[t.breakpoints.up(`lg`)]:{fontSize:`2.75rem`},[t.breakpoints.up(`xl`)]:{fontSize:`3.75rem`}}}}),HH=H(`div`,{shouldForwardProp:e=>e!==`fsize`})(({fsize:e,theme:t})=>{if(!e)return{fontSize:`0.75rem`};switch(e){case`normal`:return{fontSize:`0.75rem`,[t.breakpoints.up(`md`)]:{fontSize:`1rem`}};case`large`:return{fontSize:`1rem`,[t.breakpoints.up(`lg`)]:{fontSize:`1.5rem`},[t.breakpoints.up(`xl`)]:{fontSize:`1.75rem`}};case`x-large`:return{fontSize:`1rem`,[t.breakpoints.up(`md`)]:{fontSize:`1.5rem`},[t.breakpoints.up(`lg`)]:{fontSize:`2.5rem`},[t.breakpoints.up(`xl`)]:{fontSize:`3.5rem`}}}});function UH({mat:e,displayActionForSinglePallet:t,fsize:n}){let r=Q(GO);switch(e.action.type){case qS.Loading:switch(e.location.type){case GS.OnPallet:if(t===void 0||t===e.location.palletNum){if(e.action.loadOntoFace===void 0||e.action.loadOntoFace===e.location.face)return e.action.processAfterLoad&&e.action.processAfterLoad!==e.process?(0,R.jsxs)(HH,{fsize:n,children:[`Reclamp material to process # `,e.action.processAfterLoad]}):null;{let t=e.action.loadOntoFace??0;return(0,R.jsxs)(HH,{fsize:n,children:[`Transfer to `,(e.location.palletNum?r.pallets[e.location.palletNum]?.faceNames?.[t-1]:null)??`face ${t}`]})}}else return null;default:{let i=e.action.loadOntoFace??0,a=e.action.loadOntoPalletNum?r.pallets[e.action.loadOntoPalletNum]?.faceNames?.[i-1]:null;return t===void 0?(0,R.jsxs)(HH,{fsize:n,children:[`Load to `,a??`face ${i}`,` of pal `,e.action.loadOntoPalletNum??``]}):t===e.action.loadOntoPalletNum?(0,R.jsxs)(HH,{fsize:n,children:[`Load to `,a??`face ${i}`]}):null}}case qS.UnloadToInProcess:case qS.UnloadToCompletedMaterial:return e.action.unloadIntoQueue?(0,R.jsxs)(HH,{fsize:n,children:[`Unload into queue `,e.action.unloadIntoQueue]}):(0,R.jsx)(HH,{fsize:n,children:`Unload from pallet`});case qS.Waiting:if(e.location.type===GS.InQueue&&e.jobUnique&&e.jobUnique!==``)return(0,R.jsxs)(HH,{fsize:n,children:[`Waiting; next process is #`,e.process+1]});if(e.location.type===GS.OnPallet&&(e.lastCompletedMachiningRouteStopIndex===null||e.lastCompletedMachiningRouteStopIndex===void 0))return(0,R.jsx)(HH,{fsize:n,children:`Waiting for machining`});break;case qS.Machining:return(0,R.jsxs)(HH,{fsize:n,children:[`Machining program `,e.action.program??``]})}return null}function WH({mat:e}){let t=null;return e.signaledInspections.length>0&&(t=`Inspect: `+e.signaledInspections.join(`, `)),e.quarantineAfterUnload&&(t===null?t=`Material will quarantine after unload`:t+=`; Material will quarantine after unload`),t===null?null:(0,R.jsx)(q,{title:t,children:(0,R.jsx)(oS,{})})}function GH({fsize:e,mat:t}){let n=Q(GO).jobs[t.jobUnique],r=t.path;if(t.action.type===qS.Loading&&t.action.pathAfterLoad&&(r=t.action.pathAfterLoad),!n)return null;let i=n.procsAndPaths?.[0]?.paths?.[r-1];return i&&i.casting&&i.casting!==``?(0,R.jsx)(HH,{fsize:e,children:i.casting}):null}function KH({fsize:e,uniq:t}){let n=Q(GO).jobs[t],r=Q(sR);if(n&&n.bookings&&n.bookings.length>0){let t=r.get(n.bookings[0]);if(t&&t.notes&&t.notes!==``)return(0,R.jsx)(HH,{fsize:e,style:{textOverflow:`ellipsis`,overflow:`hidden`,whiteSpace:`nowrap`,maxWidth:`10em`},children:t.notes})}return null}function qH(){let e=Q(GO),t=Q(HI);if(!t)return null;let n=e.workorders?.find(e=>e.workorderId===t)?.comments??[];return(0,R.jsxs)(`div`,{style:{marginTop:`1em`,marginLeft:`1em`},children:[(0,R.jsxs)(`p`,{children:[`Workorder: `,t]}),(0,R.jsx)(`ul`,{children:n.map((e,t)=>(0,R.jsx)(`li`,{children:e.comment},t))})]})}var JH=(0,L.forwardRef)(function(e,t){let n=WE(II),r=e.mat.completedInspections||{},i;return e.focusInspectionType&&r[e.focusInspectionType]?i=(0,R.jsxs)(HH,{fsize:e.fsize,children:[(0,R.jsx)(`span`,{children:`Inspection completed `}),(0,R.jsx)(UR,{date:r[e.focusInspectionType].time})]}):e.focusInspectionType&&e.mat.last_unload_time?i=(0,R.jsxs)(HH,{fsize:e.fsize,children:[(0,R.jsx)(`span`,{children:`Unloaded `}),(0,R.jsx)(UR,{date:e.mat.last_unload_time})]}):e.mat.closeout_completed&&(i=(0,R.jsxs)(HH,{fsize:e.fsize,children:[(0,R.jsxs)(`span`,{children:[e.mat.closeout_failed?`Failed `:``,`Closed Out `]}),(0,R.jsx)(UR,{date:e.mat.closeout_completed})]})),(0,R.jsxs)(Pc,{ref:t,elevation:4,sx:{display:`flex`,minWidth:`10em`,padding:`8px`,margin:e.isDragOverlay?void 0:`8px`,opacity:e.isActiveDrag?.2:1,animation:e.shake?zH:void 0,"&:hover":{animationPlayState:`paused`}},onAnimationIteration:BH,...e.dragRootProps,children:[e.showDragHandle?(0,R.jsx)(`div`,{ref:e.setDragHandleRef,role:`button`,tabIndex:0,style:{display:`flex`,flexDirection:`column`,justifyContent:`center`,cursor:e.isDragOverlay?`grabbing`:`grab`,touchAction:`none`},...e.dragHandleProps,children:(0,R.jsx)(yx,{fontSize:`large`,color:`action`})}):void 0,(0,R.jsx)(ul,{focusRipple:!0,sx:{width:`100%`},onClick:()=>n(e.inProcMat?{type:`InProcMat`,inproc:e.inProcMat}:{type:`MatSummary`,summary:e.mat}),children:(0,R.jsxs)(G,{display:`flex`,textAlign:`left`,alignItems:`center`,width:`100%`,children:[(0,R.jsx)(IH,{part:e.mat.partName}),(0,R.jsxs)(G,{marginLeft:`8px`,flexGrow:1,children:[(0,R.jsx)(VH,{fsize:e.fsize,children:e.mat.partName}),e.displayJob?(0,R.jsx)(HH,{fsize:e.fsize,children:e.mat.jobUnique&&e.mat.jobUnique!==``?`Assigned to `+e.mat.jobUnique:`Unassigned material`}):void 0,!e.hideEmptySerial||e.mat.serial?(0,R.jsxs)(HH,{fsize:e.fsize,children:[`Serial: `,e.mat.serial?e.mat.serial:`none`]}):void 0,e.mat.workorderId===void 0||e.mat.workorderId===``||e.mat.workorderId===e.mat.serial?void 0:(0,R.jsxs)(HH,{fsize:e.fsize,children:[`Workorder: `,e.mat.workorderId]}),e.mat.jobUnique!==void 0&&e.showRawMaterial&&e.inProcMat&&e.inProcMat.process===0?(0,R.jsx)(GH,{fsize:e.fsize,mat:e.inProcMat}):void 0,e.showJobComment&&e.mat.jobUnique&&e.mat.jobUnique!==``?(0,R.jsx)(KH,{fsize:e.fsize,uniq:e.mat.jobUnique}):void 0,e.inProcMat?(0,R.jsx)(UH,{mat:e.inProcMat,displayActionForSinglePallet:e.displayActionForSinglePallet,fsize:e.fsize}):void 0,i]}),(0,R.jsxs)(G,{marginLeft:`4px`,display:`flex`,flexDirection:`column`,justifyContent:`space-between`,alignItems:`flex-end`,alignSelf:`start`,children:[e.mat.serial&&e.mat.serial.length>=1&&!e.hideAvatar?(0,R.jsx)(`div`,{children:(0,R.jsx)(Dp,{style:{width:`30px`,height:`30px`},children:e.mat.serial.slice(-1)})}):void 0,e.hideWarningIcon?void 0:(0,R.jsx)(`div`,{children:(0,R.jsx)(WH,{mat:e.mat})})]})]})})]})}),YH=(0,L.memo)(JH),XH=(0,L.memo)(function(e){return(0,R.jsx)(JH,{mat:ML(e.mat),inProcMat:e.mat,displayActionForSinglePallet:e.displayActionForSinglePallet,fsize:e.fsize,hideAvatar:e.hideAvatar,displayJob:e.displayJob,showDragHandle:e.showHandle,hideEmptySerial:e.hideEmptySerial,showRawMaterial:e.showRawMaterial,showJobComment:e.showJobComment,shake:e.shake})}),ZH=(0,L.memo)(function(e){let t={mat:e.mat},{active:n,isDragging:r,attributes:i,listeners:a,setNodeRef:o,setActivatorNodeRef:s,transform:c,transition:l}=SH({id:e.mat.materialID,data:t}),u={...a};for(let[e,t]of Object.entries(i))e.startsWith(`aria`)&&(u[e]=t);return(0,R.jsx)(JH,{ref:o,dragRootProps:{style:{transform:c?`translate3d(${Math.round(c.x)}px, ${Math.round(c.y)}px, 0)`:void 0,transition:n===null?void 0:l}},showDragHandle:!0,dragHandleProps:u,setDragHandleRef:s,isActiveDrag:r,mat:ML(e.mat),inProcMat:e.mat,displayActionForSinglePallet:e.displayActionForSinglePallet,hideAvatar:e.hideAvatar,displayJob:e.displayJob,hideEmptySerial:e.hideEmptySerial,fsize:e.fsize,shake:n?void 0:e.shake,showRawMaterial:e.showRawMaterial})});function QH(e){return(0,R.jsx)(JH,{mat:ML(e.mat),inProcMat:e.mat,displayActionForSinglePallet:e.displayActionForSinglePallet,showDragHandle:!0,hideAvatar:e.hideAvatar,displayJob:e.displayJob,fsize:e.fsize,hideEmptySerial:e.hideEmptySerial,isDragOverlay:!0})}var $H=(0,L.memo)(function(e){return(0,R.jsx)(Pc,{elevation:4,sx:{display:`flex`,minWidth:`10em`,padding:`8px`,margin:`8px`},children:(0,R.jsx)(Up,{badgeContent:e.material.length<2?0:e.material.length,color:`secondary`,children:(0,R.jsx)(ul,{focusRipple:!0,onClick:()=>e.onOpen(),children:(0,R.jsxs)(G,{display:`flex`,textAlign:`left`,children:[(0,R.jsx)(IH,{part:e.partOrCasting}),(0,R.jsxs)(G,{marginLeft:`8px`,flexGrow:1,children:[(0,R.jsx)(W,{variant:`h6`,children:e.partOrCasting}),(0,R.jsx)(HH,{fsize:e.fsize,children:e.assignedJobUnique&&e.assignedJobUnique!==``?`Assigned to `+e.assignedJobUnique:`Unassigned material`})]}),e.material.length>0&&e.material[0].serial&&e.material[0].serial.length>=1?(0,R.jsx)(`div`,{children:(0,R.jsx)(Dp,{style:{width:`30px`,height:`30px`},children:e.material[0].serial.slice(-1)})}):void 0]})})})})}),eU=(0,L.memo)(function({partName:e,serial:t,subtitle:n,notes:r}){let i;return i=e===``?t??`Material`:t==null||t===``?r?`Add note for `+e:e:r?`Add note for `+t:e+` - `+t,(0,R.jsxs)(G,{display:`flex`,textAlign:`left`,children:[e===``?(0,R.jsx)(Xx,{}):(0,R.jsx)(IH,{part:e}),(0,R.jsxs)(G,{marginLeft:`8px`,flexGrow:1,children:[(0,R.jsx)(W,{variant:`h6`,children:i}),n?(0,R.jsx)(W,{variant:`caption`,children:n}):void 0]})]})});function tU({notes:e}){let t=Q(BO(zI)),n=Q(BO(VI)),r=t.state===`hasData`?t.data:null,i=n.state===`hasData`?n.data:null;return(0,R.jsx)(eU,{notes:e,partName:r?.partName??``,serial:r?.serial??i})}function nU(){let e=Q(JI);function t(t){return e.completedInspections.includes(t)?`black`:`red`}return e.signaledInspections.length===0?(0,R.jsx)(`small`,{children:`Inspections: none`}):(0,R.jsxs)(`small`,{children:[`Inspections:`,` `,e.signaledInspections.map((e,n)=>(0,R.jsxs)(`span`,{children:[n===0?``:`, `,(0,R.jsx)(`span`,{style:{color:t(e)},children:e})]},n))]})}function rU({highlightProcsGreaterOrEqualTo:e}){return(0,R.jsx)(PI,{entries:Q(KI),copyToClipboard:!0,highlightProcsGreaterOrEqualTo:e})}function iU(){let e=Q(BI),t=Q(GO).jobs,n=Q(sR),r=e?t[e.jobUnique]:null;if(r&&r.bookings&&r.bookings.length>0){let e=n.get(r.bookings[0]);if(e&&e.notes&&e.notes!==``)return(0,R.jsx)(W,{variant:`caption`,sx:{width:`100%`,textWrap:`wrap`},children:e.notes})}return null}var aU=(0,L.memo)(function({highlightProcsGreaterOrEqualTo:e}){let t=Q(II),n=Q(zI),r=Q(RI);return t===null?null:n===null?t.type===`AddMatWithEnteredSerial`||t.type===`ManuallyEnteredSerial`?(0,R.jsxs)(`div`,{style:{marginLeft:`1em`},children:[`Material with serial `,t.serial,` not found.`]}):t.type===`Barcode`?r?(0,R.jsxs)(`div`,{style:{marginLeft:`1em`},children:[`Material with barcode `,t.barcode,` does not yet exist in the cell.`]}):(0,R.jsxs)(`div`,{style:{marginLeft:`1em`},children:[`Material with barcode `,t.barcode,` not found.`]}):(0,R.jsx)(`div`,{style:{marginLeft:`1em`},children:`Material not found.`}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(`div`,{style:{marginLeft:`1em`},children:[(0,R.jsx)(`div`,{children:(0,R.jsxs)(`small`,{children:[`Workorder: `,n?.workorderId??`none`]})}),(0,R.jsx)(`div`,{children:(0,R.jsx)(FH,{fallback:(0,R.jsxs)(`small`,{children:[`Inspections: `,(0,R.jsx)(Nl,{size:`10`})]}),children:(0,R.jsx)(nU,{})})}),(0,R.jsx)(`div`,{children:(0,R.jsx)(FH,{fallback:(0,R.jsx)(`div`,{}),children:(0,R.jsx)(iU,{})})})]}),(0,R.jsx)(FH,{fallback:(0,R.jsx)(Nl,{}),children:(0,R.jsx)(rU,{highlightProcsGreaterOrEqualTo:e})})]})});function oU(e){let[t,n]=(0,L.useState)(``),r=Q(UO),[i]=eL(),a=Q(zI);return a===null?null:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(dh,{children:(0,R.jsx)(Bb,{sx:{mt:`5px`},multiline:!0,label:`Note`,autoFocus:!0,variant:`outlined`,value:t,onChange:e=>n(e.target.value)})}),(0,R.jsxs)(uh,{children:[(0,R.jsx)(K,{onClick:()=>{i({matId:a.materialID,process:0,operator:r,notes:t}),e.setNotesOpen(!1),n(``)},disabled:t===``,color:`secondary`,children:`Save`}),(0,R.jsx)(K,{onClick:()=>{e.setNotesOpen(!1),n(``)},color:`secondary`,children:`Cancel`})]})]})}function sU(){let e=Q(II);if(e===null)return null;let t;switch(e.type){case`Barcode`:t=`Loading material with barcode `+e.barcode+`...`;break;case`AddMatWithEnteredSerial`:case`ManuallyEnteredSerial`:t=`Loading material with serial `+e.serial+`...`;break;default:t=`Loading material...`;break}return(0,R.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`},children:[(0,R.jsx)(Nl,{}),(0,R.jsx)(`div`,{style:{marginTop:`1em`},children:t})]})}function cU({setNotesOpen:e}){let t=Q(zI);return t===null||t.materialID<0?null:(0,R.jsx)(K,{onClick:()=>e(!0),color:`primary`,children:`Add Note`})}var lU=(0,L.memo)(function(e){let[t,n]=(0,L.useState)(!1),[r,i]=GE(II);function a(){i(null),e.onClose&&e.onClose()}let o,s;return r&&(o=(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(fh,{children:(0,R.jsx)(tU,{})}),(0,R.jsx)(dh,{children:(0,R.jsxs)(FH,{fallback:(0,R.jsx)(sU,{}),children:[(0,R.jsx)(aU,{highlightProcsGreaterOrEqualTo:e.highlightProcsGreaterOrEqualTo}),(0,R.jsx)(FH,{fallback:(0,R.jsx)(Nl,{}),children:e.extraDialogElements})]})}),(0,R.jsxs)(uh,{children:[r&&(e.buttons||e.allowNote)?(0,R.jsx)(jH,{fallback:(0,R.jsx)(`div`,{}),children:(0,R.jsxs)(L.Suspense,{fallback:(0,R.jsx)(`div`,{}),children:[r&&e.allowNote?(0,R.jsx)(cU,{setNotesOpen:n}):void 0,e.buttons]})}):null,(0,R.jsx)(K,{onClick:a,color:`secondary`,children:`Close`})]})]}),e.allowNote&&(s=(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(fh,{children:(0,R.jsx)(tU,{notes:!0})}),(0,R.jsxs)(FH,{fallback:(0,R.jsx)(dh,{children:(0,R.jsx)(Nl,{})}),children:[(0,R.jsx)(oU,{setNotesOpen:n}),`;`]})]}))),(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(lh,{open:r!==null,onClose:a,maxWidth:`lg`,children:o}),e.allowNote?(0,R.jsx)(lh,{open:t,onClose:()=>n(!1),maxWidth:`md`,children:s}):void 0]})}),uU=jO(`MachineCostPerYear`,{}),dU=jO(`AutomationCostPerYear`,null),fU=jO(`Last30LaborCost`,null),pU=KE(e=>jO(`PerMonthLabor-`+e.getFullYear().toString()+`-`+e.getMonth().toString(),null)),mU=Z(e=>e(e(vR).type===`Last30`?JE:QE).valuesToLazySeq().filter(e=>e.procsAndPaths.length===1&&e.procsAndPaths[0].paths.length===1&&e.procsAndPaths[0].paths[0].stops.length===1&&rk(e.procsAndPaths[0].paths[0].stops[0].expectedCycleTime)===0).toHashSet(e=>e.partName)),hU=Z(e=>{let t=e(vR),n=e(t.type===`Last30`?Sk:wk),r=e(t.type===`Last30`?kL:jL),i=e(mU),a=VC(fw(),-30),o=t.type===`Last30`?null:t.month;return Hne(n.valuesToLazySeq(),i,r.matsById,o?{month:o}:{thirtyDaysAgo:a})}),gU=Z(e=>{let t=e(vR),n=e(uU),r=e(dU),i=e(t.type===`Last30`?fU:pU(t.month));return Une(e(hU),n,r,i??0)});function _U(){let[e,t]=(0,L.useState)(null),[n,r]=GE(dU);return(0,R.jsx)(Bb,{id:`auotmation-cost-year`,type:`number`,label:`Cost for automated handling system per year`,style:{marginTop:`1.5em`},inputProps:{min:0},variant:`outlined`,value:e===null?n??``:isNaN(e)?``:e,onChange:e=>t(parseFloat(e.target.value)),onBlur:()=>{e!=null&&r(isNaN(e)?null:e),t(null)}})}function vU(){let e=Q(vR),t=e.type===`Last30`?null:e.month,[n,r]=(0,L.useState)(null),[i,a]=GE(t===null?fU:pU(t));return(0,R.jsx)(Bb,{type:`number`,label:`Total labor cost for `+(t===null?`last 30 days`:t.toLocaleDateString(void 0,{month:`long`,year:`numeric`})),inputProps:{min:0},variant:`outlined`,value:n===null?i??``:isNaN(n)?``:n,onChange:e=>r(parseFloat(e.target.value)),onBlur:()=>{n!=null&&a(isNaN(n)?null:n),r(null)}})}function yU(e){let[t,n]=(0,L.useState)(null),[r,i]=GE(uU);return(0,R.jsx)(Bb,{type:`number`,inputProps:{min:0},variant:`outlined`,label:`Cost for `+e.machineGroup+` per station per year`,style:{marginTop:`1.5em`},value:t===null?r[e.machineGroup]??``:isNaN(t)?``:t,onChange:e=>n(parseFloat(e.target.value)),onBlur:()=>{if(t!=null){let n={...r};isNaN(t)?delete n[e.machineGroup]:n[e.machineGroup]=t,i(n)}n(null)}})}function bU(){let e=Q(gU);return(0,R.jsx)(R.Fragment,{children:e.machineQuantities.keysToAscLazySeq().map((t,n)=>(0,R.jsx)(yU,{machineQuantities:e.machineQuantities,machineGroup:t},n))})}var xU=Intl.NumberFormat(void 0,{minimumFractionDigits:1,maximumFractionDigits:1}),SU=new Intl.NumberFormat(void 0,{style:`percent`,minimumFractionDigits:1,maximumFractionDigits:1});function CU(){fL(`Cost Percentages`);let e=Q(hU);return(0,R.jsxs)(G,{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`,children:[(0,R.jsxs)(G,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,R.jsx)(W,{variant:`subtitle1`,children:`Part Cost Percentage Breakdown`}),(0,R.jsx)(G,{flexGrow:1}),(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(zl,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>qne(e),size:`large`,children:(0,R.jsx)(Mx,{})})})]}),(0,R.jsx)(`main`,{children:(0,R.jsxs)(Ty,{stickyHeader:!0,children:[(0,R.jsx)(Jy,{children:(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{children:`Part`}),(0,R.jsx)(J,{align:`right`,children:`Completed Quantity`}),e.machineQuantities.keysToAscLazySeq().map(e=>(0,R.jsxs)(J,{align:`right`,children:[e,` Cost %`]},e)),(0,R.jsx)(J,{align:`right`,children:`Labor Cost %`}),(0,R.jsx)(J,{align:`right`,children:`Automation Cost %`})]})}),(0,R.jsx)(My,{children:X.of(e.parts).sortBy(e=>e.part).map((t,n)=>(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{children:(0,R.jsxs)(G,{sx:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(G,{sx:{mr:`0.2em`},children:(0,R.jsx)(IH,{part:t.part,size:25})}),(0,R.jsx)(`div`,{children:(0,R.jsx)(W,{variant:`body2`,component:`span`,display:`block`,children:t.part})})]})}),(0,R.jsx)(J,{align:`right`,children:t.parts_completed}),e.machineQuantities.keysToAscLazySeq().map(e=>(0,R.jsx)(J,{align:`right`,children:SU.format(t.machine.get(e)??0)},e)),(0,R.jsx)(J,{align:`right`,children:SU.format(t.labor)}),(0,R.jsx)(J,{align:`right`,children:SU.format(t.automation)})]},n))})]})})]})}function wU(){let e=Q(gU);return(0,R.jsxs)(Ty,{stickyHeader:!0,children:[(0,R.jsx)(Jy,{children:(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{children:`Part`}),(0,R.jsx)(J,{align:`right`,children:`Completed Quantity`}),e.machineQuantities.keysToAscLazySeq().map(e=>(0,R.jsxs)(J,{align:`right`,children:[e,` Cost`]},e)),(0,R.jsx)(J,{align:`right`,children:`Labor Cost`}),(0,R.jsx)(J,{align:`right`,children:`Automation Cost`}),(0,R.jsxs)(J,{align:`right`,children:[(0,R.jsx)(`span`,{children:`Total`}),(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(zl,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>Gne(e),size:`large`,children:(0,R.jsx)(Mx,{})})})]})]})}),(0,R.jsx)(My,{children:X.of(e.parts).sortBy(e=>e.part).map((t,n)=>(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{children:(0,R.jsxs)(G,{sx:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(G,{sx:{mr:`0.2em`},children:(0,R.jsx)(IH,{part:t.part,size:25})}),(0,R.jsx)(`div`,{children:(0,R.jsx)(W,{variant:`body2`,component:`span`,display:`block`,children:t.part})})]})}),(0,R.jsx)(J,{align:`right`,children:t.parts_completed}),e.machineQuantities.keysToAscLazySeq().map(e=>(0,R.jsx)(J,{align:`right`,children:xU.format(t.machine.get(e)??0)},e)),(0,R.jsx)(J,{align:`right`,children:xU.format(t.labor)}),(0,R.jsx)(J,{align:`right`,children:xU.format(t.automation)}),(0,R.jsx)(J,{align:`right`,children:xU.format(t.machine.valuesToAscLazySeq().sumBy(e=>e)+t.labor+t.automation)})]},n))})]})}var TU=(0,L.memo)(function(){return fL(`Cost Per Piece`),(0,R.jsx)(G,{component:`main`,paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`20px`,children:(0,R.jsxs)(Rv,{direction:`column`,spacing:4,children:[(0,R.jsxs)(Rv,{direction:`column`,spacing:2,children:[(0,R.jsx)(vU,{}),(0,R.jsx)(_U,{}),(0,R.jsx)(bU,{})]}),(0,R.jsx)(wU,{})]})})}),EU=[{type:`Subheader`,caption:`Shop Floor`},{type:`Link`,route:{route:$.Station_LoadMonitor,loadNum:1,queues:[],completed:!1},icon:(0,R.jsx)(gx,{}),label:`Load Station`},{type:`Link`,route:{route:$.Station_Queues,queues:[]},icon:(0,R.jsx)(Tx,{}),label:`Queue Management`},{type:`Link`,route:{route:$.Station_InspectionMonitor},icon:(0,R.jsx)(Nx,{}),label:`Inspection Stand`},{type:`Link`,route:{route:$.Station_Closeout},icon:(0,R.jsx)(Wx,{}),label:`Close Out`},{type:`Link`,route:{route:$.Tools_Dashboard},icon:(0,R.jsx)(rx,{}),label:`Tool Management`},{type:`Link`,route:{route:$.Station_Overview},icon:(0,R.jsx)(ox,{}),label:`System Overview`},{type:`Subheader`,caption:`Daily Monitoring`},{type:`Link`,route:{route:$.Operations_Dashboard},icon:(0,R.jsx)(Qx,{}),label:`Operation Management`},{type:`Link`,route:{route:$.Engineering_Cycles},icon:(0,R.jsx)(Vx,{}),label:`Engineering`},{type:`Link`,route:{route:$.Quality_Dashboard},icon:(0,R.jsx)(tS,{}),label:`Quality Analysis`},{type:`Link`,route:{route:$.Sales_Dashboard},icon:(0,R.jsx)(Gx,{}),label:`Sales`},{type:`Subheader`,caption:`Monthly Review`},{type:`Link`,route:{route:$.Analysis_Buffers},icon:(0,R.jsx)(Px,{}),label:`Flexibility Analysis`}];function DU(e){let t=(0,R.jsx)(Pc,{children:(0,R.jsx)(Fg,{component:`nav`,dense:!0,children:(e.modes??EU).map((t,n)=>t.type===`Subheader`?(0,R.jsx)(bf,{children:t.caption},n):(0,R.jsx)(Zg,{children:(0,R.jsxs)(Hg,{onClick:()=>e.setRoute(t.route),children:[(0,R.jsx)(n_,{children:t.icon}),(0,R.jsx)(s_,{children:t.label})]})},n))})});return(0,R.jsx)(`main`,{style:{display:`flex`,justifyContent:`center`},children:(0,R.jsxs)(`div`,{children:[(0,R.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,R.jsx)(W,{variant:`h4`,style:{marginTop:`2em`},children:`Select user and computer location`}),(0,R.jsxs)(W,{variant:`caption`,style:{marginBottom:`2em`,maxWidth:`30em`,marginLeft:`auto`,marginRight:`auto`},children:[`We recommend that after selecting one of the following modes, you bookmark the page and visit it directly.`,(0,R.jsx)(`a`,{href:`https://fms-insight.seedtactics.com/docs/client-dashboard.html`,children:`Learn More`})]})]}),t]})})}var OU=e=>{throw TypeError(e)},kU=(e,t,n)=>t.has(e)||OU(`Cannot `+n),AU=(e,t,n)=>(kU(e,t,`read from private field`),n?n.call(e):t.get(e)),jU=(e,t,n)=>t.has(e)?OU(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),MU=(e,t,n,r)=>(kU(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),NU=[[`Aztec`,`M`],[`Codabar`,`L`],[`Code39`,`L`],[`Code93`,`L`],[`Code128`,`L`],[`DataBar`,`L`],[`DataBarExpanded`,`L`],[`DataMatrix`,`M`],[`EAN-8`,`L`],[`EAN-13`,`L`],[`ITF`,`L`],[`MaxiCode`,`M`],[`PDF417`,`M`],[`QRCode`,`M`],[`UPC-A`,`L`],[`UPC-E`,`L`],[`MicroQRCode`,`M`],[`rMQRCode`,`M`],[`DXFilmEdge`,`L`],[`DataBarLimited`,`L`]],PU=NU.map(([e])=>e),FU=PU.filter((e,t)=>NU[t][1]===`L`),IU=PU.filter((e,t)=>NU[t][1]===`M`);function LU(e){switch(e){case`Linear-Codes`:return FU.reduce((e,t)=>e|LU(t),0);case`Matrix-Codes`:return IU.reduce((e,t)=>e|LU(t),0);case`Any`:return(1<<NU.length)-1;case`None`:return 0;default:return 1<<PU.indexOf(e)}}function RU(e){return e===0?`None`:PU[31-Math.clz32(e)]}function zU(e){return e.reduce((e,t)=>e|LU(t),0)}var BU=[`LocalAverage`,`GlobalHistogram`,`FixedThreshold`,`BoolCast`];function VU(e){return BU.indexOf(e)}var HU=`Unknown.ASCII.ISO8859_1.ISO8859_2.ISO8859_3.ISO8859_4.ISO8859_5.ISO8859_6.ISO8859_7.ISO8859_8.ISO8859_9.ISO8859_10.ISO8859_11.ISO8859_13.ISO8859_14.ISO8859_15.ISO8859_16.Cp437.Cp1250.Cp1251.Cp1252.Cp1256.Shift_JIS.Big5.GB2312.GB18030.EUC_JP.EUC_KR.UTF16BE.UTF16BE.UTF8.UTF16LE.UTF32BE.UTF32LE.BINARY`.split(`.`);function UU(e){return e===`UnicodeBig`?HU.indexOf(`UTF16BE`):HU.indexOf(e)}var WU=[`Text`,`Binary`,`Mixed`,`GS1`,`ISO15434`,`UnknownECI`];function GU(e){return WU[e]}var KU=[`Ignore`,`Read`,`Require`];function qU(e){return KU.indexOf(e)}var JU=[`Plain`,`ECI`,`HRI`,`Hex`,`Escaped`];function YU(e){return JU.indexOf(e)}var XU={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,tryDenoise:!1,binarizer:`LocalAverage`,isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!0,returnErrors:!1,eanAddOnSymbol:`Ignore`,textMode:`HRI`,characterSet:`Unknown`};function ZU(e){return{...e,formats:zU(e.formats),binarizer:VU(e.binarizer),eanAddOnSymbol:qU(e.eanAddOnSymbol),textMode:YU(e.textMode),characterSet:UU(e.characterSet)}}function QU(e){return{...e,format:RU(e.format),contentType:GU(e.contentType),eccLevel:e.ecLevel}}var $U={locateFile:(e,t)=>{let n=e.match(/_(.+?)\.wasm$/);return n?`https://fastly.jsdelivr.net/npm/zxing-wasm@2.2.4/dist/${n[1]}/${e}`:t+e}},eW=new WeakMap;function tW(e,t){return Object.is(e,t)||Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(n=>Object.hasOwn(t,n)&&e[n]===t[n])}function nW(e,{overrides:t,equalityFn:n=tW,fireImmediately:r=!1}={}){let[i,a]=eW.get(e)??[$U],o=t??i,s;if(r){if(a&&(s=n(i,o)))return a;let t=e({...o});return eW.set(e,[o,t]),t}(s??n(i,o))||eW.set(e,[o])}async function rW(e,t,n=XU){let r={...XU,...n},i=await nW(e,{fireImmediately:!0}),a,o;if(`width`in t&&`height`in t&&`data`in t){let{data:e,data:{byteLength:n},width:s,height:c}=t;o=i._malloc(n),i.HEAPU8.set(e,o),a=i.readBarcodesFromPixmap(o,s,c,ZU(r))}else{let e,n;if(`buffer`in t)[e,n]=[t.byteLength,t];else if(`byteLength`in t)[e,n]=[t.byteLength,new Uint8Array(t)];else if(`size`in t)[e,n]=[t.size,new Uint8Array(await t.arrayBuffer())];else throw TypeError(`Invalid input type`);o=i._malloc(e),i.HEAPU8.set(n,o),a=i.readBarcodesFromImage(o,e,ZU(r))}i._free(o);let s=[];for(let e=0;e<a.size();++e)s.push(QU(a.get(e)));return s}({...XU}),[...XU.formats];async function iW(e={}){var t,n,r,i=e,a=!!globalThis.window,o=typeof Bun<`u`,s=!!globalThis.WorkerGlobalScope;!((n=globalThis.process)==null||(n=n.versions)==null)&&n.node&&((r=globalThis.process)==null||r.type);var c=`./this.program`,l,u=``;function d(e){return i.locateFile?i.locateFile(e,u):u+e}var f,p;if(a||s||o){try{u=new URL(`.`,l).href}catch{}s&&(p=e=>{var t=new XMLHttpRequest;return t.open(`GET`,e,!1),t.responseType=`arraybuffer`,t.send(null),new Uint8Array(t.response)}),f=async e=>{var t=await fetch(e,{credentials:`same-origin`});if(t.ok)return t.arrayBuffer();throw Error(t.status+` : `+t.url)}}var m=console.log.bind(console),h=console.error.bind(console),g,_=!1,v,y,b,x,S,C,w,T,E,D,O=!1;function k(){var e=ir.buffer;b=new Int8Array(e),S=new Int16Array(e),i.HEAPU8=x=new Uint8Array(e),C=new Uint16Array(e),w=new Int32Array(e),T=new Uint32Array(e),E=new Float32Array(e),D=new Float64Array(e)}function ee(){if(i.preRun)for(typeof i.preRun==`function`&&(i.preRun=[i.preRun]);i.preRun.length;)de(i.preRun.shift());se(ue)}function A(){O=!0,Wr.xa()}function j(){if(i.postRun)for(typeof i.postRun==`function`&&(i.postRun=[i.postRun]);i.postRun.length;)le(i.postRun.shift());se(ce)}function te(e){var t,n;(t=i.onAbort)==null||t.call(i,e),e=`Aborted(`+e+`)`,h(e),_=!0,e+=`. Build with -sASSERTIONS for more info.`;var r=new WebAssembly.RuntimeError(e);throw(n=y)==null||n(r),r}var M;function ne(){return d(`zxing_reader.wasm`)}function N(e){if(e==M&&g)return new Uint8Array(g);if(p)return p(e);throw`both async and sync fetching of the wasm failed`}async function P(e){if(!g)try{var t=await f(e);return new Uint8Array(t)}catch{}return N(e)}async function re(e,t){try{var n=await P(e);return await WebAssembly.instantiate(n,t)}catch(e){h(`failed to asynchronously prepare wasm: ${e}`),te(e)}}async function ie(e,t,n){if(!e&&WebAssembly.instantiateStreaming)try{var r=fetch(t,{credentials:`same-origin`});return await WebAssembly.instantiateStreaming(r,n)}catch(e){h(`wasm streaming compile failed: ${e}`),h(`falling back to ArrayBuffer instantiation`)}return re(t,n)}function ae(){return{a:sr}}async function oe(){function e(e,t){return Wr=e.exports,or(Wr),k(),Wr}function t(t){return e(t.instance)}var n=ae();return i.instantiateWasm?new Promise((t,r)=>{i.instantiateWasm(n,(n,r)=>{t(e(n))})}):(M??=ne(),t(await ie(g,M,n)))}var se=e=>{for(;e.length>0;)e.shift()(i)},ce=[],le=e=>ce.push(e),ue=[],de=e=>ue.push(e),F=e=>Zn(e),fe=()=>Qn(),pe=[],me=0,he=e=>{var t=new I(e);return t.get_caught()||(t.set_caught(!0),me--),t.set_rethrown(!1),pe.push(t),er(e),Jn(e)},ge=0,_e=()=>{Yn(0,0);var e=pe.pop();$n(e.excPtr),ge=0};class I{constructor(e){this.excPtr=e,this.ptr=e-24}set_type(e){T[this.ptr+4>>2]=e}get_type(){return T[this.ptr+4>>2]}set_destructor(e){T[this.ptr+8>>2]=e}get_destructor(){return T[this.ptr+8>>2]}set_caught(e){e=e?1:0,b[this.ptr+12]=e}get_caught(){return b[this.ptr+12]!=0}set_rethrown(e){e=e?1:0,b[this.ptr+13]=e}get_rethrown(){return b[this.ptr+13]!=0}init(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)}set_adjusted_ptr(e){T[this.ptr+16>>2]=e}get_adjusted_ptr(){return T[this.ptr+16>>2]}}var ve=e=>Xn(e),ye=e=>{var t=ge;if(!t)return ve(0),0;var n=new I(t);n.set_adjusted_ptr(t);var r=n.get_type();if(!r)return ve(0),t;for(var i of e){if(i===0||i===r)break;var a=n.ptr+16;if(tr(i,r,a))return ve(i),t}return ve(r),t},be=()=>ye([]),xe=e=>ye([e]),Se=(e,t)=>ye([e,t]),Ce=()=>{var e=pe.pop();e||te(`no exception to throw`);var t=e.excPtr;throw e.get_rethrown()||(pe.push(e),e.set_rethrown(!0),e.set_caught(!1),me++),ge=t,ge},we=(e,t,n)=>{throw new I(e).init(t,n),ge=e,me++,ge},Te=()=>me,Ee=e=>{throw ge||=e,ge},De=()=>te(``),Oe={},ke=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function Ae(e){return this.fromWireType(T[e>>2])}var je={},Me={},Ne={},Pe=class extends Error{constructor(e){super(e),this.name=`InternalError`}},Fe=e=>{throw new Pe(e)},Ie=(e,t,n)=>{e.forEach(e=>Ne[e]=t);function r(t){var r=n(t);r.length!==e.length&&Fe(`Mismatched type converter count`);for(var i=0;i<e.length;++i)Ue(e[i],r[i])}var i=Array(t.length),a=[],o=0;{let e=t;for(let t=0;t<e.length;++t){let n=e[t];Me.hasOwnProperty(n)?i[t]=Me[n]:(a.push(n),je.hasOwnProperty(n)||(je[n]=[]),je[n].push(()=>{i[t]=Me[n],++o,o===a.length&&r(i)}))}}a.length===0&&r(i)},Le=e=>{var t=Oe[e];delete Oe[e];var n=t.rawConstructor,r=t.rawDestructor,i=t.fields,a=i.map(e=>e.getterReturnType).concat(i.map(e=>e.setterArgumentType));Ie([e],a,e=>{var a={};{let t=i;for(let n=0;n<t.length;++n){let r=t[n],o=e[n],s=r.getter,c=r.getterContext,l=e[n+i.length],u=r.setter,d=r.setterContext;a[r.fieldName]={read:e=>o.fromWireType(s(c,e)),write:(e,t)=>{var n=[];u(d,e,l.toWireType(n,t)),ke(n)},optional:o.optional}}}return[{name:t.name,fromWireType:e=>{var t={};for(var n in a)t[n]=a[n].read(e);return r(e),t},toWireType:(e,t)=>{for(var i in a)if(!(i in t)&&!a[i].optional)throw TypeError(`Missing field: "${i}"`);var o=n();for(i in a)a[i].write(o,t[i]);return e!==null&&e.push(r,o),o},readValueFromPointer:Ae,destructorFunction:r}]})},Re=(e,t,n,r,i)=>{},ze=e=>{for(var t=``;;){var n=x[e++];if(!n)return t;t+=String.fromCharCode(n)}},Be=class extends Error{constructor(e){super(e),this.name=`BindingError`}},Ve=e=>{throw new Be(e)};function He(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var r=t.name;if(e||Ve(`type "${r}" must have a positive integer typeid pointer`),Me.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;Ve(`Cannot register type '${r}' twice`)}if(Me[e]=t,delete Ne[e],je.hasOwnProperty(e)){var i=je[e];delete je[e],i.forEach(e=>e())}}function Ue(e,t){return He(e,t,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{})}var We=(e,t,n,r)=>{t=ze(t),Ue(e,{name:t,fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:r},readValueFromPointer:function(e){return this.fromWireType(x[e])},destructorFunction:null})},Ge=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Ke=e=>{function t(e){return e.$$.ptrType.registeredClass.name}Ve(t(e)+` instance already deleted`)},qe=!1,Je=e=>{},Ye=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},Xe=e=>{--e.count.value,e.count.value===0&&Ye(e)},Ze=e=>globalThis.FinalizationRegistry?(qe=new FinalizationRegistry(e=>{Xe(e.$$)}),Ze=e=>{var t=e.$$;if(t.smartPtr){var n={$$:t};qe.register(e,n,e)}return e},Je=e=>qe.unregister(e),Ze(e)):(Ze=e=>e,e),Qe=()=>{let e=$e.prototype;Object.assign(e,{isAliasOf(e){if(!(this instanceof $e)||!(e instanceof $e))return!1;var t=this.$$.ptrType.registeredClass,n=this.$$.ptr;e.$$=e.$$;for(var r=e.$$.ptrType.registeredClass,i=e.$$.ptr;t.baseClass;)n=t.upcast(n),t=t.baseClass;for(;r.baseClass;)i=r.upcast(i),r=r.baseClass;return t===r&&n===i},clone(){if(this.$$.ptr||Ke(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Ze(Object.create(Object.getPrototypeOf(this),{$$:{value:Ge(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Ke(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ve(`Object already scheduled for deletion`),Je(this),Xe(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Ke(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ve(`Object already scheduled for deletion`),this.$$.deleteScheduled=!0,this}});let t=Symbol.dispose;t&&(e[t]=e.delete)};function $e(){}var et=(e,t)=>Object.defineProperty(t,`name`,{value:e}),tt={},nt=(e,t,n)=>{if(e[t].overloadTable===void 0){var r=e[t];e[t]=function(){var r=[...arguments];return e[t].overloadTable.hasOwnProperty(r.length)||Ve(`Function '${n}' called with an invalid number of arguments (${r.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[r.length].apply(this,r)},e[t].overloadTable=[],e[t].overloadTable[r.argCount]=r}},rt=(e,t,n)=>{i.hasOwnProperty(e)?((n===void 0||i[e].overloadTable!==void 0&&i[e].overloadTable[n]!==void 0)&&Ve(`Cannot register public name '${e}' twice`),nt(i,e,e),i[e].overloadTable.hasOwnProperty(n)&&Ve(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`),i[e].overloadTable[n]=t):(i[e]=t,i[e].argCount=n)},it=48,at=57,ot=e=>{e=e.replace(/[^a-zA-Z0-9_]/g,`$`);var t=e.charCodeAt(0);return t>=it&&t<=at?`_${e}`:e};function st(e,t,n,r,i,a,o,s){this.name=e,this.constructor=t,this.instancePrototype=n,this.rawDestructor=r,this.baseClass=i,this.getActualType=a,this.upcast=o,this.downcast=s,this.pureVirtualFunctions=[]}var ct=(e,t,n)=>{for(;t!==n;)t.upcast||Ve(`Expected null or instance of ${n.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e},lt=e=>{if(e===null)return`null`;var t=typeof e;return t===`object`||t===`array`||t===`function`?e.toString():``+e};function ut(e,t){if(t===null)return this.isReference&&Ve(`null is not a valid ${this.name}`),0;t.$$||Ve(`Cannot pass "${lt(t)}" as a ${this.name}`),t.$$.ptr||Ve(`Cannot pass deleted object as a pointer of type ${this.name}`);var n=t.$$.ptrType.registeredClass;return ct(t.$$.ptr,n,this.registeredClass)}function dt(e,t){var n;if(t===null)return this.isReference&&Ve(`null is not a valid ${this.name}`),this.isSmartPointer?(n=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,n),n):0;(!t||!t.$$)&&Ve(`Cannot pass "${lt(t)}" as a ${this.name}`),t.$$.ptr||Ve(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&Ve(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;if(n=ct(t.$$.ptr,r,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&Ve(`Passing raw pointer to smart pointer is illegal`),this.sharingPolicy){case 0:t.$$.smartPtrType===this?n=t.$$.smartPtr:Ve(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:n=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)n=t.$$.smartPtr;else{var i=t.clone();n=this.rawShare(n,Vt.toHandle(()=>i.delete())),e!==null&&e.push(this.rawDestructor,n)}break;default:Ve(`Unsupporting sharing policy`)}return n}function ft(e,t){if(t===null)return this.isReference&&Ve(`null is not a valid ${this.name}`),0;t.$$||Ve(`Cannot pass "${lt(t)}" as a ${this.name}`),t.$$.ptr||Ve(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&Ve(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;return ct(t.$$.ptr,n,this.registeredClass)}var pt=(e,t,n)=>{if(t===n)return e;if(n.baseClass===void 0)return null;var r=pt(e,t,n.baseClass);return r===null?null:n.downcast(r)},mt={},ht=(e,t)=>{for(t===void 0&&Ve(`ptr should not be undefined`);e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},gt=(e,t)=>(t=ht(e,t),mt[t]),_t=(e,t)=>((!t.ptrType||!t.ptr)&&Fe(`makeClassHandle requires ptr and ptrType`),!!t.smartPtrType!=!!t.smartPtr&&Fe(`Both smartPtrType and smartPtr must be specified`),t.count={value:1},Ze(Object.create(e,{$$:{value:t,writable:!0}})));function vt(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var n=gt(this.registeredClass,t);if(n!==void 0){if(n.$$.count.value===0)return n.$$.ptr=t,n.$$.smartPtr=e,n.clone();var r=n.clone();return this.destructor(e),r}function i(){return this.isSmartPointer?_t(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):_t(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a=tt[this.registeredClass.getActualType(t)];if(!a)return i.call(this);var o=this.isConst?a.constPointerType:a.pointerType,s=pt(t,this.registeredClass,o.registeredClass);return s===null?i.call(this):this.isSmartPointer?_t(o.registeredClass.instancePrototype,{ptrType:o,ptr:s,smartPtrType:this,smartPtr:e}):_t(o.registeredClass.instancePrototype,{ptrType:o,ptr:s})}var yt=()=>{Object.assign(bt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var t;(t=this.rawDestructor)==null||t.call(this,e)},readValueFromPointer:Ae,fromWireType:vt})};function bt(e,t,n,r,i,a,o,s,c,l,u){this.name=e,this.registeredClass=t,this.isReference=n,this.isConst=r,this.isSmartPointer=i,this.pointeeType=a,this.sharingPolicy=o,this.rawGetPointee=s,this.rawConstructor=c,this.rawShare=l,this.rawDestructor=u,!i&&t.baseClass===void 0?r?(this.toWireType=ut,this.destructorFunction=null):(this.toWireType=ft,this.destructorFunction=null):this.toWireType=dt}var xt=(e,t,n)=>{i.hasOwnProperty(e)||Fe(`Replacing nonexistent public symbol`),i[e].overloadTable!==void 0&&n!==void 0?i[e].overloadTable[n]=t:(i[e]=t,i[e].argCount=n)},St={},Ct=(e,t,n)=>{e=e.replace(/p/g,`i`);var r=St[e];return r(t,...n)},wt=[],Tt=e=>{var t=wt[e];return t||(wt[e]=t=ar.get(e)),t},Et=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return e.includes(`j`)?Ct(e,t,n):Tt(t)(...n)},Dt=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return function(){return Et(e,t,[...arguments],n)}},Ot=function(e,t){e=ze(e);function n(){return e.includes(`j`)?Dt(e,t):Tt(t)}var r=n();return typeof r!=`function`&&Ve(`unknown function pointer with signature ${e}: ${t}`),r};class kt extends Error{}var L=e=>{var t=Gn(e),n=ze(t);return Kn(t),n},At=(e,t)=>{var n=[],r={};function i(e){if(!r[e]&&!Me[e]){if(Ne[e]){Ne[e].forEach(i);return}n.push(e),r[e]=!0}}throw t.forEach(i),new kt(`${e}: `+n.map(L).join([`, `]))},jt=(e,t,n,r,i,a,o,s,c,l,u,d,f)=>{u=ze(u),a=Ot(i,a),s&&=Ot(o,s),l&&=Ot(c,l),f=Ot(d,f);var p=ot(u);rt(p,function(){At(`Cannot construct ${u} due to unbound types`,[r])}),Ie([e,t,n],r?[r]:[],t=>{t=t[0];var n,i;r?(n=t.registeredClass,i=n.instancePrototype):i=$e.prototype;var o=et(u,function(){if(Object.getPrototypeOf(this)!==c)throw new Be(`Use 'new' to construct ${u}`);if(d.constructor_body===void 0)throw new Be(`${u} has no accessible constructor`);var e=[...arguments],t=d.constructor_body[e.length];if(t===void 0)throw new Be(`Tried to invoke ctor of ${u} with invalid number of parameters (${e.length}) - expected (${Object.keys(d.constructor_body).toString()}) parameters instead!`);return t.apply(this,e)}),c=Object.create(i,{constructor:{value:o}});o.prototype=c;var d=new st(u,o,c,f,n,a,s,l);if(d.baseClass){var m;(m=d.baseClass).__derivedClasses??(m.__derivedClasses=[]),d.baseClass.__derivedClasses.push(d)}var h=new bt(u,d,!0,!1,!1),g=new bt(u+`*`,d,!1,!1,!1),_=new bt(u+` const*`,d,!1,!0,!1);return tt[e]={pointerType:g,constPointerType:_},xt(p,o),[h,g,_]})},Mt=(e,t)=>{for(var n=[],r=0;r<e;r++)n.push(T[t+r*4>>2]);return n};function Nt(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].destructorFunction===void 0)return!0;return!1}function Pt(e,t,n,r,i,a){var o=t.length;o<2&&Ve(`argTypes array size mismatch! Must at least get return value and 'this' types!`);var s=t[1]!==null&&n!==null,c=Nt(t),l=!t[0].isVoid,u=o-2,d=Array(u),f=[],p=[];return et(e,function(){p.length=0;var e;f.length=s?2:1,f[0]=i,s&&(e=t[1].toWireType(p,this),f[1]=e);for(var n=0;n<u;++n)d[n]=t[n+2].toWireType(p,n<0||arguments.length<=n?void 0:arguments[n]),f.push(d[n]);var a=r(...f);function o(n){if(c)ke(p);else for(var r=s?1:2;r<t.length;r++){var i=r===1?e:d[r-2];t[r].destructorFunction!==null&&t[r].destructorFunction(i)}if(l)return t[0].fromWireType(n)}return o(a)})}var Ft=(e,t,n,r,i,a)=>{var o=Mt(t,n);i=Ot(r,i),Ie([],[e],e=>{e=e[0];var n=`constructor ${e.name}`;if(e.registeredClass.constructor_body===void 0&&(e.registeredClass.constructor_body=[]),e.registeredClass.constructor_body[t-1]!==void 0)throw new Be(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{At(`Cannot construct ${e.name} due to unbound types`,o)},Ie([],o,r=>(r.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Pt(n,r,null,i,a),[])),[]})},It=e=>{e=e.trim();let t=e.indexOf(`(`);return t===-1?e:e.slice(0,t)},Lt=(e,t,n,r,i,a,o,s,c,l)=>{var u=Mt(n,r);t=ze(t),t=It(t),a=Ot(i,a),Ie([],[e],e=>{e=e[0];var r=`${e.name}.${t}`;t.startsWith(`@@`)&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);function i(){At(`Cannot call ${r} due to unbound types`,u)}var c=e.registeredClass.instancePrototype,l=c[t];return l===void 0||l.overloadTable===void 0&&l.className!==e.name&&l.argCount===n-2?(i.argCount=n-2,i.className=e.name,c[t]=i):(nt(c,t,r),c[t].overloadTable[n-2]=i),Ie([],u,i=>{var s=Pt(r,i,e,a,o);return c[t].overloadTable===void 0?(s.argCount=n-2,c[t]=s):c[t].overloadTable[n-2]=s,[]}),[]})},Rt=[],zt=[0,1,,1,null,1,!0,1,!1,1],Bt=e=>{e>9&&--zt[e+1]===0&&(zt[e]=void 0,Rt.push(e))},Vt={toValue:e=>(e||Ve(`Cannot use deleted val. handle = ${e}`),zt[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{let t=Rt.pop()||zt.length;return zt[t]=e,zt[t+1]=1,t}}}},Ht={name:`emscripten::val`,fromWireType:e=>{var t=Vt.toValue(e);return Bt(e),t},toWireType:(e,t)=>Vt.toHandle(t),readValueFromPointer:Ae,destructorFunction:null},Ut=e=>Ue(e,Ht),Wt=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(E[e>>2])};case 8:return function(e){return this.fromWireType(D[e>>3])};default:throw TypeError(`invalid float width (${t}): ${e}`)}},Gt=(e,t,n)=>{t=ze(t),Ue(e,{name:t,fromWireType:e=>e,toWireType:(e,t)=>t,readValueFromPointer:Wt(t,n),destructorFunction:null})},Kt=(e,t,n,r,i,a,o,s)=>{var c=Mt(t,n);e=ze(e),e=It(e),i=Ot(r,i),rt(e,function(){At(`Cannot call ${e} due to unbound types`,c)},t-1),Ie([],c,n=>{var r=[n[0],null].concat(n.slice(1));return xt(e,Pt(e,r,null,i,a),t-1),[]})},qt=(e,t,n)=>{switch(t){case 1:return n?e=>b[e]:e=>x[e];case 2:return n?e=>S[e>>1]:e=>C[e>>1];case 4:return n?e=>w[e>>2]:e=>T[e>>2];default:throw TypeError(`invalid integer width (${t}): ${e}`)}},Jt=(e,t,n,r,i)=>{t=ze(t);let a=r===0,o=e=>e;if(a){var s=32-8*n;o=e=>e<<s>>>s,i=o(i)}Ue(e,{name:t,fromWireType:o,toWireType:(e,t)=>t,readValueFromPointer:qt(t,n,r!==0),destructorFunction:null})},Yt=(e,t,n)=>{var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function i(e){var t=T[e>>2],n=T[e+4>>2];return new r(b.buffer,n,t)}n=ze(n),Ue(e,{name:n,fromWireType:i,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},Xt=Object.assign({optional:!0},Ht),Zt=(e,t)=>{Ue(e,Xt)},Qt=(e,t,n,r)=>{if(!(r>0))return 0;for(var i=n,a=n+r-1,o=0;o<e.length;++o){var s=e.codePointAt(o);if(s<=127){if(n>=a)break;t[n++]=s}else if(s<=2047){if(n+1>=a)break;t[n++]=192|s>>6,t[n++]=128|s&63}else if(s<=65535){if(n+2>=a)break;t[n++]=224|s>>12,t[n++]=128|s>>6&63,t[n++]=128|s&63}else{if(n+3>=a)break;t[n++]=240|s>>18,t[n++]=128|s>>12&63,t[n++]=128|s>>6&63,t[n++]=128|s&63,o++}}return t[n]=0,n-i},$t=(e,t,n)=>Qt(e,x,t,n),en=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);r<=127?t++:r<=2047?t+=2:r>=55296&&r<=57343?(t+=4,++n):t+=3}return t},tn=globalThis.TextDecoder&&new TextDecoder,nn=(e,t,n,r)=>{var i=t+n;if(r)return i;for(;e[t]&&!(t>=i);)++t;return t},rn=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;var i=nn(e,t,n,r);if(i-t>16&&e.buffer&&tn)return tn.decode(e.subarray(t,i));for(var a=``;t<i;){var o=e[t++];if(!(o&128)){a+=String.fromCharCode(o);continue}var s=e[t++]&63;if((o&224)==192){a+=String.fromCharCode((o&31)<<6|s);continue}var c=e[t++]&63;if(o=(o&240)==224?(o&15)<<12|s<<6|c:(o&7)<<18|s<<12|c<<6|e[t++]&63,o<65536)a+=String.fromCharCode(o);else{var l=o-65536;a+=String.fromCharCode(55296|l>>10,56320|l&1023)}}return a},R=(e,t,n)=>e?rn(x,e,t,n):``,an=(e,t)=>{t=ze(t),Ue(e,{name:t,fromWireType(e){var t=T[e>>2],n=e+4,r;return r=R(n,t,!0),Kn(e),r},toWireType(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var n,r=typeof t==`string`;r||ArrayBuffer.isView(t)&&t.BYTES_PER_ELEMENT==1||Ve(`Cannot pass non-string to std::string`),n=r?en(t):t.length;var i=qn(4+n+1),a=i+4;return T[i>>2]=n,r?$t(t,a,n+1):x.set(t,a),e!==null&&e.push(Kn,i),i},readValueFromPointer:Ae,destructorFunction(e){Kn(e)}})},on=globalThis.TextDecoder?new TextDecoder(`utf-16le`):void 0,sn=(e,t,n)=>{var r=e>>1,i=nn(C,r,t/2,n);if(i-r>16&&on)return on.decode(C.subarray(r,i));for(var a=``,o=r;o<i;++o){var s=C[o];a+=String.fromCharCode(s)}return a},cn=(e,t,n)=>{if(n??=2147483647,n<2)return 0;n-=2;for(var r=t,i=n<e.length*2?n/2:e.length,a=0;a<i;++a){var o=e.charCodeAt(a);S[t>>1]=o,t+=2}return S[t>>1]=0,t-r},ln=e=>e.length*2,un=(e,t,n)=>{for(var r=``,i=e>>2,a=0;!(a>=t/4);a++){var o=T[i+a];if(!o&&!n)break;r+=String.fromCodePoint(o)}return r},dn=(e,t,n)=>{if(n??=2147483647,n<4)return 0;for(var r=t,i=r+n-4,a=0;a<e.length;++a){var o=e.codePointAt(a);if(o>65535&&a++,w[t>>2]=o,t+=4,t+4>i)break}return w[t>>2]=0,t-r},fn=e=>{for(var t=0,n=0;n<e.length;++n)e.codePointAt(n)>65535&&n++,t+=4;return t},pn=(e,t,n)=>{n=ze(n);var r,i,a;t===2?(r=sn,i=cn,a=ln):(r=un,i=dn,a=fn),Ue(e,{name:n,fromWireType:e=>{var n=T[e>>2],i=r(e+4,n*t,!0);return Kn(e),i},toWireType:(e,r)=>{typeof r!=`string`&&Ve(`Cannot pass non-string to C++ string type ${n}`);var o=a(r),s=qn(4+o+t);return T[s>>2]=o/t,i(r,s+4,o+t),e!==null&&e.push(Kn,s),s},readValueFromPointer:Ae,destructorFunction(e){Kn(e)}})},mn=(e,t,n,r,i,a)=>{Oe[e]={name:ze(t),rawConstructor:Ot(n,r),rawDestructor:Ot(i,a),fields:[]}},hn=(e,t,n,r,i,a,o,s,c,l)=>{Oe[e].fields.push({fieldName:ze(t),getterReturnType:n,getter:Ot(r,i),getterContext:a,setterArgumentType:o,setter:Ot(s,c),setterContext:l})},gn=(e,t)=>{t=ze(t),Ue(e,{isVoid:!0,name:t,fromWireType:()=>{},toWireType:(e,t)=>{}})},_n=[],vn=e=>{var t=_n.length;return _n.push(e),t},yn=(e,t)=>{var n=Me[e];return n===void 0&&Ve(`${t} has unknown type ${L(e)}`),n},bn=(e,t)=>{for(var n=Array(e),r=0;r<e;++r)n[r]=yn(T[t+r*4>>2],`parameter ${r}`);return n},xn=(e,t,n)=>{var r=[],i=e(r,n);return r.length&&(T[t>>2]=Vt.toHandle(r)),i},Sn={},Cn=e=>{var t=Sn[e];return t===void 0?ze(e):t},wn=(e,t,n)=>{var r=8,[i,...a]=bn(e,t),o=i.toWireType.bind(i),s=a.map(e=>e.readValueFromPointer.bind(e));e--;var c=Array(e);return vn(et(`methodCaller<(${a.map(e=>e.name)}) => ${i.name}>`,(t,i,a,l)=>{for(var u=0,d=0;d<e;++d)c[d]=s[d](l+u),u+=r;var f;switch(n){case 0:f=Vt.toValue(t).apply(null,c);break;case 2:f=Reflect.construct(Vt.toValue(t),c);break;case 3:f=c[0];break;case 1:f=Vt.toValue(t)[Cn(i)](...c);break}return xn(o,a,f)}))},Tn=e=>e?(e=Cn(e),Vt.toHandle(globalThis[e])):Vt.toHandle(globalThis),En=e=>{e>9&&(zt[e+1]+=1)},Dn=(e,t,n,r,i)=>_n[e](t,n,r,i),On=e=>{ke(Vt.toValue(e)),Bt(e)},kn=(e,t,n,r)=>{var i=new Date().getFullYear(),a=new Date(i,0,1),o=new Date(i,6,1),s=a.getTimezoneOffset(),c=o.getTimezoneOffset(),l=Math.max(s,c);T[e>>2]=l*60,w[t>>2]=+(s!=c);var u=e=>{var t=e>=0?`-`:`+`,n=Math.abs(e);return`UTC${t}${String(Math.floor(n/60)).padStart(2,`0`)}${String(n%60).padStart(2,`0`)}`},d=u(s),f=u(c);c<s?($t(d,n,17),$t(f,r,17)):($t(d,r,17),$t(f,n,17))},An=()=>2147483648,jn=(e,t)=>Math.ceil(e/t)*t,Mn=e=>{var t=(e-ir.buffer.byteLength+65535)/65536|0;try{return ir.grow(t),k(),1}catch{}},Nn=e=>{var t=x.length;e>>>=0;var n=An();if(e>n)return!1;for(var r=1;r<=4;r*=2){var i=t*(1+.2/r);if(i=Math.min(i,e+100663296),Mn(Math.min(n,jn(Math.max(e,i),65536))))return!0}return!1},Pn={},Fn=()=>c||`./this.program`,In=()=>{if(!In.strings){var e={USER:`web_user`,LOGNAME:`web_user`,PATH:`/`,PWD:`/`,HOME:`/home/web_user`,LANG:(typeof navigator==`object`&&navigator.language||`C`).replace(`-`,`_`)+`.UTF-8`,_:Fn()};for(var t in Pn)Pn[t]===void 0?delete e[t]:e[t]=Pn[t];var n=[];for(var t in e)n.push(`${t}=${e[t]}`);In.strings=n}return In.strings},Ln=(e,t)=>{var n=0,r=0;for(var i of In()){var a=t+n;T[e+r>>2]=a,n+=$t(i,a,1/0)+1,r+=4}return 0},Rn=(e,t)=>{var n=In();T[e>>2]=n.length;var r=0;for(var i of n)r+=en(i)+1;return T[t>>2]=r,0},zn=e=>52;function Bn(e,t,n,r,i){return 70}var Vn=[null,[],[]],Hn=(e,t)=>{var n=Vn[e];t===0||t===10?((e===1?m:h)(rn(n)),n.length=0):n.push(t)},Un=(e,t,n,r)=>{for(var i=0,a=0;a<n;a++){var o=T[t>>2],s=T[t+4>>2];t+=8;for(var c=0;c<s;c++)Hn(e,x[o+c]);i+=s}return T[r>>2]=i,0},Wn=e=>e;if(Qe(),yt(),i.noExitRuntime&&i.noExitRuntime,i.print&&(m=i.print),i.printErr&&(h=i.printErr),i.wasmBinary&&(g=i.wasmBinary),i.arguments&&i.arguments,i.thisProgram&&(c=i.thisProgram),i.preInit)for(typeof i.preInit==`function`&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.shift()();var Gn,Kn,qn,Jn,Yn,Xn,Zn,Qn,$n,er,tr,nr,rr,ir,ar;function or(e){Gn=e.ya,Kn=i._free=e.za,qn=i._malloc=e.Ba,Jn=e.Ca,Yn=e.Da,Xn=e.Ea,Zn=e.Fa,Qn=e.Ga,$n=e.Ha,er=e.Ia,tr=e.Ja,St.viijii=e.Ka,nr=St.iiijj=e.La,St.jiji=e.Ma,rr=St.jiiii=e.Na,St.iiiiij=e.Oa,St.iiiiijj=e.Pa,St.iiiiiijj=e.Qa,ir=e.wa,ar=e.Aa}var sr={s:he,w:_e,a:be,j:xe,m:Se,Q:Ce,p:we,U:Te,d:Ee,ca:De,ta:Le,ba:Re,oa:We,ra:jt,qa:Ft,H:Lt,ma:Ut,X:Gt,Y:Kt,x:Jt,t:Yt,sa:Zt,na:an,R:pn,I:mn,ua:hn,pa:gn,N:wn,va:Bt,D:Tn,S:En,M:Dn,ia:On,da:kn,ga:Nn,ea:Ln,fa:Rn,ha:zn,$:Bn,V:Un,K:Ar,C:Nr,Z:mr,T:zr,r:Er,b:fr,E:kr,ka:Fr,c:hr,ja:Ir,h:pr,i:vr,q:Sr,P:Or,v:wr,F:Tr,L:Dr,z:Pr,J:Br,aa:Vr,_:Hr,f:gr,l:cr,e:dr,g:ur,O:Rr,k:lr,la:jr,o:Cr,B:yr,u:Mr,W:xr,A:Lr,n:_r,G:br,y:Wn};function cr(e,t){var n=fe();try{Tt(e)(t)}catch(e){if(F(n),e!==e+0)throw e;Yn(1,0)}}function lr(e,t,n,r,i){var a=fe();try{Tt(e)(t,n,r,i)}catch(e){if(F(a),e!==e+0)throw e;Yn(1,0)}}function ur(e,t,n,r){var i=fe();try{Tt(e)(t,n,r)}catch(e){if(F(i),e!==e+0)throw e;Yn(1,0)}}function dr(e,t,n){var r=fe();try{Tt(e)(t,n)}catch(e){if(F(r),e!==e+0)throw e;Yn(1,0)}}function fr(e,t){var n=fe();try{return Tt(e)(t)}catch(e){if(F(n),e!==e+0)throw e;Yn(1,0)}}function pr(e,t,n,r){var i=fe();try{return Tt(e)(t,n,r)}catch(e){if(F(i),e!==e+0)throw e;Yn(1,0)}}function mr(e,t,n,r,i,a){var o=fe();try{return Tt(e)(t,n,r,i,a)}catch(e){if(F(o),e!==e+0)throw e;Yn(1,0)}}function hr(e,t,n){var r=fe();try{return Tt(e)(t,n)}catch(e){if(F(r),e!==e+0)throw e;Yn(1,0)}}function gr(e){var t=fe();try{Tt(e)()}catch(e){if(F(t),e!==e+0)throw e;Yn(1,0)}}function _r(e,t,n,r,i,a,o,s,c,l,u){var d=fe();try{Tt(e)(t,n,r,i,a,o,s,c,l,u)}catch(e){if(F(d),e!==e+0)throw e;Yn(1,0)}}function vr(e,t,n,r,i){var a=fe();try{return Tt(e)(t,n,r,i)}catch(e){if(F(a),e!==e+0)throw e;Yn(1,0)}}function yr(e,t,n,r,i,a,o){var s=fe();try{Tt(e)(t,n,r,i,a,o)}catch(e){if(F(s),e!==e+0)throw e;Yn(1,0)}}function br(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){var g=fe();try{Tt(e)(t,n,r,i,a,o,s,c,l,u,d,f,p,m,h)}catch(e){if(F(g),e!==e+0)throw e;Yn(1,0)}}function xr(e,t,n,r,i,a,o,s,c){var l=fe();try{Tt(e)(t,n,r,i,a,o,s,c)}catch(e){if(F(l),e!==e+0)throw e;Yn(1,0)}}function Sr(e,t,n,r,i,a){var o=fe();try{return Tt(e)(t,n,r,i,a)}catch(e){if(F(o),e!==e+0)throw e;Yn(1,0)}}function Cr(e,t,n,r,i,a){var o=fe();try{Tt(e)(t,n,r,i,a)}catch(e){if(F(o),e!==e+0)throw e;Yn(1,0)}}function wr(e,t,n,r,i,a,o){var s=fe();try{return Tt(e)(t,n,r,i,a,o)}catch(e){if(F(s),e!==e+0)throw e;Yn(1,0)}}function Tr(e,t,n,r,i,a,o,s){var c=fe();try{return Tt(e)(t,n,r,i,a,o,s)}catch(e){if(F(c),e!==e+0)throw e;Yn(1,0)}}function Er(e){var t=fe();try{return Tt(e)()}catch(e){if(F(t),e!==e+0)throw e;Yn(1,0)}}function Dr(e,t,n,r,i,a,o,s,c){var l=fe();try{return Tt(e)(t,n,r,i,a,o,s,c)}catch(e){if(F(l),e!==e+0)throw e;Yn(1,0)}}function Or(e,t,n,r,i,a,o){var s=fe();try{return Tt(e)(t,n,r,i,a,o)}catch(e){if(F(s),e!==e+0)throw e;Yn(1,0)}}function kr(e,t,n,r){var i=fe();try{return Tt(e)(t,n,r)}catch(e){if(F(i),e!==e+0)throw e;Yn(1,0)}}function Ar(e,t,n,r){var i=fe();try{return Tt(e)(t,n,r)}catch(e){if(F(i),e!==e+0)throw e;Yn(1,0)}}function jr(e,t,n,r,i,a,o,s){var c=fe();try{Tt(e)(t,n,r,i,a,o,s)}catch(e){if(F(c),e!==e+0)throw e;Yn(1,0)}}function Mr(e,t,n,r,i,a,o,s){var c=fe();try{Tt(e)(t,n,r,i,a,o,s)}catch(e){if(F(c),e!==e+0)throw e;Yn(1,0)}}function Nr(e,t,n,r,i,a){var o=fe();try{return Tt(e)(t,n,r,i,a)}catch(e){if(F(o),e!==e+0)throw e;Yn(1,0)}}function Pr(e,t,n,r,i,a,o,s,c,l){var u=fe();try{return Tt(e)(t,n,r,i,a,o,s,c,l)}catch(e){if(F(u),e!==e+0)throw e;Yn(1,0)}}function Fr(e,t,n){var r=fe();try{return Tt(e)(t,n)}catch(e){if(F(r),e!==e+0)throw e;Yn(1,0)}}function Ir(e,t,n,r,i){var a=fe();try{return Tt(e)(t,n,r,i)}catch(e){if(F(a),e!==e+0)throw e;Yn(1,0)}}function Lr(e,t,n,r,i,a,o,s,c,l){var u=fe();try{Tt(e)(t,n,r,i,a,o,s,c,l)}catch(e){if(F(u),e!==e+0)throw e;Yn(1,0)}}function Rr(e,t,n,r,i,a,o){var s=fe();try{Tt(e)(t,n,r,i,a,o)}catch(e){if(F(s),e!==e+0)throw e;Yn(1,0)}}function zr(e,t,n,r){var i=fe();try{return Tt(e)(t,n,r)}catch(e){if(F(i),e!==e+0)throw e;Yn(1,0)}}function Br(e,t,n,r,i,a,o,s,c,l,u,d){var f=fe();try{return Tt(e)(t,n,r,i,a,o,s,c,l,u,d)}catch(e){if(F(f),e!==e+0)throw e;Yn(1,0)}}function Vr(e,t,n,r,i,a,o){var s=fe();try{return nr(e,t,n,r,i,a,o)}catch(e){if(F(s),e!==e+0)throw e;Yn(1,0)}}function Hr(e,t,n,r,i){var a=fe();try{return rr(e,t,n,r,i)}catch(e){if(F(a),e!==e+0)throw e;Yn(1,0)}}function Ur(){ee();function e(){var e,t;i.calledRun=!0,!_&&(A(),(e=v)==null||e(i),(t=i.onRuntimeInitialized)==null||t.call(i),j())}i.setStatus?(i.setStatus(`Running...`),setTimeout(()=>{setTimeout(()=>i.setStatus(``),1),e()},1)):e()}var Wr;return Wr=await oe(),Ur(),t=O?i:new Promise((e,t)=>{v=e,y=t}),t}function aW(e){return nW(iW,e)}async function oW(e,t){return rW(iW,e,t)}var sW=[[`aztec`,`Aztec`],[`code_128`,`Code128`],[`code_39`,`Code39`],[`code_93`,`Code93`],[`codabar`,`Codabar`],[`databar`,`DataBar`],[`databar_expanded`,`DataBarExpanded`],[`databar_limited`,`DataBarLimited`],[`data_matrix`,`DataMatrix`],[`dx_film_edge`,`DXFilmEdge`],[`ean_13`,`EAN-13`],[`ean_8`,`EAN-8`],[`itf`,`ITF`],[`maxi_code`,`MaxiCode`],[`micro_qr_code`,`MicroQRCode`],[`pdf417`,`PDF417`],[`qr_code`,`QRCode`],[`rm_qr_code`,`rMQRCode`],[`upc_a`,`UPC-A`],[`upc_e`,`UPC-E`],[`linear_codes`,`Linear-Codes`],[`matrix_codes`,`Matrix-Codes`],[`any`,`Any`]],cW=[...sW,[`unknown`]].map(e=>e[0]),lW=new Map(sW);function uW(e){for(let[t,n]of lW)if(e===n)return t;return`unknown`}function dW(e){if(fW(e))return{width:e.naturalWidth,height:e.naturalHeight};if(pW(e))return{width:e.width.baseVal.value,height:e.height.baseVal.value};if(mW(e))return{width:e.videoWidth,height:e.videoHeight};if(gW(e))return{width:e.width,height:e.height};if(vW(e))return{width:e.displayWidth,height:e.displayHeight};if(hW(e)||_W(e))return{width:e.width,height:e.height};throw TypeError(`The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.`)}function fW(e){try{return e instanceof e?.ownerDocument?.defaultView?.HTMLImageElement}catch{return!1}}function pW(e){try{return e instanceof e?.ownerDocument?.defaultView?.SVGImageElement}catch{return!1}}function mW(e){try{return e instanceof e?.ownerDocument?.defaultView?.HTMLVideoElement}catch{return!1}}function hW(e){try{return e instanceof e?.ownerDocument?.defaultView?.HTMLCanvasElement}catch{return!1}}function gW(e){try{return e instanceof ImageBitmap||Object.prototype.toString.call(e)===`[object ImageBitmap]`}catch{return!1}}function _W(e){try{return e instanceof OffscreenCanvas||Object.prototype.toString.call(e)===`[object OffscreenCanvas]`}catch{return!1}}function vW(e){try{return e instanceof VideoFrame||Object.prototype.toString.call(e)===`[object VideoFrame]`}catch{return!1}}function yW(e){try{return e instanceof Blob||Object.prototype.toString.call(e)===`[object Blob]`}catch{return!1}}function bW(e){try{return e instanceof ImageData||Object.prototype.toString.call(e)===`[object ImageData]`}catch{return!1}}function xW(e,t){try{let n=new OffscreenCanvas(e,t);if(n.getContext(`2d`)instanceof OffscreenCanvasRenderingContext2D)return n;throw void 0}catch{let n=document.createElement(`canvas`);return n.width=e,n.height=t,n}}async function SW(e){if(fW(e)&&!await EW(e))throw new DOMException(`Failed to load or decode HTMLImageElement.`,`InvalidStateError`);if(pW(e)&&!await DW(e))throw new DOMException(`Failed to load or decode SVGImageElement.`,`InvalidStateError`);if(vW(e)&&OW(e))throw new DOMException(`VideoFrame is closed.`,`InvalidStateError`);if(mW(e)&&(e.readyState===0||e.readyState===1))throw new DOMException(`Invalid element or state.`,`InvalidStateError`);if(gW(e)&&AW(e))throw new DOMException(`The image source is detached.`,`InvalidStateError`);let{width:t,height:n}=dW(e);if(t===0||n===0)return null;let r=xW(t,n).getContext(`2d`);r.drawImage(e,0,0);try{return r.getImageData(0,0,t,n)}catch{throw new DOMException(`Source would taint origin.`,`SecurityError`)}}async function CW(e){let t;try{t=await createImageBitmap(e)}catch{try{if(globalThis.Image){t=new Image;let n=``;try{n=URL.createObjectURL(e),t.src=n,await t.decode()}finally{URL.revokeObjectURL(n)}}else return e}catch{throw new DOMException(`Failed to load or decode Blob.`,`InvalidStateError`)}}return await SW(t)}function wW(e){let{width:t,height:n}=e;if(t===0||n===0)return null;let r=e.getContext(`2d`);try{return r.getImageData(0,0,t,n)}catch{throw new DOMException(`Source would taint origin.`,`SecurityError`)}}async function TW(e){if(yW(e))return await CW(e);if(bW(e)){if(kW(e))throw new DOMException(`The image data has been detached.`,`InvalidStateError`);return e}return hW(e)||_W(e)?wW(e):await SW(e)}async function EW(e){try{return await e.decode(),!0}catch{return!1}}async function DW(e){try{return await e.decode?.call(e),!0}catch{return!1}}function OW(e){return e.format===null}function kW(e){return e.data.buffer.byteLength===0}function AW(e){return e.width===0&&e.height===0}function jW(e,t){return MW(e)?new DOMException(`${t}: ${e.message}`,e.name):NW(e)?new e.constructor(`${t}: ${e.message}`):Error(`${t}: ${e}`)}function MW(e){return e instanceof DOMException||Object.prototype.toString.call(e)===`[object DOMException]`}function NW(e){return e instanceof Error||Object.prototype.toString.call(e)===`[object Error]`}var PW,FW=class{constructor(e={}){jU(this,PW);try{let t=(e?.formats)?.filter(e=>e!==`unknown`);if(t?.length===0)throw TypeError(`Hint option provided, but is empty.`);for(let e of t??[])if(!lW.has(e))throw TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${e}' is not a valid enum value of type BarcodeFormat.`);MU(this,PW,t??[]),aW({fireImmediately:!0}).catch(()=>{})}catch(e){throw jW(e,`Failed to construct 'BarcodeDetector'`)}}static async getSupportedFormats(){return cW.filter(e=>e!==`unknown`)}async detect(e){try{let t=await TW(e);if(t===null)return[];let n,r={tryCode39ExtendedMode:!1,textMode:`Plain`,formats:AU(this,PW).map(e=>lW.get(e))};try{n=await oW(t,r)}catch(e){throw console.error(e),new DOMException(`Barcode detection service unavailable.`,`NotSupportedError`)}return n.map(e=>{let{topLeft:{x:t,y:n},topRight:{x:r,y:i},bottomLeft:{x:a,y:o},bottomRight:{x:s,y:c}}=e.position,l=Math.min(t,r,a,s),u=Math.min(n,i,o,c),d=Math.max(t,r,a,s),f=Math.max(n,i,o,c);return{boundingBox:new DOMRectReadOnly(l,u,d-l,f-u),rawValue:e.text,format:uW(e.format),cornerPoints:[{x:t,y:n},{x:r,y:i},{x:s,y:c},{x:a,y:o}]}})}catch(e){throw jW(e,`Failed to execute 'detect' on 'BarcodeDetector'`)}}};PW=new WeakMap,globalThis.BarcodeDetector??(globalThis.BarcodeDetector=FW);var IW=!0,LW=!0;function RW(e,t,n){let r=e.match(t);return r&&r.length>=n&&parseFloat(r[n],10)}function zW(e,t,n){if(!e.RTCPeerConnection)return;let r=e.RTCPeerConnection.prototype,i=r.addEventListener;r.addEventListener=function(e,r){if(e!==t)return i.apply(this,arguments);let a=e=>{let t=n(e);t&&(r.handleEvent?r.handleEvent(t):r(t))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(r,a),i.apply(this,[e,a])};let a=r.removeEventListener;r.removeEventListener=function(e,n){if(e!==t||!this._eventMap||!this._eventMap[t]||!this._eventMap[t].has(n))return a.apply(this,arguments);let r=this._eventMap[t].get(n);return this._eventMap[t].delete(n),this._eventMap[t].size===0&&delete this._eventMap[t],Object.keys(this._eventMap).length===0&&delete this._eventMap,a.apply(this,[e,r])},Object.defineProperty(r,`on`+t,{get(){return this[`_on`+t]},set(e){this[`_on`+t]&&(this.removeEventListener(t,this[`_on`+t]),delete this[`_on`+t]),e&&this.addEventListener(t,this[`_on`+t]=e)},enumerable:!0,configurable:!0})}function BW(e){return typeof e==`boolean`?(IW=e,e?`adapter.js logging disabled`:`adapter.js logging enabled`):Error(`Argument type: `+typeof e+`. Please use a boolean.`)}function VW(e){return typeof e==`boolean`?(LW=!e,`adapter.js deprecation warnings `+(e?`disabled`:`enabled`)):Error(`Argument type: `+typeof e+`. Please use a boolean.`)}function HW(){if(typeof window==`object`){if(IW)return;typeof console<`u`&&typeof console.log==`function`&&console.log.apply(console,arguments)}}function UW(e,t){LW&&console.warn(e+` is deprecated, please use `+t+` instead.`)}function WW(e){let t={browser:null,version:null};if(e===void 0||!e.navigator||!e.navigator.userAgent)return t.browser=`Not a browser.`,t;let{navigator:n}=e;if(n.userAgentData&&n.userAgentData.brands){let e=n.userAgentData.brands.find(e=>e.brand===`Chromium`);if(e)return{browser:`chrome`,version:parseInt(e.version,10)}}if(n.mozGetUserMedia)t.browser=`firefox`,t.version=parseInt(RW(n.userAgent,/Firefox\/(\d+)\./,1));else if(n.webkitGetUserMedia||e.isSecureContext===!1&&e.webkitRTCPeerConnection)t.browser=`chrome`,t.version=parseInt(RW(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2));else if(e.RTCPeerConnection&&n.userAgent.match(/AppleWebKit\/(\d+)\./))t.browser=`safari`,t.version=parseInt(RW(n.userAgent,/AppleWebKit\/(\d+)\./,1)),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&`currentDirection`in e.RTCRtpTransceiver.prototype,t._safariVersion=RW(n.userAgent,/Version\/(\d+(\.?\d+))/,1);else return t.browser=`Not a supported browser.`,t;return t}function GW(e){return Object.prototype.toString.call(e)===`[object Object]`}function KW(e){return GW(e)?Object.keys(e).reduce(function(t,n){let r=GW(e[n]),i=r?KW(e[n]):e[n],a=r&&!Object.keys(i).length;return i===void 0||a?t:Object.assign(t,{[n]:i})},{}):e}function qW(e,t,n){!t||n.has(t.id)||(n.set(t.id,t),Object.keys(t).forEach(r=>{r.endsWith(`Id`)?qW(e,e.get(t[r]),n):r.endsWith(`Ids`)&&t[r].forEach(t=>{qW(e,e.get(t),n)})}))}function JW(e,t,n){let r=n?`outbound-rtp`:`inbound-rtp`,i=new Map;if(t===null)return i;let a=[];return e.forEach(e=>{e.type===`track`&&e.trackIdentifier===t.id&&a.push(e)}),a.forEach(t=>{e.forEach(n=>{n.type===r&&n.trackId===t.id&&qW(e,n,i)})}),i}var YW=HW;function XW(e,t){let n=e&&e.navigator;if(!n.mediaDevices)return;let r=function(e){if(typeof e!=`object`||e.mandatory||e.optional)return e;let t={};return Object.keys(e).forEach(n=>{if(n===`require`||n===`advanced`||n===`mediaSource`)return;let r=typeof e[n]==`object`?e[n]:{ideal:e[n]};r.exact!==void 0&&typeof r.exact==`number`&&(r.min=r.max=r.exact);let i=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):t===`deviceId`?`sourceId`:t};if(r.ideal!==void 0){t.optional=t.optional||[];let e={};typeof r.ideal==`number`?(e[i(`min`,n)]=r.ideal,t.optional.push(e),e={},e[i(`max`,n)]=r.ideal,t.optional.push(e)):(e[i(``,n)]=r.ideal,t.optional.push(e))}r.exact!==void 0&&typeof r.exact!=`number`?(t.mandatory=t.mandatory||{},t.mandatory[i(``,n)]=r.exact):[`min`,`max`].forEach(e=>{r[e]!==void 0&&(t.mandatory=t.mandatory||{},t.mandatory[i(e,n)]=r[e])})}),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},i=function(e,i){if(t.version>=61)return i(e);if(e=JSON.parse(JSON.stringify(e)),e&&typeof e.audio==`object`){let t=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};e=JSON.parse(JSON.stringify(e)),t(e.audio,`autoGainControl`,`googAutoGainControl`),t(e.audio,`noiseSuppression`,`googNoiseSuppression`),e.audio=r(e.audio)}if(e&&typeof e.video==`object`){let a=e.video.facingMode;a&&=typeof a==`object`?a:{ideal:a};let o=t.version<66;if(a&&(a.exact===`user`||a.exact===`environment`||a.ideal===`user`||a.ideal===`environment`)&&!(n.mediaDevices.getSupportedConstraints&&n.mediaDevices.getSupportedConstraints().facingMode&&!o)){delete e.video.facingMode;let t;if(a.exact===`environment`||a.ideal===`environment`?t=[`back`,`rear`]:(a.exact===`user`||a.ideal===`user`)&&(t=[`front`]),t)return n.mediaDevices.enumerateDevices().then(n=>{n=n.filter(e=>e.kind===`videoinput`);let o=n.find(e=>t.some(t=>e.label.toLowerCase().includes(t)));return!o&&n.length&&t.includes(`back`)&&(o=n[n.length-1]),o&&(e.video.deviceId=a.exact?{exact:o.deviceId}:{ideal:o.deviceId}),e.video=r(e.video),YW(`chrome: `+JSON.stringify(e)),i(e)})}e.video=r(e.video)}return YW(`chrome: `+JSON.stringify(e)),i(e)},a=function(e){return t.version>=64?e:{name:{PermissionDeniedError:`NotAllowedError`,PermissionDismissedError:`NotAllowedError`,InvalidStateError:`NotAllowedError`,DevicesNotFoundError:`NotFoundError`,ConstraintNotSatisfiedError:`OverconstrainedError`,TrackStartError:`NotReadableError`,MediaDeviceFailedDueToShutdown:`NotAllowedError`,MediaDeviceKillSwitchOn:`NotAllowedError`,TabCaptureError:`AbortError`,ScreenCaptureError:`AbortError`,DeviceCaptureError:`AbortError`}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString(){return this.name+(this.message&&`: `)+this.message}}};if(n.getUserMedia=function(e,t,r){i(e,e=>{n.webkitGetUserMedia(e,t,e=>{r&&r(a(e))})})}.bind(n),n.mediaDevices.getUserMedia){let e=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(t){return i(t,t=>e(t).then(e=>{if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach(e=>{e.stop()}),new DOMException(``,`NotFoundError`);return e},e=>Promise.reject(a(e))))}}}var ZW=s({fixNegotiationNeeded:()=>aG,shimAddTrackRemoveTrack:()=>rG,shimAddTrackRemoveTrackWithNative:()=>nG,shimGetSendersWithDtmf:()=>eG,shimGetUserMedia:()=>XW,shimMediaStream:()=>QW,shimOnTrack:()=>$W,shimPeerConnection:()=>iG,shimSenderReceiverGetStats:()=>tG});function QW(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function $W(e){if(typeof e==`object`&&e.RTCPeerConnection&&!(`ontrack`in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,`ontrack`,{get(){return this._ontrack},set(e){this._ontrack&&this.removeEventListener(`track`,this._ontrack),this.addEventListener(`track`,this._ontrack=e)},enumerable:!0,configurable:!0});let t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=t=>{t.stream.addEventListener(`addtrack`,n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.track.id):{track:n.track};let i=new Event(`track`);i.track=n.track,i.receiver=r,i.transceiver={receiver:r},i.streams=[t.stream],this.dispatchEvent(i)}),t.stream.getTracks().forEach(n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.id):{track:n};let i=new Event(`track`);i.track=n,i.receiver=r,i.transceiver={receiver:r},i.streams=[t.stream],this.dispatchEvent(i)})},this.addEventListener(`addstream`,this._ontrackpoly)),t.apply(this,arguments)}}else zW(e,`track`,e=>(e.transceiver||Object.defineProperty(e,`transceiver`,{value:{receiver:e.receiver}}),e))}function eG(e){if(typeof e==`object`&&e.RTCPeerConnection&&!(`getSenders`in e.RTCPeerConnection.prototype)&&`createDTMFSender`in e.RTCPeerConnection.prototype){let t=function(e,t){return{track:t,get dtmf(){return this._dtmf===void 0&&(t.kind===`audio`?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};let n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){let i=n.apply(this,arguments);return i||(i=t(this,e),this._senders.push(i)),i};let r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){r.apply(this,arguments);let t=this._senders.indexOf(e);t!==-1&&this._senders.splice(t,1)}}let n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._senders=this._senders||[],n.apply(this,[e]),e.getTracks().forEach(e=>{this._senders.push(t(this,e))})};let r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._senders=this._senders||[],r.apply(this,[e]),e.getTracks().forEach(e=>{let t=this._senders.find(t=>t.track===e);t&&this._senders.splice(this._senders.indexOf(t),1)})}}else if(typeof e==`object`&&e.RTCPeerConnection&&`getSenders`in e.RTCPeerConnection.prototype&&`createDTMFSender`in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!(`dtmf`in e.RTCRtpSender.prototype)){let t=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){let e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e},Object.defineProperty(e.RTCRtpSender.prototype,`dtmf`,{get(){return this._dtmf===void 0&&(this.track.kind===`audio`?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function tG(e){if(!(typeof e==`object`&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!(`getStats`in e.RTCRtpSender.prototype)){let t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){let e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});let n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){let e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){let e=this;return this._pc.getStats().then(t=>JW(t,e.track,!0))}}if(!(`getStats`in e.RTCRtpReceiver.prototype)){let t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){let e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),zW(e,`track`,e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){let e=this;return this._pc.getStats().then(t=>JW(t,e.track,!1))}}if(!(`getStats`in e.RTCRtpSender.prototype&&`getStats`in e.RTCRtpReceiver.prototype))return;let t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){let e=arguments[0],t,n,r;return this.getSenders().forEach(n=>{n.track===e&&(t?r=!0:t=n)}),this.getReceivers().forEach(t=>(t.track===e&&(n?r=!0:n=t),t.track===e)),r||t&&n?Promise.reject(new DOMException(`There are more than one sender or receiver for the track.`,`InvalidAccessError`)):t?t.getStats():n?n.getStats():Promise.reject(new DOMException(`There is no sender or receiver for the track.`,`InvalidAccessError`))}return t.apply(this,arguments)}}function nG(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(e=>this._shimmedLocalStreams[e][0])};let t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){if(!n)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};let r=t.apply(this,arguments);return this._shimmedLocalStreams[n.id]?this._shimmedLocalStreams[n.id].indexOf(r)===-1&&this._shimmedLocalStreams[n.id].push(r):this._shimmedLocalStreams[n.id]=[n,r],r};let n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach(e=>{if(this.getSenders().find(t=>t.track===e))throw new DOMException(`Track already exists.`,`InvalidAccessError`)});let t=this.getSenders();n.apply(this,arguments);let r=this.getSenders().filter(e=>t.indexOf(e)===-1);this._shimmedLocalStreams[e.id]=[e].concat(r)};let r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],r.apply(this,arguments)};let i=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach(t=>{let n=this._shimmedLocalStreams[t].indexOf(e);n!==-1&&this._shimmedLocalStreams[t].splice(n,1),this._shimmedLocalStreams[t].length===1&&delete this._shimmedLocalStreams[t]}),i.apply(this,arguments)}}function rG(e,t){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return nG(e);let n=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){let e=n.apply(this);return this._reverseStreams=this._reverseStreams||{},e.map(e=>this._reverseStreams[e.id])};let r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.getTracks().forEach(e=>{if(this.getSenders().find(t=>t.track===e))throw new DOMException(`Track already exists.`,`InvalidAccessError`)}),!this._reverseStreams[t.id]){let n=new e.MediaStream(t.getTracks());this._streams[t.id]=n,this._reverseStreams[n.id]=t,t=n}r.apply(this,[t])};let i=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},i.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,n){if(this.signalingState===`closed`)throw new DOMException(`The RTCPeerConnection's signalingState is 'closed'.`,`InvalidStateError`);let r=[].slice.call(arguments,1);if(r.length!==1||!r[0].getTracks().find(e=>e===t))throw new DOMException(`The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.`,`NotSupportedError`);if(this.getSenders().find(e=>e.track===t))throw new DOMException(`Track already exists.`,`InvalidAccessError`);this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};let i=this._streams[n.id];if(i)i.addTrack(t),Promise.resolve().then(()=>{this.dispatchEvent(new Event(`negotiationneeded`))});else{let r=new e.MediaStream([t]);this._streams[n.id]=r,this._reverseStreams[r.id]=n,this.addStream(r)}return this.getSenders().find(e=>e.track===t)};function a(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{let r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(i.id,`g`),r.id)}),new RTCSessionDescription({type:t.type,sdp:n})}function o(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{let r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(r.id,`g`),i.id)}),new RTCSessionDescription({type:t.type,sdp:n})}[`createOffer`,`createAnswer`].forEach(function(t){let n=e.RTCPeerConnection.prototype[t],r={[t](){let e=arguments;return arguments.length&&typeof arguments[0]==`function`?n.apply(this,[t=>{let n=a(this,t);e[0].apply(null,[n])},t=>{e[1]&&e[1].apply(null,t)},arguments[2]]):n.apply(this,arguments).then(e=>a(this,e))}};e.RTCPeerConnection.prototype[t]=r[t]});let s=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return!arguments.length||!arguments[0].type||(arguments[0]=o(this,arguments[0])),s.apply(this,arguments)};let c=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,`localDescription`);Object.defineProperty(e.RTCPeerConnection.prototype,`localDescription`,{get(){let e=c.get.apply(this);return e.type===``?e:a(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){if(this.signalingState===`closed`)throw new DOMException(`The RTCPeerConnection's signalingState is 'closed'.`,`InvalidStateError`);if(!e._pc)throw new DOMException(`Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.`,`TypeError`);if(e._pc!==this)throw new DOMException(`Sender was not created by this connection.`,`InvalidAccessError`);this._streams=this._streams||{};let t;Object.keys(this._streams).forEach(n=>{this._streams[n].getTracks().find(t=>e.track===t)&&(t=this._streams[n])}),t&&(t.getTracks().length===1?this.removeStream(this._reverseStreams[t.id]):t.removeTrack(e.track),this.dispatchEvent(new Event(`negotiationneeded`)))}}function iG(e,t){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&t.version<53&&[`setLocalDescription`,`setRemoteDescription`,`addIceCandidate`].forEach(function(t){let n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new(t===`addIceCandidate`?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]})}function aG(e,t){zW(e,`negotiationneeded`,e=>{let n=e.target;if(!((t.version<72||n.getConfiguration&&n.getConfiguration().sdpSemantics===`plan-b`)&&n.signalingState!==`stable`))return e})}function oG(e,t){let n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,r){UW(`navigator.getUserMedia`,`navigator.mediaDevices.getUserMedia`),n.mediaDevices.getUserMedia(e).then(t,r)},!(t.version>55&&`autoGainControl`in n.mediaDevices.getSupportedConstraints())){let e=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])},t=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(n){return typeof n==`object`&&typeof n.audio==`object`&&(n=JSON.parse(JSON.stringify(n)),e(n.audio,`autoGainControl`,`mozAutoGainControl`),e(n.audio,`noiseSuppression`,`mozNoiseSuppression`)),t(n)},r&&r.prototype.getSettings){let t=r.prototype.getSettings;r.prototype.getSettings=function(){let n=t.apply(this,arguments);return e(n,`mozAutoGainControl`,`autoGainControl`),e(n,`mozNoiseSuppression`,`noiseSuppression`),n}}if(r&&r.prototype.applyConstraints){let t=r.prototype.applyConstraints;r.prototype.applyConstraints=function(n){return this.kind===`audio`&&typeof n==`object`&&(n=JSON.parse(JSON.stringify(n)),e(n,`autoGainControl`,`mozAutoGainControl`),e(n,`noiseSuppression`,`mozNoiseSuppression`)),t.apply(this,[n])}}}}function sG(e,t){e.navigator.mediaDevices&&`getDisplayMedia`in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(n){if(!(n&&n.video)){let e=new DOMException(`getDisplayMedia without video constraints is undefined`);return e.name=`NotFoundError`,e.code=8,Promise.reject(e)}return n.video===!0?n.video={mediaSource:t}:n.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(n)})}var cG=s({shimAddTransceiver:()=>hG,shimCreateAnswer:()=>vG,shimCreateOffer:()=>_G,shimGetDisplayMedia:()=>sG,shimGetParameters:()=>gG,shimGetUserMedia:()=>oG,shimOnTrack:()=>lG,shimPeerConnection:()=>uG,shimRTCDataChannel:()=>mG,shimReceiverGetStats:()=>fG,shimRemoveStream:()=>pG,shimSenderGetStats:()=>dG});function lG(e){typeof e==`object`&&e.RTCTrackEvent&&`receiver`in e.RTCTrackEvent.prototype&&!(`transceiver`in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,`transceiver`,{get(){return{receiver:this.receiver}}})}function uG(e,t){if(typeof e!=`object`||!(e.RTCPeerConnection||e.mozRTCPeerConnection))return;!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&[`setLocalDescription`,`setRemoteDescription`,`addIceCandidate`].forEach(function(t){let n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new(t===`addIceCandidate`?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]});let n={inboundrtp:`inbound-rtp`,outboundrtp:`outbound-rtp`,candidatepair:`candidate-pair`,localcandidate:`local-candidate`,remotecandidate:`remote-candidate`},r=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){let[e,i,a]=arguments;return r.apply(this,[e||null]).then(e=>{if(t.version<53&&!i)try{e.forEach(e=>{e.type=n[e.type]||e.type})}catch(t){if(t.name!==`TypeError`)throw t;e.forEach((t,r)=>{e.set(r,Object.assign({},t,{type:n[t.type]||t.type}))})}return e}).then(i,a)}}function dG(e){if(!(typeof e==`object`&&e.RTCPeerConnection&&e.RTCRtpSender)||e.RTCRtpSender&&`getStats`in e.RTCRtpSender.prototype)return;let t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){let e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});let n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){let e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function fG(e){if(!(typeof e==`object`&&e.RTCPeerConnection&&e.RTCRtpSender)||e.RTCRtpSender&&`getStats`in e.RTCRtpReceiver.prototype)return;let t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){let e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),zW(e,`track`,e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function pG(e){!e.RTCPeerConnection||`removeStream`in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){UW(`removeStream`,`removeTrack`),this.getSenders().forEach(t=>{t.track&&e.getTracks().includes(t.track)&&this.removeTrack(t)})})}function mG(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function hG(e){if(!(typeof e==`object`&&e.RTCPeerConnection))return;let t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let e=arguments[1]&&arguments[1].sendEncodings;e===void 0&&(e=[]),e=[...e];let n=e.length>0;n&&e.forEach(e=>{if(`rid`in e&&!/^[a-z0-9]{0,16}$/i.test(e.rid))throw TypeError(`Invalid RID value provided.`);if(`scaleResolutionDownBy`in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw RangeError(`scale_resolution_down_by must be >= 1.0`);if(`maxFramerate`in e&&!(parseFloat(e.maxFramerate)>=0))throw RangeError(`max_framerate must be >= 0.0`)});let r=t.apply(this,arguments);if(n){let{sender:t}=r,n=t.getParameters();(!(`encodings`in n)||n.encodings.length===1&&Object.keys(n.encodings[0]).length===0)&&(n.encodings=e,t.sendEncodings=e,this.setParametersPromises.push(t.setParameters(n).then(()=>{delete t.sendEncodings}).catch(()=>{delete t.sendEncodings})))}return r})}function gG(e){if(!(typeof e==`object`&&e.RTCRtpSender))return;let t=e.RTCRtpSender.prototype.getParameters;t&&(e.RTCRtpSender.prototype.getParameters=function(){let e=t.apply(this,arguments);return`encodings`in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}function _G(e){if(!(typeof e==`object`&&e.RTCPeerConnection))return;let t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}function vG(e){if(!(typeof e==`object`&&e.RTCPeerConnection))return;let t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}var yG=s({shimAudioContext:()=>OG,shimCallbacksAPI:()=>SG,shimConstraints:()=>wG,shimCreateOfferLegacy:()=>DG,shimGetUserMedia:()=>CG,shimLocalStreamsAPI:()=>bG,shimRTCIceServerUrls:()=>TG,shimRemoteStreamsAPI:()=>xG,shimTrackEventTransceiver:()=>EG});function bG(e){if(!(typeof e!=`object`||!e.RTCPeerConnection)){if(`getLocalStreams`in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||=[],this._localStreams}),!(`addStream`in e.RTCPeerConnection.prototype)){let t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){this._localStreams||=[],this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach(n=>t.call(this,n,e)),e.getVideoTracks().forEach(n=>t.call(this,n,e))},e.RTCPeerConnection.prototype.addTrack=function(e,...n){return n&&n.forEach(e=>{this._localStreams?this._localStreams.includes(e)||this._localStreams.push(e):this._localStreams=[e]}),t.apply(this,arguments)}}`removeStream`in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){this._localStreams||=[];let t=this._localStreams.indexOf(e);if(t===-1)return;this._localStreams.splice(t,1);let n=e.getTracks();this.getSenders().forEach(e=>{n.includes(e.track)&&this.removeTrack(e)})})}}function xG(e){if(!(typeof e!=`object`||!e.RTCPeerConnection)&&(`getRemoteStreams`in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!(`onaddstream`in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,`onaddstream`,{get(){return this._onaddstream},set(e){this._onaddstream&&(this.removeEventListener(`addstream`,this._onaddstream),this.removeEventListener(`track`,this._onaddstreampoly)),this.addEventListener(`addstream`,this._onaddstream=e),this.addEventListener(`track`,this._onaddstreampoly=e=>{e.streams.forEach(e=>{if(this._remoteStreams||=[],this._remoteStreams.includes(e))return;this._remoteStreams.push(e);let t=new Event(`addstream`);t.stream=e,this.dispatchEvent(t)})})}});let t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){let e=this;return this._onaddstreampoly||this.addEventListener(`track`,this._onaddstreampoly=function(t){t.streams.forEach(t=>{if(e._remoteStreams||=[],e._remoteStreams.indexOf(t)>=0)return;e._remoteStreams.push(t);let n=new Event(`addstream`);n.stream=t,e.dispatchEvent(n)})}),t.apply(e,arguments)}}}function SG(e){if(typeof e!=`object`||!e.RTCPeerConnection)return;let t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,i=t.setLocalDescription,a=t.setRemoteDescription,o=t.addIceCandidate;t.createOffer=function(e,t){let r=arguments.length>=2?arguments[2]:arguments[0],i=n.apply(this,[r]);return t?(i.then(e,t),Promise.resolve()):i},t.createAnswer=function(e,t){let n=arguments.length>=2?arguments[2]:arguments[0],i=r.apply(this,[n]);return t?(i.then(e,t),Promise.resolve()):i};let s=function(e,t,n){let r=i.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r};t.setLocalDescription=s,s=function(e,t,n){let r=a.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.setRemoteDescription=s,s=function(e,t,n){let r=o.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.addIceCandidate=s}function CG(e){let t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){let e=t.mediaDevices,n=e.getUserMedia.bind(e);t.mediaDevices.getUserMedia=e=>n(wG(e))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}.bind(t))}function wG(e){return e&&e.video!==void 0?Object.assign({},e,{video:KW(e.video)}):e}function TG(e){if(!e.RTCPeerConnection)return;let t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,n){if(e&&e.iceServers){let t=[];for(let n=0;n<e.iceServers.length;n++){let r=e.iceServers[n];r.urls===void 0&&r.url?(UW(`RTCIceServer.url`,`RTCIceServer.urls`),r=JSON.parse(JSON.stringify(r)),r.urls=r.url,delete r.url,t.push(r)):t.push(e.iceServers[n])}e.iceServers=t}return new t(e,n)},e.RTCPeerConnection.prototype=t.prototype,`generateCertificate`in t&&Object.defineProperty(e.RTCPeerConnection,`generateCertificate`,{get(){return t.generateCertificate}})}function EG(e){typeof e==`object`&&e.RTCTrackEvent&&`receiver`in e.RTCTrackEvent.prototype&&!(`transceiver`in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,`transceiver`,{get(){return{receiver:this.receiver}}})}function DG(e){let t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){e.offerToReceiveAudio!==void 0&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);let t=this.getTransceivers().find(e=>e.receiver.track.kind===`audio`);e.offerToReceiveAudio===!1&&t?t.direction===`sendrecv`?t.setDirection?t.setDirection(`sendonly`):t.direction=`sendonly`:t.direction===`recvonly`&&(t.setDirection?t.setDirection(`inactive`):t.direction=`inactive`):e.offerToReceiveAudio===!0&&!t&&this.addTransceiver(`audio`,{direction:`recvonly`}),e.offerToReceiveVideo!==void 0&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);let n=this.getTransceivers().find(e=>e.receiver.track.kind===`video`);e.offerToReceiveVideo===!1&&n?n.direction===`sendrecv`?n.setDirection?n.setDirection(`sendonly`):n.direction=`sendonly`:n.direction===`recvonly`&&(n.setDirection?n.setDirection(`inactive`):n.direction=`inactive`):e.offerToReceiveVideo===!0&&!n&&this.addTransceiver(`video`,{direction:`recvonly`})}return t.apply(this,arguments)}}function OG(e){typeof e!=`object`||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var kG=o(((e,t)=>{var n={};n.generateIdentifier=function(){return Math.random().toString(36).substring(2,12)},n.localCName=n.generateIdentifier(),n.splitLines=function(e){return e.trim().split(`
|
|
258
|
+
`).map(e=>e.trim())},n.splitSections=function(e){return e.split(`
|
|
259
|
+
m=`).map((e,t)=>(t>0?`m=`+e:e).trim()+`\r
|
|
260
|
+
`)},n.getDescription=function(e){let t=n.splitSections(e);return t&&t[0]},n.getMediaSections=function(e){let t=n.splitSections(e);return t.shift(),t},n.matchPrefix=function(e,t){return n.splitLines(e).filter(e=>e.indexOf(t)===0)},n.parseCandidate=function(e){let t;t=e.indexOf(`a=candidate:`)===0?e.substring(12).split(` `):e.substring(10).split(` `);let n={foundation:t[0],component:{1:`rtp`,2:`rtcp`}[t[1]]||t[1],protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],address:t[4],port:parseInt(t[5],10),type:t[7]};for(let e=8;e<t.length;e+=2)switch(t[e]){case`raddr`:n.relatedAddress=t[e+1];break;case`rport`:n.relatedPort=parseInt(t[e+1],10);break;case`tcptype`:n.tcpType=t[e+1];break;case`ufrag`:n.ufrag=t[e+1],n.usernameFragment=t[e+1];break;default:n[t[e]]===void 0&&(n[t[e]]=t[e+1]);break}return n},n.writeCandidate=function(e){let t=[];t.push(e.foundation);let n=e.component;n===`rtp`?t.push(1):n===`rtcp`?t.push(2):t.push(n),t.push(e.protocol.toUpperCase()),t.push(e.priority),t.push(e.address||e.ip),t.push(e.port);let r=e.type;return t.push(`typ`),t.push(r),r!==`host`&&e.relatedAddress&&e.relatedPort&&(t.push(`raddr`),t.push(e.relatedAddress),t.push(`rport`),t.push(e.relatedPort)),e.tcpType&&e.protocol.toLowerCase()===`tcp`&&(t.push(`tcptype`),t.push(e.tcpType)),(e.usernameFragment||e.ufrag)&&(t.push(`ufrag`),t.push(e.usernameFragment||e.ufrag)),`candidate:`+t.join(` `)},n.parseIceOptions=function(e){return e.substring(14).split(` `)},n.parseRtpMap=function(e){let t=e.substring(9).split(` `),n={payloadType:parseInt(t.shift(),10)};return t=t[0].split(`/`),n.name=t[0],n.clockRate=parseInt(t[1],10),n.channels=t.length===3?parseInt(t[2],10):1,n.numChannels=n.channels,n},n.writeRtpMap=function(e){let t=e.payloadType;e.preferredPayloadType!==void 0&&(t=e.preferredPayloadType);let n=e.channels||e.numChannels||1;return`a=rtpmap:`+t+` `+e.name+`/`+e.clockRate+(n===1?``:`/`+n)+`\r
|
|
261
|
+
`},n.parseExtmap=function(e){let t=e.substring(9).split(` `);return{id:parseInt(t[0],10),direction:t[0].indexOf(`/`)>0?t[0].split(`/`)[1]:`sendrecv`,uri:t[1],attributes:t.slice(2).join(` `)}},n.writeExtmap=function(e){return`a=extmap:`+(e.id||e.preferredId)+(e.direction&&e.direction!==`sendrecv`?`/`+e.direction:``)+` `+e.uri+(e.attributes?` `+e.attributes:``)+`\r
|
|
262
|
+
`},n.parseFmtp=function(e){let t={},n,r=e.substring(e.indexOf(` `)+1).split(`;`);for(let e=0;e<r.length;e++)n=r[e].trim().split(`=`),t[n[0].trim()]=n[1];return t},n.writeFmtp=function(e){let t=``,n=e.payloadType;if(e.preferredPayloadType!==void 0&&(n=e.preferredPayloadType),e.parameters&&Object.keys(e.parameters).length){let r=[];Object.keys(e.parameters).forEach(t=>{e.parameters[t]===void 0?r.push(t):r.push(t+`=`+e.parameters[t])}),t+=`a=fmtp:`+n+` `+r.join(`;`)+`\r
|
|
263
|
+
`}return t},n.parseRtcpFb=function(e){let t=e.substring(e.indexOf(` `)+1).split(` `);return{type:t.shift(),parameter:t.join(` `)}},n.writeRtcpFb=function(e){let t=``,n=e.payloadType;return e.preferredPayloadType!==void 0&&(n=e.preferredPayloadType),e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach(e=>{t+=`a=rtcp-fb:`+n+` `+e.type+(e.parameter&&e.parameter.length?` `+e.parameter:``)+`\r
|
|
264
|
+
`}),t},n.parseSsrcMedia=function(e){let t=e.indexOf(` `),n={ssrc:parseInt(e.substring(7,t),10)},r=e.indexOf(`:`,t);return r>-1?(n.attribute=e.substring(t+1,r),n.value=e.substring(r+1)):n.attribute=e.substring(t+1),n},n.parseSsrcGroup=function(e){let t=e.substring(13).split(` `);return{semantics:t.shift(),ssrcs:t.map(e=>parseInt(e,10))}},n.getMid=function(e){let t=n.matchPrefix(e,`a=mid:`)[0];if(t)return t.substring(6)},n.parseFingerprint=function(e){let t=e.substring(14).split(` `);return{algorithm:t[0].toLowerCase(),value:t[1].toUpperCase()}},n.getDtlsParameters=function(e,t){return{role:`auto`,fingerprints:n.matchPrefix(e+t,`a=fingerprint:`).map(n.parseFingerprint)}},n.writeDtlsParameters=function(e,t){let n=`a=setup:`+t+`\r
|
|
265
|
+
`;return e.fingerprints.forEach(e=>{n+=`a=fingerprint:`+e.algorithm+` `+e.value+`\r
|
|
266
|
+
`}),n},n.parseCryptoLine=function(e){let t=e.substring(9).split(` `);return{tag:parseInt(t[0],10),cryptoSuite:t[1],keyParams:t[2],sessionParams:t.slice(3)}},n.writeCryptoLine=function(e){return`a=crypto:`+e.tag+` `+e.cryptoSuite+` `+(typeof e.keyParams==`object`?n.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?` `+e.sessionParams.join(` `):``)+`\r
|
|
267
|
+
`},n.parseCryptoKeyParams=function(e){if(e.indexOf(`inline:`)!==0)return null;let t=e.substring(7).split(`|`);return{keyMethod:`inline`,keySalt:t[0],lifeTime:t[1],mkiValue:t[2]?t[2].split(`:`)[0]:void 0,mkiLength:t[2]?t[2].split(`:`)[1]:void 0}},n.writeCryptoKeyParams=function(e){return e.keyMethod+`:`+e.keySalt+(e.lifeTime?`|`+e.lifeTime:``)+(e.mkiValue&&e.mkiLength?`|`+e.mkiValue+`:`+e.mkiLength:``)},n.getCryptoParameters=function(e,t){return n.matchPrefix(e+t,`a=crypto:`).map(n.parseCryptoLine)},n.getIceParameters=function(e,t){let r=n.matchPrefix(e+t,`a=ice-ufrag:`)[0],i=n.matchPrefix(e+t,`a=ice-pwd:`)[0];return r&&i?{usernameFragment:r.substring(12),password:i.substring(10)}:null},n.writeIceParameters=function(e){let t=`a=ice-ufrag:`+e.usernameFragment+`\r
|
|
268
|
+
a=ice-pwd:`+e.password+`\r
|
|
269
|
+
`;return e.iceLite&&(t+=`a=ice-lite\r
|
|
270
|
+
`),t},n.parseRtpParameters=function(e){let t={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},r=n.splitLines(e)[0].split(` `);t.profile=r[2];for(let i=3;i<r.length;i++){let a=r[i],o=n.matchPrefix(e,`a=rtpmap:`+a+` `)[0];if(o){let r=n.parseRtpMap(o),i=n.matchPrefix(e,`a=fmtp:`+a+` `);switch(r.parameters=i.length?n.parseFmtp(i[0]):{},r.rtcpFeedback=n.matchPrefix(e,`a=rtcp-fb:`+a+` `).map(n.parseRtcpFb),t.codecs.push(r),r.name.toUpperCase()){case`RED`:case`ULPFEC`:t.fecMechanisms.push(r.name.toUpperCase());break;default:break}}}n.matchPrefix(e,`a=extmap:`).forEach(e=>{t.headerExtensions.push(n.parseExtmap(e))});let i=n.matchPrefix(e,`a=rtcp-fb:* `).map(n.parseRtcpFb);return t.codecs.forEach(e=>{i.forEach(t=>{e.rtcpFeedback.find(e=>e.type===t.type&&e.parameter===t.parameter)||e.rtcpFeedback.push(t)})}),t},n.writeRtpDescription=function(e,t){let r=``;r+=`m=`+e+` `,r+=t.codecs.length>0?`9`:`0`,r+=` `+(t.profile||`UDP/TLS/RTP/SAVPF`)+` `,r+=t.codecs.map(e=>e.preferredPayloadType===void 0?e.payloadType:e.preferredPayloadType).join(` `)+`\r
|
|
271
|
+
`,r+=`c=IN IP4 0.0.0.0\r
|
|
272
|
+
`,r+=`a=rtcp:9 IN IP4 0.0.0.0\r
|
|
273
|
+
`,t.codecs.forEach(e=>{r+=n.writeRtpMap(e),r+=n.writeFmtp(e),r+=n.writeRtcpFb(e)});let i=0;return t.codecs.forEach(e=>{e.maxptime>i&&(i=e.maxptime)}),i>0&&(r+=`a=maxptime:`+i+`\r
|
|
274
|
+
`),t.headerExtensions&&t.headerExtensions.forEach(e=>{r+=n.writeExtmap(e)}),r},n.parseRtpEncodingParameters=function(e){let t=[],r=n.parseRtpParameters(e),i=r.fecMechanisms.indexOf(`RED`)!==-1,a=r.fecMechanisms.indexOf(`ULPFEC`)!==-1,o=n.matchPrefix(e,`a=ssrc:`).map(e=>n.parseSsrcMedia(e)).filter(e=>e.attribute===`cname`),s=o.length>0&&o[0].ssrc,c,l=n.matchPrefix(e,`a=ssrc-group:FID`).map(e=>e.substring(17).split(` `).map(e=>parseInt(e,10)));l.length>0&&l[0].length>1&&l[0][0]===s&&(c=l[0][1]),r.codecs.forEach(e=>{if(e.name.toUpperCase()===`RTX`&&e.parameters.apt){let n={ssrc:s,codecPayloadType:parseInt(e.parameters.apt,10)};s&&c&&(n.rtx={ssrc:c}),t.push(n),i&&(n=JSON.parse(JSON.stringify(n)),n.fec={ssrc:s,mechanism:a?`red+ulpfec`:`red`},t.push(n))}}),t.length===0&&s&&t.push({ssrc:s});let u=n.matchPrefix(e,`b=`);return u.length&&(u=u[0].indexOf(`b=TIAS:`)===0?parseInt(u[0].substring(7),10):u[0].indexOf(`b=AS:`)===0?parseInt(u[0].substring(5),10)*1e3*.95-2e3*8:void 0,t.forEach(e=>{e.maxBitrate=u})),t},n.parseRtcpParameters=function(e){let t={},r=n.matchPrefix(e,`a=ssrc:`).map(e=>n.parseSsrcMedia(e)).filter(e=>e.attribute===`cname`)[0];r&&(t.cname=r.value,t.ssrc=r.ssrc);let i=n.matchPrefix(e,`a=rtcp-rsize`);return t.reducedSize=i.length>0,t.compound=i.length===0,t.mux=n.matchPrefix(e,`a=rtcp-mux`).length>0,t},n.writeRtcpParameters=function(e){let t=``;return e.reducedSize&&(t+=`a=rtcp-rsize\r
|
|
275
|
+
`),e.mux&&(t+=`a=rtcp-mux\r
|
|
276
|
+
`),e.ssrc!==void 0&&e.cname&&(t+=`a=ssrc:`+e.ssrc+` cname:`+e.cname+`\r
|
|
277
|
+
`),t},n.parseMsid=function(e){let t,r=n.matchPrefix(e,`a=msid:`);if(r.length===1)return t=r[0].substring(7).split(` `),{stream:t[0],track:t[1]};let i=n.matchPrefix(e,`a=ssrc:`).map(e=>n.parseSsrcMedia(e)).filter(e=>e.attribute===`msid`);if(i.length>0)return t=i[0].value.split(` `),{stream:t[0],track:t[1]}},n.parseSctpDescription=function(e){let t=n.parseMLine(e),r=n.matchPrefix(e,`a=max-message-size:`),i;r.length>0&&(i=parseInt(r[0].substring(19),10)),isNaN(i)&&(i=65536);let a=n.matchPrefix(e,`a=sctp-port:`);if(a.length>0)return{port:parseInt(a[0].substring(12),10),protocol:t.fmt,maxMessageSize:i};let o=n.matchPrefix(e,`a=sctpmap:`);if(o.length>0){let e=o[0].substring(10).split(` `);return{port:parseInt(e[0],10),protocol:e[1],maxMessageSize:i}}},n.writeSctpDescription=function(e,t){let n=[];return n=e.protocol===`DTLS/SCTP`?[`m=`+e.kind+` 9 `+e.protocol+` `+t.port+`\r
|
|
278
|
+
`,`c=IN IP4 0.0.0.0\r
|
|
279
|
+
`,`a=sctpmap:`+t.port+` `+t.protocol+` 65535\r
|
|
280
|
+
`]:[`m=`+e.kind+` 9 `+e.protocol+` `+t.protocol+`\r
|
|
281
|
+
`,`c=IN IP4 0.0.0.0\r
|
|
282
|
+
`,`a=sctp-port:`+t.port+`\r
|
|
283
|
+
`],t.maxMessageSize!==void 0&&n.push(`a=max-message-size:`+t.maxMessageSize+`\r
|
|
284
|
+
`),n.join(``)},n.generateSessionId=function(){return Math.random().toString().substr(2,22)},n.writeSessionBoilerplate=function(e,t,r){let i,a=t===void 0?2:t;return i=e||n.generateSessionId(),`v=0\r
|
|
285
|
+
o=`+(r||`thisisadapterortc`)+` `+i+` `+a+` IN IP4 127.0.0.1\r
|
|
286
|
+
s=-\r
|
|
287
|
+
t=0 0\r
|
|
288
|
+
`},n.getDirection=function(e,t){let r=n.splitLines(e);for(let e=0;e<r.length;e++)switch(r[e]){case`a=sendrecv`:case`a=sendonly`:case`a=recvonly`:case`a=inactive`:return r[e].substring(2);default:}return t?n.getDirection(t):`sendrecv`},n.getKind=function(e){return n.splitLines(e)[0].split(` `)[0].substring(2)},n.isRejected=function(e){return e.split(` `,2)[1]===`0`},n.parseMLine=function(e){let t=n.splitLines(e)[0].substring(2).split(` `);return{kind:t[0],port:parseInt(t[1],10),protocol:t[2],fmt:t.slice(3).join(` `)}},n.parseOLine=function(e){let t=n.matchPrefix(e,`o=`)[0].substring(2).split(` `);return{username:t[0],sessionId:t[1],sessionVersion:parseInt(t[2],10),netType:t[3],addressType:t[4],address:t[5]}},n.isValidSDP=function(e){if(typeof e!=`string`||e.length===0)return!1;let t=n.splitLines(e);for(let e=0;e<t.length;e++)if(t[e].length<2||t[e].charAt(1)!==`=`)return!1;return!0},typeof t==`object`&&(t.exports=n)})),AG=s({removeExtmapAllowMixed:()=>LG,shimAddIceCandidateNullOrEmpty:()=>RG,shimConnectionState:()=>IG,shimMaxMessageSize:()=>PG,shimParameterlessSetLocalDescription:()=>zG,shimRTCIceCandidate:()=>MG,shimRTCIceCandidateRelayProtocol:()=>NG,shimSendThrowTypeError:()=>FG}),jG=l(kG());function MG(e){if(!e.RTCIceCandidate||e.RTCIceCandidate&&`foundation`in e.RTCIceCandidate.prototype)return;let t=e.RTCIceCandidate;e.RTCIceCandidate=function(e){if(typeof e==`object`&&e.candidate&&e.candidate.indexOf(`a=`)===0&&(e=JSON.parse(JSON.stringify(e)),e.candidate=e.candidate.substring(2)),e.candidate&&e.candidate.length){let n=new t(e),r=jG.default.parseCandidate(e.candidate);for(let e in r)e in n||Object.defineProperty(n,e,{value:r[e]});return n.toJSON=function(){return{candidate:n.candidate,sdpMid:n.sdpMid,sdpMLineIndex:n.sdpMLineIndex,usernameFragment:n.usernameFragment}},n}return new t(e)},e.RTCIceCandidate.prototype=t.prototype,zW(e,`icecandidate`,t=>(t.candidate&&Object.defineProperty(t,`candidate`,{value:new e.RTCIceCandidate(t.candidate),writable:`false`}),t))}function NG(e){!e.RTCIceCandidate||e.RTCIceCandidate&&`relayProtocol`in e.RTCIceCandidate.prototype||zW(e,`icecandidate`,e=>{if(e.candidate){let t=jG.default.parseCandidate(e.candidate.candidate);t.type===`relay`&&(e.candidate.relayProtocol={0:`tls`,1:`tcp`,2:`udp`}[t.priority>>24])}return e})}function PG(e,t){if(!e.RTCPeerConnection)return;`sctp`in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,`sctp`,{get(){return this._sctp===void 0?null:this._sctp}});let n=function(e){if(!e||!e.sdp)return!1;let t=jG.default.splitSections(e.sdp);return t.shift(),t.some(e=>{let t=jG.default.parseMLine(e);return t&&t.kind===`application`&&t.protocol.indexOf(`SCTP`)!==-1})},r=function(e){let t=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(t===null||t.length<2)return-1;let n=parseInt(t[1],10);return n===n?n:-1},i=function(e){let n=65536;return t.browser===`firefox`&&(n=t.version<57?e===-1?16384:2147483637:t.version<60?t.version===57?65535:65536:2147483637),n},a=function(e,n){let r=65536;t.browser===`firefox`&&t.version===57&&(r=65535);let i=jG.default.matchPrefix(e.sdp,`a=max-message-size:`);return i.length>0?r=parseInt(i[0].substring(19),10):t.browser===`firefox`&&n!==-1&&(r=2147483637),r},o=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,t.browser===`chrome`&&t.version>=76){let{sdpSemantics:e}=this.getConfiguration();e===`plan-b`&&Object.defineProperty(this,`sctp`,{get(){return this._sctp===void 0?null:this._sctp},enumerable:!0,configurable:!0})}if(n(arguments[0])){let e=r(arguments[0]),t=i(e),n=a(arguments[0],e),o;o=t===0&&n===0?1/0:t===0||n===0?Math.max(t,n):Math.min(t,n);let s={};Object.defineProperty(s,`maxMessageSize`,{get(){return o}}),this._sctp=s}return o.apply(this,arguments)}}function FG(e){if(!(e.RTCPeerConnection&&`createDataChannel`in e.RTCPeerConnection.prototype))return;function t(e,t){let n=e.send;e.send=function(){let r=arguments[0],i=r.length||r.size||r.byteLength;if(e.readyState===`open`&&t.sctp&&i>t.sctp.maxMessageSize)throw TypeError(`Message too large (can send a maximum of `+t.sctp.maxMessageSize+` bytes)`);return n.apply(e,arguments)}}let n=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){let e=n.apply(this,arguments);return t(e,this),e},zW(e,`datachannel`,e=>(t(e.channel,e.target),e))}function IG(e){if(!e.RTCPeerConnection||`connectionState`in e.RTCPeerConnection.prototype)return;let t=e.RTCPeerConnection.prototype;Object.defineProperty(t,`connectionState`,{get(){return{completed:`connected`,checking:`connecting`}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(t,`onconnectionstatechange`,{get(){return this._onconnectionstatechange||null},set(e){this._onconnectionstatechange&&(this.removeEventListener(`connectionstatechange`,this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener(`connectionstatechange`,this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),[`setLocalDescription`,`setRemoteDescription`].forEach(e=>{let n=t[e];t[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=e=>{let t=e.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;let n=new Event(`connectionstatechange`,e);t.dispatchEvent(n)}return e},this.addEventListener(`iceconnectionstatechange`,this._connectionstatechangepoly)),n.apply(this,arguments)}})}function LG(e,t){if(!e.RTCPeerConnection||t.browser===`chrome`&&t.version>=71||t.browser===`safari`&&t._safariVersion>=13.1)return;let n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(t){if(t&&t.sdp&&t.sdp.indexOf(`
|
|
289
|
+
a=extmap-allow-mixed`)!==-1){let n=t.sdp.split(`
|
|
290
|
+
`).filter(e=>e.trim()!==`a=extmap-allow-mixed`).join(`
|
|
291
|
+
`);e.RTCSessionDescription&&t instanceof e.RTCSessionDescription?arguments[0]=new e.RTCSessionDescription({type:t.type,sdp:n}):t.sdp=n}return n.apply(this,arguments)}}function RG(e,t){if(!(e.RTCPeerConnection&&e.RTCPeerConnection.prototype))return;let n=e.RTCPeerConnection.prototype.addIceCandidate;!n||n.length===0||(e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?(t.browser===`chrome`&&t.version<78||t.browser===`firefox`&&t.version<68||t.browser===`safari`)&&arguments[0]&&arguments[0].candidate===``?Promise.resolve():n.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())})}function zG(e,t){if(!(e.RTCPeerConnection&&e.RTCPeerConnection.prototype))return;let n=e.RTCPeerConnection.prototype.setLocalDescription;!n||n.length===0||(e.RTCPeerConnection.prototype.setLocalDescription=function(){let e=arguments[0]||{};if(typeof e!=`object`||e.type&&e.sdp)return n.apply(this,arguments);if(e={type:e.type,sdp:e.sdp},!e.type)switch(this.signalingState){case`stable`:case`have-local-offer`:case`have-remote-pranswer`:e.type=`offer`;break;default:e.type=`answer`;break}return e.sdp||e.type!==`offer`&&e.type!==`answer`?n.apply(this,[e]):(e.type===`offer`?this.createOffer:this.createAnswer).apply(this).then(e=>n.apply(this,[e]))})}function BG({window:e}={},t={shimChrome:!0,shimFirefox:!0,shimSafari:!0}){let n=HW,r=WW(e),i={browserDetails:r,commonShim:AG,extractVersion:RW,disableLog:BW,disableWarnings:VW,sdp:jG};switch(r.browser){case`chrome`:if(!ZW||!iG||!t.shimChrome)return n(`Chrome shim is not included in this adapter release.`),i;if(r.version===null)return n(`Chrome shim can not determine version, not shimming.`),i;n(`adapter.js shimming chrome.`),i.browserShim=ZW,RG(e,r),zG(e,r),XW(e,r),QW(e,r),iG(e,r),$W(e,r),rG(e,r),eG(e,r),tG(e,r),aG(e,r),MG(e,r),NG(e,r),IG(e,r),PG(e,r),FG(e,r),LG(e,r);break;case`firefox`:if(!cG||!uG||!t.shimFirefox)return n(`Firefox shim is not included in this adapter release.`),i;n(`adapter.js shimming firefox.`),i.browserShim=cG,RG(e,r),zG(e,r),oG(e,r),uG(e,r),lG(e,r),pG(e,r),dG(e,r),fG(e,r),mG(e,r),hG(e,r),gG(e,r),_G(e,r),vG(e,r),MG(e,r),IG(e,r),PG(e,r),FG(e,r);break;case`safari`:if(!yG||!t.shimSafari)return n(`Safari shim is not included in this adapter release.`),i;n(`adapter.js shimming safari.`),i.browserShim=yG,RG(e,r),zG(e,r),TG(e,r),DG(e,r),SG(e,r),bG(e,r),xG(e,r),EG(e,r),CG(e,r),OG(e,r),MG(e,r),NG(e,r),PG(e,r),FG(e,r),LG(e,r);break;default:n(`Unsupported browser!`);break}return i}BG({window:typeof window>`u`?void 0:window});var VG={finder:!0,torch:!0,tracker:void 0,onOff:!1,zoom:!1},HG={facingMode:`environment`,width:{min:640,ideal:720,max:1920},height:{min:640,ideal:720,max:1080}},UG={width:`100%`,height:`100%`,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,overflow:`hidden`,aspectRatio:`1/1`},WG={width:`100%`,height:`100%`,objectFit:`cover`,overflow:`hidden`},GG=e=>e instanceof Date,KG=e=>e==null,qG=e=>typeof e==`object`,JG=e=>!KG(e)&&!Array.isArray(e)&&qG(e)&&!GG(e),YG=e=>KG(e)||!qG(e);function XG(e,t){if(YG(e)||YG(t))return e===t;if(GG(e)&&GG(t))return e.getTime()===t.getTime();let n=e,r=t,i=Object.keys(n),a=Object.keys(r);if(i.length!==a.length)return!1;for(let e of i){let t=n[e];if(!a.includes(e))return!1;if(e!==`ref`){let n=r[e];if(GG(t)&&GG(n)||JG(t)&&JG(n)||Array.isArray(t)&&Array.isArray(n)?!XG(t,n):t!==n)return!1}}return!0}function ZG(e){let{onClick:t,disabled:n,className:r}=e,i={cursor:n?`default`:`pointer`,stroke:n?`grey`:`yellow`,strokeLineJoin:`round`,strokeLineCap:`round`,strokeWidth:1.5,...e.style};return(0,R.jsxs)(`svg`,{onClick:n?void 0:t,className:r,style:i,width:`28px`,height:`28px`,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,R.jsx)(`title`,{children:`Camera Off`}),(0,R.jsx)(`path`,{d:`M3 3L6.00007 6.00007M21 21L19.8455 19.8221M9.74194 4.06811C9.83646 4.04279 9.93334 4.02428 10.0319 4.01299C10.1453 4 10.2683 4 10.5141 4H13.5327C13.7786 4 13.9015 4 14.015 4.01299C14.6068 4.08078 15.1375 4.40882 15.4628 4.90782C15.5252 5.00345 15.5802 5.11345 15.6901 5.33333C15.7451 5.44329 15.7726 5.49827 15.8037 5.54609C15.9664 5.79559 16.2318 5.95961 16.5277 5.9935C16.5844 6 16.6459 6 16.7688 6H17.8234C18.9435 6 19.5036 6 19.9314 6.21799C20.3077 6.40973 20.6137 6.71569 20.8055 7.09202C21.0234 7.51984 21.0234 8.0799 21.0234 9.2V15.3496M19.8455 19.8221C19.4278 20 18.8702 20 17.8234 20H6.22344C5.10333 20 4.54328 20 4.11546 19.782C3.73913 19.5903 3.43317 19.2843 3.24142 18.908C3.02344 18.4802 3.02344 17.9201 3.02344 16.8V9.2C3.02344 8.0799 3.02344 7.51984 3.24142 7.09202C3.43317 6.71569 3.73913 6.40973 4.11546 6.21799C4.51385 6.015 5.0269 6.00103 6.00007 6.00007M19.8455 19.8221L14.5619 14.5619M14.5619 14.5619C14.0349 15.4243 13.0847 16 12 16C10.3431 16 9 14.6569 9 13C9 11.9153 9.57566 10.9651 10.4381 10.4381M14.5619 14.5619L10.4381 10.4381M10.4381 10.4381L6.00007 6.00007`})]})}function QG(e){let{onClick:t,disabled:n,className:r}=e,i={cursor:n?`default`:`pointer`,stroke:n?`grey`:`yellow`,strokeLineJoin:`round`,strokeLineCap:`round`,strokeWidth:1.5,...e.style};return(0,R.jsxs)(`svg`,{onClick:n?void 0:t,className:r,style:i,width:`28px`,height:`28px`,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,R.jsx)(`title`,{children:`Camera On`}),(0,R.jsx)(`path`,{d:`M12 16C13.6569 16 15 14.6569 15 13C15 11.3431 13.6569 10 12 10C10.3431 10 9 11.3431 9 13C9 14.6569 10.3431 16 12 16Z`}),(0,R.jsx)(`path`,{d:`M3 16.8V9.2C3 8.0799 3 7.51984 3.21799 7.09202C3.40973 6.71569 3.71569 6.40973 4.09202 6.21799C4.51984 6 5.0799 6 6.2 6H7.25464C7.37758 6 7.43905 6 7.49576 5.9935C7.79166 5.95961 8.05705 5.79559 8.21969 5.54609C8.25086 5.49827 8.27836 5.44328 8.33333 5.33333C8.44329 5.11342 8.49827 5.00346 8.56062 4.90782C8.8859 4.40882 9.41668 4.08078 10.0085 4.01299C10.1219 4 10.2448 4 10.4907 4H13.5093C13.7552 4 13.8781 4 13.9915 4.01299C14.5833 4.08078 15.1141 4.40882 15.4394 4.90782C15.5017 5.00345 15.5567 5.11345 15.6667 5.33333C15.7216 5.44329 15.7491 5.49827 15.7803 5.54609C15.943 5.79559 16.2083 5.95961 16.5042 5.9935C16.561 6 16.6224 6 16.7454 6H17.8C18.9201 6 19.4802 6 19.908 6.21799C20.2843 6.40973 20.5903 6.71569 20.782 7.09202C21 7.51984 21 8.0799 21 9.2V16.8C21 17.9201 21 18.4802 20.782 18.908C20.5903 19.2843 20.2843 19.5903 19.908 19.782C19.4802 20 18.9201 20 17.8 20H6.2C5.0799 20 4.51984 20 4.09202 19.782C3.71569 19.5903 3.40973 19.2843 3.21799 18.908C3 18.4802 3 17.9201 3 16.8Z`})]})}function $G(e){let{scanning:t,startScanning:n,stopScanning:r}=e,[i,a]=(0,L.useState)(!1);function o(){a(!0),t?r():n(),setTimeout(()=>a(!1),1e3)}return(0,R.jsx)(`div`,{style:{bottom:85,right:8,position:`absolute`,zIndex:2,cursor:i?`default`:`pointer`},children:(0,R.jsx)(t?ZG:QG,{disabled:i,onClick:o})})}function eK(e){let{onClick:t,className:n,style:r}=e;return(0,R.jsxs)(`svg`,{onClick:t,width:`30px`,height:`30px`,viewBox:`0 0 24 24`,className:n,style:r,xmlns:`http://www.w3.org/2000/svg`,children:[(0,R.jsx)(`title`,{children:`Torch Off`}),(0,R.jsx)(`path`,{strokeWidth:.2,stroke:`yellow`,fill:`yellow`,d:`M14.516 15.158l.714.714-4.595 6.14-.75-.364L12.337 13H6.978L8.22 8.861l.803.803L8.322 12h3.036l1.793 1.792-1.475 5.16zm5.984 4.05L4.793 3.5l.707-.707 3.492 3.492L10.278 2h7.972l-5.025 7h7.149l-3.71 4.957 4.543 4.543zM12.707 10l3.243 3.243L18.376 10zM9.795 7.088l2.079 2.079L16.3 3h-5.278z`})]})}function tK(e){let{onClick:t,className:n,style:r}=e;return(0,R.jsxs)(`svg`,{onClick:t,width:`30px`,height:`30px`,viewBox:`0 0 24 24`,className:n,style:r,xmlns:`http://www.w3.org/2000/svg`,children:[(0,R.jsx)(`title`,{children:`Torch On`}),(0,R.jsx)(`path`,{strokeWidth:.2,stroke:`yellow`,fill:`yellow`,d:`M13.225 9l5.025-7h-7.972l-3.3 11h5.359l-2.452 8.648.75.364L20.374 9zm.438 3H8.322l2.7-9H16.3l-5.025 7h7.101l-6.7 8.953z`})]})}function nK(e){let{status:t,scanning:n,torchToggle:r}=e;function i(e){r(e)}return n&&r?(0,R.jsx)(`div`,{style:{bottom:35,right:8,position:`absolute`,zIndex:2,cursor:`pointer`},children:t?(0,R.jsx)(eK,{onClick:()=>i(!1)}):(0,R.jsx)(tK,{onClick:()=>i(!0)})}):null}function rK(e){let{onClick:t,className:n,disabled:r=!1}=e,i={cursor:r?`default`:`pointer`,stroke:r?`grey`:`yellow`,fill:r?`grey`:`yellow`,...e.style};return(0,R.jsxs)(`svg`,{onClick:r?void 0:t,width:`30px`,height:`30px`,viewBox:`0 0 24 24`,className:n,style:i,xmlns:`http://www.w3.org/2000/svg`,children:[(0,R.jsx)(`title`,{children:`Zoom In`}),(0,R.jsx)(`path`,{strokeWidth:.3,d:`M16.279,17.039c-1.396,1.209 -3.216,1.941 -5.206,1.941c-4.393,0 -7.96,-3.567 -7.96,-7.96c-0,-4.393 3.567,-7.96 7.96,-7.96c4.393,0 7.96,3.567 7.96,7.96c-0,2.044 -0.772,3.909 -2.04,5.319l0.165,0.165c1.194,1.194 2.388,2.388 3.583,3.582c0.455,0.456 -0.252,1.163 -0.707,0.708l-3.755,-3.755Zm1.754,-6.019c-0,-3.841 -3.119,-6.96 -6.96,-6.96c-3.842,0 -6.96,3.119 -6.96,6.96c-0,3.841 3.118,6.96 6.96,6.96c3.841,0 6.96,-3.119 6.96,-6.96Zm-7.46,0.5l-1.5,0c-0.645,0 -0.643,-1 -0,-1l1.5,0l-0,-1.5c-0,-0.645 1,-0.643 1,0l-0,1.5l1.5,0c0.645,0 0.643,1 -0,1l-1.5,0l-0,1.5c-0,0.645 -1,0.643 -1,0l-0,-1.5Z`})]})}function iK(e){let{onClick:t,className:n,disabled:r=!1}=e,i={cursor:r?`default`:`pointer`,stroke:r?`grey`:`yellow`,fill:r?`grey`:`yellow`,...e.style};return(0,R.jsxs)(`svg`,{onClick:r?void 0:t,width:`30px`,height:`30px`,viewBox:`0 0 24 24`,className:n,style:i,xmlns:`http://www.w3.org/2000/svg`,children:[(0,R.jsx)(`title`,{children:`Zoom Out`}),(0,R.jsx)(`path`,{strokeWidth:.3,d:`M16.279,17.039c-1.396,1.209 -3.216,1.941 -5.206,1.941c-4.393,0 -7.96,-3.567 -7.96,-7.96c-0,-4.393 3.567,-7.96 7.96,-7.96c4.393,0 7.96,3.567 7.96,7.96c-0,2.044 -0.772,3.909 -2.04,5.319l0.165,0.165c1.194,1.194 2.388,2.388 3.583,3.582c0.455,0.456 -0.252,1.163 -0.707,0.708l-3.755,-3.755Zm1.754,-6.019c-0,-3.841 -3.119,-6.96 -6.96,-6.96c-3.842,0 -6.96,3.119 -6.96,6.96c-0,3.841 3.118,6.96 6.96,6.96c3.841,0 6.96,-3.119 6.96,-6.96Zm-4.96,-0.5c0.645,0 0.643,1 -0,1l-4,0c-0.645,0 -0.643,-1 -0,-1l4,0Z`})]})}function aK(e){let{scanning:t,capabilities:n,onZoom:r,value:i}=e;if(!t||!r)return null;let a=(n.max-n.min)/3;return(0,R.jsxs)(L.Fragment,{children:[(0,R.jsx)(`div`,{style:{bottom:130,right:8,position:`absolute`,zIndex:2,cursor:`pointer`},children:(0,R.jsx)(iK,{disabled:i<=n.min,onClick:function(){r(Math.max(i-a,n.min))}})}),(0,R.jsx)(`div`,{style:{bottom:180,right:8,position:`absolute`,zIndex:2,cursor:`pointer`},children:(0,R.jsx)(rK,{disabled:i>=n.max,onClick:function(){r(Math.min(i+a,n.max))}})})]})}var oK={fullContainer:{width:`100%`,height:`100%`,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,overflow:`hidden`},innerContainer:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,position:`relative`},overlay:{position:`absolute`,top:0,right:0,bottom:0,left:0,pointerEvents:`none`,display:`flex`,alignItems:`center`,justifyContent:`center`},borderBox:{position:`relative`,width:`70%`,aspectRatio:`1 / 1`,border:`2px dashed rgba(239, 68, 68, 0.4)`,borderRadius:`0.5rem`},cornerTopLeft:{position:`absolute`,width:`15%`,height:`15%`,border:`4px solid #ef4444`,top:0,left:0,borderBottomColor:`transparent`,borderRightColor:`transparent`,borderTopLeftRadius:`0.5rem`},cornerTopRight:{position:`absolute`,width:`15%`,height:`15%`,border:`4px solid #ef4444`,top:0,right:0,borderBottomColor:`transparent`,borderLeftColor:`transparent`,borderTopRightRadius:`0.5rem`},cornerBottomLeft:{position:`absolute`,width:`15%`,height:`15%`,border:`4px solid #ef4444`,bottom:0,left:0,borderTopColor:`transparent`,borderRightColor:`transparent`,borderBottomLeftRadius:`0.5rem`},cornerBottomRight:{position:`absolute`,width:`15%`,height:`15%`,border:`4px solid #ef4444`,bottom:0,right:0,borderTopColor:`transparent`,borderLeftColor:`transparent`,borderBottomRightRadius:`0.5rem`}};function sK(e){let{scanning:t,capabilities:n,onOff:r,torch:i,zoom:a,startScanning:o,stopScanning:s}=e;return(0,R.jsx)(`div`,{style:oK.fullContainer,children:(0,R.jsxs)(`div`,{style:oK.innerContainer,children:[(0,R.jsx)(`div`,{style:oK.overlay,children:(0,R.jsxs)(`div`,{style:oK.borderBox,children:[(0,R.jsx)(`div`,{style:oK.cornerTopLeft}),(0,R.jsx)(`div`,{style:oK.cornerTopRight}),(0,R.jsx)(`div`,{style:oK.cornerBottomLeft}),(0,R.jsx)(`div`,{style:oK.cornerBottomRight})]})}),r&&(0,R.jsx)($G,{scanning:t,startScanning:o,stopScanning:s}),i&&n.torch&&(0,R.jsx)(nK,{scanning:t,status:i.status,torchToggle:i.toggle}),a&&n.zoom&&(0,R.jsx)(aK,{scanning:t,capabilities:n.zoom,value:a.value,onZoom:a.onChange})]})})}function cK(e){if(e===null)throw Error(`Canvas should always be defined when component is mounted.`);let t=e.getContext(`2d`);if(t===null)throw Error(`Canvas 2D context should be non-null`);t.clearRect(0,0,e.width,e.height)}function lK(e){let{onScan:t,constraints:n,formats:r=[`any`],paused:i=!1,components:a,children:o,styles:s,classNames:c,allowMultiple:l,scanDelay:u,onError:d,sound:f}=e,p=(0,L.useRef)(null),m=(0,L.useRef)(null),h=(0,L.useRef)(null),g=(0,L.useMemo)(()=>({...HG,...n}),[n]),_=(0,L.useMemo)(()=>({...VG,...a}),[a]),[v,y]=(0,L.useState)(!1),[b,x]=(0,L.useState)(!0),[S,C]=(0,L.useState)(g),w=function(){let e=(0,L.useRef)(Promise.resolve({type:`stop`,data:{}})),t=(0,L.useRef)(null),n=(0,L.useRef)(null),[r,i]=(0,L.useState)({}),[a,o]=(0,L.useState)({}),s=(0,L.useCallback)(async(e,r)=>{if(!window.isSecureContext)throw Error(`camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP.`);if(navigator?.mediaDevices?.getUserMedia===void 0)throw Error(`this browser has no Stream API support`);let a=await navigator.mediaDevices.getUserMedia({audio:!1,video:r});e.srcObject===void 0?e.mozSrcObject===void 0?window.URL.createObjectURL?e.src=window.URL.createObjectURL(a):window.webkitURL?e.src=window.webkitURL.createObjectURL(a):e.src=a.id:e.mozSrcObject=a:e.srcObject=a,await Promise.race([e.play(),new Promise(e=>setTimeout(e,3e3)).then(()=>{throw Error(`Loading camera stream timed out after 3 seconds.`)})]),await new Promise(e=>setTimeout(e,500));let[s]=a.getVideoTracks();return o(s.getSettings()),i(s?.getCapabilities?.()??{}),t.current=a,n.current=s,{type:`start`,data:{videoEl:e,stream:a,constraints:r}}},[]),c=(0,L.useCallback)(async(e,r)=>{e.src=``,e.srcObject=null,e.load();for(let e of r.getTracks())r.removeTrack(e),e.stop();return t.current=null,n.current=null,o({}),{type:`stop`,data:{}}},[]),l=(0,L.useCallback)(async(t,{constraints:n,restart:r=!1})=>{let i=null;e.current=e.current.then(e=>{if(e.type===`start`){let{data:{videoEl:i,stream:a,constraints:o}}=e;return r||t!==i||n!==o?c(i,a).then(()=>s(t,n)):e}return s(t,n)}).catch(e=>(i=e,{type:`stop`,data:{}}));let a=await e.current;if(i)throw i;if(a.type===`stop`)throw Error(`Something went wrong with the camera task queue (start task).`)},[s,c]),u=(0,L.useCallback)(async()=>{if(e.current=e.current.then(e=>{if(e.type===`stop`)return e;let{data:{videoEl:t,stream:n}}=e;return c(t,n)}),(await e.current).type===`start`)throw Error(`Something went wrong with the camera task queue (stop task).`)},[c]),d=(0,L.useCallback)(async e=>{let t=n.current;if(!t)throw Error(`No active video track found.`);{e.advanced?.[0].zoom&&t.getCapabilities().torch&&await t.applyConstraints({advanced:[{torch:!1}]}),await t.applyConstraints(e);let n=t.getCapabilities(),r=t.getSettings();i(n),o(r)}},[]);return(0,L.useEffect)(()=>()=>{(async()=>{await u()})()},[u]),{capabilities:r,settings:a,startCamera:l,stopCamera:u,updateConstraints:d}}(),T=(0,L.useRef)(w),E=(0,L.useRef)(d),D=(0,L.useRef)(_.tracker);(0,L.useEffect)(()=>{T.current=w},[w]),(0,L.useEffect)(()=>{E.current=d},[d]),(0,L.useEffect)(()=>{D.current=_.tracker},[_.tracker]);let{startScanning:O,stopScanning:k}=function(e){let{videoElementRef:t,onScan:n,onFound:r,retryDelay:i=100,scanDelay:a=0,formats:o=[],allowMultiple:s=!1,sound:c=!0}=e,l=(0,L.useRef)(new FW({formats:o})),u=(0,L.useRef)(null),d=(0,L.useRef)(null);(0,L.useEffect)(()=>{l.current=new FW({formats:o})},[o]),(0,L.useEffect)(()=>{typeof window<`u`&&c&&(u.current=new Audio(typeof c==`string`?c:`data:audio/mp3;base64,//PkZAAhghE0AKToAJra/n0FQygAAAGIkYJgmCYXBMAAGCTJz3zhCEM//z//1hz//8MMMMN08ssV6e5DDWIQreAgCvFKy8bXgIKMkUDDBgzJwIBtkRMQAocxIFdxghQGKDoEziAzQxOBOdH92i/iGi+zDCAEIX46a73HrSybZw1x3JZjXp7dSNy/P68rjcbt7p7fakMP5LVMyzCaj1pjvejYYAIDgDGzECjEAk1Jl3559HIon8hzlfPVTCvGJZzfcKSxXfyMWM88//9VKSxXdtnb9vomOuuRyiWVYbf+X8zp6fKGHIdycuWMMMMMMKSnp+6wsYc/9f/7z7rPPWHN556p6fP8MMMP///PPP/7+GHK9PT6p7f/unldP2np7YeHjweiYA4GLNAgAiI7u57n5//oc5/yfk6znOcPhwOBwggHCMpA4HA4KEyHOc5znO+hPIc5//+fqJh8XQPh90JU5xQinOf//87/zvP+ggAYuhCKHxdA+Hxd0EA4KKHA4ciB3kOXfXB/gmf8p/B96lAMKAgAADU+BujARHgwdisgHMfAUHAiceBg4ASBgZBiBIBH4ZaHOJsLhf8R+HYEciIgYSwj/+Bi7EqBh+AcBn5P6Bh4TuBmrAMBiZH7gaLEWgew//PkZFMlyek60MpYAShzqqZhm6gCUWeEUWAewEWYGN4X4GDEPwGE8S4GDoOIGAYKgIQOkz//gGARAUB+CwGxTwMAACAEgyAwdAlAxKhzAxXiZ///AxcEwAwJjDAziCAAwQgdAwRgdAsJQDAmAcGzYDwAhZIAKAcIQB4GT9TQMJ9/4Gi1Fv/AcAYUqKBAwGgNAwVBAAwGhwAwdBlAxFg1AwlgzAwNBuAkJQDBgEEDEqGECgChFgBgL//CIswYYH//+HKCpk4K0C9AaKKCAOBeMcR4X9C44BwABCgGAsGYCgTwHAcAwXAiAwSAQV///CJP9lwMBQAwAAAWGo5lVLCcaeneVhJAVGai3//ioaUEf//gaTAYGCj8BnEwfrIqDcsIQb/vmhU/8fAs0G8YGGwKST8Igj4GCATipksVzY8p//90FWJwh45AkX//4fCF9wMEgkL3uQc+gbGJ8t4MBAMBP/hEXf9FRuWBcAfIFjYzQdoLCBwh7IWVlxaX/w8oMCP/+EQT5poGB1Ir90DhiV6af/jFYBpT2BgoQyyt2M0ToBdEaZyzt8nTo3xdNDCTSd//o6F06CjooxRr4jVF/0bOKD6OMUNDRxiMUVFR0FFQPhGXRjDpr4MAEA4wIQUhYOIw//PkZE4nrg08sOx4ACQ0CopD2aAAlwTTBxQeMcwd8w8gZTAgABXwGABOkzpI0wAQAExnWfP4x8ZjKunWdZ1o1Qe6lFGKCNULORQCELAAPnRUf/GIx/0FHGfo3SdZ0qP2cukXKLlRtBKFgAQwCkwJgFRYBEEATmDsLSY2QiQYCEnEra+UZo6F1aKMRr6GhoaP/+j//ov+i+hjLqBgMkYoqChoo1GqCjoY06TpRqjjLOYzRRmMuizmgdKhdF8kjTAAAPMCwGswzglgwAJfzqxmioKH/////////////+ijLOAwFmN0f/////////Q///8ZjP/9DGYyFwIDBeB3MA4AlBWidKM5spykAUAQOCakK+udGqN8VDYjTRuN//0bVX//6Kio4xQFv//nf//kKOoAEIB6SY6hcxenp85///4/DEPf/84Xvl4vF4dwtxfEJgCYQHMSgKCROp4+fn////L4tQf0unz89OecLxeL0ul09y6enzp4dIhKAQFA5hKfLu1nU7/Wr71rRKJUBQSUVt////l08GUPVWgAAYAeNKsxbQNAAhQx3/oKGMM6dZ1Yy6sajMbfKio7lNcv0sScZ47lNcw32ekVFMP9fp/f+mklI6at6u/dBMQuW6y+C5BcgwAA//PkZEomGg1HYGe0riWsCqbEwiY0BJFJMxrCcxGgQ2VK8xxCF1wsABgQBBgQBAYAFCkYCgALkK4fJ00E5ctJN1Uxy5au3XoGcM4dSN0EYZwzhW0WCh1PZwzhnFFQxtnbO2d0Kt6CdXbruggkTEX5Rs4TEQUVsdVXaCcuWXIBQUGmwmgoAGcJiM4dSioHQdBnEY+hjcbov//jcb/43G43G/jCRibfxugdBnDqULO2duvQumztncbo4xGKKNxugooxGIxQULoOgFgUMTA/jbrxiMDmETL+eLhcPThzOeeOZfL5fIcBYuXD/OHv8t//LJFxjxQYHHKDGFkZMtlmKM0RgQfbVtxFIHbQBDRuzRguEI1c9XZ/rWmrZfVU3Oc/9utNNygRQkCoHlAYstNN6DJ1IINpoINppv+WG/+g2mmnUmmmpBAoJIJhnwB5xkymn606Df/t000xhU03UXC5Ol8uFyXy+Xy/l8v5w4cLk4XAvwAYUvl/QL5fTdlKZkEEEEGumaKaX00zIOemf6CH///ywI3LKpiQ2Ef4xYWMSDyI0XwzikpL0ajVHZ3j9DGIjeuXcNfjn96/S/TUz/X/vX////5K/r+v7Jn+LlAoGZOIQIwMKBQM/yppKYURmhGZkR2b//PkZE0mHg1HEG8wyiD7mlwAyDU8nJHi5htakZmZGNiRcpkJhBmUmZYQcM1VDEEBggNDV/ASEZRYKFZIhkXKLlKmk7IVTKmZNJ5KhiqVUqpX+k7+qlVKyV/ZIqZDFDWTJlFyi5TJpKhiXKBQyZzIS5JhBoayV/AQWVpGWkcYTV5O/rIVSv8/0nkr+v6/vyR/X9f1/ZN8kf5/n99/n+f5/lTKmf9/mRP8yFUqpWSv4yJUqpX9kj/MmZNJ5K/z/P9J5P/v6yFUz/CEoywgUMqZkz/FssECIsVq0aPRrRRatFFFykQZJ2Ukl///5KjmksOaA7ALROJLDnEsLbq3GTMVrwb/0dGzmM0DlfBlHQOmrdR0MYi92TX6b/cmDHLclyUVYO/4O8sFTKFTKFf8yhUyhUyhXzKlDKlCsr/+ZUoVlSsr/+ZQqZUoZUoceMfcoZUoZUoVlfOPGcmDHKcpynKg9yXJcr3JclyXJclyYO+DXJclyfgxFZVb3KcqD/g2MxzsY72L9LubPR0dCyf5K5NNd+Tv9GXRdV0XJclyfcl/n+k8kf6SX/iVynvXf///4Mg/1OkxguYzmM5jMcLHMxwwGhgNCwXMLAcwMXTLi1MD7w7tmTdBvMmE0xQFzCwHMDAd//PkZGMpigkmAGOUvCfTgcgAuC+ITswMFzC4oMLhYMByn0xvU+p9Tr0xUxf/0xv///1PBYDhgNTFTFTGTGTGTGTGTGTGTGC4GTFMDAcLAdMVMVMULAcMBpgYDhcDGFwsYXFBikLGFwMGA4MBxgcDKfTEMUoAx2BisD+mKp5Tv1OkxkxkxkxkxkxkxkxlO0xVPJi/6nv////U7CwHTFTFTGTGTGTGU+p71PpjJipihYDpipi/6n1Ov//C4GC4GTGTGTGTFU8WBSZdLhWB//yKlotyLZFiLf8tyyRUipFSKkVGRBZQMiWC3yx//wxUGKsSvDFQGHUAL3QMsHDFIYpCYy2Bmagy6BjLgy6Bh3od58DCLAizBgRb+EQiyEQiwGBFuDAi3/////20QqSBJf/qcumv/////wMZdGXAYMu1gYy6MuBEZdBgy4BjLgy6BjLgy6BjLgy6BjLQy6DBlz2cJDLgRGXAMZdGXAYMuhMZcCIy6sJGaoGMuppwNRl3WBjLgy63wiEWAwIt/+EQi0IhFsDCLAi0GBFkGBFgMJCqaqYAgAYIhBBvwf7kwcqRq7V3IctacvlN6NxqgooxRRuNRiijEZjMGRuMvz9FGozQ+1X2qe1T1S//+VhaWAtKwtML//PkZEIkbgcaAHc1xCJrjeAAtfuUAtLAWf///mWePH95ZFgsyssvM88+jzO6K+z7OM48sH+WDiweZx5YOK+zxWLGJWsa6xadAv02fTZLSpsFpvLSga0tMgWgUgWmwgUmyWl8tMgWWmLSoFJsoFlpSwsmyBg4HhEdgwHAYPBwGDgeBg8HwMHg4DB4PBgOAwcOwMHLwDn5lAwcDgiDgYDwMHA/4MB3//+EQeDAdwiDwYLPhEWQYLODBYERZBgt8Ii34GLBaB5pfAZ0FvEAQ/UfwxULlx+IXx+8f5CELH8fxKhAIDFoHBEDRc3////gwHgaRXgMHYMB2EU/gwZ/gYbw3gY3QbgYNgbgYiAbgwN3/+EQbBEG4MBuDAbAwG4RBtAwbg2////+B9B6F//////////hEdD//////////8DRahEQGCInMNg3LBElgNjDciCwG/lgNiwGxWG///mG4bf/+WA3Kw3KyIMNw2Kw3MNg3MNg3MNiIMiQ2OK0xMiA3KyJLAEZgRARmBEDEYFwBBgEgEeomowol5YAJKwCDAIAJ8sAE+gGBgCJYAQUZ/13LubMu5dyiYOAhKwEFGf9AOoz/g4CFAIol/lgAjysAgsAElYBP////lgJksBM//lgRUxF//PkZGApggsIAHt2wiNLoggAqCz8RFSwIqYioipkjEjHCCSN/+WJg5iYOYmPK5krmTmZk5mZ8sTJYmf8yJiNiIisi/ywRmRkZkZGZGRmRERkREZERGRERkREZERGxEf///hETIMEyBiZEyBiZEzwiJgDEwU4DV2gQGFOBgmP8GAiAwRAiBgIgYCIGAi/4MBHAwRgjAwRgjwMEQIgMcgY8DBGCMDBGCMDEyJn///+BiYQIBlObj4eYLIwsjAOBGFkYBoEQ84eULIw88LIA88PKHnw8sPKFkeHlANAiAaFUDAiMYPIHmDzBZBhZB///8GBOA1sH/Awni7AwnhPCITwYE/CKzBgt8Ig8GA4Ig6EQdww4Yb+F1sIgtwYCwGAsAwWAsBgLAYCwDBYCwDBaHUDF+VEDKgC2BgtBaDAWgYLQW////gYLAWQMFgLAMFoLcGAt////4RMABmBSj4NgwMOGHBsHhdcLrwbB4XXC6+F14YcLrww4Ng8MOGHBsHww4Ng8AUC4AoMQMC4fgw3wutV4QIsAgFYIBWCCVgHeVgHeWABCwAIVgH+YBwB5aRAstKgV6Ba1oMg9avtUVN/qdLWciD/cqD3Jg6DFPuTB/////lYAn//mC8C+YLwL5gvgvGC//PkZFEpLgMKYXt2xB5LogAArbdc+C8VgvlYL/mC8C+YLwL5YBfMNgNkwXixDWoHPMc4VUxVA2TBeDZPYXzXl815fK14sLxYXvK1//NeXzXl815fMtdDLSw3UsMtLCstMtLDLSwsFhWWlgt//8sFhW6f/////+WF7zXl8sL5ry+Vrxry+WF/wMLwX4MC+EQv/AwvBfAxsjYAyqpKA0lpLAwvBfBgXv///4RA2DANAYGgNgYGgNgYGwN+EQvf/BgXwYF//8DC+F4Dd6NgGBf4AgFwbB0MMF1wuuDYMBsGwusDYOBsHA2Dvg2DQuuDYOhdcMMF14YYDGYDEGwfhhgbB0MN///4RBaEQWgZByoYRWYMFvwiDsGwaF1gbB34GDwdC64XW/w1aKxDVgatir4YcLrQbBwNg7////////////+ESfgZPyff/////////4MFmBvvMAERZ8CC5adNj02E2S0qbCBSBZaYtN///oFlpU2QMXIFAYuQK9AtAo7IxLTpsIFJs/5aZRxQawaxGfIg9CsrI+PUqkWdOHp7ODsOl6cOHZ4dsulfLI9/8BAAgMBACsBLACVgBjoAWAE5OTM6WDAR0zodMdHCsJLASWAjzCQgsBJhASWAjysI8wkJMICU//PkZFkeqgcaYDd1th6DogAAqCuIxQwtDA5MdMULgyY6YqnXqdep5TpMdMVRNRL/UT9AN6jCiSjKAZRNRhAMomgFQDfCIJwYCQiCAiCMGAkGAgDBJUA3eVAMEgj////8SrDFIYqh5g8kPMHkDzB5OFkYeYPJ+HlDzB5+AYVQDibCyIPLLEZIsjIliWS0WywWyyWuWCyWJaLZbLJYDHgLAItFvy3///4eYPKBlQTh5QYEODBb//hhoNg7/C62DYPFUKwKsVgNWBq8VkVcVkVUVYrH//hGff/8Iz8GT7//////wiX4ML3gwvgwvf4ML3gZeqoHVGyBl4vgZfL2F1oNg4Lrg2DcLrg2DQw0Lrhh8Lr4YcMNBsGhdcGBcMOGGAFGAGMQsF1guuGG4XXV/4uQXOLmF1kL/8lCXkuSk4O8/FzHzuP0hIucf/CIFAMCgFPgYFAKAwCgGBQCgGHYO4GBVM4GgQI4RCMEQKQOtQjUI1CNcI14MqDKwDIAGQDzh5wsjDyw8uHmDzYeUPN+DEYRRhFEIowYgDQgIhWDApgwKAwKQYFAYFQMKkYDOxHAzsRgMKBUGBX/h5v+Hm4ecPNh5A8wBwjhZHhZAHlDzBZAFkAeQPKHnCyILIAsih5QsgDz//PkZLQgIgsMAFp1xCGLogAAA2rkB5w8oeYLIQ8kPMHkCyGHnAMKoGmAgFkUPMHmDYAtfHPHNkr/JYl8c8lCWHPHMkqSo5onMAkBDnfJX//8IgDBgBhEdAaxSQMHUGAEIgAV4risCcipBOMVRVBO////hEvAxsAwvf////8MPDDww4XWC64XXDDww4YcMPC6wYb/wYGgiGwMplMDYhTCIaCIaBga/////8GA+EQdgYPB4MB4GDwdhEH8Ig8Ig8GA6EQcEQf8DBxlBjoAweDuFwgCQXiL//iLiKCKCL4XCiKRFwEgoRT4iqpMQU1FMy4xMDCqqqqqqqr////xuDd8fv/DVwrArEIg6EQdhEHAYPBwMB+ERYBi0WAwWAZ0FoGLYOB+JfgZ0FoGdBaDBYbn+WHm9xW7/Nzzc83PLDzc8reWlA7S0oHamx//6BflpU2C0qbBaf/8yk/ysn+VkMhTKQrKVk8yE8rIVkKyYsAn/5WC+YICmCApWCGTkxtKMcVWlgFMEBTBAX////0C0C0C/////////LTFpvTZLTlpv/0Ci0xaYtOgWmymyWkAxcWmTZTYTY8tMmygUWmLTIFpsFpv9NnywLmLCx2RgWmQKTZ98UjnzZ1/++D4M6/////3//PkZOgjIg8IAFcbxCaTogAAoCuIzfJ8vfJ8Wcs5fBnD5//++L5f////////6nCKv//+o0o0FUYwqDNGCwgUMKC0VVGkVv//4Yf8LrxVCriqDVoasDVuKsNWw1bisBqwVkVkVX//gy/4YYMMGGhhgwwNg4LrhdcLrAYWGAA0zBsH4Ng3C6/////4MAoGBQIDAKBgUCAwCgYEAsDAoEAwKBAYBYMAoGBQIBgUCYGBQIBgUCwiBAYBYMAoRAgRAoGBBMBooCAYFAkIgTEUxFv/EWxFxFhFoi0LhQuFiLCL/EWqTEFNRTMuMTAwqqqq//////8TWJriV/hERAwRgYiEYGIhGBmIRgYiEYMEQMEcDMSiA1GYwMR+UDMTkA7KIgMRGIGGM0SIrRGjRlhEV4jxov8rR/5YRFhEdQSViCsR5iRJWIKxPlgQYgSViSsR5WJMQJLC78IiKERF4REeERGEREERHwMRGOBmIRhERhERAwRAYiEQGIhGBmIRAajkgG5TEEREDBHwYIwYI4REXCIV/4MCmDArgwKAYUO/gYVCkGBUGBTgYUCsGBUIhUDCoUCIVBgVBgVBgUhEKQMKhUDCoUBgVAwoFAYFcGBQDI6oA5+qQiFAMjBUGBXCyEPIFkOH//PkZPMj6gr6AFdVwifkBdwAoC2Ilh5/8PPh5Qsih5IeUA0TAZrE8PP////wMRiIIqID8piAxEIwMxCMDEQjCIj//BiIDRo8Iogii/4MKwYVhEoESkDEiIGJEgYlfBgmDBIMEAYgSBiBIREAwSERH/8I7wPfuCO4I7v/8GBvAw3Bv/////gwN34RBuBg2BuBg2BuBg2BuEQbhEG+EQbAwG4MBtwiDaDAbhEGwMBuDAbAwG4GDYG8DBsDcDBuNwDRWDcIg2AwbA34RBv///CINvCINgMRIN/////wiG4DDeG+TEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq/zB4OLAP8rBxWDisHlYOKxb5WLTFgsMWiw18LDOnjPxZoxadDOgsLAtLAbKymVhsrDZWG/LAb8w2GywGysNlgNFgNGFwuBQuWnTZLToFFpisLJsFp0Cy0voFAQLFZkMCAQwIBCsC/5WBCwBCwBCwBCsCeVgUwIBCwBDEwEMCAQrAhgUClgCFgTlgCGJgJ5gQTGJwKWAKYFApgQTGBQL5kY0HMjQYnAhWJvKwIWAIVgQrApYAhWBPBgECIEBgE/8IgXhECQiBAMCkcDEwEwMCAQGAQIhoIhsGBsIhvgwN//PkZN4irgr2AAOVqiUThegAnCtMgwNwiG/8IhuDA1hENhENgYbKYHb2IBhoNhENAwN////8IhsDKZS////8IhuBhspgc0KQRDWEQ3///CNf4GAIMDAwgAwAAwhAwAwYAIgwiHBgAMAYGAAGHv///CIBqBqESDEIgRYGoGHBiDEIgGoGgMAYgxgwgxCIETwYFYMCoMCuDApBgU8DCoU//gY3G//wYFOBhUKBEKQYFfBgV8IhSEQoBkYK8IhT/wMKhXBgUCIU4RCoRCvgYVCsDCp3A1SqAYFAiFP////gY3G1TEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVgwCAwCBEC///////8IgUIgWEQIBgUCAwTQMCAQDAoEhECAYFIwGaRMBotWAasdwH/KqBmhFgaKI4GRgKVpjCBTCBPMJHNMFMIFKwnlgJ5hUxhUwGWlpAMuMuWLTFpvQKQLQKLTIFJsoFIFFZb/8woQwoT///MIF8rC+WAphAphAppgpYClgsmwBC6bHoFFpUCi0wGXFguWCwFLgUsgX6BZaVNj0Ci03//+EQKEQKEQLCIFAxMBcDAgFAwIBQYBODAKBgUCAYEAuDAKBgUCAYFAgRAngwCgwCwiBIRAmE//PkZN4iogj2AFdVxiUrhewAhOkwQIBgQ0gbOI4GRhOBiYCgYEAv////CIFAyMBQYBf///CIF8IgUDAgFBgEAwIRwMCCcDEwFAwIBf///CIEQGMDGEXCKBpCIDCEQDCAsYInDFQMMAuYSoTQMVfBlf//+DKfBgAiGDAQMIMIgCIQYADAEGAgwP////8ItgNu2/8DAAAiABgHhECBgQGEQARA8GAeEQIMABECEQIMAwYBBgCDAARA4GAAgYACDAARAwiAgwDhED4RABEBCIGBgDoH2dgZwCBgAP//BhX/+DCiTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqF1ww////////hdeGGDDBhwjeF102E2fTYAowMLjE0zTDfyyMYjEDJTwMLSwFi0/gQLoFIFpsegWmyBQsWlQL9ApNgtIWn8tMgX6BaBX+WmQL9Nn02f9NktIgUgWmwWl9Avy06bCBSbJaUtImyWkQKLTIFgYWoFFpAKFwMLzZgwAwvLTIFlpU2fQLQK///4Yf4YaF1sLrg2DAuuDYNDDQw4NgwLrhh4XXC64Ng3C60MNwbB4XWC64YcMODYPCJYDlMQBlwRLg2DOF1v/////PkZM0eKgz0AE+UuCnLFfAAk3Fsg2DAYX/ww//4YaGGDDhdbDDACFwMuXA2DADlygusDYOBsGhhv//wNU/CKQusF1oXX+F1wuuGGC6wXWDDBdbC6wXXhHv//4AHIFgC0BZAA4Ba4FkADwFsC3AtQAOcC0BYAtgAcAA9+BYAsgW4FvgWOABwC1oq+it4RT0VVG0VFGkVywo1/RWU4U59TlFb1GvRX////QK9Nj/9AtNn02fTY9NhNlAr/QK//TYTZLSJsIFemx///oF/5aZNj02U2C0yBaBfoFAS6bKBfoFVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVQiA8GAO/4RAf//////wYA4GAO+EQHAwB4GDoB4GA4HQRB0BhlDIBpEAcBgPDIBgPAeDAHIFAYuLTpspsJsFpi0haRApAtAstIYKClgF/ysF/ysE/ysF//LAJ6plTlYC1ZUypmqtWVK1VqyplSFgBaqqcwAAVIqcrEBAAKmMBERCQhwD5iICIQEyABMAABBVGXF4gIA4DLAAWAEQgLVSsBaq1ZUv+YKClgELAJ////5YBP//LAL5WC+Vgn+WAX/LT+gW//PkZMIhLgrsAFt1yiD7FiB6A9qwmwViybCbCbCBSBabCBSBabPpsegWmwWn9ApApApNgCGBmEwWlLSpsf////hEHgYOB3////4GDkiBxMHhEdgYOB4GDwcBg4HW23gooFYHd/+BnAz8O8Vv//FaBm4rBWh38es2zbAtD1m2PVBqBrBqBrAF7AF3/5el84MkuHTgyy+dL0dRnEajMIyOn8RsZ5HGG/kbIpHIkYUiD0y2WctlZaWSwrKx6FZbxnL54ul04eLhw9Ol84dl86cOHT3Ipb5Z8qKpVx6/j0EkLctVTEFNRTMuMTAwgWQLQAHgLf/////4Fn+EQESEcIgInCIRW9TkrCzH0YIjjWtI+YeCD0woLCBQwsKRWUaRVCBZFZRtRtFRTlTlThRtAr0C0C//02E2fTZQK/0Ck2f9TlFRTlTlFT/9TlFVFRFb/9ThThynIQbWkAREue5S11rKdlkDEVABh61ExYPU+tOD4MQgcn4iwigivxFRFoXDcRQLhoiwioXCeAkFBcNiL8RURQBIKEVEWiLBcKIqIpEXC4QReIoIpCIKAQMxFAFAsIuIr/4YYLr//ww4XWBgwC64XX/hhgw3hhwuv8MNhhguvhdcAUYgaYTAAoWDDg2DQbBg//PkZPYe6gzuADd1uDKsBhBAe89cYYdGjtDT2hDmlD2leaOv9oX0OX/0NNLplNf8ewakNWGrTfTRpphNJtfaeh7T1/tStdtTpqN532lpX/1/kmQ5eaf2hoaV9paGleJAvd0rer2pWu1ar2vk56vVrV5Hj1Nop+/lfv5Zpkem5kX/2vtata2rq783nbvtbW6VjW6a2rq13+rO6VysV58K7tbp0ru6Vrtqa1a67tr6sau1ulYrnfa2v927Vrt21NSuN5X927/D4diAQANh4gEIfxB+IQG/D/4gDw/iGIRD+HRATEFNRTMuMTAwqqqqqqqqqqqqqqqqqiIEK/ititFX///8VcVuK38VsVhXBOQTpq/qm8QCAcBmIxgdfFZCHECpxFBFAuFEUC4cLhsRTEVEUDVoDQD+KrFYirFX+KwKoVgVUVUVeKwGrhWRWBViqFYDV4rMViKyGroauBg/A0YThVgNAEVQqw1fisis4quKxxWYrAatxWIqoqg1dFYxVxWIrAavAaAArIrAqoqhWYrIqvxWMVYrARCADhcKoVYavDVgqhV4qorIrHFWKuKxFViscVUVYasAaAfFY/4YcMNhdfwuuGGC64YfDDA2DwusANygbBwAxhAECwNg8MOF1hD4//PkZOkc4g7yBjd1sDNkDhgqYwtcYoUyiQ0NCkxQ0NCQkSIbGKIyRGEo5mUaNEhGKEHMmaGhI0UokORvMmZmZSZSiMZQkRnKKZkzRoSNCQpQ0NEZoaNFJkhh3KOUJEhIcoSJCQkIzlDlEjMDMyMpQ0JCQzNCRGaNCRISEZoZihoaIwlEHKNGiMzFEjRmSIwlHMyZmcyiGyMxRyhIkIxRSZokSEYGBkiRojAPESNGjQxvKHMmMoSKTJCQkIwlFKLDYWGhoZhYWAAUGBsAwsMDYUAcK4XDPhQVwwLAH/DfgHC6TEFNRaqqBgjwYI//wYI/8GCL///+DBFhERgwRcIiPAzGYgMRKIDcskBgjAxEIwYI4GiRwNEjhFH4MRwYjA0aOEUf8Io/BiLgxGEUYRRQij/BiKDEYMR+DBGBiMRQiIgYIwiIwYIgiIgMRGIDUSjhEReEREBiIRAwR/wYI/8IiP4MEcGCIIiOERH8GCIIiMIiIIiODBHBgjBgjwiIoREcIiOEREDBFCKiAxHJcIiMGCMGCLwYI8IiPhERgwRAwRAYjEUIiIGCP/AxGIgiIsGCL//4REYMEXhERBERhExhExAzyAZiEWDBGERGeKsVsVRVFcVwTnFcVxVgnYqipFUV//PkZPkcfgzeAFaVxDgUBgAgatvIYrgnYqgnQJyK4riqK4rwTsVor4rQAjABAgnQritFSKoqQTsE5C1haxfF7F4XQtULSFqC1i4LwWkXIWkXRdF+LwqAnME4iqCdwToVuK+HAERWAkAlgJB0OB3Doc8OYc8VCsVgIB3DuHAERUAkAkHMOBwOAIisO4dwEAEAEg6AkAl4CeHA4AkKhXioBIOiv8OB3F+LgWkXxeF8XouxcF0XBeF8XBdF8XhdAdouC8AEsXYWsXOKsVBU/FaKmK/FTxXFbFUVPiv/8VfxXitVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVAXX/8MN/wwwYf//DDBh4Yf/+DYODDfCIFAwKBQiaANFgUDAgFAwIBcADwFuBY/At8C1wLfgAdAtwLGBawLcC3AsgWeBYwLX4XW8LrBhgiFgMlhYLrhh4XWhdb8MOGGhdcMP4YaF1gw8LrwuvhhoYYLrYXWDDBdcGwfC60MN/ww8GwZ4XXC64GZQsF1wbBnDD4XXg2DcLrBdaDYPhhgusF1uGGC64YfhhoNg0LrQwwYcMNC62F1/g2DYXW4XXC6+GH8DTIW4YeB/wR/wjwR+DP/y06bJaRAtAtAtAs//PkZNwY2grqBFW1xDhTRegABLBstL6BRaVAstN5aYtN/psIFf5aQtIgWgUWk8tImyWkQL9Avy0qbKbKbJaf02f/0CkCy05adAsC3K7+mx5aVAv0C/TZ8tOmymwB2pspsFpPLSlpy0qbCBSBXlpk2E2E2C0paUtP6Bfpslp0CkCy0ibJaZAosWQLLTJsemwgUmz6BZaYtOgUWmLTpsJsoFJslpPLT+mwmz//6Bfpsf6BSBSbCBXoFeWk9NhNhAr0Cy0/+WnTZ8tJ/oFf6bP+myWn//8tMmz/lpf//////8sPTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVBgJwiCYMBP//gwE//////wiCAMEgkIggIqIDKpUCIIgwE8IzA4j+EYhGAZMIyDJA5gGRhGcIyDIhEQiIGAgwIRDwiAGAAwYMHBghGAZMGRCMhGYRgGRA5gIyDIwZPBk/wZIRmEY/gyOBxIMgIzCMgcTgwRBgjwYJBgngwTwYJhEQBiBGERMIrwOouAxAgGCQYIhERhEQDBGDBAREgwTCIgGCQYJgwSDBHwiI4MEAwSBiRHCIkGCYGJEQiI/Bgn4REYREeBiBIH6XhERhETwogoy04mpZibFmJuWYmx8n//PkZN4ZrgrkAFZUyDcjofgAA9qc0HafZ8HwNrjaG3xtjaDtJwTo+D55Ow7fxNRNSyLPlqJsAr/lmA/FmWYm5acTQVgTkVQTnBOQTgVxVBOBVFWK4J3FUE7gBABOwToVQTsVhUFcVRXBOhUBORWiuKkVYrCqK+KoqgnQrAnEV+K8E7FQE5xWBOQToVQTsVRW8V4qRUFYVgTsVhXioKgrCqKwqAnYqCtBOhUioK+CcisK8VRUFSKnirFQVBVFcE6FcVoJwKoqCrFXFUE7gnAqiuCcQTsE7xU8VP8VYrgnYrCuTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqn3/l/J/8vHL5f/BhwCETgGpIDOATgEIOFoDcHzgEIDgC+pG7eve1S/6tat7rXupDXSStWoIpGS4TSMQNIySMwpIyAaRkkZ8GJGdBtbwYkZ63tCKRkoIpGWDEjLCKRmEkjOvsEUjJOsIpGa6bOrgxIzsEkjIGJGYUkZVKCKRmqoDkgEjMJJGSYMSMAikZJ3qhp0dq9ru3X1I36FujPbXuxwKbr//waABfg0AC6DUDUDXBqBoAmQawJiGrhqDUGoN//PkZL8USgKcAAblrroTgfQAbhtQAag1QawaYNIAuQa12Lv9si7F2NnXa2Vsi7i/DZl2tlL9l+vL8tlUTUTUTUYQDIBlGUAyifqJKJqJ+p5Mf/U7TETEU7CxkxVO1PKdqeU8u4vq2ddnrsbM2Zs/tl9s67V2NlbIu5sgaA1Q14ExAmAaA0BrDVDXhpgTPDQGuBMA0gTKGgCYgTHDQGrDUGgNcNQaw1hoAmcNIaRIAtALVEgC1gteI8FpBaBIAtcRwkAWgFpBaILVBaIkAWgRwjhIiPEeDXwa/4NUGr+DRwaKBgX/8IhP//wiF8GBMGBP/wYEhEKEQmEQuDAoGFTAwLgwLhG/4MvCM8GSDJCNwZQOXg2DwbB8MPDDhhuGGBsHhh8Lrf4MCQYFCIUGJgiE8GBQMIFhELDDhdaGHhdYGwaGGDDhhuDYMBsHg2D8MMGHBsH8GwYDYMhEKEQgMCeDAsIhAiFBgQIhAYFhEKDAkGBMIhYGEC4GFCBELgYUKDAuEQsGBQMKEwiEBgUGBcIhQYFwYFAwgWDAoRC8GBAYE4RCgwKEQvhEJgYUIBhQkIhAiECIUGBIMC4RCgwJCIUGBAiFgaYLwiEA5cGXCNhGBGwZAw4Ng0MPBkqNqcoqorlh//PkZP8cygrkAFI0wjo7lfAAjhq4SnPor//psoFemygWmwWm/0C0Ci05adApNn/TZQLU5RU9FRFVFdTn1OFG1Gywv/UbUa9Ff0VoFgCwBbAtQLUCzAtgAchHAN8ImAbgBvwDd4RwjQDeAN8I0ImEQEQAbwRgiQjBHhHAN0A3vgG6Ab/CIhEgG5AN6EQESAbmEYI4RABvYRoRABuYRgDehEQiAiIRABvcA3QiQDfwjwDfCICPCJCJCJ4RwiYRwjBEwDehEYRgDfCNCOEQEQEcI+BagAd4FrAscCxAswLfwLAFgC1wLNVMQU1FMy4xMDBVVVVVVVVVBlBkwO3wZAZMIz//////+DJwO0IwI0DsA7cGUI34Rn4RgMuEZgywZQjAZP/hGAcmDKEYDIB28GQGQGXhGgcgRoMgRoHYBywZAZYMmBygyQYFCIUDChQYE4MCgaYJ/gwKEQsGBAiEBgXAwgQLrhdcGwcGHBsGA2Dgw4YYGwZC6/hdYMMF14YcLrYYcMPDDhdYGweF1oYb4MCwYEwYEgwJBgTCIQGBIRC/BgQDCBcIhAMKFhEKDAsGBQYFAwgTgwKDAoMCQiEgwIBhAnCIUGBQiFwiEBicIhAiFhEIgIoBooGieDPA+4GeDPCP//PkZOobXgrkAEY0jjazieQgBKKIBGgyBGhGhGgyAdoMmEaDIB2gyhGwZYMsI0GSDIEaDKB2QOWEaDKB2hGgygcoHYBygdkDtgygcngyAyhG4MgMgRgRmDJCNBkA7QjAZIRoRoMuByhGgyAyAyhGwZYHKByAcgMgRoHIEbCNCNA7fCNA7AZAO0GSEYEaDLA7cDthGgyAyAyQjAOwGUIyDKEYEaEYEYEaEbA5AZQZAZAZIMgRkGXBlBkCMgyAyQZYMngcmEb8GUGQIyDIBywZAZOEZhGBGwO2EbwjcI3hGYMqTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqquDqz8GMDQIvBj///+DGDEGAMAifBj8IuEThFCIEQGPCLwiQYBFCKESDCETBhhGAZGEZ4MjgcSEY4GoRQigxCIEQGPCKBiBrgxwiBEwMIRAY4MQNMIkImDEGIRYMIRYRAYhFBjwYwNQYgwBgBh4GAMQiwYgxA0gahFBgBjgYBFhFhFCKEWBgEWEUGEIgMQYQMYRAMQigxhFBh4GkIgRIRYRAY4RIMQYgYhFA18IoMQYQihFhEgwhFCIDEGIRQieBiEUIoRQYhEwYDAFwGrBog0waAaQawacGsGiDQp9MZMVT3piJjJjK//PkZOYZBgjoaUJQ0DprofQgbhq0dep71PqeU69TpMdMVT6n1OlPKdJjpiKdFZkxlPKdJiJj+mKp/0xFPBoAmYaw0BpwJhDSBMQ1BqAmIEzDSGgNXDRDRhp+GsNMNAEyAmYagJkBMA1BpDXAmECZhoDXhqAmYawJjgTICZBrDSGsNAExDVDQGqGgNHDWBMIaQ0BrAmcCYgTHAmIEzDWGgNYaOBMw0BqDSBMYaA04aA1hqwJhw0ATKGqBM8NYEz4aQJkGoNMNIag1+GsCY+BMQJlDVw0cCYfDXw1ho4aQ0gTCTEFNRTMuMTAwqqoD37wjuhHf/////hGf////hHf/gycEZwRn4MnYMncIzsGTwOdOA507A507hGeEZ8GTuDJ4Rn4HPn4Mn4RnhGcDJwM3YM3gzdBm6DNwR3QjvA927Bm//Bm7Bm/Bm8GbgZvBm4GboR3gzeEd+DN8GbvBm6EZ+Bzp4Mn4HOnBGfA588IzsDnTgZPCM8Iz+EZ/CM4DnTgOdPBk8Iz4RJwGTidBi7AycTgiT4RJ8GE6ESdhEngZPJwGTieDCcESfwYToMJ3AycTwiTsDJ5OhEnwibwYb+ETdwibwibvCJuwYb/4RN/Btf/jYGyNv8bHLUtSzE0/LQBW//PkZPQcHgjQAFKVrjfDmgAge1eMLITcshNy1LX8si0LUTQtCyLQTUteWQmvLItSz4mgmnTJops0umEymDSPsnR9HwfB8k7Pvn0fAvwtcLXF/F+L4vQtQWuFoC0BaReF7AeBfwtcXBdF4XheFwXAtAui9C1haRdi6LwvirgnUE6FcVBVisKgrCvioK+KoqiqAhh3AQFXhwVYrFYCWHMOioVAI4dFWHPDgCAdDgdDmHcBIBEO+HRWAiKsBMO4dFQCAdATw6HBWHBWAgHBUHMOf/gICsOCoV4qw7+KxWHA6KhVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVC11Fz1+NP+/Xkqpr9OfuhQ6lZNWf+XsZc/si+KNoOj/Ntai9j7IISgZAklTqQhjToNTeQoreRdaSDODWvYAVFaWWkQmVuZPP8bRUzq896vc+XS6mm5gnnW7JLnV4z9N5XnW4k86x+uyHyxnWkmdborzraff2SvOtvljOtjd/5XRW8MivOsry/K3gUzrFPS1eFTOttTsul1+lLGdbV3c53h51mdbK7xPOr1SpnWlM63kedZnV4XPK86onnW7myrnWTmRTOqascoabXd/L+yuzS95dv1efjhl92ntYyTuIb6wuWRZFmWRa//PkZOcb/gqMACDf1LTLofggA9qc/gKRZiblqWYm3E24moSQnR9BJj6JwfBaFqWZZFoWvLUshNPxNuWn6bTZHgozRTSaNAY5oGjFQVgTkE6FUVorioK8VBXBO8VRUioAhxVioK4qAnIrYrCqKsVRVBORXBORVFcVcVwTgVBUBORUisK4rCoKwrxXFYE4FYVATjFcVhX4rcVBVFQV4rxVFSKwqCpFcV+K8VhXFYV4qivFUE4FaCdivBORUBOfBOgToE6FUVYqisKgqCtxWFbFQVxXisKgqRU4qioKuKwqCvxVBkH/4Mgf4Rg4RgfgxZBizhFYEVuDFvhFbBi3CKyEVsGLf/4MgAxaDFoGsWYMWgaxYBrFngxaDFnCKwIrAYswNas+DFgRWYGtWYMWBFZgxbgaxbgxZCKwGLIRWgxZCK2EVmDFmDFgMW4GtW8IrAYtBi3Bi0GLAYsCK0IrQit4MWeEVgRW+DFsI9cDW9AYtgxZhFaBrVgMWgxaDFvCKwIrIGtWhFaBrFuEVvBi3hFZA1i0IrYMWYMWAxaEVkGLAisCKzBizCK0DWrIRg+EYIRgQjABkHwODABkDhGDwODBgyAEYIRoRvww4YcKILYKILfhRg5htjY4OQbQ2hNAH8su//PkZP8cRgjWAFAUYjwDofQAi9pcJry1E1LUsuWvE2E0LQTcB+E2LMTctQFEEcWnFYVwTkAI4rRWFYE6BOhWwToBBAQgnIrisETANwIiAb/COEQEbgG+EcA38A3wjhGCMEeEaEeKoJwK4J2KoARBVBOIJ1FWKoJ0CcCuCdRWFcV4rioK4rAnYJ2K0V8VYr8E4xWFUVBVFQE6FXBORWFSKorxVFcVwToE5wTvBOoqwToVIJziuKwJxAQgnUVBUgnAqQCaCdxWirFaKwrRWFcE7FfFeK4rgnIrAnYrCoKoqgnAqCrip4qgnCr/////8Iu8BjvP4Ry5/8Izggc4Zw4RnD/hGcP8GThBk4eDJwgycIMnDwjOD4MnBA3eu9hF3kGO8gx3vBjvAN3jvMGO8CLvAY72DHeAbvXe+DHehF3kGO8gbvHeBF3oG713gG713vgx3oMd5BjvAi7wGO9A3eu8BjvMDd470Iu9wN3jvQY7wGO9wN3jvIRd4Bu9d6Bu9d6DHeAbvHewi7yEXecGO9BjvQN3rvIG7zykGO9A3eO9CLvYMd6EXegx3gG7x3kDd470Dd472DHewY7yDHeAKomwmhZFkAof8tCy4m5aCbcTUswFYsy0/LQTX9NBqBgJgYaY//PkZPcaTdCuAFgWlkI0DfQAe9r8Jxz6CShr8++JsArgjxNBNC0LQsyyLMsgRxallyyLIsi0LUTUtS0AVwFPia8si0LMTXiacsxNizLMTYTcsi1LMsy0E2LUsuJqJvxNyy/E1LMteWgm4mpZlkJuWRZFmWnLQTfgncVATkVcVQTsVIqQToVxWFeK4rwTmATCsCcAnQJyKoriqKwrxWiqKoqwToVRWBORWBOBVFSKgq4qAnAqAnArRVgnIJ3FYVQAgCriqK4qYqivBOsVoJwKgJ3FYVBWFfBOIqCoCcivipxUFSCd4qRV4rCvFaCc/BOhW8VxWFUVhX4r1eX/+DHgaYMOEX/CJgwwYQY8GODH/wYf4RAiQiAxCKBj4GAMYRQiwYcGEGMIoMfhECIBgEXAwCJhEA1BjhF+BhCIDEGARYGoRAYgxCLwYeESEUGMDEIoGAMAiAwBiBrCJ8GMGGEWEUGIRYMAYAxCKBiBgBqDDA1wiBEBiDAIsGIMANANMIoMAYhEBh4GMGMGARfAxBj8GAMANYRAYBFAwCIBhgYhEwNQMYGIRAMAiwNYRQi4RQYwYgahEBiBqBgESEUIqa6Z6bTBpGkmUwmkwaZpJlNCkifmkaaaBymgm0wmRPxSDTTa//PkZOYYTgboZUAQIkCEFgAAe898YTZpJtMJhNilphNdMJhMGgmemDSNJNmkaX6aNJN9MJhMc0E2mzSNJMpg0umU2mDS5oJlNJtNJnpg0DSTBoml0wmzTE8TRpGgm00mkzzRNNMJg0jQTSb/NFNdNGl02KTzRTfTPTSbTKZNLphNJpNmgmUymkwaaaTKZ/TSYTBoJr/ifptMpr9MJlNptMpg0kymumEwmf+mEwmOmkymTT5ppv80eaHTCYTHTSaNBNJtN80/0yaBoJo0k2aPTPNA0OaSaTJoplMJv9MgBAB4MBUGwbwVwUBkFAYDAU4NBoMBqhAELk//h/y1/vz6/6zMnEglwqnIsVSHBzAMMIqXiLgxS8ucoLCKl7VwipeupwYpeAxS8Z22hSl4U+qE1L2goKUva1GUJqXqwkpeAxS81IQpS8smBqXql6E1LyEVLxdEJqXoSUvAmpeJhFS8rpH3CKl6EVLxPWFKXgDUvVL1LCal4kuDFL2EVLxFlPClLyEVL2FKXhdwYpeswGpeqXkGKXqLAxS8wYpeqWk8KUvATUvQYpehJS9Bil6yoUpegipeZT2x1vN5NR2X3KrRuXjFmaS0AUCyE1BHflmWZacTYsvy05ZgAIs+WQCqJoWZ//PkZOwZ+gaYBgbm6EQMAfQAe9r8ZCbiaFkWv5ZibialoArlryyDtCSnyfR8hrE7PpNmiaIxDTGKafTJalqJoJoWQm4mnLUtSzE1LUsxNyy4mpZlqJpy14mgD8WpagKvLIEcJuWnLItBNhNhNxNgH8tSyLMTflmA/iaCaFqJqWf4mxZFmCdCvFWKwqivgnQJzFfwToAIwqgnOKgqCoK4J2KwqisKwJwKwqCqKgJwK4rYqirgnIJ2K8VhVwTmKorYrioK4JwKwrRWFQE5FUE6BOwTgV4qYqiuCdAnYqAnMVBVFUVATkVBVirioKoqCviuK8VwTjxWFfivFUVxXBOcVuKvFaKoqiuCdeEW3Bjb/gxvhFvCLYGN8GNwi3CLf8DbtuEW//CM7+DG+EW+DG8DbNgi3CLfA2zYItwY3gbZuDG8GT/Bk+DJ+DJ/hGdCM+EZwMnQZP8GT8GToRngc6dBk4IzwZOBk8GTvhGdBk+DG8Dbt8DbtgY2CLbBjYGNwi2A2zYDbN4RbhFtA2zcDbNwNu3CLaEW4RbeEW2DG8DbNwY3BjYDbNgY3A2zYItwi3CLbgbdvA27YGN/CLaDG4RbgxsDG4Rb8ItsI7oR3cGb00m0wmTT6aTZoJgUpMc0kwaa//PkZNcYqeLUAAAUHjw8DgQAe88cYTXTXNBpXiQdfLVpLJoaCSJs0TQNAbRpJpDWleaGlDmlfQ9fQ7tBZoa0IeOw3Ccq44TcHgrufDVzQNA0Om0wmDTNE0EymkymumU2mU0aSY6ZE8NFMmiaaYNDptMGn+aJpdNptNps0OmU0J50wNtMGmmEz/zQTJpppNplMJlM9M8FAYCoKAAApgqDIMACwAQbBsAMGQAQaCkGg0GgyCkGeCgNABwAAUgrwA+CoAQNAeHCAOAeAyIQHBwgDg4QYDAGgMEEOEAeA0Q4DxAHh0PEMGYMBsFQYDPgoDMGQV4NBqryAZfhGfwjMDl4Rv/wjcGT/4R/CPBH//hH4H3gzv4M7A+/gzoR4GdBnAf+DPBnwj4M7BnwivA1QIpCKcIpgaqDFgaqBogMWBqgGqgxQinA0XBi8IqEUCKBFcD7/CPwj0I+DPA/8GfBnQZ8I+EeCPwZ4R6EfhGcI0GSDIDJCNCMBkgdsIwGQDkBk4HIEZgy4RoHZwZQjcDtCMgcoRgRoRgHKDJBl4RgHIDKDIEYEaEZgyYMoRsIwGQGQIwGUGUI3A5AZMI2EaDLBlwjQZQjAjAZQoqIqqN+pypx/qNIqoqqNKNKcqchwGrCAPqN//PkZOsaCgjiBUZRnkhEBfAgw9tw+iu1RUqp2qNUNalOVG1GkV/U58sLU48sLLCiwFU4hAYA+qQQgasVhVIYQNWKwmAKpvasNoHIDm4OQHIDlGwNgbH4D+JuWQm4mhZFoJsWgm4I4TcbA2xtA5ODnGyNoHJ+NgHKDl/LMBXLUtS04mvLQteAqCaCbFoWQmha8bQ2Acg2ht8bI2RsjaGyNrjYGwNvjbByja/GxFYE4ipBOIrwTiK4J2KuK8BAK4rAnAJwKkE4FYE7FUVgEIqgIRVBO4qRXFQVBVBOMVwCcE5itBOoqAnQqCpBOIrxVBOoJ0KwJxgnQrCuKsVBXioCcCqCdAnYJyKsVYqipBOgjwiAj/8InhH4RMIkIioAC4RiJCMRP////CNk//Blkv4M6F8I9C/8GWT/8I2SwjZOEbJQZZIGWShGyYMsnwj0P///CPQ/hGyQRsn8I2SCNkgOyVkoMsnhGyQMslCNkoMsl4MsnhGyXCNk4MsmEbJ/wZZP8I2SA7JWTgyyQMiKDIieEYiAcRIihGIkIxFwZEUIxEA4iREgcRYihGIoHESIkDiJEUIxFwjEQIxEwZEWDIihGIoRiKEYiHcYJRIr9kzDmO5cIaApXE/NA0TTTKZGym/0//PkZMQWjdCsAwAWCsQ8Cfwoe89cyaXTKZACgKxsmybQFQCyPQPUbRtA9x6QAoegHKmRtClpk0RSkwaCYE/GyaaZ6ZFJTaaTCbTabTBomgmk2mxS0x0waSaTI2gcgOcT0T5MiedM9M9NCfCeGgNhMJlNJoT1MdNJhMjaNPptNGkmhtpnmgmv+KQmRSE0aaY6ZTKZTRoJg0U0aBopg0emU1/xPzTTaa5o80DRTZoJs0TRNEUhMikJs0P0x0wmkwmUymkwaKb5pppNJg0OaInhpGgmeaSbTBp9N/ptNJo0DTNAbOCkGAwGABgA4NgwAAAMAPBgAQKAyDAZgoCkFINAABWAEDAUBTAABgMBTgqACDcGAAQYDAUqLUlVt///+Bj4MIRcGH/hE//hEwY/wi8GPBj8GH8IgRcIv4RYMQi+DAIsIsIn8GHCLCJCJ/BhBgBpgwwifhFhEhF/gwCIDAGIMIMAMQYBFhFBgDH4GAMQiQNAYAwwYBECIAMIAMAAiHBgAMIAiAIg4MABgABhADAhEAGAARCBhCEQhEIMABh6EQAwIMABgCEQwMAQYD4MDCIcGACIQiHwYGDAhEOEQ4MAENB8hJD7PsnXJ0fZ98+D6LItQR3PgnZHmgPYYRopk0xj//PkZMkU/gLsKkITrkL0CfzIetvgJtNdNGkmkwCPLITf8s+WpaFmApAjgFUsyz49jSTCaGMmkyaRZlkJsWpaiagKBZlmWomh8c+CdcnROj4Pk+Akh9E6DsJ0fJ8c+OTs+idk4J2Tg+j7Pr8nB9nwfAa59k7598+D74Sk+eEkFQdDmKsOhwBEVYCeAiAmAiHcBEV4CYCIWmCHF6FqC0haRcF4XYvxfF2LwvC+FqC0xcC0C/FwLSFoF0XBfi7C0xei8LwvcLQLoWoXheC0BaIWoXBdiNiMY6cZ8RkZxnjqOojAz4zx0HUdBGozjoMw6iMjpxdi+L4uC5F/xd/haIui/bZ/+DGBp4RYMQYgw8Ivgw/CJ4RfBh/hECKBgEUGODH8InhFwY4GoMcIgRIMcInCIBrBhCIESESBp+DEGARfhEA1gxBjBj4RAYQYgxgYwiYRcIgMAiAwBjCJgYAawYYRQMQMAYhFgagYhEA0AxA1A1CJBhBgEXwMQNAihFhFAxwYAwgaYMPCJA1hEBiBrwYQiwYwiBFwYhFgxgawihFCLA0gYAwCKESBoBpCJ4MIRcGOEVB9ALR8BJj7/PonB9HyEoJwfZ9E4Dt5OeTnlqJtxNAH7nwfHPonJ8E759E6PoJI//PkZOAWKgjoZUAQYka0Ffgge9VcfZOCdE7J0To+Cc8JWTo+D7J0EqPoO0+T5PsJSfJ9n0TkJUfJOeTknPPo+z6J2Ts+ycE759/k7Pg+z5J2TonBOeTkJUTg+T5DtJ0Tvk5Pjk5DXPg+idH2HYfR9E6PgnR9k5JyfZ9cnR9cNYJSfROidE6Ps+Cdn0fB8E6DtPs+CdHwfH5OAlR8nyfB98+SdE4J0ff5OidH2TknfPkJMfYSg+Cd8+D6PsnP/JwTk++fYSQO0+D5J0fZ8HwTjn2AWDgdAL8ApALQCkO8GACwMgyAVBiAVhzwY4BeDIMgFMOh0ArDgc4BeAV4cgFsOhz/wP225HGw7wCsO4M8AqHP/+DEGQ7/8OgzgFoM4Bf4MhwO4BT4cDmHcGfDnw78GcVhUFTFXFeKoqYJ3isKuKkVgTsVoqCsKwrCoKsVQTqKorYWoXhfxeF/xdi58XOL4WmLnFYVQToE4FXiuK0VwTnFQVRVFcVhU4JzFfDgdhzBnDuHfALgyDAMQZBgGQCgBUAoDAMh3BkAsDMGcGAYgxBn+HAC0ArwCwMAS5adAry0yBSBfoFBVaKqKwVUVrRXUa9FUOEqVUjV3ySPLkvkzlNlNn02E2S06pvVKWACECpW//PkZN8VDgj+zymq5krb1ewAxJvkqe1XysDVFSqlVIo2o0ispyFVoqKNIrKcqNKcKcFhSjaKiKyKhYWiv6nCnCKijajSnPorKNKcKcqcIrqNoqKNqcKNoqKNKNqNKcIqKN//orf6BSbKbKBSBXlp0CvQKTYTZ/0C/LTxFxFoigioigCLC4cRYRWItEXC4cRcI0IoFwwXCiKwjQXC8LhRFcRcRQRSFwoikRcLhxFRFguHiKRF8E7FYVhVBOgCYVRUACKKgqgE0E6ACJFYVoJ0CcgnQrAnMVwTgE6ioKoRwDdhHhG4RARgDcCMEaEYIiAbwRIRuESEcIwRwiYRwjQjBEgWoFuBa4FngWkIQQigwhEwigx/CL/4RfCKEQGP/wYiEUwYHwYGDAwYAGA4RCEQBEGB0rCNcGU4RrBlcIsGGDCESBiEWDCBhCIEWBiDAGHCKEUGEGEGMIgMAiwigxCIDADQGIRfCIEQDXgYYRfBgBoESEXwY/CJCKEQIsGIRODEGIRQYgw8IgRYMMGAGGDEDGDAIoMcDQIkGMGGBrgwCKDAIsIkDUDWDGDDA1hE4RQMQYgwBhhFBhBh4MAMYRMIoRAiAxBjhF4mhZFpxNBNy0LQTUTXhKglR9FqWpaAP5Zi//PkZNYXkgTkGEJwlkXcDfQAe9r8bCa/k5JwTriacsizBHE6CSH1w7efHLPgjuJqWnLITYTX8tRNAH/ialqJuJuWZaFkCO4m5aE7J2TonB8E559nyEnJyfB8FmJrxNxNhNS1E3LT8sxNC0E0LTlqJuWQm3E15ZiaFqWRZiaCagP5aCblkKoqCsCdioKoqwToE6FcVwAhRWBOIrCpFbgnEVRVFUVIJ2K4rAnIqioKgrcV4riuK0E4FcVQTsVxUBOoJ3FUE7itFYE7FYVRXFUVwTkVoqAnYJxBO4rReF4XYWsLWLoui4LwuC9AdsLQL0LQA9C8Lgvi6LguBahfFwXAtIvQQ4vCqKwrxX/8E5xXit4JwKzBnwj+DF+F1guvBiQYkDRIR8I/gz8Gd4R/wYsGLBi8I8DPBneDPBnwZ/8I8DP8I8B/0Gd+DPA+8I/+Ef+DOgzvwj4R/hHoM+Ee4M4D74M+Ef/A/7gfcDPBn4R7BnfCPgz4M7Bngf8DPwjwR6B/3CPwj0Gfgz+EfBnhH8GfwioRQGIBqgRUDVAYoGiBFcIoBqoMWEUA1UDRYRUIqEUA1WBooGiAaqBogRUGJwigM8I/gz+DOCPwj/Bnwj3BnBHgZ4M4I+DOhHhNCz5aiaCb//PkZM0YugrgAAASBEUEBfQAe9rclmWompZ8shNyzLMsy1LMBUAfhNxNicBJCcE5J0JpyyLMTcBVLXloCO5aCagKACiAqflqWYmvE3E3BHlmArFnxNRNC1LUBS5aFoWhZFmWR8k5CTnxz4PonZ8E5Pg+j4LUshNQH4TYtSzLMshNBNhNSyAViyE0FQE4FYVoJ0CcRUgnYqisKoJxFWAhiuKgrCtFUE7FQE5iqKgqRVFWKorwTsVxVFYE7FTFTBOxVgnAqRXBOPisK4BOK0VoriuK0E5BOxUivFcE5FYE5FQVBXFQE6FQVBVFYVxWioCcCoLovi4LoWiL0LSL+LouBaIvBahdi6LoWgEMFoC1hacXxdC14uipiqKn8VPFbiqKsVb//Bm/+EXgx4RdhFb///hE1/8GLP//CKwIrQjoGa/wPewZqEdYM1wZqDNAetgzWEd8GagzYM2DN4M1wjoI7Bm+DNhHcD3rA9awZuEdwZvCOwjsGaA964M1A978I7hHQR0DNge98I6hHYR1wZrBmwPWgPWwZsI7wjqB63COvgzQR3BmwZsGaget8D3rCOgZoGa4R1gzYM0EdwZsI6CO+DN4R1wZsD3oGaBmwjqEdAzXCO/4R0DNAzYR0WgI8TQT//PkZL4XFgTcAE6Tekf8EfQAe9t8YTXiagKwCsJuWXLMTUtC1LMTT8TYTUJP+fAdomomoD8JuWoCgWoI7iaFkJqJqfZ8hrk4CSE5Pk+Cdk5PgnBOT7JwTg+uWZaiaCbcsgFAsy0LPlmJsWYmom5ZFmWpaibiaAjy15ZFkWQm5Zll+JsJqJvy1E0CThJz65OQlJ8H2TknZOT759k6J3z4PgTQTcsy0LITflmWfLUsiyLITYTcTT8syzLQsi0LMEcWZa8tSyE1LTibibFqWYI/8shNCyE1LQsy1LUTUBTLLloWXLUsiyLUtBN+JqJvy1E05Z8TcsxNeWn/LTnxydHwfZ9n1ydk4PsnHJyfR9E4JwTgnB8k4588nB9cnR8c+D7PjxV4q4r8VsVgTgE4/itFShX/xV4rirxVFWKoq4qfxX8E6xVxUBOYrCtwTvwTj/xV8E5/irBOsVuKwqRXFTFQVorCrFf/xWioKwrCtioCcxUFUVAToE4FUVxWFQVhUBO4rgnUVIJyKkVgToE4ipFUVoq4qisKsE64qCoCdxUFUVxXFUE78VxWFQV4qiuKgqiuK4CCK2KoqirBOATsE4FWK4qxVFUVhVFYE4gnIriuCcQTiK4rCoCdCtirBORUiqK2//PkZLAWsgzuADQNNkZj/fjIe9r8K/FXFUVwSE5aiaAKgmhaFpxNQkp8n3z5PsJOGsffLQsyyE1LItS1E1Af+CPLMTUTfibFmJoWQmxanzydHwTsnASknBaCalqWom5ZcsxNyc8nASsnHDt59BrhJgkpOicBKg7D7JyfZ8E5Pk+Cd8EeWXE0LQsiyLQtSyLIsi0LUTYsy0E3LITQshNiyLUsiy4I78shNy0LMVcE6ipgnArRVgncE4wTsVIrCqCcCtBOYrwTgE7iuKwqCoKwrcE7BOQTqKgqiqFpBEC1gPYD3F0X4WoLTF0Xxei6FqC0BaAtQWgXxdwtWFqC0haBW/FQVRUBOBUFcE6ioCcAnEVRX4rYrxWFUVBViuLsXgtAuC6FoBDBaYvi7F8XxexdF8XhcFyI//gx//CJBhgxhEwY/+EXwYgx8ImDH8GPhE8GPhEwigwhFwNQNQNfhE+DGDAGHCIBrhEhEBh4RQMAY/gYBFBhhEAxCIDCEUDEDHBiEUIoRQY+DCBp4McGEIgGgMcGIGMGIGIGgRQYgxCKBiBjBgDGESDADWBgEUDEIuDADWBpBiEUDEDDgYgwBgDEDQDUGIGgRAYQYAxCKBhCKEThEBgBiEUGIRQMQiQiwNAY//PkZKwWNgjoZUAQREakFfQAe9t8YMfwi4GBaFoJsWpaFlyyBHctCzE25ZiaFoAocsy1E24Sk+idk6LMTYTYTQsyyLUtCyLQTUswFYJMGuTg+CdHwErPotAFAsuJtxNCz4m4mvBHiafloWZZ8YppBqzTNI0jTNBMpg0jTTZZFqWfE3Af/xNf+WomhZ8suWZZCb8tC1LQtS14m/LQtBNhNOfR8hKCc8nHJ2EqCUE5CSHxydk6Pg+D7Ps+Sdk6LUTQTcTcTctSz4mwmha8TXlmJvyy5ZiaFl+WpZFoWZa8TQshNCz4mhalmJsWfLQsuWRactBNRNC1E1LLlly0E2PgJWfR8h2H2fJOSdnx+fXPs+T5PgNbnzz6Po+T7JwTk+z4PonROglJ84qCvxXxUirFX4q4qeCd1f8InCI/4R/CP//4RMI/CMEYI4RAR8I8IjCJ4REI/gG8ESEfCOERCP4R/+EaERCPCNCNCI4BvQjYRMHINobIOfjZBzDZG3xtja42gcw2PwcvG2Nng5+NgbY2wcn42htDYGwNrjYGwNsbX42vxscbI2gc3Bzg5Qcg2uNvjaGwNgbI2+Dl4OUbI2Qc42RsjbBy//g5eAboR4RwjQDeCP+EcI8IwBuwjwjBEBEA//PkZKoZMgrqADXt9EV8FfQAe9scG+EThEBGCMESESEbhEQjwjwjwjBHCIwiQDcCNCI/hHE0/LQBSLITf/lqWoSvk7LT8BWLMtRNAk58E7Po+CyLQTcsyyLUsi0Afi1LUTUTUtBNS05aFkWpZHzwkoSgnB9HwfQSsTYsizLQtRNRNgFf/8NcJWEmAWCdn0To+T4CUHyGtxNiyLT/lmJqJqJqWgmpZFqJsWgmwmwmwmv5ZiaibiactBNv/yyLTiaFkWZagKgCmJqWQmgmom3E0LTibAKfE0LLiuKgrYqipBO4JzFUE5BORXBOhVioKwqRWBOYJyKkE6BOIrYqCqCcxVxVFUV8E4FSCdcVgAgCuKkLTBDC6CHi+LwuRfha4uC+FpF8XQtAWgB2wtAWoXBchaBfwtQWnFSCdxVxXFUVhUFYV4rgnOK3wTiKir//1eDCsf//7/+wOYd///ei/f6lmiqGXpyOlCSRm+yP3UtDhFIzqBhwCFHAGFHABYGcAnAAMOAAYcAAw4BYKOAIROANgicAQYcABE4AAzgE4B+1wmcAwYcAK+sDOADgFLCJwAlWBnABwABnABwDWraETgEDOADgDBiRkgoJpGaP+64RSMoRSMGBiRkkwMSMlq7AxIy4//PkZJUYEgieBFw3fkL8FgAied8AROAAicA8DOATgAGHAAROAFwM4BOAGBhwADDgAGHANQUcAgicAYROAfgw4AIkbPNNNpo0TSNBNJgUs0l7lomEwmRSOaRp80zQFK4nvTInnTEGgwGwAwYmOmkyaInppJpMJg0k1+KUaaaTCb42U0mBsGiaSaNNNpo0OaKZNE0jTTSY5oGmaZpJrphM9MGkmDQTCZBzpg0OKR+mBtdMJobfTSbTfG2KSaBpGgaZomiaBomn02mOmkwmjSNPpjmmaKZNA0zSNFNCeClJkT40DTTCY5oJk0kyaJpdMppMdMdN80TR6ZTXTfNJNmimumem+aKZTKaTaaTRops0kwaZppk0+aSa6ZTKYTfTfTPTHTKa5omgmEyaJo9NmkaRp/pnmmaf6aNNMplMplMdMpv8TxMJlNplNJn9MdM1OM6hWa/EjiRiRiO/xIcSP+GgCZQ1+GvDRDV//4aP///4I8EwTwTBLwS/4AHgnBHBHgiwR4JgAgS4IwAYPA8ADg+AAAAFwfB4L4WADC2AGAGFwsFwuD2FgAcAPC+F/B8L4X/B7B4L4WwuD+AGDwXACAAC2D2AEFgfCwAAAAXB8LhcLeDwXCwPYPA+ACACD+AH4XwA//PkZJMVIgb2ejVLxkBMEgTIe898vwv4X/ACB/C4WwtgBg/gA4PA9gBeFhLRTXTRomkmP0yJ6J+mPy0NA0OvibNDQmfzTNNMjaFKNATxMiemiaRoGkmE2mkwmTRTHNBMGiaCZTSZTZomh0PaV9fX2hoX14kzSmOaCY5pJr80U0aPTfNFMps0jSNJMmiaSaTKb6aTKYNLphMpg0eaJoGkJ8aBoppMppMJg00xzTTabNFNJpNJpNpnpg0DT6bTRoppoJMWrSh/690NQ5paV5D2le/LND2hoQxDF/rzR1/r/aWhfaWleQxfXmheaevNDS0tLQ0ryGoch/X15D+vLy+0oc0ry/19DUOXuvIc0oav9oXkNX1/r3X18QCGHQGQHB8PiAPAaHgPDsBgcH+Hqv//+DJ0GNuEW4MbQY2wZO4Rn///4R34R3Qjv//8Gbv//8GbgZuwZvCO4GbsD37+Ed3A586DJ4Rn8DnToRn8GTsGT8GToRn4HOngyf4HOnBGeDJ0IzgjOCM8DnTwjOgydwOdP4RnYMncDbtwY2A27cItgNs3CLeDGwMbwY3CLaEWwRbQi3A27eDG0GN4G2bBFvA2zcItgY3A27YGN4G2bAxtA58/gc6eDJwHOnAyfCM7A588//PkZLMYngTSAFAUhEYcDfggw9V8DnzwOdOBk8IzuEZ4MnAyfgychsy7F3oE13Nl9sy7myrsL6qqOU5anCqkHqNDI3KVUTEU8GNU7U6gxyHKchyVV/Xa2Zspfds3rubK2VsjZmztk9djZi/TZV2NnXYu0vsm0yaBoDZNEbA2k0aKZNjmwbH/Nvm2bRtGyBVArD1G0bQPUevg9h6/+PRzZNkCrzZNgesegesermyPQPXzbHpNvm0PQPUPSbJs82TaHqAtj082h6DaNn8eo2DbHrHpNjj1m1zYHqNo2jYNnmwbPNgek2ja5sj0D1m0bJs80xtJlMdMCeps0U0meaaa6b5p/mmmU3zRTfNFN/pgHPzQNPmkaaaTXTKbTRoJk0zS6b/NBNdNJlNGj02aH6Z4IgAEEYJ4I+CMEQJcEUEXBOpHDX/w1Q0Q1Q1cNWGvw0Q0/hp/AmIaA0cCYhow0w1/w0hoDRhpw1w1BrgTLDXw1BrhrDQGgNQEzAmOGuGiGgNfgTHDQGoCZw1w0BrDWBMIEzDVDTDUGgNfAFwGjBrg1A1YNcGsAXAaQaABcBqg1g1QagaINYaoEyw1Bow1YaA1hoDSBMw1gTICYQJkGrDQGoNGGmGsNcNQawJkGuBM4aIa//PkZKAYngTsATQNQkKMFgDifh7AYagJkGsCZ+GkNWGiGsNAaYaOGgCYgTENQaw0Yaw1Q1Q0/hqw1BkAfmkaCb6ZTCY6bNBNLwmqGA5fzSTCb/lgwXOmMmMmTQ5pmkmUwmkymfzRTaZFJ6aNM002NrppMpg0kwKQmE2m0yKUaKaE95o9MJj9N9NJk0UymOaSaE/TabNNNmmmk2mU2aHTKZTCaNDjaTJoGimkyNvpk0TRTHTf6bTRopg001+mU0aXNBMjYNA0k2mjR5pfps0U100mUz0ym02mDRTHTaaTRpplMc0kz0ySA000mDSTKbNI002mzQTHTaYTf//NA0zQTBodNJk0UyKSaaZNJMprmkaP5oGmKUmEymUyaCbTHNBMJlN80DRNBMmkm/00mUwaZpprplNpvmiaJo80+aSa//TaY/6ZaH//wY4ReEX4RIMfwiAxBh/BhCJ/+ESDDwYcIn+EQIoMAiQYAw8IsGIGGETBj4MP4MQiAxhEAwAxAxBjBiEUIgMIMcDCDAGIMcGMDEGGBgEUDTwNfAx4MAiwiQYgwBgEUIgMIRAiQYhFwYAwBhA1CKDEIoGoGgMQi4MeDADGEQIkIgGMDCDAIoMAiQiAYwYYMQNQigwCJBiDEGAR//PkZJwV+gzoZUAQRkZsCfQAe9tcQYgx8GEGIMQiwMAY4MANAMcIoMSyE1E1/LMTUtCz5OD5PkJJz5Pk+uA/FqWRaib8TUTUTQtC05alqWYm4momgI8TYsxNCzE3LUtQFEsgFM+z6J0fB8nz+TsNcnB9BK+Tk+g7CdhJT6LTiaFqWYI7lqWoCvy05ZlnxNy0/LUshNBNvwR4moCj+Wv5ZlkJqWpalkCOE1E1LQsiyLITUBULLlqWZZlmJsWhZcsi1/4CiWpalkJqJuWvLXlkJsJpyy4mwm5ZlmJuWXLUTQteWgmgmwCsJoWfE3LMsiyLP8TTlkJuAolqJryzE1LTibCbloJuWhZFoWYmxZ8TcXIvxeC0i+FrF0B2i4L8LSL4uBaIDyCHF8XRfF6FqgiwtIuYWoXIrYqAncVvxVip8VIqCvUxPqtFbFf/4q/8V/8V/iririr8VATjxXipxWgnYq+KwqfFTFQVoq+KsVBW8VhUisKuK0VRXivFYE4FTBOhVFcVRV4riuCdCuCdCtwTiCcCqCcgnYqxWFcVIJwKsVxWisK8VxVgnArYqRWFeK0V4qgnQrgnYrfBOoqAnAq4J0CciqKviuK3BOoJyKsE4FUVoqisK2KwrAnArgBAFSK4//PkZJ0VagjyJgGtbkOkFfwAbh4AqRViuK4J0KgrCrFUVxVjOEeDQgjlcT4T40xtjaNI0uaI2QciGNJIl4kJZtCGIaSckIm6GL3TQ2zRTY2UwmjSNE0fxS02aY2BsJs0/+mzSE8TQpHTKZTaaG0aQpApZp/mmm+aHTfTCZGwNgUk0E0aRp/ilJlNJgT5MmkJ9zQNA0TQTH6ZG2mk0mk0mk3zQTKY/G3zQTHTabTBpGgmU0aKaTJpJpNJtMphNjYTfNE0emkymE2mEyaCbNBNfmkaJpdNJnpg0k0mDTTCbTaZTBp80k2aCbTfNE00yaCb6bTZoplMmmaKZTKaTJpmiaHTXNJNdMDbTab6Y6Z6ZNNMJhMJhN9NJrmim02m0ymU300aPTSa6Y//5pJpNdN/9NppxWxU4Jx/xWxU/xU4qcV/ipiuKwqxWFbioK/8VIqivFTwTkVgTkVor4JxFXxX8VcVxUFQE4FaCcwTvBOIqwToVuKwqCtFUVYqxXxWFeK0E7FQVYrwTnwTsV4rCqCcfFaCcRVFQE5gnAr4JyK4r4Jz4J0Koqip4rCvisKoJ3xWBOME7iuKgriuKgrAnAqgnArxXiqCcgnYJzFQVQTmAEIVYrwToAIYrwTiKkVQTkE5//PkZK4XGgzsADQNAkIcCfwAe898FXFTFYVxXxUFQVkzzS5oilg5TTTY2kyaJpJtNGgJ8aKaTQ2k2aCaNI0eaSYNJM/tKHEiQxfJG09MmgaSYTRppg0TRNNMJlMptMCfppNprmiaA2jQNLmmaRppk0jRFLNP9NJhMGmaQpZpJhNCkGkmE0J+mxSk0m0x02mjRTKbTCZ42EwaQpJpptNprmgaRpmim00J4mzSNM0kymkyKWmE0muaKYGwNjmgafTPNE0U0mUwJ7+mem01+J8mhSk2mjRTSb6aTCbNBM9MpjpjppMpk0E2mE2mE2mjSTfTaZ6YNFMcT1MpnprptNmim0wmE100aSaTRo9MGjzTTHTaaTfTSaNLpoFMAAFYNBQGwAvwAYM4NgqqkjaAN3d3d3etERNK5CZ/3Ctf8AaiAc/u7vaIn/+8XPv//+GDKv8W1/+AC8K4Yw+94xe940jgceOBwOcRaxGwH4EuNIjBfxazB8HhkwVjIAII/vDkjG/wAcJPeF5e98hNgSYLWMFvhZ73pX06aoehpmh01hMJtM9K3TKY9E10x+memvlIpZM9MUTCbShbUrtM+n5ophNZuXK+0wmemumMCemkmvc0Uwm/lJJlLe5oJZI0SyW6R0mE//PkZLcXlgrzECFvrEmMEfgAfh7k2aORpbTYUo9SBNsekGYNVKgqg6hrUXK4Q42DOwPWbILEzBSumEgkWJPU8S72G5wUuGDwguEKa1Q0UykS3Bn7FJNgg5qoEgpsGabBtGabZt7NrKCNgLYes1idmabBtm2bZsBRm0PQbF9mwPSPUBbMwzB6QojYM42ePTzbMwzR6TaNs1eBVNv81yDUJ2QYhJtD0m0PVe+x6T2M8HsbFwsh6B6D7HpugT2uZhO6HqZhmE7ISZhhkFNcghtmybBnnsD1Ho49ZtG2bZs5PVBc2EEepCaEHNjj1EJHq5smabZtmwbNEEPR+bJse9z2PY2T1SN0rdNJq6yXI06COvNJj9MGmkkGmUj7pI0TToNGlEsNEnCW10ymi5FtNFKpvps0kz0uW3aaTF00mTSzdNJu0KFYz1KjaGAhyoQCFGM//zFARgIUZ/oZpdCttay6M5drW1joSj6Ekk1b7J7R7aoQNlPrWBKLTTzOsGT5yYxLrtHTy2iUxEkES0HIBVD066VjGj31odPkkSjJtbWs6OIjKmlXHR9K5MTv5pdZolE10kk2lly74TFx5KTXeTGLrS6ExiucvJSSDUdXZm3NLn1rtYBCUEoRj77WOhCPc+g5//PkZJ8XPgzoAABMTrz8BfQyY9ONGxJULutaa1TE5LHxWEo+XecmMa3p0kqBCR6qOFaFUGpNJIIjqVi0ylBqJIkiSJIkmJj605EkSRJPetWAyVacmodBUVhGfrAZPF0AUrgRLNiqDU4VHo8h6HRObJJNdqlRBMFT0qdNE0WZhmay2tCuOY6oieWieianCnVSbzjd7SGhrLi6eUSeLcZTWqdML5PM50uOGJms9VqtYU6hrgrm4V0frUzTvYsiegR2FOkqUxSKdVCpmRCSkIAUZ4VPhqEKgFDU2VhUiIhUaIg0RAkTBYEjYBUbBMuCJgLAkCUBUinABgBE3/9EQqFRM0s0qzktk9ZFqqFC6RULE11JVDkd8Y1vVFOx9oUIpZ8Vnq5klkxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq`))},[c]);let f=(0,L.useCallback)(e=>async o=>{if(t.current!==null&&t.current.readyState>1){let{lastScan:p,contentBefore:m,lastScanHadContent:h}=e;if(o-p<i)d.current=window.requestAnimationFrame(f(e));else{let i=await l.current.detect(t.current),p=i.some(e=>!m.includes(e.rawValue)),g=i.length>0,_=e.lastOnScan;(p||s&&g&&o-_>=a)&&(c&&u.current&&u.current.paused&&u.current.play().catch(e=>console.error(`Error playing the sound`,e)),_=o,n(i)),g&&r(i),!g&&h&&r(i);let v={lastScan:o,lastOnScan:_,lastScanHadContent:g,contentBefore:p?i.map(e=>e.rawValue):m};d.current=window.requestAnimationFrame(f(v))}}},[n,r,i,s,a,c]);return{startScanning:(0,L.useCallback)(()=>{let e=performance.now(),t={lastScan:e,lastOnScan:e,contentBefore:[],lastScanHadContent:!1};d.current=window.requestAnimationFrame(f(t))},[f]),stopScanning:(0,L.useCallback)(()=>{d.current!==null&&(window.cancelAnimationFrame(d.current),d.current=null)},[])}}({videoElementRef:p,onScan:t,onFound:(0,L.useCallback)(e=>{(function(e,t,n,r){let i=n;if(i==null)throw Error(`onFound handler should only be called when component is mounted. Thus tracking canvas is always defined.`);let a=t;if(a==null)throw Error(`onFound handler should only be called when component is mounted. Thus video element is always defined.`);if(e.length===0||r===void 0)cK(i);else{let t=a.offsetWidth,n=a.offsetHeight,o=a.videoWidth,s=a.videoHeight,c=Math.max(t/o,n/s),l=o*c,u=s*c,d=l/o,f=u/s,p=(t-l)/2,m=(n-u)/2,h=({x:e,y:t})=>({x:Math.floor(e*d),y:Math.floor(t*f)}),g=({x:e,y:t})=>({x:Math.floor(e+p),y:Math.floor(t+m)}),_=e.map(e=>{let{boundingBox:t,cornerPoints:n}=e,{x:r,y:i}=g(h({x:t.x,y:t.y})),{x:a,y:o}=h({x:t.width,y:t.height});return{...e,cornerPoints:n.map(e=>g(h(e))),boundingBox:DOMRectReadOnly.fromRect({x:r,y:i,width:a,height:o})}});i.width=a.offsetWidth,i.height=a.offsetHeight;let v=i.getContext(`2d`);if(v===null)throw Error(`onFound handler should only be called when component is mounted. Thus tracking canvas 2D context is always defined.`);r(_,v)}})(e,p.current,h.current,D.current)},[]),formats:r,retryDelay:_.tracker===void 0?500:10,scanDelay:u,allowMultiple:l,sound:f});(0,L.useEffect)(()=>(y(!0),()=>{y(!1)}),[]),(0,L.useEffect)(()=>{if(!XG(g,S)){let e=g;n?.deviceId&&delete e.facingMode,C(e)}},[n,g,S]);let ee=(0,L.useMemo)(()=>({constraints:S,shouldStream:v&&!i}),[S,v,i]),A=(0,L.useCallback)(async()=>{let e=p.current;if(e==null)throw Error(`Video should be defined when component is mounted.`);let t=m.current;if(t==null)throw Error(`Canvas should be defined when component is mounted.`);let n=t.getContext(`2d`);if(n==null)throw Error(`Canvas should be defined when component is mounted.`);if(ee.shouldStream){await T.current.stopCamera(),x(!1);try{await T.current.startCamera(e,ee),e?x(!0):await T.current.stopCamera()}catch(e){E.current?.(e),console.error(`error`,e)}}else t.width=e.videoWidth,t.height=e.videoHeight,n.drawImage(e,0,0,e.videoWidth,e.videoHeight),await T.current.stopCamera(),x(!1)},[ee]);(0,L.useEffect)(()=>{(async()=>{await A()})()},[A]);let j=(0,L.useMemo)(()=>ee.shouldStream&&b,[ee.shouldStream,b]);return(0,L.useEffect)(()=>{if(j){if(m.current===void 0)throw Error(`shouldScan effect should only be triggered when component is mounted. Thus pause frame canvas is defined`);if(cK(m.current),h.current===void 0)throw Error(`shouldScan effect should only be triggered when component is mounted. Thus tracking canvas is defined`);if(cK(h.current),p.current==null)throw Error(`shouldScan effect should only be triggered when component is mounted. Thus video element is defined`);O()}return()=>{k()}},[j,O,k]),(0,R.jsxs)(`div`,{style:{...UG,...s?.container},className:c?.container,children:[(0,R.jsx)(`video`,{ref:p,style:{...WG,...s?.video,visibility:i?`hidden`:`visible`},className:c?.video,autoPlay:!0,muted:!0,playsInline:!0}),(0,R.jsx)(`canvas`,{ref:m,style:{display:i?`block`:`none`,position:`absolute`,width:`100%`,height:`100%`}}),(0,R.jsx)(`canvas`,{ref:h,style:{position:`absolute`,width:`100%`,height:`100%`}}),(0,R.jsxs)(`div`,{style:{position:`absolute`,width:`100%`,height:`100%`},children:[_.finder&&(0,R.jsx)(sK,{scanning:b,capabilities:w.capabilities,onOff:_.onOff,zoom:_.zoom&&w.settings.zoom?{value:w.settings.zoom,onChange:async e=>{let t={...S,advanced:[{zoom:e}]};await w.updateConstraints(t)}}:void 0,torch:_.torch?{status:w.settings.torch??!1,toggle:async e=>{let t={...S,advanced:[{torch:e}]};await w.updateConstraints(t)}}:void 0,startScanning:async()=>await A(),stopScanning:async()=>{await w.stopCamera(),cK(h.current),x(!1)}}),o]})]})}var uK=(0,L.memo)(function(){let e=WE(II);return(0,L.useEffect)(()=>{let t,n=!1,r=``,i=null;function a(){r=``,n=!1}function o(){r=``,n=!0,t=window.setTimeout(a,3*1e3)}function s(){t&&=(clearTimeout(t),void 0),n=!1,e({type:`Barcode`,barcode:r,toQueue:null})}function c(e){e.key===`!`?i=Date.now():e.code===`F1`&&!n||e.key===`*`&&!n&&i!==null&&Date.now()-i<1e3?(o(),e.stopPropagation(),e.preventDefault()):n&&e.code===`Enter`?(s(),e.stopPropagation(),e.preventDefault()):n&&e.key&&e.key.length===1&&/[a-zA-Z0-9-|_,;]/.test(e.key)&&(r+=e.key,e.stopPropagation(),e.preventDefault())}return document.addEventListener(`keydown`,c,{capture:!0}),()=>document.removeEventListener(`keydown`,c)},[e]),null}),dK=(0,L.memo)(function(){let[e,t]=(0,L.useState)(!1),n=WE(II),[r,i]=(0,L.useState)(``);if(window.location.protocol!==`https:`)return null;function a(e){e.length>0&&e[0].rawValue!==null&&e[0].rawValue!==``&&(n({type:`Barcode`,barcode:e[0].rawValue,toQueue:null}),t(!1),i(``))}function o(){r!==``&&n({type:`Barcode`,barcode:r,toQueue:null}),t(!1),i(``)}return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(lh,{open:e,onClose:()=>t(!1),children:[(0,R.jsx)(fh,{children:`Scan a QR Code`}),(0,R.jsxs)(dh,{children:[(0,R.jsx)(G,{width:`15em`,height:`15em`,children:e?(0,R.jsx)(lK,{onScan:a}):void 0}),(0,R.jsx)(G,{marginTop:`1em`,children:(0,R.jsx)(Bb,{label:`Manual Entry`,value:r,variant:`outlined`,fullWidth:!0,onKeyDown:e=>{e.key===`Enter`&&o()},onChange:e=>i(e.target.value)})})]}),(0,R.jsxs)(uh,{children:[r===``?void 0:(0,R.jsx)(K,{onClick:o,children:`Submit`}),(0,R.jsx)(K,{onClick:()=>t(!1),children:`Cancel`})]})]}),(0,R.jsx)(q,{title:`Scan QR Code`,children:(0,R.jsx)(zl,{onClick:()=>t(!0),size:`large`,children:(0,R.jsx)(cx,{})})})]})}),fK=Z(null),pK=(0,L.memo)(function(){let[e,t]=GE(fK),[n,r]=(0,L.useState)(``),i=WE(II);function a(n){e!==null&&n.length>0&&n[0].rawValue!==null&&n[0].rawValue!==``&&(i({type:`Barcode`,barcode:n[0].rawValue,toQueue:e}),t(null),r(``))}function o(){n!==``&&e!==null&&i({type:`Barcode`,barcode:n,toQueue:e}),t(null),r(``)}return(0,R.jsxs)(lh,{open:e!==null,onClose:()=>t(null),maxWidth:`md`,children:[(0,R.jsxs)(fh,{children:[`Scan a Barcode To Add To `,e]}),(0,R.jsxs)(dh,{children:[window.location.protocol===`https:`?(0,R.jsx)(G,{width:`15em`,height:`15em`,children:e===null?void 0:(0,R.jsx)(lK,{onScan:a})}):void 0,(0,R.jsx)(G,{marginTop:`1em`,children:(0,R.jsx)(Bb,{label:`Manual Entry`,value:n,variant:`outlined`,fullWidth:!0,onKeyDown:e=>{e.key===`Enter`&&o()},onChange:e=>r(e.target.value)})})]}),(0,R.jsxs)(uh,{children:[n===``?void 0:(0,R.jsx)(K,{onClick:o,children:`Submit`}),(0,R.jsx)(K,{onClick:()=>t(null),children:`Cancel`})]})]})});function mK(e,t,n,r){let i=X.of(t).flatMap(([e,t])=>X.ofObject(t.unloaded_processes??{}).map(([n,r])=>({matId:e,proc:parseInt(n),uniq:t.jobUnique}))).toLookupMap(e=>e.uniq,e=>e.proc,()=>1,(e,t)=>e+t),a=new Map;if(r)for(let[e,t]of X.ofObject(r.jobs)){let n=X.of(t.procsAndPaths[0]?.paths??[]).collect(e=>e.casting===``?null:e.casting).head();a.set(e,{partName:t.partName,comment:t.comment,routeStartTime:t.routeStartUTC,historicJob:null,inProcJob:t,casting:n??``,scheduledQty:t.cycles??0,decrementedQty:X.of(t.decrements||[]).sumBy(e=>e.quantity),completedQty:X.of(t.completed?.[t.completed?.length-1]??[]).sumBy(e=>e),inProcessQty:0,remainingQty:t.remainingToStart??0,darkRow:!1})}for(let[t,r]of n){let n=a.get(t);if(n)n.historicJob=r;else if(!e||r.routeStartUTC>=e.start&&r.routeStartUTC<=e.end){let e=X.of(r.procsAndPaths[0]?.paths??[]).collect(e=>e.casting===``?null:e.casting).head();a.set(t,{partName:r.partName,comment:r.comment,routeStartTime:r.routeStartUTC,historicJob:r,inProcJob:null,casting:e??``,scheduledQty:r.cycles??0,decrementedQty:X.of(r.decrements||[]).sumBy(e=>e.quantity),completedQty:i.get(t)?.get(r.procsAndPaths.length)??0,inProcessQty:0,darkRow:!1,remainingQty:0})}}if(r){for(let e of r.material)if(e.jobUnique){let t=a.get(e.jobUnique);t&&(t.inProcessQty+=1)}}let o=Array.from(a.values()).sort((e,t)=>{let n=t.routeStartTime.getTime()-e.routeStartTime.getTime();return n==0?e.partName.localeCompare(t.partName):n}),s=null,c=!0;for(let e of o)s!=(e.historicJob?.scheduleId??e.inProcJob?.scheduleId??null)&&(c=!c,s=e.historicJob?.scheduleId??e.inProcJob?.scheduleId??null),e.darkRow=c;return o}function hK(e,t){let n=`<table>
|
|
292
|
+
<thead><tr>`;n+=`<th>Date</th>`,n+=`<th>Part</th>`,t&&(n+=`<th>Material</th>`),n+=`<th>Note</th>`,n+=`<th>Scheduled</th>`,n+=`<th>Removed</th>`,n+=`<th>Completed</th>`,n+=`<th>In Process</th>`,n+=`</tr></thead>
|
|
293
|
+
<tbody>
|
|
294
|
+
`;for(let r of e)n+=`<tr><td>`+r.routeStartTime.toString()+`</td>`,n+=`<td>`+r.partName+`</td>`,t&&(n+=`<td>`+(r.casting??r.partName)+`</td>`),n+=`<td>`+(r.comment??``)+`</td>`,n+=`<td>`+r.scheduledQty.toFixed(0)+`</td>`,n+=`<td>`+r.decrementedQty.toFixed(0)+`</td>`,n+=`<td>`+r.completedQty.toFixed(0)+`</td>`,n+=`<td>`+r.inProcessQty.toFixed(0)+`</td>`,n+=`</tr>
|
|
295
|
+
`;return n+=`</tbody>
|
|
296
|
+
</table>`,n}function gK(e,t){(0,Mk.default)(hK(e,t))}var _K=jO(`fmsinsight.hide-nonloading-loadstation`,!1);function vK(e){return`${e.palletNums&&e.palletNums.length>1?`Pallets `+e.palletNums.map(e=>e.toString()).join(`,`):e.palletNums&&e.palletNums.length==1?`Pallet `+e.palletNums[0].toString():`Pallet`}; ${e.stops.map(e=>e.stationGroup+`#`+(e.stationNums??[]).join(`,`)).join(`->`)}`}function yK(e,t,n){let r=X.ofObject(e.jobs).filter(([,e])=>e.procsAndPaths[0].paths.some(e=>e.casting===n)).toHashSet(([,e])=>e.partName),i=e.workorders?.find(e=>e.workorderId===t&&(e.part===n||r.has(e.part)));return i?`Started: ${i.material?.length??0}; Planned: ${i.plannedQuantity}`:null}function bK(e,t,n){let r=t?.workorder;return X.of(t?.possibleCastingsByQueue?.[n]??[]).map(t=>({casting:t,message:r?yK(e,r,t):null})).toSortedArray(e=>e.casting)}function xK(e,t,n,r){return X.of(n?.possibleJobsByQueue?.[r]??[]).groupBy(e=>e.jobUnique).collect(([n,r])=>{let i=e.jobs[n]??t.get(n);return{jobUnique:n,job:i??null,workorder:X.of(r).collect(e=>e.workorder).head()??null,machinedProcs:r.map(e=>({lastProc:e.lastCompletedProcess,details:i?.procsAndPaths[e.lastCompletedProcess].paths.map(vK).join(` | `)??``}))}}).toSortedArray(e=>e.job?.partName??e.jobUnique)}function SK(e){let t=Q(JE),n=Q(GO),r=Q(RI),i=Q(FL);return(0,L.useMemo)(()=>r===null||e===null?{castings:[],jobs:[]}:{castings:i.has(e)?bK(n,r,e):[],jobs:xK(n,t,r,e)},[n,t,e,r,i])}function CK(e,t){return t.jobUnique===e&&t.location.type===GS.InQueue&&t.action.type!==qS.Loading&&t.process===0}function wK(e,t){return t.partName===e&&t.location.type===GS.InQueue&&t.action.type!==qS.Loading&&t.process===0&&!t.jobUnique}function TK(e,t,n){return X.ofObject(e).filter(([,e])=>e.remainingToStart===void 0||e.remainingToStart>0).collect(([,e])=>{let r=(e.procsAndPaths?.[0]?.paths??[]).filter(e=>e.inputQueue===n);if(r.length===0)return null;let i=X.of(r).collect(e=>e.casting&&e.casting!==``?e.casting:void 0).head()??e.partName;return{job:e,startingTime:X.of(r).map(e=>e.simulatedStartingUTC).minBy(e=>e),rawMatName:i,remainingToStart:e.remainingToStart??0,assignedRaw:X.of(t).filter(t=>CK(e.unique,t)).length(),availableUnassigned:X.of(t).filter(e=>wK(i,e)).length()}}).toSortedArray(e=>{let t=X.of(e.job.precedence?.[0]??[]).minBy(e=>e);return!t||t<0?2**53-1:t})}function EK(e,t){return(e.location.queuePosition??1e10)-(t.location.queuePosition??1e10)}function DK(e,t,n,r){let i=[],a=[...e];a.sort((e,t)=>e.localeCompare(t));for(let e of a)if(n.has(e)){let n=[],r=new Map;for(let i of t.material)if(i.location.type===GS.InQueue&&i.location.currentQueue===e)if(i.serial&&i.serial!==``||i.action.type!==qS.Waiting)n.push(i);else{let e=r.get(i.partName);e||(e=new Map,r.set(i.partName,e));let t=i.jobUnique||null,n=e.get(t);n?n.push(i):e.set(t,[i])}let a=[];for(let[e,t]of r)for(let[n,r]of t)a.push({partOrCasting:e,assignedJobUnique:n,material:r});a.sort((e,t)=>{let n=e.partOrCasting.localeCompare(t.partOrCasting);return n===0?(e.assignedJobUnique||``).localeCompare(t.assignedJobUnique||``):n}),i.push({label:e,free:!1,rawMaterialQueue:!0,inProcQueue:!1,material:n.sort(EK),groupedRawMat:a})}else i.push({label:e,free:!1,rawMaterialQueue:!1,inProcQueue:r.has(e),material:t.material.filter(t=>t.location.type===GS.InQueue&&t.location.currentQueue===e).sort(EK)});return i}async function OK(e){let t=[];for(let n of X.of(e).chunk(15))t.push(...await TC.logForMaterials(n.map(e=>e.materialID)));t.sort((e,t)=>e.endUTC.getTime()-t.endUTC.getTime());let n=[];for(let e=0;e<t.length;e++){let r=t[e];if(r.type===Y.AddToQueue||r.type===Y.RemoveFromQueue){let i=[...r.material];for(;e+1<t.length&&t[e+1].type===r.type&&lw(t[e+1].endUTC,r.endUTC)<10;)i.push(...t[e+1].material),e+=1;i.length===r.material.length?n.push(r):n.push({...r,material:i})}else n.push(t[e])}return n}function kK(e){return e.toLocaleString(void 0,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`})}function AK(e){let t=e.job.completed?.[e.procIdx]?.[e.pathIdx];return t===void 0?null:(0,R.jsxs)(`div`,{children:[`Completed: `,t]})}function jK(e){return(0,R.jsx)(`div`,{children:(0,R.jsxs)(`dl`,{children:[(0,R.jsx)(`dt`,{children:`Job ID`}),(0,R.jsx)(`dd`,{children:e.job.unique}),(0,R.jsx)(`dt`,{children:`Time`}),(0,R.jsxs)(`dd`,{children:[kK(e.job.routeStartUTC),` to `,kK(e.job.routeEndUTC)]}),e.job.cycles?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`dt`,{children:`Quantity`}),(0,R.jsx)(`dd`,{children:e.job.cycles})]}):void 0,e.job.comment!==void 0&&e.job.comment!==``?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`dt`,{children:`Comment`}),(0,R.jsx)(`dd`,{children:e.job.comment})]}):void 0,e.job.assignedWorkorders&&e.job.assignedWorkorders.length>0?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`dt`,{children:`Workorders`}),(0,R.jsx)(`dd`,{children:e.job.assignedWorkorders.join(`, `)})]}):void 0,e.job.procsAndPaths.map((t,n)=>(0,R.jsx)(L.Fragment,{children:t.paths.map((r,i)=>(0,R.jsxs)(L.Fragment,{children:[(0,R.jsxs)(`dt`,{children:[`Process `,n+1,t.paths.length>1?`, Path `+(i+1).toString():void 0]}),(0,R.jsxs)(`dd`,{children:[(0,R.jsx)(AK,{job:e.job,procIdx:n,pathIdx:i}),(0,R.jsxs)(`div`,{children:[`Estimated Start: `,kK(r.simulatedStartingUTC)]}),(0,R.jsxs)(`div`,{children:[`Pallets: `,(r.palletNums??[]).map(e=>e.toString()).join(`,`)]}),r.fixture?(0,R.jsxs)(`div`,{children:[`Fixture: `,r.fixture,` `,r.face===void 0?void 0:`, Face: `+r.face.toString()]}):void 0,r.inputQueue?(0,R.jsxs)(`div`,{children:[`Input Queue: `,r.inputQueue]}):void 0,r.casting?(0,R.jsxs)(`div`,{children:[`Raw Material: `,r.casting]}):void 0,(0,R.jsxs)(`div`,{children:[`Load Stations: `,r.load.join(`,`),` |`,` `,ik(r.expectedLoadTime).toFixed(1),` mins`,r.partsPerPallet>1?` per piece`:``]}),r.stops.map((e,t)=>(0,R.jsx)(L.Fragment,{children:(0,R.jsxs)(`div`,{children:[e.stationGroup,`: `,(e.stationNums??[]).join(`,`),` | Program: `,e.program,e.programRevision?` rev`+e.programRevision.toString():void 0,` |`,` `,(ik(e.expectedCycleTime)/r.partsPerPallet).toFixed(1),` mins`,r.partsPerPallet>1?` per piece`:``]})},t)),(0,R.jsxs)(`div`,{children:[`Unload Stations: `,r.unload.join(`,`),` |`,` `,ik(r.expectedUnloadTime).toFixed(1),` mins`,r.partsPerPallet>1?` per piece`:``]}),r.outputQueue?(0,R.jsxs)(`div`,{children:[`Output Queue: `,r.outputQueue]}):void 0,r.inspections&&r.inspections.length>0?(0,R.jsxs)(`div`,{children:[`Inspections: `,r.inspections.map(e=>e.inspectionType).join(`,`)]}):void 0]})]},i))},n))]})})}function MK(e){return e.inProcMat!==null&&e.inProcMat.location.type===GS.OnPallet?(0,R.jsxs)(`span`,{children:[`On pallet `,e.inProcMat.location.palletNum??``]}):e.inProcMat!==null&&e.inProcMat.location.type===GS.InQueue?(0,R.jsxs)(`span`,{children:[`In queue `,e.inProcMat.location.currentQueue??``]}):e.matSummary?.completed_last_proc_machining?(0,R.jsx)(`span`,{children:`Completed`}):e.matSummary!==null&&e.matSummary.startedProcess1===!1?(0,R.jsx)(`span`,{children:`Not yet started`}):(0,R.jsx)(`span`,{})}function NK(e){let t=Q(GO).material,n=WE(II),r=X.of(e.matIdsForJob.get(e.unique)??GT.empty()).collect(t=>e.matsFromEvents.get(t)).toRArray();if(r===null||r.length===0)return(0,R.jsx)(`div`,{});let i=X.of(t).toHashMap(e=>[e.materialID,e],(e,t)=>e),a=X.of(r).some(e=>e.workorderId!==void 0&&e.workorderId!==``&&e.workorderId!==e.serial);return(0,R.jsx)(`div`,{children:(0,R.jsxs)(Ty,{size:`small`,style:{width:e.fullWidth?`100%`:`auto`},children:[(0,R.jsx)(Jy,{children:(0,R.jsxs)(ob,{children:[a?(0,R.jsx)(J,{children:`Workorder`}):void 0,(0,R.jsx)(J,{children:`Serial`}),(0,R.jsx)(J,{children:`Status`}),(0,R.jsx)(J,{padding:`checkbox`})]})}),(0,R.jsx)(My,{children:r.map(t=>(0,R.jsxs)(ob,{children:[a?(0,R.jsx)(J,{children:t.workorderId??``}):void 0,(0,R.jsx)(J,{children:t.serial??``}),(0,R.jsx)(J,{children:(0,R.jsx)(MK,{matSummary:e.matsFromEvents.get(t.materialID)??null,inProcMat:i.get(t.materialID)??null})}),(0,R.jsx)(J,{padding:`checkbox`,children:(0,R.jsx)(zl,{onClick:()=>n({type:`MatSummary`,summary:t}),size:`large`,children:(0,R.jsx)(Hx,{fontSize:`inherit`})})})]},t.materialID))})]})})}function PK(e){let t=Q(vR),n=Q(e.checkAnalysisMonth&&t.type===`SpecificMonth`?jL:kL);return(0,R.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-evenly`},children:e.job===null?void 0:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(jK,{job:e.job}),(0,R.jsx)(NK,{unique:e.job.unique,fullWidth:!1,matsFromEvents:n.matsById,matIdsForJob:n.matIdsForJob})]})})}var FK=(0,L.memo)(function(e){let[t,n]=(0,L.useState)(void 0),[r]=iL(),i=WE(QO),a=Q(UO);return(0,R.jsx)(NV,{sensors:jz(Az(IB),Az(jB,{coordinateGetter:EH})),collisionDetection:Bz,onDragStart:({active:e})=>n(e.data.current.mat),onDragCancel:()=>n(void 0),onDragEnd:({active:t,over:o})=>{if(o&&t.id!==o.id){let n=t.id,s=e.matIds.indexOf(o.id);r({materialId:t.id,queue:e.queueName,queuePosition:s,operator:a}),i({queue:e.queueName,matId:n,newIdx:s})}n(void 0)},children:(0,R.jsxs)(mH,{items:e.matIds,strategy:e.direction===`vertical`?uH:cH,children:[e.children,(0,R.jsx)($V,{children:t===void 0?void 0:e.renderDragOverlay(t)})]})})}),IK=`printWindow`;function LK(e){let t=document.createElement(`iframe`);return t.width=`${document.documentElement.clientWidth}px`,t.height=`${document.documentElement.clientHeight}px`,t.style.position=`absolute`,t.style.top=`-${document.documentElement.clientHeight+100}px`,t.style.left=`-${document.documentElement.clientWidth+100}px`,t.id=IK,t.srcdoc=`<!DOCTYPE html>`,e&&(e.allow&&(t.allow=e.allow),e.referrerPolicy!==void 0&&(t.referrerPolicy=e.referrerPolicy),e.sandbox!==void 0&&(t.sandbox=e.sandbox)),t}function RK({level:e=`error`,messages:t,suppressErrors:n=!1}){n||(e===`error`?console.error(t):e===`warning`?console.warn(t):console.debug(t))}function zK(e,t){if(t||!e){let e=document.getElementById(IK);e&&document.body.removeChild(e)}}function BK(e){return e instanceof Error?e:Error(`Unknown Error`)}function VK(e,t){let{documentTitle:n,onAfterPrint:r,onPrintError:i,preserveAfterPrint:a,print:o,suppressErrors:s}=t;setTimeout(()=>{if(e.contentWindow){let t=function(){r?.(),zK(a)};if(e.contentWindow.focus(),o)o(e).then(t).catch(e=>{i?i(`print`,BK(e)):RK({messages:["An error was thrown by the specified `print` function"],suppressErrors:s})});else{if(e.contentWindow.print){let t=e.contentDocument?.title??``,r=e.ownerDocument.title,i=typeof n==`function`?n():n;i&&(e.ownerDocument.title=i,e.contentDocument&&(e.contentDocument.title=i)),e.contentWindow.print(),i&&(e.ownerDocument.title=r,e.contentDocument&&(e.contentDocument.title=t))}else RK({messages:["Printing for this browser is not currently possible: the browser does not have a `print` method available for iframes."],suppressErrors:s});HK()?setTimeout(t,500):t()}}else RK({messages:["Printing failed because the `contentWindow` of the print iframe did not load. This is possibly an error with `react-to-print`. Please file an issue: https://github.com/MatthewHerbst/react-to-print/issues/"],suppressErrors:s})},500)}function HK(){return[/Android/i,/webOS/i,/iPhone/i,/iPad/i,/iPod/i,/BlackBerry/i,/Windows Phone/i].some(e=>(navigator.userAgent??navigator.vendor??(`opera`in window&&window.opera)).match(e))}function UK(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,null),r=n.nextNode();for(;r;)t.push(r),r=n.nextNode();return t}function WK(e,t,n){let r=UK(e),i=UK(t);if(r.length!==i.length){RK({messages:["When cloning shadow root content, source and target elements have different size. `onBeforePrint` likely resolved too early.",e,t],suppressErrors:n});return}for(let e=0;e<r.length;e++){let t=r[e],a=i[e],o=t.shadowRoot;if(o!==null){let e=a.attachShadow({mode:o.mode});e.innerHTML=o.innerHTML,WK(o,e,n)}}}var GK=`
|
|
297
|
+
@page {
|
|
298
|
+
/* Remove browser default header (title) and footer (url) */
|
|
299
|
+
margin: 0;
|
|
300
|
+
}
|
|
301
|
+
@media print {
|
|
302
|
+
body {
|
|
303
|
+
/* Tell browsers to print background colors */
|
|
304
|
+
color-adjust: exact; /* Firefox. This is an older version of "print-color-adjust" */
|
|
305
|
+
print-color-adjust: exact; /* Firefox/Safari */
|
|
306
|
+
-webkit-print-color-adjust: exact; /* Chrome/Safari/Edge/Opera */
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
`;function KK(e,t,n){let{contentNode:r,clonedContentNode:i,clonedImgNodes:a,clonedVideoNodes:o,numResourcesToLoad:s,originalCanvasNodes:c}=t,{bodyClass:l,fonts:u,ignoreGlobalStyles:d,pageStyle:f,nonce:p,suppressErrors:m,copyShadowRoots:h}=n,g=[],_=[];function v(t,r){if(g.includes(t)){RK({level:`debug`,messages:[`Tried to mark a resource that has already been handled`,t],suppressErrors:m});return}r?(RK({messages:[`"react-to-print" was unable to load a resource but will continue attempting to print the page`,...r],suppressErrors:m}),_.push(t)):g.push(t),g.length+_.length===s&&VK(e,n)}e.onload=null;let y=e.contentDocument??e.contentWindow?.document;if(y){let t=y.body.appendChild(i);h&&WK(r,t,!!m),u&&(e.contentDocument?.fonts&&e.contentWindow?.FontFace?u.forEach(t=>{let n=new FontFace(t.family,t.source,{weight:t.weight,style:t.style});e.contentDocument.fonts.add(n),n.loaded.then(()=>{v(n)}).catch(e=>{v(n,[`Failed loading the font:`,n,`Load error:`,BK(e)])})}):(u.forEach(e=>{v(e)}),RK({messages:[`"react-to-print" is not able to load custom fonts because the browser does not support the FontFace API but will continue attempting to print the page`],suppressErrors:m})));let n=f??GK,s=y.createElement(`style`);p&&(s.setAttribute(`nonce`,p),y.head.setAttribute(`nonce`,p)),s.appendChild(y.createTextNode(n)),y.head.appendChild(s),l&&y.body.classList.add(...l.split(` `));let g=y.querySelectorAll(`canvas`);for(let e=0;e<c.length;++e){let t=c[e],n=g[e];if(n===void 0){RK({messages:["A canvas element could not be copied for printing, has it loaded? `onBeforePrint` likely resolved too early.",t],suppressErrors:m});continue}let r=n.getContext(`2d`);r&&r.drawImage(t,0,0)}for(let e=0;e<a.length;e++){let t=a[e],n=t.getAttribute(`src`);if(!n)v(t,[`Found an <img> tag with an empty "src" attribute. This prevents pre-loading it.`,t]);else{let e=new Image;e.onload=()=>{v(t)},e.onerror=(e,n,r,i,a)=>{v(t,[`Error loading <img>`,t,`Error`,a])},e.src=n}}for(let e=0;e<o.length;e++){let t=o[e];t.preload=`auto`;let n=t.getAttribute(`poster`);if(n){let e=new Image;e.onload=()=>{v(t)},e.onerror=(e,r,i,a,o)=>{v(t,[`Error loading video poster`,n,`for video`,t,`Error:`,o])},e.src=n}else t.readyState>=2?v(t):t.src?(t.onloadeddata=()=>{v(t)},t.onerror=(e,n,r,i,a)=>{v(t,[`Error loading video`,t,`Error`,a])},t.onstalled=()=>{v(t,[`Loading video stalled, skipping`,t])}):v(t,["Error loading video, `src` is empty",t])}let _=`select`,b=r.querySelectorAll(_),x=y.querySelectorAll(_);for(let e=0;e<b.length;e++)x[e].value=b[e].value;if(!d){let e=document.querySelectorAll(`style, link[rel~='stylesheet'], link[as='style']`);for(let t=0,n=e.length;t<n;++t){let n=e[t];if(n.tagName.toLowerCase()===`style`){let e=y.createElement(n.tagName),r=n.sheet;if(r){let i=``;try{let e=r.cssRules.length;for(let t=0;t<e;++t)typeof r.cssRules[t].cssText==`string`&&(i+=`${r.cssRules[t].cssText}\r
|
|
310
|
+
`)}catch(e){RK({messages:["A stylesheet could not be accessed. This is likely due to the stylesheet having cross-origin imports, and many browsers block script access to cross-origin stylesheets. See https://github.com/MatthewHerbst/react-to-print/issues/429 for details. You may be able to load the sheet by both marking the stylesheet with the cross `crossorigin` attribute, and setting the `Access-Control-Allow-Origin` header on the server serving the stylesheet. Alternatively, host the stylesheet on your domain to avoid this issue entirely.",n,`Original error: ${BK(e).message}`],level:`warning`})}e.setAttribute(`id`,`react-to-print-${t}`),p&&e.setAttribute(`nonce`,p),e.appendChild(y.createTextNode(i)),y.head.appendChild(e)}}else if(n.getAttribute(`href`))if(n.hasAttribute(`disabled`))RK({messages:["`react-to-print` encountered a <link> tag with a `disabled` attribute and will ignore it. Note that the `disabled` attribute is deprecated, and some browsers ignore it. You should stop using it. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-disabled. The <link> is:",n],level:`warning`}),v(n);else{let e=y.createElement(n.tagName);for(let t=0,r=n.attributes.length;t<r;++t){let r=n.attributes[t];r&&e.setAttribute(r.nodeName,r.nodeValue??``)}e.onload=()=>{v(e)},e.onerror=(t,n,r,i,a)=>{v(e,[`Failed to load`,e,`Error:`,a])},p&&e.setAttribute(`nonce`,p),y.head.appendChild(e)}else RK({messages:["`react-to-print` encountered a <link> tag with an empty `href` attribute. In addition to being invalid HTML, this can cause problems in many browsers, and so the <link> was not loaded. The <link> is:",n],level:`warning`}),v(n)}}}s===0&&VK(e,n)}function qK(e,t,n){e.onload=()=>{KK(e,t,n)},document.body.appendChild(e)}function JK({contentRef:e,optionalContent:t,suppressErrors:n}){if(t&&typeof t==`function`)return e&&RK({level:`warning`,messages:['"react-to-print" received a `contentRef` option and an optional-content param passed to its callback. The `contentRef` option will be ignored.']}),t();if(e)return e.current;RK({messages:['"react-to-print" did not receive a `contentRef` option or a optional-content param pass to its callback.'],suppressErrors:n})}function YK(e,t){let{contentRef:n,fonts:r,ignoreGlobalStyles:i,suppressErrors:a}=t,o=JK({contentRef:n,optionalContent:e,suppressErrors:a});if(!o)return;let s=o.cloneNode(!0),c=document.querySelectorAll(`link[rel~='stylesheet'], link[as='style']`),l=s.querySelectorAll(`img`),u=s.querySelectorAll(`video`),d=r?r.length:0;return{contentNode:o,clonedContentNode:s,clonedImgNodes:l,clonedVideoNodes:u,numResourcesToLoad:(i?0:c.length)+l.length+u.length+d,originalCanvasNodes:o.querySelectorAll(`canvas`)}}function XK({bodyClass:e,contentRef:t,copyShadowRoots:n,documentTitle:r,fonts:i,ignoreGlobalStyles:a,nonce:o,onAfterPrint:s,onBeforePrint:c,onPrintError:l,pageStyle:u,preserveAfterPrint:d,print:f,printIframeProps:p,suppressErrors:m}){return(0,L.useCallback)(h=>{zK(d,!0);function g(){let c={bodyClass:e,contentRef:t,copyShadowRoots:n,documentTitle:r,fonts:i,ignoreGlobalStyles:a,nonce:o,onAfterPrint:s,onPrintError:l,pageStyle:u,preserveAfterPrint:d,print:f,suppressErrors:m},g=LK(p),_=YK(h,c);if(!_){RK({messages:[`There is nothing to print`],suppressErrors:m});return}qK(g,_,c)}c?c().then(()=>{g()}).catch(e=>{l?.(`onBeforePrint`,BK(e))}):g()},[e,t,n,r,i,a,o,s,c,l,u,d,p,f,m])}var ZK=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});function t(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}e.default=function e(n,r){t(this,e),this.data=n,this.text=r.text||n,this.options=r}})),QK=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.CODE39=void 0;var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=r(ZK());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(e){o(n,e);function n(e,t){return i(this,n),e=e.toUpperCase(),t.mod43&&(e+=f(m(e))),a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return t(n,[{key:`encode`,value:function(){for(var e=u(`*`),t=0;t<this.data.length;t++)e+=u(this.data[t])+`0`;return e+=u(`*`),{data:e,text:this.text}}},{key:`valid`,value:function(){return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)!==-1}}]),n}(n.default),c=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%*`.split(``),l=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770];function u(e){return d(p(e))}function d(e){return l[e].toString(2)}function f(e){return c[e]}function p(e){return c.indexOf(e)}function m(e){for(var t=0,n=0;n<e.length;n++)t+=p(e[n]);return t%=43,t}e.CODE39=s})),$K=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t;function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var r=e.SET_A=0,i=e.SET_B=1,a=e.SET_C=2;e.SHIFT=98;var o=e.START_A=103,s=e.START_B=104,c=e.START_C=105;e.MODULO=103,e.STOP=106,e.FNC1=207,e.SET_BY_CODE=(t={},n(t,o,r),n(t,s,i),n(t,c,a),t),e.SWAP={101:r,100:i,99:a},e.A_START_CHAR=`Ð`,e.B_START_CHAR=`Ñ`,e.C_START_CHAR=`Ò`,e.A_CHARS=`[\0-_È-Ï]`,e.B_CHARS=`[ -È-Ï]`,e.C_CHARS=`(Ï*[0-9]{2}Ï*)`,e.BARS=[11011001100,11001101100,11001100110,10010011e3,10010001100,10001001100,10011001e3,10011000100,10001100100,11001001e3,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011e3,11011000110,11000110110,10100011e3,10001011e3,10001000110,10110001e3,10001101e3,10001100010,11010001e3,11000101e3,11000100010,10110111e3,10110001110,10001101110,10111011e3,10111000110,10001110110,11101110110,11010001110,11000101110,11011101e3,11011100010,11011101110,11101011e3,11101000110,11100010110,11101101e3,11101100010,11100011010,11101111010,11001000010,11110001010,1010011e4,10100001100,1001011e4,10010000110,10000101100,10000100110,1011001e4,10110000100,1001101e4,10011000010,10000110100,10000110010,11000010010,1100101e4,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111e3,10100011110,10001011110,10111101e3,10111100010,11110101e3,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,1101001e4,11010011100,1100011101011]})),eq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=i(ZK()),r=$K();function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function o(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function s(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){s(n,e);function n(e,t){a(this,n);var r=o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e.substring(1),t));return r.bytes=e.split(``).map(function(e){return e.charCodeAt(0)}),r}return t(n,[{key:`valid`,value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:`encode`,value:function(){var e=this.bytes,t=e.shift()-105,i=r.SET_BY_CODE[t];if(i===void 0)throw RangeError(`The encoding does not start with a start character.`);this.shouldEncodeAsEan128()===!0&&e.unshift(r.FNC1);var a=n.next(e,1,i);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,``):this.text,data:n.getBar(t)+a.result+n.getBar((a.checksum+t)%r.MODULO)+n.getBar(r.STOP)}}},{key:`shouldEncodeAsEan128`,value:function(){var e=this.options.ean128||!1;return typeof e==`string`&&(e=e.toLowerCase()===`true`),e}}],[{key:`getBar`,value:function(e){return r.BARS[e]?r.BARS[e].toString():``}},{key:`correctIndex`,value:function(e,t){if(t===r.SET_A){var n=e.shift();return n<32?n+64:n-32}else if(t===r.SET_B)return e.shift()-32;else return(e.shift()-48)*10+e.shift()-48}},{key:`next`,value:function(e,t,i){if(!e.length)return{result:``,checksum:0};var a=void 0,o=void 0;if(e[0]>=200){o=e.shift()-105;var s=r.SWAP[o];s===void 0?((i===r.SET_A||i===r.SET_B)&&o===r.SHIFT&&(e[0]=i===r.SET_A?e[0]>95?e[0]-96:e[0]:e[0]<32?e[0]+96:e[0]),a=n.next(e,t+1,i)):a=n.next(e,t+1,s)}else o=n.correctIndex(e,i),a=n.next(e,t+1,i);var c=n.getBar(o),l=o*t;return{result:c+a.result,checksum:l+a.checksum}}}]),n}(n.default)})),tq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=$K(),n=function(e){return e.match(RegExp(`^`+t.A_CHARS+`*`))[0].length},r=function(e){return e.match(RegExp(`^`+t.B_CHARS+`*`))[0].length},i=function(e){return e.match(RegExp(`^`+t.C_CHARS+`*`))[0]};function a(e,n){var r=n?t.A_CHARS:t.B_CHARS,i=e.match(RegExp(`^(`+r+`+?)(([0-9]{2}){2,})([^0-9]|$)`));if(i)return i[1]+`Ì`+o(e.substring(i[1].length));var s=e.match(RegExp(`^`+r+`+`))[0];return s.length===e.length?e:s+String.fromCharCode(n?205:206)+a(e.substring(s.length),!n)}function o(e){var t=i(e),o=t.length;if(o===e.length)return e;e=e.substring(o);var s=n(e)>=r(e);return t+String.fromCharCode(s?206:205)+a(e,s)}e.default=function(e){var s=void 0;if(i(e).length>=2)s=t.C_START_CHAR+o(e);else{var c=n(e)>r(e);s=(c?t.A_START_CHAR:t.B_START_CHAR)+a(e,c)}return s.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(e,t){return`Ë`+t})}})),nq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=r(eq()),n=r(tq());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){o(t,e);function t(e,r){if(i(this,t),/^[\x00-\x7F\xC8-\xD3]+$/.test(e))var o=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,(0,n.default)(e),r));else var o=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r));return a(o)}return t}(t.default)})),rq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=i(eq()),r=$K();function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function o(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function s(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){s(n,e);function n(e,t){return a(this,n),o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,r.A_START_CHAR+e,t))}return t(n,[{key:`valid`,value:function(){return RegExp(`^`+r.A_CHARS+`+$`).test(this.data)}}]),n}(n.default)})),iq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=i(eq()),r=$K();function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function o(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function s(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){s(n,e);function n(e,t){return a(this,n),o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,r.B_START_CHAR+e,t))}return t(n,[{key:`valid`,value:function(){return RegExp(`^`+r.B_CHARS+`+$`).test(this.data)}}]),n}(n.default)})),aq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=i(eq()),r=$K();function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function o(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function s(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){s(n,e);function n(e,t){return a(this,n),o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,r.C_START_CHAR+e,t))}return t(n,[{key:`valid`,value:function(){return RegExp(`^`+r.C_CHARS+`+$`).test(this.data)}}]),n}(n.default)})),oq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.CODE128C=e.CODE128B=e.CODE128A=e.CODE128=void 0;var t=a(nq()),n=a(rq()),r=a(iq()),i=a(aq());function a(e){return e&&e.__esModule?e:{default:e}}e.CODE128=t.default,e.CODE128A=n.default,e.CODE128B=r.default,e.CODE128C=i.default})),sq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.SIDE_BIN=`101`,e.MIDDLE_BIN=`01010`,e.BINARIES={L:[`0001101`,`0011001`,`0010011`,`0111101`,`0100011`,`0110001`,`0101111`,`0111011`,`0110111`,`0001011`],G:[`0100111`,`0110011`,`0011011`,`0100001`,`0011101`,`0111001`,`0000101`,`0010001`,`0001001`,`0010111`],R:[`1110010`,`1100110`,`1101100`,`1000010`,`1011100`,`1001110`,`1010000`,`1000100`,`1001000`,`1110100`],O:[`0001101`,`0011001`,`0010011`,`0111101`,`0100011`,`0110001`,`0101111`,`0111011`,`0110111`,`0001011`],E:[`0100111`,`0110011`,`0011011`,`0100001`,`0011101`,`0111001`,`0000101`,`0010001`,`0001001`,`0010111`]},e.EAN2_STRUCTURE=[`LL`,`LG`,`GL`,`GG`],e.EAN5_STRUCTURE=[`GGLLL`,`GLGLL`,`GLLGL`,`GLLLG`,`LGGLL`,`LLGGL`,`LLLGG`,`LGLGL`,`LGLLG`,`LLGLG`],e.EAN13_STRUCTURE=[`LLLLLL`,`LLGLGG`,`LLGGLG`,`LLGGGL`,`LGLLGG`,`LGGLLG`,`LGGGLL`,`LGLGLG`,`LGLGGL`,`LGGLGL`]})),cq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=sq();e.default=function(e,n,r){var i=e.split(``).map(function(e,r){return t.BINARIES[n[r]]}).map(function(t,n){return t?t[e[n]]:``});if(r){var a=e.length-1;i=i.map(function(e,t){return t<a?e+r:e})}return i.join(``)}})),lq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=sq(),r=a(cq()),i=a(ZK());function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function s(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function c(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){c(i,e);function i(e,t){o(this,i);var n=s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t));return n.fontSize=!t.flat&&t.fontSize>t.width*10?t.width*10:t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return t(i,[{key:`encode`,value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:`leftText`,value:function(e,t){return this.text.substr(e,t)}},{key:`leftEncode`,value:function(e,t){return(0,r.default)(e,t)}},{key:`rightText`,value:function(e,t){return this.text.substr(e,t)}},{key:`rightEncode`,value:function(e,t){return(0,r.default)(e,t)}},{key:`encodeGuarded`,value:function(){var e={fontSize:this.fontSize},t={height:this.guardHeight};return[{data:n.SIDE_BIN,options:t},{data:this.leftEncode(),text:this.leftText(),options:e},{data:n.MIDDLE_BIN,options:t},{data:this.rightEncode(),text:this.rightText(),options:e},{data:n.SIDE_BIN,options:t}]}},{key:`encodeFlat`,value:function(){return{data:[n.SIDE_BIN,this.leftEncode(),n.MIDDLE_BIN,this.rightEncode(),n.SIDE_BIN].join(``),text:this.text}}}]),i}(i.default)})),uq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}else if(`value`in i)return i.value;else{var o=i.get;return o===void 0?void 0:o.call(r)}},r=sq(),i=a(lq());function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function s(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function c(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=function(e){return(10-e.substr(0,12).split(``).map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+t*3:e+t},0)%10)%10};e.default=function(e){c(i,e);function i(e,t){o(this,i),e.search(/^[0-9]{12}$/)!==-1&&(e+=l(e));var n=s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t));return n.lastChar=t.lastChar,n}return t(i,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{13}$/)!==-1&&+this.data[12]===l(this.data)}},{key:`leftText`,value:function(){return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`leftText`,this).call(this,1,6)}},{key:`leftEncode`,value:function(){var e=this.data.substr(1,6),t=r.EAN13_STRUCTURE[this.data[0]];return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`leftEncode`,this).call(this,e,t)}},{key:`rightText`,value:function(){return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`rightText`,this).call(this,7,6)}},{key:`rightEncode`,value:function(){var e=this.data.substr(7,6);return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`rightEncode`,this).call(this,e,`RRRRRR`)}},{key:`encodeGuarded`,value:function(){var e=n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`encodeGuarded`,this).call(this);return this.options.displayValue&&(e.unshift({data:`000000000000`,text:this.text.substr(0,1),options:{textAlign:`left`,fontSize:this.fontSize}}),this.options.lastChar&&(e.push({data:`00`}),e.push({data:`00000`,text:this.options.lastChar,options:{fontSize:this.fontSize}}))),e}}]),i}(i.default)})),dq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}else if(`value`in i)return i.value;else{var o=i.get;return o===void 0?void 0:o.call(r)}},r=i(lq());function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function o(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function s(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=function(e){return(10-e.substr(0,7).split(``).map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+t:e+t*3},0)%10)%10};e.default=function(e){s(r,e);function r(e,t){return a(this,r),e.search(/^[0-9]{7}$/)!==-1&&(e+=c(e)),o(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t))}return t(r,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{8}$/)!==-1&&+this.data[7]===c(this.data)}},{key:`leftText`,value:function(){return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`leftText`,this).call(this,0,4)}},{key:`leftEncode`,value:function(){var e=this.data.substr(0,4);return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`leftEncode`,this).call(this,e,`LLLL`)}},{key:`rightText`,value:function(){return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`rightText`,this).call(this,4,4)}},{key:`rightEncode`,value:function(){var e=this.data.substr(4,4);return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`rightEncode`,this).call(this,e,`RRRR`)}}]),r}(r.default)})),fq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=sq(),r=a(cq()),i=a(ZK());function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function s(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function c(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=function(e){return e.split(``).map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+t*9:e+t*3},0)%10};e.default=function(e){c(i,e);function i(e,t){return o(this,i),s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t))}return t(i,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{5}$/)!==-1}},{key:`encode`,value:function(){var e=n.EAN5_STRUCTURE[l(this.data)];return{data:`1011`+(0,r.default)(this.data,e,`01`),text:this.text}}}]),i}(i.default)})),pq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=sq(),r=a(cq()),i=a(ZK());function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function s(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function c(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){c(i,e);function i(e,t){return o(this,i),s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t))}return t(i,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{2}$/)!==-1}},{key:`encode`,value:function(){var e=n.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:`1011`+(0,r.default)(this.data,e,`01`),text:this.text}}}]),i}(i.default)})),mq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();e.checksum=l;var n=i(cq()),r=i(ZK());function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function o(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function s(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=function(e){s(r,e);function r(e,t){a(this,r),e.search(/^[0-9]{11}$/)!==-1&&(e+=l(e));var n=o(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));return n.displayValue=t.displayValue,t.fontSize>t.width*10?n.fontSize=t.width*10:n.fontSize=t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return t(r,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==l(this.data)}},{key:`encode`,value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:`flatEncoding`,value:function(){var e=``;return e+=`101`,e+=(0,n.default)(this.data.substr(0,6),`LLLLLL`),e+=`01010`,e+=(0,n.default)(this.data.substr(6,6),`RRRRRR`),e+=`101`,{data:e,text:this.text}}},{key:`guardedEncoding`,value:function(){var e=[];return this.displayValue&&e.push({data:`00000000`,text:this.text.substr(0,1),options:{textAlign:`left`,fontSize:this.fontSize}}),e.push({data:`101`+(0,n.default)(this.data[0],`L`),options:{height:this.guardHeight}}),e.push({data:(0,n.default)(this.data.substr(1,5),`LLLLL`),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),e.push({data:`01010`,options:{height:this.guardHeight}}),e.push({data:(0,n.default)(this.data.substr(6,5),`RRRRR`),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),e.push({data:(0,n.default)(this.data[11],`R`)+`101`,options:{height:this.guardHeight}}),this.displayValue&&e.push({data:`00000000`,text:this.text.substr(11,1),options:{textAlign:`right`,fontSize:this.fontSize}}),e}}]),r}(r.default);function l(e){var t=0,n;for(n=1;n<11;n+=2)t+=parseInt(e[n]);for(n=0;n<11;n+=2)t+=parseInt(e[n])*3;return(10-t%10)%10}e.default=c})),hq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=a(cq()),r=a(ZK()),i=mq();function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function s(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function c(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=[`XX00000XXX`,`XX10000XXX`,`XX20000XXX`,`XXX00000XX`,`XXXX00000X`,`XXXXX00005`,`XXXXX00006`,`XXXXX00007`,`XXXXX00008`,`XXXXX00009`],u=[[`EEEOOO`,`OOOEEE`],[`EEOEOO`,`OOEOEE`],[`EEOOEO`,`OOEEOE`],[`EEOOOE`,`OOEEEO`],[`EOEEOO`,`OEOOEE`],[`EOOEEO`,`OEEOOE`],[`EOOOEE`,`OEEEOO`],[`EOEOEO`,`OEOEOE`],[`EOEOOE`,`OEOEEO`],[`EOOEOE`,`OEEOEO`]],d=function(e){c(r,e);function r(e,t){o(this,r);var n=s(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));if(n.isValid=!1,e.search(/^[0-9]{6}$/)!==-1)n.middleDigits=e,n.upcA=f(e,`0`),n.text=t.text||``+n.upcA[0]+e+n.upcA[n.upcA.length-1],n.isValid=!0;else if(e.search(/^[01][0-9]{7}$/)!==-1)if(n.middleDigits=e.substring(1,e.length-1),n.upcA=f(n.middleDigits,e[0]),n.upcA[n.upcA.length-1]===e[e.length-1])n.isValid=!0;else return s(n);else return s(n);return n.displayValue=t.displayValue,t.fontSize>t.width*10?n.fontSize=t.width*10:n.fontSize=t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return t(r,[{key:`valid`,value:function(){return this.isValid}},{key:`encode`,value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:`flatEncoding`,value:function(){var e=``;return e+=`101`,e+=this.encodeMiddleDigits(),e+=`010101`,{data:e,text:this.text}}},{key:`guardedEncoding`,value:function(){var e=[];return this.displayValue&&e.push({data:`00000000`,text:this.text[0],options:{textAlign:`left`,fontSize:this.fontSize}}),e.push({data:`101`,options:{height:this.guardHeight}}),e.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),e.push({data:`010101`,options:{height:this.guardHeight}}),this.displayValue&&e.push({data:`00000000`,text:this.text[7],options:{textAlign:`right`,fontSize:this.fontSize}}),e}},{key:`encodeMiddleDigits`,value:function(){var e=this.upcA[0],t=this.upcA[this.upcA.length-1],r=u[parseInt(t)][parseInt(e)];return(0,n.default)(this.middleDigits,r)}}]),r}(r.default);function f(e,t){for(var n=l[parseInt(e[e.length-1])],r=``,a=0,o=0;o<n.length;o++){var s=n[o];s===`X`?r+=e[a++]:r+=s}return r=``+t+r,``+r+(0,i.checksum)(r)}e.default=d})),gq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.UPCE=e.UPC=e.EAN2=e.EAN5=e.EAN8=e.EAN13=void 0;var t=s(uq()),n=s(dq()),r=s(fq()),i=s(pq()),a=s(mq()),o=s(hq());function s(e){return e&&e.__esModule?e:{default:e}}e.EAN13=t.default,e.EAN8=n.default,e.EAN5=r.default,e.EAN2=i.default,e.UPC=a.default,e.UPCE=o.default})),_q=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.START_BIN=`1010`,e.END_BIN=`11101`,e.BINARIES=[`00110`,`10001`,`01001`,`11000`,`00101`,`10100`,`01100`,`00011`,`10010`,`01010`]})),vq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=_q(),r=i(ZK());function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function o(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function s(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){s(r,e);function r(){return a(this,r),o(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return t(r,[{key:`valid`,value:function(){return this.data.search(/^([0-9]{2})+$/)!==-1}},{key:`encode`,value:function(){var e=this,t=this.data.match(/.{2}/g).map(function(t){return e.encodePair(t)}).join(``);return{data:n.START_BIN+t+n.END_BIN,text:this.text}}},{key:`encodePair`,value:function(e){var t=n.BINARIES[e[1]];return n.BINARIES[e[0]].split(``).map(function(e,n){return(e===`1`?`111`:`1`)+(t[n]===`1`?`000`:`0`)}).join(``)}}]),r}(r.default)})),yq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=r(vq());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(e){var t=e.substr(0,13).split(``).map(function(e){return parseInt(e,10)}).reduce(function(e,t,n){return e+t*(3-n%2*2)},0);return Math.ceil(t/10)*10-t};e.default=function(e){o(n,e);function n(e,t){return i(this,n),e.search(/^[0-9]{13}$/)!==-1&&(e+=s(e)),a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return t(n,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{14}$/)!==-1&&+this.data[13]===s(this.data)}}]),n}(n.default)})),bq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ITF14=e.ITF=void 0;var t=r(vq()),n=r(yq());function r(e){return e&&e.__esModule?e:{default:e}}e.ITF=t.default,e.ITF14=n.default})),xq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=r(ZK());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(e){o(n,e);function n(e,t){return i(this,n),a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return t(n,[{key:`encode`,value:function(){for(var e=`110`,t=0;t<this.data.length;t++){var n=parseInt(this.data[t]).toString(2);n=c(n,4-n.length);for(var r=0;r<n.length;r++)e+=n[r]==`0`?`100`:`110`}return e+=`1001`,{data:e,text:this.text}}},{key:`valid`,value:function(){return this.data.search(/^[0-9]+$/)!==-1}}]),n}(n.default);function c(e,t){for(var n=0;n<t;n++)e=`0`+e;return e}e.default=s})),Sq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.mod10=t,e.mod11=n;function t(e){for(var t=0,n=0;n<e.length;n++){var r=parseInt(e[n]);(n+e.length)%2==0?t+=r:t+=r*2%10+Math.floor(r*2/10)}return(10-t%10)%10}function n(e){for(var t=0,n=[2,3,4,5,6,7],r=0;r<e.length;r++){var i=parseInt(e[e.length-1-r]);t+=n[r%n.length]*i}return(11-t%11)%11}})),Cq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=r(xq()),n=Sq();function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){o(t,e);function t(e,r){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e+(0,n.mod10)(e),r))}return t}(t.default)})),wq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=r(xq()),n=Sq();function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){o(t,e);function t(e,r){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e+(0,n.mod11)(e),r))}return t}(t.default)})),Tq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=r(xq()),n=Sq();function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){o(t,e);function t(e,r){return i(this,t),e+=(0,n.mod10)(e),e+=(0,n.mod10)(e),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r))}return t}(t.default)})),Eq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=r(xq()),n=Sq();function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){o(t,e);function t(e,r){return i(this,t),e+=(0,n.mod11)(e),e+=(0,n.mod10)(e),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r))}return t}(t.default)})),Dq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.MSI1110=e.MSI1010=e.MSI11=e.MSI10=e.MSI=void 0;var t=o(xq()),n=o(Cq()),r=o(wq()),i=o(Tq()),a=o(Eq());function o(e){return e&&e.__esModule?e:{default:e}}e.MSI=t.default,e.MSI10=n.default,e.MSI11=r.default,e.MSI1010=i.default,e.MSI1110=a.default})),Oq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.pharmacode=void 0;var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=r(ZK());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.pharmacode=function(e){o(n,e);function n(e,t){i(this,n);var r=a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t));return r.number=parseInt(e,10),r}return t(n,[{key:`encode`,value:function(){for(var e=this.number,t=``;!isNaN(e)&&e!=0;)e%2==0?(t=`11100`+t,e=(e-2)/2):(t=`100`+t,e=(e-1)/2);return t=t.slice(0,-2),{data:t,text:this.text}}},{key:`valid`,value:function(){return this.number>=3&&this.number<=131070}}]),n}(n.default)})),kq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.codabar=void 0;var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=r(ZK());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.codabar=function(e){o(n,e);function n(e,t){i(this,n),e.search(/^[0-9\-\$\:\.\+\/]+$/)===0&&(e=`A`+e+`A`);var r=a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e.toUpperCase(),t));return r.text=r.options.text||r.text.replace(/[A-D]/g,``),r}return t(n,[{key:`valid`,value:function(){return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)!==-1}},{key:`encode`,value:function(){for(var e=[],t=this.getEncodings(),n=0;n<this.data.length;n++)e.push(t[this.data.charAt(n)]),n!==this.data.length-1&&e.push(`0`);return{text:this.text,data:e.join(``)}}},{key:`getEncodings`,value:function(){return{0:`101010011`,1:`101011001`,2:`101001011`,3:`110010101`,4:`101101001`,5:`110101001`,6:`100101011`,7:`100101101`,8:`100110101`,9:`110100101`,"-":`101001101`,$:`101100101`,":":`1101011011`,"/":`1101101011`,".":`1101101101`,"+":`1011011011`,A:`1011001001`,B:`1001001011`,C:`1010010011`,D:`1010011001`}}}]),n}(n.default)})),Aq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.SYMBOLS=`0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,-,., ,$,/,+,%,($),(%),(/),(+),ÿ`.split(`,`),e.BINARIES=`100010100.101001000.101000100.101000010.100101000.100100100.100100010.101010000.100010010.100001010.110101000.110100100.110100010.110010100.110010010.110001010.101101000.101100100.101100010.100110100.100011010.101011000.101001100.101000110.100101100.100010110.110110100.110110010.110101100.110100110.110010110.110011010.101101100.101100110.100110110.100111010.100101110.111010100.111010010.111001010.101101110.101110110.110101110.100100110.111011010.111010110.100110010.101011110`.split(`.`),e.MULTI_SYMBOLS={"\0":[`(%)`,`U`],"":[`($)`,`A`],"":[`($)`,`B`],"":[`($)`,`C`],"":[`($)`,`D`],"":[`($)`,`E`],"":[`($)`,`F`],"\x07":[`($)`,`G`],"\b":[`($)`,`H`]," ":[`($)`,`I`],"\n":[`($)`,`J`],"\v":[`($)`,`K`],"\f":[`($)`,`L`],"\r":[`($)`,`M`],"":[`($)`,`N`],"":[`($)`,`O`],"":[`($)`,`P`],"":[`($)`,`Q`],"":[`($)`,`R`],"":[`($)`,`S`],"":[`($)`,`T`],"":[`($)`,`U`],"":[`($)`,`V`],"":[`($)`,`W`],"":[`($)`,`X`],"":[`($)`,`Y`],"":[`($)`,`Z`],"\x1B":[`(%)`,`A`],"":[`(%)`,`B`],"":[`(%)`,`C`],"":[`(%)`,`D`],"":[`(%)`,`E`],"!":[`(/)`,`A`],'"':[`(/)`,`B`],"#":[`(/)`,`C`],"&":[`(/)`,`F`],"'":[`(/)`,`G`],"(":[`(/)`,`H`],")":[`(/)`,`I`],"*":[`(/)`,`J`],",":[`(/)`,`L`],":":[`(/)`,`Z`],";":[`(%)`,`F`],"<":[`(%)`,`G`],"=":[`(%)`,`H`],">":[`(%)`,`I`],"?":[`(%)`,`J`],"@":[`(%)`,`V`],"[":[`(%)`,`K`],"\\":[`(%)`,`L`],"]":[`(%)`,`M`],"^":[`(%)`,`N`],_:[`(%)`,`O`],"`":[`(%)`,`W`],a:[`(+)`,`A`],b:[`(+)`,`B`],c:[`(+)`,`C`],d:[`(+)`,`D`],e:[`(+)`,`E`],f:[`(+)`,`F`],g:[`(+)`,`G`],h:[`(+)`,`H`],i:[`(+)`,`I`],j:[`(+)`,`J`],k:[`(+)`,`K`],l:[`(+)`,`L`],m:[`(+)`,`M`],n:[`(+)`,`N`],o:[`(+)`,`O`],p:[`(+)`,`P`],q:[`(+)`,`Q`],r:[`(+)`,`R`],s:[`(+)`,`S`],t:[`(+)`,`T`],u:[`(+)`,`U`],v:[`(+)`,`V`],w:[`(+)`,`W`],x:[`(+)`,`X`],y:[`(+)`,`Y`],z:[`(+)`,`Z`],"{":[`(%)`,`P`],"|":[`(%)`,`Q`],"}":[`(%)`,`R`],"~":[`(%)`,`S`],"":[`(%)`,`T`]}})),jq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=Aq(),r=i(ZK());function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function o(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function s(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){s(r,e);function r(e,t){return a(this,r),o(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t))}return t(r,[{key:`valid`,value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:`encode`,value:function(){var e=this.data.split(``).flatMap(function(e){return n.MULTI_SYMBOLS[e]||e}),t=e.map(function(e){return r.getEncoding(e)}).join(``),i=r.checksum(e,20),a=r.checksum(e.concat(i),15);return{text:this.text,data:r.getEncoding(`ÿ`)+t+r.getEncoding(i)+r.getEncoding(a)+r.getEncoding(`ÿ`)+`1`}}}],[{key:`getEncoding`,value:function(e){return n.BINARIES[r.symbolValue(e)]}},{key:`getSymbol`,value:function(e){return n.SYMBOLS[e]}},{key:`symbolValue`,value:function(e){return n.SYMBOLS.indexOf(e)}},{key:`checksum`,value:function(e,t){var n=e.slice().reverse().reduce(function(e,n,i){var a=i%t+1;return e+r.symbolValue(n)*a},0);return r.getSymbol(n%47)}}]),r}(r.default)})),Mq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=r(jq());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){o(n,e);function n(e,t){return i(this,n),a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return t(n,[{key:`valid`,value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),n}(n.default)})),Nq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.CODE93FullASCII=e.CODE93=void 0;var t=r(jq()),n=r(Mq());function r(e){return e&&e.__esModule?e:{default:e}}e.CODE93=t.default,e.CODE93FullASCII=n.default})),Pq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.GenericBarcode=void 0;var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=r(ZK());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.GenericBarcode=function(e){o(n,e);function n(e,t){return i(this,n),a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return t(n,[{key:`encode`,value:function(){return{data:`10101010101010101010101010101010101010101`,text:this.text}}},{key:`valid`,value:function(){return!0}}]),n}(n.default)})),Fq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=QK(),n=oq(),r=gq(),i=bq(),a=Dq(),o=Oq(),s=kq(),c=Nq(),l=Pq();e.default={CODE39:t.CODE39,CODE128:n.CODE128,CODE128A:n.CODE128A,CODE128B:n.CODE128B,CODE128C:n.CODE128C,EAN13:r.EAN13,EAN8:r.EAN8,EAN5:r.EAN5,EAN2:r.EAN2,UPC:r.UPC,UPCE:r.UPCE,ITF14:i.ITF14,ITF:i.ITF,MSI:a.MSI,MSI10:a.MSI10,MSI11:a.MSI11,MSI1010:a.MSI1010,MSI1110:a.MSI1110,pharmacode:o.pharmacode,codabar:s.codabar,CODE93:c.CODE93,CODE93FullASCII:c.CODE93FullASCII,GenericBarcode:l.GenericBarcode}})),Iq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};e.default=function(e,n){return t({},e,n)}})),Lq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=t;function t(e){var t=[];function n(e){if(Array.isArray(e))for(var r=0;r<e.length;r++)n(e[r]);else e.text=e.text||``,e.data=e.data||``,t.push(e)}return n(e),t}})),Rq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=t;function t(e){return e.marginTop=e.marginTop||e.margin,e.marginBottom=e.marginBottom||e.margin,e.marginRight=e.marginRight||e.margin,e.marginLeft=e.marginLeft||e.margin,e}})),zq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=t;function t(e){var t=[`width`,`height`,`textMargin`,`fontSize`,`margin`,`marginTop`,`marginBottom`,`marginLeft`,`marginRight`];for(var n in t)t.hasOwnProperty(n)&&(n=t[n],typeof e[n]==`string`&&(e[n]=parseInt(e[n],10)));return typeof e.displayValue==`string`&&(e.displayValue=e.displayValue!=`false`),e}})),Bq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={width:2,height:100,format:`auto`,displayValue:!0,fontOptions:``,font:`monospace`,text:void 0,textAlign:`center`,textPosition:`bottom`,textMargin:2,fontSize:20,background:`#ffffff`,lineColor:`#000000`,margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}}})),Vq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=r(zq()),n=r(Bq());function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var r={};for(var i in n.default)n.default.hasOwnProperty(i)&&(e.hasAttribute(`jsbarcode-`+i.toLowerCase())&&(r[i]=e.getAttribute(`jsbarcode-`+i.toLowerCase())),e.hasAttribute(`data-`+i.toLowerCase())&&(r[i]=e.getAttribute(`data-`+i.toLowerCase())));return r.value=e.getAttribute(`jsbarcode-value`)||e.getAttribute(`data-value`),r=(0,t.default)(r),r}e.default=i})),Hq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getTotalWidthOfEncodings=e.calculateEncodingAttributes=e.getBarcodePadding=e.getEncodingHeight=e.getMaximumHeightOfEncodings=void 0;var t=n(Iq());function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){return t.height+(t.displayValue&&e.text.length>0?t.fontSize+t.textMargin:0)+t.marginTop+t.marginBottom}function i(e,t,n){if(n.displayValue&&t<e){if(n.textAlign==`center`)return Math.floor((e-t)/2);if(n.textAlign==`left`)return 0;if(n.textAlign==`right`)return Math.floor(e-t)}return 0}function a(e,n,a){for(var o=0;o<e.length;o++){var s=e[o],l=(0,t.default)(n,s.options),u=l.displayValue?c(s.text,l,a):0,d=s.data.length*l.width;s.width=Math.ceil(Math.max(u,d)),s.height=r(s,l),s.barcodePadding=i(u,d,l)}}function o(e){for(var t=0,n=0;n<e.length;n++)t+=e[n].width;return t}function s(e){for(var t=0,n=0;n<e.length;n++)e[n].height>t&&(t=e[n].height);return t}function c(e,t,n){var r;if(n)r=n;else if(typeof document<`u`)r=document.createElement(`canvas`).getContext(`2d`);else return 0;r.font=t.fontOptions+` `+t.fontSize+`px `+t.font;var i=r.measureText(e);return i?i.width:0}e.getMaximumHeightOfEncodings=s,e.getEncodingHeight=r,e.getBarcodePadding=i,e.calculateEncodingAttributes=a,e.getTotalWidthOfEncodings=o})),Uq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=i(Iq()),r=Hq();function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}e.default=function(){function e(t,n,r){a(this,e),this.canvas=t,this.encodings=n,this.options=r}return t(e,[{key:`render`,value:function(){if(!this.canvas.getContext)throw Error(`The browser does not support canvas.`);this.prepareCanvas();for(var e=0;e<this.encodings.length;e++){var t=(0,n.default)(this.options,this.encodings[e].options);this.drawCanvasBarcode(t,this.encodings[e]),this.drawCanvasText(t,this.encodings[e]),this.moveCanvasDrawing(this.encodings[e])}this.restoreCanvas()}},{key:`prepareCanvas`,value:function(){var e=this.canvas.getContext(`2d`);e.save(),(0,r.calculateEncodingAttributes)(this.encodings,this.options,e);var t=(0,r.getTotalWidthOfEncodings)(this.encodings),n=(0,r.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=t+this.options.marginLeft+this.options.marginRight,this.canvas.height=n,e.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(e.fillStyle=this.options.background,e.fillRect(0,0,this.canvas.width,this.canvas.height)),e.translate(this.options.marginLeft,0)}},{key:`drawCanvasBarcode`,value:function(e,t){var n=this.canvas.getContext(`2d`),r=t.data,i=e.textPosition==`top`?e.marginTop+e.fontSize+e.textMargin:e.marginTop;n.fillStyle=e.lineColor;for(var a=0;a<r.length;a++){var o=a*e.width+t.barcodePadding;r[a]===`1`?n.fillRect(o,i,e.width,e.height):r[a]&&n.fillRect(o,i,e.width,e.height*r[a])}}},{key:`drawCanvasText`,value:function(e,t){var n=this.canvas.getContext(`2d`),r=e.fontOptions+` `+e.fontSize+`px `+e.font;if(e.displayValue){var i,a=e.textPosition==`top`?e.marginTop+e.fontSize-e.textMargin:e.height+e.textMargin+e.marginTop+e.fontSize;n.font=r,e.textAlign==`left`||t.barcodePadding>0?(i=0,n.textAlign=`left`):e.textAlign==`right`?(i=t.width-1,n.textAlign=`right`):(i=t.width/2,n.textAlign=`center`),n.fillText(t.text,i,a)}}},{key:`moveCanvasDrawing`,value:function(e){this.canvas.getContext(`2d`).translate(e.width,0)}},{key:`restoreCanvas`,value:function(){this.canvas.getContext(`2d`).restore()}}]),e}()})),Wq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=i(Iq()),r=Hq();function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var o=`http://www.w3.org/2000/svg`;e.default=function(){function e(t,n,r){a(this,e),this.svg=t,this.encodings=n,this.options=r,this.document=r.xmlDocument||document}return t(e,[{key:`render`,value:function(){var e=this.options.marginLeft;this.prepareSVG();for(var t=0;t<this.encodings.length;t++){var r=this.encodings[t],i=(0,n.default)(this.options,r.options),a=this.createGroup(e,i.marginTop,this.svg);this.setGroupOptions(a,i),this.drawSvgBarcode(a,i,r),this.drawSVGText(a,i,r),e+=r.width}}},{key:`prepareSVG`,value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,r.calculateEncodingAttributes)(this.encodings,this.options);var e=(0,r.getTotalWidthOfEncodings)(this.encodings),t=(0,r.getMaximumHeightOfEncodings)(this.encodings),n=e+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(n,t),this.options.background&&this.drawRect(0,0,n,t,this.svg).setAttribute(`fill`,this.options.background)}},{key:`drawSvgBarcode`,value:function(e,t,n){for(var r=n.data,i=t.textPosition==`top`?t.fontSize+t.textMargin:0,a=0,o=0,s=0;s<r.length;s++)o=s*t.width+n.barcodePadding,r[s]===`1`?a++:a>0&&(this.drawRect(o-t.width*a,i,t.width*a,t.height,e),a=0);a>0&&this.drawRect(o-t.width*(a-1),i,t.width*a,t.height,e)}},{key:`drawSVGText`,value:function(e,t,n){var r=this.document.createElementNS(o,`text`);if(t.displayValue){var i,a;r.setAttribute(`font-family`,t.font),r.setAttribute(`font-size`,t.fontSize),t.fontOptions.includes(`bold`)&&r.setAttribute(`font-weight`,`bold`),t.fontOptions.includes(`italic`)&&r.setAttribute(`font-style`,`italic`),a=t.textPosition==`top`?t.fontSize-t.textMargin:t.height+t.textMargin+t.fontSize,t.textAlign==`left`||n.barcodePadding>0?(i=0,r.setAttribute(`text-anchor`,`start`)):t.textAlign==`right`?(i=n.width-1,r.setAttribute(`text-anchor`,`end`)):(i=n.width/2,r.setAttribute(`text-anchor`,`middle`)),r.setAttribute(`x`,i),r.setAttribute(`y`,a),r.appendChild(this.document.createTextNode(n.text)),e.appendChild(r)}}},{key:`setSvgAttributes`,value:function(e,t){var n=this.svg;n.setAttribute(`width`,e+`px`),n.setAttribute(`height`,t+`px`),n.setAttribute(`x`,`0px`),n.setAttribute(`y`,`0px`),n.setAttribute(`viewBox`,`0 0 `+e+` `+t),n.setAttribute(`xmlns`,o),n.setAttribute(`version`,`1.1`)}},{key:`createGroup`,value:function(e,t,n){var r=this.document.createElementNS(o,`g`);return r.setAttribute(`transform`,`translate(`+e+`, `+t+`)`),n.appendChild(r),r}},{key:`setGroupOptions`,value:function(e,t){e.setAttribute(`fill`,t.lineColor)}},{key:`drawRect`,value:function(e,t,n,r,i){var a=this.document.createElementNS(o,`rect`);return a.setAttribute(`x`,e),a.setAttribute(`y`,t),a.setAttribute(`width`,n),a.setAttribute(`height`,r),i.appendChild(a),a}}]),e}()})),Gq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function n(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}e.default=function(){function e(t,r,i){n(this,e),this.object=t,this.encodings=r,this.options=i}return t(e,[{key:`render`,value:function(){this.object.encodings=this.encodings}}]),e}()})),Kq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=i(Uq()),n=i(Wq()),r=i(Gq());function i(e){return e&&e.__esModule?e:{default:e}}e.default={CanvasRenderer:t.default,SVGRenderer:n.default,ObjectRenderer:r.default}})),qq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});function t(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function n(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function r(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(e){r(i,e);function i(e,r){t(this,i);var a=n(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));return a.name=`InvalidInputException`,a.symbology=e,a.input=r,a.message=`"`+a.input+`" is not a valid input for `+a.symbology,a}return i}(Error),a=function(e){r(i,e);function i(){t(this,i);var e=n(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));return e.name=`InvalidElementException`,e.message=`Not supported type to render on`,e}return i}(Error),o=function(e){r(i,e);function i(){t(this,i);var e=n(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));return e.name=`NoElementException`,e.message=`No element to render on.`,e}return i}(Error);e.InvalidInputException=i,e.InvalidElementException=a,e.NoElementException=o})),Jq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},n=a(Vq()),r=a(Kq()),i=qq();function a(e){return e&&e.__esModule?e:{default:e}}function o(e){if(typeof e==`string`)return s(e);if(Array.isArray(e)){for(var a=[],l=0;l<e.length;l++)a.push(o(e[l]));return a}else if(typeof HTMLCanvasElement<`u`&&e instanceof HTMLImageElement)return c(e);else if(e&&e.nodeName&&e.nodeName.toLowerCase()===`svg`||typeof SVGElement<`u`&&e instanceof SVGElement)return{element:e,options:(0,n.default)(e),renderer:r.default.SVGRenderer};else if(typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement)return{element:e,options:(0,n.default)(e),renderer:r.default.CanvasRenderer};else if(e&&e.getContext)return{element:e,renderer:r.default.CanvasRenderer};else if(e&&(e===void 0?`undefined`:t(e))===`object`&&!e.nodeName)return{element:e,renderer:r.default.ObjectRenderer};else throw new i.InvalidElementException}function s(e){var t=document.querySelectorAll(e);if(t.length!==0){for(var n=[],r=0;r<t.length;r++)n.push(o(t[r]));return n}}function c(e){var t=document.createElement(`canvas`);return{element:t,options:(0,n.default)(e),renderer:r.default.CanvasRenderer,afterRender:function(){e.setAttribute(`src`,t.toDataURL())}}}e.default=o})),Yq=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function n(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}e.default=function(){function e(t){n(this,e),this.api=t}return t(e,[{key:`handleCatch`,value:function(e){if(e.name===`InvalidInputException`)if(this.api._options.valid!==this.api._defaults.valid)this.api._options.valid(!1);else throw e.message;else throw e;this.api.render=function(){}}},{key:`wrapBarcodeCall`,value:function(e){try{var t=e.apply(void 0,arguments);return this.api._options.valid(!0),t}catch(e){return this.handleCatch(e),this.api}}}]),e}()})),Xq=l(o(((e,t)=>{var n=d(Fq()),r=d(Iq()),i=d(Lq()),a=d(Rq()),o=d(Jq()),s=d(zq()),c=d(Yq()),l=qq(),u=d(Bq());function d(e){return e&&e.__esModule?e:{default:e}}var f=function(){},p=function(e,t,n){var r=new f;if(e===void 0)throw Error(`No element to render on was provided.`);return r._renderProperties=(0,o.default)(e),r._encodings=[],r._options=u.default,r._errorHandler=new c.default(r),t!==void 0&&(n||={},n.format||=_(),r.options(n)[n.format](t,n).render()),r};for(var m in p.getModule=function(e){return n.default[e]},n.default)n.default.hasOwnProperty(m)&&h(n.default,m);function h(e,t){f.prototype[t]=f.prototype[t.toUpperCase()]=f.prototype[t.toLowerCase()]=function(n,i){var a=this;return a._errorHandler.wrapBarcodeCall(function(){i.text=i.text===void 0?void 0:``+i.text;var o=(0,r.default)(a._options,i);o=(0,s.default)(o);var c=e[t],l=g(n,c,o);return a._encodings.push(l),a})}}function g(e,t,n){e=``+e;var a=new t(e,n);if(!a.valid())throw new l.InvalidInputException(a.constructor.name,e);var o=a.encode();o=(0,i.default)(o);for(var s=0;s<o.length;s++)o[s].options=(0,r.default)(n,o[s].options);return o}function _(){return n.default.CODE128?`CODE128`:Object.keys(n.default)[0]}f.prototype.options=function(e){return this._options=(0,r.default)(this._options,e),this},f.prototype.blank=function(e){var t=Array(e+1).join(`0`);return this._encodings.push({data:t}),this},f.prototype.init=function(){if(this._renderProperties){Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]);var e;for(var t in this._renderProperties){e=this._renderProperties[t];var i=(0,r.default)(this._options,e.options);i.format==`auto`&&(i.format=_()),this._errorHandler.wrapBarcodeCall(function(){var t=i.value,r=n.default[i.format.toUpperCase()],a=g(t,r,i);v(e,a,i)})}}},f.prototype.render=function(){if(!this._renderProperties)throw new l.NoElementException;if(Array.isArray(this._renderProperties))for(var e=0;e<this._renderProperties.length;e++)v(this._renderProperties[e],this._encodings,this._options);else v(this._renderProperties,this._encodings,this._options);return this},f.prototype._defaults=u.default;function v(e,t,n){t=(0,i.default)(t);for(var o=0;o<t.length;o++)t[o].options=(0,r.default)(n,t[o].options),(0,a.default)(t[o].options);(0,a.default)(n);var s=e.renderer;new s(e.element,t,n).render(),e.afterRender&&e.afterRender()}typeof window<`u`&&(window.JsBarcode=p),typeof jQuery<`u`&&(jQuery.fn.JsBarcode=function(e,t){var n=[];return jQuery(this).each(function(){n.push(this)}),p(n,e,t)}),t.exports=p}))(),1);function Zq(e){let t=(0,L.useRef)(null),n=(0,L.useCallback)(n=>{n&&(0,Xq.default)(n,e.text,{format:`CODE128`}),t.current=n},[e.text]);return(0,L.useEffect)(()=>{t.current&&(0,Xq.default)(t.current,e.text,{format:`CODE128`,fontSize:30})},[e.text]),(0,R.jsx)(`svg`,{ref:n})}function Qq(e){return(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`div`,{style:{marginTop:`4em`,display:`flex`,justifyContent:`center`},children:(0,R.jsx)(`h2`,{children:`SeedTactic: FMS Insight`})}),(0,R.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`},children:(0,R.jsx)(`p`,{style:{fontSize:`x-large`},children:new Date().toLocaleString(void 0,{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,second:`2-digit`})})}),(0,R.jsxs)(`div`,{style:{marginTop:`2em`,display:`flex`,justifyContent:`space-around`},children:[(0,R.jsx)(Zq,{text:e.materialName??e.partName}),e.count>=2?(0,R.jsx)(Zq,{text:e.count.toString()}):void 0]}),e.serial1&&e.serial1!==``?(0,R.jsxs)(`div`,{style:{marginTop:`2em`,display:`flex`,justifyContent:`space-around`},children:[(0,R.jsx)(Zq,{text:e.serial1}),e.serial2&&e.serial2!==``?(0,R.jsx)(Zq,{text:e.serial2||``}):void 0]}):void 0,(0,R.jsx)(`div`,{style:{marginTop:`2em`,marginLeft:`4em`,marginRight:`4em`,marginBottom:`9em`},children:e.uniq===null||e.uniq===``?(0,R.jsx)(`p`,{style:{fontSize:`x-large`},children:`Not currently assigned to any jobs`}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`p`,{style:{fontSize:`x-large`},children:`Assigned To`}),(0,R.jsxs)(`div`,{style:{marginTop:`1em`,marginLeft:`2em`,display:`flex`,alignItems:`center`},children:[(0,R.jsx)(Zq,{text:e.partName}),(0,R.jsxs)(`h3`,{style:{marginLeft:`4em`},children:[`assigned to `,e.uniq,e.jobCycles&&e.jobCycles>0?` (`+e.jobCycles.toString()+` scheduled)`:``]})]})]})}),e.note?(0,R.jsx)(`div`,{style:{marginBottom:`2em`},children:(0,R.jsx)(`p`,{style:{fontSize:`xxx-large`,textAlign:`center`},children:e.note})}):void 0,(0,R.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`},children:e.operator?(0,R.jsx)(`p`,{style:{fontSize:`x-large`},children:e.operator}):void 0})]})}function $q(e){let t=Q(GO).jobs,n=(0,L.useMemo)(()=>X.of(e.material||[]).filter(e=>e.jobUnique!==null&&e.jobUnique!==void 0&&e.jobUnique!==``).groupBy(e=>e.jobUnique).map(([e,n])=>[e,{cycles:t[e]?.cycles??0,length:n.length,part:n[0]?.partName??``,comment:t[e]?.comment,serial1:n[0]?.serial,serial2:n[n.length-1]?.serial}]).toSortedArray(([e,t])=>t.part),[e.material,t]);return!e.material||e.material.length===0?(0,R.jsx)(`div`,{}):n.length===0?(0,R.jsx)(Qq,{partName:e.material[0].partName,materialName:e.materialName,count:e.material.length,uniq:null,note:null,operator:e.operator,serial1:e.material[0].serial,serial2:e.material[e.material.length-1]?.serial}):(0,R.jsx)(`div`,{children:n.map(([t,r],i)=>(0,R.jsxs)(L.Fragment,{children:[(0,R.jsx)(Qq,{partName:r.part,materialName:e.materialName,count:r.length,uniq:t,jobCycles:r.cycles,note:r.comment,operator:e.operator,serial1:r.serial1,serial2:r.serial2}),i<n.length-1?(0,R.jsx)(`div`,{style:{pageBreakAfter:`always`}}):void 0]},i))})}function eJ(e){let t=(0,L.useMemo)(()=>X.of(e.material||[]).filter(e=>e.jobUnique!==null&&e.jobUnique!==void 0&&e.jobUnique!==``).groupBy(e=>e.jobUnique).map(([e,t])=>[e,{length:t.length,part:t[0]?.partName??``}]).toSortedArray(([e,t])=>t.part),[e.material]),n=Q(GO).jobs,r=(0,L.useMemo)(()=>X.of(e.material||[]).collect(e=>e.jobUnique?n[e.jobUnique]?.comment:void 0).distinct().toSortedArray(e=>e),[e.material,n]);return!e.material||e.material.length===0?(0,R.jsx)(`div`,{}):(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`div`,{style:{marginTop:`4em`,display:`flex`,justifyContent:`center`},children:(0,R.jsx)(`h2`,{children:`SeedTactic: FMS Insight`})}),(0,R.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`},children:(0,R.jsx)(`p`,{style:{fontSize:`x-large`},children:new Date().toLocaleString(void 0,{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,second:`2-digit`})})}),(0,R.jsxs)(`div`,{style:{marginTop:`2em`,display:`flex`,justifyContent:`space-around`},children:[(0,R.jsx)(Zq,{text:e.materialName??e.material[0].partName}),e.material.length>=2?(0,R.jsx)(Zq,{text:e.material.length.toString()}):void 0]}),e.material[0].serial&&e.material[0].serial!==``?(0,R.jsxs)(`div`,{style:{marginTop:`2em`,display:`flex`,justifyContent:`space-around`},children:[(0,R.jsx)(Zq,{text:e.material[0].serial}),e.material.length>=2&&e.material[e.material.length-1].serial&&e.material[e.material.length-1].serial!==``?(0,R.jsx)(Zq,{text:e.material[e.material.length-1].serial||``}):void 0]}):void 0,(0,R.jsx)(`div`,{style:{marginTop:`2em`,marginLeft:`4em`,marginRight:`4em`,marginBottom:`9em`},children:t.length===0?(0,R.jsx)(`p`,{style:{fontSize:`x-large`},children:`Not currently assigned to any jobs`}):e.materialName?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`p`,{style:{fontSize:`x-large`},children:`Assigned To`}),t.map(([e,t],n)=>(0,R.jsxs)(`div`,{style:{marginTop:`1em`,marginLeft:`2em`,display:`flex`,alignItems:`center`},children:[(0,R.jsx)(Zq,{text:t.part}),(0,R.jsxs)(`h3`,{style:{marginLeft:`4em`},children:[`x`,t.length]}),(0,R.jsxs)(`h3`,{style:{marginLeft:`4em`},children:[`assigned to `,e]})]},n))]}):t.length===1?(0,R.jsx)(`div`,{style:{marginTop:`1em`,display:`flex`,justifyContent:`space-around`},children:(0,R.jsxs)(`p`,{style:{fontSize:`x-large`},children:[(0,R.jsxs)(`span`,{children:[`Assigned to `,t[0][0]]}),t[0][1].length>1?(0,R.jsxs)(`span`,{style:{marginLeft:`1em`},children:[`x`,t[0][1].length]}):void 0]})}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`p`,{style:{fontSize:`x-large`},children:`Assigned To`}),t.map(([e,t],n)=>(0,R.jsxs)(`h3`,{style:{marginTop:`1em`,marginLeft:`2em`},children:[(0,R.jsx)(`span`,{children:e}),t.length>1?(0,R.jsxs)(`span`,{style:{marginLeft:`1em`},children:[`x`,t.length]}):void 0]},n))]})}),r.length>0?(0,R.jsx)(`div`,{style:{marginBottom:`2em`},children:r.map((e,t)=>(0,R.jsx)(`p`,{style:{fontSize:`xxx-large`,textAlign:`center`},children:e},t))}):void 0,(0,R.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`},children:e.operator?(0,R.jsx)(`p`,{style:{fontSize:`x-large`},children:e.operator}):void 0})]})}function tJ(e){return e.oneJobPerPage?(0,R.jsx)($q,{...e}):(0,R.jsx)(eJ,{...e})}function nJ({mat:e,materialName:t,operator:n}){let r=(0,L.useRef)(null),i=XK({contentRef:r,ignoreGlobalStyles:!0});return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(K,{color:`primary`,onClick:()=>i(),children:`Print Label`}),(0,R.jsx)(`div`,{style:{display:`none`},children:(0,R.jsx)(`div`,{ref:r,children:(0,R.jsx)(tJ,{materialName:t,material:Array.isArray(e)?e:[e],oneJobPerPage:!1,operator:n})})})]})}function rJ(){let e=Q(CO),t=Q(zI),n=Q(BI),[r,i,a]=tL();return!e.usingLabelPrinterForSerials||t===null||t.materialID<0?null:e.useClientPrinterForLabels?n===null?null:(0,R.jsx)(nJ,{mat:n}):(0,R.jsx)(K,{color:`primary`,disabled:i||a,onClick:()=>r({materialId:t.materialID,proc:n?.process??0}),children:a?`Printed`:`Print Label`})}var iJ=Z(null),aJ=Z(null);function oJ(){let[e,t]=GE(aJ),n=Q(GO),r=(0,L.useRef)(null),i=(0,L.useRef)(!1),a=XK({contentRef:r,onAfterPrint:()=>t(null),ignoreGlobalStyles:!0}),o=e?n.material.filter(t=>e.materialIds.has(t.materialID)):null;return o?.length!==e?.materialIds.size&&(o=null),(0,L.useEffect)(()=>{if(e===null){i.current&&=!1;return}i.current||o===null||(a(),i.current=!0)},[e,o,i,a]),console.log(e,o),(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(lh,{open:e!==null,children:[(0,R.jsx)(fh,{children:`Waiting for Material Assignment`}),(0,R.jsx)(dh,{children:o===null?e===null?(0,R.jsx)(`div`,{}):(0,R.jsxs)(Rv,{direction:`column`,spacing:2,mt:`0.5em`,mb:`0.5em`,children:[(0,R.jsx)(Nl,{color:`secondary`}),(0,R.jsx)(`div`,{children:`Waiting for material assignment. This could take a while if a download is currently in progress.`})]}):(0,R.jsx)(`div`,{children:`Printing...`})}),(0,R.jsx)(uh,{children:(0,R.jsx)(K,{color:`primary`,onClick:()=>t(null),children:`Cancel`})})]}),(0,R.jsx)(`div`,{style:{display:`none`},children:(0,R.jsx)(`div`,{ref:r,children:(0,R.jsx)(tJ,{materialName:e?.selectedCasting,material:o,operator:e?.operator,oneJobPerPage:!0})})})]})}function sJ({casting:e,queue:t}){let n=Q(GO),r=(0,L.useMemo)(()=>TK(n.jobs,n.material,t).filter(t=>t.rawMatName===e),[n.jobs,n.material,e,t]);return r.length===0?null:(0,R.jsxs)(Ty,{size:`small`,children:[(0,R.jsx)(Jy,{children:(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{children:`Job`}),(0,R.jsx)(J,{align:`right`,children:`Plan`}),(0,R.jsx)(J,{align:`right`,children:`Remaining`}),(0,R.jsx)(J,{align:`right`,children:`Assigned`}),(0,R.jsx)(J,{align:`right`,children:`Required`}),(0,R.jsx)(J,{align:`right`,children:`Available`})]})}),(0,R.jsxs)(My,{children:[r.map((e,t)=>(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{children:e.job.unique}),(0,R.jsx)(J,{align:`right`,children:e.job.cycles}),(0,R.jsx)(J,{align:`right`,children:e.remainingToStart}),(0,R.jsx)(J,{align:`right`,children:e.assignedRaw}),(0,R.jsx)(J,{align:`right`,children:Math.max(e.remainingToStart-e.assignedRaw,0)}),(0,R.jsx)(J,{align:`right`,children:e.availableUnassigned})]},t)),r.length>=2?(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{children:`Total`}),(0,R.jsx)(J,{align:`right`,children:X.of(r).sumBy(e=>e.job.cycles)}),(0,R.jsx)(J,{align:`right`,children:X.of(r).sumBy(e=>e.remainingToStart)}),(0,R.jsx)(J,{align:`right`,children:X.of(r).sumBy(e=>e.assignedRaw)}),(0,R.jsx)(J,{align:`right`,children:X.of(r).sumBy(e=>Math.max(e.remainingToStart-e.assignedRaw,0))}),(0,R.jsx)(J,{align:`right`,children:X.of(r).sumBy(e=>e.availableUnassigned)})]}):void 0]})]})}var cJ=(0,L.memo)(function(){let[e,t]=GE(iJ),n=Q(UO),r=Q(CO),i=r.usingLabelPrinterForSerials&&r.useClientPrinterForLabels,[a]=aL(),o=WE(aJ),[s,c]=(0,L.useState)(null),[l,u]=(0,L.useState)(null),[d,f]=(0,L.useState)(null),[p,m]=(0,L.useState)(!1),h=Q(GO),g=Q(cne),_=(0,L.useMemo)(()=>X.ofObject(h.jobs).flatMap(([,e])=>e.procsAndPaths[0].paths).filter(e=>e.casting!==void 0&&e.casting!==``).map(e=>({casting:e.casting,cnt:1})).concat(X.of(g).map(e=>({casting:e,cnt:0}))).buildOrderedMap(e=>e.casting,(e,t)=>e===void 0?t.cnt:e+t.cnt).toAscLazySeq(),[h.jobs,g]);function v(){t(null),c(null),f(null),m(!1),u(null)}function y(){e!==null&&s!==null&&l!==null&&!isNaN(l)&&l>0&&a({casting:s,quantity:l,queue:e,workorder:null,operator:r.requireOperatorNamePromptWhenAddingMaterial?d:n}),v()}function b(){e!==null&&s!==null&&l!==null&&!isNaN(l)&&(m(!0),a({casting:s,quantity:l,queue:e,operator:n,workorder:null,onNewMaterial:e=>{o({selectedCasting:s,operator:r.requireOperatorNamePromptWhenAddingMaterial?d:n,materialIds:new Set(e.map(e=>e.materialID))}),v()},onError:()=>{v()}}))}return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(lh,{open:e!==null,onClose:()=>v(),maxWidth:`md`,children:[(0,R.jsx)(fh,{children:`Add Raw Material`}),(0,R.jsx)(dh,{children:(0,R.jsxs)(Rv,{direction:`column`,spacing:2,mt:`0.5em`,children:[(0,R.jsx)(Bb,{style:{minWidth:`15em`},value:s||``,onChange:e=>c(e.target.value),select:!0,fullWidth:!0,label:`Raw Material`,slotProps:{select:{renderValue:s===null?void 0:()=>(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(`div`,{style:{marginRight:`0.5em`},children:(0,R.jsx)(IH,{part:s,size:25})}),(0,R.jsx)(`div`,{children:s})]})}},children:_.map(([e,t],n)=>(0,R.jsxs)(I_,{value:e,children:[(0,R.jsx)(n_,{children:(0,R.jsx)(IH,{part:e})}),(0,R.jsx)(s_,{primary:e,slotProps:{primary:{variant:`h4`}},secondary:t===0?`Not used by any current jobs`:`Used by ${t} current job${t>1?`s`:``}`})]},n))}),(0,R.jsx)(Bb,{fullWidth:!0,type:`number`,label:`Quantity`,disabled:s===null,slotProps:{htmlInput:{min:`1`}},value:l===null||isNaN(l)||l<=0?``:l,onChange:e=>u(parseInt(e.target.value))}),r.requireOperatorNamePromptWhenAddingMaterial?(0,R.jsx)(Bb,{fullWidth:!0,label:`Operator`,value:d||``,onChange:e=>f(e.target.value)}):void 0,s!==null&&e!==null?(0,R.jsx)(sJ,{casting:s,queue:e}):void 0]})}),(0,R.jsxs)(uh,{children:[i?(0,R.jsxs)(K,{color:`primary`,disabled:p||s===null||l===null||isNaN(l)||r.requireOperatorNamePromptWhenAddingMaterial&&(d===null||d===``),onClick:b,children:[p?(0,R.jsx)(Nl,{size:10}):void 0,`Add `,l!==null&&!isNaN(l)?l.toString()+` `:``,`to `,e]}):(0,R.jsxs)(K,{color:`primary`,disabled:s===null||l===null||isNaN(l)||r.requireOperatorNamePromptWhenAddingMaterial&&(d===null||d===``),onClick:y,children:[`Add `,l!==null&&!isNaN(l)?l.toString()+` `:``,`to `,e]}),(0,R.jsx)(K,{color:`primary`,disabled:p&&i,onClick:v,children:`Cancel`})]})]}),(0,R.jsx)(oJ,{})]})}),lJ=(0,L.memo)(function(e){let t=Q(CO),n=Q(GO).jobs,[r,i]=tL(),[a,o]=(0,L.useState)(!1),[s,c]=(0,L.useState)([]),[l,u]=(0,L.useState)(!1),[d,f]=(0,L.useState)(NaN),[p,m]=(0,L.useState)(void 0);(0,L.useEffect)(()=>{if(e.material===null)return;let t=!0;return o(!0),OK(e.material).then(e=>{if(t){c(e);let t;for(let n of e)n.type===Y.AddToQueue&&n.details?.operator!==void 0&&(t=n.details.operator);m(t)}}).catch(console.error).finally(()=>o(!1)),()=>{t=!1}},[e.material]);let h=(0,L.useMemo)(()=>{if(!e.material||e.material.length===0)return;let t=e.material[0].jobUnique;if(!(!t||t===``||!n[t]))return X.of(n[t].procsAndPaths[0].paths).filter(e=>e.casting!==void 0&&e.casting!==``).head()?.casting},[e.material,n]);function g(){e.closeDialog(),u(!1),f(NaN),o(!1),c([])}function _(){l?isNaN(d)||(o(!0),wC.bulkRemoveMaterialFromQueues(e.operator,X.of(e.material||[]).take(d).map(e=>e.materialID).toRArray()).catch(console.error).finally(g)):u(!0)}let v=e.material?.[0];return(0,R.jsxs)(lh,{open:e.material!==null,onClose:g,maxWidth:`md`,children:[(0,R.jsx)(fh,{children:v&&e.material&&e.material.length>0?(0,R.jsx)(eU,{partName:v.partName,subtitle:e.material.length.toString()+(v.jobUnique&&v.jobUnique!==``?` assigned to `+v.jobUnique:` unassigned`)}):`Material`}),(0,R.jsxs)(dh,{children:[a?(0,R.jsx)(Nl,{color:`secondary`}):(0,R.jsx)(PI,{entries:s,copyToClipboard:!0}),l&&e.material?(0,R.jsx)(`div`,{style:{marginTop:`1em`},children:(0,R.jsx)(Bb,{type:`number`,variant:`outlined`,fullWidth:!0,label:`Quantity to Remove`,slotProps:{htmlInput:{min:`1`,max:e.material.length.toString()}},value:isNaN(d)?``:d,onChange:e=>f(parseInt(e.target.value))})}):void 0]}),(0,R.jsxs)(uh,{children:[e.material&&e.material.length>0&&t.usingLabelPrinterForSerials?t.useClientPrinterForLabels?(0,R.jsx)(nJ,{mat:e.material||[],materialName:h,operator:p}):(0,R.jsx)(K,{color:`primary`,disabled:i,onClick:()=>e.material&&e.material.length>0?r({materialId:e.material[0].materialID,proc:0}):void 0,children:`Print Label`}):void 0,(0,R.jsx)(K,{color:`primary`,onClick:_,disabled:a||l&&isNaN(d),children:a&&l?`Removing...`:l&&!isNaN(d)?`Remove ${d} material`:`Remove Material`}),(0,R.jsx)(K,{color:`primary`,onClick:g,children:`Close`})]})]})}),uJ=(0,L.memo)(function(){let[e,t]=(0,L.useState)(null),[n,r]=(0,L.useState)(!1),i=WE(II);function a(){r(!1),t(null)}function o(){e&&e!==``&&(i({type:`ManuallyEnteredSerial`,serial:e}),a())}return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(q,{title:`Enter Serial`,children:(0,R.jsx)(zl,{onClick:()=>r(!0),size:`large`,children:(0,R.jsx)(Xx,{})})}),(0,R.jsxs)(lh,{open:n,onClose:a,maxWidth:`md`,children:[(0,R.jsx)(fh,{children:`Enter a part's serial`}),(0,R.jsx)(dh,{children:(0,R.jsx)(`div`,{style:{minWidth:`20em`},children:(0,R.jsx)(Bb,{sx:{mt:`5px`},label:e===null||e===``?`Serial`:`Serial (press enter)`,value:e??``,fullWidth:!0,autoFocus:!0,onChange:e=>t(e.target.value),onKeyDown:t=>{t.key===`Enter`&&e&&e!==``&&(t.preventDefault(),o())}})})}),(0,R.jsxs)(uh,{children:[(0,R.jsx)(K,{onClick:o,disabled:e===null||e===``,color:`secondary`,children:`Open`}),(0,R.jsx)(K,{onClick:a,color:`secondary`,children:`Cancel`})]})]})]})}),dJ=Z(null),fJ=(0,L.memo)(function(){let[e,t]=GE(dJ),n=WE(II),[r,i]=(0,L.useState)(void 0);function a(){r&&r!==``&&e!==null&&(n({type:`AddMatWithEnteredSerial`,serial:r,toQueue:e}),t(null),i(void 0))}function o(){t(null),i(void 0)}return(0,R.jsxs)(lh,{open:e!==null,onClose:o,maxWidth:`md`,children:[(0,R.jsxs)(fh,{children:[`Lookup Material To Add To `,e]}),(0,R.jsx)(dh,{children:(0,R.jsx)(Bb,{label:`Serial`,style:{marginTop:`0.5em`},autoFocus:!0,fullWidth:!0,value:r||``,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Enter`&&r&&r!==``&&(e.preventDefault(),a())}})}),(0,R.jsxs)(uh,{children:[(0,R.jsx)(K,{onClick:a,color:`secondary`,children:`Lookup Serial`}),(0,R.jsx)(K,{onClick:o,color:`primary`,children:`Cancel`})]})]})});function pJ(e){let t=Q(zI),n=Q(BI),r=Q(RI);return!(n!==null&&n.location.type===GS.InQueue&&n.location.currentQueue&&e.includes(n.location.currentQueue)||n?.location.type===GS.OnPallet||n?.action.type===qS.Loading||t===null&&!r)}var mJ=H(wx,{shouldForwardProp:e=>e.toString()[0]!==`$`})(({theme:e,$expandedOpen:t})=>({transform:t?`rotate(0deg)`:`rotate(-90deg)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shortest})}));function hJ({newMaterialTy:e,setNewMaterialTy:t,castings:n,indent:r}){return(0,R.jsx)(Fg,{sx:r?e=>({pl:e.spacing(4)}):void 0,children:n.map(n=>(0,R.jsx)(Zg,{children:(0,R.jsxs)(Hg,{selected:e?.kind===`RawMat`&&e?.rawMatName===n.casting,onClick:()=>t({kind:`RawMat`,rawMatName:n.casting}),children:[(0,R.jsx)(n_,{children:(0,R.jsx)(IH,{part:n.casting})}),(0,R.jsx)(s_,{primary:n.casting,primaryTypographyProps:{variant:`h4`},secondary:n.message??void 0})]})},n.casting))})}function gJ({newMaterialTy:e,setNewMaterialTy:t,curCollapse:n,setCurCollapse:r,indent:i,jobs:a}){return(0,R.jsx)(Fg,{sx:i?e=>({pl:e.spacing(4)}):void 0,children:a.map((a,o)=>a.machinedProcs.length===1?(0,R.jsx)(`div`,{children:(0,R.jsx)(Zg,{children:(0,R.jsxs)(Hg,{alignItems:`flex-start`,selected:e?.kind===`JobAndProc`&&e?.jobUnique===a.jobUnique&&e?.last_proc===a.machinedProcs[0].lastProc,onClick:()=>t({kind:`JobAndProc`,jobUnique:a.jobUnique,last_proc:a.machinedProcs[0].lastProc,workorder:a.workorder}),children:[a.job?(0,R.jsx)(n_,{children:(0,R.jsx)(IH,{part:a.job.partName})}):void 0,(0,R.jsx)(s_,{primary:(a.job?.partName??``)+` (`+a.jobUnique+`)`,slotProps:{primary:{variant:`h4`}},secondary:(0,R.jsxs)(W,{variant:`body2`,children:[a.machinedProcs[0].lastProc===0?`Raw Material`:`Last machined process `+a.machinedProcs[0].lastProc.toString(),`, `,a.job?.routeStartUTC.toLocaleDateString()??``,`, `,a.machinedProcs[0].details]})})]})})},o):(0,R.jsxs)(L.Fragment,{children:[(0,R.jsx)(Zg,{children:(0,R.jsxs)(Hg,{onClick:()=>{e&&t(null),r(n&&n.kind===`Job`&&n.unique===a.jobUnique?null:{kind:`Job`,unique:a.jobUnique})},children:[(0,R.jsx)(n_,{children:(0,R.jsx)(mJ,{$expandedOpen:n!==null&&n.kind===`Job`&&n.unique===a.jobUnique})}),a.job?(0,R.jsx)(n_,{children:(0,R.jsx)(IH,{part:a.job.partName})}):void 0,(0,R.jsx)(s_,{primary:(a.job?.partName??``)+` (`+a.jobUnique+`)`,slotProps:{primary:{variant:`h4`}},secondary:a.job?.routeStartUTC.toLocaleDateString()})]})}),(0,R.jsx)(Ac,{in:n!==null&&n.kind===`Job`&&n.unique===a.jobUnique,timeout:`auto`,children:a.machinedProcs.map((n,r)=>(0,R.jsx)(`div`,{children:(0,R.jsx)(Zg,{sx:e=>({pl:e.spacing(i?8:4)}),children:(0,R.jsx)(Hg,{selected:e?.kind===`JobAndProc`&&e?.jobUnique===a.jobUnique&&e?.last_proc===n.lastProc,onClick:()=>t({kind:`JobAndProc`,jobUnique:a.jobUnique,last_proc:n.lastProc,workorder:a.workorder}),children:(0,R.jsx)(s_,{primary:n.lastProc===0?`Raw Material`:`Last machined process `+n.lastProc.toString(),secondary:n.details})})})},r))})]},o))})}function _J({newMaterialTy:e,options:t,setNewMaterialTy:n,curCollapse:r,setCurCollapse:i}){return(0,R.jsxs)(Fg,{children:[(0,R.jsx)(Zg,{children:(0,R.jsxs)(Hg,{onClick:()=>{e&&n(null),i(r&&r.kind===`RawMat`?null:{kind:`RawMat`})},children:[(0,R.jsx)(n_,{children:(0,R.jsx)(mJ,{$expandedOpen:r!==null&&r.kind===`RawMat`})}),(0,R.jsx)(s_,{primary:`Raw Material`})]})}),(0,R.jsx)(Ac,{in:r!==null&&r.kind===`RawMat`,timeout:`auto`,children:(0,R.jsx)(hJ,{castings:t.castings,newMaterialTy:e,setNewMaterialTy:n,indent:!0})}),(0,R.jsx)(Zg,{children:(0,R.jsxs)(Hg,{onClick:()=>{e&&n(null),i(r&&(r.kind===`AllJobs`||r.kind===`Job`)?null:{kind:`AllJobs`})},children:[(0,R.jsx)(n_,{children:(0,R.jsx)(mJ,{$expandedOpen:r!==null&&(r.kind===`AllJobs`||r.kind===`Job`)})}),(0,R.jsx)(s_,{primary:`Specify Job`})]})}),(0,R.jsx)(Ac,{in:r!==null&&(r.kind===`AllJobs`||r.kind===`Job`),timeout:`auto`,children:(0,R.jsx)(gJ,{newMaterialTy:e,jobs:t.jobs,setNewMaterialTy:n,curCollapse:r,setCurCollapse:i,indent:!0})})]})}function vJ({newMaterialTy:e,setNewMaterialTy:t,toQueue:n}){let r=Q(VI),i=Q(zI),[a,o]=(0,L.useState)(null),s=SK(n);return i||r===null||n===null?null:s.castings.length===0&&s.jobs.length===0?(0,R.jsxs)(`div`,{children:[`No jobs are currently scheduled for `,n]}):s.jobs.length===0?(0,R.jsx)(hJ,{newMaterialTy:e,setNewMaterialTy:t,castings:s.castings}):s.castings.length===0?(0,R.jsx)(gJ,{jobs:s.jobs,newMaterialTy:e,setNewMaterialTy:t,curCollapse:a,setCurCollapse:o}):(0,R.jsx)(_J,{options:s,newMaterialTy:e,setNewMaterialTy:t,curCollapse:a,setCurCollapse:o})}function yJ({selectedQueue:e,setSelectedQueue:t,queueNames:n}){let r=(0,L.useRef)(null);return(0,L.useEffect)(()=>{r.current?.scrollIntoView({behavior:`smooth`,block:`end`})},[r]),(0,R.jsxs)(`div`,{ref:r,children:[(0,R.jsx)(`p`,{children:`Select a queue`}),(0,R.jsx)(Fg,{children:n.map((n,r)=>(0,R.jsx)(Hg,{selected:n===e,onClick:()=>t(n),children:n},r))})]})}function bJ({enteredOperator:e,setEnteredOperator:t}){return Q(CO).requireOperatorNamePromptWhenAddingMaterial?(0,R.jsx)(`div`,{style:{marginLeft:`1em`},children:(0,R.jsx)(Bb,{fullWidth:!0,label:`Operator`,value:e||``,required:!0,onChange:e=>t(e.target.value)})}):null}function xJ({st:e,queueNames:t,setState:n}){return pJ(t)?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(qH,{}),t.length>1?(0,R.jsx)(yJ,{selectedQueue:e.toQueue,setSelectedQueue:t=>{n({toQueue:t,newMaterialTy:null,enteredOperator:e.enteredOperator})},queueNames:t}):void 0,(0,R.jsx)(vJ,{newMaterialTy:e.newMaterialTy,toQueue:t.length>1?e.toQueue:t[0]??null,setNewMaterialTy:t=>n({...e,newMaterialTy:t})}),(0,R.jsx)(bJ,{enteredOperator:e.enteredOperator,setEnteredOperator:t=>n({...e,enteredOperator:t})})]}):null}function SJ({st:{enteredOperator:e,newMaterialTy:t,toQueue:n},queueNames:r,onClose:i}){let a=Q(CO),o=Q(UO),s=WE(II),c=Q(VI),l=Q(HI),u=Q(zI),d=Q(BI),f=Q(qI),[p,m]=iL(),[h,g]=Pte(),[_,v]=aL();if(!pJ(r))return null;n===null&&r.length===1&&(n=r[0]);let y=``;if(u!==null){if(f&&f.process>=f.totalNumProcesses)return null;y=` To Run Process `+((f?.process??0)+1).toString()}else t?.kind===`JobAndProc`&&t?.last_proc!==void 0&&(y=` To Run Process `+(t.last_proc+1).toString()),t?.kind===`RawMat`&&t?.rawMatName&&(y=` As `+t.rawMatName);let b=``;!u&&c&&c!==``&&(b=` With Serial `+c);let x=d?.location.currentQueue??null;return(0,R.jsx)(R.Fragment,{children:(0,R.jsx)(q,{title:n===null?`Select a queue to add the material to`:a.requireOperatorNamePromptWhenAddingMaterial&&(e===null||e===``)?`Please enter an operator name`:``,children:(0,R.jsx)(`span`,{children:(0,R.jsx)(K,{color:`primary`,disabled:n===null||m===!0||g===!0||v===!0||u===null&&t===null||a.requireOperatorNamePromptWhenAddingMaterial&&(e===null||e===``),onClick:()=>{u?p({materialId:u.materialID,queue:n??``,queuePosition:-1,operator:e??o}):t&&t.kind===`JobAndProc`&&t.jobUnique?h({jobUnique:t.jobUnique,lastCompletedProcess:t.last_proc,serial:c??void 0,workorder:l??t?.workorder,queue:n??``,queuePosition:-1,operator:e??o}):t&&t.kind===`RawMat`&&t.rawMatName&&_({casting:t.rawMatName,quantity:1,queue:n??``,serials:c?[c]:void 0,workorder:l,operator:e??o}),s(null),i()},children:n===null?`Add to Queue`:(0,R.jsxs)(`span`,{children:[x===null?`Add To`:`Move From ${x} To`,` `,n,b,y]})})})})})}function CJ(e){let t=Q(CO),[n,r]=nL(),[i,a]=rL(),o=Q(BI),s=Q(GO),c=Q(UO);if(e&&(c=null),o===null||o.materialID<0)return null;let l=t.quarantineQueue?.length?t.quarantineQueue:null,u=X.ofObject(s.jobs).flatMap(([e,t])=>t.procsAndPaths).flatMap(e=>e.paths).flatMap(e=>{let t=[];return e.inputQueue!==void 0&&t.push(e.inputQueue),e.outputQueue!==void 0&&t.push(e.outputQueue),t}).concat(X.ofObject(s.queues).filter(([,e])=>e.role===YS.RawMaterial||e.role===YS.InProcessTransfer).map(([e,t])=>e)).toRSet(e=>e),d=X.ofObject(s.queues).filter(([e,t])=>!u.has(e)).toRSet(([e,t])=>e),f=X.ofObject(s.pallets).toOrderedMap(([e,t])=>[t.palletNum,t.currentPalletLocation]);if(o.location.type===GS.InQueue&&o.location.currentQueue&&d.has(o.location.currentQueue))return{type:`Remove`,quarantine:()=>n(o.materialID,c),removing:r,quarantineQueueDestination:null};let p=null;switch(o.location.type){case GS.OnPallet:if(t.allowQuarantineToCancelLoad){let e=o.location.palletNum&&f.get(o.location.palletNum)?.loc===HS.LoadUnload;p=o.action.type===qS.Loading||e?`CancelLoad`:`SignalForScrap`}else{if(o.action.type===qS.Loading)return null;let e=s.jobs[o.jobUnique];if(!e)return null;let t=e.procsAndPaths?.[o.process-1]?.paths?.[o.path-1];if(o.process!=e.procsAndPaths.length&&(!t||!t.outputQueue))return null;p=`SignalForScrap`}break;case GS.InQueue:if(o.action.type===qS.Loading&&!t.allowQuarantineToCancelLoad)return null;p=o.action.type===qS.Loading?`CancelLoad`:`Scrap`;break;case GS.Free:p=`Scrap`;break}return p?{type:p,quarantine:e=>i(o.materialID,c,e),removing:a,quarantineQueueDestination:l}:null}function wJ({onClose:e,ignoreOperator:t}){let[n,r]=(0,L.useState)(!1),[i,a]=(0,L.useState)(``),o=CJ(!!t),s=WE(II);if(o===null)return null;let c,l;switch(o.type){case`Remove`:c=`Remove from system`,l=`Remove`;break;case`Scrap`:c=o.quarantineQueueDestination?`Move to ${o.quarantineQueueDestination}`:`Remove from queue`,l=o.quarantineQueueDestination?`Quarantine`:`Remove`;break;case`SignalForScrap`:c=o.quarantineQueueDestination?`After unload, move to ${o.quarantineQueueDestination}`:`After unload, remove the part as scrap`,l=o.quarantineQueueDestination?`Quarantine`:`Scrap`;break;case`CancelLoad`:c=o.quarantineQueueDestination?`Cancel load and move to ${o.quarantineQueueDestination}`:`Cancel load`,l=`Cancel Load`;break}function u(){o?.quarantine(i),s(null),r(!1),a(``),e?.()}return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(q,{title:c,children:(0,R.jsx)(K,{color:`primary`,disabled:o.removing,onClick:()=>r(!0),children:l})}),(0,R.jsxs)(lh,{open:n,onClose:()=>r(!1),children:[(0,R.jsx)(fh,{children:`Quarantine Material`}),(0,R.jsxs)(dh,{children:[(0,R.jsx)(`p`,{children:c}),(0,R.jsx)(Bb,{label:`Reason`,value:i,onChange:e=>a(e.target.value),fullWidth:!0,autoFocus:!0,multiline:!0})]}),(0,R.jsxs)(uh,{children:[(0,R.jsx)(K,{color:`primary`,onClick:u,children:l}),(0,R.jsx)(K,{color:`secondary`,onClick:()=>r(!1),children:`Cancel`})]})]})]})}function TJ(e){let t=Q(qI),n=Q(RI),r=Q(GO),i=Q(JE),a=Object.values(n?.possibleCastingsByQueue??{}).flatMap(e=>e),o=Object.values(n?.possibleJobsByQueue??{}).flatMap(e=>e).filter(e=>e.lastCompletedProcess===0).map(e=>({jobUnique:e.jobUnique,job:r.jobs[e.jobUnique]??i.get(e.jobUnique)??null})),s=t!==null&&t.process>=1,c=a.length>0||o.length>0;function l(t){e.setState({updating:!1,process:t.startsWith(`proc`)?parseInt(t.substring(4)):null,changeRawMat:t.startsWith(`rawMat`)?t.substring(6):null,changeJobUnique:t.startsWith(`job`)?t.substring(3):null})}return(0,R.jsx)(Bb,{value:e.st?.process?`proc`+e.st.process.toString():e.st?.changeRawMat?`rawMat`+e.st.changeRawMat:e.st?.changeJobUnique?`job`+e.st.changeJobUnique:``,select:!0,onChange:e=>l(e.target.value),variant:`outlined`,label:e.st?.process||!c?`Invalidate Process`:e.st?.changeRawMat?`Change Raw Material`:e.st?.changeJobUnique?`Change Assigned Job`:s?``:`Change Assignment`,children:[s&&c?[(0,R.jsx)(bf,{children:`Invalidate Selected Process`},`procheader`)]:[],t?[...X.ofRange(1,t.process+1).map(e=>(0,R.jsxs)(I_,{value:`proc`+e.toString(),children:[`Invalidate Process `,e]},e))]:[],s&&c?[(0,R.jsx)(bf,{children:`Change Material Type`},`matheader`)]:[],c?[...a.map(e=>(0,R.jsxs)(I_,{value:`rawMat`+e,children:[`Invalidate Everything And Change to `,e]},`rawMat`+e)),...o.map(({jobUnique:e,job:t})=>(0,R.jsxs)(I_,{value:`job`+e,children:[t?(0,R.jsx)(n_,{children:(0,R.jsx)(IH,{part:t.partName})}):void 0,(0,R.jsx)(s_,{primary:`Invalidate Everything And Change To Job `+e,secondary:t?.partName})]},`job`+e))]:[]]})}function EJ(e){let t=Q(zI),n=e.st!==null&&t!==null,r=(0,L.useRef)(null);return(0,L.useEffect)(()=>{r.current?.scrollIntoView({behavior:`smooth`,block:`end`})},[r,n]),n?(0,R.jsx)(G,{ref:r,sx:{display:`flex`,flexDirection:`column`,alignItems:`center`,marginTop:`1em`},children:(0,R.jsxs)(Rv,{spacing:2,children:[(0,R.jsx)(`p`,{style:{maxWidth:`35em`},children:`An invalidated cycle remains in the event log, but is not considered when determining the next process to be machined on a piece of material.`}),(0,R.jsx)(TJ,{st:e.st,setState:e.setState})]})}):(0,R.jsx)(`div`,{})}function DJ(e){let t=Q(CO),n=Q(zI),r=Q(BI),i=Q(qI),a=Q(RI),o=WE(II),s=Q(UO);if(e.loadStation&&!t.allowInvalidateMaterialAtLoadStation||!e.loadStation&&!t.allowInvalidateMaterialOnQueuesPage||n===null||r&&r.location.type===GS.OnPallet||!(a!==null&&(!X.ofObject(a.possibleCastingsByQueue??{}).isEmpty()||!X.ofObject(a.possibleJobsByQueue??{}).isEmpty()))&&(i===null||i.process<1))return null;e.ignoreOperator&&(s=null);function c(){e.setState({process:null,updating:!1,changeRawMat:null,changeJobUnique:null})}function l(){n&&(e.st?.process||e.st?.changeRawMat||e.st?.changeJobUnique)&&(e.setState({...e.st,updating:!0}),wC.invalidatePalletCycle(n.materialID,s,e.st?.changeRawMat,e.st?.changeJobUnique,e.st?.process??0).then(t=>{t?(o({type:`MatDetails`,details:t}),e.onClose()):(o(null),e.onClose())}).catch(t=>{console.log(t),o(null),e.onClose()}))}return(0,R.jsxs)(R.Fragment,{children:[e.st===null?(0,R.jsx)(K,{color:`primary`,onClick:c,children:`Invalidate Cycle`}):void 0,e.st===null?void 0:(0,R.jsx)(K,{color:`primary`,onClick:l,disabled:e.st.updating||e.st.process===null&&e.st.changeRawMat===null&&e.st.changeJobUnique===null,children:e.st.process===null?e.st.changeJobUnique===null?e.st.changeRawMat===null?`Invalidate Cycle`:`Invalidate And Change To `+e.st.changeRawMat:`Invalidate And Change To Job `+e.st.changeJobUnique:`Invalidate Process `+e.st.process.toString()})]})}function OJ(e){return e==null||e==``}function kJ(e,t){return n=>{if(OJ(n.serial)||n.location.type===GS.OnPallet||n.process!==e.process-1)return!1;if(OJ(n.jobUnique)){if(OJ(n.partName)||n.partName!==e.partName&&(!t||!X.of(t.procsAndPaths).flatMap(e=>e.paths).some(e=>e.casting===n.partName)))return!1}else if(n.jobUnique!==e.jobUnique||n.path!==e.path)return!1;return!0}}function AJ(e){let t=Q(GO),n=Q(BI);if(n===null||e.st===null)return(0,R.jsx)(`div`,{});let r=t.jobs[n.jobUnique],i=t.material.filter(kJ(n,r));return i.length===0?(0,R.jsx)(`p`,{style:{margin:`2em`},children:`No material with the same job is available for swapping. You must edit the pallet using the cell controller software to remove the material from the pallet. Insight will automatically refresh once the cell controller software is updated.`}):(0,R.jsxs)(`div`,{style:{margin:`2em`},children:[(0,R.jsx)(`p`,{children:`Swap serial on pallet with material from the same job.`}),(0,R.jsx)(`p`,{children:`If material on the pallet is from a different job, you cannot use this screen. Instead, the material must first be removed from the pallet using the cell controller software. Insight will automatically refresh when this occurs.`}),(0,R.jsx)(Bb,{value:e.st?.selectedMatToSwap?.serial??``,select:!0,onChange:t=>e.st&&e.setState({...e.st,selectedMatToSwap:i.find(e=>e.serial===t.target.value)??null}),style:{width:`20em`},variant:`outlined`,label:`Select serial to swap with `+(n.serial??``),children:i.map(e=>(0,R.jsx)(I_,{value:e.serial,children:e.serial},e.materialID))})]})}function jJ(e){let t=Q(CO),n=Q(BI),r=WE(II),i=Q(UO);if(!t.allowSwapSerialAtLoadStation||(e.ignoreOperator&&(i=null),!n||n.location.type!==GS.OnPallet||n.action.type===qS.Loading||n.action.type===qS.UnloadToCompletedMaterial||n.action.type===qS.UnloadToInProcess))return null;function a(){n&&e.st&&e.st.selectedMatToSwap&&n.location.type===GS.OnPallet&&(e.setState({selectedMatToSwap:e.st.selectedMatToSwap,updating:!0}),wC.swapMaterialOnPallet(n.materialID,i,{pallet:n.location.palletNum??0,materialIDToSetOnPallet:e.st.selectedMatToSwap.materialID}).catch(console.log).finally(()=>{r(null),e.onClose()}))}return(0,R.jsxs)(R.Fragment,{children:[e.st===null?(0,R.jsx)(K,{color:`primary`,onClick:()=>e.setState({selectedMatToSwap:null,updating:!1}),children:`Swap Serial`}):void 0,e.st===null?void 0:(0,R.jsx)(K,{color:`primary`,onClick:a,disabled:e.st.selectedMatToSwap===null||e.st.updating,children:e.st.selectedMatToSwap===null?`Swap Serial`:`Swap with `+(e.st.selectedMatToSwap.serial??``)})]})}var MJ=H(ob,{shouldForwardProp:e=>e.toString()[0]!==`$`})(({$noBorderBottom:e,$highlightedRow:t,$noncompletedRow:n})=>({...e&&{"& > *":{borderBottom:`unset`}},backgroundColor:t?`#FF8A65`:n?`#E0E0E0`:void 0})),NJ=[/\bhold\b/,/\bmissing\b/,/\bwait\b/,/\bwaiting\b/,/\bnone\b/];function PJ(e){let t=e.comment;return!t||t===``?!1:X.of(NJ).some(e=>e.test(t))}function FJ(e){let t=(Q(CO).allowEditJobPlanQuantityFromQueuesPage??null)!=null,[n,r]=(0,L.useState)(!1),i=e.job,a=PJ(i.job);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(MJ,{$noBorderBottom:!0,$highlightedRow:a,$noncompletedRow:i.remainingToStart-i.assignedRaw>0,children:[(0,R.jsx)(J,{children:(0,R.jsxs)(G,{sx:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(G,{sx:{mr:`0.2em`},children:(0,R.jsx)(IH,{part:i.job.partName,size:25})}),(0,R.jsx)(`div`,{children:(0,R.jsx)(W,{variant:`body2`,component:`span`,display:`block`,children:i.job.unique})})]})}),(0,R.jsx)(J,{children:i.startingTime?i.startingTime.toLocaleString():``}),(0,R.jsx)(J,{children:i.rawMatName===i.job.partName?i.rawMatName:(0,R.jsxs)(G,{sx:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(G,{sx:{mr:`0.2em`},children:(0,R.jsx)(IH,{part:i.rawMatName,size:25})}),(0,R.jsx)(W,{variant:`body2`,display:`block`,children:i.rawMatName})]})}),(0,R.jsxs)(J,{children:[i.job.comment,(0,R.jsx)(q,{title:`Edit`,children:(0,R.jsx)(zl,{size:`small`,onClick:()=>e.editNote(i.job),children:(0,R.jsx)(bx,{})})})]}),(0,R.jsxs)(J,{align:`right`,children:[i.job.cycles??0,t?(0,R.jsx)(q,{title:`Edit`,children:(0,R.jsx)(zl,{size:`small`,onClick:()=>e.editQty(i),children:(0,R.jsx)(bx,{})})}):void 0]}),(0,R.jsx)(J,{align:`right`,children:i.remainingToStart}),(0,R.jsx)(J,{align:`right`,children:i.assignedRaw}),(0,R.jsx)(J,{align:`right`,children:(0,R.jsx)(q,{title:i.remainingToStart>0||i.assignedRaw>0?`${i.remainingToStart} - ${i.assignedRaw}`:``,children:(0,R.jsx)(`span`,{children:Math.max(i.remainingToStart-i.assignedRaw,0)})})}),(0,R.jsx)(J,{align:`right`,children:i.availableUnassigned}),(0,R.jsx)(J,{children:(0,R.jsx)(q,{title:`Show Details`,children:(0,R.jsx)(zl,{size:`small`,onClick:()=>r(!n),children:n?(0,R.jsx)(Rx,{}):(0,R.jsx)(Fx,{})})})})]}),(0,R.jsx)(MJ,{$highlightedRow:a,$noncompletedRow:i.remainingToStart-i.assignedRaw>0,children:(0,R.jsx)(J,{sx:{pb:`0`,pt:`0`},colSpan:10,children:(0,R.jsx)(Ac,{in:n,timeout:`auto`,unmountOnExit:!0,children:(0,R.jsx)(PK,{job:i.job,checkAnalysisMonth:!1})})})})]})}function IJ(e){let t=Q(GO),n=(0,L.useMemo)(()=>TK(t.jobs,t.material,e.queue),[t,e.queue]);return n.length===0?null:(0,R.jsxs)(Ty,{size:`small`,children:[(0,R.jsx)(Jy,{children:(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{children:`Job`}),(0,R.jsx)(J,{children:`Starting Time`}),(0,R.jsx)(J,{children:`Material`}),(0,R.jsx)(J,{children:`Note`}),(0,R.jsx)(J,{align:`right`,children:`Planned Quantity`}),(0,R.jsx)(J,{align:`right`,children:`Remaining To Start`}),(0,R.jsx)(J,{align:`right`,children:`Assigned Raw Material`}),(0,R.jsx)(J,{align:`right`,children:`Required`}),(0,R.jsx)(J,{align:`right`,children:`Available Unassigned`}),(0,R.jsx)(J,{})]})}),(0,R.jsx)(My,{children:n.map((t,n)=>(0,R.jsx)(FJ,{job:t,editNote:e.editNote,editQty:e.editQty},n))})]})}var LJ=(0,L.memo)(function({workorder:e,inProc:t}){let n=WE(VJ);return(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{children:e.workorderId}),(0,R.jsx)(J,{children:(0,R.jsxs)(G,{sx:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(G,{sx:{mr:`0.2em`},children:(0,R.jsx)(IH,{part:e.part,size:25})}),(0,R.jsx)(W,{variant:`body2`,display:`block`,children:e.part})]})}),(0,R.jsxs)(J,{children:[e.comments&&e.comments.length>0?e.comments[e.comments.length-1].comment:``,(0,R.jsx)(q,{title:`Edit`,children:(0,R.jsx)(zl,{size:`small`,onClick:()=>n(e),children:(0,R.jsx)(bx,{})})})]}),(0,R.jsx)(J,{children:e.dueDate.toLocaleDateString()}),(0,R.jsx)(J,{children:e.priority}),(0,R.jsx)(J,{children:e.plannedQuantity}),(0,R.jsx)(J,{children:e.completedQuantity}),(0,R.jsx)(J,{children:t}),(0,R.jsx)(J,{children:Math.max(0,e.plannedQuantity-e.completedQuantity-t)})]})}),RJ=(0,L.memo)(function(){let e=Q(GO);if(!e.workorders||e.workorders.length===0)return null;let t=X.of(e.workorders).sortBy(e=>e.dueDate.getTime(),e=>e.priority),n=X.of(e.material).filter(e=>!!e.workorderId&&e.workorderId!==``).toLookupMap(e=>e.workorderId??``,e=>e.partName,()=>1,(e,t)=>e+t);return(0,R.jsxs)(Ty,{size:`small`,children:[(0,R.jsx)(Jy,{children:(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{children:`Workorder`}),(0,R.jsx)(J,{children:`Part`}),(0,R.jsx)(J,{children:`Comment`}),(0,R.jsx)(J,{children:`Due Date`}),(0,R.jsx)(J,{children:`Priority`}),(0,R.jsx)(J,{children:`Planned Qty`}),(0,R.jsx)(J,{children:`Completed Qty`}),(0,R.jsx)(J,{children:`In Process`}),(0,R.jsx)(J,{children:`Remaining To Assign`})]})}),(0,R.jsx)(My,{children:t.map(e=>(0,R.jsx)(LJ,{workorder:e,inProc:n.get(e.workorderId)?.get(e.part)??0},`${e.workorderId}-${e.part}`))})]})}),zJ=(0,L.memo)(function(e){let[t,n]=(0,L.useState)(null),r=WE(qO);function i(){e.closeDialog(),n(null)}function a(){t===null||e.job===null||t===e.job.comment||(r(e.job.unique,t),i())}return(0,R.jsx)(lh,{open:e.job!==null,onClose:i,children:e.job===null?void 0:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(fh,{children:(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(`div`,{children:(0,R.jsx)(IH,{part:e.job.partName,size:40})}),(0,R.jsxs)(`div`,{style:{marginLeft:`1em`,flexGrow:1},children:[`Edit Note For `,e.job.unique]})]})}),(0,R.jsx)(dh,{children:(0,R.jsx)(Bb,{variant:`outlined`,fullWidth:!0,autoFocus:!0,value:t===null?e.job.comment||``:t,onChange:e=>n(e.target.value),onKeyDown:e=>{e.keyCode===13&&t!==null&&(a(),e.preventDefault())}})}),(0,R.jsxs)(uh,{children:[(0,R.jsx)(K,{color:`primary`,disabled:t===null,onClick:a,children:`Save Note`}),(0,R.jsx)(K,{color:`primary`,onClick:i,children:`Cancel`})]})]})})}),BJ=(0,L.memo)(function(e){let[t,n]=(0,L.useState)(!1),[r,i]=(0,L.useState)(null),a=Q(CO).allowEditJobPlanQuantityFromQueuesPage??null;function o(){t||(e.closeDialog(),i(null))}async function s(){if(!(a===null||e.job===null||r==null||isNaN(r))){n(!0);try{await fetch(a,{method:`PUT`,headers:new Headers({"Content-Type":`application/json`}),body:JSON.stringify({Unique:e.job.job.unique,Quantity:r})}),e.closeDialog(),i(null)}finally{n(!1)}}}return(0,R.jsx)(lh,{open:a!=null&&e.job!==null,onClose:o,children:e.job===null?void 0:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(fh,{children:(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(`div`,{children:(0,R.jsx)(IH,{part:e.job.job.partName,size:40})}),(0,R.jsxs)(`div`,{style:{marginLeft:`1em`,flexGrow:1},children:[`Edit Planned Quantity For `,e.job.job.unique]})]})}),(0,R.jsxs)(dh,{children:[(0,R.jsxs)(`p`,{children:[e.job.job.cycles,` currently planned, `,e.job.remainingToStart,` remaining to start`]}),(0,R.jsx)(Bb,{variant:`outlined`,fullWidth:!0,autoFocus:!0,inputProps:{style:{textAlign:`right`},min:(e.job.job.cycles??0)-e.job.remainingToStart},type:`number`,value:r===null?``:r,onChange:e=>i(parseInt(e.target.value))})]}),(0,R.jsxs)(uh,{children:[(0,R.jsxs)(K,{color:`primary`,disabled:t||r===null||isNaN(r),onClick:()=>void s(),children:[t?(0,R.jsx)(Nl,{size:10}):void 0,`Set Quantity`]}),(0,R.jsx)(K,{color:`primary`,disabled:t,onClick:o,children:`Cancel`})]})]})})}),VJ=Z(null);function HJ(){let[e,t]=GE(VJ),[n,r]=(0,L.useState)(null),i=WE(JO);function a(){t(null),r(null)}function o(){e&&n&&n!==``&&i({workorder:e.workorderId,comment:n}),a()}return(0,R.jsx)(lh,{open:e!==null,onClose:a,children:e===null?void 0:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(fh,{children:(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(`div`,{children:(0,R.jsx)(IH,{part:e.part,size:40})}),(0,R.jsxs)(`div`,{style:{marginLeft:`1em`,flexGrow:1},children:[`Add Comment For `,e.workorderId]})]})}),(0,R.jsxs)(dh,{children:[(0,R.jsx)(`ul`,{children:(e.comments??[]).map((e,t)=>(0,R.jsx)(`li`,{children:(0,R.jsxs)(W,{variant:`body1`,children:[e.timeUTC.toLocaleString(),`: `,e.comment]})},t))}),(0,R.jsx)(Bb,{variant:`outlined`,sx:{mt:`1em`},fullWidth:!0,autoFocus:!0,value:n,onChange:e=>r(e.target.value),onKeyDown:e=>{e.key===`Enter`&&n!==null&&n!==``&&(o(),e.preventDefault())}})]}),(0,R.jsxs)(uh,{children:[(0,R.jsx)(K,{color:`primary`,onClick:o,children:`Save Comment`}),(0,R.jsx)(K,{color:`primary`,onClick:a,children:`Cancel`})]})]})})}var UJ=(0,L.memo)(function(e){let t=Q(CO),n=WE(iJ),r=WE(dJ),i=WE(fK);if(!t.addToQueueButton||t.addToQueueButton===mS.DoNotShow)return null;function a(){switch(t.addToQueueButton){case mS.DoNotShow:return;case mS.AddBulkUnassigned:e.rawMatQueue?n(e.label):r(e.label);break;case mS.LookupExistingSerial:r(e.label);return;case mS.ManualBarcodeScan:i(e.label);return}}return e.rawMatQueue?(0,R.jsx)(q,{title:`Add Raw Material`,children:(0,R.jsx)(gh,{color:`secondary`,onClick:a,size:`large`,style:{marginBottom:`-30px`,zIndex:1},children:(0,R.jsx)(Qb,{})})}):e.inProcQueue?(0,R.jsx)(q,{title:`Add Material`,children:(0,R.jsx)(gh,{color:`secondary`,onClick:a,size:`medium`,style:{marginBottom:`-30px`,zIndex:1},children:(0,R.jsx)(ex,{fontSize:`inherit`})})}):null});function WJ(e){let t=Q(II);return t&&t.type===`AddMatWithEnteredSerial`||t&&t.type===`Barcode`&&t.toQueue?e.includes(t.toQueue)?[t.toQueue]:[]:e}var GJ=(0,L.memo)(function({queueNames:e}){let[t,n]=(0,L.useState)({toQueue:null,enteredOperator:null,newMaterialTy:null}),[r,i]=(0,L.useState)(null),a=(0,L.useCallback)(()=>{n({toQueue:null,enteredOperator:null,newMaterialTy:null}),i(null)},[]);return e=WJ(e),(0,R.jsx)(lU,{allowNote:!0,onClose:a,highlightProcsGreaterOrEqualTo:r?.process??void 0,extraDialogElements:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(EJ,{st:r,setState:i}),(0,R.jsx)(xJ,{queueNames:e,st:t,setState:n})]}),buttons:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(rJ,{}),(0,R.jsx)(wJ,{onClose:a}),(0,R.jsx)(DJ,{onClose:a,st:r,setState:i}),(0,R.jsx)(SJ,{st:t,queueNames:e,onClose:a})]})})}),KJ=e=>{let t=Q(UO),n=Q(GO),r=Q(FL),i=Q(sne),a=(0,L.useMemo)(()=>DK(e.queues,n,r,i),[n,e.queues,r,i]),o=!X.ofObject(n.jobs).isEmpty(),[s,c]=(0,L.useState)(null),l=(0,L.useCallback)(()=>c(null),[]),[u,d]=(0,L.useState)(null),f=(0,L.useCallback)(()=>d(null),[]),[p,m]=(0,L.useState)(null),h=(0,L.useCallback)(()=>m(null),[]);return(0,R.jsxs)(G,{sx:{padding:`8px`,width:`100%`},children:[a.map((e,t)=>(0,R.jsx)(`div`,{style:t<a.length-1?{borderBottom:`1px solid black`}:void 0,children:(0,R.jsx)(FK,{matIds:e.material.map(e=>e.materialID),direction:`rect`,queueName:e.label,renderDragOverlay:t=>(0,R.jsx)(QH,{mat:t,hideEmptySerial:!0,displayJob:o&&e.rawMaterialQueue,fsize:`normal`}),children:(0,R.jsxs)(G,{minHeight:`134px`,children:[(0,R.jsxs)(G,{display:`flex`,margin:`4px`,children:[(0,R.jsx)(W,{variant:`h4`,flexGrow:1,children:e.label}),e.free?void 0:(0,R.jsx)(UJ,{label:e.label,rawMatQueue:e.rawMaterialQueue,inProcQueue:e.inProcQueue})]}),(0,R.jsxs)(G,{justifyContent:`flex-start`,display:`flex`,flexWrap:`wrap`,children:[e.material.map((t,n)=>(0,R.jsx)(ZH,{mat:t,hideEmptySerial:!0,fsize:`normal`,displayJob:o&&e.rawMaterialQueue},n)),e.groupedRawMat&&e.groupedRawMat.length>0?e.groupedRawMat.map((t,n)=>t.material.length===1?(0,R.jsx)(XH,{mat:t.material[0],hideEmptySerial:!0,fsize:`normal`,displayJob:o&&e.rawMaterialQueue},n):(0,R.jsx)($H,{partOrCasting:t.partOrCasting,assignedJobUnique:t.assignedJobUnique,material:t.material,fsize:`normal`,onOpen:()=>m(t.material)},n)):void 0,e.rawMaterialQueue?o?(0,R.jsx)(IJ,{queue:e.label,editNote:c,editQty:d}):(0,R.jsx)(RJ,{}):void 0]})]})})},t)),(0,R.jsx)(GJ,{queueNames:e.queues}),(0,R.jsx)(fJ,{}),(0,R.jsx)(pK,{}),(0,R.jsx)(cJ,{}),(0,R.jsx)(zJ,{job:s,closeDialog:l}),(0,R.jsx)(BJ,{job:u,closeDialog:f}),(0,R.jsx)(HJ,{}),(0,R.jsx)(lJ,{material:p,closeDialog:h,operator:t})]})};function qJ(e){return fL(`Queues`),(0,R.jsx)(G,{component:`main`,sx:{backgroundColor:`#F8F8F8`,minHeight:{xs:`calc(100vh - 64px - 32px)`,sm:`calc(100vh - 64px - 40px)`,md:`calc(100vh - 64px)`}},children:(0,R.jsx)(KJ,{...e})})}var JJ=H(ob,{shouldForwardProp:e=>e.toString()[0]!==`$`})(e=>({"& > *":{borderBottom:`unset`},...e.$darkRow&&{backgroundColor:`#F5F5F5`}})),YJ=H(ob,{shouldForwardProp:e=>e.toString()[0]!==`$`})(e=>({...e.$darkRow&&{backgroundColor:`#F5F5F5`}}));function XJ(e){let[t,n]=(0,L.useState)(!1),r=10;e.showMaterial&&(r+=1);let i=e.job;return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(JJ,{$darkRow:e.showDarkRow&&i.darkRow,children:[(0,R.jsx)(J,{children:i.routeStartTime.toLocaleString()}),(0,R.jsx)(J,{children:(0,R.jsxs)(G,{sx:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(G,{sx:{mr:`0.2em`},children:(0,R.jsx)(IH,{part:i.partName,size:25})}),(0,R.jsx)(`div`,{children:(0,R.jsx)(W,{variant:`body2`,component:`span`,display:`block`,children:i.partName})})]})}),e.showMaterial?(0,R.jsx)(J,{children:i.casting?(0,R.jsxs)(G,{sx:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(G,{sx:{mr:`0.2em`},children:(0,R.jsx)(IH,{part:i.casting,size:25})}),(0,R.jsx)(W,{variant:`body2`,display:`block`,children:i.casting})]}):void 0}):void 0,(0,R.jsxs)(J,{children:[i.comment,(0,R.jsx)(q,{title:`Edit`,children:(0,R.jsx)(zl,{size:`small`,onClick:()=>e.setCurEditNoteJob(i),children:(0,R.jsx)(bx,{})})})]}),(0,R.jsx)(J,{children:i.inProcJob===null?`Archived`:`Active`}),(0,R.jsx)(J,{align:`right`,children:i.scheduledQty}),(0,R.jsx)(J,{align:`right`,sx:{backgroundColor:i.decrementedQty>0?`#FF8A65`:void 0},children:i.decrementedQty}),(0,R.jsx)(J,{align:`right`,children:i.completedQty}),(0,R.jsx)(J,{align:`right`,children:i.inProcessQty}),(0,R.jsx)(J,{align:`right`,children:i.remainingQty}),(0,R.jsx)(J,{children:(0,R.jsx)(q,{title:`Show Details`,children:(0,R.jsx)(zl,{size:`small`,onClick:()=>n(!t),children:t?(0,R.jsx)(Rx,{}):(0,R.jsx)(Fx,{})})})})]}),(0,R.jsx)(YJ,{$darkRow:e.showDarkRow&&i.darkRow,children:(0,R.jsx)(J,{sx:{pb:`0`,pt:`0`},colSpan:r,children:(0,R.jsx)(Ac,{in:t,timeout:`auto`,unmountOnExit:!0,children:(0,R.jsx)(PK,{job:i.inProcJob?i.inProcJob:i.historicJob,checkAnalysisMonth:!1})})})})]})}var ZJ=function(e){return e[e.Date=0]=`Date`,e[e.Part=1]=`Part`,e[e.Material=2]=`Material`,e[e.Note=3]=`Note`,e[e.Scheduled=4]=`Scheduled`,e[e.Removed=5]=`Removed`,e[e.Completed=6]=`Completed`,e[e.InProc=7]=`InProc`,e[e.RemainingToRun=8]=`RemainingToRun`,e}(ZJ||{});function QJ(e,t,n,r){let i;switch(t){case ZJ.Date:i=e=>e.routeStartTime.getTime();break;case ZJ.Part:i=e=>e.partName;break;case ZJ.Material:i=e=>e.casting;break;case ZJ.Note:i=e=>e.comment??null;break;case ZJ.Scheduled:i=e=>e.scheduledQty;break;case ZJ.Removed:i=e=>e.decrementedQty;break;case ZJ.Completed:i=e=>e.completedQty;break;case ZJ.InProc:i=e=>e.inProcessQty;break;case ZJ.RemainingToRun:i=e=>e.remainingQty;break}return(r?X.of(e):X.of(e).filter(e=>e.inProcJob!==null)).toSortedArray(n===`asc`?{asc:i}:{desc:i})}function $J(e){return(0,R.jsx)(q,{title:`Sort`,enterDelay:300,children:(0,R.jsx)(J,{align:e.align,sortDirection:e.sortBy===e.col?e.order:!1,children:(0,R.jsx)(pb,{active:e.sortBy===e.col,direction:e.order,onClick:()=>{e.col===e.sortBy?e.setOrder(e.order===`asc`?`desc`:`asc`):(e.setSortBy(e.col),e.setOrder(`asc`))},children:e.children})})})}var eY=(0,L.memo)(function(e){let t={sortBy:e.sortBy,setSortBy:e.setSortBy,order:e.order,setOrder:e.setOrder};return(0,R.jsx)(Jy,{children:(0,R.jsxs)(ob,{children:[(0,R.jsx)($J,{align:`left`,col:ZJ.Date,...t,children:`Date`}),(0,R.jsx)($J,{align:`left`,col:ZJ.Part,...t,children:`Part`}),e.showMaterial?(0,R.jsx)($J,{align:`left`,col:ZJ.Material,...t,children:`Material`}):void 0,(0,R.jsx)($J,{align:`left`,col:ZJ.Note,...t,children:`Note`}),(0,R.jsxs)(J,{align:`left`,children:[`Active`,(0,R.jsx)(q,{title:e.showArchived?`Hide Archived`:`Show Archived`,children:(0,R.jsx)(zl,{size:`small`,onClick:t=>{e.setShowArchived(e=>!e),t.stopPropagation()},children:e.showArchived?(0,R.jsx)(iS,{}):(0,R.jsx)(aS,{})})})]}),(0,R.jsx)($J,{align:`right`,col:ZJ.Scheduled,...t,children:`Scheduled`}),(0,R.jsx)($J,{align:`right`,col:ZJ.Removed,...t,children:`Removed`}),(0,R.jsx)($J,{align:`right`,col:ZJ.Completed,...t,children:`Completed`}),(0,R.jsx)($J,{align:`right`,col:ZJ.InProc,...t,children:`In Process`}),(0,R.jsx)($J,{align:`right`,col:ZJ.RemainingToRun,...t,children:`Remaining To Run`}),(0,R.jsx)(J,{children:(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(zl,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>gK(e.jobs,e.showMaterial),size:`large`,children:(0,R.jsx)(Mx,{})})})})]})})}),tY=(0,L.memo)(function(){let[e,t]=(0,L.useState)(null),[n,r]=(0,L.useState)(ZJ.Date),[i,a]=(0,L.useState)(`desc`),[o,s]=(0,L.useState)(!0),c=Q(kL),l=Q(JE),u=Q(GO),d=(0,L.useMemo)(()=>{for(let[,e]of l)for(let t of e.procsAndPaths[0]?.paths??[])if(t.casting!==null&&t.casting!==void 0&&t.casting!==``)return!0;return!1},[l]),f=(0,L.useMemo)(()=>mK({start:VC(fw(),-6),end:VC(fw(),1)},c.matsById,l,u),[c.matsById,l,u]),p=(0,L.useMemo)(()=>QJ(f,n,i,o),[f,n,i,o]);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(Ty,{stickyHeader:!0,children:[(0,R.jsx)(eY,{jobs:f,showMaterial:d,sortBy:n,setSortBy:r,order:i,setOrder:a,showArchived:o,setShowArchived:s}),(0,R.jsx)(My,{children:p.map((e,r)=>(0,R.jsx)(XJ,{job:e,showDarkRow:n===ZJ.Date,showMaterial:d,setCurEditNoteJob:t},e.inProcJob?.unique??e.historicJob?.unique??r))})]}),(0,R.jsx)(zJ,{job:e?.historicJob??null,closeDialog:()=>t(null)})]})});function nY(){return fL(`Scheduled Jobs`),(0,R.jsx)(`main`,{style:{padding:`24px`},children:(0,R.jsx)(tY,{})})}var rY=`__FMS_INSIGHT_LOAD_STATION_BIN__`,iY=`__FMS_INSIGHT_PALLETS_BIN__`,aY=`__FMS_INSIGHT_ACTIVE_QUEUE_BIN__`,oY=jO(`material-bins`,[]);function sY(e,t,n){let r=Array.from(e),[i]=r.splice(t,1);return r.splice(n,0,i),r}function cY(e,t,n){let r=e.get(t);r?r.push(n):e.set(t,[n])}var lY=function(e){return e.LoadStations=`Bin_LoadStations`,e.Pallets=`Bin_Pallets`,e.ActiveQueues=`Bin_ActiveQueues`,e.QuarantineQueues=`Bin_Quarantine`,e}({});function uY(e,t){let n=new Map,r=new Map,i=new Map,a=X.ofObject(e.pallets).toRMap(([,e])=>[e.palletNum,e.palletNum.toString()+` (`+e.currentPalletLocation.group+` #`+e.currentPalletLocation.num.toString()+`)`]);for(let t of e.material)switch(t.location.type){case GS.InQueue:if(t.action.type===qS.Loading){let r=e.pallets[t.action.loadOntoPalletNum??0];if(r&&r.currentPalletLocation.loc===HS.LoadUnload){let e=r.currentPalletLocation.num;cY(n,e,t)}else cY(i,t.location.currentQueue||`Queue`,t)}else cY(i,t.location.currentQueue||`Queue`,t);break;case GS.OnPallet:if(t.location.palletNum){let i=e.pallets[t.location.palletNum];i.currentPalletLocation.loc===HS.LoadUnload?cY(n,i.currentPalletLocation.num,t):cY(r,a.get(t.location.palletNum)??``,t)}else cY(r,`Pallet`,t);break;case GS.Free:switch(t.action.type){case qS.Loading:{let r=e.pallets[t.action.loadOntoPalletNum??0]?.currentPalletLocation.num;cY(n,r,t);break}default:cY(i,`Free Material`,t);break}break}let o=X.ofObject(e.jobs).flatMap(([e,t])=>t.procsAndPaths).flatMap(e=>e.paths).flatMap(e=>{let t=[];return e.inputQueue!==void 0&&t.push(e.inputQueue),e.outputQueue!==void 0&&t.push(e.outputQueue),t}).concat(X.ofObject(e.queues).filter(([,e])=>e.role===YS.RawMaterial||e.role===YS.InProcessTransfer).map(([e,t])=>e)).toRSet(e=>e),s=X.ofObject(e.queues).filter(([e,t])=>!o.has(e)).toRSet(([e,t])=>e),c=t.filter(e=>e===`__FMS_INSIGHT_LOAD_STATION_BIN__`||e===`__FMS_INSIGHT_PALLETS_BIN__`||e===`__FMS_INSIGHT_ACTIVE_QUEUE_BIN__`||s.has(e));c.indexOf(`__FMS_INSIGHT_ACTIVE_QUEUE_BIN__`)<0&&c.unshift(aY),c.indexOf(`__FMS_INSIGHT_PALLETS_BIN__`)<0&&c.unshift(iY),c.indexOf(`__FMS_INSIGHT_LOAD_STATION_BIN__`)<0&&c.unshift(rY);for(let e of X.of(s).sortBy(e=>e))c.indexOf(e)<0&&c.push(e);return c.map(e=>{if(e===`__FMS_INSIGHT_LOAD_STATION_BIN__`)return{type:lY.LoadStations,binId:rY,byLul:n};if(e===`__FMS_INSIGHT_PALLETS_BIN__`)return{type:lY.Pallets,binId:iY,byPallet:r};if(e===`__FMS_INSIGHT_ACTIVE_QUEUE_BIN__`)return{type:lY.ActiveQueues,binId:aY,byQueue:X.of(o).toRMap(e=>{let t=i.get(e)??[];return t.sort((e,t)=>(e.location.queuePosition??0)-(t.location.queuePosition??0)),[e,t]},(e,t)=>e.concat(t))};{let t=e,n=i.get(t)??[];return n.sort((e,t)=>(e.location.queuePosition??0)-(t.location.queuePosition??0)),{type:lY.QuarantineQueues,binId:t,queueName:t,material:n}}})}function dY(e,t,n,r){return e.map(e=>{switch(e.type){case lY.QuarantineQueues:if(e.queueName===n){let n=e.material.filter(e=>e.materialID!==t.materialID);return n.splice(r,0,t),{...e,material:n}}else return{...e,material:e.material.filter(e=>e.materialID!==t.materialID)};default:return e}})}function fY(e,t){for(let n of t)switch(n.type){case lY.QuarantineQueues:for(let t=0;t<n.material.length;t++)if(n.material[t].materialID===e)return{bin:n,idx:t};break;default:break}return null}function pY(e,t){for(let n of t)if(n.type===lY.QuarantineQueues&&n.queueName===e)return{bin:n,idx:0};return null}var mY=(0,L.forwardRef)(function(e,t){return(0,R.jsxs)(G,{sx:{margin:e.isDragOverlay?void 0:`0.75em`,opacity:e.isActiveDrag?.2:1,border:`1px solid black`,padding:`4px`},ref:t,...e.dragRootProps,children:[(0,R.jsx)(G,{role:`button`,tabIndex:0,sx:{cursor:e.isDragOverlay?`grabbing`:`grab`},...e.dragHandleProps,children:(0,R.jsx)(W,{variant:`h4`,children:e.label})}),(0,R.jsx)(G,{sx:{display:`flex`,flexDirection:`column`,flexWrap:`nowrap`,width:`18em`,minHeight:`20em`},children:e.children})]})});function hY(e){let t={type:`container`,bin:e.bin},{active:n,isDragging:r,attributes:i,listeners:a,setNodeRef:o,setActivatorNodeRef:s,transform:c,transition:l}=SH({id:e.binId,data:t}),u={...a};for(let[e,t]of Object.entries(i))e.startsWith(`aria`)&&(u[e]=t);return(0,R.jsx)(mY,{ref:o,dragRootProps:{style:{transform:c?`translate3d(${Math.round(c.x)}px, ${Math.round(c.y)}px, 0)`:void 0,transition:n===null?void 0:l}},dragHandleProps:u,setDragHandleRef:s,isActiveDrag:r,...e})}var gY=(0,L.memo)(function(e){return e.isDragOverlay?(0,R.jsx)(mY,{binId:e.binId,label:e.queue,isDragOverlay:!0,children:e.material.map(e=>(0,R.jsx)(XH,{mat:e,hideAvatar:!0,showHandle:!0},e.materialID))}):(0,R.jsx)(hY,{binId:e.binId,label:e.queue,bin:e.bin,children:(0,R.jsx)(mH,{items:e.material.map(e=>e.materialID),strategy:uH,children:e.material.map(e=>(0,R.jsx)(ZH,{mat:e,hideAvatar:!0},e.materialID))})})});function _Y(e){return`L/U `+e.toString()}function vY(e,t){return e-t}function yY(e){return`Pallet `+e}function bY(e,t){let n=parseInt(e),r=parseInt(t);return isNaN(n)||isNaN(r)?e.localeCompare(t):n-r}function xY(e){return e}function SY(e,t){return e.localeCompare(t)}var CY=class extends L.PureComponent{render(){return(0,R.jsx)(this.props.isDragOverlay?mY:hY,{label:this.props.name,binId:this.props.binId,bin:this.props.bin,isDragOverlay:this.props.isDragOverlay,children:X.of(this.props.material).sortWith(([e,t],[n,r])=>this.props.compareLabel(e,n)).map(([e,t],n)=>(0,R.jsxs)(`div`,{children:[(0,R.jsx)(W,{variant:`caption`,children:this.props.renderLabel(e)}),t.map((e,t)=>(0,R.jsx)(XH,{mat:e,hideAvatar:!0},t))]},n))})}};function wY({matBin:e,isDragOverlay:t}){switch(e.type){case lY.LoadStations:return(0,R.jsx)(CY,{name:`Load Stations`,binId:e.binId,renderLabel:_Y,compareLabel:vY,material:e.byLul,bin:e,isDragOverlay:t});case lY.Pallets:return(0,R.jsx)(CY,{name:`Pallets`,binId:e.binId,renderLabel:yY,compareLabel:bY,material:e.byPallet,bin:e,isDragOverlay:t});case lY.ActiveQueues:return(0,R.jsx)(CY,{name:`Queues`,binId:e.binId,renderLabel:xY,compareLabel:SY,material:e.byQueue,bin:e,isDragOverlay:t});case lY.QuarantineQueues:return(0,R.jsx)(gY,{binId:e.binId,queue:e.queueName,material:e.material,bin:e,isDragOverlay:t})}}var TY=(0,L.memo)(function(){let[e,t]=(0,L.useState)(null),[n,r]=(0,L.useState)(null);function i(){t(null),r(null)}return(0,R.jsx)(lU,{onClose:i,allowNote:!0,highlightProcsGreaterOrEqualTo:n?.process??void 0,extraDialogElements:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(AJ,{st:e,setState:t}),n===null?null:(0,R.jsx)(EJ,{st:n,setState:r})]}),buttons:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(wJ,{onClose:i,ignoreOperator:!0}),(0,R.jsx)(jJ,{st:e,setState:t,onClose:i,ignoreOperator:!0}),(0,R.jsx)(DJ,{st:n,setState:r,onClose:i,ignoreOperator:!0})]})})});function EY(e){return(0,L.useCallback)(t=>{if(typeof t.active.id==`string`)return Bz({...t,droppableContainers:t.droppableContainers.filter(e=>typeof e.id==`string`)});let n=Gz(t),r=Rz(n.length>0?n:Uz(t),`id`);if(r!=null){if(typeof r==`string`){let n=pY(r,e);n&&n.bin.material.length>0&&(r=Bz({...t,droppableContainers:t.droppableContainers.filter(e=>e.id!==r&&n.bin.material.findIndex(t=>t.materialID===e.id)>=0)})[0]?.id)}return[{id:r}]}return[]},[e])}function DY(e){fL(`All Material`);let t=Q(GO),[n,r]=GE(oY),[i]=iL(),a=WE(QO),[o,s]=(0,L.useState)(null),c=(0,L.useMemo)(()=>{let e=uY(t,n);return o&&o.type===`material`&&o.curOverBinId!==null?dY(e,o.mat,o.curOverBinId,o.initialIdx):e},[t,n,o]),l=e.displaySystemBins?c:c.filter(e=>e.type===lY.QuarantineQueues);return(0,R.jsxs)(NV,{collisionDetection:EY(c),measuring:{droppable:{strategy:YB.Always}},onDragStart:({active:e})=>{typeof e.id==`string`?s({type:`column`,bin:e.data.current.bin}):s({type:`material`,mat:e.data.current.mat,curOverBinId:null,initialIdx:0})},onDragOver:({over:e})=>{if(!e||o===null||o.type===`column`)return;let t=typeof e.id==`string`?pY(e.id,c):fY(e.id,c);t&&t.bin.binId!==o.curOverBinId&&s({...o,curOverBinId:t.bin.binId,initialIdx:t.idx})},onDragEnd:({over:e})=>{if(o!==null){if(!e){s(null);return}if(o.type===`column`)typeof e.id==`number`?console.log(`Invalid, collision should never allow a column drag to be over a material`):r(sY(l.map(e=>e.binId),l.findIndex(e=>e.binId===o.bin.binId),l.findIndex(t=>t.binId===e.id)));else{let t=typeof e.id==`string`?pY(e.id,c):fY(e.id,c);t&&(i({materialId:o.mat.materialID,queue:t.bin.queueName,queuePosition:t.idx,operator:null}),a({queue:t.bin.queueName,matId:o.mat.materialID,newIdx:t.idx}))}s(null)}},onDragCancel:()=>s(null),children:[(0,R.jsx)(mH,{items:l.map(e=>e.binId),strategy:oH,children:(0,R.jsx)(G,{component:`main`,sx:{display:`flex`,flexWrap:`nowrap`,backgroundColor:`#F8F8F8`,minHeight:{xs:`calc(100vh - 64px - 48px)`,md:`calc(100vh - 64px)`}},children:l.map(e=>(0,R.jsx)(wY,{matBin:e},e.binId))})}),(0,R.jsx)($V,{children:o?.type===`material`?(0,R.jsx)(QH,{mat:o.mat,hideAvatar:!0}):o?.type===`column`?(0,R.jsx)(wY,{matBin:o.bin,isDragOverlay:!0}):void 0}),(0,R.jsx)(TY,{})]})}function OY(e){let t=[];for(let n of e)for(let e of n.stops)t.push(`P`+n.pallet.toString()+`,M`+e.stationNum.toString());return t.join(` -> `)}function kY(e,t,n){let r=X.of(e).collect(e=>e.result.type===SL.Completed&&!e.result.success?e.materialID:null).toRSet(e=>e);return X.of(e).collect(e=>{if(t&&(e.time<t.start||e.time>t.end))return null;switch(e.result.type){case SL.Triggered:return{time:e.time,materialID:e.materialID,partName:e.part,serial:e.serial,workorder:e.workorder,toInspect:e.result.toInspect,path:OY(e.result.actualPath),failed:r.has(e.materialID)};default:return null}}).buildHashMap(e=>e.path,(e,t)=>{let n=e??[];return n.push(t),n}).mapValues(e=>({material:e.sort(Iw(n,e=>e.time.getTime())),failedCnt:e.reduce((e,t)=>e+(t.failed?1:0),0)}))}function AY(e,t,n){return X.of(e).collect(e=>e.time<t||e.time>n?null:e.result.type===SL.Completed&&!e.result.success?{time:e.time,materialID:e.materialID,serial:e.serial,workorder:e.workorder,inspType:e.inspType,part:e.part}:null).toSortedArray(e=>e.time.getTime())}function jY(e){for(let t of e)if(t.type===Y.Inspection){let e=JSON.parse((t.details||{}).ActualPath||`[]`),n=[];for(let t of e)n.push(yS.fromJS(t));if(n.length>0)return n}return[]}function MY(e,t,n){let r=`<table>
|
|
311
|
+
<thead><tr>`;r+=`<th>Path</th><th>Date</th><th>Part</th><th>Inspection</th>`,r+=`<th>Serial</th><th>Workorder</th><th>Inspected</th><th>Failed</th>`,r+=`</tr></thead>
|
|
312
|
+
<tbody>
|
|
313
|
+
`;let i=kY(n,void 0,{asc:e=>e.time.getTime()}),a=X.of(i.keys()).toSortedArray(e=>e);for(let n of a){let a=i.get(n);if(a)for(let i of a.material)r+=`<tr>`,r+=`<td>`+n+`</td>`,r+=`<td>`+i.time.toLocaleString(void 0,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`})+`</td>`,r+=`<td>`+e+`</td>`,r+=`<td>`+t+`</td>`,r+=`<td>`+(i.serial||``)+`</td>`,r+=`<td>`+(i.workorder||``)+`</td>`,r+=`<td>`+(i.toInspect?`inspected`:``)+`</td>`,r+=`<td>`+(i.failed?`failed`:``)+`</td>`,r+=`</tr>
|
|
314
|
+
`}return r+=`</tbody>
|
|
315
|
+
</table>`,r}function NY(e,t,n){(0,Mk.default)(MY(e,t,n))}function PY(e){let t=`<table>
|
|
316
|
+
<thead><tr>`;t+=`<th>Date</th><th>Part</th><th>Inspection</th><th>Serial</th><th>Workorder</th>`,t+=`</tr></thead>
|
|
317
|
+
<tbody>
|
|
318
|
+
`;for(let n of X.of(e).sortBy({desc:e=>e.time.getTime()}))t+=`<tr>`,t+=`<td>`+n.time.toLocaleString()+`</td>`,t+=`<td>`+n.part+`</td>`,t+=`<td>`+n.inspType+`</td>`,t+=`<td>`+(n.serial||``)+`</td>`,t+=`<td>`+(n.workorder||``)+`</td>`,t+=`</tr>
|
|
319
|
+
`;return t+=`</tbody>
|
|
320
|
+
</table>`,t}function FY(e){(0,Mk.default)(PY(e))}function IY(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function LY(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function RY(e,t){let n=0;if(t===void 0)for(let t of e)(t=+t)&&(n+=t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}function zY(e,t){return e.sourceLinks.length?e.depth:t-1}function BY(e){return function(){return e}}function VY(e,t){return UY(e.source,t.source)||e.index-t.index}function HY(e,t){return UY(e.target,t.target)||e.index-t.index}function UY(e,t){return e.y0-t.y0}function WY(e){return e.value}function GY(e){return e.index}function KY(e){return e.nodes}function qY(e){return e.links}function JY(e,t){let n=e.get(t);if(!n)throw Error(`missing: `+t);return n}function YY({nodes:e}){for(let t of e){let e=t.y0,n=e;for(let n of t.sourceLinks)n.y0=e+n.width/2,e+=n.width;for(let e of t.targetLinks)e.y1=n+e.width/2,n+=e.width}}function XY(){let e=0,t=0,n=1,r=1,i=24,a=8,o,s=GY,c=zY,l,u,d=KY,f=qY,p=6;function m(){let e={nodes:d.apply(null,arguments),links:f.apply(null,arguments)};return h(e),g(e),_(e),v(e),x(e),YY(e),e}m.update=function(e){return YY(e),e},m.nodeId=function(e){return arguments.length?(s=typeof e==`function`?e:BY(e),m):s},m.nodeAlign=function(e){return arguments.length?(c=typeof e==`function`?e:BY(e),m):c},m.nodeSort=function(e){return arguments.length?(l=e,m):l},m.nodeWidth=function(e){return arguments.length?(i=+e,m):i},m.nodePadding=function(e){return arguments.length?(a=o=+e,m):a},m.nodes=function(e){return arguments.length?(d=typeof e==`function`?e:BY(e),m):d},m.links=function(e){return arguments.length?(f=typeof e==`function`?e:BY(e),m):f},m.linkSort=function(e){return arguments.length?(u=e,m):u},m.size=function(i){return arguments.length?(e=t=0,n=+i[0],r=+i[1],m):[n-e,r-t]},m.extent=function(i){return arguments.length?(e=+i[0][0],n=+i[1][0],t=+i[0][1],r=+i[1][1],m):[[e,t],[n,r]]},m.iterations=function(e){return arguments.length?(p=+e,m):p};function h({nodes:e,links:t}){for(let[t,n]of e.entries())n.index=t,n.sourceLinks=[],n.targetLinks=[];let n=new Map(e.map((t,n)=>[s(t,n,e),t]));for(let[e,r]of t.entries()){r.index=e;let{source:t,target:i}=r;typeof t!=`object`&&(t=r.source=JY(n,t)),typeof i!=`object`&&(i=r.target=JY(n,i)),t.sourceLinks.push(r),i.targetLinks.push(r)}if(u!=null)for(let{sourceLinks:t,targetLinks:n}of e)t.sort(u),n.sort(u)}function g({nodes:e}){for(let t of e)t.value=t.fixedValue===void 0?Math.max(RY(t.sourceLinks,WY),RY(t.targetLinks,WY)):t.fixedValue}function _({nodes:e}){let t=e.length,n=new Set(e),r=new Set,i=0;for(;n.size;){for(let e of n){e.depth=i;for(let{target:t}of e.sourceLinks)r.add(t)}if(++i>t)throw Error(`circular link`);n=r,r=new Set}}function v({nodes:e}){let t=e.length,n=new Set(e),r=new Set,i=0;for(;n.size;){for(let e of n){e.height=i;for(let{source:t}of e.targetLinks)r.add(t)}if(++i>t)throw Error(`circular link`);n=r,r=new Set}}function y({nodes:t}){let r=IY(t,e=>e.depth)+1,a=(n-e-i)/(r-1),o=Array(r);for(let n of t){let t=Math.max(0,Math.min(r-1,Math.floor(c.call(null,n,r))));n.layer=t,n.x0=e+t*a,n.x1=n.x0+i,o[t]?o[t].push(n):o[t]=[n]}if(l)for(let e of o)e.sort(l);return o}function b(e){let n=LY(e,e=>(r-t-(e.length-1)*o)/RY(e,WY));for(let i of e){let e=t;for(let t of i){t.y0=e,t.y1=e+t.value*n,e=t.y1+o;for(let e of t.sourceLinks)e.width=e.value*n}e=(r-e+o)/(i.length+1);for(let t=0;t<i.length;++t){let n=i[t];n.y0+=e*(t+1),n.y1+=e*(t+1)}O(i)}}function x(e){let n=y(e);o=Math.min(a,(r-t)/(IY(n,e=>e.length)-1)),b(n);for(let e=0;e<p;++e){let t=.99**e,r=Math.max(1-t,(e+1)/p);C(n,t,r),S(n,t,r)}}function S(e,t,n){for(let r=1,i=e.length;r<i;++r){let i=e[r];for(let e of i){let n=0,r=0;for(let{source:t,value:i}of e.targetLinks){let a=i*(e.layer-t.layer);n+=k(t,e)*a,r+=a}if(!(r>0))continue;let i=(n/r-e.y0)*t;e.y0+=i,e.y1+=i,D(e)}l===void 0&&i.sort(UY),w(i,n)}}function C(e,t,n){for(let r=e.length-2;r>=0;--r){let i=e[r];for(let e of i){let n=0,r=0;for(let{target:t,value:i}of e.sourceLinks){let a=i*(t.layer-e.layer);n+=ee(e,t)*a,r+=a}if(!(r>0))continue;let i=(n/r-e.y0)*t;e.y0+=i,e.y1+=i,D(e)}l===void 0&&i.sort(UY),w(i,n)}}function w(e,n){let i=e.length>>1,a=e[i];E(e,a.y0-o,i-1,n),T(e,a.y1+o,i+1,n),E(e,r,e.length-1,n),T(e,t,0,n)}function T(e,t,n,r){for(;n<e.length;++n){let i=e[n],a=(t-i.y0)*r;a>1e-6&&(i.y0+=a,i.y1+=a),t=i.y1+o}}function E(e,t,n,r){for(;n>=0;--n){let i=e[n],a=(i.y1-t)*r;a>1e-6&&(i.y0-=a,i.y1-=a),t=i.y0-o}}function D({sourceLinks:e,targetLinks:t}){if(u===void 0){for(let{source:{sourceLinks:e}}of t)e.sort(HY);for(let{target:{targetLinks:t}}of e)t.sort(VY)}}function O(e){if(u===void 0)for(let{sourceLinks:t,targetLinks:n}of e)t.sort(HY),n.sort(VY)}function k(e,t){let n=e.y0-(e.sourceLinks.length-1)*o/2;for(let{target:r,width:i}of e.sourceLinks){if(r===t)break;n+=i+o}for(let{source:r,width:i}of t.targetLinks){if(r===e)break;n-=i}return n}function ee(e,t){let n=t.y0-(t.targetLinks.length-1)*o/2;for(let{source:r,width:i}of t.targetLinks){if(r===e)break;n+=i+o}for(let{target:r,width:i}of e.sourceLinks){if(r===t)break;n-=i}return n}return m}var ZY=Math.PI,QY=2*ZY,$Y=1e-6,eX=QY-$Y;function tX(){this._x0=this._y0=this._x1=this._y1=null,this._=``}function nX(){return new tX}tX.prototype=nX.prototype={constructor:tX,moveTo:function(e,t){this._+=`M`+(this._x0=this._x1=+e)+`,`+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+=`Z`)},lineTo:function(e,t){this._+=`L`+(this._x1=+e)+`,`+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+=`Q`+ +e+`,`+ +t+`,`+(this._x1=+n)+`,`+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,a){this._+=`C`+ +e+`,`+ +t+`,`+ +n+`,`+ +r+`,`+(this._x1=+i)+`,`+(this._y1=+a)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(i<0)throw Error(`negative radius: `+i);if(this._x1===null)this._+=`M`+(this._x1=e)+`,`+(this._y1=t);else if(d>$Y)if(!(Math.abs(u*s-c*l)>$Y)||!i)this._+=`L`+(this._x1=e)+`,`+(this._y1=t);else{var f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((ZY-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>$Y&&(this._+=`L`+(e+y*l)+`,`+(t+y*u)),this._+=`A`+i+`,`+i+`,0,0,`+ +(u*f>l*p)+`,`+(this._x1=e+b*s)+`,`+(this._y1=t+b*c)}},arc:function(e,t,n,r,i,a){e=+e,t=+t,n=+n,a=!!a;var o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;if(n<0)throw Error(`negative radius: `+n);this._x1===null?this._+=`M`+c+`,`+l:(Math.abs(this._x1-c)>$Y||Math.abs(this._y1-l)>$Y)&&(this._+=`L`+c+`,`+l),n&&(d<0&&(d=d%QY+QY),d>eX?this._+=`A`+n+`,`+n+`,0,1,`+u+`,`+(e-o)+`,`+(t-s)+`A`+n+`,`+n+`,0,1,`+u+`,`+(this._x1=c)+`,`+(this._y1=l):d>$Y&&(this._+=`A`+n+`,`+n+`,0,`+ +(d>=ZY)+`,`+u+`,`+(this._x1=e+n*Math.cos(i))+`,`+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+=`M`+(this._x0=this._x1=+e)+`,`+(this._y0=this._y1=+t)+`h`+ +n+`v`+ +r+`h`+-n+`Z`},toString:function(){return this._}};function rX(e){return function(){return e}}function iX(e){return e[0]}function aX(e){return e[1]}var oX=Array.prototype.slice;function sX(e){return e.source}function cX(e){return e.target}function lX(e){var t=sX,n=cX,r=iX,i=aX,a=null;function o(){var o,s=oX.call(arguments),c=t.apply(this,s),l=n.apply(this,s);if(a||=o=nX(),e(a,+r.apply(this,(s[0]=c,s)),+i.apply(this,s),+r.apply(this,(s[0]=l,s)),+i.apply(this,s)),o)return a=null,o+``||null}return o.source=function(e){return arguments.length?(t=e,o):t},o.target=function(e){return arguments.length?(n=e,o):n},o.x=function(e){return arguments.length?(r=typeof e==`function`?e:rX(+e),o):r},o.y=function(e){return arguments.length?(i=typeof e==`function`?e:rX(+e),o):i},o.context=function(e){return arguments.length?(a=e??null,o):a},o}function uX(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function dX(){return lX(uX)}function fX(e){return[e.source.x1,e.y0]}function pX(e){return[e.target.x0,e.y1]}function mX(){return dX().source(fX).target(pX)}var hX=class{constructor(e,t){this.unique=e,this.name=t}compare(e){let t=this.unique.localeCompare(e.unique);return t===0?this.name.localeCompare(e.name):t}hash(){return xT(this.unique,this.name)}toString(){return`{unique: ${this.unique}}, name: ${this.name}}`}},gX=class{constructor(e,t){this.from=e,this.to=t}compare(e){let t=this.from.compare(e.from);return t===0?this.to.compare(e.to):t}hash(){return xT(this.from,this.to)}toString(){return`{from: ${this.from.toString()}}, to: ${this.to.toString()}}`}};function _X(e,t,n){let r=``,i=new hX(``,`raw`),a=[];for(let t of e)for(let e of t.stops){let n=`P`+t.pallet+`,M`+e.stationNum.toString();r+=`->`+n;let o=new hX(r,n);a.push(new gX(i,o)),i=o}return t&&n!==void 0?n?a.push(new gX(i,new hX(`@@success`,`success`))):a.push(new gX(i,new hX(`@@failed`,`failed`))):a.push(new gX(i,new hX(`@@uninspected`,`uninspected`))),a}function vX(e){let t=X.of(e).filter(e=>e.result.type===SL.Completed).toRMap(e=>[e.materialID,e.result.type===SL.Completed?e.result.success:!1]),n=X.of(e).flatMap(e=>e.result.type===SL.Triggered?_X(e.result.actualPath,e.result.toInspect,t.get(e.materialID)??!1):[]),r=n.flatMap(e=>[e.from,e.to]).distinctBy(e=>e).map((e,t)=>({idx:t,node:e})),i=r.map(e=>({unique:e.node.unique,name:e.node.name})).toMutableArray(),a=r.toHashMap(e=>[e.node,e.idx],(e,t)=>e);return{nodes:i,links:n.toHashMap(e=>[e,1],(e,t)=>e+t).toLazySeq().map(([e,t])=>({source:a.get(e.from),target:a.get(e.to),value:t})).toMutableArray()}}var yX=(e,t,n,r)=>{if(n===`length`||n===`prototype`||n===`arguments`||n===`caller`)return;let i=Object.getOwnPropertyDescriptor(e,n),a=Object.getOwnPropertyDescriptor(t,n);!bX(i,a)&&r||Object.defineProperty(e,n,a)},bX=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},xX=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},SX=(e,t)=>`/* Wrapped ${e}*/\n${t}`,CX=Object.getOwnPropertyDescriptor(Function.prototype,`toString`),wX=Object.getOwnPropertyDescriptor(Function.prototype.toString,`name`),TX=(e,t,n)=>{let r=n===``?``:`with ${n.trim()}() `,i=SX.bind(null,r,t.toString());Object.defineProperty(i,`name`,wX);let{writable:a,enumerable:o,configurable:s}=CX;Object.defineProperty(e,`toString`,{value:i,writable:a,enumerable:o,configurable:s})};function EX(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:r}=e;for(let r of Reflect.ownKeys(t))yX(e,t,r,n);return xX(e,t),TX(e,t,r),e}var DX=2147483647,OX=new WeakMap,kX=new WeakMap,AX=new WeakMap;function jX(e,t){let n=e.get(t);if(n){if(n.maxAge<=Date.now()){e.delete(t);return}return n}}function MX(e,{cacheKey:t,cache:n=new Map,maxAge:r}={}){if(r===0)return e;if(typeof r==`number`&&Number.isFinite(r)){if(r>DX)throw TypeError(`The \`maxAge\` option cannot exceed ${DX}.`);if(r<0)throw TypeError("The `maxAge` option should not be a negative number.")}let i=function(...a){let o=t?t(a):a[0],s=jX(n,o);if(s)return s.data;let c=e.apply(this,a),l=typeof r==`function`?r(...a):r;if(l!==void 0&&l!==1/0){if(!Number.isFinite(l))throw TypeError("The `maxAge` function must return a finite number, `0`, or `Infinity`.");if(l<=0)return c;if(l>DX)throw TypeError(`The \`maxAge\` function result cannot exceed ${DX}.`)}if(n.set(o,{data:c,maxAge:l===void 0||l===1/0?1/0:Date.now()+l}),l!==void 0&&l!==1/0){let e=setTimeout(()=>{n.delete(o),kX.get(i)?.delete(e)},l);e.unref?.();let t=kX.get(i)??new Set;t.add(e),kX.set(i,t)}return c};return EX(i,e,{ignoreNonConfigurable:!0}),OX.set(i,n),AX.set(i,t??(e=>e[0])),i}function NX(e){return typeof e==`string`}function PX(e,t,n){return n.indexOf(e)===t}function FX(e){return e.toLowerCase()===e}function IX(e){return e.indexOf(`,`)===-1?e:e.split(`,`)}function LX(e){if(!e)return e;if(e===`C`||e===`posix`||e===`POSIX`)return`en-US`;if(e.indexOf(`.`)!==-1){var t=e.split(`.`)[0],n=t===void 0?``:t;return LX(n)}if(e.indexOf(`@`)!==-1){var r=e.split(`@`)[0],n=r===void 0?``:r;return LX(n)}if(e.indexOf(`-`)===-1||!FX(e))return e;var i=e.split(`-`),a=i[0],o=i[1];return`${a}-${(o===void 0?``:o).toUpperCase()}`}function RX(e){var t=e===void 0?{}:e,n=t.useFallbackLocale,r=n===void 0?!0:n,i=t.fallbackLocale,a=i===void 0?`en-US`:i,o=[];if(typeof navigator<`u`){for(var s=navigator.languages||[],c=[],l=0,u=s;l<u.length;l++){var d=u[l];c=c.concat(IX(d))}var f=navigator.language,p=f&&IX(f);o=o.concat(c,p)}return r&&o.push(a),o.filter(NX).map(LX).filter(PX)}var zX=MX(RX,{cacheKey:JSON.stringify});function BX(e){return zX(e)[0]||null}var VX=MX(BX,{cacheKey:JSON.stringify});function HX(e,t,n){return function(r,i=n){return t(e(r)+i)}}function UX(e){return function(t){return new Date(e(t).getTime()-1)}}function WX(e,t){return function(n){return[e(n),t(n)]}}function GX(e){if(e instanceof Date)return e.getFullYear();if(typeof e==`number`)return e;let t=Number.parseInt(e,10);if(typeof e==`string`&&!Number.isNaN(t))return t;throw Error(`Failed to get year from date: ${e}.`)}function KX(e){if(e instanceof Date)return e.getMonth();throw Error(`Failed to get month from date: ${e}.`)}function qX(e){if(e instanceof Date)return e.getDate();throw Error(`Failed to get year from date: ${e}.`)}function JX(e){let t=GX(e),n=t+(-t+1)%100,r=new Date;return r.setFullYear(n,0,1),r.setHours(0,0,0,0),r}var YX=HX(GX,JX,-100),XX=HX(GX,JX,100),ZX=UX(XX),QX=HX(GX,ZX,-100),$X=WX(JX,ZX);function eZ(e){let t=GX(e),n=t+(-t+1)%10,r=new Date;return r.setFullYear(n,0,1),r.setHours(0,0,0,0),r}var tZ=HX(GX,eZ,-10),nZ=HX(GX,eZ,10),rZ=UX(nZ),iZ=HX(GX,rZ,-10),aZ=WX(eZ,rZ);function oZ(e){let t=GX(e),n=new Date;return n.setFullYear(t,0,1),n.setHours(0,0,0,0),n}var sZ=HX(GX,oZ,-1),cZ=HX(GX,oZ,1),lZ=UX(cZ),uZ=HX(GX,lZ,-1),dZ=WX(oZ,lZ);function fZ(e,t){return function(n,r=t){let i=GX(n),a=KX(n)+r,o=new Date;return o.setFullYear(i,a,1),o.setHours(0,0,0,0),e(o)}}function pZ(e){let t=GX(e),n=KX(e),r=new Date;return r.setFullYear(t,n,1),r.setHours(0,0,0,0),r}var mZ=fZ(pZ,-1),hZ=fZ(pZ,1),gZ=UX(hZ),_Z=fZ(gZ,-1),vZ=WX(pZ,gZ);function yZ(e,t){return function(n,r=t){let i=GX(n),a=KX(n),o=qX(n)+r,s=new Date;return s.setFullYear(i,a,o),s.setHours(0,0,0,0),e(s)}}function bZ(e){let t=GX(e),n=KX(e),r=qX(e),i=new Date;return i.setFullYear(t,n,r),i.setHours(0,0,0,0),i}var xZ=UX(yZ(bZ,1)),SZ=WX(bZ,xZ);function CZ(e){return qX(gZ(e))}var wZ={GREGORY:`gregory`,HEBREW:`hebrew`,ISLAMIC:`islamic`,ISO_8601:`iso8601`},TZ={gregory:[`en-CA`,`en-US`,`es-AR`,`es-BO`,`es-CL`,`es-CO`,`es-CR`,`es-DO`,`es-EC`,`es-GT`,`es-HN`,`es-MX`,`es-NI`,`es-PA`,`es-PE`,`es-PR`,`es-SV`,`es-VE`,`pt-BR`],hebrew:[`he`,`he-IL`],islamic:[`ar`,`ar-AE`,`ar-BH`,`ar-DZ`,`ar-EG`,`ar-IQ`,`ar-JO`,`ar-KW`,`ar-LY`,`ar-OM`,`ar-QA`,`ar-SA`,`ar-SD`,`ar-SY`,`ar-YE`,`dv`,`dv-MV`,`ps`,`ps-AR`]},EZ=[0,1,2,3,4,5,6],DZ=new Map;function OZ(e){return function(t,n){var r=t||VX();DZ.has(r)||DZ.set(r,new Map);var i=DZ.get(r);return i.has(e)||i.set(e,new Intl.DateTimeFormat(r||void 0,e).format),i.get(e)(n)}}function kZ(e){var t=new Date(e);return new Date(t.setHours(12))}function AZ(e){return function(t,n){return OZ(e)(t,kZ(n))}}var jZ={day:`numeric`},MZ={day:`numeric`,month:`long`,year:`numeric`},NZ={month:`long`},PZ={month:`long`,year:`numeric`},FZ={weekday:`short`},IZ={weekday:`long`},LZ={year:`numeric`},RZ=AZ(jZ),zZ=AZ(MZ),BZ=AZ(NZ),VZ=AZ(PZ),HZ=AZ(FZ),UZ=AZ(IZ),WZ=AZ(LZ),GZ=EZ[0],KZ=EZ[5],qZ=EZ[6];function JZ(e,t){t===void 0&&(t=wZ.ISO_8601);var n=e.getDay();switch(t){case wZ.ISO_8601:return(n+6)%7;case wZ.ISLAMIC:return(n+1)%7;case wZ.HEBREW:case wZ.GREGORY:return n;default:throw Error(`Unsupported calendar type.`)}}function YZ(e){return GX(JX(e))}function XZ(e){return GX(eZ(e))}function ZZ(e,t){t===void 0&&(t=wZ.ISO_8601);var n=GX(e),r=KX(e),i=e.getDate()-JZ(e,t);return new Date(n,r,i)}function QZ(e,t){t===void 0&&(t=wZ.ISO_8601);var n=t===wZ.GREGORY?wZ.GREGORY:wZ.ISO_8601,r=ZZ(e,t),i=GX(e)+1,a,o;do a=new Date(i,0,n===wZ.ISO_8601?4:1),o=ZZ(a,t),--i;while(e<o);return Math.round((r.getTime()-o.getTime())/(864e5*7))+1}function $Z(e,t){switch(e){case`century`:return JX(t);case`decade`:return eZ(t);case`year`:return oZ(t);case`month`:return pZ(t);case`day`:return bZ(t);default:throw Error(`Invalid rangeType: ${e}`)}}function eQ(e,t){switch(e){case`century`:return YX(t);case`decade`:return tZ(t);case`year`:return sZ(t);case`month`:return mZ(t);default:throw Error(`Invalid rangeType: ${e}`)}}function tQ(e,t){switch(e){case`century`:return XX(t);case`decade`:return nZ(t);case`year`:return cZ(t);case`month`:return hZ(t);default:throw Error(`Invalid rangeType: ${e}`)}}function nQ(e,t){switch(e){case`decade`:return tZ(t,-100);case`year`:return sZ(t,-10);case`month`:return mZ(t,-12);default:throw Error(`Invalid rangeType: ${e}`)}}function rQ(e,t){switch(e){case`decade`:return nZ(t,100);case`year`:return cZ(t,10);case`month`:return hZ(t,12);default:throw Error(`Invalid rangeType: ${e}`)}}function iQ(e,t){switch(e){case`century`:return ZX(t);case`decade`:return rZ(t);case`year`:return lZ(t);case`month`:return gZ(t);case`day`:return xZ(t);default:throw Error(`Invalid rangeType: ${e}`)}}function aQ(e,t){switch(e){case`century`:return QX(t);case`decade`:return iZ(t);case`year`:return uZ(t);case`month`:return _Z(t);default:throw Error(`Invalid rangeType: ${e}`)}}function oQ(e,t){switch(e){case`decade`:return iZ(t,-100);case`year`:return uZ(t,-10);case`month`:return _Z(t,-12);default:throw Error(`Invalid rangeType: ${e}`)}}function sQ(e,t){switch(e){case`century`:return $X(t);case`decade`:return aZ(t);case`year`:return dZ(t);case`month`:return vZ(t);case`day`:return SZ(t);default:throw Error(`Invalid rangeType: ${e}`)}}function cQ(e,t,n){var r=[t,n].sort(function(e,t){return e.getTime()-t.getTime()});return[$Z(e,r[0]),iQ(e,r[1])]}function lQ(e,t,n){return n.map(function(n){return(t||WZ)(e,n)}).join(` – `)}function uQ(e,t,n){return lQ(e,t,$X(n))}function dQ(e,t,n){return lQ(e,t,aZ(n))}function fQ(e){return e.getDay()===new Date().getDay()}function pQ(e,t){t===void 0&&(t=wZ.ISO_8601);var n=e.getDay();switch(t){case wZ.ISLAMIC:case wZ.HEBREW:return n===KZ||n===qZ;case wZ.ISO_8601:case wZ.GREGORY:return n===qZ||n===GZ;default:throw Error(`Unsupported calendar type.`)}}var mQ=`react-calendar__navigation`;function hQ(e){var t=e.activeStartDate,n=e.drillUp,r=e.formatMonthYear,i=r===void 0?VZ:r,a=e.formatYear,o=a===void 0?WZ:a,s=e.locale,c=e.maxDate,l=e.minDate,u=e.navigationAriaLabel,d=u===void 0?``:u,f=e.navigationAriaLive,p=e.navigationLabel,m=e.next2AriaLabel,h=m===void 0?``:m,g=e.next2Label,_=g===void 0?`»`:g,v=e.nextAriaLabel,y=v===void 0?``:v,b=e.nextLabel,x=b===void 0?`›`:b,S=e.prev2AriaLabel,C=S===void 0?``:S,w=e.prev2Label,T=w===void 0?`«`:w,E=e.prevAriaLabel,D=E===void 0?``:E,O=e.prevLabel,k=O===void 0?`‹`:O,ee=e.setActiveStartDate,A=e.showDoubleView,j=e.view,te=e.views.indexOf(j)>0,M=j!==`century`,ne=eQ(j,t),N=M?nQ(j,t):void 0,P=tQ(j,t),re=M?rQ(j,t):void 0,ie=(function(){if(ne.getFullYear()<0)return!0;var e=aQ(j,t);return l&&l>=e})(),ae=M&&(function(){if(N.getFullYear()<0)return!0;var e=oQ(j,t);return l&&l>=e})(),oe=c&&c<P,se=M&&c&&c<re;function ce(){ee(ne,`prev`)}function le(){ee(N,`prev2`)}function ue(){ee(P,`next`)}function de(){ee(re,`next2`)}function F(e){var t=(function(){switch(j){case`century`:return uQ(s,o,e);case`decade`:return dQ(s,o,e);case`year`:return o(s,e);case`month`:return i(s,e);default:throw Error(`Invalid view: ${j}.`)}})();return p?p({date:e,label:t,locale:s||VX()||void 0,view:j}):t}function fe(){var e=`${mQ}__label`;return(0,R.jsxs)(`button`,{"aria-label":d,"aria-live":f,className:e,disabled:!te,onClick:n,style:{flexGrow:1},type:`button`,children:[(0,R.jsx)(`span`,{className:`${e}__labelText ${e}__labelText--from`,children:F(t)}),A?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{className:`${e}__divider`,children:` – `}),(0,R.jsx)(`span`,{className:`${e}__labelText ${e}__labelText--to`,children:F(P)})]}):null]})}return(0,R.jsxs)(`div`,{className:mQ,children:[T!==null&&M?(0,R.jsx)(`button`,{"aria-label":C,className:`${mQ}__arrow ${mQ}__prev2-button`,disabled:ae,onClick:le,type:`button`,children:T}):null,k!==null&&(0,R.jsx)(`button`,{"aria-label":D,className:`${mQ}__arrow ${mQ}__prev-button`,disabled:ie,onClick:ce,type:`button`,children:k}),fe(),x!==null&&(0,R.jsx)(`button`,{"aria-label":y,className:`${mQ}__arrow ${mQ}__next-button`,disabled:oe,onClick:ue,type:`button`,children:x}),_!==null&&M?(0,R.jsx)(`button`,{"aria-label":h,className:`${mQ}__arrow ${mQ}__next2-button`,disabled:se,onClick:de,type:`button`,children:_}):null]})}var gQ=function(){return gQ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},gQ.apply(this,arguments)},_Q=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function vQ(e){return`${e}%`}function yQ(e){var t=e.children,n=e.className,r=e.count,i=e.direction,a=e.offset,o=e.style,s=e.wrap,c=_Q(e,[`children`,`className`,`count`,`direction`,`offset`,`style`,`wrap`]);return(0,R.jsx)(`div`,gQ({className:n,style:gQ({display:`flex`,flexDirection:i,flexWrap:s?`wrap`:`nowrap`},o)},c,{children:L.Children.map(t,function(e,t){var n=a&&t===0?vQ(100*a/r):null;return(0,L.cloneElement)(e,gQ(gQ({},e.props),{style:{flexBasis:vQ(100/r),flexShrink:0,flexGrow:0,overflow:`hidden`,marginLeft:n,marginInlineStart:n,marginInlineEnd:0}}))})}))}function bQ(e,t,n){return t&&t>e?t:n&&n<e?n:e}function xQ(e,t){return t[0]<=e&&t[1]>=e}function SQ(e,t){return e[0]<=t[0]&&e[1]>=t[1]}function CQ(e,t){return xQ(e[0],t)||xQ(e[1],t)}function wQ(e,t,n){var r=CQ(t,e),i=[];if(r){i.push(n);var a=xQ(e[0],t),o=xQ(e[1],t);a&&i.push(`${n}Start`),o&&i.push(`${n}End`),a&&o&&i.push(`${n}BothEnds`)}return i}function TQ(e){return Array.isArray(e)?e[0]!==null&&e[1]!==null:e!==null}function EQ(e){if(!e)throw Error(`args is required`);var t=e.value,n=e.date,r=e.hover,i=`react-calendar__tile`,a=[i];if(!n)return a;var o=new Date,s=(function(){if(Array.isArray(n))return n;var t=e.dateType;if(!t)throw Error(`dateType is required when date is not an array of two dates`);return sQ(t,n)})();if(xQ(o,s)&&a.push(`${i}--now`),!t||!TQ(t))return a;var c=(function(){if(Array.isArray(t))return t;var n=e.valueType;if(!n)throw Error(`valueType is required when value is not an array of two dates`);return sQ(n,t)})();SQ(c,s)?a.push(`${i}--active`):CQ(c,s)&&a.push(`${i}--hasActive`);var l=wQ(c,s,`${i}--range`);if(a.push.apply(a,l),r&&(Array.isArray(t)?t:[t]).length===1){var u=wQ(r>c[0]?[c[0],r]:[r,c[0]],s,`${i}--hover`);a.push.apply(a,u)}return a}function DQ(e){for(var t=e.className,n=e.count,r=n===void 0?3:n,i=e.dateTransform,a=e.dateType,o=e.end,s=e.hover,c=e.offset,l=e.renderTile,u=e.start,d=e.step,f=d===void 0?1:d,p=e.value,m=e.valueType,h=[],g=u;g<=o;g+=f){var _=i(g);h.push(l({classes:EQ({date:_,dateType:a,hover:s,value:p,valueType:m}),date:_}))}return(0,R.jsx)(yQ,{className:t,count:r,offset:c,wrap:!0,children:h})}function OQ(e){var t=e.activeStartDate,n=e.children,r=e.classes,i=e.date,a=e.formatAbbr,o=e.locale,s=e.maxDate,c=e.maxDateTransform,l=e.minDate,u=e.minDateTransform,d=e.onClick,f=e.onMouseOver,p=e.style,m=e.tileClassName,h=e.tileContent,g=e.tileDisabled,_=e.view,v=(0,L.useMemo)(function(){return typeof m==`function`?m({activeStartDate:t,date:i,view:_}):m},[t,i,m,_]),y=(0,L.useMemo)(function(){return typeof h==`function`?h({activeStartDate:t,date:i,view:_}):h},[t,i,h,_]);return(0,R.jsxs)(`button`,{className:z(r,v),disabled:l&&u(l)>i||s&&c(s)<i||g?.({activeStartDate:t,date:i,view:_}),onClick:d?function(e){return d(i,e)}:void 0,onFocus:f?function(){return f(i)}:void 0,onMouseOver:f?function(){return f(i)}:void 0,style:p,type:`button`,children:[a?(0,R.jsx)(`abbr`,{"aria-label":a(o,i),children:n}):n,y]})}var kQ=function(){return kQ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},kQ.apply(this,arguments)},AQ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},jQ=`react-calendar__century-view__decades__decade`;function MQ(e){var t=e.classes,n=t===void 0?[]:t,r=e.currentCentury,i=e.formatYear,a=i===void 0?WZ:i,o=AQ(e,[`classes`,`currentCentury`,`formatYear`]),s=o.date,c=o.locale,l=[];return n&&l.push.apply(l,n),jQ&&l.push(jQ),JX(s).getFullYear()!==r&&l.push(`${jQ}--neighboringCentury`),(0,R.jsx)(OQ,kQ({},o,{classes:l,maxDateTransform:rZ,minDateTransform:eZ,view:`century`,children:dQ(c,a,s)}))}var NQ=function(){return NQ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},NQ.apply(this,arguments)},PQ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function FQ(e){var t=e.activeStartDate,n=e.hover,r=e.showNeighboringCentury,i=e.value,a=e.valueType,o=PQ(e,[`activeStartDate`,`hover`,`showNeighboringCentury`,`value`,`valueType`]),s=YZ(t);return(0,R.jsx)(DQ,{className:`react-calendar__century-view__decades`,dateTransform:eZ,dateType:`decade`,end:s+(r?119:99),hover:n,renderTile:function(e){var n=e.date,r=PQ(e,[`date`]);return(0,R.jsx)(MQ,NQ({},o,r,{activeStartDate:t,currentCentury:s,date:n}),n.getTime())},start:s,step:10,value:i,valueType:a})}var IQ=function(){return IQ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},IQ.apply(this,arguments)};function LQ(e){function t(){return(0,R.jsx)(FQ,IQ({},e))}return(0,R.jsx)(`div`,{className:`react-calendar__century-view`,children:t()})}var RQ=function(){return RQ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},RQ.apply(this,arguments)},zQ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},BQ=`react-calendar__decade-view__years__year`;function VQ(e){var t=e.classes,n=t===void 0?[]:t,r=e.currentDecade,i=e.formatYear,a=i===void 0?WZ:i,o=zQ(e,[`classes`,`currentDecade`,`formatYear`]),s=o.date,c=o.locale,l=[];return n&&l.push.apply(l,n),BQ&&l.push(BQ),eZ(s).getFullYear()!==r&&l.push(`${BQ}--neighboringDecade`),(0,R.jsx)(OQ,RQ({},o,{classes:l,maxDateTransform:lZ,minDateTransform:oZ,view:`decade`,children:a(c,s)}))}var HQ=function(){return HQ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},HQ.apply(this,arguments)},UQ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function WQ(e){var t=e.activeStartDate,n=e.hover,r=e.showNeighboringDecade,i=e.value,a=e.valueType,o=UQ(e,[`activeStartDate`,`hover`,`showNeighboringDecade`,`value`,`valueType`]),s=XZ(t);return(0,R.jsx)(DQ,{className:`react-calendar__decade-view__years`,dateTransform:oZ,dateType:`year`,end:s+(r?11:9),hover:n,renderTile:function(e){var n=e.date,r=UQ(e,[`date`]);return(0,R.jsx)(VQ,HQ({},o,r,{activeStartDate:t,currentDecade:s,date:n}),n.getTime())},start:s,value:i,valueType:a})}var GQ=function(){return GQ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},GQ.apply(this,arguments)};function KQ(e){function t(){return(0,R.jsx)(WQ,GQ({},e))}return(0,R.jsx)(`div`,{className:`react-calendar__decade-view`,children:t()})}var qQ=function(){return qQ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},qQ.apply(this,arguments)},JQ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},YQ=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},XQ=`react-calendar__year-view__months__month`;function ZQ(e){var t=e.classes,n=t===void 0?[]:t,r=e.formatMonth,i=r===void 0?BZ:r,a=e.formatMonthYear,o=a===void 0?VZ:a,s=JQ(e,[`classes`,`formatMonth`,`formatMonthYear`]),c=s.date,l=s.locale;return(0,R.jsx)(OQ,qQ({},s,{classes:YQ(YQ([],n,!0),[XQ],!1),formatAbbr:o,maxDateTransform:gZ,minDateTransform:pZ,view:`year`,children:i(l,c)}))}var QQ=function(){return QQ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},QQ.apply(this,arguments)},$Q=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function e$(e){var t=e.activeStartDate,n=e.hover,r=e.value,i=e.valueType,a=$Q(e,[`activeStartDate`,`hover`,`value`,`valueType`]),o=0,s=11,c=GX(t);return(0,R.jsx)(DQ,{className:`react-calendar__year-view__months`,dateTransform:function(e){var t=new Date;return t.setFullYear(c,e,1),pZ(t)},dateType:`month`,end:s,hover:n,renderTile:function(e){var n=e.date,r=$Q(e,[`date`]);return(0,R.jsx)(ZQ,QQ({},a,r,{activeStartDate:t,date:n}),n.getTime())},start:o,value:r,valueType:i})}var t$=function(){return t$=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t$.apply(this,arguments)};function n$(e){function t(){return(0,R.jsx)(e$,t$({},e))}return(0,R.jsx)(`div`,{className:`react-calendar__year-view`,children:t()})}var r$=function(){return r$=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r$.apply(this,arguments)},i$=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},a$=`react-calendar__month-view__days__day`;function o$(e){var t=e.calendarType,n=e.classes,r=n===void 0?[]:n,i=e.currentMonthIndex,a=e.formatDay,o=a===void 0?RZ:a,s=e.formatLongDate,c=s===void 0?zZ:s,l=i$(e,[`calendarType`,`classes`,`currentMonthIndex`,`formatDay`,`formatLongDate`]),u=l.date,d=l.locale,f=[];return r&&f.push.apply(f,r),a$&&f.push(a$),pQ(u,t)&&f.push(`${a$}--weekend`),u.getMonth()!==i&&f.push(`${a$}--neighboringMonth`),(0,R.jsx)(OQ,r$({},l,{classes:f,formatAbbr:c,maxDateTransform:xZ,minDateTransform:bZ,view:`month`,children:o(d,u)}))}var s$=function(){return s$=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},s$.apply(this,arguments)},c$=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function l$(e){var t=e.activeStartDate,n=e.calendarType,r=e.hover,i=e.showFixedNumberOfWeeks,a=e.showNeighboringMonth,o=e.value,s=e.valueType,c=c$(e,[`activeStartDate`,`calendarType`,`hover`,`showFixedNumberOfWeeks`,`showNeighboringMonth`,`value`,`valueType`]),l=GX(t),u=KX(t),d=i||a,f=JZ(t,n),p=d?0:f,m=(d?-f:0)+1;return(0,R.jsx)(DQ,{className:`react-calendar__month-view__days`,count:7,dateTransform:function(e){var t=new Date;return t.setFullYear(l,u,e),bZ(t)},dateType:`day`,hover:r,end:(function(){if(i)return m+42-1;var e=CZ(t);if(a){var r=new Date;return r.setFullYear(l,u,e),r.setHours(0,0,0,0),e+(7-JZ(r,n)-1)}return e})(),renderTile:function(e){var r=e.date,i=c$(e,[`date`]);return(0,R.jsx)(o$,s$({},c,i,{activeStartDate:t,calendarType:n,currentMonthIndex:u,date:r}),r.getTime())},offset:p,start:m,value:o,valueType:s})}var u$=`react-calendar__month-view__weekdays`,d$=`${u$}__weekday`;function f$(e){for(var t=e.calendarType,n=e.formatShortWeekday,r=n===void 0?HZ:n,i=e.formatWeekday,a=i===void 0?UZ:i,o=e.locale,s=e.onMouseLeave,c=pZ(new Date),l=GX(c),u=KX(c),d=[],f=1;f<=7;f+=1){var p=new Date(l,u,f-JZ(c,t)),m=a(o,p);d.push((0,R.jsx)(`div`,{className:z(d$,fQ(p)&&`${d$}--current`,pQ(p,t)&&`${d$}--weekend`),children:(0,R.jsx)(`abbr`,{"aria-label":m,title:m,children:r(o,p).replace(`.`,``)})},f))}return(0,R.jsx)(yQ,{className:u$,count:7,onFocus:s,onMouseOver:s,children:d})}var p$=function(){return p$=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},p$.apply(this,arguments)},m$=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},h$=`react-calendar__tile`;function g$(e){var t=e.onClickWeekNumber,n=e.weekNumber,r=(0,R.jsx)(`span`,{children:n});if(t){var i=e.date,a=e.onClickWeekNumber,o=e.weekNumber,s=m$(e,[`date`,`onClickWeekNumber`,`weekNumber`]);return(0,R.jsx)(`button`,p$({},s,{className:h$,onClick:function(e){return a(o,i,e)},type:`button`,children:r}))}else{e.date,e.onClickWeekNumber,e.weekNumber;var s=m$(e,[`date`,`onClickWeekNumber`,`weekNumber`]);return(0,R.jsx)(`div`,p$({},s,{className:h$,children:r}))}}function _$(e){var t=e.activeStartDate,n=e.calendarType,r=e.onClickWeekNumber,i=e.onMouseLeave,a=e.showFixedNumberOfWeeks,o=(function(){if(a)return 6;var e=CZ(t)-(7-JZ(t,n));return 1+Math.ceil(e/7)})(),s=(function(){for(var e=GX(t),r=KX(t),i=qX(t),a=[],s=0;s<o;s+=1)a.push(ZZ(new Date(e,r,i+s*7),n));return a})();return(0,R.jsx)(yQ,{className:`react-calendar__month-view__weekNumbers`,count:o,direction:`column`,onFocus:i,onMouseOver:i,style:{flexBasis:`calc(100% * (1 / 8)`,flexShrink:0},children:s.map(function(e){return QZ(e,n)}).map(function(e,t){var n=s[t];if(!n)throw Error(`date is not defined`);return(0,R.jsx)(g$,{date:n,onClickWeekNumber:r,weekNumber:e},e)})})}var v$=function(){return v$=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},v$.apply(this,arguments)},y$=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function b$(e){if(e)for(var t=0,n=Object.entries(TZ);t<n.length;t++){var r=n[t],i=r[0];if(r[1].includes(e))return i}return wZ.ISO_8601}function x$(e){var t=e.activeStartDate,n=e.locale,r=e.onMouseLeave,i=e.showFixedNumberOfWeeks,a=e.calendarType,o=a===void 0?b$(n):a,s=e.formatShortWeekday,c=e.formatWeekday,l=e.onClickWeekNumber,u=e.showWeekNumbers,d=y$(e,[`calendarType`,`formatShortWeekday`,`formatWeekday`,`onClickWeekNumber`,`showWeekNumbers`]);function f(){return(0,R.jsx)(f$,{calendarType:o,formatShortWeekday:s,formatWeekday:c,locale:n,onMouseLeave:r})}function p(){return u?(0,R.jsx)(_$,{activeStartDate:t,calendarType:o,onClickWeekNumber:l,onMouseLeave:r,showFixedNumberOfWeeks:i}):null}function m(){return(0,R.jsx)(l$,v$({calendarType:o},d))}var h=`react-calendar__month-view`;return(0,R.jsx)(`div`,{className:z(h,u?`${h}--weekNumbers`:``),children:(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-end`},children:[p(),(0,R.jsxs)(`div`,{style:{flexGrow:1,width:`100%`},children:[f(),m()]})]})})}var S$=function(){return S$=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},S$.apply(this,arguments)},C$=`react-calendar`,w$=[`century`,`decade`,`year`,`month`],T$=[`decade`,`year`,`month`,`day`],E$=new Date;E$.setFullYear(1,0,1),E$.setHours(0,0,0,0);var D$=new Date(864e13);function O$(e){return e instanceof Date?e:new Date(e)}function k$(e,t){return w$.slice(w$.indexOf(e),w$.indexOf(t)+1)}function A$(e,t,n){return k$(t,n).indexOf(e)!==-1}function j$(e,t,n){return e&&A$(e,t,n)?e:n}function M$(e){return T$[w$.indexOf(e)]}function N$(e,t){var n=Array.isArray(e)?e[t]:e;if(!n)return null;var r=O$(n);if(Number.isNaN(r.getTime()))throw Error(`Invalid date: ${e}`);return r}function P$(e,t){var n=e.value,r=e.minDate,i=e.maxDate,a=e.maxDetail,o=N$(n,t);if(!o)return null;var s=M$(a);return bQ((function(){switch(t){case 0:return $Z(s,o);case 1:return iQ(s,o);default:throw Error(`Invalid index value: ${t}`)}})(),r,i)}var F$=function(e){return P$(e,0)},I$=function(e){return P$(e,1)},L$=function(e){return[F$,I$].map(function(t){return t(e)})};function R$(e){var t=e.maxDate,n=e.maxDetail,r=e.minDate,i=e.minDetail,a=e.value,o=e.view;return $Z(j$(o,i,n),F$({value:a,minDate:r,maxDate:t,maxDetail:n})||new Date)}function z$(e){var t=e.activeStartDate,n=e.defaultActiveStartDate,r=e.defaultValue,i=e.defaultView,a=e.maxDate,o=e.maxDetail,s=e.minDate,c=e.minDetail,l=e.value,u=e.view,d=j$(u,c,o),f=t||n;return f?$Z(d,f):R$({maxDate:a,maxDetail:o,minDate:s,minDetail:c,value:l||r,view:u||i})}function B$(e){return e&&(!Array.isArray(e)||e.length===1)}function V$(e,t){return e instanceof Date&&t instanceof Date&&e.getTime()===t.getTime()}var H$=(0,L.forwardRef)(function(e,t){var n=e.activeStartDate,r=e.allowPartialRange,i=e.calendarType,a=e.className,o=e.defaultActiveStartDate,s=e.defaultValue,c=e.defaultView,l=e.formatDay,u=e.formatLongDate,d=e.formatMonth,f=e.formatMonthYear,p=e.formatShortWeekday,m=e.formatWeekday,h=e.formatYear,g=e.goToRangeStartOnSelect,_=g===void 0?!0:g,v=e.inputRef,y=e.locale,b=e.maxDate,x=b===void 0?D$:b,S=e.maxDetail,C=S===void 0?`month`:S,w=e.minDate,T=w===void 0?E$:w,E=e.minDetail,D=E===void 0?`century`:E,O=e.navigationAriaLabel,k=e.navigationAriaLive,ee=e.navigationLabel,A=e.next2AriaLabel,j=e.next2Label,te=e.nextAriaLabel,M=e.nextLabel,ne=e.onActiveStartDateChange,N=e.onChange,P=e.onClickDay,re=e.onClickDecade,ie=e.onClickMonth,ae=e.onClickWeekNumber,oe=e.onClickYear,se=e.onDrillDown,ce=e.onDrillUp,le=e.onViewChange,ue=e.prev2AriaLabel,de=e.prev2Label,F=e.prevAriaLabel,fe=e.prevLabel,pe=e.returnValue,me=pe===void 0?`start`:pe,he=e.selectRange,ge=e.showDoubleView,_e=e.showFixedNumberOfWeeks,I=e.showNavigation,ve=I===void 0?!0:I,ye=e.showNeighboringCentury,be=e.showNeighboringDecade,xe=e.showNeighboringMonth,Se=xe===void 0?!0:xe,Ce=e.showWeekNumbers,we=e.tileClassName,Te=e.tileContent,Ee=e.tileDisabled,De=e.value,Oe=e.view,ke=(0,L.useState)(o),Ae=ke[0],je=ke[1],Me=(0,L.useState)(null),Ne=Me[0],Pe=Me[1],Fe=(0,L.useState)(Array.isArray(s)?s.map(function(e){return e===null?null:O$(e)}):s==null?null:O$(s)),Ie=Fe[0],Le=Fe[1],Re=(0,L.useState)(c),ze=Re[0],Be=Re[1],Ve=n||Ae||z$({activeStartDate:n,defaultActiveStartDate:o,defaultValue:s,defaultView:c,maxDate:x,maxDetail:C,minDate:T,minDetail:D,value:De,view:Oe}),He=(function(){var e=(function(){return he&&B$(Ie)||De===void 0?Ie:De})();return e?Array.isArray(e)?e.map(function(e){return e===null?null:O$(e)}):e===null?null:O$(e):null})(),Ue=M$(C),We=j$(Oe||ze,D,C),Ge=k$(D,C),Ke=he?Ne:null,qe=Ge.indexOf(We)<Ge.length-1,Je=Ge.indexOf(We)>0,Ye=(0,L.useCallback)(function(e){return(function(){switch(me){case`start`:return F$;case`end`:return I$;case`range`:return L$;default:throw Error(`Invalid returnValue.`)}})()({maxDate:x,maxDetail:C,minDate:T,value:e})},[x,C,T,me]),Xe=(0,L.useCallback)(function(e,t){je(e);var n={action:t,activeStartDate:e,value:He,view:We};ne&&!V$(Ve,e)&&ne(n)},[Ve,ne,He,We]),Ze=(0,L.useCallback)(function(e,t){var n=(function(){switch(We){case`century`:return re;case`decade`:return oe;case`year`:return ie;case`month`:return P;default:throw Error(`Invalid view: ${We}.`)}})();n&&n(e,t)},[P,re,ie,oe,We]),Qe=(0,L.useCallback)(function(e,t){if(qe){Ze(e,t);var n=Ge[Ge.indexOf(We)+1];if(!n)throw Error(`Attempted to drill down from the lowest view.`);je(e),Be(n);var r={action:`drillDown`,activeStartDate:e,value:He,view:n};ne&&!V$(Ve,e)&&ne(r),le&&We!==n&&le(r),se&&se(r)}},[Ve,qe,ne,Ze,se,le,He,We,Ge]),$e=(0,L.useCallback)(function(){if(Je){var e=Ge[Ge.indexOf(We)-1];if(!e)throw Error(`Attempted to drill up from the highest view.`);var t=$Z(e,Ve);je(t),Be(e);var n={action:`drillUp`,activeStartDate:t,value:He,view:e};ne&&!V$(Ve,t)&&ne(n),le&&We!==e&&le(n),ce&&ce(n)}},[Ve,Je,ne,ce,le,He,We,Ge]),et=(0,L.useCallback)(function(e,t){var n=He;Ze(e,t);var i=he&&!B$(n),a;if(he)if(i)a=$Z(Ue,e);else{if(!n)throw Error(`previousValue is required`);if(Array.isArray(n))throw Error(`previousValue must not be an array`);a=cQ(Ue,n,e)}else a=Ye(e);var o=!he||i||_?R$({maxDate:x,maxDetail:C,minDate:T,minDetail:D,value:a,view:We}):null;t.persist(),je(o),Le(a);var s={action:`onChange`,activeStartDate:o,value:a,view:We};if(ne&&!V$(Ve,o)&&ne(s),N)if(he){if(!B$(a))N(a||null,t);else if(r){if(Array.isArray(a))throw Error(`value must not be an array`);N([a||null,null],t)}}else N(a||null,t)},[Ve,r,Ye,_,x,C,T,D,ne,N,Ze,he,He,Ue,We]);function tt(e){Pe(e)}function nt(){Pe(null)}(0,L.useImperativeHandle)(t,function(){return{activeStartDate:Ve,drillDown:Qe,drillUp:$e,onChange:et,setActiveStartDate:Xe,value:He,view:We}},[Ve,Qe,$e,et,Xe,He,We]);function rt(e){var t={activeStartDate:e?tQ(We,Ve):$Z(We,Ve),hover:Ke,locale:y,maxDate:x,minDate:T,onClick:qe?Qe:et,onMouseOver:he?tt:void 0,tileClassName:we,tileContent:Te,tileDisabled:Ee,value:He,valueType:Ue};switch(We){case`century`:return(0,R.jsx)(LQ,S$({formatYear:h,showNeighboringCentury:ye},t));case`decade`:return(0,R.jsx)(KQ,S$({formatYear:h,showNeighboringDecade:be},t));case`year`:return(0,R.jsx)(n$,S$({formatMonth:d,formatMonthYear:f},t));case`month`:return(0,R.jsx)(x$,S$({calendarType:i,formatDay:l,formatLongDate:u,formatShortWeekday:p,formatWeekday:m,onClickWeekNumber:ae,onMouseLeave:he?nt:void 0,showFixedNumberOfWeeks:_e===void 0?ge:_e,showNeighboringMonth:Se,showWeekNumbers:Ce},t));default:throw Error(`Invalid view: ${We}.`)}}function it(){return ve?(0,R.jsx)(hQ,{activeStartDate:Ve,drillUp:$e,formatMonthYear:f,formatYear:h,locale:y,maxDate:x,minDate:T,navigationAriaLabel:O,navigationAriaLive:k,navigationLabel:ee,next2AriaLabel:A,next2Label:j,nextAriaLabel:te,nextLabel:M,prev2AriaLabel:ue,prev2Label:de,prevAriaLabel:F,prevLabel:fe,setActiveStartDate:Xe,showDoubleView:ge,view:We,views:Ge}):null}return(0,R.jsxs)(`div`,{className:z(C$,he&&(Array.isArray(He)?He:[He]).length===1&&`${C$}--selectRange`,ge&&`${C$}--doubleView`,a),ref:v,children:[it(),(0,R.jsxs)(`div`,{className:`${C$}__viewContainer`,onBlur:he?nt:void 0,onMouseLeave:he?nt:void 0,children:[rt(),ge?rt(!0):null]})]})}),U$=H(J,{shouldForwardProp:e=>e!==`expand`})(({expand:e})=>({width:e?`100%`:void 0}));function W$({open:e}){let t=WE(e);return(0,R.jsx)(q,{title:`Filter`,enterDelay:300,children:(0,R.jsx)(zl,{onClick:()=>t(!0),size:`small`,children:(0,R.jsx)(Ex,{})})})}function G$(e){let t=e.copyToClipboardRows;return(0,R.jsx)(Jy,{children:(0,R.jsxs)(ob,{children:[e.columns.map(t=>(0,R.jsxs)(U$,{align:t.numeric?`right`:`left`,expand:t.expanded,sortDirection:e.sort.orderBy===t.id?e.sort.order:!1,children:[(0,R.jsx)(q,{title:`Sort`,placement:t.numeric?`bottom-end`:`bottom-start`,enterDelay:300,children:(0,R.jsx)(pb,{active:e.sort.orderBy===t.id,direction:e.sort.order,onClick:()=>e.sort.handleRequestSort(t.id),children:t.label})}),t.openFilterDialog?(0,R.jsx)(W$,{open:t.openFilterDialog}):void 0]},t.id)),e.showDetailsCol?(0,R.jsx)(U$,{padding:`checkbox`,children:t?(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(zl,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>n1(e.columns,t),size:`large`,children:(0,R.jsx)(Mx,{})})}):void 0}):void 0]})})}var K$=new Intl.DateTimeFormat([],{year:`numeric`,month:`short`,day:`numeric`}),q$=new Intl.DateTimeFormat([],{year:`numeric`,month:`long`}),J$=H(H$)(({theme:e})=>({width:`350px`,"& .react-calendar__month-view__weekdays":{textAlign:`center`,textTransform:`uppercase`,fontWeight:`bold`},"& .react-calendar__tile":{textAlign:`center`,padding:`.75em .5em`,margin:0,border:0,background:`none`,outline:`none`,cursor:`pointer`,"&:hover":{backgroundColor:`rgb(230, 230, 230)`},"&--active":{backgroundColor:e.palette.primary.light,"&:hover":{backgroundColor:e.palette.primary.dark}}},"&.react-calendar--selectRange .react-calendar__tile--hover":{backgroundColor:`rgb(230, 230, 230)`}}));function Y$(e){let[t,n]=(0,L.useState)(!1),r=e.zoom.current_date_zoom?e.zoom.current_date_zoom.start:e.zoom.default_date_range[0],i=VC(e.zoom.current_date_zoom?e.zoom.current_date_zoom.end:e.zoom.default_date_range[1],-1);function a(t){e.zoom.set_date_zoom_range({start:t[0],end:VC(t[1],1)}),n(!1)}let o=a;return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(`span`,{children:[K$.format(e.zoom.current_date_zoom?.start??e.zoom.default_date_range[0]),` -`,` `,K$.format(e.zoom.current_date_zoom?.end??e.zoom.default_date_range[1])]}),(0,R.jsx)(q,{title:`Zoom To Date Range`,children:(0,R.jsx)(zl,{onClick:()=>n(!0),size:`large`,children:(0,R.jsx)(sS,{})})}),(0,R.jsx)(q,{title:`Reset Date Range`,children:(0,R.jsx)(zl,{onClick:()=>e.zoom.set_date_zoom_range(void 0),size:`large`,children:(0,R.jsx)(cS,{})})}),(0,R.jsxs)(lh,{open:t,onClose:()=>n(!1),children:[(0,R.jsxs)(fh,{children:[`Select Date Range `,q$.format(e.zoom.default_date_range[0])]}),(0,R.jsx)(dh,{children:(0,R.jsx)(J$,{minDate:e.zoom.default_date_range[0],maxDate:e.zoom.default_date_range[1],calendarType:`gregory`,selectRange:!0,showNavigation:!1,showNeighboringMonth:!1,value:[r,i],onChange:o})}),(0,R.jsx)(uh,{children:(0,R.jsx)(K,{onClick:()=>n(!1),children:`Close`})})]})]})}var X$=(0,L.memo)(function({zoom:e,tpage:t,count:n}){let r;return e&&e.type===`Last30Days`?r=(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(q,{title:`Last 24 hours`,children:(0,R.jsx)(K,{onClick:()=>e.set_days_back(1),style:{color:`rgba(0, 0, 0, 0.54)`},children:`24h`})}),(0,R.jsx)(q,{title:`Last 2 days`,children:(0,R.jsx)(K,{onClick:()=>e.set_days_back(2),style:{color:`rgba(0, 0, 0, 0.54)`},children:`2d`})}),(0,R.jsx)(q,{title:`Last 3 days`,children:(0,R.jsx)(K,{onClick:()=>e.set_days_back(3),style:{color:`rgba(0, 0, 0, 0.54)`},children:`3d`})}),(0,R.jsx)(q,{title:`Last 4 days`,children:(0,R.jsx)(K,{onClick:()=>e.set_days_back(4),style:{color:`rgba(0, 0, 0, 0.54)`},children:`4d`})}),(0,R.jsx)(q,{title:`Last 5 days`,children:(0,R.jsx)(K,{onClick:()=>e.set_days_back(5),style:{color:`rgba(0, 0, 0, 0.54)`},children:`5d`})}),(0,R.jsx)(q,{title:`Last 6 days`,children:(0,R.jsx)(K,{onClick:()=>e.set_days_back(6),style:{color:`rgba(0, 0, 0, 0.54)`},children:`6d`})}),(0,R.jsx)(q,{title:`Last 1 week`,children:(0,R.jsx)(K,{onClick:()=>e.set_days_back(7),style:{color:`rgba(0, 0, 0, 0.54)`},children:`1w`})}),(0,R.jsx)(q,{title:`Last 2 weeks`,children:(0,R.jsx)(K,{onClick:()=>e.set_days_back(14),style:{color:`rgba(0, 0, 0, 0.54)`},children:`2w`})}),(0,R.jsx)(q,{title:`Last 3 weeks`,children:(0,R.jsx)(K,{onClick:()=>e.set_days_back(21),style:{color:`rgba(0, 0, 0, 0.54)`},children:`3w`})}),(0,R.jsx)(q,{title:`Last 30 days`,children:(0,R.jsx)(K,{onClick:()=>e.set_days_back(null),style:{color:`rgba(0, 0, 0, 0.54)`},children:`30d`})})]}):e&&e.type===`ZoomIntoRange`?r=(0,R.jsx)(Y$,{zoom:e}):e&&e.type===`ExtendDays`&&(r=(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(q,{title:`Extend 1 day previous`,children:(0,R.jsx)(zl,{onClick:()=>e.extend(-1),size:`large`,children:(0,R.jsx)(eS,{})})}),(0,R.jsx)(W,{variant:`caption`,children:e.curStart.toLocaleDateString()+` to `+e.curEnd.toLocaleDateString()}),(0,R.jsx)(q,{title:`Extend 1 day`,children:(0,R.jsx)(zl,{onClick:()=>e.extend(1),size:`large`,children:(0,R.jsx)($x,{})})})]})),(0,R.jsxs)(Qy,{children:[(0,R.jsx)(W,{color:`textSecondary`,variant:`caption`,children:`Rows per page:`}),(0,R.jsx)(bv,{style:{marginLeft:8,marginRight:`1em`},value:t.rowsPerPage,SelectDisplayProps:{style:{color:`rgba(0, 0, 0, 0.54)`}},input:(0,R.jsx)(Yf,{}),onChange:e=>{t.setRowsPerPage(e.target.value);let r=Math.ceil(n/e.target.value)-1;t.page>r&&t.setPage(r)},children:[10,15,20,50].map(e=>(0,R.jsx)(I_,{value:e,children:e},e))}),(0,R.jsx)(W,{color:`textSecondary`,variant:`caption`,children:`${n===0?0:t.page*t.rowsPerPage+1}-${Math.min(n,(t.page+1)*t.rowsPerPage)} of ${n}`}),(0,R.jsx)(zl,{onClick:()=>t.setPage(0),disabled:t.page===0,"aria-label":`First Page`,size:`large`,children:(0,R.jsx)(Dx,{})}),(0,R.jsx)(zl,{onClick:()=>t.setPage(t.page-1),disabled:t.page===0,"aria-label":`Previous Page`,size:`large`,children:(0,R.jsx)(Ix,{})}),(0,R.jsx)(zl,{onClick:()=>t.setPage(t.page+1),disabled:t.page>=Math.ceil(n/t.rowsPerPage)-1,"aria-label":`Next Page`,size:`large`,children:(0,R.jsx)(Lx,{})}),(0,R.jsx)(zl,{onClick:()=>t.setPage(Math.max(0,Math.ceil(n/t.rowsPerPage)-1)),disabled:t.page>=Math.ceil(n/t.rowsPerPage)-1,"aria-label":`Last Page`,size:`large`,children:(0,R.jsx)(zx,{})}),e?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`div`,{style:{flexGrow:1}}),r]}):void 0]})}),Z$=class extends L.PureComponent{render(){let e=this.props.onClickDetails,t=[...this.props.pageData],n=this.props.rowsPerPage===void 0?0:Math.max(0,this.props.rowsPerPage-t.length);return(0,R.jsxs)(My,{children:[t.map((t,n)=>(0,R.jsxs)(ob,{children:[this.props.columns.map(e=>(0,R.jsx)(U$,{align:e.numeric?`right`:`left`,expand:e.expanded,children:e.Cell?(0,R.jsx)(e.Cell,{row:t}):e.getDisplay(t)},e.id)),e?(0,R.jsx)(U$,{padding:`checkbox`,children:(0,R.jsx)(zl,{onClick:n=>e(n,t),size:`large`,children:(0,R.jsx)(Hx,{})})}):void 0]},n)),n>0?(0,R.jsx)(ob,{style:{height:53*n},children:(0,R.jsx)(J,{colSpan:this.props.columns.length+(this.props.onClickDetails?1:0),style:{textAlign:`center`},children:t.length===0?this.props.emptyMessage:void 0})}):void 0]})}};function Q$(e){let[t,n]=(0,L.useState)(void 0);return(0,L.useMemo)(()=>{let r;return r=e.type===`Last30`?{type:`Last30Days`,set_days_back:e=>{if(e){let t=new Date;n({start:VC(t,-e),end:WC(t,1)})}else n(void 0)}}:{type:`ZoomIntoRange`,default_date_range:[e.month,HC(e.month,1)],current_date_zoom:t,set_date_zoom_range:n},{zoom:r,zoomRange:t}},[e,t,n])}function $$(){let[e,t]=(0,L.useState)(0),[n,r]=(0,L.useState)(10);return(0,L.useMemo)(()=>({page:e,setPage:t,rowsPerPage:n,setRowsPerPage:r}),[e,t,n,r])}function e1(e,t,n){let[r,i]=(0,L.useState)(e),[a,o]=(0,L.useState)(n??`asc`);return(0,L.useMemo)(()=>{function e(e){r===e?o(a===`asc`?`desc`:`asc`):(i(e),o(`asc`))}let n={asc:t[0].getForSort??t[0].getDisplay};for(let e of t)e.id===r&&a===`asc`?n={asc:e.getForSort??e.getDisplay}:e.id===r&&(n={desc:e.getForSort??e.getDisplay});return{orderBy:r,order:a,sortOn:n,handleRequestSort:e}},[r,i,a,o,t])}function t1(e,t){let n=`<table>
|
|
321
|
+
<thead><tr>`;for(let t of e)t.ignoreDuringExport||(n+=`<th>`+t.label+`</th>`);n+=`</tr></thead>
|
|
322
|
+
<tbody>
|
|
323
|
+
`;for(let r of t){n+=`<tr>`;for(let t of e)if(!t.ignoreDuringExport){let e=t.getForExport?t.getForExport(r):t.getDisplay(r);n+=`<td>`+e+`</td>`}n+=`</tr>
|
|
324
|
+
`}return n+=`</tbody>
|
|
325
|
+
</table>`,n}function n1(e,t){(0,Mk.default)(t1(e,t))}var r1=function(e){return e[e.Date=0]=`Date`,e[e.Serial=1]=`Serial`,e[e.Workorder=2]=`Workorder`,e[e.Inspected=3]=`Inspected`,e[e.Failed=4]=`Failed`,e}(r1||{}),i1=[{id:r1.Date,numeric:!1,label:`Date`,getDisplay:e=>e.time.toLocaleString(),getForSort:e=>e.time.getTime()},{id:r1.Serial,numeric:!1,label:`Serial`,getDisplay:e=>e.serial||``},{id:r1.Workorder,numeric:!1,label:`Workorder`,getDisplay:e=>e.workorder||``},{id:r1.Inspected,numeric:!1,label:`Inspected`,getDisplay:e=>e.toInspect?`inspected`:``},{id:r1.Failed,numeric:!1,label:`Failed`,getDisplay:e=>e.failed?`failed`:``}];function a1(e,t,n){let[r,i]=(0,L.useState)(void 0),a;return e&&e===`Last30Days`?a={type:`Last30Days`,set_days_back:e=>{if(e){let t=new Date;i({start:VC(t,-e),end:WC(t,1)})}else i(void 0)}}:e&&e===`ZoomIntoRange`?a={type:`ZoomIntoRange`,default_date_range:n,current_date_zoom:r,set_date_zoom_range:i}:e&&t&&e===`ExtendDays`&&(a={type:`ExtendDays`,curStart:n[0],curEnd:n[1],extend:t}),{zoom:a,zoomRange:r}}var o1=(0,L.memo)(function(e){let t=WE(II),n=e1(r1.Date,i1),[r,i]=(0,L.useState)($T.empty()),[a,o]=(0,L.useState)(10),[s,c]=(0,L.useState)(void 0),l=a1(e.zoomType,e.extendDateRange,e.default_date_range),u=kY(e.points,l.zoomRange,n.sortOn);return(0,R.jsx)(`div`,{style:{width:`100%`,marginTop:`1em`},children:X.of(u).toSortedArray(([e])=>e).map(([u,d])=>{let f=Math.min(r.get(u)??0,Math.ceil(d.material.length/a));return(0,R.jsxs)(Hc,{expanded:u===s,onChange:(e,t)=>c(t?u:void 0),children:[(0,R.jsxs)(vl,{expandIcon:(0,R.jsx)(wx,{}),children:[(0,R.jsx)(W,{variant:`h6`,style:{flexBasis:`33.33%`,flexShrink:0},children:u}),(0,R.jsxs)(W,{variant:`caption`,children:[d.material.length,` total parts, `,d.failedCnt,` failed`]})]}),(0,R.jsx)(Kc,{children:(0,R.jsxs)(`div`,{style:{width:`100%`},children:[(0,R.jsxs)(Ty,{children:[(0,R.jsx)(G$,{columns:i1,sort:n,showDetailsCol:!0}),(0,R.jsx)(Z$,{columns:i1,pageData:X.of(d.material).drop(f*a).take(a),rowsPerPage:a,onClickDetails:e.hideOpenDetailColumn?void 0:(e,n)=>t({type:`MatSummary`,summary:{materialID:n.materialID,partName:n.partName,serial:n.serial,workorderId:n.workorder}})})]}),(0,R.jsx)(X$,{tpage:{page:f,rowsPerPage:a,setPage:e=>i(r.set(u,e)),setRowsPerPage:o},count:d.material.length,zoom:l.zoom})]})})]},u)})})}),s1=20,c1=20,l1=120,u1=20;function d1({link:e,path:t,strokeWidth:n,setTooltip:r}){let[i,a]=(0,L.useState)(!1);if(t===null)return null;function o(t){let n=iA(t);n!==null&&(r({left:n.x,top:n.y,data:e}),a(!0))}function s(){a(!1),r(null)}return(0,R.jsx)(`path`,{d:t,stroke:i?C[600]:C[300],strokeWidth:n,opacity:.2,fill:`none`,onMouseMove:o,onMouseLeave:s})}function f1({node:e}){return e.x1===void 0||e.x0===void 0||e.y1===void 0||e.y0===void 0?null:(0,R.jsxs)(`g`,{transform:`translate(${e.x0}, ${e.y0})`,children:[(0,R.jsx)(`rect`,{width:e.x1-e.x0,height:e.y1-e.y0,fill:C[800],opacity:.8,stroke:`none`}),(0,R.jsx)(`text`,{x:18,y:(e.y1-e.y0)/2,children:e.name})]})}var p1=(0,L.memo)(function({data:e,setTooltip:t,parentHeight:n,parentWidth:r}){let{nodes:i,links:a}=(0,L.useMemo)(()=>{let{nodes:t,links:i}=vX(e);return t.length===0?{nodes:[],links:[]}:(XY().nodeWidth(10).nodePadding(10).nodeAlign(zY).extent([[s1,c1],[r-l1,n-u1-c1]])({nodes:t,links:i}),{nodes:t,links:i})},[e,r,n]),o=mX();return(0,R.jsxs)(`svg`,{width:r,height:n,children:[(0,R.jsx)(`g`,{children:i.map((e,t)=>(0,R.jsx)(f1,{node:e},t))}),(0,R.jsx)(`g`,{children:a.map((e,n)=>(0,R.jsx)(d1,{link:e,path:o(e),strokeWidth:Math.max(e.width??1,1),setTooltip:t},n))})]})});function m1({tooltip:e}){return e===null?null:(0,R.jsxs)(`div`,{children:[e.data.source.name,` ➞ `,e.data.target.name,`: `,e.data.value,` parts`]})}var h1=(0,L.memo)(function({data:e}){let t=(0,L.useMemo)(()=>Z(null),[]),n=WE(t);return(0,R.jsx)(`div`,{style:{position:`relative`},children:(0,R.jsx)(_A,{sx:{height:{xs:`calc(100vh - 230px)`,md:`calc(100vh - 182px)`,xl:`calc(100vh - 130px)`},width:`100%`},chart:({height:t,width:r})=>(0,R.jsx)(p1,{data:e,setTooltip:n,parentHeight:t,parentWidth:r}),tooltipAtom:t,TooltipContent:m1})})}),g1=DO(e=>e(lL)?`aaa`:void 0),_1=DO(e=>e(lL)?`CMM`:void 0),v1=Z(!1);function y1(e){let[t,n]=GE(g1),[r,i]=GE(_1),[a,o]=GE(v1),s,c=e.restrictToPart||t;c&&r&&(s=e.inspectionlogs.get(new CL(c,r))?.valuesToLazySeq()??[]);let l=e.inspectionlogs.keysToLazySeq().map(e=>e.part).distinct().toSortedArray(e=>e),u=e.inspectionlogs.keysToLazySeq().map(e=>e.inspType).distinct().toSortedArray(e=>e);return(0,R.jsxs)(G,{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`,children:[(0,R.jsxs)(G,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[e.subtitle?(0,R.jsx)(W,{variant:`subtitle1`,children:e.subtitle}):void 0,(0,R.jsx)(G,{flexGrow:1}),e.onlyTable?void 0:(0,R.jsx)(bh,{size:`small`,children:(0,R.jsxs)(bv,{autoWidth:!0,value:a?`table`:`sankey`,onChange:e=>o(e.target.value===`table`),children:[(0,R.jsx)(I_,{value:`sankey`,children:`Sankey`},`sankey`),(0,R.jsx)(I_,{value:`table`,children:`Table`},`table`)]})}),(0,R.jsx)(bh,{size:`small`,children:(0,R.jsxs)(bv,{name:`inspection-sankey-select-type`,autoWidth:!0,displayEmpty:!0,style:{marginRight:`1em`,marginLeft:`1em`},value:r||``,onChange:e=>i(e.target.value),children:[r?void 0:(0,R.jsx)(I_,{value:``,children:(0,R.jsx)(`em`,{children:`Select Inspection Type`})},0),u.map(e=>(0,R.jsx)(I_,{value:e,children:e},e))]})}),e.restrictToPart===void 0?(0,R.jsx)(bh,{size:`small`,children:(0,R.jsxs)(bv,{name:`inspection-sankey-select-part`,autoWidth:!0,displayEmpty:!0,value:c||``,onChange:e=>n(e.target.value),children:[c?void 0:(0,R.jsx)(I_,{value:``,children:(0,R.jsx)(`em`,{children:`Select Part`})},0),l.map(e=>(0,R.jsx)(I_,{value:e,children:(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(IH,{part:e,size:30}),(0,R.jsx)(`span`,{style:{marginRight:`1em`},children:e})]})},e))]})}):void 0,s?(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(zl,{onClick:()=>s?NY(c||``,r||``,s):void 0,style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,R.jsx)(Mx,{})})}):void 0]}),(0,R.jsx)(`main`,{children:s?a||e.onlyTable?(0,R.jsx)(o1,{zoomType:e.zoomType,points:s,default_date_range:e.default_date_range,extendDateRange:e.extendDateRange,hideOpenDetailColumn:e.hideOpenDetailColumn}):(0,R.jsx)(h1,{data:s}):void 0})]})}var b1=Z(null),x1=BO(Z(async(e,{signal:t})=>{let n=e(b1);if(n==null)return $T.empty();let r=await TC.get(n.curStart,n.curEnd,t);return X.of(r).flatMap(DL).filter(e=>e.key.part===n.part).toLookupMap(e=>e.key,e=>e.entry.cntr,e=>e.entry)})),S1=BO(Z(async e=>{let t=e(b1);if(t==null)return $T.empty();let n=[];for(let e of OC)n.push(await e.get(t.curStart,t.curEnd));return X.of(n).flatMap(e=>e).flatMap(DL).filter(e=>e.key.part===t.part).toLookupMap(e=>e.key,e=>e.entry.cntr,e=>e.entry)})),C1=Z(e=>{let t=e(x1),n=e(S1),r=t.state===`hasData`?t.data:null,i=n.state===`hasData`?n.data:null;return r?i?$T.union((e,t)=>e.union(t),r,i):r:i||$T.empty()});function w1(e){return t=>t===null?null:e<0?{curStart:VC(t.curStart,e),curEnd:t.curEnd,part:t.part}:{curStart:t.curStart,curEnd:VC(t.curEnd,e),part:t.part}}var T1=function(e){return e[e.Date=0]=`Date`,e[e.Part=1]=`Part`,e[e.InspType=2]=`InspType`,e[e.Serial=3]=`Serial`,e[e.Workorder=4]=`Workorder`,e}(T1||{}),E1=[{id:T1.Date,numeric:!1,label:`Date`,getDisplay:e=>e.time.toLocaleString(),getForSort:e=>e.time.getTime()},{id:T1.Part,numeric:!1,label:`Part`,getDisplay:e=>e.part},{id:T1.InspType,numeric:!1,label:`Inspection`,getDisplay:e=>e.inspType},{id:T1.Serial,numeric:!1,label:`Serial`,getDisplay:e=>e.serial||``},{id:T1.Workorder,numeric:!1,label:`Workorder`,getDisplay:e=>e.workorder||``}];function D1(e){let t=dL(),n=e1(T1.Date,E1),r=$$(),i=WE(II),a=Math.min(r.page,Math.ceil(e.failed.length/r.rowsPerPage)),o=X.of(e.failed).sortBy(n.sortOn);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(Ty,{children:[(0,R.jsx)(G$,{columns:E1,sort:n,showDetailsCol:!t}),(0,R.jsx)(Z$,{columns:E1,pageData:o.drop(a*r.rowsPerPage).take(r.rowsPerPage),rowsPerPage:r.rowsPerPage,onClickDetails:t?void 0:(e,t)=>{i({type:`MatSummary`,summary:{materialID:t.materialID,partName:t.part,serial:t.serial,workorderId:t.workorder}})}})]}),(0,R.jsx)(X$,{tpage:{...r,page:a},count:e.failed.length})]})}function O1(){let e=Q(TL),t=(0,L.useMemo)(()=>{let t=fw();return AY(X.of(e).flatMap(([e,t])=>t.valuesToLazySeq()),VC(t,-4),VC(t,1))},[e]);return(0,R.jsxs)(`div`,{children:[(0,R.jsxs)(G,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,R.jsx)(W,{variant:`subtitle1`,children:`Inspections marked as failed in the last 5 days`}),(0,R.jsx)(G,{flexGrow:1}),(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(zl,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>FY(t),size:`large`,children:(0,R.jsx)(Mx,{})})})]}),(0,R.jsx)(D1,{failed:t})]})}function k1(){let e=dL(),t=WE(II),[n,r]=(0,L.useState)(e?`00000000i9`:``),[i,a]=(0,L.useState)(!1),[o,s]=(0,L.useState)(null);function c(){n&&n!==``&&(a(!0),s(null),TC.materialForSerial(n).then(e=>{let i=X.of(e).maxBy(e=>e.materialID);i?(t({type:`MatDetails`,details:i}),r(``),s(null)):s(`No material found with serial `+n)}).catch(e=>{xC.isApiException(e)?s(e.response):e instanceof Error?s(e.message):s(e.toString())}).finally(()=>a(!1)))}return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(Rv,{direction:`row`,spacing:2,alignItems:`center`,marginLeft:`auto`,marginRight:`auto`,children:[(0,R.jsx)(`div`,{children:(0,R.jsx)(Bb,{label:n===``?`Serial`:`Serial (press enter)`,value:n,onChange:e=>r(e.target.value),onKeyPress:e=>{e.key===`Enter`&&n!==``&&(e.preventDefault(),c())}})}),(0,R.jsx)(`div`,{children:(0,R.jsx)(K,{variant:`contained`,color:`secondary`,disabled:n===``||i,onClick:c,children:i?(0,R.jsxs)(Rv,{direction:`row`,spacing:2,children:[(0,R.jsx)(Nl,{}),` Searching`]}):(0,R.jsx)(R.Fragment,{children:`Lookup`})})})]}),o&&o!==``?(0,R.jsx)(`div`,{children:o}):void 0]})}function A1(e){let t=e[0];if(t===void 0)return fw();let n=t.endUTC;for(let t of e)t.type===Y.MachineCycle&&(n=t.endUTC);return n}function j1(){let e=Q(BO(zI)),t=Q(KI),n=e.state===`hasData`?e.data:null;return n?(0,R.jsx)(eU,{partName:n.partName,serial:n.serial,subtitle:`Path `+OY(jY(t))+` at `+A1(t).toLocaleString()}):(0,R.jsx)(`div`,{children:`Serial Details`})}function M1({setStep:e}){let t=Q(BO(zI)),n=t.state===`hasData`?t.data:null,r=Q(KI),i=WE(b1),a=WE(II);return(0,R.jsxs)(Rv,{direction:`row`,spacing:2,mt:`2em`,children:[n?(0,R.jsx)(K,{variant:`contained`,color:`secondary`,onClick:()=>{let t=A1(r);i({part:n?.partName??``,curStart:XC(VC(t,-5)),curEnd:cw(VC(t,5))}),e(2)},children:`Lookup Similar Paths`}):void 0,(0,R.jsx)(K,{variant:`contained`,style:{marginLeft:`2em`},onClick:()=>{a(null),i(null),e(0)},children:`Reset`})]})}function N1(e){let t=Q(zI),n=Q(KI),[r,i]=GE(b1),a=Q(C1),o=WE(II);if(t===null)return null;function s(e){i(w1(e))}return(0,R.jsxs)(`div`,{children:[(0,R.jsx)(y1,{inspectionlogs:a,restrictToPart:t.partName,subtitle:`Paths for `+t.partName+` around `+A1(n).toLocaleString(),default_date_range:r?[r.curStart,r.curEnd]:[],zoomType:r?`ExtendDays`:void 0,extendDateRange:s,hideOpenDetailColumn:!0,onlyTable:!0}),(0,R.jsx)(K,{variant:`contained`,style:{marginTop:`2em`},onClick:()=>{o(null),i(null),e.setStep(0)},children:`Reset`})]})}function P1(){let[e,t]=(0,L.useState)(0),n=Q(II),r=e;return r===0&&n&&(r=1),(0,R.jsxs)(Rv,{direction:`column`,spacing:2,children:[(0,R.jsxs)(my,{activeStep:r,orientation:`horizontal`,children:[(0,R.jsx)(Vv,{children:(0,R.jsx)(iy,{children:`Select Material`})}),(0,R.jsx)(Vv,{children:(0,R.jsx)(iy,{children:(0,R.jsx)(j1,{})})}),(0,R.jsx)(Vv,{children:(0,R.jsx)(iy,{children:`Lookup similar paths`})})]}),r===0?(0,R.jsxs)(Rv,{direction:`column`,spacing:4,children:[(0,R.jsx)(W,{children:`Enter a serial number, scan a barcode, or click on a material in the table below to see details.`}),(0,R.jsx)(k1,{}),(0,R.jsx)(O1,{})]}):r===1?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(FH,{fallback:(0,R.jsx)(sU,{}),children:(0,R.jsx)(aU,{})}),(0,R.jsx)(M1,{setStep:t})]}):r===2?(0,R.jsx)(FH,{children:(0,R.jsx)(N1,{setStep:t})}):void 0]})}function F1(){return fL(`Quality Material`),(0,R.jsx)(`main`,{style:{padding:`24px`},children:(0,R.jsx)(P1,{})})}var I1=(0,L.memo)(function(){fL(`Paths`);let e=Q(TL);return(0,R.jsx)(y1,{inspectionlogs:(0,L.useMemo)(()=>{let t=fw(),n=VC(t,-6),r=VC(t,1);return e.collectValues(e=>{let t=e.filter(e=>e.time>=n&&e.time<=r);return t.size===0?null:t})},[e]),default_date_range:[VC(fw(),-6),VC(fw(),1)],subtitle:`Paths from the last 7 days`})}),L1=Z(!1);function R1(e){let t=``;return e.comments&&e.comments.length>0&&(t=`; `+e.comments[e.comments.length-1].comment),`Due ${e.dueDate.toLocaleDateString()}; Completed ${e.completedQuantity} of ${e.plannedQuantity}${t}`}function z1({work:e}){return e.plannedQuantity<=e.completedQuantity?(0,R.jsx)(lx,{}):(0,R.jsx)(Qx,{})}function B1(){let[e,t]=(0,L.useState)(null),n=Q(zI),[r]=$I(),i=WE(L1);return(0,R.jsx)(Bb,{sx:{mt:`5px`},label:e===null||e===``?`Workorder`:`Workorder (press enter)`,value:e??``,onChange:e=>t(e.target.value),onKeyPress:t=>{t.key===`Enter`&&n&&e&&e!==``&&(t.preventDefault(),r(n,e),i(!1))}})}function V1(){let e=Q(zI),t=Q(YI),n=WE(L1),[r]=$I();return(0,R.jsx)(Fg,{children:(t??[]).map(t=>(0,R.jsx)(Zg,{children:(0,R.jsxs)(Hg,{onClick:()=>{e&&r(e,t.workorderId),n(!1)},children:[(0,R.jsx)(n_,{children:(0,R.jsx)(z1,{work:t})}),(0,R.jsx)(s_,{primary:t.workorderId,secondary:R1(t)})]})},t.workorderId))})}var H1=(0,L.memo)(function(){let[e,t]=GE(L1),n;return n=e===!1?(0,R.jsx)(`p`,{children:`None`}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(fh,{children:`Select Workorder`}),(0,R.jsx)(dh,{children:(0,R.jsxs)(FH,{children:[(0,R.jsx)(B1,{}),(0,R.jsx)(V1,{})]})}),(0,R.jsx)(uh,{children:(0,R.jsx)(K,{onClick:()=>t(!1),color:`primary`,children:`Cancel`})})]}),(0,R.jsx)(lh,{open:e,onClose:()=>t(!1),maxWidth:`md`,children:n})}),U1=Z(!1);function W1(){let[e,t]=(0,L.useState)(null),n=Q(zI),[r]=XI(),i=WE(U1);return(0,R.jsx)(Bb,{sx:{mt:`5px`},label:e===``||e===null?`Inspection Type`:`Inspection Type (press enter)`,value:e??``,onChange:e=>t(e.target.value),onKeyPress:t=>{t.key===`Enter`&&n&&e&&e!==``&&(t.preventDefault(),r({mat:n,inspType:e,inspect:!0}),i(!1))}})}function G1(){let e=Q(zI),[t]=XI(),n=Q(zL),r=X.of(n).sortBy(e=>e),i=WE(U1);return e===null?null:(0,R.jsx)(Fg,{children:r.map(n=>(0,R.jsx)(Zg,{children:(0,R.jsxs)(Hg,{onClick:()=>{t({mat:e,inspType:n,inspect:!0}),i(!1)},children:[(0,R.jsx)(n_,{children:(0,R.jsx)(Xx,{})}),(0,R.jsx)(s_,{primary:n})]})},n))})}function K1(){let e=WE(U1),t=Q(BI);return t===null||t.materialID<0?null:(0,R.jsx)(K,{color:`primary`,onClick:()=>e(!0),children:`Signal Inspection`})}var q1=(0,L.memo)(function(){let[e,t]=GE(U1),n;return n=e===!1?(0,R.jsx)(`p`,{children:`None`}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(fh,{children:`Select Inspection Type`}),(0,R.jsx)(dh,{children:(0,R.jsxs)(FH,{children:[(0,R.jsx)(W1,{}),(0,R.jsx)(G1,{})]})}),(0,R.jsx)(uh,{children:(0,R.jsx)(K,{onClick:()=>t(!1),color:`primary`,children:`Cancel`})})]}),(0,R.jsx)(lh,{open:e,onClose:()=>t(!1),maxWidth:`md`,children:n})}),J1=function(e){return e[e.Material=0]=`Material`,e[e.FreeMaterialZone=1]=`FreeMaterialZone`,e[e.CompletedCollapsedMaterialZone=2]=`CompletedCollapsedMaterialZone`,e[e.CompletedExpandedMaterialZone=3]=`CompletedExpandedMaterialZone`,e[e.PalletFaceZone=4]=`PalletFaceZone`,e[e.QueueZone=5]=`QueueZone`,e}({});function Y1(e){switch(e.type){case J1.Material:return`Material-`+(e.material?.materialID??-1).toString();case J1.FreeMaterialZone:return`FreeMaterialZone`;case J1.CompletedCollapsedMaterialZone:return`CompletedCollapsedMaterialZone`;case J1.CompletedExpandedMaterialZone:return`CompletedExpandedMaterialZone`;case J1.PalletFaceZone:return`PalletFaceZone-`+e.face.toString();case J1.QueueZone:return`QueueZone-`+e.queue}}function X1(e){switch(e.type){case J1.Material:return[e.type,e.material];case J1.FreeMaterialZone:case J1.CompletedCollapsedMaterialZone:case J1.CompletedExpandedMaterialZone:return[e.type,null];case J1.PalletFaceZone:return[e.type,e.face];case J1.QueueZone:return[e.type,e.queue]}}function Z1(e){let t,n,r=new Map,i=new Map,a=[];for(let o of e.values())switch(o.type){case J1.FreeMaterialZone:t=o.elem;break;case J1.CompletedCollapsedMaterialZone:case J1.CompletedExpandedMaterialZone:n=o.elem;break;case J1.PalletFaceZone:r.set(o.face,o.elem);break;case J1.QueueZone:i.set(o.queue,o.elem);break;case J1.Material:o.material&&a.push([o.elem,o.material]);break}return{freeMaterial:t,completedMaterial:n,faces:r,queues:i,material:a}}function Q1(e,t){if(!e)return[];let n=Z1(t);if(!n.completedMaterial)return[];let r=[],i=new Map,a=new Map,o=0;for(let[t,s]of X.of(n.material).sortBy(([e])=>e.left,([e])=>e.top))switch(s.action.type){case qS.UnloadToCompletedMaterial:case qS.UnloadToInProcess:if(s.action.type===qS.UnloadToCompletedMaterial&&(!s.action.unloadIntoQueue||s.action.unloadIntoQueue===``))r.push({fromX:t.right,fromY:t.top+t.height/2,toY:t.top+t.height/2,toX:n.completedMaterial?n.completedMaterial.left+2:e.right-10,curveDirection:1});else{let i,c;s.action.unloadIntoQueue?(i=n.queues.get(s.action.unloadIntoQueue),c=a.get(s.action.unloadIntoQueue)??0,a.set(s.action.unloadIntoQueue,c+1)):(i=n.freeMaterial,c=o,o+=1),r.push({fromX:t.left,fromY:t.top+t.height/2,toX:i===void 0?e.left+2:i.right-5,toY:i===void 0?t.top+t.height/2:i.top+20*(c+1),curveDirection:1})}break;case qS.Loading:if(s.action.loadOntoFace)if(s.location.type===GS.OnPallet)if(s.location.palletNum===s.action.loadOntoPalletNum&&s.location.face===s.action.loadOntoFace)r.push({fromX:t.right,fromY:t.top+t.height*3/4,toX:t.left+t.width*7/8,toY:t.bottom,curveDirection:-1});else{let e=n.faces.get(s.action.loadOntoFace);e&&(s.action.loadOntoFace<(s.location.face??0)?r.push({fromX:t.left,fromY:t.top+t.height/2,toX:t.left,toY:e.bottom+20,curveDirection:-1}):r.push({fromX:t.left,fromY:t.top+t.height/2,toX:t.left,toY:e.top-20,curveDirection:1}))}else{let e=n.faces.get(s.action.loadOntoFace);if(e!==void 0){let n=i.get(s.action.loadOntoFace)??0;i.set(s.action.loadOntoFace,n+1),r.push({fromX:t.right,fromY:t.top+t.height/2,toX:e.left+20,toY:e.top+50+20*n,curveDirection:-1})}}break}return r.map(t=>({fromX:t.fromX-e.left,fromY:t.fromY-e.top,toX:t.toX-e.left,toY:t.toY-e.top,curveDirection:t.curveDirection}))}function $1(e){let t=e.getBoundingClientRect();return{left:t.left+window.scrollX,top:t.top+window.scrollY,width:t.width,height:t.height,bottom:t.bottom+window.scrollY,right:t.right+window.scrollX}}function e0(e){let t=(e.fromX+e.toX)/2,n=(e.fromY+e.toY)/2,r=Math.atan2(e.toY-e.fromY,e.toX-e.fromX)+Math.PI*e.curveDirection/2,i=t+50*Math.cos(r),a=n+50*Math.sin(r);return`M${e.fromX},${e.fromY} Q ${i} ${a} ${e.toX} ${e.toY}`}var t0=(0,L.memo)(function({container:e,arrowsWithRefs:t}){let[,n]=(0,L.useState)({height:window.innerHeight,width:window.innerWidth});return(0,L.useEffect)(()=>{function e(){n({height:window.innerHeight,width:window.innerWidth})}return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[n]),(0,R.jsx)(`g`,{children:Q1(e.current?$1(e.current):null,t.collectValues(e=>e.elem.current?{...e,elem:$1(e.elem.current)}:null)).map((e,t)=>(0,R.jsx)(`path`,{style:{fill:`none`,stroke:`rgba(0,0,0,0.15)`,strokeWidth:2},d:e0(e),markerEnd:`url(#arrow)`},t))})}),n0=(0,L.createContext)(void 0),r0=(0,L.memo)(function({children:e,hideArrows:t,whiteBackground:n}){let r=(0,L.useRef)(null),[i,a]=(0,L.useState)($T.empty()),o=(0,L.useMemo)(()=>({registerNode(e,t,n){a(t&&n?r=>r.set(e,{...t,elem:n}):t=>t.delete(e))}}),[a]);return(0,R.jsxs)(`div`,{style:{position:`relative`},children:[(0,R.jsxs)(`svg`,{style:{position:`absolute`,pointerEvents:`none`,width:`100%`,height:`100%`,top:0,right:0,zIndex:-1,backgroundColor:n?`white`:`#F8F8F8`},children:[(0,R.jsx)(`defs`,{children:(0,R.jsx)(`marker`,{id:`arrow`,markerWidth:6,markerHeight:10,refX:`0`,refY:`3`,orient:`auto`,markerUnits:`strokeWidth`,children:(0,R.jsx)(`path`,{d:`M0,0 L0,6 L5,3 z`,fill:`rgba(0,0,0,0.15)`})})}),t?void 0:(0,R.jsx)(t0,{container:r,arrowsWithRefs:i})]}),(0,R.jsx)(`div`,{ref:r,children:(0,R.jsx)(n0.Provider,{value:o,children:e})})]})});function i0(e){let t=(0,L.useContext)(n0);if(!t)throw Error(`useMoveMaterialArrowRef must be used within a MoveMaterialArrowContainer`);let n=(0,L.useRef)(null);return(0,L.useEffect)(()=>{let r=Y1(e);return t.registerNode(r,e,n),()=>{t.registerNode(r,null,null)}},[t,...X1(e)]),n}function a0({kind:e,children:t}){return(0,R.jsx)(`div`,{ref:i0(e),children:t})}var o0=45,s0=o0+10;function c0(){let e=Q(GO),t=Q(JE),n=X.of(e.material).filter(e=>e.location.type===GS.OnPallet||e.action.type===qS.Loading).toRLookup(e=>e.location.palletNum??e.action.loadOntoPalletNum??0),r=X.ofObject(e.pallets).filter(([e,t])=>t.currentPalletLocation.loc===HS.LoadUnload).toOrderedMap(([e,t])=>[t.currentPalletLocation.num,{lulNum:t.currentPalletLocation.num,pal:{pallet:t,mats:n.get(t.palletNum)??[]}}]),i=X.ofObject(e.pallets).filter(([,e])=>e.currentPalletLocation.loc===HS.Machine||e.currentPalletLocation.loc===HS.MachineQueue).map(([e,t])=>t).groupBy(e=>e.currentPalletLocation.group,e=>e.currentPalletLocation.num).toLookupOrderedMap(([[e,t],n])=>e,([[e,t],n])=>t,([[t,r],i])=>{let a=i.find(e=>e.currentPalletLocation.loc===HS.Machine),o=a?n.get(a.palletNum)??[]:null,s=i.find(e=>e.currentPalletLocation.loc===HS.MachineQueue),c=s?n.get(s.palletNum)??[]:null,l=!0,u=c?.[0];if(u&&u.lastCompletedMachiningRouteStopIndex!==null&&u.lastCompletedMachiningRouteStopIndex!==void 0){let n=e.jobs[u.jobUnique]?.procsAndPaths?.[u.process-1]?.paths?.[u.path-1]?.stops?.[u.lastCompletedMachiningRouteStopIndex];n.stationGroup===t&&n.stationNums.includes(r)&&(l=!1)}return l?{name:t+` `+r.toString(),inbound:s?{pallet:s,mats:c??[]}:null,worktable:a?{pallet:a,mats:o??[]}:null,outbound:null}:{name:t+` `+r.toString(),inbound:null,worktable:a?{pallet:a,mats:o??[]}:null,outbound:s?{pallet:s,mats:c??[]}:null}}),a=X.ofObject(e.pallets).filter(([e,t])=>t.currentPalletLocation.loc===HS.Buffer||t.currentPalletLocation.loc===HS.Cart).collect(([e,t])=>{let r=n.get(t.palletNum);return!r||r.length===0?null:{pallet:t,mats:r}}).toOrderedMap(e=>[e.pallet.palletNum,e]),o=1,s=1,c=VC(new Date,-7),l=t.valuesToLazySeq().filter(e=>e.routeEndUTC>c).concat(X.ofObject(e.jobs).map(([e,t])=>t)).flatMap(e=>e.procsAndPaths).flatMap(e=>e.paths);for(let e of l){for(let t of e.load.concat(e.unload))o=Math.max(o,t);e.face&&(s=Math.max(s,e.face));for(let t of e.stops)i=i.alter(t.stationGroup,e=>{e??=XT.empty();for(let n of t.stationNums)e=e.alter(n,e=>e||{name:t.stationGroup+` `+n.toString(),inbound:null,worktable:null,outbound:null});return e})}for(let e=1;e<=o;e++)r=r.alter(e,t=>t||{lulNum:e,pal:null});for(let t of Object.values(e.pallets))s=Math.max(s,t.numFaces);for(let t of e.material)t.location.face!==null&&t.location.face!==void 0&&(s=Math.max(s,t.location.face));let u=XT.empty();if(e.machineLocations&&e.machineLocations.length>0)for(let t of e.machineLocations){i=i.alter(t.machineGroup,e=>{if(!e||t.machineNum===void 0)return e;let n=e.delete(t.machineNum);if(n.size!==0)return n});for(let n of t.possibleLoadStations){let i;r=r.alter(n,e=>{i=e});let a=X.of(i?.pal?.mats??[]).toLookup(n=>{if(n.action.type===qS.Machining)return`Machining`;if(n.action.type!==qS.Waiting)return`Loading`;if(n.lastCompletedMachiningRouteStopIndex!==null&&n.lastCompletedMachiningRouteStopIndex!==void 0){let r=e.jobs[n.jobUnique]?.procsAndPaths?.[n.process-1]?.paths?.[n.path-1]?.stops?.[n.lastCompletedMachiningRouteStopIndex];if(!r||r.stationGroup===t.machineGroup&&r.stationNums.includes(t.machineNum))return`Loading`}return`Ready`}),o={lulNum:n,machineMoving:t.moving,machineCurrentlyAtLoad:n===t.currentLoadStation?{group:t.machineGroup,num:t.machineNum}:null,readyMats:a.get(`Ready`)??[],machiningMats:a.get(`Machining`)??[],loadingMats:a.get(`Loading`)??[]};u=u.set(n,o)}}return{machines:i.mapValues(e=>e.valuesToAscLazySeq().toRArray()),loads:r.valuesToAscLazySeq().toRArray(),stockerPals:a.valuesToAscLazySeq().toRArray(),machineAtLoad:u.valuesToAscLazySeq().toRArray(),maxNumFacesOnPallet:s}}function l0({mats:e}){let[t,n]=(0,L.useState)(!1),r=(0,L.useRef)(null),i=(0,L.useRef)(null),[a,o]=(0,L.useState)(!1),s=WE(II),c=Q(GO);function l(){r.current!==null&&(clearTimeout(r.current),r.current=null),n(!0)}function u(){r.current=setTimeout(()=>{n(!1),r.current=null},200)}function d(){e.length===1?s({type:`MatDetails`,details:e[0]}):o(!0)}function f(e,t){return t==null?null:(e!=null&&e!=null?c.pallets[e]?.faceNames?.[t-1]:null)??`Face: `+t.toString()}return(0,R.jsxs)(G,{sx:{width:o0,height:o0,overflow:`visible`},children:[(0,R.jsx)(Pc,{elevation:4,onPointerEnter:l,onPointerLeave:u,sx:{position:`relative`,zIndex:t?10:0,width:`max-content`,height:`max-content`},children:(0,R.jsx)(Up,{badgeContent:e.length>1?e.length:0,color:`secondary`,children:(0,R.jsx)(ul,{focusRipple:!0,onClick:d,ref:i,children:(0,R.jsx)(Ac,{orientation:`horizontal`,in:t,collapsedSize:o0,children:(0,R.jsxs)(G,{display:`flex`,children:[(0,R.jsx)(IH,{part:e[0].partName,size:o0}),(0,R.jsx)(G,{marginLeft:`10px`,marginRight:`10px`,whiteSpace:`nowrap`,textAlign:`left`,children:(0,R.jsx)(Ac,{in:t,collapsedSize:o0,children:(0,R.jsxs)(Rv,{direction:`column`,marginBottom:`0.2em`,children:[(0,R.jsxs)(W,{variant:`h6`,children:[e[0].partName,`-`,e[0].process]}),(0,R.jsx)(`div`,{children:(0,R.jsx)(`small`,{children:f(e[0].location.palletNum,e[0].location.face)??f(e[0].action.loadOntoPalletNum,e[0].action.loadOntoFace)})}),X.of(e).collect(e=>e.serial?(0,R.jsx)(`div`,{children:(0,R.jsxs)(`small`,{children:[`Serial: `,e.serial]})},e.materialID):void 0),(0,R.jsx)(`div`,{children:(0,R.jsx)(UH,{mat:e[0]})})]})})})]})})})})}),(0,R.jsx)(A_,{anchorEl:i.current,open:a,onClose:()=>o(!1),anchorOrigin:{vertical:`top`,horizontal:`left`},children:X.of(e).map((e,t)=>(0,R.jsx)(I_,{onClick:()=>{o(!1),s({type:`MatDetails`,details:e})},children:e.serial&&e.serial!==``?e.serial:(t+1).toString()},e.materialID))})]})}function u0({maxNumFaces:e,mats:t,loadingOntoPallet:n,noFilter:r,showExpanded:i}){if(i&&e===1)return(0,R.jsx)(G,{display:`flex`,flexDirection:`column`,flexWrap:`wrap`,children:t.map(e=>(0,R.jsx)(XH,{mat:e},e.materialID))});{let i=n?X.of(t).filter(e=>r||e.location.type!==GS.OnPallet).orderedGroupBy(e=>e.action.loadOntoFace??1):X.of(t).filter(e=>r||e.location.type===GS.OnPallet).orderedGroupBy(e=>e.action.type===qS.Loading?e.action.loadOntoFace??1:e.location.face??1);return(0,R.jsx)(G,{display:`grid`,gridTemplateRows:`${o0}px`,gridTemplateColumns:`repeat(${e}, ${o0}px)`,columnGap:`5px`,height:`100%`,alignContent:`center`,justifyContent:`center`,children:i.map(([e,t])=>(0,R.jsx)(G,{gridColumn:e,gridRow:1,children:(0,R.jsx)(l0,{mats:t})},e))})}}function d0(e,t){let n=o0*e+5*(e+1);return t?`60px ${Math.max(n,100)}px`:`${Math.max(n,100)}px`}function f0(e){e=Math.round(e);let t=Math.abs(e)%60,n=Math.floor(Math.abs(e)/60),r=n%60,i=Math.floor(n/60);return i>0?`${e<0?`-`:``}${i}:${r.toString().padStart(2,`0`)}:${t.toString().padStart(2,`0`)}`:`${e<0?`-`:``}${r}:${t.toString().padStart(2,`0`)}`}function p0(e){let t=e?.find(e=>e.action.type===qS.Machining),n=t?.action?.elapsedMachiningTime,r=t?.action.expectedRemainingMachiningTime,i=Q(GO).timeOfCurrentStatusUTC,a=Q(KO),o=null;r&&(o=rk(r)-(a-Math.floor(i.getTime()/1e3)));let s=null;return n&&(s=rk(n)+(a-Math.floor(i.getTime()/1e3))),o!==null&&s!==null?[!0,`${f0(s)} / ${f0(o)}`,o<0?-1:s/(s+o)*100]:o===null?s===null?[!!t,`Idle`,null]:[!0,f0(s),null]:[!0,` / `+f0(o),o<0?-1:null]}function m0({machine:e}){let[t,n,r]=p0(e.worktable?.mats);return(0,R.jsxs)(`div`,{children:[(0,R.jsx)(W,{variant:`h5`,children:e.name}),(0,R.jsx)(W,{variant:`subtitle1`,children:n}),t?r===null?(0,R.jsx)(Cg,{}):r<0?(0,R.jsx)(Cg,{color:`error`}):(0,R.jsx)(Cg,{variant:`determinate`,value:r}):void 0]})}function h0({maxNumFaces:e,machine:t}){return(0,R.jsxs)(G,{display:`grid`,border:`1px solid black`,margin:`5px`,gridTemplateRows:`auto ${s0}px ${s0}px ${s0}px`,gridTemplateColumns:d0(e,!0),gridTemplateAreas:`"machname machname" "inboundpal inboundmat" "worktablepal worktablemat" "outboundpal outboundmat"`,children:[(0,R.jsx)(G,{gridArea:`machname`,padding:`0.2em`,borderBottom:`1px solid black`,children:(0,R.jsx)(m0,{machine:t})}),(0,R.jsx)(G,{gridArea:`inboundpal`,borderRight:`1px solid black`,borderBottom:`1px solid black`,padding:`2px`,children:(0,R.jsxs)(Rv,{children:[(0,R.jsx)(W,{variant:`body1`,textAlign:`center`,children:`In`}),t.inbound?(0,R.jsx)(W,{variant:`h6`,textAlign:`center`,children:t.inbound.pallet.palletNum}):void 0]})}),(0,R.jsx)(G,{gridArea:`inboundmat`,borderBottom:`1px solid black`,children:t.inbound?(0,R.jsx)(u0,{mats:t.inbound.mats,maxNumFaces:e}):void 0}),(0,R.jsx)(G,{gridArea:`worktablepal`,borderRight:`1px solid black`,borderBottom:`1px solid black`,padding:`2px`,children:(0,R.jsxs)(Rv,{children:[(0,R.jsx)(W,{variant:`body1`,textAlign:`center`,children:`Work`}),t.worktable?(0,R.jsx)(W,{variant:`h6`,textAlign:`center`,children:t.worktable.pallet.palletNum}):void 0]})}),(0,R.jsx)(G,{gridArea:`worktablemat`,borderBottom:`1px solid black`,children:t.worktable?(0,R.jsx)(u0,{mats:t.worktable.mats,maxNumFaces:e}):void 0}),(0,R.jsx)(G,{gridArea:`outboundpal`,borderRight:`1px solid black`,padding:`2px`,children:(0,R.jsxs)(Rv,{children:[(0,R.jsx)(W,{variant:`body1`,textAlign:`center`,children:`Out`}),t.outbound?(0,R.jsx)(W,{variant:`h6`,textAlign:`center`,children:t.outbound.pallet.palletNum}):void 0]})}),(0,R.jsx)(G,{gridArea:`outboundmat`,children:t.outbound?(0,R.jsx)(u0,{mats:t.outbound.mats,maxNumFaces:e}):void 0})]})}function g0(e){let t=(e?.find(e=>e.action.type===qS.Loading||e.action.type===qS.UnloadToCompletedMaterial||e.action.type===qS.UnloadToInProcess))?.action?.elapsedLoadUnloadTime,n=Q(GO).timeOfCurrentStatusUTC,r=Q(KO),i=null;return t&&(i=rk(t)+(r-Math.floor(n.getTime()/1e3))),i===null?`Idle`:f0(i)}function _0({load:e}){let t=g0(e.pal?.mats);return(0,R.jsxs)(G,{display:`flex`,justifyContent:`space-between`,alignItems:`baseline`,children:[(0,R.jsxs)(W,{variant:`h5`,children:[`L/U `,e.lulNum]}),(0,R.jsx)(W,{variant:`body1`,children:t})]})}function v0({maxNumFaces:e,load:t}){return(0,R.jsxs)(G,{display:`grid`,border:`1px solid black`,margin:`5px`,gridTemplateRows:`auto ${s0}px ${s0}px`,gridTemplateColumns:d0(e,!0),gridTemplateAreas:`"lulname lulname" "loading loadingmat" "currentpal currentmat"`,children:[(0,R.jsx)(G,{gridArea:`lulname`,padding:`0.2em`,borderBottom:`1px solid black`,children:(0,R.jsx)(_0,{load:t})}),(0,R.jsx)(G,{gridArea:`loading`,borderRight:`1px solid black`,borderBottom:`1px solid black`,padding:`2px`,children:(0,R.jsxs)(Rv,{children:[(0,R.jsx)(W,{variant:`body1`,textAlign:`center`,children:`To`}),(0,R.jsx)(W,{variant:`body1`,textAlign:`center`,children:`Load`})]})}),(0,R.jsx)(G,{sx:{gridArea:`loadingmat`,borderBottom:`1px solid black`},children:t.pal?(0,R.jsx)(u0,{mats:t.pal.mats,maxNumFaces:e,loadingOntoPallet:!0}):void 0}),(0,R.jsx)(G,{gridArea:`currentpal`,borderRight:`1px solid black`,padding:`2px`,children:(0,R.jsxs)(Rv,{children:[(0,R.jsx)(W,{variant:`body1`,textAlign:`center`,children:`Pallet`}),t.pal?(0,R.jsx)(W,{variant:`h6`,textAlign:`center`,children:t.pal.pallet.palletNum}):void 0]})}),(0,R.jsx)(G,{gridArea:`currentmat`,children:t.pal?(0,R.jsx)(u0,{mats:t.pal.mats,maxNumFaces:e}):void 0})]})}function y0({status:e}){let t=g0(e.loadingMats),[n,r,i]=p0(e.machiningMats);return(0,R.jsxs)(`div`,{children:[(0,R.jsxs)(W,{variant:`h5`,children:[`Station `,e.lulNum]}),e.machineCurrentlyAtLoad?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(W,{variant:`h5`,children:[e.machineCurrentlyAtLoad.group,` `,e.machineCurrentlyAtLoad.num]}),(0,R.jsx)(W,{variant:`subtitle1`,children:r===`Idle`?t:r}),n?i===null?(0,R.jsx)(Cg,{}):i<0?(0,R.jsx)(Cg,{color:`error`}):(0,R.jsx)(Cg,{variant:`determinate`,value:i}):void 0]}):(0,R.jsxs)(R.Fragment,{children:[e.machineMoving?(0,R.jsx)(W,{variant:`subtitle2`,children:`Machine Moving`}):void 0,(0,R.jsxs)(W,{variant:`subtitle1`,children:[`Loading `,t]})]})]})}function b0({maxNumFaces:e,status:t}){return(0,R.jsxs)(G,{display:`grid`,border:`1px solid black`,margin:`5px`,gridTemplateRows:`minmax(104px, max-content) repeat(3, ${e>1?s0.toString()+`px`:`minmax(110px, max-content)`})`,gridTemplateColumns:e===1?`60px minmax(230px, max-content)`:d0(e,!0),gridTemplateAreas:`"name name" "ready readymat" "machining machiningmat" "loadstation loadstationmat"`,children:[(0,R.jsx)(G,{gridArea:`name`,padding:`0.2em`,borderBottom:`1px solid black`,children:(0,R.jsx)(y0,{status:t})}),(0,R.jsx)(G,{gridArea:`ready`,borderRight:`1px solid black`,borderBottom:`1px solid black`,padding:`2px`,children:(0,R.jsx)(W,{variant:`body1`,textAlign:`center`,children:`Ready`})}),(0,R.jsx)(G,{gridArea:`readymat`,borderBottom:`1px solid black`,display:`flex`,flexDirection:`column`,justifyContent:`center`,children:(0,R.jsx)(u0,{mats:t.readyMats,maxNumFaces:e,showExpanded:!0})}),(0,R.jsx)(G,{gridArea:`machining`,borderRight:`1px solid black`,borderBottom:`1px solid black`,padding:`2px`,children:(0,R.jsx)(W,{variant:`body1`,textAlign:`center`,children:`Work`})}),(0,R.jsx)(G,{gridArea:`machiningmat`,borderBottom:`1px solid black`,display:`flex`,flexDirection:`column`,justifyContent:`center`,children:(0,R.jsx)(u0,{mats:t.machiningMats,maxNumFaces:e,showExpanded:!0})}),(0,R.jsx)(G,{gridArea:`loadstation`,borderRight:`1px solid black`,padding:`2px`,children:(0,R.jsxs)(Rv,{children:[(0,R.jsx)(W,{variant:`body1`,textAlign:`center`,children:`Load`}),(0,R.jsx)(W,{variant:`body1`,textAlign:`center`,children:`Station`})]})}),(0,R.jsx)(G,{gridArea:`loadstationmat`,display:`flex`,flexDirection:`column`,justifyContent:`center`,children:(0,R.jsx)(u0,{mats:t.loadingMats,maxNumFaces:e,showExpanded:!0,noFilter:!0})})]})}function x0({maxNumFaces:e,pallet:t}){return(0,R.jsxs)(G,{display:`grid`,border:`1px solid black`,margin:`5px`,gridTemplateRows:`auto ${s0}px`,gridTemplateColumns:d0(e,!1),gridTemplateAreas:`"palname" "palmat"`,children:[(0,R.jsxs)(W,{variant:`h5`,gridArea:`palname`,padding:`0.2em`,borderBottom:`1px solid black`,children:[`Pallet `,t.pallet.palletNum]}),(0,R.jsx)(G,{gridArea:`palmat`,children:(0,R.jsx)(u0,{mats:t.mats,maxNumFaces:e})})]})}var S0=(0,L.memo)(function({overview:e}){return(0,R.jsxs)(`div`,{children:[e.machines.toAscLazySeq().map(([t,n])=>(0,R.jsx)(G,{display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`,children:n.map(t=>(0,R.jsx)(h0,{machine:t,maxNumFaces:e.maxNumFacesOnPallet},t.name))},t)),e.loads.length>0?(0,R.jsx)(G,{display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`,children:e.loads.map(t=>(0,R.jsx)(v0,{load:t,maxNumFaces:e.maxNumFacesOnPallet},t.lulNum))}):void 0,e.machineAtLoad.length>0?(0,R.jsx)(G,{display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`,children:e.machineAtLoad.map(t=>(0,R.jsx)(b0,{status:t,maxNumFaces:e.maxNumFacesOnPallet},t.lulNum))}):void 0,e.stockerPals.length>0?(0,R.jsx)(G,{display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`,children:e.stockerPals.map(t=>(0,R.jsx)(x0,{pallet:t,maxNumFaces:e.maxNumFacesOnPallet},t.pallet.palletNum))}):void 0]})}),C0=(0,L.memo)(function({ignoreOperator:e}){let[t,n]=(0,L.useState)(null),[r,i]=(0,L.useState)(null);function a(){n(null),i(null)}return(0,R.jsx)(lU,{onClose:a,allowNote:!0,highlightProcsGreaterOrEqualTo:r?.process??void 0,extraDialogElements:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(AJ,{st:t,setState:n}),r===null?null:(0,R.jsx)(EJ,{st:r,setState:i})]}),buttons:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(wJ,{ignoreOperator:e}),(0,R.jsx)(K1,{}),(0,R.jsx)(jJ,{st:t,setState:n,onClose:a,ignoreOperator:e}),(0,R.jsx)(DJ,{st:r,setState:i,onClose:a,ignoreOperator:e})]})})});function w0({ignoreOperator:e,whiteBackground:t}){fL(`System Overview`);let n=c0();return(0,R.jsxs)(`main`,{style:{padding:`10px`,minHeight:`calc(100vh - 64px)`,backgroundColor:t?`white`:`#F8F8F8`},children:[(0,R.jsx)(S0,{overview:n}),(0,R.jsx)(C0,{ignoreOperator:e}),(0,R.jsx)(q1,{})]})}var T0=30;function E0({machine:e}){let t=ts(),[,,n]=p0(e.worktable?.mats);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`rect`,{x:3,y:3,width:24,height:24,stroke:`black`}),`;`,(0,R.jsx)(`rect`,{x:3,y:3,width:24,height:8,fill:e.inbound===null?`white`:t.palette.secondary.main}),(0,R.jsx)(`rect`,{x:3,y:11,width:24,height:8,fill:e.worktable===null?`white`:n!=null&&n<0?t.palette.error.main:t.palette.secondary.main}),(0,R.jsx)(`rect`,{x:3,y:19,width:24,height:8,fill:e.outbound===null?`white`:t.palette.secondary.main})]})}function D0({load:e}){let t=ts();return(0,R.jsx)(`polygon`,{points:`3,27 27,27 15,3`,fill:e.pal===null?`white`:t.palette.secondary.main,stroke:`black`})}function O0({status:e}){let t=ts(),[,,n]=p0(e.machiningMats);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`rect`,{x:3,y:3,width:24,height:24,stroke:`black`}),`;`,(0,R.jsx)(`rect`,{x:3,y:3,width:24,height:8,fill:e.readyMats.length===0?`white`:t.palette.secondary.main}),(0,R.jsx)(`rect`,{x:3,y:11,width:24,height:8,fill:e.machiningMats.length===0?`white`:n!=null&&n<0?t.palette.error.main:t.palette.secondary.main}),(0,R.jsx)(`rect`,{x:3,y:19,width:24,height:8,fill:e.loadingMats.length===0?`white`:t.palette.secondary.main})]})}var k0=(0,L.memo)(function({overview:e}){let t=e.machines.toAscLazySeq().sumBy(([,e])=>e.length);return(0,R.jsx)(G,{sx:{height:`1.5em`,"&:hover":{backgroundColor:`primary.light`}},children:(0,R.jsxs)(`svg`,{viewBox:`0 0 ${(t+e.loads.length+e.machineAtLoad.length)*T0} ${T0}`,preserveAspectRatio:`none`,width:`140px`,height:`1.5em`,children:[(0,R.jsx)(`g`,{children:e.machines.toAscLazySeq().flatMap(([,e])=>e).map((e,t)=>(0,R.jsx)(`g`,{transform:`translate(${t*T0})`,children:(0,R.jsx)(E0,{machine:e})},e.name))}),(0,R.jsx)(`g`,{transform:`translate(${t*T0})`,children:e.loads.map((e,t)=>(0,R.jsx)(`g`,{transform:`translate(${t*T0})`,children:(0,R.jsx)(D0,{load:e})},e.lulNum))}),(0,R.jsx)(`g`,{transform:`translate(${(t+e.loads.length)*T0})`,children:e.machineAtLoad.map((e,t)=>(0,R.jsx)(`g`,{transform:`translate(${t*T0})`,children:(0,R.jsx)(O0,{status:e})},e.lulNum))})]})})}),A0=(0,L.memo)(function({full:e}){let[t,n]=(0,L.useState)(!1),r=c0();return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(K,{onClick:()=>n(!0),children:(0,R.jsx)(k0,{overview:r})}),(0,R.jsxs)(lh,{open:t,onClose:()=>n(!1),maxWidth:`xl`,fullScreen:e,children:[e?(0,R.jsx)(Ql,{sx:{position:`relative`},children:(0,R.jsxs)(Qy,{children:[(0,R.jsx)(zl,{edge:`start`,color:`inherit`,onClick:()=>n(!1),"aria-label":`close`,children:(0,R.jsx)(px,{})}),(0,R.jsx)(W,{sx:{ml:2,flex:1},variant:`h6`,component:`div`,children:`System Overview`})]})}):void 0,(0,R.jsx)(dh,{children:(0,R.jsx)(G,{paddingBottom:`2em`,paddingLeft:`5em`,paddingRight:`5em`,children:(0,R.jsx)(S0,{overview:r})})})]})]})});function j0(e,t,n,r){let i;if(e>=0){for(let t of Object.values(n.pallets))if(t.currentPalletLocation.loc===HS.LoadUnload&&t.currentPalletLocation.num===e){i=t;break}}let a=new Set(t);if(i!==void 0)for(let e of n.material)e.action.type===qS.Loading&&e.action.loadOntoPalletNum===i.palletNum&&e.location.type===GS.InQueue&&e.location.currentQueue&&a.add(e.location.currentQueue),(e.action.type===qS.UnloadToInProcess||e.action.type===qS.UnloadToCompletedMaterial)&&e.action.unloadIntoQueue&&e.location.type===GS.OnPallet&&e.location.palletNum===i.palletNum&&a.add(e.action.unloadIntoQueue);let o=new Map(X.of(a).map(e=>[e,{mats:[],hiddenCnt:0}])),s=[],c=XT.empty(),l=null;if(i)for(let e=1;e<=i.numFaces;e++)c=c.set(e,[]);for(let e of n.material)if(i&&(e.action.type===qS.Loading&&e.action.loadOntoPalletNum===i.palletNum&&(e.action.elapsedLoadUnloadTime&&(l=e.action.elapsedLoadUnloadTime),e.action.loadOntoFace&&!c.has(e.action.loadOntoFace)&&(c=c.set(e.action.loadOntoFace,[])),e.location.type===GS.Free&&s.push(e)),e.location.type===GS.OnPallet&&e.location.palletNum===i.palletNum&&((e.action.type===qS.UnloadToCompletedMaterial||e.action.type===qS.UnloadToInProcess)&&e.action.elapsedLoadUnloadTime&&(l=e.action.elapsedLoadUnloadTime),c=c.alter(e.location.face??1,t=>t?(t.push(e),t):[e]))),e.location.type===GS.InQueue&&e.location.currentQueue&&o.has(e.location.currentQueue)){let t=o.get(e.location.currentQueue);r&&(e.action.type!==qS.Loading||e.action.loadOntoPalletNum!==i?.palletNum)?t===void 0?o.set(e.location.currentQueue,{mats:[],hiddenCnt:1}):t.hiddenCnt+=1:t===void 0?o.set(e.location.currentQueue,{mats:[e],hiddenCnt:0}):t.mats.push(e)}o.forEach(e=>e.mats.sort(Iw(e=>e.location.queuePosition??0)));let u=s.length+c.valuesToAscLazySeq().sumBy(e=>e.length);return{pallet:i,face:c,freeLoadingMaterial:s,queues:o,elapsedLoadingTime:l,fsize:u<=2?`x-large`:u<=6?`large`:`normal`}}function M0({loadData:e}){let t=dL(),n=Q(UO),r=(0,L.useMemo)(()=>{let t=e.pallet;return t?X.of(e.face.values()).append(e.freeLoadingMaterial).concat(X.of(e.queues).collect(([e,t])=>t.mats)).flatMap(e=>e).collect(e=>e.action.type===qS.Loading&&e.action.loadOntoPalletNum===t.palletNum&&e.location.type===GS.OnPallet&&e.location.palletNum===t.palletNum?MC(e.partName,`unload`,e.materialID,t.palletNum,e.process,n):e.action.type===qS.Loading&&e.action.loadOntoPalletNum===t.palletNum?MC(e.partName,`load`,e.materialID,t.palletNum,e.action.processAfterLoad??e.process,n):e.location.type===GS.OnPallet&&e.location.palletNum===t.palletNum&&(e.action.type===qS.UnloadToCompletedMaterial||e.action.type===qS.UnloadToInProcess)?MC(e.partName,`unload`,e.materialID,t.palletNum,e.process,n):null).toRArray():[]},[e,n]);if(r.length===0||t)return(0,R.jsx)(`div`,{});function i(){for(let e of r)window.open(e,`_blank`)}return(0,R.jsx)(G,{sx:{position:`fixed`,bottom:`5px`,right:`5px`},children:(0,R.jsx)(q,{title:`Open All Instructions`,children:(0,R.jsx)(gh,{onClick:i,color:`secondary`,children:(0,R.jsx)(Ox,{})})})})}function N0({elapsedLoadTime:e}){let t=Q(GO).timeOfCurrentStatusUTC,n=Q(KO);return e?(0,R.jsx)(`span`,{children:f0(rk(e)+(n-Math.floor(t.getTime()/1e3)))}):null}function fre({data:e,faceNum:t}){let n=e.face.get(t);return!n||!e.pallet?null:(0,R.jsxs)(`div`,{children:[t===1?(0,R.jsxs)(G,{display:`grid`,gridTemplateColumns:e.pallet.numFaces>1?`1fr 1fr 1fr`:`1fr 1fr`,children:[(0,R.jsxs)(W,{variant:`h4`,children:[`Pallet `,e.pallet.palletNum]}),e.pallet.numFaces>1?(0,R.jsx)(W,{variant:`h6`,justifySelf:`center`,children:e.pallet.faceNames?.[t-1]??`Face 1`}):void 0,(0,R.jsx)(G,{justifySelf:`flex-end`,children:(0,R.jsx)(N0,{elapsedLoadTime:e.elapsedLoadingTime})})]}):e.pallet.numFaces>1?(0,R.jsx)(G,{display:`flex`,justifyContent:`center`,children:(0,R.jsx)(W,{variant:`h6`,children:e.pallet.faceNames?.[t-1]??`Face ${t}`})}):void 0,(0,R.jsx)(G,{ml:`4em`,mr:`4em`,children:(0,R.jsx)(a0,{kind:{type:J1.PalletFaceZone,face:t},children:(0,R.jsx)(G,{display:`flex`,flexWrap:`wrap`,justifyContent:`space-around`,children:n.map((t,n)=>(0,R.jsx)(a0,{kind:{type:J1.Material,material:t},children:(0,R.jsx)(XH,{mat:t,fsize:e.fsize})},n))})})})]})}function P0({data:e,mat:t}){return(0,R.jsxs)(`div`,{children:[(0,R.jsx)(W,{variant:`h4`,children:t.label}),t.material.mats.map((n,r)=>(0,R.jsx)(a0,{kind:{type:J1.Material,material:e.pallet&&n.action.loadOntoPalletNum===e.pallet.palletNum?n:null},children:t.isFree?(0,R.jsx)(XH,{mat:n,displayActionForSinglePallet:e.pallet?e.pallet.palletNum:0,fsize:e.fsize,showRawMaterial:!0,showJobComment:!0}):(0,R.jsx)(ZH,{mat:n,displayActionForSinglePallet:e.pallet?e.pallet.palletNum:0,shake:n.action.type===qS.Loading&&n.action.loadOntoPalletNum===e.pallet?.palletNum,fsize:n.action.type===qS.Loading&&n.action.loadOntoPalletNum===e.pallet?.palletNum?e.fsize:void 0,showRawMaterial:!0,showJobComment:!0})},r)),t.material.hiddenCnt>0?(0,R.jsxs)(W,{variant:`body2`,color:`textSecondary`,textAlign:`center`,mt:`0.5em`,children:[`+`,t.material.hiddenCnt,` hidden`]}):null]})}function F0({data:e,region:t}){return(0,R.jsx)(a0,{kind:t.isFree?{type:J1.FreeMaterialZone}:{type:J1.QueueZone,queue:t.label},children:t.isFree?(0,R.jsx)(P0,{data:e,mat:t}):(0,R.jsx)(FK,{matIds:t.material.mats.map(e=>e.materialID),direction:`vertical`,queueName:t.label,renderDragOverlay:t=>(0,R.jsx)(QH,{mat:t,displayActionForSinglePallet:e.pallet?e.pallet.palletNum:0,fsize:t.action.type===qS.Loading&&t.action.loadOntoPalletNum===e.pallet?.palletNum?e.fsize:void 0}),children:(0,R.jsx)(P0,{data:e,mat:t})})})}function I0(){let e=Q(kL);return(0,R.jsx)(`div`,{children:(0,L.useMemo)(()=>{let t=WC(new Date,-5);return e.matsById.valuesToLazySeq().filter(e=>e.completed_last_proc_machining===!0&&e.last_unload_time!==void 0&&e.last_unload_time>=t).toSortedArray({desc:e=>e.last_unload_time?.getTime()??0})},[e]).map((e,t)=>(0,R.jsx)(YH,{mat:e},t))})}var L0=(0,L.memo)(function({fillViewPort:e,showMaterial:t}){let n=i0({type:t?J1.CompletedExpandedMaterialZone:J1.CompletedCollapsedMaterialZone});return t&&e?(0,R.jsxs)(G,{padding:`8px`,display:`flex`,flexDirection:`column`,height:`100%`,ref:n,children:[(0,R.jsx)(W,{variant:`h4`,children:`Completed`}),(0,R.jsx)(G,{position:`relative`,flexGrow:1,children:(0,R.jsx)(G,{position:`absolute`,top:`0`,left:`0`,right:`0`,bottom:`0`,overflow:`auto`,children:(0,R.jsx)(I0,{})})})]}):t?(0,R.jsxs)(G,{padding:`8px`,ref:n,children:[(0,R.jsx)(W,{variant:`h4`,children:`Completed`}),(0,R.jsx)(I0,{})]}):(0,R.jsx)(G,{display:`flex`,justifyContent:e?`flex-end`:void 0,padding:`8px`,ref:n,children:(0,R.jsx)(W,{variant:`h4`,margin:`4px`,sx:e?{textOrientation:`mixed`,writingMode:`vertical-rl`}:void 0,children:`Completed`})})});function R0({pallet:e}){let t=Q(BI),n=Q(UO),r=dL();if(t===null)return null;let i;if(t.action.type===qS.Loading&&t.action.loadOntoPalletNum===e?i=`load`:(t.action.type===qS.UnloadToInProcess||t.action.type===qS.UnloadToCompletedMaterial)&&t.location.type===GS.OnPallet&&t.location.palletNum===e&&(i=`unload`),i===void 0)return null;let a=MC(t.partName,i,t.materialID,e,t.action.type===qS.Loading?t.action.processAfterLoad??t.process:t.process,n);return r?(0,R.jsx)(K,{color:`primary`,children:`Instructions`}):(0,R.jsx)(K,{href:a,target:`bms-instructions`,color:`primary`,children:`Instructions`})}function z0({queues:e,onClose:t,toQueue:n,showAddToQueue:r,setShowAddToQueue:i}){let a=WE(II),o=Q(qI),s=Q(zI),c=Q(BI),l=Q(UO),[u,d]=iL();return!s||c?.location.type===GS.OnPallet||c?.action.type===qS.Loading||e.length===0||c?.location.type===GS.InQueue&&c?.location.currentQueue&&e.includes(c?.location.currentQueue)?null:r?(0,R.jsxs)(K,{color:`primary`,disabled:n===null||d===!0,onClick:()=>{u({materialId:s.materialID,queue:n??``,queuePosition:-1,operator:l}),a(null),t()},children:[`Add To `,n??`Queue`,` `,o?` To Run Process ${o.process+1}`:``]}):(0,R.jsx)(K,{color:`primary`,onClick:()=>i(!0),children:`Add To Queue`})}function B0(){let e=Q(CO),t=WE(L1),n=Q(zI);return!e.allowChangeWorkorderAtLoadStation||n===null||n.materialID<0?null:(0,R.jsx)(K,{color:`primary`,onClick:()=>t(!0),children:`Assign Workorder`})}var V0=(0,L.memo)(function(e){let[t,n]=(0,L.useState)(null),[r,i]=(0,L.useState)(null),[a,o]=(0,L.useState)(!1),[s,c]=(0,L.useState)(null),l=(0,L.useCallback)(function(){n(null),i(null),o(!1),c(null)},[n,i]);return(0,R.jsx)(lU,{onClose:l,allowNote:!0,highlightProcsGreaterOrEqualTo:r?.process??void 0,extraDialogElements:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(AJ,{st:t,setState:n}),r===null?null:(0,R.jsx)(EJ,{st:r,setState:i}),a?(0,R.jsx)(yJ,{selectedQueue:s,setSelectedQueue:c,queueNames:e.queues}):void 0]}),buttons:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(R0,{pallet:e.pallet}),(0,R.jsx)(rJ,{}),(0,R.jsx)(wJ,{}),(0,R.jsx)(K1,{}),(0,R.jsx)(z0,{toQueue:s,queues:e.queues,onClose:l,showAddToQueue:a,setShowAddToQueue:o}),(0,R.jsx)(jJ,{st:t,setState:n,onClose:l}),(0,R.jsx)(DJ,{st:r,setState:i,onClose:l,loadStation:!0}),(0,R.jsx)(B0,{})]})})});function H0({numMatCols:e,maxNumFaces:t,horizontal:n,showMatInCompleted:r}){let i=``,a=``;if(t<=0&&(t=1),n){let n=``;for(let t=0;t<e;t++)a+=`minmax(16em, max-content) `,n+=`mat${t} `;a+=`1fr `,r?a+=`minmax(16em, max-content)`:a+=` 4.5em`;let o=`minmax(calc((100vh - 64px) / ${t}), max-content)`;for(let e=0;e<t;e++){let r=e===t-1?`1fr`:o;i+=`"${n} palface${e} completed" ${r}\n`}}else{a=`1fr`;for(let e=0;e<t;e++)i+=`"palface${e}" minmax(134px, max-content)\n`;for(let t=0;t<e;t++)i+=`"mat${t}" minmax(134px, max-content)\n`;i+=`"completed" minmax(134px, max-content)
|
|
326
|
+
`}return`${i} / ${a}`}function U0(e){let t=Q(GO),n=Q(_K),r=(0,L.useMemo)(()=>j0(e.loadNum,e.queues,t,n),[t,e.loadNum,e.queues,n]),i=X.of(r.queues).sortBy(([e,t])=>e).map(([e,t])=>({label:e,material:t,isFree:!1}));(r.queues.size===0||r.freeLoadingMaterial.length>0)&&(i=i.append({label:`Material`,material:{mats:r.freeLoadingMaterial,hiddenCnt:0},isFree:!0}));let a=i.toRArray(),o=a.length+(e.completed?1:0),s=Yb(o<=1?`(min-width: 720px)`:o===2?`(min-width: 1030px)`:`(min-width: 1320px)`),c=H0({numMatCols:a.length,maxNumFaces:r.face.size,horizontal:s,showMatInCompleted:e.completed});return(0,R.jsx)(r0,{hideArrows:!s,whiteBackground:e.whiteBackground,children:(0,R.jsxs)(G,{component:`main`,sx:{width:`100%`,display:`grid`,gridTemplate:c,minHeight:{xs:`calc(100vh - 64px - 32px)`,sm:`calc(100vh - 64px - 40px)`,md:`calc(100vh - 64px)`},padding:s?void 0:`8px`},children:[a.map((e,t)=>(0,R.jsx)(G,{gridArea:`mat${t}`,padding:`8px`,borderRight:s?`1px solid black`:void 0,borderBottom:s?void 0:`1px solid black`,children:(0,R.jsx)(F0,{data:r,region:e})},t)),r.face.keysToAscLazySeq().map((e,t)=>(0,R.jsx)(G,{marginLeft:`15px`,gridArea:`palface${t}`,padding:`8px`,borderTop:r.pallet&&t!==0?`1px solid black`:void 0,children:(0,R.jsx)(fre,{data:r,faceNum:e})},e)),(0,R.jsx)(G,{borderLeft:s?`1px solid black`:void 0,borderTop:s?void 0:`1px solid black`,gridArea:`completed`,children:(0,R.jsx)(L0,{fillViewPort:s,showMaterial:e.completed})}),(0,R.jsx)(M0,{loadData:r}),(0,R.jsx)(H1,{}),(0,R.jsx)(q1,{}),(0,R.jsx)(V0,{pallet:r.pallet?.palletNum??null,queues:e.queues})]})})}function W0(e){return fL(`Load `+e.loadNum.toString()),(0,R.jsx)(U0,{...e})}function G0(e){let t=dL(),n=Q(UO),r=Q(zI),i=Q(qI)?.process,[a,o]=ZI(),s=WE(II);if(r===null)return null;function c(t){r&&(a({mat:r,inspType:e.inspection_type,success:t,operator:n}),s(null))}let l=MC(r.partName,e.inspection_type,r.materialID,null,i,n);return(0,R.jsxs)(R.Fragment,{children:[r.partName===``?void 0:t?(0,R.jsx)(K,{color:`primary`,children:`Instructions`}):(0,R.jsx)(K,{href:l,target:`bms-instructions`,color:`primary`,children:`Instructions`}),(0,R.jsx)(wJ,{}),(0,R.jsxs)(K,{color:`primary`,disabled:o,onClick:()=>c(!0),children:[`Mark `,e.inspection_type,` Success`]}),(0,R.jsxs)(K,{color:`primary`,disabled:o,onClick:()=>c(!1),children:[`Mark `,e.inspection_type,` Failed`]})]})}function K0({focusInspectionType:e}){let t=Q(JI);return t===null||e||t.signaledInspections.length===1?null:(0,R.jsx)(R.Fragment,{children:t.signaledInspections.map(e=>(0,R.jsx)(uh,{children:(0,R.jsx)(G0,{inspection_type:e})},e))})}function q0({focusInspectionType:e}){let t=Q(JI),n;if(e)n=e;else if(t&&t.signaledInspections.length===1)n=t.signaledInspections[0];else return null;return(0,R.jsx)(G0,{inspection_type:n})}var J0=(0,L.memo)(function(e){return(0,R.jsx)(lU,{allowNote:!0,extraDialogElements:(0,R.jsx)(K0,{focusInspectionType:e.focusInspectionType}),buttons:(0,R.jsx)(q0,{focusInspectionType:e.focusInspectionType})})});function Y0({focusInspectionType:e,forceSingleColumn:t}){let n=Q(kL),r=(0,L.useMemo)(()=>X0(n.matsById,e),[n,e]);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(G,{sx:{display:t?void 0:{md:`flex`}},children:[(0,R.jsxs)(G,{padding:`8px`,sx:{minHeight:t?void 0:{md:`calc(100vh - 64px)`},width:t?`100%`:{md:`50vw`},borderRight:t?void 0:{md:`1px solid black`},borderBottom:t?`1px solid black`:{sm:`1px solid black`,md:`none`}},children:[(0,R.jsx)(W,{variant:`h4`,children:`Parts to Inspect`}),(0,R.jsx)(G,{display:`flex`,justifyContent:`flex-start`,flexWrap:`wrap`,children:r.waiting_to_inspect.map((t,n)=>(0,R.jsx)(YH,{mat:t,focusInspectionType:e,hideWarningIcon:!0},n))})]}),(0,R.jsxs)(G,{padding:`8px`,sx:{width:t?`100%`:{md:`50vw`}},children:[(0,R.jsx)(W,{variant:`h4`,children:`Recently Inspected`}),(0,R.jsx)(G,{display:`flex`,justifyContent:`flex-start`,flexWrap:`wrap`,children:r.inspect_completed.map((t,n)=>(0,R.jsx)(YH,{mat:t,focusInspectionType:e,hideWarningIcon:!0},n))})]})]}),(0,R.jsx)(J0,{focusInspectionType:e})]})}function X0(e,t){let n=VC(new Date,-7),r=VC(new Date,-1);function i(e){let t=e.completedInspections;return t===void 0?e.signaledInspections.length===0:X.of(e.signaledInspections).every(e=>e in t)}let a=Array.from(t===null?e.valuesToLazySeq().filter(e=>e.last_unload_time!==void 0&&e.last_unload_time>=n&&e.signaledInspections.length>0&&!i(e)):e.valuesToLazySeq().filter(e=>e.last_unload_time!==void 0&&e.last_unload_time>=n&&e.signaledInspections.includes(t)&&(e.completedInspections||{})[t]===void 0));a.sort((e,t)=>e.last_unload_time&&t.last_unload_time?t.last_unload_time.getTime()-e.last_unload_time.getTime():0);let o=Array.from(t===null?e.valuesToLazySeq().filter(e=>e.completed_inspect_time!==void 0&&e.completed_inspect_time>=r&&e.signaledInspections.length>0&&i(e)):e.valuesToLazySeq().filter(e=>e.completed_inspect_time!==void 0&&e.completed_inspect_time>=r&&e.signaledInspections.includes(t)&&(e.completedInspections||{})[t]!==void 0));return o.sort((e,t)=>e.completed_inspect_time&&t.completed_inspect_time?t.completed_inspect_time.getTime()-e.completed_inspect_time.getTime():0),{waiting_to_inspect:a,inspect_completed:o}}function Z0(e){return fL(e.focusInspectionType&&e.focusInspectionType!==``?`Inspection ${e.focusInspectionType}`:`Inspection`),(0,R.jsx)(G,{component:`main`,sx:{backgroundColor:`#F8F8F8`,minHeight:{sm:`calc(100vh - 64px - 40px)`,md:`calc(100vh - 64px)`}},children:(0,R.jsx)(Y0,{...e})})}function Q0(){let e=Q(CO),t=Q(zI),[n,r]=QI(),i=Q(UO),[a,o]=GE(II);if(t===null)return null;let s=e.requireScanAtCloseout,c=e.requireWorkorderBeforeAllowCloseoutComplete,l;s?a!==null&&(a.type===`Barcode`||a.type===`ManuallyEnteredSerial`)||(l=`Scan Required`):c&&(t.workorderId===void 0||t.workorderId===``)&&(l=`No workorder assigned`);function u(e){t!==null&&(n({mat:t,operator:i,failed:e}),o(null))}return l?(0,R.jsx)(q,{title:l,placement:`top`,children:(0,R.jsx)(`div`,{children:(0,R.jsx)(K,{color:`primary`,disabled:!0,children:`Close Out`})})}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(K,{color:`primary`,disabled:r,onClick:()=>u(!0),children:`Fail Close Out`}),(0,R.jsx)(K,{color:`primary`,disabled:r,onClick:()=>u(!1),children:`Pass Close Out`})]})}function $0(){let e=dL(),t=Q(zI),n=Q(UO),r=Q(qI)?.process;if(t===null||t.partName===``)return null;let i=MC(t.partName,`closeout`,t.materialID,null,r,n);return e?(0,R.jsx)(K,{color:`primary`,children:`Instructions`}):(0,R.jsx)(K,{href:i,target:`bms-instructions`,color:`primary`,children:`Instructions`})}function e2(){let e=WE(L1);return Q(zI)===null?null:(0,R.jsx)(K,{color:`primary`,onClick:()=>e(!0),children:`Assign Workorder`})}var t2=(0,L.memo)(function(){return(0,R.jsx)(lU,{allowNote:!0,buttons:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)($0,{}),(0,R.jsx)(wJ,{}),(0,R.jsx)(e2,{}),(0,R.jsx)(Q0,{})]})})}),n2=Z(new Date);n2.onMount=e=>{e(new Date);let t=setInterval(()=>{e(new Date)},1e3*60);return()=>clearInterval(t)};function r2({forceSingleColumn:e}){let t=Q(kL),n=Q(n2),r=(0,L.useMemo)(()=>{let e=WC(n,-48),r=WC(n,-2),i=[],a=[];for(let n of t.matsById.values())n.completed_last_proc_machining===!0&&n.last_unload_time&&n.last_unload_time>=e&&(n.closeout_completed===void 0?i.push(n):n.closeout_completed>=r&&a.push(n));return i.sort((e,t)=>e.last_unload_time&&t.last_unload_time?e.last_unload_time.getTime()-t.last_unload_time.getTime():0),a.sort((e,t)=>e.last_unload_time&&t.last_unload_time?t.last_unload_time.getTime()-e.last_unload_time.getTime():0),{uncompleted:i,closed:a}},[t,n]);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(G,{sx:{display:e?void 0:{md:`flex`}},children:[(0,R.jsxs)(G,{padding:`8px`,sx:{minHeight:e?void 0:{md:`calc(100vh - 64px)`},width:e?`100%`:{md:`50vw`},borderRight:e?void 0:{md:`1px solid black`},borderBottom:e?`1px solid black`:{sm:`1px solid black`,md:`none`}},children:[(0,R.jsx)(W,{variant:`h4`,children:`Recently Completed`}),(0,R.jsx)(G,{display:`flex`,justifyContent:`flex-start`,flexWrap:`wrap`,children:r.uncompleted.map((e,t)=>(0,R.jsx)(YH,{mat:e},t))})]}),(0,R.jsxs)(G,{padding:`8px`,sx:{width:e?`100%`:{md:`50vw`}},children:[(0,R.jsx)(W,{variant:`h4`,children:`Recently Closed Out`}),(0,R.jsx)(G,{display:`flex`,justifyContent:`flex-start`,flexWrap:`wrap`,children:r.closed.map((e,t)=>(0,R.jsx)(YH,{mat:e},t))})]})]}),(0,R.jsx)(H1,{}),(0,R.jsx)(t2,{})]})}function i2(){return fL(`Close Out`),(0,R.jsx)(G,{component:`main`,sx:{backgroundColor:`#F8F8F8`,minHeight:{sm:`calc(100vh - 64px - 40px)`,md:`calc(100vh - 64px)`}},children:(0,R.jsx)(r2,{})})}function a2(e,t){return e.mapValues(e=>{let n=X.of(e.recentCycles).flatMap(e=>e.tools).filter(e=>!e.toolChangedDuringMiddleOfCycle).groupBy(e=>e.toolName).map(([e,t])=>({toolName:e,cycleUsageMinutes:X.of(t).sumBy(e=>e.cycleUsageMinutes)/t.length,cycleUsageCnt:X.of(t).sumBy(e=>e.cycleUsageCnt)/t.length,toolChangedDuringMiddleOfCycle:!1})).toMutableArray();return t&&n.sort((e,t)=>e.toolName.localeCompare(t.toolName)),{tools:n}})}var o2=class{constructor(e,t){this.statGroup=e,this.operation=t}compare(e){let t=this.statGroup.localeCompare(e.statGroup);return t===0?this.operation.localeCompare(e.operation):t}hash(){return xT(this.statGroup,this.operation)}toString(){return`{statGroup: ${this.statGroup}, operation: ${this.operation}}`}};function s2(e,t){let n=0,r=0;for(let i of X.of(e).filter(e=>e.machines.has(t)??!1))n+=i.quantity*(i.scheduledUseMinutes/i.scheduledUseCnt),r+=i.quantity;return r===0?0:n/r}function c2(e,t,n){let r=$T.empty();for(let[t,n]of X.ofObject(e.jobs)){let i=n.cycles??0;for(let a=0;a<n.procsAndPaths.length;a++){let o=0,s=$T.empty();for(let r=0;r<n.procsAndPaths[a].paths.length;r++){o+=n.completed?.[a]?.[r]??0;let i=n.procsAndPaths[a].paths[r];for(let n=0;n<i.stops.length;n+=1){let o=i.stops[n],c=X.of(e.material).filter(e=>e.jobUnique===t&&e.process==a+1&&e.path===r+1&&(e.action.type===qS.UnloadToCompletedMaterial||e.action.type===qS.UnloadToInProcess||e.lastCompletedMachiningRouteStopIndex!==void 0&&e.lastCompletedMachiningRouteStopIndex>n)).length();o.program!==void 0&&o.program!==``&&(s=s.modify(new o2(o.stationGroup,o.program),e=>(e??0)+c))}}for(let[e,t]of s)r=r.modify(new ak(n.partName,e.statGroup,e.operation),e=>(e??0)+i-o-t)}}let i=X.of(a2(n,!1)).flatMap(([e,t])=>{let i=window.bmsToolReportOverridePartQuantity??r.get(e);return i!==void 0&&i>0?t.tools.map(t=>({toolName:t.toolName,part:{partAndProg:e,quantity:i,scheduledUseMinutes:t.cycleUsageMinutes,scheduledUseCnt:t.cycleUsageCnt===0?1:t.cycleUsageCnt,machines:n.get(e)?.machines??JT.empty()}})):[]}).sortBy(e=>e.part.partAndProg.part,e=>e.part.partAndProg.operation).toLookup(e=>e.toolName,e=>e.part);return X.of(t).orderedGroupBy(e=>e.toolName).map(([e,t])=>{let n=!1;return{toolName:e,machines:X.of(t).sortBy(e=>e.machineGroupName,e=>e.machineNum,e=>e.pocket).map(t=>{let r=t.currentUse!==null&&t.currentUse!==void 0&&t.currentUse!==``?ik(t.currentUse):null,a=t.totalLifeTime!==null&&t.totalLifeTime!==void 0&&t.totalLifeTime!==``?ik(t.totalLifeTime):null,o=bk(t.machineGroupName,t.machineNum),s=t.currentUseCount??null,c=t.totalLifeCount??null;if(s===null&&c===null){let t=s2(i.get(e)??[],o);t>0&&(n=!0,s=r===null?null:r/t,c=a===null?null:a/t)}return{machineName:o,pocket:t.pocket,serial:t.serial,currentUseMinutes:r,lifetimeMinutes:a,remainingMinutes:r!==null&&a!==null?Math.max(0,a-r):null,currentUseCnt:s??null,lifetimeCnt:c??null,remainingCnt:s!==null&&c!==null?Math.max(0,c-s):null}}).toRArray(),parts:i.get(e)??[],estimatedToolCounts:n}}).toRArray()}var l2=Z(null),u2=Z(e=>e(l2)?.time??null,async(e,t,n)=>{t(l2,{tools:await EC.getToolsInMachines(),time:n})}),d2=Z(e=>{let t=e(l2);if(t===null)return[];let n=new Set;for(let e of t.tools)n.add(bk(e.machineGroupName,e.machineNum));return Array.from(n).sort((e,t)=>e.localeCompare(t))}),f2=Z(e=>{let t=e(l2);if(t===null)return null;let n=e(GO),r=e(WL);return c2(n,t.tools,r)}),p2=Z(e=>{let t=e(f2);return t?X.of(t).flatMap(e=>e.machines).some(e=>e.serial!=null&&e.serial!==``):!1}),m2=Z(e=>{let t=e(f2);return t?X.of(t).some(e=>e.estimatedToolCounts):!1});function h2(e){let t=X.of(e).flatMap(e=>e.machines).some(e=>e.currentUseMinutes!=null),n=X.of(e).flatMap(e=>e.machines).some(e=>e.currentUseCnt!=null),r=`<table>
|
|
327
|
+
<thead><tr>`;r+=`<th>Tool</th><th>Machine</th><th>Pocket</th>`,t&&(r+=`<th>Scheduled Use (min)</th><th>Current Use (min)</th><th>Lifetime (min)</th><th>Remaining Life (min)</th>`),n&&(r+=`<th>Scheduled Use (cnt)</th><th>Current Use (cnt)</th><th>Lifetime (cnt)</th><th>Remaining Life (cnt)</th>`),r+=`</tr></thead>
|
|
328
|
+
<tbody>
|
|
329
|
+
`;for(let i of e)for(let e of i.machines){if(r+=`<tr><td>${i.toolName}</td><td>${e.machineName}</td><td>${e.pocket}</td>`,t){let t=X.of(i.parts).sumBy(e=>e.scheduledUseMinutes*e.quantity);r+=`<td>`+t.toFixed(1)+`</td>`,r+=`<td>`+(e.currentUseMinutes?e.currentUseMinutes.toFixed(1):``)+`</td>`,r+=`<td>`+(e.lifetimeMinutes?e.lifetimeMinutes.toFixed(1):``)+`</td>`,r+=`<td>`+(e.remainingMinutes?e.remainingMinutes.toFixed(1):``)+`</td>`}if(n){let t=X.of(i.parts).sumBy(e=>e.scheduledUseCnt*e.quantity);r+=`<td>`+t.toFixed(1)+`</td>`,r+=`<td>`+(e.currentUseCnt?e.currentUseCnt.toFixed(1):``)+`</td>`,r+=`<td>`+(e.lifetimeCnt?e.lifetimeCnt.toFixed(1):``)+`</td>`,r+=`<td>`+(e.remainingCnt?e.remainingCnt.toFixed(1):``)+`</td>`}r+=`</tr>
|
|
330
|
+
`}return r+=`</tbody></table>`,r}function g2(){let e=LE();return(0,L.useCallback)(()=>{let t=e.get(f2);t&&(0,Mk.default)(h2(t))},[e])}function _2(e,t,n,r,i){let a=a2(e,!0),o=e.keysToLazySeq().toRMap(e=>[e.operation,e],(e,t)=>t),s=X.of(r);i!=null&&(s=s.filter(e=>i.has(e.programName)));let c=n?.valuesToLazySeq().flatMap(e=>X.of(e.procsAndPaths).flatMap(e=>e.paths).flatMap(t=>X.of(t.stops).collect(n=>{let r=ik(n.expectedCycleTime);return n.program&&r>0?{program:n.program,plannedMins:r/t.partsPerPallet,start:e.routeStartUTC}:null}))).toOrderedMap(e=>[e.program,e],(e,t)=>e.start>t.start?e:t),l=s.map(e=>{let n=o.get(e.programName);return{programName:e.programName,cellControllerProgramName:e.cellControllerProgramName,comment:e.comment??null,revision:e.revision??null,partName:n?.part??null,statisticalCycleTime:n?t.get(n)??null:null,toolUse:n?a.get(n)??null:null,plannedMins:c?.get(e.programName)?.plannedMins??null}}).toRArray();return{time:new Date,programs:l,hasRevisions:l.some(e=>e.revision!==null),cellNameDifferentFromProgName:l.some(e=>e.cellControllerProgramName!==e.programName)}}var v2=Z(`AllPrograms`),y2=Z(null),b2=Z(e=>e(y2)?.time??null,async(e,t,n)=>{t(y2,{progs:await EC.getProgramsInCellController(),time:n})}),x2=Z(e=>{if(e(b2)===null)return null;let t=e(v2),n=null;if(t===`ActivePrograms`){let t=e(GO);n=new Set(X.ofObject(t.jobs).flatMap(([,e])=>e.procsAndPaths).flatMap(e=>e.paths).flatMap(e=>e.stops).filter(e=>e.program!==null&&e.program!==void 0&&e.program!==``).map(e=>e.program??``))}let r=e(y2);return r===null?null:_2(e(WL),e(sk),e(JE),r.progs,n)}),S2=Z(null),C2=Z(async e=>{let t=e(S2);return t===null?``:t.revision===null?await EC.getLatestProgramRevisionContent(t.programName):await EC.getProgramRevisionContent(t.programName,t.revision)}),w2=Z(null),T2=new Intl.NumberFormat(`en-US`,{minimumFractionDigits:0,maximumFractionDigits:1}),E2=H(ob,{shouldForwardProp:e=>e.toString()[0]!==`$`})(({theme:e,$noBorderBottom:t,$highlightedRow:n,$noticeRow:r})=>({...t&&{"& > *":{borderBottom:`unset`}},[e.breakpoints.up(`lg`)]:{"& td:not(:last-child), & th:not(:last-child)":{whiteSpace:`nowrap`},"& td:last-child, & th:last-child":{width:`100%`}},backgroundColor:n?`#BDBDBD`:r?`#E0E0E0`:void 0})),D2=H(ob,{shouldForwardProp:e=>e.toString()[0]!==`$`})(({$borderBottom:e})=>({...e&&{"&:not(:last-child)":{borderBottom:`2px solid black`}}})),O2=H(`span`)({fontSize:`x-large`,fontWeight:`lighter`});function k2({min:e,cnt:t,showZero:n,extraMin:r,extraCnt:i}){e??=0,t??=0;let a=r?(0,R.jsx)(q,{title:r,children:(0,R.jsxs)(`span`,{children:[e.toFixed(1),` min`]})}):e.toFixed(1)+` min`,o=i?(0,R.jsx)(q,{title:i,children:(0,R.jsxs)(`span`,{children:[T2.format(t),` cnt`]})}):T2.format(t)+` cnt`;return e===0&&t===0?n?`0`:``:e>0&&t===0?a:e===0&&t>0?o:(0,R.jsxs)(`span`,{children:[a,` `,(0,R.jsx)(O2,{children:`|`}),` `,o]})}function A2({tool:e,machine:t}){let n=t?X.of(e.parts).filter(e=>e.machines.has(t)):X.of(e.parts);return(0,R.jsxs)(Ty,{size:`small`,sx:{width:`auto`,ml:`10em`,mb:`1em`},children:[(0,R.jsx)(Jy,{children:(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{children:`Part`}),(0,R.jsx)(J,{children:`Program`}),t?void 0:(0,R.jsx)(J,{children:`Machines`}),(0,R.jsx)(J,{align:`right`,children:`Quantity`}),(0,R.jsx)(J,{align:`right`,children:`Use/Cycle (min)`}),(0,R.jsx)(J,{align:`right`,children:`Use/Cycle (cnt)`})]})}),(0,R.jsx)(My,{children:n.isEmpty()?(0,R.jsx)(ob,{children:(0,R.jsx)(J,{colSpan:5,children:`No programs use this machine`})}):n.map((e,n)=>(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{children:(0,R.jsxs)(G,{sx:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(IH,{part:e.partAndProg.part,size:20}),(0,R.jsx)(`span`,{children:e.partAndProg.part})]})}),(0,R.jsx)(J,{children:e.partAndProg.operation}),t?void 0:(0,R.jsx)(J,{children:e.machines.foldl((e,t)=>(e.length>0?e+`, `:``)+t,``)}),(0,R.jsx)(J,{align:`right`,children:e.quantity}),(0,R.jsx)(J,{align:`right`,children:e.scheduledUseMinutes>0?e.scheduledUseMinutes.toFixed(1):``}),(0,R.jsx)(J,{align:`right`,children:e.scheduledUseCnt>0?T2.format(e.scheduledUseCnt):``})]},n))})]})}function j2({machines:e}){let t=Q(p2),n=X.of(e).toLookupOrderedMap(e=>e.machineName,e=>e.pocket),r=n.size>1&&n.valuesToAscLazySeq().some(e=>e.size>1);return(0,R.jsxs)(Ty,{size:`small`,sx:{width:`auto`,ml:`10em`,mb:`1em`},children:[(0,R.jsx)(Jy,{children:(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{children:`Machine`}),(0,R.jsx)(J,{align:`right`,children:`Pocket`}),t?(0,R.jsx)(J,{children:`Serial`}):void 0,(0,R.jsx)(J,{align:`right`,children:`Current Use `}),(0,R.jsx)(J,{align:`right`,children:`Lifetime `}),(0,R.jsx)(J,{align:`right`,children:`Remaining Use `})]})}),(0,R.jsxs)(My,{children:[n.toAscLazySeq().map(([e,i])=>(0,R.jsxs)(L.Fragment,{children:[i.valuesToAscLazySeq().map((e,n)=>(0,R.jsxs)(D2,{$borderBottom:r&&i.size===1,children:[(0,R.jsx)(J,{children:e.machineName}),(0,R.jsx)(J,{align:`right`,children:e.pocket}),t?(0,R.jsx)(J,{children:e.serial??``}):void 0,(0,R.jsx)(J,{align:`right`,children:(0,R.jsx)(k2,{min:e.currentUseMinutes,cnt:e.currentUseCnt})}),(0,R.jsx)(J,{align:`right`,children:(0,R.jsx)(k2,{min:e.lifetimeMinutes,cnt:e.lifetimeCnt})}),(0,R.jsx)(J,{align:`right`,children:(0,R.jsx)(k2,{min:e.remainingMinutes,cnt:e.remainingCnt,showZero:!0})})]},n)),n.size>1&&i.size>1?(0,R.jsxs)(D2,{$borderBottom:!0,children:[(0,R.jsx)(J,{colSpan:t?4:3}),(0,R.jsx)(J,{children:`Subtotal`}),(0,R.jsx)(J,{align:`right`,children:(0,R.jsx)(k2,{min:i.valuesToAscLazySeq().sumBy(e=>e.remainingMinutes??0),cnt:i.valuesToAscLazySeq().sumBy(e=>e.remainingCnt??0)})})]}):void 0]},e)),(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{colSpan:t?4:3}),(0,R.jsx)(J,{children:`Total`}),(0,R.jsx)(J,{align:`right`,children:(0,R.jsx)(k2,{min:X.of(e).sumBy(e=>e.remainingMinutes??0),cnt:X.of(e).sumBy(e=>e.remainingCnt??0)})})]})]})]})}function M2(){let e=Q(m2);return(0,R.jsxs)(E2,{children:[(0,R.jsx)(J,{}),(0,R.jsx)(J,{children:`Tool`}),(0,R.jsx)(J,{align:`right`,children:(0,R.jsx)(q,{title:`Expected use for all currently scheduled parts.`+(e?` Counts are estimates.`:``),children:(0,R.jsx)(`span`,{children:`Scheduled Use`})})}),(0,R.jsx)(J,{align:`right`,children:(0,R.jsx)(q,{title:`Remaining use summed over all machines which have a scheduled part.`+(e?` Counts are estimates.`:``),children:(0,R.jsx)(`span`,{children:`Total Remaining Use`})})}),(0,R.jsx)(J,{align:`right`,children:(0,R.jsx)(q,{title:`Machine with the least remaining use.`+(e?` Counts are estimates.`:``),children:(0,R.jsx)(`span`,{children:`Smallest Remaining Use`})})}),(0,R.jsx)(J,{})]})}function N2({tool:e}){let[t,n]=(0,L.useState)(!1),r=X.of(e.machines).filter(t=>e.parts.some(e=>e.machines.has(t.machineName))),i=X.of(e.parts).sumBy(e=>e.scheduledUseMinutes*e.quantity),a=X.of(e.parts).sumBy(e=>e.scheduledUseCnt*e.quantity),o=r.sumBy(e=>e.remainingMinutes??0),s=r.sumBy(e=>e.remainingCnt??0),c=r.groupBy(e=>e.machineName).map(([e,t])=>({mach:e,remainMin:X.of(t).sumBy(e=>e.remainingMinutes??0)})).minBy(({remainMin:e})=>e),l=r.groupBy(e=>e.machineName).map(([e,t])=>({mach:e,remainCnt:X.of(t).sumBy(e=>e.remainingCnt??0)})).minBy(({remainCnt:e})=>e);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(E2,{$noBorderBottom:!0,$highlightedRow:i>o||a>s,$noticeRow:i<=o&&a<=s&&(c&&i>c.remainMin||l&&a>l.remainCnt),children:[(0,R.jsx)(J,{children:(0,R.jsx)(zl,{size:`small`,onClick:()=>n(!t),children:t?(0,R.jsx)(Rx,{}):(0,R.jsx)(Fx,{})})}),(0,R.jsx)(J,{children:e.toolName}),(0,R.jsx)(J,{align:`right`,children:(0,R.jsx)(k2,{min:i,cnt:a})}),(0,R.jsx)(J,{align:`right`,children:(0,R.jsx)(k2,{min:o,cnt:s})}),(0,R.jsx)(J,{align:`right`,children:(0,R.jsx)(k2,{min:c?.remainMin,cnt:l?.remainCnt,showZero:!0,extraMin:c?.mach,extraCnt:l?.mach})}),(0,R.jsx)(J,{})]}),(0,R.jsx)(ob,{children:(0,R.jsx)(J,{sx:{pb:`0`,pt:`0`},colSpan:6,children:(0,R.jsx)(Ac,{in:t,timeout:`auto`,unmountOnExit:!0,children:(0,R.jsxs)(G,{sx:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-around`,ml:`1em`,mr:`1em`},children:[(0,R.jsx)(`div`,{children:(0,R.jsx)(j2,{machines:e.machines})}),e.parts.length===0?void 0:(0,R.jsx)(`div`,{children:(0,R.jsx)(A2,{tool:e})})]})})})})]})}function P2({machine:e}){let t=Q(m2),n=Q(p2);return(0,R.jsxs)(E2,{children:[(0,R.jsx)(J,{}),(0,R.jsxs)(J,{children:[`Tool In `,e]}),(0,R.jsx)(J,{align:`right`,children:`Pocket`}),n?(0,R.jsx)(J,{children:`Serial`}):void 0,(0,R.jsx)(J,{align:`right`,children:(0,R.jsx)(q,{title:`Expected use for all currently scheduled parts.`+(t?` Counts are estimates.`:``),children:(0,R.jsx)(`span`,{children:`Scheduled Use`})})}),(0,R.jsx)(J,{align:`right`,children:(0,R.jsx)(q,{title:`Current recorded usage of this tool.`+(t?` Counts are estimates.`:``),children:(0,R.jsx)(`span`,{children:`Current Use`})})}),(0,R.jsxs)(J,{align:`right`,children:[(0,R.jsx)(q,{title:`Current configured lifetime of this tool.`+(t?` Counts are estimates.`:``),children:(0,R.jsx)(`span`,{children:`Lifetime`})}),` `]}),(0,R.jsx)(J,{align:`right`,children:(0,R.jsx)(q,{title:`Lifetime minus current use.`+(t?` Counts are estimates.`:``),children:(0,R.jsx)(`span`,{children:`Remaining Use`})})}),(0,R.jsx)(J,{})]})}function F2({report:e,pocket:t}){let[n,r]=(0,L.useState)(!1),i=Q(p2),a=i?9:8,o=X.of(e.parts).filter(e=>e.machines.has(t.machineName)).sumBy(e=>e.scheduledUseMinutes*e.quantity),s=X.of(e.parts).filter(e=>e.machines.has(t.machineName)).sumBy(e=>e.scheduledUseCnt*e.quantity);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(E2,{$noBorderBottom:!0,children:[(0,R.jsx)(J,{children:(0,R.jsx)(zl,{size:`small`,onClick:()=>r(!n),children:n?(0,R.jsx)(Rx,{}):(0,R.jsx)(Fx,{})})}),(0,R.jsx)(J,{children:e.toolName}),(0,R.jsx)(J,{align:`right`,children:t.pocket}),i?(0,R.jsx)(J,{children:t.serial??``}):void 0,(0,R.jsx)(J,{align:`right`,children:(0,R.jsx)(k2,{min:o,cnt:s})}),(0,R.jsx)(J,{align:`right`,children:(0,R.jsx)(k2,{min:t.currentUseMinutes,cnt:t.currentUseCnt})}),(0,R.jsx)(J,{align:`right`,children:(0,R.jsx)(k2,{min:t.lifetimeMinutes,cnt:t.lifetimeCnt})}),(0,R.jsx)(J,{align:`right`,children:(0,R.jsx)(k2,{min:t.remainingMinutes,cnt:t.remainingCnt})}),(0,R.jsx)(J,{})]}),(0,R.jsx)(ob,{children:(0,R.jsx)(J,{sx:{pb:`0`,pt:`0`},colSpan:a,children:(0,R.jsx)(Ac,{in:n,timeout:`auto`,unmountOnExit:!0,children:(0,R.jsx)(A2,{tool:e,machine:t.machineName})})})})]})}var I2=`__Insight__FilterAnyMachine__`,L2=Z(null);function R2(){let e=Q(L2),t=Q(f2);return t===null?(0,R.jsx)(`div`,{}):(0,R.jsxs)(Ty,{stickyHeader:!0,children:[(0,R.jsx)(Jy,{children:e===null?(0,R.jsx)(M2,{}):(0,R.jsx)(P2,{machine:e})}),(0,R.jsx)(My,{children:t.map(t=>e===null?(0,R.jsx)(N2,{tool:t},t.toolName):(0,R.jsx)(L.Fragment,{children:t.machines.filter(t=>t.machineName===e).map(e=>(0,R.jsx)(F2,{report:t,pocket:e},e.pocket))},t.toolName))})]})}function z2(){let[e,t]=GE(L2),[n,r]=GE(u2),[i,a]=(0,L.useState)(!1),o=Q(d2),s=g2(),c=dL();function l(){a(!0),r(new Date).catch(console.log).finally(()=>a(!1))}return c?(0,R.jsx)(`div`,{}):n===null?(0,R.jsx)(`main`,{style:{margin:`2em`,display:`flex`,justifyContent:`center`},children:(0,R.jsx)(gh,{color:`secondary`,size:`large`,variant:`extended`,style:{margin:`2em`},onClick:l,disabled:i,children:(0,R.jsxs)(R.Fragment,{children:[i?(0,R.jsx)(Nl,{size:10,style:{marginRight:`1em`}}):(0,R.jsx)(qx,{fontSize:`inherit`,style:{marginRight:`1em`}}),`Load Tools`]})})}):(0,R.jsxs)(G,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,R.jsx)(q,{title:`Refresh Tools`,children:(0,R.jsx)(`div`,{children:(0,R.jsx)(zl,{onClick:l,disabled:i,size:`small`,children:i?(0,R.jsx)(Nl,{size:10}):(0,R.jsx)(qx,{fontSize:`inherit`})})})}),(0,R.jsxs)(`span`,{style:{marginLeft:`1em`},children:[`Tools from `,(0,R.jsx)(UR,{date:n})]}),(0,R.jsx)(`div`,{style:{flexGrow:`1`}}),(0,R.jsx)(bh,{size:`small`,children:(0,R.jsxs)(bv,{autoWidth:!0,displayEmpty:!0,value:e??I2,style:{marginLeft:`1em`},onChange:e=>{e.target.value===I2?t(null):t(e.target.value)},children:[(0,R.jsx)(I_,{value:I2,children:(0,R.jsx)(`em`,{children:`All Machines`})}),o.map(e=>(0,R.jsx)(I_,{value:e,children:(0,R.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,R.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(zl,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:s,size:`large`,children:(0,R.jsx)(Mx,{})})})]})}function B2(){return fL(`Tool Report`),(0,R.jsxs)(G,{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`,children:[(0,R.jsx)(z2,{}),(0,R.jsx)(`main`,{children:(0,R.jsx)(FH,{children:(0,R.jsx)(R2,{})})})]})}var V2=H(ob)(()=>({"& > *":{borderBottom:`unset`}}));function H2(e){if(e.length===0)return``;let t=e.lastIndexOf(`\\`);return t>=0&&t<e.length-2?e.substr(t+1):e}var U2=new Intl.NumberFormat(`en-US`,{maximumFractionDigits:2});function W2(e){let[t,n]=(0,L.useState)(!1),r=WE(S2),i=WE(w2),a=8+(e.showCellCtrlCol?1:0)+(e.showRevCol?1:0),o=e.program.toolUse!==null&&e.program.toolUse.tools.length>0&&X.of(e.program.toolUse.tools).some(e=>e.cycleUsageMinutes>0),s=e.program.toolUse!==null&&e.program.toolUse.tools.length>0&&X.of(e.program.toolUse.tools).some(e=>e.cycleUsageCnt>0);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(V2,{children:[(0,R.jsx)(J,{children:e.program.toolUse===null||e.program.toolUse.tools.length===0?void 0:(0,R.jsx)(zl,{size:`small`,onClick:()=>n(!t),children:t?(0,R.jsx)(Rx,{}):(0,R.jsx)(Fx,{})})}),(0,R.jsx)(J,{children:H2(e.program.programName)}),e.showCellCtrlCol?(0,R.jsx)(J,{children:e.program.cellControllerProgramName}):void 0,(0,R.jsx)(J,{children:e.program.partName===null?void 0:(0,R.jsxs)(G,{sx:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(IH,{part:e.program.partName,size:20}),(0,R.jsx)(`span`,{children:e.program.partName})]})}),(0,R.jsx)(J,{children:e.program.comment??``}),e.showRevCol?(0,R.jsx)(J,{children:e.program.revision===null?``:e.program.revision.toFixed()}):void 0,(0,R.jsx)(J,{align:`right`,children:e.program.statisticalCycleTime===null?``:e.program.statisticalCycleTime.medianMinutesForSingleMat.toFixed(2)}),(0,R.jsx)(J,{align:`right`,children:e.program.statisticalCycleTime===null?``:e.program.statisticalCycleTime.MAD_aboveMinutes.toFixed(2)}),(0,R.jsx)(J,{align:`right`,children:e.program.statisticalCycleTime===null?``:e.program.statisticalCycleTime.MAD_belowMinutes.toFixed(2)}),(0,R.jsx)(J,{align:`right`,children:e.program.plannedMins===null?``:U2.format(e.program.plannedMins)}),(0,R.jsxs)(J,{children:[(0,R.jsx)(q,{title:`Load Program Content`,children:(0,R.jsx)(zl,{size:`small`,onClick:()=>r(e.program),children:(0,R.jsx)(mx,{})})}),e.program.revision===null?void 0:(0,R.jsx)(q,{title:`Revision History`,children:(0,R.jsx)(zl,{size:`small`,onClick:()=>i(e.program),children:(0,R.jsx)(Ax,{})})})]})]}),(0,R.jsx)(ob,{children:(0,R.jsx)(J,{sx:{pb:`0`,pt:`0`},colSpan:a,children:(0,R.jsx)(Ac,{in:t,timeout:`auto`,unmountOnExit:!0,children:(0,R.jsx)(G,{sx:{mr:`1em`,ml:`3em`},children:e.program.toolUse===null||e.program.toolUse.tools.length===0?void 0:(0,R.jsxs)(Ty,{size:`small`,sx:{width:`auto`,ml:`10em`,mr:`1em`},children:[(0,R.jsx)(Jy,{children:(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{children:`Tool`}),o?(0,R.jsx)(J,{align:`right`,children:`Estimated Usage (min)`}):void 0,s?(0,R.jsx)(J,{align:`right`,children:`Estimated Usage (count)`}):void 0]})}),(0,R.jsx)(My,{children:X.of(e.program.toolUse.tools).map((e,t)=>(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{children:e.toolName}),o?(0,R.jsx)(J,{align:`right`,children:e.cycleUsageMinutes===0?``:e.cycleUsageMinutes.toFixed(1)}):void 0,s?(0,R.jsx)(J,{align:`right`,children:e.cycleUsageCnt===0?``:e.cycleUsageCnt.toFixed(1)}):void 0]},t))})]})})})})})]})}function G2(){let e=Q(x2),[t,n]=(0,L.useState)(`ProgramName`),[r,i]=(0,L.useState)(`asc`);if(e===null)return(0,R.jsx)(`div`,{});let a=X.of(e.programs).sortWith((e,n)=>{let i=0;switch(t){case`ProgramName`:i=H2(e.programName).localeCompare(H2(n.programName));break;case`CellProgName`:i=e.cellControllerProgramName.localeCompare(n.cellControllerProgramName);break;case`Comment`:i=e.comment===null&&n.comment===null?0:e.comment===null?1:n.comment===null?-1:e.comment.localeCompare(n.comment);break;case`Revision`:i=e.revision===null&&n.revision===null?0:e.revision===null?1:n.revision===null?-1:e.revision-n.revision;break;case`PartName`:i=e.partName===null&&n.partName===null?0:e.partName===null?1:n.partName===null?-1:e.partName.localeCompare(n.partName);break;case`MedianTime`:i=e.statisticalCycleTime===null&&n.statisticalCycleTime===null?0:e.statisticalCycleTime===null?1:n.statisticalCycleTime===null?-1:e.statisticalCycleTime.medianMinutesForSingleMat-n.statisticalCycleTime.medianMinutesForSingleMat;break;case`DeviationAbove`:i=e.statisticalCycleTime===null&&n.statisticalCycleTime===null?0:e.statisticalCycleTime===null?1:n.statisticalCycleTime===null?-1:e.statisticalCycleTime.MAD_aboveMinutes-n.statisticalCycleTime.MAD_aboveMinutes;break;case`DeviationBelow`:i=e.statisticalCycleTime===null&&n.statisticalCycleTime===null?0:e.statisticalCycleTime===null?1:n.statisticalCycleTime===null?-1:e.statisticalCycleTime.MAD_belowMinutes-n.statisticalCycleTime.MAD_belowMinutes;break;case`Planned`:i=e.plannedMins===null&&n.plannedMins===null?0:e.plannedMins===null?1:n.plannedMins===null?-1:e.plannedMins-n.plannedMins;break}return i===0?0:i<0&&r===`asc`||i>0&&r===`desc`?-1:1});function o(e){e===t?i(r===`asc`?`desc`:`asc`):n(e)}return(0,R.jsxs)(Ty,{stickyHeader:!0,children:[(0,R.jsx)(Jy,{children:(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{}),(0,R.jsx)(J,{sortDirection:t===`ProgramName`?r:!1,children:(0,R.jsx)(pb,{active:t===`ProgramName`,direction:r,onClick:()=>o(`ProgramName`),children:`Program Name`})}),e.cellNameDifferentFromProgName?(0,R.jsx)(J,{sortDirection:t===`CellProgName`?r:!1,children:(0,R.jsx)(pb,{active:t===`CellProgName`,direction:r,onClick:()=>o(`CellProgName`),children:`Cell Controller Program`})}):void 0,(0,R.jsx)(J,{sortDirection:t===`PartName`?r:!1,children:(0,R.jsx)(pb,{active:t===`PartName`,direction:r,onClick:()=>o(`PartName`),children:`Part`})}),(0,R.jsx)(J,{sortDirection:t===`Comment`?r:!1,children:(0,R.jsx)(pb,{active:t===`Comment`,direction:r,onClick:()=>o(`Comment`),children:`Comment`})}),e.hasRevisions?(0,R.jsx)(J,{sortDirection:t===`Revision`?r:!1,children:(0,R.jsx)(pb,{active:t===`Revision`,direction:r,onClick:()=>o(`Revision`),children:`Revision`})}):void 0,(0,R.jsx)(J,{sortDirection:t===`MedianTime`?r:!1,align:`right`,children:(0,R.jsx)(pb,{active:t===`MedianTime`,direction:r,onClick:()=>o(`MedianTime`),children:`Median Time / Material (min)`})}),(0,R.jsx)(J,{sortDirection:t===`DeviationAbove`?r:!1,align:`right`,children:(0,R.jsx)(pb,{active:t===`DeviationAbove`,direction:r,onClick:()=>o(`DeviationAbove`),children:`Deviation Above Median`})}),(0,R.jsx)(J,{sortDirection:t===`DeviationBelow`?r:!1,align:`right`,children:(0,R.jsx)(pb,{active:t===`DeviationBelow`,direction:r,onClick:()=>o(`DeviationBelow`),children:`Deviation Below Median`})}),(0,R.jsx)(J,{sortDirection:t===`Planned`?r:!1,align:`right`,children:(0,R.jsx)(pb,{active:t===`Planned`,direction:r,onClick:()=>o(`Planned`),children:`Planned Time (min)`})}),(0,R.jsx)(J,{})]})}),(0,R.jsx)(My,{children:X.of(a).map((t,n)=>(0,R.jsx)(W2,{program:t,showCellCtrlCol:e.cellNameDifferentFromProgName,showRevCol:e.hasRevisions},n))})]})}function K2(){let e=Q(C2),[t,n]=(0,L.useState)(null),r=(0,L.useMemo)(()=>new Worker(new URL(`/assets/ProgramHighlight-LvRM40Qr.js`,``+import.meta.url),{type:`module`}),[]);return(0,L.useEffect)(()=>{let e=e=>n(e);return r.onmessage=t=>e(t.data),()=>{e=()=>null,r.terminate(),n(null)}},[r]),(0,L.useEffect)(()=>{e&&e!==``&&r.postMessage(e)},[e,r]),(0,R.jsx)(`pre`,{children:t===null?(0,R.jsx)(`code`,{className:`gcode`,children:e}):(0,R.jsx)(`code`,{className:`gcode`,dangerouslySetInnerHTML:{__html:t}})})}function q2(){let[e,t]=GE(S2),n=Q(w2);return(0,R.jsxs)(lh,{open:e!==null&&n===null,onClose:()=>t(null),maxWidth:`lg`,children:[(0,R.jsx)(fh,{children:e?.partName?(0,R.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,alignItems:`center`},children:[(0,R.jsx)(IH,{part:e.partName}),(0,R.jsxs)(`div`,{style:{marginLeft:`10px`,marginRight:`3em`},children:[e?.programName??`Program`,` `,e?.revision?` rev`+e.revision.toFixed():``,` `,(0,R.jsxs)(W,{variant:`subtitle1`,component:`span`,children:[`(`,e.partName,`)`]})]})]}):(0,R.jsxs)(R.Fragment,{children:[e?.programName??`Program`,` `,e?.revision?` rev`+e.revision.toFixed():``]})}),(0,R.jsx)(dh,{children:e===null||n!==null?(0,R.jsx)(`div`,{}):(0,R.jsx)(FH,{children:(0,R.jsx)(K2,{})})}),(0,R.jsx)(uh,{children:(0,R.jsx)(K,{onClick:()=>t(null),children:`Close`})})]})}var J2=10;function Y2(e){let t=Q(w2),n=WE(S2);return(0,R.jsxs)(Ty,{children:[(0,R.jsx)(Jy,{children:(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{children:`Revision`}),(0,R.jsx)(J,{children:`Comment`}),(0,R.jsx)(J,{children:`Cell Controller Program`}),(0,R.jsx)(J,{})]})}),(0,R.jsx)(My,{children:e.loading?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(ob,{children:(0,R.jsx)(J,{colSpan:4,children:(0,R.jsx)(Nl,{})})}),X.ofRange(0,J2-1).map(e=>(0,R.jsx)(ob,{children:(0,R.jsx)(J,{colSpan:4})},e))]}):X.of(e.revisions).drop(e.page*J2).take(J2).map(e=>(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{children:e.revision}),(0,R.jsx)(J,{children:e.comment??``}),(0,R.jsx)(J,{children:e.cellControllerProgramName??``}),(0,R.jsx)(J,{children:(0,R.jsx)(q,{title:`Load Program Content`,children:(0,R.jsx)(zl,{size:`small`,onClick:()=>n({...e,partName:t?.partName??null}),children:(0,R.jsx)(mx,{})})})})]},e.revision))})]})}function X2(){let[e,t]=GE(w2),[n,r]=GE(S2),[i,a]=(0,L.useState)(null),[o,s]=(0,L.useState)({page:0,hasMore:!1}),[c,l]=(0,L.useState)(0),[u,d]=(0,L.useState)(!1),[f,p]=(0,L.useState)(null);(0,L.useEffect)(()=>{e===null?(a(null),l(0),s({page:0,hasMore:!1})):e!==null&&i===null&&(d(!0),p(null),EC.getProgramRevisionsInDescendingOrderOfRevision(e.programName,J2,void 0).then(e=>{a(e),s({page:0,hasMore:e.length===J2})}).catch(p).finally(()=>d(!1)))},[e,i]);function m(){if(c<o.page)l(c+1);else if(o.hasMore&&e!==null&&i!==null&&i.length>0){d(!0),p(null);let t=i[i.length-1];EC.getProgramRevisionsInDescendingOrderOfRevision(e.programName,J2,t?t.revision-1:void 0).then(e=>{a(t=>t===null?e:t.concat(e)),s({page:c+1,hasMore:e.length===J2}),l(c+1)}).catch(p).finally(()=>d(!1))}}return(0,R.jsxs)(lh,{open:e!==null,onClose:()=>t(null),maxWidth:`lg`,children:[(0,R.jsx)(fh,{children:e?.partName?(0,R.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,alignItems:`center`},children:[(0,R.jsx)(IH,{part:e.partName}),(0,R.jsxs)(`div`,{style:{marginLeft:`10px`,marginRight:`3em`},children:[e.programName??`Program`,` `,(0,R.jsxs)(W,{variant:`subtitle1`,component:`span`,children:[`(`,e.partName,`)`]})]})]}):(0,R.jsx)(R.Fragment,{children:e?.programName??`Program`})}),(0,R.jsxs)(dh,{children:[f===null?void 0:(0,R.jsx)(im,{children:(0,R.jsx)(cm,{children:typeof f==`string`?f:f.message})}),n===null?i===null?u?(0,R.jsx)(Nl,{}):void 0:(0,R.jsx)(Y2,{page:c,revisions:i,loading:u}):(0,R.jsx)(FH,{children:(0,R.jsx)(K2,{})})]}),(0,R.jsx)(uh,{children:(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,width:`100%`},children:[n===null?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(q,{title:`Latest Revisions`,children:(0,R.jsx)(`span`,{children:(0,R.jsx)(zl,{onClick:()=>l(0),disabled:u||c===0,size:`large`,children:(0,R.jsx)(Dx,{})})})}),(0,R.jsx)(q,{title:`Previous Page`,children:(0,R.jsx)(`span`,{children:(0,R.jsx)(zl,{onClick:()=>l(c-1),disabled:u||c===0,size:`large`,children:(0,R.jsx)(Ix,{})})})}),(0,R.jsx)(q,{title:`Next Page`,children:(0,R.jsx)(`span`,{children:(0,R.jsx)(zl,{onClick:()=>m(),disabled:u||c===o.page&&!o.hasMore,size:`large`,children:(0,R.jsx)(Lx,{})})})})]}):void 0,(0,R.jsx)(`div`,{style:{flexGrow:1}}),n===null?void 0:(0,R.jsx)(K,{onClick:()=>r(null),children:`Back to History`}),(0,R.jsx)(K,{onClick:()=>t(null),children:`Close`})]})})]})}function Z2(){let[e,t]=GE(b2),[n,r]=(0,L.useState)(!1),i=dL(),[a,o]=GE(v2);function s(){r(!0),t(new Date).catch(console.log).finally(()=>r(!1))}return i?(0,R.jsx)(`div`,{}):e===null?(0,R.jsx)(`main`,{style:{margin:`2em`,display:`flex`,justifyContent:`center`},children:(0,R.jsx)(gh,{color:`secondary`,size:`large`,variant:`extended`,style:{margin:`2em`},onClick:s,disabled:n,children:(0,R.jsxs)(R.Fragment,{children:[n?(0,R.jsx)(Nl,{size:10,style:{marginRight:`1em`}}):(0,R.jsx)(qx,{fontSize:`inherit`,style:{marginRight:`1em`}}),`Load Programs`]})})}):(0,R.jsxs)(G,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,R.jsx)(q,{title:`Refresh Programs`,children:(0,R.jsx)(`div`,{children:(0,R.jsx)(zl,{onClick:s,disabled:n,size:`small`,children:n?(0,R.jsx)(Nl,{size:10}):(0,R.jsx)(qx,{fontSize:`inherit`})})})}),(0,R.jsxs)(`span`,{style:{marginLeft:`1em`},children:[`Programs from `,(0,R.jsx)(UR,{date:e})]}),(0,R.jsx)(`div`,{style:{flexGrow:1}}),(0,R.jsx)(bh,{size:`small`,children:(0,R.jsxs)(bv,{autoWidth:!0,value:a,onChange:e=>o(e.target.value),children:[(0,R.jsx)(I_,{value:`AllPrograms`,children:`All Programs`},`AllPrograms`),(0,R.jsx)(I_,{value:`ActivePrograms`,children:`Active Programs`},`ActivePrograms`)]})})]})}function Q2(){return fL(`Programs`),(0,R.jsxs)(G,{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`,children:[(0,R.jsx)(Z2,{}),(0,R.jsx)(`main`,{children:(0,R.jsx)(FH,{children:(0,R.jsx)(G2,{})})}),(0,R.jsx)(q2,{}),(0,R.jsx)(X2,{})]})}var $2=Z(!1),e4=$2,t4=Z(null),n4=t4;function r4(e){let t=new Date,n=VC(t,-30),r=wC.currentStatus().then(t=>e(hR,t)),i=wC.recent(n,[]).then(t=>e(pR,t)),a=TC.get(n,t).then(t=>e(mR,t));Promise.all([r,i,a]).catch(t=>e(t4,t.message??`Error`)).finally(()=>e($2,!1))}function i4(e,t,n){let r=new Date,i=wC.currentStatus().then(e=>n(hR,e)),a=wC.recent(VC(r,-30),t?Array.from(t):[]).then(e=>n(pR,e)),o=TC.recent(e,void 0).then(e=>n(mR,e));Promise.all([i,a,o]).catch(e=>n(t4,e.message??`Error`)).finally(()=>n($2,!1))}var a4=class{constructor(e){this.userCalledClose=!1,this.reconnectAttempts=0,this.url=e,this.connect()}close(){this.userCalledClose=!0,this.ws?.close()}connect(){if(this.userCalledClose)return;this.ws=new WebSocket(this.url);let e=this.ws,t=setTimeout(()=>{e.close()},2e3);e.onopen=()=>{clearTimeout(t),this.reconnectAttempts=0,this.onopen?.()},e.onclose=()=>{if(clearTimeout(t),this.ws=void 0,this.userCalledClose)return;this.onreconnecting?.();let e=Math.min(1e3*1.5**this.reconnectAttempts,3e4);setTimeout(()=>{this.reconnectAttempts++,this.connect()},e)},e.onmessage=e=>{this.onmessage?.(e)},e.onerror=e=>{console.error(e)}}},o4=Z(null,(e,t)=>{let n=e(Mne),r=e(XE);t($2,!0),t(t4,null),n==null?r4(t):i4(n,r,t)}),s4=Z(null,(e,t,n)=>{t(Nne,{evt:hS.fromJS(JSON.parse(n.data)),now:new Date,expire:!0})});function c4(){let e=WE(o4),t=WE($2),n=(0,L.useCallback)(()=>t(!0),[t]),r=WE(s4),i=Q(CO),a=(0,L.useRef)(null);return(0,L.useEffect)(()=>{if(a.current)return;let t=i.user??null,o=window.location,s;if(o.protocol===`backup:`)return;s=o.protocol===`https:`?`wss:`:`ws:`,s+=`//`+o.host+`/api/v1/events`,t&&(s+=`?token=`+encodeURIComponent(t.access_token));let c=new a4(s);return c.onopen=e,c.onreconnecting=n,c.onmessage=r,a.current=c,()=>{a.current&&=(a.current.close(),null)}},[i,r,e,n]),null}var l4=function(e){return e[e.Date=0]=`Date`,e[e.Part=1]=`Part`,e[e.Scheduled=2]=`Scheduled`,e[e.Removed=3]=`Removed`,e[e.Completed=4]=`Completed`,e}(l4||{}),u4=[{id:l4.Date,label:`Date`,numeric:!1,getDisplay:e=>e.routeStartTime.toLocaleString(),getForSort:e=>e.routeStartTime.getTime(),getForExport:e=>e.routeStartTime.toISOString()},{id:l4.Part,label:`Part`,numeric:!1,getDisplay:e=>e.partName},{id:l4.Scheduled,label:`Scheduled`,numeric:!0,getDisplay:e=>e.scheduledQty.toString(),getForSort:e=>e.scheduledQty},{id:l4.Removed,label:`Removed`,numeric:!0,getDisplay:e=>e.decrementedQty.toString(),getForSort:e=>e.decrementedQty},{id:l4.Completed,label:`Completed`,numeric:!0,getDisplay:e=>e.completedQty.toString()}];function d4({job:e}){let[t,n]=(0,L.useState)(!1);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(JJ,{children:[u4.map(t=>(0,R.jsx)(J,{align:t.numeric?`right`:`left`,children:t.id===l4.Part?(0,R.jsxs)(G,{sx:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(G,{sx:{mr:`0.2em`},children:(0,R.jsx)(IH,{part:e.partName,size:25})}),(0,R.jsx)(`div`,{children:e.partName})]}):t.getDisplay(e)},t.id)),(0,R.jsx)(J,{children:(0,R.jsx)(q,{title:`Show Details`,children:(0,R.jsx)(zl,{size:`small`,onClick:()=>n(!t),children:t?(0,R.jsx)(Rx,{}):(0,R.jsx)(Fx,{})})})})]}),(0,R.jsx)(YJ,{children:(0,R.jsx)(J,{sx:{pb:`0`,pt:`0`},colSpan:u4.length+1,children:(0,R.jsx)(Ac,{in:t,timeout:`auto`,unmountOnExit:!0,children:(0,R.jsx)(PK,{job:e.inProcJob?e.inProcJob:e.historicJob,checkAnalysisMonth:!0})})})})]})}function f4(){let e=Q(vR),t=$$(),n=Q$(e),r=e1(l4.Date,u4),i=Q(e.type===`Last30`?kL:jL),a=Q(e.type===`Last30`?JE:QE),o=(0,L.useMemo)(()=>mK(n.zoomRange,i.matsById,a,null),[n,i.matsById,a]),s=(0,L.useMemo)(()=>X.of(o).sortBy(r.sortOn).drop(t.page*t.rowsPerPage).take(t.rowsPerPage),[o,r,t]);return(0,R.jsxs)(`div`,{children:[(0,R.jsxs)(Ty,{stickyHeader:!0,children:[(0,R.jsx)(G$,{columns:u4,sort:r,showDetailsCol:!0,copyToClipboardRows:o}),(0,R.jsx)(My,{children:s.map((e,t)=>(0,R.jsx)(d4,{job:e},e.historicJob?.unique??e.inProcJob?.unique??t))})]}),(0,R.jsx)(X$,{tpage:t,zoom:n.zoom,count:o.length})]})}function p4(){return fL(`Scheduled Jobs`),(0,R.jsx)(R.Fragment,{children:(0,R.jsx)(`main`,{style:{padding:`24px`},children:(0,R.jsx)(f4,{})})})}function m4(){fL(`Quality`);let e=Q(vR);return(0,R.jsx)(y1,{subtitle:`Inspection decisions grouped by path`,inspectionlogs:Q(e.type===`Last30`?TL:Qte),zoomType:e.type===`Last30`?`Last30Days`:`ZoomIntoRange`,default_date_range:e.type===`Last30`?[VC(fw(),-29),VC(fw(),1)]:[e.month,HC(e.month,1)]})}var h4={display:`flex`,backgroundColor:`#E0E0E0`,paddingLeft:`24px`,paddingRight:`24px`,paddingBottom:`4px`,height:`2.5em`,alignItems:`flex-end`},g4={display:`flex`,alignSelf:`center`,alignItems:`flex-end`},_4=`@@all_inspection_display@@`,v4=`@@recent_completed_material@@`,y4=function(e){return e.LoadUnload=`LoadUnload`,e.Inspection=`Inspection`,e.CloseOut=`CloseOut`,e.Queues=`Queues`,e.AllMaterial=`AllMaterial`,e}(y4||{});function b4(){let[e,t]=GE(_K);return(0,R.jsx)(Eh,{control:(0,R.jsx)(_m,{size:`small`,checked:e,onChange:e=>t(e.target.checked)}),label:`Hide Non-Loading Material`,sx:{pl:2,pr:2}})}function x4(){let[e,t]=GE(uL),n=Q(zL),r=Object.keys(Q(GO).queues).sort((e,t)=>e.localeCompare(t)),i=Yb(ts().breakpoints.down(`md`));function a(n){let r=parseFloat(n);!isNaN(r)&&isFinite(r)&&(e.route===$.Station_LoadMonitor?t({route:$.Station_LoadMonitor,loadNum:r,queues:e.queues,completed:e.completed}):t({route:$.Station_LoadMonitor,loadNum:r,queues:[],completed:!1}))}function o(e){t(e===_4?{route:$.Station_InspectionMonitor}:{route:$.Station_InspectionMonitorWithType,inspType:e})}function s(n){let r=n.includes(v4);n=n.filter(e=>e!==v4).slice(0,2),e.route===$.Station_LoadMonitor?t({route:$.Station_LoadMonitor,loadNum:e.loadNum,queues:n,completed:r}):t({route:$.Station_LoadMonitor,loadNum:1,queues:n,completed:r})}function c(e){t({route:$.Station_Queues,queues:e})}let l=y4.LoadUnload,u=1,d=null,f=[];switch(e.route){case $.Station_LoadMonitor:l=y4.LoadUnload,u=e.loadNum,f=e.queues,e.completed&&(f=f.concat(v4));break;case $.Station_InspectionMonitor:l=y4.Inspection,d=``;break;case $.Station_InspectionMonitorWithType:l=y4.Inspection,d=e.inspType;break;case $.Station_Queues:l=y4.Queues,f=e.queues;break;case $.Station_Closeout:l=y4.CloseOut;break;default:l=y4.AllMaterial;break}return(0,R.jsxs)(G,{component:`nav`,sx:i?h4:g4,children:[l===y4.LoadUnload?(0,R.jsx)(Zh,{type:`number`,placeholder:`Load Station Number`,value:u,onChange:e=>a(e.target.value),style:{width:`3em`,marginLeft:`1em`}},`loadnumselect`):void 0,l===y4.Inspection?(0,R.jsxs)(bv,{value:d||_4,onChange:e=>o(e.target.value),variant:`standard`,style:{marginLeft:`1em`},children:[(0,R.jsx)(I_,{value:_4,children:(0,R.jsx)(`em`,{children:`All`})},_4),X.of(n).sortBy(e=>e).map(e=>(0,R.jsx)(I_,{value:e,children:e},e))]},`inspselect`):void 0,l===y4.LoadUnload?(0,R.jsxs)(bh,{style:{marginLeft:`1em`},children:[f.length===0?(0,R.jsx)(`label`,{style:{position:`absolute`,top:`10px`,left:0,color:`rgba(0,0,0,0.54)`,fontSize:`0.9rem`},children:`Display queue(s)`}):void 0,(0,R.jsxs)(bv,{multiple:!0,displayEmpty:!0,variant:`standard`,value:f,inputProps:{id:`queueselect`},style:{minWidth:`10em`,marginTop:`0`},onChange:e=>s(e.target.value),children:[r.map((e,t)=>(0,R.jsx)(I_,{value:e,children:e},t)),(0,R.jsx)(I_,{value:v4,children:(0,R.jsx)(`i`,{children:`Completed`})}),(0,R.jsx)(mh,{}),(0,R.jsx)(b4,{})]})]}):void 0,l===y4.Queues?(0,R.jsxs)(bh,{style:{marginLeft:`1em`,minWidth:`10em`},children:[f.length===0?(0,R.jsx)(`label`,{style:{position:`absolute`,top:`10px`,left:0,color:`rgba(0,0,0,0.54)`,fontSize:`0.9rem`},children:`Select queue(s)`}):void 0,(0,R.jsx)(bv,{multiple:!0,displayEmpty:!0,variant:`standard`,value:f,inputProps:{id:`queueselect`},style:{marginTop:`0`},onChange:e=>c(e.target.value),children:r.map((e,t)=>(0,R.jsx)(I_,{value:e,children:e},t))})]}):void 0]})}function S4(){let e=Yb(ts().breakpoints.down(`md`));return(0,R.jsx)(G,{display:`flex`,alignItems:`center`,height:`100%`,bgcolor:e?`#E0E0E0`:void 0,children:(0,R.jsx)(A0,{full:e})})}var C4=jO(`shift-starts`,[[1,360],[2,840],[3,1320]]),w4=Z(e=>new Map(e(C4)),(e,t,n)=>{let r=new Map(e(C4));n(r),t(C4,Array.from(r.entries()))});function T4(e){let t=Q(w4);return(0,L.useMemo)(()=>{let n=[];for(let e=1;e<=3;e++){let r=t.get(e);r!==void 0&&(n.length>=1&&n[n.length-1]>=r||n.push(r))}if(n.length===0)return[{start:e,end:VC(e,1)}];let r=QC(VC(e,1),n[0]),i=[];for(let t=0;t<n.length;t++)i.push({start:QC(e,n[t]),end:t===n.length-1?r:QC(e,n[t+1])});return i},[t,e])}function E4(e){let[t,n]=e.split(`:`);return parseInt(t,10)*60+parseInt(n,10)}function D4(e){let t=Math.floor(e/60),n=e%60;return`${t.toString().padStart(2,`0`)}:${n.toString().padStart(2,`0`)}`}function O4(e,t){let n=t.get(e);if(n===void 0)return!1;if(e===1){let e=t.get(2)??t.get(3);return e!==void 0&&e<=n}else if(e===2){let e=t.get(1),r=t.get(3);return e!==void 0&&e>=n||r!==void 0&&r<=n}else if(e===3){let e=t.get(2)??t.get(1);return e!==void 0&&e>=n}else return!1}function k4({shiftNum:e}){let[t,n]=GE(w4),r=t.get(e);return(0,R.jsx)(Bb,{type:`time`,label:`Shift ${e} Start`,error:O4(e,t),value:r===void 0?``:D4(r),onChange:t=>{let r=t.target.value;n(r===``?t=>t.delete(e):t=>t.set(e,E4(r)))},variant:`standard`,size:`small`,slotProps:{inputLabel:{shrink:!0},input:e===1?void 0:{endAdornment:(0,R.jsx)(q,{title:`Clear/Disable Shift`,children:(0,R.jsx)(ul,{sx:{mb:`4px`},onClick:()=>n(t=>t.delete(e)),children:(0,R.jsx)(fx,{fontSize:`small`})})})}}})}function A4(){return(0,R.jsxs)(Rv,{direction:`row`,spacing:2,children:[(0,R.jsx)(k4,{shiftNum:1}),(0,R.jsx)(k4,{shiftNum:2}),(0,R.jsx)(k4,{shiftNum:3})]})}var j4=function(e){return e[e.Part=0]=`Part`,e[e.PlannedShift0=1]=`PlannedShift0`,e[e.PlannedShift1=2]=`PlannedShift1`,e[e.PlannedShift2=3]=`PlannedShift2`,e[e.CompletedShift0=4]=`CompletedShift0`,e[e.CompletedShift1=5]=`CompletedShift1`,e[e.CompletedShift2=6]=`CompletedShift2`,e}(j4||{});function M4(e,t){return n=>{let r=e(n);for(let e=0;e<t.length;e++){let i=t[e];if(r>=i.start&&r<i.end)return{val:n,shift:e}}return null}}function N4(e,t){return X.of(e).filter(e=>e.finalProcess).collect(M4(e=>e.completeTime,t)).toLookupOrderedMap(e=>e.val.partName,e=>e.shift,e=>e.val.quantity,(e,t)=>e+t)}function P4(e,t){return e.valuesToLazySeq().filter(e=>e.isLabor&&e.operation===`UNLOAD`&&X.of(e.material).some(e=>e.proc===e.numproc)).collect(M4(e=>e.endTime,t)).toLookupOrderedMap(e=>e.val.part,e=>e.shift,e=>X.of(e.val.material).sumBy(e=>e.proc===e.numproc?1:0),(e,t)=>e+t)}function F4(e){let t=Q(Sk),n=Q(gL),r=T4(e);return(0,L.useMemo)(()=>{let e=N4(n,r),i=P4(t,r);return e.mapValues(e=>({planned:e})).adjust(i,(e,t)=>({...e??{},completed:t})).toAscLazySeq().map(([e,{planned:t,completed:n}])=>({part:e,planned:t??XT.empty(),completed:n??XT.empty()})).toRArray()},[t,n,r])}var I4=new Intl.DateTimeFormat(void 0,{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`});function L4({row:e}){return(0,R.jsxs)(Rv,{direction:`row`,spacing:1,alignItems:`center`,children:[(0,R.jsx)(IH,{part:e.part,size:25}),(0,R.jsx)(`span`,{children:e.part})]})}function R4(e){let t=T4(e).length;return(0,L.useMemo)(()=>{let e=[{id:j4.Part,numeric:!1,label:`Part`,getDisplay:e=>e.part,getForTotal:()=>0,Cell:L4},{id:j4.PlannedShift0,numeric:!0,label:`Shift 1 Planned`,getDisplay:e=>e.planned.get(0)?.toString()??``,getForSort:e=>e.planned.get(0)??0,getForTotal:e=>e.planned.get(0)??0},{id:j4.CompletedShift0,numeric:!0,label:`Shift 1 Completed`,getDisplay:e=>e.completed.get(0)?.toString()??``,getForSort:e=>e.completed.get(0)??0,getForTotal:e=>e.completed.get(0)??0}];return t>=2&&(e.push({id:j4.PlannedShift1,numeric:!0,label:`Shift 2 Planned`,getDisplay:e=>e.planned.get(1)?.toString()??``,getForSort:e=>e.planned.get(1)??0,getForTotal:e=>e.planned.get(1)??0}),e.push({id:j4.CompletedShift1,numeric:!0,label:`Shift 2 Completed`,getDisplay:e=>e.completed.get(1)?.toString()??``,getForSort:e=>e.completed.get(1)??0,getForTotal:e=>e.completed.get(1)??0})),t===3&&(e.push({id:j4.PlannedShift2,numeric:!0,label:`Shift 3 Planned`,getDisplay:e=>e.planned.get(2)?.toString()??``,getForSort:e=>e.planned.get(2)??0,getForTotal:e=>e.planned.get(2)??0}),e.push({id:j4.CompletedShift2,numeric:!0,label:`Shift 3 Completed`,getDisplay:e=>e.completed.get(2)?.toString()??``,getForSort:e=>e.completed.get(2)??0,getForTotal:e=>e.completed.get(2)??0})),e},[t])}function z4({columns:e,rows:t}){return(0,R.jsx)(ob,{children:e.map(e=>(0,R.jsx)(J,{align:e.numeric?`right`:`left`,children:e.id===j4.Part?`Total`:X.of(t).sumBy(e.getForTotal)},e.id))})}var B4=(0,L.memo)(function({columns:e,rows:t}){let n=e1(j4.Part,e);return(0,R.jsx)(G,{sx:{overflowX:`auto`},children:(0,R.jsxs)(Ty,{stickyHeader:!0,children:[(0,R.jsx)(G$,{columns:e,sort:n,showDetailsCol:!1}),(0,R.jsx)(Z$,{columns:e,pageData:X.of(t).toSortedArray(n.sortOn,e=>e.part)}),(0,R.jsx)(Hy,{children:(0,R.jsx)(z4,{columns:e,rows:t})})]})})});function V4({day:e,setDay:t}){let n=fw();return(0,R.jsxs)(Rv,{direction:`row`,spacing:2,alignItems:`center`,children:[(0,R.jsx)(q,{title:`Previous Day`,children:(0,R.jsx)(`div`,{children:(0,R.jsx)(zl,{disabled:e<=VC(n,-28),onClick:()=>t(e=>VC(e,-1)),children:(0,R.jsx)(eS,{})})})}),(0,R.jsx)(W,{sx:{minWidth:`14em`,textAlign:`center`},children:I4.format(e)}),(0,R.jsx)(q,{title:`Next Day`,children:(0,R.jsx)(`div`,{children:(0,R.jsx)(zl,{disabled:e>=n,onClick:()=>t(e=>VC(e,1)),children:(0,R.jsx)($x,{})})})})]})}var H4=`"shifts day export" auto / 1fr 1fr 1fr`,U4=`"shifts export" auto
|
|
331
|
+
"day day" auto / 1fr auto`,W4=function({day:e,setDay:t,columns:n,rows:r}){return(0,R.jsxs)(G,{component:`nav`,sx:{display:`grid`,gridTemplate:{md:H4,xs:U4},minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,R.jsx)(G,{gridArea:`shifts`,justifySelf:`flex-start`,children:(0,R.jsx)(A4,{})}),(0,R.jsx)(G,{gridArea:`day`,justifySelf:`center`,children:(0,R.jsx)(V4,{day:e,setDay:t})}),(0,R.jsx)(G,{gridArea:`export`,justifySelf:`flex-end`,children:(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(zl,{onClick:()=>n1(n,r),children:(0,R.jsx)(Mx,{})})})})]})};function G4(){fL(`Recent Completed Parts`);let[e,t]=(0,L.useState)(fw),n=R4(e),r=F4(e);return(0,R.jsxs)(G,{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`,children:[(0,R.jsx)(W4,{day:e,setDay:t,rows:r,columns:n}),(0,R.jsx)(`main`,{children:(0,R.jsx)(B4,{rows:r,columns:n})})]})}function K4(){let[e,t]=(0,L.useState)(!1);function n(){t(!0),CC.enableVerboseLoggingForFiveMinutes(),setTimeout(()=>t(!1),300*1e3)}return(0,R.jsx)(`main`,{style:{marginTop:`4em`},children:(0,R.jsxs)(`div`,{style:{maxWidth:`50em`,marginLeft:`auto`,marginRight:`auto`,textAlign:`center`},children:[(0,R.jsx)(`p`,{style:{marginBottom:`1em`},children:`Verbose logging generates a large amount of additional data in the FMS Insight Server debug log file.`}),(0,R.jsx)(K,{disabled:e,onClick:n,variant:`contained`,children:e?(0,R.jsx)(`span`,{children:`Verbose Logging is Enabled`}):(0,R.jsx)(`span`,{children:`Enable Verbose Logging For 5 minutes`})})]})})}function q4(){return(0,R.jsxs)(`svg`,{width:`30px`,height:`30px`,viewBox:`0 0 170 170`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,R.jsxs)(`defs`,{children:[(0,R.jsx)(`path`,{id:`t`,d:`m307.5 125v77.5h-40c6.92-6.52 11.25-10.6 12.98-12.23 10.65-10.04 13.56-25.81 7.21-38.99-1.7-3.5-5.92-12.26-12.69-26.28z`}),(0,R.jsx)(`path`,{id:`ag`,d:`m273.88 120.52c-0.13 0.28-4.87 3.3-11.17 0.5-6.3-2.81-11.99-9.96-11.67-10.67 0.32-0.72 9.44-1.27 15.74 1.53 6.3 2.81 7.23 8.35 7.1 8.64z`}),(0,R.jsx)(`path`,{id:`m`,d:`m259 102.25c-0.13 0.29-4.2 3.61-9.02 1.46-4.81-2.14-8.75-8.51-8.43-9.23 0.31-0.71 7.69-2.05 12.5 0.1 4.82 2.14 5.07 7.39 4.95 7.67z`}),(0,R.jsx)(`path`,{id:`x`,d:`m282.79 114.2c-0.2 0.24-5.59 1.84-10.87-2.59-5.29-4.44-8.78-12.88-8.28-13.48 0.5-0.59 9.42 1.38 14.7 5.82 5.29 4.43 4.65 10.02 4.45 10.25z`}),(0,R.jsx)(`path`,{id:`k`,d:`m268.39 125.43c-0.12-0.28-4.33-3.54-9.45-1.26s-9.41 8.81-9.1 9.52c0.32 0.71 8.05 1.89 13.17-0.39s5.51-7.58 5.38-7.87z`}),(0,R.jsx)(`path`,{id:`ae`,d:`m243.83 111.58c0 0.31-2.61 5-8.43 5s-12.65-4.22-12.65-5 6.83-5 12.65-5 8.43 4.69 8.43 5z`}),(0,R.jsx)(`path`,{id:`l`,d:`m304.24 109.88c-0.31 0.04-5.38-2.38-6.34-9.21s2.09-15.44 2.86-15.55 6.08 7.33 7.04 14.16-3.25 10.55-3.56 10.6z`}),(0,R.jsx)(`path`,{id:`u`,d:`m306.79 80.57c-0.31 0.05-5.31-1.83-6.1-7.47-0.79-5.63 2.45-12.84 3.23-12.95 0.77-0.11 5.88 5.92 6.67 11.56s-3.49 8.82-3.8 8.86z`}),(0,R.jsx)(`path`,{id:`a`,d:`m306.13 58.04c-0.31 0.05-5.23-1.3-5.86-5.74-0.62-4.43 2.83-10.24 3.6-10.34 0.77-0.11 5.68 4.51 6.31 8.95 0.62 4.44-3.74 7.09-4.05 7.13z`}),(0,R.jsx)(`path`,{id:`f`,d:`m295.52 118.45c-0.29 0.13-6.1-1.39-9.5-9.02-3.39-7.64-3.53-18.31-2.82-18.63 0.72-0.32 8.56 6.93 11.96 14.56s0.64 12.97 0.36 13.09z`}),(0,R.jsx)(`path`,{id:`b`,d:`m272.35 90.11c-0.26 0.19-5.76 0.58-9.58-4.67-3.82-5.26-4.88-13.9-4.25-14.36s8.52 3.23 12.34 8.48 1.74 10.37 1.49 10.55z`}),(0,R.jsx)(`path`,{id:`s`,d:`m289.97 85.66c-0.28 0.13-5.97-0.97-9.17-7.84-3.21-6.87-3.15-16.73-2.44-17.06s8.3 5.96 11.5 12.83 0.4 11.94 0.11 12.07z`}),(0,R.jsx)(`path`,{id:`n`,d:`m270.16 65.57c-0.28 0.14-5.38 0.38-7.35-3.65-1.96-4.03-0.48-10.62 0.22-10.96s6.8 2.54 8.77 6.58c1.97 4.03-1.36 7.9-1.64 8.03z`}),(0,R.jsx)(`path`,{id:`ah`,d:`m250 80c-0.17 0.26-4.4 3.11-8.12 0.69s-5.79-8.79-5.37-9.45c0.43-0.65 7.1-1.35 10.82 1.06 3.72 2.42 2.84 7.44 2.67 7.7z`}),(0,R.jsx)(`path`,{id:`y`,d:`m236.47 96.58c-0.11 0.29-3.72 3.89-7.83 2.23-4.12-1.66-7.37-7.53-7.07-8.25 0.29-0.72 6.7-2.68 10.81-1.02 4.12 1.66 4.21 6.75 4.09 7.04z`}),(0,R.jsx)(`path`,{id:`aa`,d:`m290.52 56.48c-0.28 0.14-5.35 0.58-7.44-3.33-2.08-3.92-0.8-10.5-0.11-10.87s6.86 2.25 8.94 6.17c2.09 3.92-1.12 7.88-1.39 8.03z`}),(0,R.jsx)(`path`,{id:`af`,d:`m274.18 138.46c-0.16-0.26-5.28-2.6-11.13 1.06s-10.48 11.53-10.07 12.19 9.52-0.05 15.37-3.71 6-9.27 5.83-9.54z`}),(0,R.jsx)(`path`,{id:`z`,d:`m247.89 137.78c0.11 0.29-0.65 5.6-6.08 7.69-5.43 2.08-13.32 0.59-13.6-0.14s4.58-7.11 10.01-9.2c5.44-2.08 9.56 1.36 9.67 1.65z`}),(0,R.jsx)(`path`,{id:`h`,d:`m235.06 125.39c0.1 0.3-0.26 5.38-4.46 6.83-4.19 1.44-10.49-0.85-10.75-1.59-0.25-0.74 3.3-6.42 7.5-7.87 4.19-1.44 7.61 2.34 7.71 2.63z`}),(0,R.jsx)(`path`,{id:`ab`,d:`m317.14 85.63c0.28 0.13 5.97-0.98 9.17-7.85 3.21-6.87 3.14-16.72 2.44-17.05-0.71-0.33-8.3 5.95-11.5 12.82-3.21 6.87-0.4 11.94-0.11 12.08z`}),(0,R.jsx)(`path`,{id:`ac`,d:`m299.61 124.96v77.5h40c-6.93-6.52-11.25-10.6-12.99-12.23-10.64-10.03-13.56-25.81-7.2-38.99 1.69-3.5 5.92-12.26 12.69-26.28z`}),(0,R.jsx)(`path`,{id:`c`,d:`m348.11 102.22c0.13 0.28 4.2 3.6 9.01 1.46 4.82-2.15 8.76-8.52 8.44-9.23-0.32-0.72-7.69-2.05-12.5 0.09-4.82 2.14-5.08 7.39-4.95 7.68z`}),(0,R.jsx)(`path`,{id:`p`,d:`m324.32 114.17c0.2 0.24 5.59 1.83 10.87-2.6 5.29-4.43 8.78-12.87 8.28-13.47s-9.42 1.38-14.71 5.81c-5.28 4.43-4.64 10.02-4.44 10.26z`}),(0,R.jsx)(`path`,{id:`o`,d:`m338.71 125.4c0.13-0.29 4.34-3.55 9.46-1.27s9.41 8.81 9.09 9.52c-0.31 0.72-8.04 1.9-13.16-0.38s-5.51-7.59-5.39-7.87z`}),(0,R.jsx)(`path`,{id:`j`,d:`m363.28 111.54c0 0.32 2.61 5 8.43 5s12.65-4.21 12.65-5c0-0.78-6.83-5-12.65-5s-8.43 4.69-8.43 5z`}),(0,R.jsx)(`path`,{id:`w`,d:`m311.59 118.42c0.29 0.12 6.1-1.4 9.49-9.03 3.4-7.63 3.54-18.31 2.82-18.63-0.71-0.32-8.55 6.93-11.95 14.56s-0.64 12.97-0.36 13.1z`}),(0,R.jsx)(`path`,{id:`i`,d:`m334.76 90.08c0.25 0.18 5.76 0.57 9.58-4.68 3.81-5.25 4.88-13.9 4.25-14.36s-8.53 3.23-12.34 8.48c-3.82 5.26-1.74 10.37-1.49 10.56z`}),(0,R.jsx)(`path`,{id:`r`,d:`m333.23 120.48c0.12 0.29 4.86 3.31 11.17 0.5 6.3-2.81 11.98-9.96 11.67-10.67-0.32-0.71-9.44-1.27-15.74 1.53-6.3 2.81-7.23 8.35-7.1 8.64z`}),(0,R.jsx)(`path`,{id:`ad`,d:`m336.95 65.54c0.28 0.13 5.38 0.38 7.35-3.66 1.96-4.03 0.48-10.61-0.22-10.96-0.7-0.34-6.81 2.55-8.77 6.58-1.97 4.03 1.36 7.9 1.64 8.04z`}),(0,R.jsx)(`path`,{id:`ai`,d:`m357.11 79.96c0.17 0.27 4.39 3.11 8.12 0.69 3.72-2.41 5.79-8.79 5.36-9.44-0.42-0.66-7.09-1.36-10.81 1.06-3.72 2.41-2.84 7.43-2.67 7.69z`}),(0,R.jsx)(`path`,{id:`d`,d:`m370.63 96.55c0.12 0.29 3.73 3.89 7.84 2.22 4.11-1.66 7.37-7.52 7.07-8.25-0.29-0.72-6.7-2.68-10.82-1.02-4.11 1.66-4.2 6.76-4.09 7.05z`}),(0,R.jsx)(`path`,{id:`q`,d:`m316.59 56.44c0.28 0.15 5.35 0.59 7.43-3.33 2.09-3.92 0.81-10.5 0.12-10.87-0.69-0.36-6.86 2.26-8.95 6.17-2.08 3.92 1.12 7.88 1.4 8.03z`}),(0,R.jsx)(`path`,{id:`v`,d:`m332.93 138.42c0.16-0.26 5.28-2.59 11.13 1.06 5.85 3.66 10.48 11.53 10.07 12.19-0.42 0.66-9.52-0.05-15.37-3.71-5.85-3.65-6-9.27-5.83-9.54z`}),(0,R.jsx)(`path`,{id:`g`,d:`m359.22 137.74c-0.11 0.29 0.65 5.61 6.08 7.69 5.43 2.09 13.32 0.59 13.6-0.13 0.28-0.73-4.59-7.12-10.02-9.21-5.43-2.08-9.55 1.36-9.66 1.65z`}),(0,R.jsx)(`path`,{id:`e`,d:`m372.05 125.36c-0.1 0.29 0.26 5.37 4.45 6.82 4.2 1.44 10.5-0.85 10.75-1.59 0.26-0.74-3.29-6.42-7.49-7.87-4.2-1.44-7.61 2.34-7.71 2.64z`})]}),(0,R.jsx)(`g`,{transform:`translate(-219.32 -33)`,visibility:`inherit`,children:(0,R.jsxs)(`g`,{visibility:`inherit`,children:[(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#t`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#t`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#ag`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#ag`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#m`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#m`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#x`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#x`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#k`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#k`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#ae`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#ae`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#l`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#l`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#u`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#u`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#a`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#a`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#f`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#f`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#b`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#b`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#s`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#s`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#n`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#n`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#ah`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#y`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#y`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#aa`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#aa`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#af`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#af`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#z`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#z`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#h`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#h`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#ab`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#ab`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#ac`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#ac`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#c`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#c`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#p`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#p`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#o`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#o`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#j`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#j`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#w`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#w`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#i`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#i`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#r`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#r`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#ad`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#ad`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#ai`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#d`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#d`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#q`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#q`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#v`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#v`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#g`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#g`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#e`}),(0,R.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#e`})]})})]})}var J4=`__FMS_INSIGHT_NEW_OPERATOR__`,Y4=(0,L.memo)(function(){let e=Q(CO),[t,n]=GE(UO),[r,i]=GE(HO),[a,o]=(0,L.useState)(!1),[s,c]=(0,L.useState)(``);function l(e){e.target.value===J4?o(!0):n(e.target.value)}function u(e){i(t=>t.filter(t=>t!==e))}function d(){s!==``&&(i(e=>[...e.filter(e=>e!==s),s]),n(s),c(``),o(!1))}return e.user?(0,R.jsx)(`div`,{children:e.user.profile.name||e.user.profile.sub}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(bv,{value:t||``,onChange:l,variant:`standard`,renderValue:e=>e,children:[X.of(r).sortBy(e=>e).map((e,t)=>(0,R.jsxs)(I_,{value:e,children:[(0,R.jsx)(s_,{primary:e}),(0,R.jsx)(Kg,{children:(0,R.jsx)(zl,{edge:`end`,onClick:()=>u(e),size:`large`,children:(0,R.jsx)(hx,{})})})]},t)),(0,R.jsx)(I_,{value:J4,children:(0,R.jsx)(`em`,{children:`Create New Operator`})},`new`)]}),(0,R.jsxs)(lh,{open:a,onClose:()=>{o(!1),c(``)},children:[(0,R.jsx)(fh,{children:`Create New Operator`}),(0,R.jsx)(dh,{children:(0,R.jsx)(Bb,{value:s,onChange:e=>c(e.target.value),label:`New Name`,variant:`outlined`,autoFocus:!0,sx:{mt:`0.5em`},onKeyUp:e=>{e.keyCode===13&&d()}})}),(0,R.jsxs)(uh,{children:[(0,R.jsxs)(K,{disabled:s===``,onClick:d,children:[`Create `,s]}),(0,R.jsx)(K,{onClick:()=>{c(``),o(!1)},children:`Cancel`})]})]})]})}),X4=(0,L.memo)(function(){let e=Q(e4),t=Q(Lne),n=Q(n4),r=Q(Rne),[i,a]=(0,L.useState)(!1);return(0,R.jsxs)(R.Fragment,{children:[n!=null||r!=null?(0,R.jsx)(q,{title:`Error`,children:(0,R.jsx)(zl,{onClick:()=>a(!0),size:`large`,children:(0,R.jsx)(xx,{})})}):void 0,e||t?(0,R.jsx)(q,{title:`Loading`,children:(0,R.jsx)(Nl,{"data-testid":`loading-icon`,color:`secondary`})}):void 0,(0,R.jsxs)(lh,{open:i,onClose:()=>a(!1),children:[(0,R.jsx)(fh,{children:`Error`}),(0,R.jsxs)(dh,{children:[n===null?void 0:(0,R.jsx)(`p`,{children:n}),r===null?void 0:(0,R.jsx)(`p`,{children:r})]}),(0,R.jsx)(uh,{children:(0,R.jsx)(K,{onClick:()=>a(!1),children:`Close`})})]})]})}),Z4=(0,L.memo)(function(){let e=Q(CO)?.customStationMonitorDialogUrl,[t,n]=(0,L.useState)(!1);if(!e)return null;let r=e.split(`/`),i=r[r.length-1];return i=i[0].toUpperCase()+i.substr(1),(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(q,{title:i,children:(0,R.jsx)(zl,{onClick:()=>n(!0),size:`large`,children:(0,R.jsx)(Zx,{})})}),(0,R.jsxs)(lh,{open:t,onClose:()=>n(!1),fullWidth:!0,maxWidth:`md`,children:[(0,R.jsx)(fh,{children:i}),(0,R.jsx)(dh,{children:(0,R.jsx)(`iframe`,{width:`100%`,src:e,style:{border:0,height:`calc(100vh - 250px)`}})}),(0,R.jsx)(uh,{children:(0,R.jsx)(K,{color:`primary`,onClick:()=>n(!1),children:`Close`})})]})]})});function Q4({d:e}){let t=rw(e,fw());return t>7?null:t>=0?(0,R.jsxs)(W,{variant:`subtitle1`,children:[`License expires on `,e.toDateString()]}):(0,R.jsxs)(W,{variant:`h6`,children:[`License expired on `,e.toDateString()]})}function $4(){let e=Q(CO),t=``;return t=e.name?(e.name||``)+` `+(e.version||``):`SeedTactic FMS Insight`,(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(q,{title:t,children:(0,R.jsx)(`div`,{children:(0,R.jsx)(q4,{})})}),(0,R.jsx)(W,{variant:`h6`,style:{marginLeft:`1em`,marginRight:`2em`},children:`Insight`}),e?.licenseExpires?(0,R.jsx)(Q4,{d:e.licenseExpires}):void 0]})}function e3(){let e=Q(GO).alarms,t=e&&e.length>0;return(0,R.jsx)(q,{title:t?e.join(`. `):`No Alarms`,children:(0,R.jsx)(Up,{badgeContent:t?e.length:0,children:(0,R.jsx)(Ux,{color:t?`error`:void 0})})})}function t3(){let e=Q(uL);return(0,R.jsx)(q,{title:`Help`,children:(0,R.jsx)(zl,{"aria-label":`Help`,href:Rte(e),target:`_help`,size:`large`,children:(0,R.jsx)(kx,{})})})}function n3(){return(0,R.jsx)(q,{title:`Logout`,children:(0,R.jsx)(zl,{"aria-label":`Logout`,onClick:TO,size:`large`,children:(0,R.jsx)(Cx,{})})})}function r3({showAlarms:e,showLogout:t,showSearch:n}){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(X4,{}),(0,R.jsx)(Z4,{}),n?(0,R.jsx)(dK,{}):void 0,n?(0,R.jsx)(uJ,{}):void 0,(0,R.jsx)(t3,{}),t?(0,R.jsx)(n3,{}):void 0,e?(0,R.jsx)(e3,{}):void 0]})}function i3({menuNavs:e}){let t=Q(CO),[n,r]=GE(uL),[i,a]=(0,L.useTransition)();return(0,R.jsx)(bh,{size:`small`,children:(0,R.jsx)(bv,{value:n.route,sx:{width:`16.5em`},onChange:t=>a(()=>{let n=e.find(e=>`separator`in e?!1:e.route.route===t.target.value);!n||`separator`in n||r(n.route)}),renderValue:()=>{let r=e.find(e=>`separator`in e?!1:e.route.route===n.route);return!r||`separator`in r?null:(0,R.jsxs)(G,{display:`flex`,alignItems:`center`,children:[r.icon,(0,R.jsxs)(W,{variant:`h6`,style:{marginLeft:`1em`},children:[typeof r.name==`string`?r.name:r.name(t),i?`...`:``]})]})},children:e.map((e,n)=>`separator`in e?(0,R.jsx)(bf,{children:e.separator},e.separator):e.hidden?.(t)?void 0:(0,R.jsxs)(I_,{value:e.route.route,children:[(0,R.jsx)(n_,{children:e.icon}),(0,R.jsx)(s_,{primary:typeof e.name==`string`?e.name:e.name(t)})]},n))})})}function a3({showAlarms:e,showLogout:t,showSearch:n,showOperator:r,Nav1:i,Nav2:a,menuNavs:o}){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Ql,{position:`static`,sx:{display:{xs:`none`,md:`block`}},children:(0,R.jsx)(Qy,{children:(0,R.jsxs)(G,{display:`grid`,gridTemplateColumns:a?`1fr auto 1fr`:`minmax(200px, 1fr) auto`,width:`100vw`,gridTemplateAreas:a?`"nav navCenter tools"`:`"nav tools"`,children:[(0,R.jsxs)(G,{gridArea:`nav`,display:`flex`,alignItems:`center`,children:[(0,R.jsx)($4,{}),i?(0,R.jsx)(i,{}):void 0]}),a?(0,R.jsx)(G,{gridArea:`navCenter`,children:(0,R.jsx)(a,{})}):void 0,(0,R.jsxs)(G,{gridArea:`tools`,display:`flex`,alignItems:`center`,justifyContent:`flex-end`,children:[r?(0,R.jsx)(Y4,{}):void 0,(0,R.jsx)(r3,{showAlarms:e,showLogout:t,showSearch:n})]})]})})}),(0,R.jsxs)(Ql,{position:`static`,sx:{display:{xs:`block`,md:`none`}},children:[(0,R.jsxs)(Qy,{children:[(0,R.jsx)($4,{}),(0,R.jsx)(`div`,{style:{flexGrow:1}}),(0,R.jsx)(r3,{showAlarms:e,showLogout:t,showSearch:n})]}),(0,R.jsxs)(G,{display:`grid`,gridTemplateColumns:`minmax(200px, 1fr) auto`,children:[(0,R.jsx)(G,{gridColumn:`1`,children:i?(0,R.jsx)(i,{}):void 0}),(0,R.jsx)(G,{gridColumn:`2`,children:a?(0,R.jsx)(a,{}):void 0})]})]}),o&&o.length>0?(0,R.jsx)(Pc,{elevation:4,square:!0,component:`nav`,sx:{display:{xs:`block`,xl:`none`},padding:`2px`},children:(0,R.jsx)(i3,{menuNavs:o})}):void 0]})}function o3({menuItems:e}){let t=Q(CO),[n,r]=GE(uL),[i,a]=(0,L.useTransition)();return!e||e.length===0?null:(0,R.jsx)(Pc,{elevation:3,square:!0,sx:{flexShrink:0,display:{xs:`none`,xl:`block`},minHeight:`calc(100vh - 64px)`,zIndex:1},children:(0,R.jsx)(Fg,{dense:!0,children:e?.map((e,o)=>`separator`in e?(0,R.jsx)(bf,{children:e.separator},e.separator):e.hidden?.(t)?void 0:(0,R.jsx)(Zg,{children:(0,R.jsxs)(Hg,{selected:n.route===e.route.route,onClick:()=>a(()=>r(e.route)),children:[(0,R.jsx)(n_,{children:e.icon}),(0,R.jsx)(s_,{primary:typeof e.name==`string`?e.name:e.name(t),sx:i?e=>({color:e.palette.grey[700]}):void 0})]})},o))})})}var s3=function(e){return e[e.Date=0]=`Date`,e[e.Part=1]=`Part`,e[e.Station=2]=`Station`,e[e.Pallet=3]=`Pallet`,e[e.Serial=4]=`Serial`,e[e.Workorder=5]=`Workorder`,e[e.Operation=6]=`Operation`,e[e.Inspection=7]=`Inspection`,e[e.ElapsedMin=8]=`ElapsedMin`,e[e.ActiveMin=9]=`ActiveMin`,e[e.MedianElapsed=10]=`MedianElapsed`,e[e.MedianDeviation=11]=`MedianDeviation`,e}(s3||{});function c3(e){return[{id:s3.Date,numeric:!1,label:`Date`,getDisplay:e=>e.endTime.toLocaleString(),getForSort:e=>e.endTime.getTime()},{id:s3.Part,numeric:!1,label:`Part`,getDisplay:e=>e.part+`-`+X.of(e.material).map(e=>e.proc).distinctAndSortBy(e=>e).toRArray().join(`:`)},{id:s3.Station,numeric:!1,label:`Station`,getDisplay:e=>e.stationGroup+` `+e.stationNumber.toString()},{id:s3.Operation,numeric:!1,label:`Operation`,getDisplay:e=>e.operation},{id:s3.Pallet,numeric:!1,label:`Pallet`,getDisplay:e=>e.pallet.toString(),getForSort:e=>e.pallet},{id:s3.Serial,numeric:!1,label:`Serial`,getDisplay:e=>e.material.filter(e=>e.serial).map(e=>e.serial).join(`, `)},{id:s3.Workorder,numeric:!1,label:`Workorder`,getDisplay:e=>e.material.filter(e=>e.workorder).map(e=>e.workorder).join(`, `)},{id:s3.Inspection,numeric:!1,label:`Inspection`,getDisplay:t=>Vk(t,e),getForSort:t=>X.of(t.material).collect(t=>e.get(t.id)).flatMap(e=>e.signaledInspections).distinct().toSortedArray(e=>e).join(`,`)},{id:s3.ElapsedMin,numeric:!0,label:`Elapsed Min`,getDisplay:e=>(e.elapsedMinsPerMaterial*e.material.length).toFixed(1)},{id:s3.ActiveMin,numeric:!0,label:`Target Min`,getDisplay:e=>e.activeMinutes.toFixed(1)},{id:s3.MedianElapsed,numeric:!0,label:`Median Elapsed Min`,getDisplay:e=>e.medianCycleMinutes.toFixed(1)},{id:s3.MedianDeviation,numeric:!0,label:`Median Deviation`,getDisplay:e=>e.MAD_aboveMinutes.toFixed(1)}]}function l3(e,t,n,r,i){let a;for(let e of t)e.id===r&&(a=e.getForSort||e.getDisplay);a===void 0&&(a=t[0].getForSort||t[0].getDisplay);let o=a,s=X.of(e.values()).flatMap(e=>e);return(n?s.filter(e=>e.endTime>=n.start&&e.endTime<=n.end).toMutableArray():s.toMutableArray()).sort(Iw(i===`desc`?{desc:o}:{asc:o},i===`desc`?{desc:e=>e.endTime.getTime()}:{asc:e=>e.endTime.getTime()}))}function u3(e){let t,n=e.set_date_zoom_range;return n&&(t=e.period.type===`Last30`?{type:`Last30Days`,set_days_back:e=>{if(e){let t=new Date;n({zoom:{start:VC(t,-e),end:WC(t,1)}})}else n({zoom:void 0})}}:{type:`ZoomIntoRange`,default_date_range:[e.period.month,HC(e.period.month,1)],current_date_zoom:e.current_date_zoom,set_date_zoom_range:e=>n({zoom:e})}),{zoom:t,zoomRange:e.current_date_zoom}}var d3=(0,L.memo)(function(e){let t=c3(e.matsById),n=e1(s3.Date,t),r=$$(),i=u3(e),[a,o]=(0,L.useState)(null),s=WE(II),c=l3(e.points,t,e.current_date_zoom,n.orderBy,n.order),l=c.length,u=c.slice(r.page*r.rowsPerPage,(r.page+1)*r.rowsPerPage),d=t.filter(t=>!(!e.showWorkorderAndInspect&&t.id===s3.Workorder||!e.showWorkorderAndInspect&&t.id===s3.Inspection||e.hideMedian&&t.id===s3.MedianElapsed||e.hideMedian&&t.id===s3.MedianDeviation));return(0,R.jsxs)(`div`,{children:[(0,R.jsxs)(Ty,{children:[(0,R.jsx)(G$,{columns:d,sort:n,showDetailsCol:!0}),(0,R.jsx)(Z$,{columns:d,pageData:u,rowsPerPage:r.rowsPerPage,onClickDetails:(e,t)=>{t.material.length!==0&&(t.material.length===1?s({type:`LogMat`,logMat:t.material[0]}):o({anchorEl:e.currentTarget,material:t.material}))},emptyMessage:e.emptyMessage})]}),(0,R.jsx)(X$,{zoom:i.zoom,tpage:r,count:l}),(0,R.jsx)(A_,{anchorEl:a?.anchorEl,keepMounted:!0,open:a!==null,onClose:()=>o(null),children:a?.material.map((e,t)=>(0,R.jsx)(I_,{onClick:()=>{s({type:`LogMat`,logMat:e}),o(null)},children:e.serial||`Material`},t))})]})});function f3({outlierTy:e}){fL(e===`machine`?`Machine Outliers`:`L/U Outliers`);let t=Q(kL),n=fw(),r=Q(Sk),i=(0,L.useMemo)(()=>{let t=fw(),n=VC(t,-4),i=VC(t,1);return{seriesLabel:`Part`,data:r.valuesToLazySeq().filter(t=>t.isOutlier&&t.endTime>=n&&t.endTime<i&&t.isLabor===(e===`labor`)).toRLookup(e=>e.part+`-`+e.material[0].proc.toString())}},[e,r]);return(0,R.jsxs)(G,{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`,children:[(0,R.jsxs)(G,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,R.jsxs)(W,{variant:`subtitle1`,children:[e===`labor`?`Load/Unload`:`Machine`,` cycles from the past 5 days statistically outside expected range`]}),(0,R.jsx)(G,{flexGrow:1}),(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(zl,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>Uk(i,t.matsById,void 0),size:`large`,children:(0,R.jsx)(Mx,{})})})]}),(0,R.jsx)(`main`,{children:(0,R.jsx)(d3,{points:i.data,matsById:t.matsById,current_date_zoom:{start:VC(n,-4),end:VC(n,1)},set_date_zoom_range:void 0,period:{type:`Last30`},showWorkorderAndInspect:!1,defaultSortDesc:!0})})]})}var p3=class e{constructor(e,t){this.day=e,this.station=t}compare(e){let t=this.day.getTime()-e.day.getTime();return t===0?this.station.localeCompare(e.station):t}hash(){return xT(this.day,this.station)}toString(){return`{day: ${this.day.toISOString()}}, station: ${this.station}}`}adjustDay(t){return new e(t(this.day),this.station)}};function m3(e,t,n){let r=XC(e),i=XC(t);if(r.getTime()===i.getTime())return[{day:r,value:n}];{let a=[],o=t.getTime()-e.getTime();for(let s=r;s<=i;s=VC(s,1)){let r=tw([s,e]),i=(nw([VC(s,1),t]).getTime()-r.getTime())/o;a.push({day:s,value:n*i})}return a}}function h3(e,t){return mk(X.of(e),e=>bk(e.stationGroup,e.stationNumber),e=>e.endTime).flatMap(([e,n])=>n.flatMap(e=>{let n=X.of(e).sumBy(e=>e.elapsedMinsPerMaterial*e.material.length),r=$C(e[0].endTime,-n*60),i=X.of(e).sumBy(e=>t(e));return m3(r,e[0].endTime,i)}).map(t=>({...t,statNameAndNum:e}))).buildHashMap(e=>new p3(e.day,e.statNameAndNum),(e,t)=>t.value+(e??0))}function g3(e){return h3(e,e=>e.activeMinutes)}function _3(e){return h3(e,e=>e.elapsedMinsPerMaterial*e.material.length)}function v3(e){let t=[];for(let n of e)if(t.length===0)t.push(n);else{let e=t[t.length-1];n.start<=e.end?t[t.length-1]={start:e.start,end:tw([e.end,n.end])}:t.push(n)}return t}function y3(e){return X.of(e).filter(e=>e.plannedDown).toLookupOrderedMap(e=>e.station,e=>e.start).toAscLazySeq().flatMap(([e,t])=>v3(t.valuesToAscLazySeq()).flatMap(t=>m3(t.start,t.end,sw(t.end,t.start)).map(t=>({...t,station:e})))).toHashMap(e=>[new p3(e.day,e.station),e.value],(e,t)=>e+t)}function b3(e){let t=X.of(e).filter(e=>e.plannedDown).toLookupOrderedMap(e=>e.station,e=>e.start).mapValues(e=>v3(e.valuesToAscLazySeq()));return X.of(e).filter(e=>!e.plannedDown).toLookupOrderedMap(e=>e.station,e=>e.start).toAscLazySeq().flatMap(([e,n])=>{let r=v3(n.valuesToAscLazySeq()),i=t.get(e)??[];for(let e=0,t=0;t<r.length;)if(e<i.length&&i[e].end<=r[t].start)e++;else if(e<i.length&&i[e].start<r[t].end){let n=r[t].start,a=r[t].end,o=i[e].start,s=i[e].end;o<=n&&s>=a?r.splice(t,1):o<=n?(r[t]={start:s,end:a},e+=1):s>=a?(r[t]={start:n,end:o},t+=1):(r[t]={start:n,end:o},r.splice(t+1,0,{start:s,end:a}),e++,t++)}else t++;return r.flatMap(t=>m3(t.start,t.end,sw(t.end,t.start)).map(t=>({...t,station:e})))}).toHashMap(e=>[new p3(e.day,e.station),e.value],(e,t)=>e+t)}function x3(e,t,n,r,i){let a=g3(X.of(r).filter(r=>n===`labor`===r.isLabor&&r.endTime>=e&&r.endTime<=t)),o=X.of(i).filter(r=>n===`labor`===r.station.startsWith(`L/U`)&&r.end>=e&&r.start<=t),s=y3(o),c=b3(o),l=[],u=a.keysToLazySeq().concat(c.keysToLazySeq()).map(e=>e.station).distinct().toSortedArray(e=>e);for(let n of u){let r=[];for(let i=e;i<t;i=VC(i,1)){let e=new p3(i,n),t=a.get(e),o=c.get(e),l=s.get(e)??0;r.push({x:i.toLocaleDateString(),y:(t??0)/60,plannedHours:(o??0)/60,actualOee:l<1440?(t??0)/(1440-l):0,plannedOee:l<1440?(o??0)/(1440-l):0,station:n,day:i})}l.push({station:n,points:r})}return l}var S3=class{constructor(e,t){this.x=e,this.y=t}compare(e){let t=this.x-e.x;return t===0?this.y.localeCompare(e.y):t}hash(){return xT(this.x,this.y)}toString(){return`{x: ${new Date(this.x).toISOString()}, y: ${this.y}}`}};function C3(e,t){let n=X.of(t).toHashMap(e=>[new S3(e.x.getTime(),e.y),e],(e,t)=>t),r=X.of(t).map(e=>e.x.getTime()).distinct().toSortedArray(e=>e),i=X.of(t).map(e=>e.y).distinct().toSortedArray(e=>e),a=`<table>
|
|
332
|
+
<thead><tr><th>`+e+`</th>`;for(let e of r)a+=`<th>`+new Date(e).toDateString()+`</th>`;a+=`</tr></thead>
|
|
333
|
+
<tbody>
|
|
334
|
+
`;for(let e of i){a+=`<tr><th>`+e+`</th>`;for(let t of r){let r=n.get(new S3(t,e));r===void 0?a+=`<td></td>`:a+=`<td>`+r.label+`</td>`}a+=`</tr>
|
|
335
|
+
`}return a+=`</tbody>
|
|
336
|
+
</table>`,a}function w3(e,t){(0,Mk.default)(C3(e,t))}function T3(e){let t=`<table>
|
|
337
|
+
<thead><tr>`;t+=`<th>Day</th><th>Station</th><th>Actual Hours</th><th>Planned Hours</th>`,t+=`</tr></thead>
|
|
338
|
+
<tbody>
|
|
339
|
+
`;for(let n of e)for(let e of n.points)t+=`<tr>`,t+=`<td>`+e.day.toLocaleDateString()+`</td>`,t+=`<td>`+e.station+`</td>`,t+=`<td>`+e.y.toFixed(1)+`</td>`,t+=`<td>`+e.plannedHours.toFixed(1)+`</td>`,t+=`</tr>
|
|
340
|
+
`;return t+=`</tbody>
|
|
341
|
+
</table>`,t}function E3(e){(0,Mk.default)(T3(e))}var D3=[[`4477aa`],[`4477aa`,`cc6677`],[`4477aa`,`ddcc77`,`cc6677`],[`4477aa`,`117733`,`ddcc77`,`cc6677`],[`332288`,`88ccee`,`117733`,`ddcc77`,`cc6677`],[`332288`,`88ccee`,`117733`,`ddcc77`,`cc6677`,`aa4499`],[`332288`,`88ccee`,`44aa99`,`117733`,`ddcc77`,`cc6677`,`aa4499`],[`332288`,`88ccee`,`44aa99`,`117733`,`999933`,`ddcc77`,`cc6677`,`aa4499`],[`332288`,`88ccee`,`44aa99`,`117733`,`999933`,`ddcc77`,`cc6677`,`882255`,`aa4499`],[`332288`,`88ccee`,`44aa99`,`117733`,`999933`,`ddcc77`,`661100`,`cc6677`,`882255`,`aa4499`],[`332288`,`6699cc`,`88ccee`,`44aa99`,`117733`,`999933`,`ddcc77`,`661100`,`cc6677`,`882255`,`aa4499`],[`332288`,`6699cc`,`88ccee`,`44aa99`,`117733`,`999933`,`ddcc77`,`661100`,`cc6677`,`aa4466`,`882255`,`aa4499`]],O3=`ff0029.377eb8.66a61e.984ea3.00d2d5.ff7f00.af8d00.7f80cd.b3e900.c42e60.a65628.f781bf.8dd3c7.bebada.fb8072.80b1d3.fdb462.fccde5.bc80bd.ffed6f.c4eaff.cf8c00.1b9e77.d95f02.e7298a.e6ab02.a6761d.0097ff.00d067.000000.252525.525252.737373.969696.bdbdbd.f43600.4ba93b.5779bb.927acc.97ee3f.bf3947.9f5b00.f48758.8caed6.f2b94f.eff26e.e43872.d9b100.9d7a00.698cff.d9d9d9.00d27e.d06800.009f82.c49200.cbe8ff.fecddf.c27eb6.8cd2ce.c4b8d9.f883b0.a49100.f48800.27d0df.a04a9b`.split(`.`);function k3(e,t){return t<=D3.length?`#`+D3[t-1][e]:`#`+O3[e%O3.length]}var A3=k3(0,2),j3=k3(1,2),M3=50,N3=30,P3=10,F3=10;function I3({width:e,height:t,points:n,setTooltip:r}){let i=t-P3-N3,a=(0,L.useMemo)(()=>BM().domain([0,24]).range([i,0]),[i]),o=(0,L.useMemo)(()=>QA().domain(X.of(n).map(e=>e.x).distinct()).range([0,e-M3-F3]).padding(.1),[n,e]),s=(0,L.useMemo)(()=>QA().domain([`Actual`,`Planned`]).range([0,o.bandwidth()]).padding(.05),[o]);return(0,R.jsx)(`svg`,{width:e,height:t,children:(0,R.jsxs)(`g`,{transform:`translate(${M3},${P3})`,children:[(0,R.jsx)(EA,{scale:o,top:i}),(0,R.jsx)(DA,{scale:a,left:0,label:`Hours`}),(0,R.jsx)(xA,{scale:a,width:e-M3-F3}),n.map((e,t)=>(0,R.jsxs)(`g`,{transform:`translate(${o(e.x)},0)`,children:[(0,R.jsx)(`rect`,{x:s(`Actual`),y:a(e.y),width:s.bandwidth(),height:i-a(e.y),fill:A3,onMouseEnter:t=>{let n=iA(t);r({left:n?.x??0,top:n?.y??0,datum:e})},onMouseLeave:()=>r(null)}),(0,R.jsx)(`rect`,{x:s(`Planned`),y:a(e.plannedHours),width:s.bandwidth(),height:i-a(e.plannedHours),fill:j3,onMouseEnter:t=>{let n=iA(t);r({left:n?.x??0,top:n?.y??0,datum:e})},onMouseLeave:()=>r(null)})]},t))]})})}function L3({station:e}){return(0,R.jsxs)(`div`,{style:{marginTop:`1em`,display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`},children:[(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(`div`,{style:{width:`14px`,height:`14px`,backgroundColor:A3}}),(0,R.jsxs)(`div`,{style:{marginLeft:`1em`},children:[e,` Actual`]})]}),(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(`div`,{style:{width:`14px`,height:`14px`,backgroundColor:j3}}),(0,R.jsxs)(`div`,{style:{marginLeft:`1em`},children:[e,` Planned`]})]})]})}function R3({tooltip:e}){return(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`div`,{children:e.datum.x}),(0,R.jsxs)(`div`,{children:[`Actual Hours: `,e.datum.y?.toFixed(1)]}),(0,R.jsxs)(`div`,{children:[`Planned Hours: `,e.datum?.plannedHours?.toFixed(1)]})]})}function z3({series:e}){let t=(0,L.useMemo)(()=>Z(null),[]),n=WE(t);return(0,R.jsxs)(Uh,{size:{xs:12,md:6},onMouseLeave:()=>n(null),children:[(0,R.jsx)(_A,{sx:{height:`calc(100vh / 2 - 200px)`},chart:({width:t,height:r})=>(0,R.jsx)(I3,{width:t,height:r,points:e.points,setTooltip:n}),tooltipAtom:t,TooltipContent:R3}),(0,R.jsx)(L3,{station:e.station})]})}function B3({points:e}){return(0,R.jsx)(Uh,{container:!0,children:e.map((e,t)=>(0,R.jsx)(z3,{series:e},t))})}var V3=function(e){return e[e.Date=0]=`Date`,e[e.Station=1]=`Station`,e[e.ActualHours=2]=`ActualHours`,e[e.ActualOEE=3]=`ActualOEE`,e[e.PlannedHours=4]=`PlannedHours`,e[e.PlannedOEE=5]=`PlannedOEE`,e}(V3||{}),H3=[{id:V3.Date,numeric:!1,label:`Date`,getDisplay:e=>e.x,getForSort:e=>e.day.getTime()},{id:V3.Station,numeric:!1,label:`Station`,getDisplay:e=>e.station},{id:V3.ActualHours,numeric:!0,label:`Actual Hours`,getDisplay:e=>e.y.toFixed(1),getForSort:e=>e.y},{id:V3.ActualOEE,numeric:!0,label:`Actual OEE`,getDisplay:e=>(e.actualOee*100).toFixed(0)+`%`,getForSort:e=>e.actualOee},{id:V3.PlannedHours,numeric:!0,label:`Planned Hours`,getDisplay:e=>e.plannedHours.toFixed(1),getForSort:e=>e.plannedHours},{id:V3.PlannedOEE,numeric:!0,label:`Planned OEE`,getDisplay:e=>(e.plannedOee*100).toFixed(0)+`%`,getForSort:e=>e.plannedOee}];function U3(e,t){return X.of(e).flatMap(e=>e.points).toSortedArray(t)}var W3=(0,L.memo)(function({points:e}){let t=e1(V3.Date,H3);return(0,R.jsxs)(Ty,{children:[(0,R.jsx)(G$,{columns:H3,sort:t,showDetailsCol:!1}),(0,R.jsx)(Z$,{columns:H3,pageData:U3(e,t.sortOn)})]})}),G3=Z(!0),K3=Z(!0);function q3({ty:e}){fL(e===`labor`?`L/U OEE`:`Machine OEE`);let[t,n]=GE(e===`labor`?G3:K3),r=VC(fw(),-6),i=VC(fw(),1),a=Q(Sk),o=Q(Zk),s=(0,L.useMemo)(()=>x3(r,i,e,a.valuesToLazySeq(),o),[r,i,e,a,o]);return(0,R.jsxs)(G,{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`,children:[(0,R.jsxs)(G,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,R.jsxs)(W,{variant:`subtitle1`,children:[e===`labor`?`Load/Unload`:`Machine`,` OEE: comparing flexplan hours between actual and simulated production`]}),(0,R.jsx)(G,{flexGrow:1}),(0,R.jsx)(bh,{size:`small`,children:(0,R.jsxs)(bv,{autoWidth:!0,value:t?`chart`:`table`,onChange:e=>n(e.target.value===`chart`),children:[(0,R.jsx)(I_,{value:`chart`,children:`Chart`},`chart`),(0,R.jsx)(I_,{value:`table`,children:`Table`},`table`)]})}),(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(zl,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>E3(s),size:`large`,children:(0,R.jsx)(Mx,{})})})]}),(0,R.jsx)(`main`,{children:t?(0,R.jsx)(B3,{points:s}):(0,R.jsx)(W3,{points:s})})]})}var J3=d6(),Y3=e=>o6(e,J3),X3=d6();Y3.write=e=>o6(e,X3);var Z3=d6();Y3.onStart=e=>o6(e,Z3);var Q3=d6();Y3.onFrame=e=>o6(e,Q3);var $3=d6();Y3.onFinish=e=>o6(e,$3);var e6=[];Y3.setTimeout=(e,t)=>{let n=Y3.now()+t,r=()=>{let e=e6.findIndex(e=>e.cancel==r);~e&&e6.splice(e,1),i6-=~e?1:0},i={time:n,handler:e,cancel:r};return e6.splice(t6(n),0,i),i6+=1,s6(),i};var t6=e=>~(~e6.findIndex(t=>t.time>e)||~e6.length);Y3.cancel=e=>{Z3.delete(e),Q3.delete(e),$3.delete(e),J3.delete(e),X3.delete(e)},Y3.sync=e=>{a6=!0,Y3.batchedUpdates(e),a6=!1},Y3.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,Y3.onStart(n)}return r.handler=e,r.cancel=()=>{Z3.delete(n),t=null},r};var n6=typeof window<`u`?window.requestAnimationFrame:(()=>{});Y3.use=e=>n6=e,Y3.now=typeof performance<`u`?()=>performance.now():Date.now,Y3.batchedUpdates=e=>e(),Y3.catch=console.error,Y3.frameLoop=`always`,Y3.advance=()=>{Y3.frameLoop===`demand`?u6():console.warn(`Cannot call the manual advancement of rafz whilst frameLoop is not set as demand`)};var r6=-1,i6=0,a6=!1;function o6(e,t){a6?(t.delete(e),e(0)):(t.add(e),s6())}function s6(){r6<0&&(r6=0,Y3.frameLoop!==`demand`&&n6(l6))}function c6(){r6=-1}function l6(){~r6&&(n6(l6),Y3.batchedUpdates(u6))}function u6(){let e=r6;r6=Y3.now();let t=t6(r6);if(t&&(f6(e6.splice(0,t),e=>e.handler()),i6-=t),!i6){c6();return}Z3.flush(),J3.flush(e?Math.min(64,r6-e):16.667),Q3.flush(),X3.flush(),$3.flush()}function d6(){let e=new Set,t=e;return{add(n){i6+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return i6-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,i6-=t.size,f6(t,t=>t(n)&&e.add(t)),i6+=e.size,t=e)}}}function f6(e,t){e.forEach(e=>{try{t(e)}catch(e){Y3.catch(e)}})}var p6=Object.defineProperty,m6=(e,t)=>{for(var n in t)p6(e,n,{get:t[n],enumerable:!0})},h6={};m6(h6,{assign:()=>j6,colors:()=>O6,createStringInterpolator:()=>E6,skipAnimation:()=>k6,to:()=>D6,willAdvance:()=>A6});function g6(){}var _6=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),v6={arr:Array.isArray,obj:e=>!!e&&e.constructor.name===`Object`,fun:e=>typeof e==`function`,str:e=>typeof e==`string`,num:e=>typeof e==`number`,und:e=>e===void 0};function y6(e,t){if(v6.arr(e)){if(!v6.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var b6=(e,t)=>e.forEach(t);function x6(e,t,n){if(v6.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(let r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var S6=e=>v6.und(e)?[]:v6.arr(e)?e:[e];function C6(e,t){if(e.size){let n=Array.from(e);e.clear(),b6(n,t)}}var w6=(e,...t)=>C6(e,e=>e(...t)),T6=()=>typeof window>`u`||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),E6,D6,O6=null,k6=!1,A6=g6,j6=e=>{e.to&&(D6=e.to),e.now&&(Y3.now=e.now),e.colors!==void 0&&(O6=e.colors),e.skipAnimation!=null&&(k6=e.skipAnimation),e.createStringInterpolator&&(E6=e.createStringInterpolator),e.requestAnimationFrame&&Y3.use(e.requestAnimationFrame),e.batchedUpdates&&(Y3.batchedUpdates=e.batchedUpdates),e.willAdvance&&(A6=e.willAdvance),e.frameLoop&&(Y3.frameLoop=e.frameLoop)},M6=new Set,N6=[],P6=[],F6=0,I6={get idle(){return!M6.size&&!N6.length},start(e){F6>e.priority?(M6.add(e),Y3.onStart(L6)):(R6(e),Y3(B6))},advance:B6,sort(e){if(F6)Y3.onFrame(()=>I6.sort(e));else{let t=N6.indexOf(e);~t&&(N6.splice(t,1),z6(e))}},clear(){N6=[],M6.clear()}};function L6(){M6.forEach(R6),M6.clear(),Y3(B6)}function R6(e){N6.includes(e)||z6(e)}function z6(e){N6.splice(V6(N6,t=>t.priority>e.priority),0,e)}function B6(e){let t=P6;for(let n=0;n<N6.length;n++){let r=N6[n];F6=r.priority,r.idle||(A6(r),r.advance(e),r.idle||t.push(r))}return F6=0,P6=N6,P6.length=0,N6=t,N6.length>0}function V6(e,t){let n=e.findIndex(t);return n<0?e.length:n}var H6=(e,t,n)=>Math.min(Math.max(n,e),t),U6={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},W6=`[-+]?\\d*\\.?\\d+`,G6=W6+`%`;function K6(...e){return`\\(\\s*(`+e.join(`)\\s*,\\s*(`)+`)\\s*\\)`}var q6=RegExp(`rgb`+K6(W6,W6,W6)),J6=RegExp(`rgba`+K6(W6,W6,W6,W6)),Y6=RegExp(`hsl`+K6(W6,G6,G6)),X6=RegExp(`hsla`+K6(W6,G6,G6,W6)),Z6=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Q6=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,$6=/^#([0-9a-fA-F]{6})$/,e8=/^#([0-9a-fA-F]{8})$/;function t8(e){let t;return typeof e==`number`?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=$6.exec(e))?parseInt(t[1]+`ff`,16)>>>0:O6&&O6[e]!==void 0?O6[e]:(t=q6.exec(e))?(i8(t[1])<<24|i8(t[2])<<16|i8(t[3])<<8|255)>>>0:(t=J6.exec(e))?(i8(t[1])<<24|i8(t[2])<<16|i8(t[3])<<8|o8(t[4]))>>>0:(t=Z6.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+`ff`,16)>>>0:(t=e8.exec(e))?parseInt(t[1],16)>>>0:(t=Q6.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Y6.exec(e))?(r8(a8(t[1]),s8(t[2]),s8(t[3]))|255)>>>0:(t=X6.exec(e))?(r8(a8(t[1]),s8(t[2]),s8(t[3]))|o8(t[4]))>>>0:null}function n8(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function r8(e,t,n){let r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=n8(i,r,e+1/3),o=n8(i,r,e),s=n8(i,r,e-1/3);return Math.round(a*255)<<24|Math.round(o*255)<<16|Math.round(s*255)<<8}function i8(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function a8(e){return(parseFloat(e)%360+360)%360/360}function o8(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function s8(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function c8(e){let t=t8(e);return t===null?e:(t||=0,`rgba(${(t&4278190080)>>>24}, ${(t&16711680)>>>16}, ${(t&65280)>>>8}, ${(t&255)/255})`)}var l8=(e,t,n)=>{if(v6.fun(e))return e;if(v6.arr(e))return l8({range:e,output:t,extrapolate:n});if(v6.str(e.output[0]))return E6(e);let r=e,i=r.output,a=r.range||[0,1],o=r.extrapolateLeft||r.extrapolate||`extend`,s=r.extrapolateRight||r.extrapolate||`extend`,c=r.easing||(e=>e);return e=>{let t=d8(e,a);return u8(e,a[t],a[t+1],i[t],i[t+1],c,o,s,r.map)}};function u8(e,t,n,r,i,a,o,s,c){let l=c?c(e):e;if(l<t){if(o===`identity`)return l;o===`clamp`&&(l=t)}if(l>n){if(s===`identity`)return l;s===`clamp`&&(l=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t),l=a(l),r===-1/0?l=-l:i===1/0?l+=r:l=l*(i-r)+r,l)}function d8(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var f8=(e,t=`end`)=>n=>{n=t===`end`?Math.min(n,.999):Math.max(n,.001);let r=n*e;return H6(0,1,(t===`end`?Math.floor(r):Math.ceil(r))/e)},p8=1.70158,m8=p8*1.525,h8=p8+1,g8=2*Math.PI/3,_8=2*Math.PI/4.5,v8=e=>{let t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},y8={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-(-2*e+2)**2/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-(1-e)**3,easeInOutCubic:e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-(1-e)**4,easeInOutQuart:e=>e<.5?8*e*e*e*e:1-(-2*e+2)**4/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-(1-e)**5,easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-(-2*e+2)**5/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:2**(10*e-10),easeOutExpo:e=>e===1?1:1-2**(-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?2**(20*e-10)/2:(2-2**(-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-e**2),easeOutCirc:e=>Math.sqrt(1-(e-1)**2),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-(2*e)**2))/2:(Math.sqrt(1-(-2*e+2)**2)+1)/2,easeInBack:e=>h8*e*e*e-p8*e*e,easeOutBack:e=>1+h8*(e-1)**3+p8*(e-1)**2,easeInOutBack:e=>e<.5?(2*e)**2*((m8+1)*2*e-m8)/2:((2*e-2)**2*((m8+1)*(e*2-2)+m8)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-(2**(10*e-10))*Math.sin((e*10-10.75)*g8),easeOutElastic:e=>e===0?0:e===1?1:2**(-10*e)*Math.sin((e*10-.75)*g8)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(2**(20*e-10)*Math.sin((20*e-11.125)*_8))/2:2**(-20*e+10)*Math.sin((20*e-11.125)*_8)/2+1,easeInBounce:e=>1-v8(1-e),easeOutBounce:v8,easeInOutBounce:e=>e<.5?(1-v8(1-2*e))/2:(1+v8(2*e-1))/2,steps:f8},b8=Symbol.for(`FluidValue.get`),x8=Symbol.for(`FluidValue.observers`),S8=e=>!!(e&&e[b8]),C8=e=>e&&e[b8]?e[b8]():e,w8=e=>e[x8]||null;function T8(e,t){e.eventObserved?e.eventObserved(t):e(t)}function E8(e,t){let n=e[x8];n&&n.forEach(e=>{T8(e,t)})}var D8=class{constructor(e){if(!e&&!(e=this.get))throw Error(`Unknown getter`);O8(this,e)}},O8=(e,t)=>j8(e,b8,t);function k8(e,t){if(e[b8]){let n=e[x8];n||j8(e,x8,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function A8(e,t){let n=e[x8];if(n&&n.has(t)){let r=n.size-1;r?n.delete(t):e[x8]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var j8=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),M8=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,N8=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,P8=RegExp(`(${M8.source})(%|[a-z]+)`,`i`),F8=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,I8=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,L8=e=>{let[t,n]=R8(e);if(!t||T6())return e;let r=window.getComputedStyle(document.documentElement).getPropertyValue(t);return r?r.trim():n&&n.startsWith(`--`)?window.getComputedStyle(document.documentElement).getPropertyValue(n)||e:n&&I8.test(n)?L8(n):n||e},R8=e=>{let t=I8.exec(e);if(!t)return[,];let[,n,r]=t;return[n,r]},z8,B8=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,V8=e=>{z8||=O6?RegExp(`(${Object.keys(O6).join(`|`)})(?!\\w)`,`g`):/^\b$/;let t=e.output.map(e=>C8(e).replace(I8,L8).replace(N8,c8).replace(z8,c8)),n=t.map(e=>e.match(M8).map(Number)),r=n[0].map((e,t)=>n.map(e=>{if(!(t in e))throw Error(`The arity of each "output" value must be equal`);return e[t]})).map(t=>l8({...e,output:t}));return e=>{let n=!P8.test(t[0])&&t.find(e=>P8.test(e))?.replace(M8,``),i=0;return t[0].replace(M8,()=>`${r[i++](e)}${n||``}`).replace(F8,B8)}},H8=`react-spring: `,U8=e=>{let t=e,n=!1;if(typeof t!=`function`)throw TypeError(`${H8}once requires a function parameter`);return(...e)=>{n||=(t(...e),!0)}},pre=U8(console.warn);function mre(){pre(`${H8}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var hre=U8(console.warn);function gre(){hre(`${H8}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function W8(e){return v6.str(e)&&(e[0]==`#`||/\d/.test(e)||!T6()&&I8.test(e)||e in(O6||{}))}var G8=T6()?L.useEffect:L.useLayoutEffect,_re=()=>{let e=(0,L.useRef)(!1);return G8(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function K8(){let e=(0,L.useState)()[1],t=_re();return()=>{t.current&&e(Math.random())}}var q8=e=>(0,L.useEffect)(e,vre),vre=[];function J8(e){let t=(0,L.useRef)(void 0);return(0,L.useEffect)(()=>{t.current=e}),t.current}var Y8=Symbol.for(`Animated:node`),yre=e=>!!e&&e[Y8]===e,X8=e=>e&&e[Y8],Z8=(e,t)=>_6(e,Y8,t),Q8=e=>e&&e[Y8]&&e[Y8].getPayload(),$8=class{constructor(){Z8(this,this)}getPayload(){return this.payload||[]}},e5=class e extends $8{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,v6.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new e(t)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return v6.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){let{done:e}=this;this.done=!1,v6.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},t5=class e extends e5{constructor(e){super(0),this._string=null,this._toString=l8({output:[e,e]})}static create(t){return new e(t)}getValue(){return this._string??=this._toString(this._value)}setValue(e){if(v6.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=l8({output:[this.getValue(),e]})),this._value=0,super.reset()}},n5={dependencies:null},r5=class extends $8{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return x6(this.source,(n,r)=>{yre(n)?t[r]=n.getValue(e):S8(n)?t[r]=C8(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&b6(this.payload,e=>e.reset())}_makePayload(e){if(e){let t=new Set;return x6(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){n5.dependencies&&S8(e)&&n5.dependencies.add(e);let t=Q8(e);t&&b6(t,e=>this.add(e))}},bre=class e extends r5{constructor(e){super(e)}static create(t){return new e(t)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){let t=this.getPayload();return e.length==t.length?t.map((t,n)=>t.setValue(e[n])).some(Boolean):(super.setValue(e.map(xre)),!0)}};function xre(e){return(W8(e)?t5:e5).create(e)}function i5(e){let t=X8(e);return t?t.constructor:v6.arr(e)?bre:W8(e)?t5:e5}var a5=(e,t)=>{let n=!v6.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,L.forwardRef)((r,i)=>{let a=(0,L.useRef)(null),o=n&&(0,L.useCallback)(e=>{a.current=wre(i,e)},[i]),[s,c]=Cre(r,t),l=K8(),u=()=>{let e=a.current;n&&!e||(e?t.applyAnimatedValues(e,s.getValue(!0)):!1)===!1&&l()},d=new Sre(u,c),f=(0,L.useRef)(void 0);G8(()=>(f.current=d,b6(c,e=>k8(e,d)),()=>{f.current&&(b6(f.current.deps,e=>A8(e,f.current)),Y3.cancel(f.current.update))})),(0,L.useEffect)(u,[]),q8(()=>()=>{let e=f.current;b6(e.deps,t=>A8(t,e))});let p=t.getComponentProps(s.getValue());return L.createElement(e,{...p,ref:o})})},Sre=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type==`change`&&Y3.write(this.update)}};function Cre(e,t){let n=new Set;return n5.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new r5(e),n5.dependencies=null,[e,n]}function wre(e,t){return e&&(v6.fun(e)?e(t):e.current=t),t}var o5=Symbol.for(`AnimatedComponent`),Tre=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new r5(e),getComponentProps:r=e=>e}={})=>{let i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},a=e=>{let t=s5(e)||`Anonymous`;return e=v6.str(e)?a[e]||(a[e]=a5(e,i)):e[o5]||(e[o5]=a5(e,i)),e.displayName=`Animated(${t})`,e};return x6(e,(t,n)=>{v6.arr(e)&&(n=s5(t)),a[n]=a(t)}),{animated:a}},s5=e=>v6.str(e)?e:e&&v6.str(e.displayName)?e.displayName:v6.fun(e)&&e.name||null;function c5(e,...t){return v6.fun(e)?e(...t):e}var l5=(e,t)=>e===!0||!!(t&&e&&(v6.fun(e)?e(t):S6(e).includes(t))),u5=(e,t)=>v6.obj(e)?t&&e[t]:e,d5=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,Ere=e=>e,f5=(e,t=Ere)=>{let n=Dre;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));let r={};for(let i of n){let n=t(e[i],i);v6.und(n)||(r[i]=n)}return r},Dre=[`config`,`onProps`,`onStart`,`onChange`,`onPause`,`onResume`,`onRest`],Ore={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function kre(e){let t={},n=0;if(x6(e,(e,r)=>{Ore[r]||(t[r]=e,n++)}),n)return t}function p5(e){let t=kre(e);if(t){let n={to:t};return x6(e,(e,r)=>r in t||(n[r]=e)),n}return{...e}}function m5(e){return e=C8(e),v6.arr(e)?e.map(m5):W8(e)?h6.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Are(e){for(let t in e)return!0;return!1}function h5(e){return v6.fun(e)||v6.arr(e)&&v6.obj(e[0])}function jre(e,t){e.ref?.delete(e),t?.delete(e)}function Mre(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var g5={...{default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}}.default,mass:1,damping:1,easing:y8.linear,clamp:!1},Nre=class{constructor(){this.velocity=0,Object.assign(this,g5)}};function Pre(e,t,n){n&&(n={...n},_5(n,t),t={...n,...t}),_5(e,t),Object.assign(e,t);for(let t in g5)e[t]??(e[t]=g5[t]);let{frequency:r,damping:i}=e,{mass:a}=e;return v6.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=(2*Math.PI/r)**2*a,e.friction=4*Math.PI*i*a/r),e}function _5(e,t){if(!v6.und(t.decay))e.duration=void 0;else{let n=!v6.und(t.tension)||!v6.und(t.friction);(n||!v6.und(t.frequency)||!v6.und(t.damping)||!v6.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var v5=[],Fre=class{constructor(){this.changed=!1,this.values=v5,this.toValues=null,this.fromValues=v5,this.config=new Nre,this.immediate=!1}};function y5(e,{key:t,props:n,defaultProps:r,state:i,actions:a}){return new Promise((o,s)=>{let c,l,u=l5(n.cancel??r?.cancel,t);if(u)p();else{v6.und(n.pause)||(i.paused=l5(n.pause,t));let e=r?.pause;e!==!0&&(e=i.paused||l5(e,t)),c=c5(n.delay||0,t),e?(i.resumeQueue.add(f),a.pause()):(a.resume(),f())}function d(){i.resumeQueue.add(f),i.timeouts.delete(l),l.cancel(),c=l.time-Y3.now()}function f(){c>0&&!h6.skipAnimation?(i.delayed=!0,l=Y3.setTimeout(p,c),i.pauseQueue.add(d),i.timeouts.add(l)):p()}function p(){i.delayed&&=!1,i.pauseQueue.delete(d),i.timeouts.delete(l),e<=(i.cancelId||0)&&(u=!0);try{a.start({...n,callId:e,cancel:u},o)}catch(e){s(e)}}})}var b5=(e,t)=>t.length==1?t[0]:t.some(e=>e.cancelled)?C5(e.get()):t.every(e=>e.noop)?x5(e.get()):S5(e.get(),t.every(e=>e.finished)),x5=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),S5=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),C5=e=>({value:e,cancelled:!0,finished:!1});function w5(e,t,n,r){let{callId:i,parentId:a,onRest:o}=t,{asyncTo:s,promise:c}=n;return!a&&e===s&&!t.reset?c:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;let l=f5(t,(e,t)=>t===`onRest`?void 0:e),u,d,f=new Promise((e,t)=>(u=e,d=t)),p=e=>{let t=i<=(n.cancelId||0)&&C5(r)||i!==n.asyncId&&S5(r,!1);if(t)throw e.result=t,d(e),e},m=(e,t)=>{let a=new E5,o=new D5;return(async()=>{if(h6.skipAnimation)throw T5(n),o.result=S5(r,!1),d(o),o;p(a);let s=v6.obj(e)?{...e}:{...t,to:e};s.parentId=i,x6(l,(e,t)=>{v6.und(s[t])&&(s[t]=e)});let c=await r.start(s);return p(a),n.paused&&await new Promise(e=>{n.resumeQueue.add(e)}),c})()},h;if(h6.skipAnimation)return T5(n),S5(r,!1);try{let t;t=v6.arr(e)?(async e=>{for(let t of e)await m(t)})(e):Promise.resolve(e(m,r.stop.bind(r))),await Promise.all([t.then(u),f]),h=S5(r.get(),!0,!1)}catch(e){if(e instanceof E5)h=e.result;else if(e instanceof D5)h=e.result;else throw e}finally{i==n.asyncId&&(n.asyncId=a,n.asyncTo=a?s:void 0,n.promise=a?c:void 0)}return v6.fun(o)&&Y3.batchedUpdates(()=>{o(h,r,r.item)}),h})()}function T5(e,t){C6(e.timeouts,e=>e.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var E5=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},D5=class extends Error{constructor(){super(`SkipAnimationSignal`)}},O5=e=>e instanceof k5,Ire=1,k5=class extends D8{constructor(){super(...arguments),this.id=Ire++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=X8(this);return e&&e.getValue()}to(...e){return h6.to(this,e)}interpolate(...e){return mre(),h6.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){E8(this,{type:`change`,parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||I6.sort(this),E8(this,{type:`priority`,parent:this,priority:e})}},A5=Symbol.for(`SpringPhase`),j5=1,M5=2,N5=4,P5=e=>(e[A5]&j5)>0,F5=e=>(e[A5]&M5)>0,I5=e=>(e[A5]&N5)>0,L5=(e,t)=>t?e[A5]|=M5|j5:e[A5]&=~M5,R5=(e,t)=>t?e[A5]|=N5:e[A5]&=~N5,Lre=class extends k5{constructor(e,t){if(super(),this.animation=new Fre,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!v6.und(e)||!v6.und(t)){let n=v6.obj(e)?{...e}:{...t,from:e};v6.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(F5(this)||this._state.asyncTo)||I5(this)}get goal(){return C8(this.animation.to)}get velocity(){let e=X8(this);return e instanceof e5?e.lastVelocity||0:e.getPayload().map(e=>e.lastVelocity||0)}get hasAnimated(){return P5(this)}get isAnimating(){return F5(this)}get isPaused(){return I5(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,r=this.animation,{toValues:i}=r,{config:a}=r,o=Q8(r.to);!o&&S8(r.to)&&(i=S6(C8(r.to))),r.values.forEach((s,c)=>{if(s.done)return;let l=s.constructor==t5?1:o?o[c].lastPosition:i[c],u=r.immediate,d=l;if(!u){if(d=s.lastPosition,a.tension<=0){s.done=!0;return}let t=s.elapsedTime+=e,n=r.fromValues[c],i=s.v0==null?s.v0=v6.arr(a.velocity)?a.velocity[c]:a.velocity:s.v0,o,f=a.precision||(n==l?.005:Math.min(1,Math.abs(l-n)*.001));if(!v6.und(a.duration)){let r=1;a.duration>0&&(this._memoizedDuration!==a.duration&&(this._memoizedDuration=a.duration,s.durationProgress>0&&(s.elapsedTime=a.duration*s.durationProgress,t=s.elapsedTime+=e)),r=(a.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,s.durationProgress=r),d=n+a.easing(r)*(l-n),o=(d-s.lastPosition)/e,u=r==1}else if(a.decay){let e=a.decay===!0?.998:a.decay,r=Math.exp(-(1-e)*t);d=n+i/(1-e)*(1-r),u=Math.abs(s.lastPosition-d)<=f,o=i*r}else{o=s.lastVelocity==null?i:s.lastVelocity;let t=a.restVelocity||f/10,r=a.clamp?0:a.bounce,c=!v6.und(r),p=n==l?s.v0>0:n<l,m,h=!1,g=Math.ceil(e/1);for(let e=0;e<g&&(m=Math.abs(o)>t,!(!m&&(u=Math.abs(l-d)<=f,u)));++e){c&&(h=d==l||d>l==p,h&&(o=-o*r,d=l));let e=(-a.tension*1e-6*(d-l)+-a.friction*.001*o)/a.mass;o+=e*1,d+=o*1}}s.lastVelocity=o,Number.isNaN(d)&&(console.warn(`Got NaN while animating:`,this),u=!0)}o&&!o[c].done&&(u=!1),u?s.done=!0:t=!1,s.setValue(d,a.round)&&(n=!0)});let s=X8(this),c=s.getValue();if(t){let e=C8(r.to);(c!==e||n)&&!a.decay?(s.setValue(e),this._onChange(e)):n&&a.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(e){return Y3.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(F5(this)){let{to:e,config:t}=this.animation;Y3.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||=[]).push(e),this}start(e,t){let n;return v6.und(e)?(n=this.queue||[],this.queue=[]):n=[v6.obj(e)?e:{...t,to:e}],Promise.all(n.map(e=>this._update(e))).then(e=>b5(this,e))}stop(e){let{to:t}=this.animation;return this._focus(this.get()),T5(this._state,e&&this._lastCallId),Y3.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type==`change`?this._start():e.type==`priority`&&(this.priority=e.priority+1)}_prepareNode(e){let t=this.key||``,{to:n,from:r}=e;n=v6.obj(n)?n[t]:n,(n==null||h5(n))&&(n=void 0),r=v6.obj(r)?r[t]:r,r??=void 0;let i={to:n,from:r};return P5(this)||(e.reverse&&([n,r]=[r,n]),r=C8(r),v6.und(r)?X8(this)||this._set(n):this._set(r)),i}_update({...e},t){let{key:n,defaultProps:r}=this;e.default&&Object.assign(r,f5(e,(e,t)=>/^on/.test(t)?u5(e,n):e)),U5(this,e,`onProps`),W5(this,`onProps`,e,this);let i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let a=this._state;return y5(++this._lastCallId,{key:n,props:e,defaultProps:r,state:a,actions:{pause:()=>{I5(this)||(R5(this,!0),w6(a.pauseQueue),W5(this,`onPause`,S5(this,z5(this,this.animation.to)),this))},resume:()=>{I5(this)&&(R5(this,!1),F5(this)&&this._resume(),w6(a.resumeQueue),W5(this,`onResume`,S5(this,z5(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(n=>{if(e.loop&&n.finished&&!(t&&n.noop)){let t=B5(e);if(t)return this._update(t,!0)}return n})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(C5(this));let r=!v6.und(e.to),i=!v6.und(e.from);if(r||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(C5(this));let{key:a,defaultProps:o,animation:s}=this,{to:c,from:l}=s,{to:u=c,from:d=l}=e;i&&!r&&(!t.default||v6.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);let f=!y6(d,l);f&&(s.from=d),d=C8(d);let p=!y6(u,c);p&&this._focus(u);let m=h5(t.to),{config:h}=s,{decay:g,velocity:_}=h;(r||i)&&(h.velocity=0),t.config&&!m&&Pre(h,c5(t.config,a),t.config===o.config?void 0:c5(o.config,a));let v=X8(this);if(!v||v6.und(u))return n(S5(this,!0));let y=v6.und(t.reset)?i&&!t.default:!v6.und(d)&&l5(t.reset,a),b=y?d:this.get(),x=m5(u),S=v6.num(x)||v6.arr(x)||W8(x),C=!m&&(!S||l5(o.immediate||t.immediate,a));if(p){let e=i5(u);if(e!==v.constructor)if(C)v=this._set(x);else throw Error(`Cannot animate between ${v.constructor.name} and ${e.name}, as the "to" prop suggests`)}let w=v.constructor,T=S8(u),E=!1;if(!T){let e=y||!P5(this)&&f;(p||e)&&(E=y6(m5(b),x),T=!E),(!y6(s.immediate,C)&&!C||!y6(h.decay,g)||!y6(h.velocity,_))&&(T=!0)}if(E&&F5(this)&&(s.changed&&!y?T=!0:T||this._stop(c)),!m&&((T||S8(c))&&(s.values=v.getPayload(),s.toValues=S8(u)?null:w==t5?[1]:S6(x)),s.immediate!=C&&(s.immediate=C,!C&&!y&&this._set(c)),T)){let{onRest:e}=s;b6(zre,e=>U5(this,t,e));let r=S5(this,z5(this,c));w6(this._pendingCalls,r),this._pendingCalls.add(n),s.changed&&Y3.batchedUpdates(()=>{s.changed=!y,e?.(r,this),y?c5(o.onRest,r):s.onStart?.(r,this)})}y&&this._set(b),m?n(w5(t.to,t,this._state,this)):T?this._start():F5(this)&&!p?this._pendingCalls.add(n):n(x5(b))}_focus(e){let t=this.animation;e!==t.to&&(w8(this)&&this._detach(),t.to=e,w8(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;S8(t)&&(k8(t,this),O5(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;S8(e)&&A8(e,this)}_set(e,t=!0){let n=C8(e);if(!v6.und(n)){let e=X8(this);if(!e||!y6(n,e.getValue())){let r=i5(n);!e||e.constructor!=r?Z8(this,r.create(n)):e.setValue(n),e&&Y3.batchedUpdates(()=>{this._onChange(n,t)})}}return X8(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,W5(this,`onStart`,S5(this,z5(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),c5(this.animation.onChange,e,this)),c5(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){let e=this.animation;X8(this).reset(C8(e.to)),e.immediate||(e.fromValues=e.values.map(e=>e.lastPosition)),F5(this)||(L5(this,!0),I5(this)||this._resume())}_resume(){h6.skipAnimation?this.finish():I6.start(this)}_stop(e,t){if(F5(this)){L5(this,!1);let n=this.animation;b6(n.values,e=>{e.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),E8(this,{type:`idle`,parent:this});let r=t?C5(this.get()):S5(this.get(),z5(this,e??n.to));w6(this._pendingCalls,r),n.changed&&(n.changed=!1,W5(this,`onRest`,r,this))}}};function z5(e,t){let n=m5(t);return y6(m5(e.get()),n)}function B5(e,t=e.loop,n=e.to){let r=c5(t);if(r){let i=r!==!0&&p5(r),a=(i||e).reverse,o=!i||i.reset;return V5({...e,loop:t,default:!1,pause:void 0,to:!a||h5(n)?n:void 0,from:o?e.from:void 0,reset:o,...i})}}function V5(e){let{to:t,from:n}=e=p5(e),r=new Set;return v6.obj(t)&&H5(t,r),v6.obj(n)&&H5(n,r),e.keys=r.size?Array.from(r):null,e}function Rre(e){let t=V5(e);return v6.und(t.default)&&(t.default=f5(t)),t}function H5(e,t){x6(e,(e,n)=>e!=null&&t.add(n))}var zre=[`onStart`,`onRest`,`onChange`,`onPause`,`onResume`];function U5(e,t,n){e.animation[n]=t[n]===d5(t,n)?void 0:u5(t[n],e.key)}function W5(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var Bre=[`onStart`,`onChange`,`onRest`],Vre=1,Hre=class{constructor(e,t){this.id=Vre++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){let e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(let t in e){let n=e[t];v6.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(V5(e)),this}start(e){let{queue:t}=this;return e?t=S6(e).map(V5):this.queue=[],this._flush?this._flush(this,t):(Z5(this,t),G5(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;b6(S6(t),t=>n[t].stop(!!e))}else T5(this._state,this._lastAsyncId),this.each(t=>t.stop(!!e));return this}pause(e){if(v6.und(e))this.start({pause:!0});else{let t=this.springs;b6(S6(e),e=>t[e].pause())}return this}resume(e){if(v6.und(e))this.start({pause:!1});else{let t=this.springs;b6(S6(e),e=>t[e].resume())}return this}each(e){x6(this.springs,e)}_onFrame(){let{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,C6(e,([e,t])=>{t.value=this.get(),e(t,this,this._item)}));let a=!r&&this._started,o=i||a&&n.size?this.get():null;i&&t.size&&C6(t,([e,t])=>{t.value=o,e(t,this,this._item)}),a&&(this._started=!1,C6(n,([e,t])=>{t.value=o,e(t,this,this._item)}))}eventObserved(e){if(e.type==`change`)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type==`idle`)this._active.delete(e.parent);else return;Y3.onFrame(this._onFrame)}};function G5(e,t){return Promise.all(t.map(t=>K5(e,t))).then(t=>b5(e,t))}async function K5(e,t,n){let{keys:r,to:i,from:a,loop:o,onRest:s,onResolve:c}=t,l=v6.obj(t.default)&&t.default;o&&(t.loop=!1),i===!1&&(t.to=null),a===!1&&(t.from=null);let u=v6.arr(i)||v6.fun(i)?i:void 0;u?(t.to=void 0,t.onRest=void 0,l&&(l.onRest=void 0)):b6(Bre,n=>{let r=t[n];if(v6.fun(r)){let i=e._events[n];t[n]=({finished:e,cancelled:t})=>{let n=i.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):i.set(r,{value:null,finished:e||!1,cancelled:t||!1})},l&&(l[n]=t[n])}});let d=e._state;t.pause===!d.paused?(d.paused=t.pause,w6(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);let f=(r||Object.keys(e.springs)).map(n=>e.springs[n].start(t)),p=t.cancel===!0||d5(t,`cancel`)===!0;(u||p&&d.asyncId)&&f.push(y5(++e._lastAsyncId,{props:t,state:d,actions:{pause:g6,resume:g6,start(t,n){p?(T5(d,e._lastAsyncId),n(C5(e))):(t.onRest=s,n(w5(u,t,d,e)))}}})),d.paused&&await new Promise(e=>{d.resumeQueue.add(e)});let m=b5(e,await Promise.all(f));if(o&&m.finished&&!(n&&m.noop)){let n=B5(t,o,i);if(n)return Z5(e,[n]),K5(e,n,!0)}return c&&Y3.batchedUpdates(()=>c(m,e,e.item)),m}function q5(e,t){let n={...e.springs};return t&&b6(S6(t),e=>{v6.und(e.keys)&&(e=V5(e)),v6.obj(e.to)||(e={...e,to:void 0}),X5(n,e,e=>Y5(e))}),J5(e,n),n}function J5(e,t){x6(t,(t,n)=>{e.springs[n]||(e.springs[n]=t,k8(t,e))})}function Y5(e,t){let n=new Lre;return n.key=e,t&&k8(n,t),n}function X5(e,t,n){t.keys&&b6(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function Z5(e,t){b6(t,t=>{X5(e.springs,t,t=>Y5(t,e))})}var Ure=L.createContext({pause:!1,immediate:!1}),Wre=()=>{let e=[],t=function(t){gre();let r=[];return b6(e,(e,i)=>{if(v6.und(t))r.push(e.start());else{let a=n(t,e,i);a&&r.push(e.start(a))}}),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){let n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return b6(e,e=>e.pause(...arguments)),this},t.resume=function(){return b6(e,e=>e.resume(...arguments)),this},t.set=function(t){b6(e,(e,n)=>{let r=v6.fun(t)?t(n,e):t;r&&e.set(r)})},t.start=function(t){let n=[];return b6(e,(e,r)=>{if(v6.und(t))n.push(e.start());else{let i=this._getProps(t,e,r);i&&n.push(e.start(i))}}),n},t.stop=function(){return b6(e,e=>e.stop(...arguments)),this},t.update=function(t){return b6(e,(e,n)=>e.update(this._getProps(t,e,n))),this};let n=function(e,t,n){return v6.fun(e)?e(n,t):e};return t._getProps=n,t};function Q5(e,t,n){let r=v6.fun(t)&&t;r&&!n&&(n=[]);let i=(0,L.useMemo)(()=>r||arguments.length==3?Wre():void 0,[]),a=(0,L.useRef)(0),o=K8(),s=(0,L.useMemo)(()=>({ctrls:[],queue:[],flush(e,t){let n=q5(e,t);return a.current>0&&!s.queue.length&&!Object.keys(n).some(t=>!e.springs[t])?G5(e,t):new Promise(r=>{J5(e,n),s.queue.push(()=>{r(G5(e,t))}),o()})}}),[]),c=(0,L.useRef)([...s.ctrls]),l=(0,L.useRef)([]),u=J8(e)||0;(0,L.useMemo)(()=>{b6(c.current.slice(e,u),e=>{jre(e,i),e.stop(!0)}),c.current.length=e,d(u,e)},[e]),(0,L.useMemo)(()=>{d(0,Math.min(u,e))},n);function d(e,n){for(let i=e;i<n;i++){let e=c.current[i]||(c.current[i]=new Hre(null,s.flush)),n=r?r(i,e):t[i];n&&(l.current[i]=Rre(n))}}let f=c.current.map((e,t)=>q5(e,l.current[t])),p=(0,L.useContext)(Ure),m=p!==J8(p)&&Are(p);G8(()=>{a.current++,s.ctrls=c.current;let{queue:e}=s;e.length&&(s.queue=[],b6(e,e=>e())),b6(c.current,(e,t)=>{i?.add(e),m&&e.start({default:p});let n=l.current[t];n&&(Mre(e,n.ref),e.ref?e.queue.push(n):e.start(n))})}),q8(()=>()=>{b6(s.ctrls,e=>e.stop(!0))});let h=f.map(e=>({...e}));return i?[h,i]:h}function $5(e,t){let n=v6.fun(e),[[r],i]=Q5(1,n?e:[e],n?t||[]:t);return n||arguments.length==2?[r,i]:r}var Gre=class extends k5{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=l8(...t);let n=this._get(),r=i5(n);Z8(this,r.create(n))}advance(e){let t=this._get();y6(t,this.get())||(X8(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&e7(this._active)&&t7(this)}_get(){let e=v6.arr(this.source)?this.source.map(C8):S6(C8(this.source));return this.calc(...e)}_start(){this.idle&&!e7(this._active)&&(this.idle=!1,b6(Q8(this),e=>{e.done=!1}),h6.skipAnimation?(Y3.batchedUpdates(()=>this.advance()),t7(this)):I6.start(this))}_attach(){let e=1;b6(S6(this.source),t=>{S8(t)&&k8(t,this),O5(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){b6(S6(this.source),e=>{S8(e)&&A8(e,this)}),this._active.clear(),t7(this)}eventObserved(e){e.type==`change`?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type==`idle`?this._active.delete(e.parent):e.type==`priority`&&(this.priority=S6(this.source).reduce((e,t)=>Math.max(e,(O5(t)?t.priority:0)+1),0))}};function Kre(e){return e.idle!==!1}function e7(e){return!e.size||Array.from(e).every(Kre)}function t7(e){e.idle||(e.idle=!0,b6(Q8(e),e=>{e.done=!0}),E8(e,{type:`idle`,parent:e}))}h6.assign({createStringInterpolator:V8,to:(e,t)=>new Gre(e,t)}),I6.advance;var n7=/^--/;function qre(e,t){return t==null||typeof t==`boolean`||t===``?``:typeof t==`number`&&t!==0&&!n7.test(e)&&!(i7.hasOwnProperty(e)&&i7[e])?t+`px`:(``+t).trim()}var r7={};function Jre(e,t){if(!e.nodeType||!e.setAttribute)return!1;let n=e.nodeName===`filter`||e.parentNode&&e.parentNode.nodeName===`filter`,{className:r,style:i,children:a,scrollTop:o,scrollLeft:s,viewBox:c,...l}=t,u=Object.values(l),d=Object.keys(l).map(t=>n||e.hasAttribute(t)?t:r7[t]||(r7[t]=t.replace(/([A-Z])/g,e=>`-`+e.toLowerCase())));a!==void 0&&(e.textContent=a);for(let t in i)if(i.hasOwnProperty(t)){let n=qre(t,i[t]);n7.test(t)?e.style.setProperty(t,n):e.style[t]=n}d.forEach((t,n)=>{e.setAttribute(t,u[n])}),r!==void 0&&(e.className=r),o!==void 0&&(e.scrollTop=o),s!==void 0&&(e.scrollLeft=s),c!==void 0&&e.setAttribute(`viewBox`,c)}var i7={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Yre=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),Xre=[`Webkit`,`Ms`,`Moz`,`O`];i7=Object.keys(i7).reduce((e,t)=>(Xre.forEach(n=>e[Yre(n,t)]=e[t]),e),i7);var Zre=/^(matrix|translate|scale|rotate|skew)/,Qre=/^(translate)/,$re=/^(rotate|skew)/,a7=(e,t)=>v6.num(e)&&e!==0?e+t:e,o7=(e,t)=>v6.arr(e)?e.every(e=>o7(e,t)):v6.num(e)?e===t:parseFloat(e)===t,eie=class extends r5{constructor({x:e,y:t,z:n,...r}){let i=[],a=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),a.push(e=>[`translate3d(${e.map(e=>a7(e,`px`)).join(`,`)})`,o7(e,0)])),x6(r,(e,t)=>{if(t===`transform`)i.push([e||``]),a.push(e=>[e,e===``]);else if(Zre.test(t)){if(delete r[t],v6.und(e))return;let n=Qre.test(t)?`px`:$re.test(t)?`deg`:``;i.push(S6(e)),a.push(t===`rotate3d`?([e,t,r,i])=>[`rotate3d(${e},${t},${r},${a7(i,n)})`,o7(i,0)]:e=>[`${t}(${e.map(e=>a7(e,n)).join(`,`)})`,o7(e,t.startsWith(`scale`)?1:0)])}}),i.length&&(r.transform=new tie(i,a)),super(r)}},tie=class extends D8{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||=this._get()}_get(){let e=``,t=!0;return b6(this.inputs,(n,r)=>{let i=C8(n[0]),[a,o]=this.transforms[r](v6.arr(i)?i:n.map(C8));e+=` `+a,t&&=o}),t?`none`:e}observerAdded(e){e==1&&b6(this.inputs,e=>b6(e,e=>S8(e)&&k8(e,this)))}observerRemoved(e){e==0&&b6(this.inputs,e=>b6(e,e=>S8(e)&&A8(e,this)))}eventObserved(e){e.type==`change`&&(this._value=null),E8(this,e)}},nie=`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.big.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.keygen.label.legend.li.link.main.map.mark.menu.menuitem.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.param.picture.pre.progress.q.rp.rt.ruby.s.samp.script.section.select.small.source.span.strong.style.sub.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr.circle.clipPath.defs.ellipse.foreignObject.g.image.line.linearGradient.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.svg.text.tspan`.split(`.`);h6.assign({batchedUpdates:qs.unstable_batchedUpdates,createStringInterpolator:V8,colors:U6});var s7=Tre(nie,{applyAnimatedValues:Jre,createAnimatedStyle:e=>new eie(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}).animated;function rie({points:e,stats:t,partCntPerPoint:n}){return{series:(0,L.useMemo)(()=>X.of(e).toSortedArray(([e])=>e).map(([t,n],r)=>({name:t,color:k3(r,e.size),points:n??[]})),[e]),median:(0,L.useMemo)(()=>t?{low:(n??1)*(t.medianMinutesForSingleMat-t.MAD_belowMinutes),high:(n??1)*(t.medianMinutesForSingleMat+t.MAD_aboveMinutes)}:null,[t,n])}}var c7=50,iie=30,l7=10,aie=2;function oie({points:e,yZoom:t,default_date_range:n,current_date_zoom:r,containerWidth:i,containerHeight:a}){let o=i===0?400:i,s=a===0?400:a,c=o-c7-aie,l=s-l7-iie,u=(0,L.useMemo)(()=>r?rF().domain([r.start,r.end]).range([0,c]):rF().domain([n[0],n[1]]).range([0,c]),[r,n,c]),d=(0,L.useMemo)(()=>{if(e.size===0)return 60;let t=X.of(e).flatMap(([,e])=>e.map(e=>e.y)).maxBy(e=>e)??1;return Math.ceil(t/5)*5},[e]);return{height:s,width:o,xScale:u,yScale:(0,L.useMemo)(()=>t?BM().domain([t.y_low,t.y_high]).range([l,0]):BM().domain([0,d]).range([l,0]),[l,t,d])}}var sie=(0,L.memo)(function({xScale:e,yScale:t}){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(EA,{scale:e,top:t.range()[0]}),(0,R.jsx)(DA,{scale:t,left:e.range()[0],label:`Minutes`}),(0,R.jsx)(CA,{width:e.range()[1]-e.range()[0],height:t.range()[0]-t.range()[1],xScale:e,yScale:t})]})}),u7=(0,L.memo)(function(e){let[t,n]=(0,L.useState)(),[r,i]=(0,L.useState)(),[a,o]=(0,L.useState)(!1);function s(){o(!1),n(void 0),i(void 0)}return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(zl,{size:`small`,onClick:()=>o(!0),children:(0,R.jsx)(sS,{fontSize:`inherit`})}),(0,R.jsxs)(lh,{open:a,onClose:s,children:[(0,R.jsxs)(dh,{children:[(0,R.jsx)(`div`,{style:{marginBottom:`1em`},children:(0,R.jsx)(Bb,{type:`number`,label:`Y Low`,value:t===void 0?e.yZoom?.y_low??``:isNaN(t)?``:t,onChange:e=>n(parseFloat(e.target.value)),onBlur:()=>{t&&e.setZoom(e=>e?{...e,y_low:t}:{y_low:t,y_high:60})}})}),(0,R.jsx)(`div`,{style:{marginBottom:`1em`},children:(0,R.jsx)(Bb,{type:`number`,label:`Y High`,value:r===void 0?e.yZoom?.y_high??``:isNaN(r)?``:r,onChange:e=>i(parseFloat(e.target.value)),onBlur:()=>{r&&e.setZoom(e=>e?{...e,y_high:r}:{y_low:0,y_high:r})}})})]}),(0,R.jsx)(uh,{children:(0,R.jsx)(K,{onClick:s,children:`Close`})})]})]})}),cie=(0,L.memo)(function({median:e,plannedMinutes:t,xScale:n,yScale:r}){let i=$5({to:{x:n.range()[0],y:e?r(e.high):r.range()[0],width:n.range()[1]-n.range()[0],height:e?r(e.low)-r(e.high):0},from:{x:n.range()[0],y:r.range()[0],width:n.range()[1]-n.range()[0],height:0}}),a=$5({to:{y:t?r(t):r.range()[0]},from:{y:r.range()[0]}});return(0,R.jsxs)(`g`,{children:[e?(0,R.jsx)(s7.rect,{x:i.x,y:i.y,width:i.width,height:i.height,fill:E[700],opacity:.2,pointerEvents:`none`}):void 0,t?(0,R.jsx)(s7.line,{stroke:`black`,x1:n.range()[0],x2:n.range()[1],y1:a.y,y2:a.y}):void 0]})}),lie=(0,L.memo)(function({seriesName:e,points:t,color:n,xScale:r,yScale:i,showTooltip:a}){let o=(0,L.useCallback)(n=>{let r=iA(n);if(r===null)return;let i=n.target.dataset.idx;i!==void 0&&a({left:r.x,top:r.y,pt:t[parseInt(i)],seriesName:e})},[a,t,e]);return(0,R.jsx)(`g`,{children:Q5(t.length,t.map(e=>({from:{x:r(e.x),y:i.range()[0]+15},to:{x:r(e.x),y:i(e.y)}}))).map((e,t)=>(0,R.jsx)(s7.circle,{className:`bms-cycle-chart-pt`,fill:n,r:5,cx:e.x,cy:e.y,"data-idx":t,onClick:o},t))})}),uie=(0,L.memo)(function({series:e,xScale:t,yScale:n,showTooltip:r,disabledSeries:i}){return(0,R.jsx)(`g`,{children:e.filter(e=>!i.has(e.name)).map(e=>(0,R.jsx)(lie,{points:e.points,seriesName:e.name,color:e.color,xScale:t,yScale:n,showTooltip:r},e.name))})}),die=(0,L.memo)(function({series:e,disabledSeries:t,adjustDisabled:n}){return(0,R.jsx)(`div`,{style:{marginTop:`1em`,display:`flex`,flexWrap:`wrap`,justifyContent:`space-around`},children:e.map(e=>(0,R.jsx)(Jb,{selected:!t.has(e.name),value:e,onChange:()=>n(t=>t.has(e.name)?t.delete(e.name):t.add(e.name)),children:(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(`div`,{style:{width:`14px`,height:`14px`,backgroundColor:e.color}}),(0,R.jsx)(`div`,{style:{marginLeft:`1em`},children:e.name})]})},e.name))})}),fie=H(`g`,{shouldForwardProp:e=>e.toString()[0]!==`$`})(({$noPtrEvents:e})=>e?{"& .bms-cycle-chart-pt":{pointerevents:`none`}}:void 0),pie=(0,L.memo)(function({setYZoom:e,setXZoom:t,setTooltip:n,xScale:r,yScale:i,highlightStart:a,setHighlightStart:o}){let[s,c]=(0,L.useState)(null),l=(0,L.useCallback)(e=>{let t=iA(e);t!==null&&(c(null),o({x:t.x-c7,y:t.y-l7,nowMS:Date.now()}),n(null))},[o,n]),u=(0,L.useCallback)(e=>{let t=iA(e);t!==null&&c({x:t.x-c7,y:t.y-l7})},[c]),d=(0,L.useCallback)(n=>{if(a!==null){if(Date.now()-a.nowMS>500){let o=iA(n);if(o!==null){let n=r.invert(a.x),s=r.invert(o.x-c7),c=i.invert(a.y),l=i.invert(o.y-l7);e(c<l?{y_low:c,y_high:l}:{y_low:l,y_high:c}),t?.({zoom:n.getTime()<s.getTime()?{start:n,end:s}:{start:s,end:n}})}}o(null),c(null)}},[a,o,c,t,e,r,i]);return(0,R.jsxs)(`g`,{children:[(0,R.jsx)(`rect`,{x:0,y:0,width:r.range()[1],height:i.range()[0],fill:`transparent`,onPointerDown:l,onPointerMove:a===null?void 0:u,onPointerUp:a===null?void 0:d}),a!==null&&s!==null?(0,R.jsx)(`rect`,{x:Math.min(a.x,s.x),y:Math.min(a.y,s.y),width:Math.abs(a.x-s.x),height:Math.abs(a.y-s.y),color:`red`,pointerEvents:`none`,opacity:.3}):void 0]})}),mie=(0,L.memo)(function({set_date_zoom_range:e,current_date_zoom:t,yZoom:n,setYZoom:r,median:i}){return(0,R.jsxs)(`div`,{children:[e&&(t||n)?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(K,{size:`small`,onClick:()=>{e?.({zoom:void 0}),r(null)},children:`Reset Zoom`}),(0,R.jsx)(u7,{yZoom:n,setZoom:r})]}):void 0,e&&!t&&!n?(0,R.jsxs)(`span`,{style:{color:`#6b6b76`},children:[`Zoom via mouse drag`,i?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{children:` or `}),(0,R.jsx)(K,{size:`small`,onClick:()=>{let e=i.high,t=i.low,n=.2*(e-t);r({y_low:t-n,y_high:e+n})},children:`Zoom To Inliers`})]}):void 0,(0,R.jsx)(u7,{yZoom:n,setZoom:r})]}):void 0]})}),hie=(0,L.memo)(function({tooltip:e,extraTooltip:t,seriesLabel:n}){return e===null?null:(0,R.jsxs)(Rv,{direction:`column`,spacing:.6,children:[(0,R.jsxs)(`div`,{children:[`Time:`,` `,e.pt.x.toLocaleString(void 0,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`})]}),(0,R.jsxs)(`div`,{children:[n,`: `,e.seriesName]}),(0,R.jsxs)(`div`,{children:[`Cycle Time: `,e.pt.y.toFixed(1),` minutes`]}),t?t(e.pt).map((e,t)=>(0,R.jsxs)(`div`,{children:[e.title,`:`,` `,e.link?(0,R.jsx)(`a`,{style:{color:`white`,pointerEvents:`auto`,cursor:`pointer`,borderBottom:`1px solid`},onClick:e.link,children:e.value}):(0,R.jsx)(`span`,{children:`e.value`})]},t)):void 0]})});function gie(e){let{width:t,height:n,xScale:r,yScale:i}=oie({points:e.points,yZoom:e.yZoom,setYZoom:e.setYZoom,default_date_range:e.default_date_range,current_date_zoom:e.current_date_zoom,set_date_zoom_range:e.set_date_zoom_range,containerWidth:e.containerWidth,containerHeight:e.containerHeight});return(0,R.jsx)(`svg`,{width:t,height:n,children:(0,R.jsxs)(`g`,{transform:`translate(${c7}, ${l7})`,children:[(0,R.jsx)(sie,{xScale:r,yScale:i}),(0,R.jsx)(cie,{median:e.median,plannedMinutes:e.plannedTimeMinutes,xScale:r,yScale:i}),(0,R.jsx)(pie,{setYZoom:e.setYZoom,setXZoom:e.set_date_zoom_range,xScale:r,setTooltip:e.showTooltip,yScale:i,highlightStart:e.highlightStart,setHighlightStart:e.setHighlightStart}),(0,R.jsx)(fie,{$noPtrEvents:e.highlightStart!==null,children:(0,R.jsx)(uie,{series:e.series,disabledSeries:e.disabledSeries,xScale:r,yScale:i,showTooltip:e.showTooltip})})]})})}var d7=(0,L.memo)(function(e){let t=(0,L.useMemo)(()=>Z(null),[]),n=WE(t),[r,i]=(0,L.useState)(GT.empty()),[a,o]=(0,L.useState)(null),{series:s,median:c}=rie({points:e.points,stats:e.stats,partCntPerPoint:e.partCntPerPoint});return(0,R.jsxs)(`div`,{onPointerLeave:(0,L.useCallback)(()=>{n(null),o(null)},[n,o]),children:[(0,R.jsx)(_A,{sx:{height:{xs:`calc(100vh - 320px)`,md:`calc(100vh - 280px)`,xl:`calc(100vh - 220px)`}},tooltipAtom:t,TooltipContent:({tooltip:t})=>(0,R.jsx)(hie,{tooltip:t,seriesLabel:e.series_label,extraTooltip:e.extra_tooltip}),chart:({width:t,height:i})=>(0,R.jsx)(gie,{...e,containerHeight:i,containerWidth:t,series:s,median:c,yZoom:e.yZoom,setYZoom:e.setYZoom,highlightStart:a,setHighlightStart:o,showTooltip:n,disabledSeries:r})}),(0,R.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`},children:[(0,R.jsx)(`div`,{style:{color:`#6b6b76`},children:`Click on a point for details`}),(0,R.jsx)(`div`,{style:{flexGrow:1}}),(0,R.jsx)(mie,{set_date_zoom_range:e.set_date_zoom_range,current_date_zoom:e.current_date_zoom,yZoom:e.yZoom,setYZoom:e.setYZoom,median:c})]}),(0,R.jsx)(die,{series:s,disabledSeries:r,adjustDisabled:i})]})}),_ie=Z(!0),vie=Z(!0),yie=Z(void 0),bie=Z(void 0),xie=Z(void 0),Sie=Z(void 0),Cie=Z(void 0),wie=Z({}),Tie=Z({}),Eie=Z(null),Die=Z(null);function f7({ty:e}){fL(e===`labor`?`L/U Cycles`:`Machine Cycles`);let t=WE(II),n=(0,L.useCallback)(function(e){let n=e,r=[];if(n.operations)for(let e of n.operations)r.push({title:(e.mat.serial?e.mat.serial:`Material`)+` `+e.operation,value:`Open Card`,link:()=>t({type:`LogMat`,logMat:e.mat})});else for(let e of n.material)r.push({title:e.serial?e.serial:`Material`,value:`Open Card`,link:()=>t({type:`LogMat`,logMat:e})});return r},[t]),[r,i]=GE(e===`labor`?_ie:vie),[a,o]=GE(e===`labor`?wie:Tie),[s,c]=GE(e===`labor`?yie:bie),[l,u]=GE(xie),[d,f]=GE(e===`labor`?Sie:Cie),[p,m]=GE(e===`labor`?Eie:Die),h=Q(sk),g=[VC(fw(),-4),VC(fw(),1)],_=Q(Sk),v=Q(kL),y=(0,L.useMemo)(()=>{let t=fw();return l?Lk(_.valuesToLazySeq(),{zoom:{start:VC(t,-4),end:VC(t,1)},partAndProc:s,pallet:d,operation:l}):e===`labor`&&r?Rk(_.valuesToLazySeq(),{zoom:{start:VC(t,-4),end:VC(t,1)},partAndProc:s,pallet:d}):Lk(_.valuesToLazySeq(),{zoom:{start:VC(t,-4),end:VC(t,1)},partAndProc:s,pallet:d,station:e===`labor`?Fk:Pk})},[_,e,s,d,l,r]),b=s?l??(y.allMachineOperations.length===1?y.allMachineOperations[0]:void 0):void 0,x=(0,L.useMemo)(()=>{if(b&&e===`machine`)return zk(y,!1)},[y,e,b]);return(0,R.jsxs)(G,{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`,children:[(0,R.jsxs)(G,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,R.jsxs)(W,{variant:`subtitle1`,children:[`Recent `,e===`labor`?`Load/Unload Occupancy`:`Machine Cycles`]}),(0,R.jsx)(G,{flexGrow:1}),(0,R.jsx)(bh,{size:`small`,children:(0,R.jsxs)(bv,{name:`Station-Cycles-chart-or-table-select`,autoWidth:!0,value:r?`graph`:`table`,onChange:e=>i(e.target.value===`graph`),children:[(0,R.jsx)(I_,{value:`graph`,children:`Graph`},`graph`),(0,R.jsx)(I_,{value:`table`,children:`Table`},`table`)]})}),(0,R.jsx)(bh,{size:`small`,children:(0,R.jsxs)(bv,{autoWidth:!0,displayEmpty:!0,value:s?y.allPartAndProcNames.findIndex(e=>s.part===e.part&&s.proc===e.proc):-1,style:{marginLeft:`1em`},onChange:e=>{c(e.target.value===-1?void 0:y.allPartAndProcNames[e.target.value]),u(void 0)},children:[(0,R.jsx)(I_,{value:-1,children:(0,R.jsx)(`em`,{children:`Any Part`})},0),y.allPartAndProcNames.map((e,t)=>(0,R.jsx)(I_,{value:t,children:(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(IH,{part:e.part,size:20}),(0,R.jsxs)(`span`,{style:{marginRight:`1em`},children:[e.part,`-`,e.proc]})]})},t))]})}),e===`machine`?(0,R.jsx)(bh,{size:`small`,children:(0,R.jsx)(bv,{name:`Station-Cycles-cycle-chart-station-select`,autoWidth:!0,displayEmpty:!0,value:b?y.allMachineOperations.findIndex(e=>b.compare(e)===0):-1,style:{marginLeft:`1em`},onChange:e=>u(y.allMachineOperations[e.target.value]),children:[...y.allMachineOperations.length===1?[]:[(0,R.jsx)(I_,{value:-1,children:(0,R.jsx)(`em`,{children:`Any Operation`})},-1)],...y.allMachineOperations.map((e,t)=>(0,R.jsxs)(I_,{value:t,children:[e.statGroup,` `,e.operation]},t))]})}):void 0,(0,R.jsx)(bh,{size:`small`,children:(0,R.jsxs)(bv,{name:`Station-Cycles-cycle-chart-station-pallet`,autoWidth:!0,displayEmpty:!0,value:d||``,style:{marginLeft:`1em`},onChange:e=>f(e.target.value===``?void 0:e.target.value),children:[(0,R.jsx)(I_,{value:``,children:(0,R.jsx)(`em`,{children:`Any Pallet`})},0),y.allPalletNames.map(e=>(0,R.jsx)(I_,{value:e,children:(0,R.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,R.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(zl,{onClick:()=>Uk(y,v.matsById,void 0,e===`labor`),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,R.jsx)(Mx,{})})})]}),(0,R.jsx)(`main`,{children:r?(0,R.jsx)(d7,{points:y.data,series_label:y.seriesLabel,default_date_range:g,extra_tooltip:n,current_date_zoom:a.zoom,set_date_zoom_range:o,yZoom:p,setYZoom:m,stats:b&&e===`machine`?h.get(b):void 0,partCntPerPoint:b?X.of(y.data).head()?.[1]?.[0]?.material?.length:void 0,plannedTimeMinutes:x}):(0,R.jsx)(d3,{points:y.data,matsById:v.matsById,period:{type:`Last30`},current_date_zoom:void 0,set_date_zoom_range:void 0,showWorkorderAndInspect:!0,hideMedian:e===`labor`})})]})}var Oie=X.ofRange(0,12,1).map(e=>new Date(2019,e,1)).chunk(3).toRArray(),kie=(0,L.memo)(function(e){let[t,n]=(0,L.useState)(!1),[r,i]=(0,L.useState)(void 0);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Zh,{type:`text`,value:(r||e.curMonth).toLocaleDateString(void 0,{month:`long`,year:`numeric`}),readOnly:!0,endAdornment:(0,R.jsx)(ig,{position:`end`,children:(0,R.jsx)(zl,{"aria-label":`Open month select`,"data-testid":`open-month-select`,onClick:()=>{i(uw(e.curMonth)),n(!0)},size:`large`,children:(0,R.jsx)(ax,{})})})}),(0,R.jsx)(lh,{open:t,onClose:()=>{n(!1),i(void 0)},children:(0,R.jsxs)(dh,{children:[(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(zl,{"data-testid":`select-month-dialog-previous-year`,onClick:()=>i(ew(r||e.curMonth,-1)),size:`large`,children:(0,R.jsx)(Ix,{})}),(0,R.jsx)(`div`,{style:{flexGrow:1},children:(0,R.jsx)(W,{variant:`h5`,align:`center`,"data-testid":`select-month-dialog-current-year`,children:(r||e.curMonth).toLocaleDateString(void 0,{year:`numeric`})})}),(0,R.jsx)(zl,{onClick:()=>i(ew(r||e.curMonth,1)),size:`large`,children:(0,R.jsx)(Lx,{})})]}),(0,R.jsx)(`div`,{"data-testid":`select-month-dialog-choose-month`,children:Oie.map((t,a)=>(0,R.jsx)(`div`,{style:a>0?{marginTop:`1.2em`}:void 0,children:t.map((t,a)=>(0,R.jsx)(K,{color:`primary`,style:a>0?{marginLeft:`1.2em`}:void 0,onClick:()=>{e.onSelectMonth(new Date((r||e.curMonth).getFullYear(),t.getMonth(),1)),i(void 0),n(!1)},children:t.toLocaleDateString(void 0,{month:`short`})},a))},a))})]})})]})}),p7=(0,L.memo)(function(){let e=Q(vR),[t,n]=GE(Ine),r=Vne(),i=Bne();return(0,R.jsxs)(Rv,{component:`nav`,direction:`row`,spacing:3,paddingLeft:`24px`,paddingRight:`24px`,alignItems:`center`,children:[(0,R.jsx)(Eh,{control:(0,R.jsx)(mv,{checked:e.type===`Last30`,color:`secondary`,onChange:(e,t)=>t?i():null}),label:`Last 30 days`}),(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(Eh,{control:(0,R.jsx)(mv,{checked:e.type===`SpecificMonth`,color:`secondary`,onChange:(e,r)=>r?n(t):null}),label:`Select Month`}),(0,R.jsx)(kie,{curMonth:t,onSelectMonth:t=>{e.type===`SpecificMonth`?n(t):r(t)}})]})]})});function m7(e){return function(){return e}}var h7=Math.PI;h7/2,2*h7;var g7=Math.PI,_7=2*g7,v7=1e-6,Aie=_7-v7;function y7(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function jie(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return y7;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var b7=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?y7:jie(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>v7)if(!(Math.abs(u*s-c*l)>v7)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((g7-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>v7&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>v7||Math.abs(this._y1-l)>v7)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%_7+_7),d>Aie?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>v7&&this._append`A${n},${n},0,${+(d>=g7)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function Mie(){return new b7}Mie.prototype=b7.prototype;function Nie(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new b7(t)}Array.prototype.slice;function Pie(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function x7(e){this._context=e}x7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Fie(e){return new x7(e)}function Iie(e){return e[0]}function Lie(e){return e[1]}function Rie(e,t){var n=m7(!0),r=null,i=Fie,a=null,o=Nie(s);e=typeof e==`function`?e:e===void 0?Iie:m7(e),t=typeof t==`function`?t:t===void 0?Lie:m7(t);function s(s){var c,l=(s=Pie(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:m7(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:m7(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:m7(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function S7(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function C7(e,t){this._context=e,this._k=(1-t)/6}C7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:S7(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:S7(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},(function e(t){function n(e){return new C7(e,t)}return n.tension=function(t){return e(+t)},n})(0);function zie(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function w7(e,t){this._context=e,this._alpha=t}w7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:zie(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Bie=(function e(t){function n(e){return t?new w7(e,t):new C7(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Vie(e){switch(e.type){case`Queue`:return e.queue;case`Rotary`:return`Rotary `+e.machineGroup+` #`+e.machineNum.toString();case`StockerWaitForMC`:return`Stocker[Waiting For Machining]`;case`StockerWaitForUnload`:return`Stocker[Waiting For Unload]`}}var T7=150;function Hie(e,t,n){let r=Math.max(t.x.getTime()-e,n.endTime.getTime()-n.elapsedSeconds*1e3),i=Math.min(t.x.getTime()+e,n.endTime.getTime());t.y+=(i-r)/(2*e)*n.numMaterial}function Uie(e,t,n,r){let i=new Date(e.getTime()+n),a=new Date(t.getTime()-n),o=(a.getTime()-i.getTime())/(T7-1),s=[];for(let e=0;e<T7-1;e++)s.push({x:new Date(i.getTime()+e*o),y:0});s.push({x:a,y:0});for(let e of r){let t=Math.max(0,Math.ceil((e.endTime.getTime()-e.elapsedSeconds*1e3-n-i.getTime())/o)),r=Math.min(T7-1,Math.floor((e.endTime.getTime()+n-i.getTime())/o));for(let i=t;i<=r;i++)Hie(n,s[i],e)}return s}function Wie(e,t,n,r,i){let a=n*60*60*1e3;return X.of(i).filter(e=>e.buffer.type!==`Queue`||!r.has(e.buffer.queue)).groupBy(e=>Vie(e.buffer)).map(([n,r])=>({label:n,points:Uie(e,t,a,r)})).toSortedArray(e=>e.label)}function E7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Gie(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?E7(Object(n),!0).forEach(function(t){Kie(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E7(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function D7(e){"@babel/helpers - typeof";return D7=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},D7(e)}function Kie(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O7(){return O7=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},O7.apply(this,arguments)}function qie(e,t){if(e){if(typeof e==`string`)return k7(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k7(e,t)}}function k7(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function A7(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=qie(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
342
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,s=e},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(o)throw s}}}}function Jie(e,t){var n=[],r=[];function i(e,t){if(e.length===1)n.push(e[0]),r.push(e[0]);else{for(var a=Array(e.length-1),o=0;o<a.length;o++)o===0&&n.push(e[0]),o===a.length-1&&r.push(e[o+1]),a[o]=[(1-t)*e[o][0]+t*e[o+1][0],(1-t)*e[o][1]+t*e[o+1][1]];i(a,t)}}return e.length&&i(e,t),{left:n,right:r.reverse()}}function Yie(e){var t={};return e.length===4&&(t.x2=e[2][0],t.y2=e[2][1]),e.length>=3&&(t.x1=e[1][0],t.y1=e[1][1]),t.x=e[e.length-1][0],t.y=e[e.length-1][1],e.length===4?t.type=`C`:e.length===3?t.type=`Q`:t.type=`L`,t}function Xie(e,t){t||=2;for(var n=[],r=e,i=1/t,a=0;a<t-1;a++){var o=i/(1-i*a),s=Jie(r,o);n.push(s.left),r=s.right}return n.push(r),n}function Zie(e,t,n){var r=[[e.x,e.y]];return t.x1!=null&&r.push([t.x1,t.y1]),t.x2!=null&&r.push([t.x2,t.y2]),r.push([t.x,t.y]),Xie(r,n).map(Yie)}var Qie=/[MLCSTQAHVZmlcstqahv]|-?[\d.e+-]+/g,j7={M:[`x`,`y`],L:[`x`,`y`],H:[`x`],V:[`y`],C:[`x1`,`y1`,`x2`,`y2`,`x`,`y`],S:[`x2`,`y2`,`x`,`y`],Q:[`x1`,`y1`,`x`,`y`],T:[`x`,`y`],A:[`rx`,`ry`,`xAxisRotation`,`largeArcFlag`,`sweepFlag`,`x`,`y`],Z:[]};Object.keys(j7).forEach(function(e){j7[e.toLowerCase()]=j7[e]});function M7(e,t){for(var n=Array(e),r=0;r<e;r++)n[r]=t;return n}function $ie(e){return`${e.type}${j7[e.type].map(function(t){return e[t]}).join(`,`)}`}function eae(e,t){var n={x1:`x`,y1:`y`,x2:`x`,y2:`y`},r=[`xAxisRotation`,`largeArcFlag`,`sweepFlag`];if(e.type!==t.type&&t.type.toUpperCase()!==`M`){var i={};Object.keys(t).forEach(function(a){var o=t[a],s=e[a];s===void 0&&(r.includes(a)?s=o:(s===void 0&&n[a]&&(s=e[n[a]]),s===void 0&&(s=0))),i[a]=s}),i.type=t.type,e=i}return e}function tae(e,t,n){var r=[];if(t.type===`L`||t.type===`Q`||t.type===`C`)r=r.concat(Zie(e,t,n));else{var i=O7({},e);i.type===`M`&&(i.type=`L`),r=r.concat(M7(n-1).map(function(){return i})),r.push(t)}return r}function N7(e,t,n){var r=e.length-1,i=t.length-1,a=r/i,o=M7(i).reduce(function(t,r,i){var o=Math.floor(a*i);if(n&&o<e.length-1&&n(e[o],e[o+1])){var s=a*i%1<.5;t[o]&&(s?o>0?--o:o<e.length-1&&(o+=1):o<e.length-1?o+=1:o>0&&--o)}return t[o]=(t[o]||0)+1,t},[]).reduce(function(t,n,r){if(r===e.length-1){var i=M7(n,O7({},e[e.length-1]));return i[0].type===`M`&&i.forEach(function(e){e.type=`L`}),t.concat(i)}return t.concat(tae(e[r],e[r+1],n))},[]);return o.unshift(e[0]),o}function P7(e){for(var t=(e||``).match(Qie)||[],n=[],r,i,a=0;a<t.length;++a)if(r=j7[t[a]],r){i={type:t[a]};for(var o=0;o<r.length;++o)i[r[o]]=+t[a+o+1];a+=r.length,n.push(i)}return n}function nae(e,t,n){var r=e==null?[]:e.slice(),i=t==null?[]:t.slice(),a=D7(n)===`object`?n:{excludeSegment:n,snapEndsToInput:!0},o=a.excludeSegment,s=a.snapEndsToInput;if(!r.length&&!i.length)return function(){return[]};var c=(r.length===0||r[r.length-1].type===`Z`)&&(i.length===0||i[i.length-1].type===`Z`);r.length>0&&r[r.length-1].type===`Z`&&r.pop(),i.length>0&&i[i.length-1].type===`Z`&&i.pop(),r.length?i.length||i.push(r[0]):r.push(i[0]),Math.abs(i.length-r.length)!==0&&(i.length>r.length?r=N7(r,i,o):i.length<r.length&&(i=N7(i,r,o))),r=r.map(function(e,t){return eae(e,i[t])});var l=r.map(function(e){return Gie({},e)});return c&&(l.push({type:`Z`}),r.push({type:`Z`})),function(e){if(e===1&&s)return t??[];if(e===0)return r;for(var n=0;n<l.length;++n){var a=r[n],o=i[n],c=l[n],u=A7(j7[c.type]),d;try{for(u.s();!(d=u.n()).done;){var f=d.value;c[f]=(1-e)*a[f]+e*o[f],(f===`largeArcFlag`||f===`sweepFlag`)&&(c[f]=Math.round(c[f]))}}catch(e){u.e(e)}finally{u.f()}}return l}}function rae(e,t,n){var r=P7(e),i=P7(t),a=D7(n)===`object`?n:{excludeSegment:n,snapEndsToInput:!0},o=a.excludeSegment,s=a.snapEndsToInput;if(!r.length&&!i.length)return function(){return``};var c=nae(r,i,{excludeSegment:o,snapEndsToInput:s});return function(e){if(e===1&&s)return t??``;var n=c(e),r=``,i=A7(n),a;try{for(i.s();!(a=i.n()).done;){var o=a.value;r+=$ie(o)}}catch(e){i.e(e)}finally{i.f()}return r}}var iae=(0,L.memo)(function({series:e,xScale:t,yScale:n,color:r}){let i=Rie().curve(Bie).x(e=>t(e.x)).y(e=>n(e.y))(e.points)??``,a=(0,L.useRef)(i),o=(0,L.useCallback)(ws(e=>{a.current=e},50),[]),s=rae(a.current,i);o(i);let{t:c}=$5({from:{t:0},to:{t:1},reset:!0,delay:0});return(0,R.jsx)(s7.path,{d:c.to(s),stroke:r,strokeWidth:2,strokeLinecap:`round`,fill:`transparent`})}),F7=60,aae=50,I7=20,L7=20;function oae({width:e,height:t,series:n,disabled:r}){let[i,a]=(0,L.useMemo)(()=>{let e=null,t=null;for(let r of n)for(let n of r.points)(e===null||n.x<e)&&(e=n.x),(t===null||n.x>t)&&(t=n.x);return[e??new Date,t??new Date]},[n]),o=(0,L.useMemo)(()=>rF().range([0,e-F7-L7]).domain([i,a]),[e,i,a]),s=t-aae-I7,c=(0,L.useMemo)(()=>BM().domain([0,X.of(n).flatMap(e=>e.points).map(e=>e.y).maxBy(e=>e)??1]).range([s,0]),[n,s]);return(0,R.jsx)(`svg`,{width:e,height:t,children:(0,R.jsxs)(`g`,{transform:`translate(${F7},${I7})`,children:[(0,R.jsx)(EA,{scale:o,top:s}),(0,R.jsx)(DA,{scale:c,left:0,label:`Buffer Size`}),(0,R.jsx)(CA,{xScale:o,yScale:c,width:e-F7-L7,height:s}),n.map((e,t)=>r.has(e.label)?void 0:(0,R.jsx)(iae,{series:e,xScale:o,yScale:c,color:k3(t,n.length)},e.label))]})})}var sae=(0,L.memo)(function(e){let t=Q(vR),n=t.type===`Last30`?[VC(fw(),-29),VC(fw(),1)]:[t.month,HC(t.month,1)],r=Q(t.type===`Last30`?qte:Jte),i=Q(FL),[a,o]=(0,L.useState)(GT.empty()),s=n[0],c=n[1],l=(0,L.useMemo)(()=>Wie(s,c,e.movingAverageDistanceInHours,i,r.valuesToLazySeq()),[s,c,r,e.movingAverageDistanceInHours,i]),{width:u,height:d,ref:f}=mA({refreshMode:`debounce`,refreshRate:100});return(0,R.jsxs)(`div`,{children:[(0,R.jsx)(G,{ref:f,sx:{height:{xs:`calc(100vh - 350px)`,md:`calc(100vh - 285px)`,xl:`calc(100vh - 220px)`},overflow:`hidden`},children:u&&d&&u>0&&d>0&&(0,R.jsx)(oae,{width:u,height:d,series:l,disabled:a})}),(0,R.jsx)(`div`,{style:{marginTop:`1em`,display:`flex`,flexWrap:`wrap`,justifyContent:`space-around`},children:l.map((e,t)=>(0,R.jsx)(Jb,{selected:!a.has(e.label),value:e.label,onChange:()=>o(t=>t.has(e.label)?t.delete(e.label):t.add(e.label)),children:(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(`div`,{style:{width:`14px`,height:`14px`,backgroundColor:k3(t,l.length)}}),(0,R.jsx)(`div`,{style:{marginLeft:`1em`},children:e.label})]})},e.label))})]})}),cae=dte;function lae(){fL(`Buffer Occupancy`);let[e,t]=(0,L.useState)(12);return(0,R.jsxs)(G,{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`,children:[(0,R.jsxs)(G,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,R.jsx)(W,{variant:`subtitle1`,children:`Average material occupancy of rotary tables and stocker positions over time`}),(0,R.jsx)(G,{flexGrow:1}),(0,R.jsx)(`span`,{style:{fontSize:`small`,marginRight:`1em`},children:`Moving Average Window: `}),(0,R.jsx)(cae,{style:{width:`10em`},min:1,max:36,steps:.2,valueLabelDisplay:`off`,value:e,onChange:(e,n)=>t(n)})]}),(0,R.jsx)(`main`,{children:(0,R.jsx)(sae,{movingAverageDistanceInHours:e})})]})}var uae=20,R7=10,dae=2,z7=`#E8F5E9`,B7=`#1B5E20`;function fae({yType:e,dateRange:t,containerWidth:n,points:r}){let i=n==null||n===0?400:n,a=(0,L.useMemo)(()=>X.of(r).map(e=>e.y).distinct().map(oA).maxBy(e=>e??0)??20,[r])+5,o=i-a-dae,s=t[0],c=t[1],l=(0,L.useMemo)(()=>{let e=[];if(c<s)e.push(s);else{let t=s;for(;t<c;)e.push(t),t=VC(t,1)}return QA().domain(e).range([0,o]).align(0).padding(.05)},[s,c,o]),{yScale:u,height:d,colorScale:f}=(0,L.useMemo)(()=>{let t=new Set;for(let e of r)t.add(e.y);let n=60*t.size,i=n+R7+uae,a=QA().domain(Array.from(t).sort((e,t)=>e.localeCompare(t))).range([0,n]).align(0).padding(.05),o;if(e===`Station`)o=BM().domain([0,1]).range([z7,B7]);else{let e=X.of(r).maxBy(e=>e.color)?.color??1;o=BM().domain([0,e]).range([z7,B7])}return{yScale:a,height:i,colorScale:o}},[r,e]);return{height:d,width:i,xScale:l,yScale:u,colorScale:f,marginLeft:a}}var pae=(0,L.memo)(function({xScale:e,yScale:t}){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(EA,{scale:e,top:t.range()[1],tickFormat:e=>e.toLocaleDateString(void 0,{month:`short`,day:`numeric`})}),(0,R.jsx)(DA,{scale:t,left:e.range()[0]})]})}),mae=(0,L.memo)(function({points:e,xScale:t,yScale:n,colorScale:r,setTooltip:i}){let a=(0,L.useRef)(null),o=(0,L.useCallback)(t=>{let n=iA(t);if(n===null)return;a.current!==null&&(clearTimeout(a.current),a.current=null);let r=t.target.dataset.idx;if(r===void 0)return;let o=e[parseInt(r)];i({left:n.x,top:n.y,data:o})},[e,i]),s=(0,L.useCallback)(()=>{a.current===null&&(a.current=window.setTimeout(()=>{a.current=null,i(null)},100))},[i]);return(0,R.jsx)(`g`,{children:e.map((e,i)=>(0,R.jsx)(`rect`,{"data-idx":i,x:t(e.x)??0,width:t.bandwidth(),y:n(e.y)??0,height:n.bandwidth(),rx:6,fill:r(e.color),onPointerEnter:o,onPointerLeave:s},i))})}),hae=(0,L.memo)(function({yType:e,seriesLabel:t,tooltip:n}){return n===null?null:(0,R.jsxs)(Rv,{direction:`column`,spacing:.6,children:[(0,R.jsxs)(`div`,{children:[e,`: `,n.data.y]}),(0,R.jsxs)(`div`,{children:[`Day: `,n.data.x.toDateString()]}),(0,R.jsxs)(`div`,{children:[t,`: `,n.data.label]})]})});function gae(e){let{width:t,height:n,xScale:r,yScale:i,colorScale:a,marginLeft:o}=fae({yType:e.y_title,points:e.points,dateRange:e.dateRange,containerWidth:e.parentWidth});return(0,R.jsx)(`svg`,{width:t,height:n,children:(0,R.jsxs)(`g`,{transform:`translate(${o}, ${R7})`,children:[(0,R.jsx)(mae,{points:e.points,xScale:r,yScale:i,colorScale:a,setTooltip:e.setTooltip}),(0,R.jsx)(pae,{xScale:r,yScale:i,colorScale:a})]})})}function _ae(e){let t=e.setSelected;return(0,R.jsxs)(G,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,R.jsx)(W,{variant:`subtitle1`,children:e.label}),(0,R.jsx)(G,{flexGrow:1}),t?(0,R.jsx)(bh,{size:`small`,children:(0,R.jsx)(bv,{autoWidth:!0,displayEmpty:!0,value:e.cur_selected,onChange:e=>t(e.target.value),children:e.options.map((e,t)=>(0,R.jsx)(I_,{value:e,children:e},t))})}):void 0,(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(zl,{onClick:e.onExport,style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,R.jsx)(Mx,{})})})]})}function V7(e){let t=(0,L.useMemo)(()=>Z(null),[]),n=WE(t),r=(0,L.useCallback)(()=>{n(null)},[n]);return(0,R.jsxs)(G,{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`,children:[(0,R.jsx)(_ae,{label:e.label,setSelected:e.setSelected,cur_selected:e.cur_selected,onExport:e.onExport,options:e.options}),(0,R.jsx)(`main`,{onPointerLeave:r,children:(0,R.jsx)(_A,{sx:{width:`100%`},tooltipAtom:t,autoHeight:!0,chart:({width:t})=>(0,R.jsx)(gae,{points:e.points,y_title:e.y_title,dateRange:e.dateRange,parentWidth:t,setTooltip:n}),TooltipContent:({tooltip:t})=>(0,R.jsx)(hae,{yType:e.y_title,seriesLabel:e.label_title,tooltip:t})})})]})}var H7=class e{constructor(e,t){this.day=e,this.part=t}compare(e){let t=this.day.getTime()-e.day.getTime();return t===0?this.part.localeCompare(e.part):t}hash(){return xT(this.day,this.part)}toString(){return`{day: ${this.day.toISOString()}}, part: ${this.part}}`}adjustDay(t){return new e(t(this.day),this.part)}},U7=class{constructor(e,t){this.matId=e,this.proc=t}compare(e){let t=this.matId-e.matId;return t===0?this.proc-e.proc:t}hash(){return xT(this.matId,this.proc)}toString(){return this.matId.toString()+`-`+this.proc.toString()}};function vae(e,t,n,r){let i=X.of(e).filter(e=>e.endTime>=n&&e.endTime<=r&&!e.isLabor&&e.activeMinutes>0&&e.material.length>0).flatMap(e=>e.material.map(t=>({matId:t.id,proc:t.proc,active:e.activeMinutes/e.material.length}))).toHashMap(e=>[new U7(e.matId,e.proc),e.active],(e,t)=>e+t);return X.of(t).flatMap(([e,t])=>X.ofObject(t.unloaded_processes??{}).filter(([e,t])=>t>=n&&t<=r).map(([n,r])=>({day:XC(r),part:t.partName+`-`+n.toString(),value:{count:1,activeMachineMins:i.get(new U7(e,parseInt(n)))??0}}))).toHashMap(e=>[new H7(e.day,e.part),e.value],(e,t)=>({count:e.count+t.count,activeMachineMins:e.activeMachineMins+t.activeMachineMins}))}function yae(e){return X.of(e).toHashMap(e=>[new H7(XC(e.completeTime),e.partName+`-`+e.process.toString()),{count:e.quantity,activeMachineMins:e.expectedMachineMins}],(e,t)=>({count:e.count+t.count,activeMachineMins:e.activeMachineMins+t.activeMachineMins}))}var W7=class{constructor(e,t){this.x=e,this.y=t}compare(e){let t=this.x-e.x;return t===0?this.y.localeCompare(e.y):t}hash(){return xT(this.x,this.y)}toString(){return`{x: ${new Date(this.x).toISOString()}, y: ${this.y}}`}};function bae(e){let t=X.of(e).toHashMap(e=>[new W7(e.x.getTime(),e.y),e],(e,t)=>t),n=X.of(e).map(e=>e.x.getTime()).distinct().toSortedArray(e=>e),r=X.of(e).aggregate(e=>e.y,e=>e.activeMachineMins/e.count,(e,t)=>isNaN(e)?t:e).sortBy(([e,t])=>e),i=`<table>
|
|
343
|
+
<thead><tr><th>Part</th><th>Expected Cycle Mins</th>`;for(let e of n)i+=`<th>`+new Date(e).toDateString()+` Completed</th>`,i+=`<th>`+new Date(e).toDateString()+` Std. Hours</th>`;i+=`</tr></thead>
|
|
344
|
+
<tbody>
|
|
345
|
+
`;for(let[e,a]of r){i+=`<tr><th>`+e+`</th><th>`+a.toFixed(1)+`</th>`;for(let r of n){let n=t.get(new W7(r,e));n===void 0?(i+=`<td></td>`,i+=`<td></td>`):(i+=`<td>`+n.count.toFixed(0)+`</td>`,i+=`<td>`+(n.activeMachineMins/60).toFixed(1)+`</td>`)}i+=`</tr>
|
|
346
|
+
`}return i+=`</tbody>
|
|
347
|
+
</table>`,i}function xae(e){(0,Mk.default)(bae(e))}function Sae(e,t){return X.of(e).map(([e,n])=>{let r=t.get(e)??0,i=r<1440?Math.max(n/(1440-r),0):0;return{x:e.day,y:e.station,color:Math.min(i,1),label:r<1440?(i*100).toFixed(1)+`%`:`Planned Downtime`}}).toSortedArray(e=>e.x.getTime(),{desc:e=>e.y})}var Cae=Z(`Standard OEE`);function wae(){fL(`Station OEE`);let[e,t]=GE(Cae),n=Q(vR),r=n.type===`Last30`?[VC(fw(),-29),VC(fw(),1)]:[n.month,HC(n.month,1)],i=Q(n.type===`Last30`?Sk:wk),a=Q(n.type===`Last30`?Zk:$k),o=(0,L.useMemo)(()=>{let t=y3(a);return Sae(e===`Standard OEE`?g3(i.valuesToLazySeq()):e===`Occupied`?_3(i.valuesToLazySeq()):b3(a),t)},[e,i,a]);return(0,R.jsx)(V7,{label:`Station Usage Per Day`,y_title:`Station`,label_title:e===`Occupied`?`Occupied`:`OEE`,dateRange:r,cur_selected:e,options:[`Standard OEE`,`Occupied`,`Planned OEE`],setSelected:t,points:o,onExport:()=>w3(`Station`,o)})}var Tae=Z(`Completed`);function Eae(e,t,n,r){let i=vae(e,t,n,r);return X.of(i).map(([e,t])=>({x:e.day,y:e.part,color:t.activeMachineMins,label:t.count.toFixed(0)+` (`+(t.activeMachineMins/60).toFixed(1)+` hours)`,count:t.count,activeMachineMins:t.activeMachineMins})).toSortedArray(e=>e.x.getTime(),{desc:e=>e.y})}function Dae(e){let t=yae(e);return X.of(t).map(([e,t])=>({x:e.day,y:e.part,color:t.activeMachineMins,label:t.count.toFixed(0)+` (`+(t.activeMachineMins/60).toFixed(1)+` hours)`,count:t.count,activeMachineMins:t.activeMachineMins})).toSortedArray(e=>e.x.getTime(),{desc:e=>e.y})}function Oae(){fL(`Part Production`);let[e,t]=GE(Tae),n=Q(vR),r=n.type===`Last30`?[VC(fw(),-29),VC(fw(),1)]:[n.month,HC(n.month,1)],i=Q(n.type===`Last30`?Sk:wk),a=Q(n.type===`Last30`?gL:Ute),o=Q(n.type===`Last30`?kL:jL),s=(0,L.useMemo)(()=>{if(e===`Completed`){let e=fw(),t=n.type===`Last30`?VC(e,-30):n.month,r=n.type===`Last30`?VC(e,1):HC(n.month,1);return Eae(i.valuesToLazySeq(),o.matsById,t,r)}else return Dae(a)},[e,i,o,a,n]);return(0,R.jsx)(V7,{label:`Part Production Per Day`,y_title:`Part`,label_title:e,dateRange:r,cur_selected:e,options:[`Completed`,`Planned`],setSelected:t,points:s,onExport:()=>xae(s)})}var G7=new Intl.DateTimeFormat(void 0,{weekday:`short`,month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`});function K7({range:e}){let t=Q(vR);if(!e)return null;let n=`start`in e?e.start:e[0],r=`end`in e?e.end:e[1];return t.type===`SpecificMonth`?n.toDateString()+` to `+r.toDateString():G7.format(n)+` to `+G7.format(r)}var kae=Z(!0),Aae=DO(e=>e(lL)?{part:`aaa`,proc:2}:void 0),jae=Z(Pk),Mae=Z(void 0),Nae=Z(void 0),q7=Z(void 0),J7=Z(XT.empty()),Pae=Z(e=>{let t=e(vR);return t.type===`Last30`?e(q7):e(J7).get(t.month)},(e,t,n)=>{let r=e(vR);r.type===`Last30`?t(q7,n):t(J7,e=>e.alter(r.month,()=>n))}),Fae=Z(null);function Iae(){fL(`Machine Cycles`);let e=WE(II),t=(0,L.useCallback)(function(t){let n=t,r=[];for(let t of n.material)r.push({title:t.serial?t.serial:`Material`,value:`Open Card`,link:()=>e({type:`LogMat`,logMat:t})});return r},[e]),n=Q(vR),r=Q(n.type===`Last30`?sk:lk),i=Q(n.type===`Last30`?kL:jL),[a,o]=GE(kae),[s,c]=GE(Aae),[l,u]=GE(jae),[d,f]=GE(Mae),[p,m]=GE(Nae),[h,g]=GE(Pae),[_,v]=GE(Fae),y=n.type===`Last30`?[VC(fw(),-29),VC(fw(),1)]:[n.month,HC(n.month,1)],b=Q(n.type===`Last30`?Sk:wk),x=(0,L.useMemo)(()=>s?d?Lk(b.valuesToLazySeq(),{partAndProc:s,pallet:p,operation:d}):Lk(b.valuesToLazySeq(),{partAndProc:s,pallet:p,station:Pk}):p||l!==`@@@_FMSInsight_FilterAnyMachineKey_@@@`?Lk(b.valuesToLazySeq(),{pallet:p,station:l}):Ik(b.valuesToLazySeq()),[s,p,l,d,b]),S=s?d??(x.allMachineOperations.length===1?x.allMachineOperations[0]:void 0):void 0,C=(0,L.useMemo)(()=>{if(S)return zk(x,!1)},[x,S]);return(0,R.jsxs)(G,{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`,children:[(0,R.jsxs)(G,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,R.jsxs)(W,{variant:`subtitle1`,children:[`Machine Cycles for `,(0,R.jsx)(K7,{range:h??y})]}),(0,R.jsx)(G,{flexGrow:1}),(0,R.jsx)(bh,{size:`small`,children:(0,R.jsxs)(bv,{autoWidth:!0,value:a?`graph`:`table`,onChange:e=>o(e.target.value===`graph`),children:[(0,R.jsx)(I_,{value:`graph`,children:`Graph`},`graph`),(0,R.jsx)(I_,{value:`table`,children:`Table`},`table`)]})}),(0,R.jsx)(bh,{size:`small`,children:(0,R.jsxs)(bv,{autoWidth:!0,displayEmpty:!0,value:s?x.allPartAndProcNames.findIndex(e=>s.part===e.part&&s.proc===e.proc):-1,style:{marginLeft:`1em`},onChange:e=>{c(e.target.value===-1?void 0:x.allPartAndProcNames[e.target.value]),f(void 0)},children:[(0,R.jsx)(I_,{value:-1,children:(0,R.jsx)(`em`,{children:`Any Part`})},0),x.allPartAndProcNames.map((e,t)=>(0,R.jsx)(I_,{value:t,children:(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(IH,{part:e.part,size:20}),(0,R.jsxs)(`span`,{style:{marginRight:`1em`},children:[e.part,`-`,e.proc]})]})},t))]})}),(0,R.jsx)(bh,{size:`small`,children:(0,R.jsx)(bv,{autoWidth:!0,displayEmpty:!0,value:s?S?x.allMachineOperations.findIndex(e=>S.compare(e)===0):-1:l,style:{marginLeft:`1em`},onChange:e=>{s?f(x.allMachineOperations[e.target.value]):u(e.target.value)},children:s?[...x.allMachineOperations.length===1?[]:[(0,R.jsx)(I_,{value:-1,children:(0,R.jsx)(`em`,{children:`Any Operation`})},-1)],...x.allMachineOperations.map((e,t)=>(0,R.jsxs)(I_,{value:t,children:[e.statGroup,` `,e.operation]},t))]:[(0,R.jsx)(I_,{value:Pk,children:(0,R.jsx)(`em`,{children:`Any Machine`})},-1),x.allMachineNames.map(e=>(0,R.jsx)(I_,{value:e,children:(0,R.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,R.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),(0,R.jsx)(bh,{size:`small`,children:(0,R.jsxs)(bv,{autoWidth:!0,displayEmpty:!0,value:p||``,style:{marginLeft:`1em`},onChange:e=>m(e.target.value===``?void 0:e.target.value),children:[(0,R.jsx)(I_,{value:``,children:(0,R.jsx)(`em`,{children:`Any Pallet`})},0),x.allPalletNames.map(e=>(0,R.jsx)(I_,{value:e,children:(0,R.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,R.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),x.data.size>0?(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(zl,{onClick:()=>Uk(x,i.matsById,h),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,R.jsx)(Mx,{})})}):void 0]}),(0,R.jsx)(`main`,{children:a?(0,R.jsx)(d7,{points:x.data,series_label:x.seriesLabel,default_date_range:y,extra_tooltip:t,current_date_zoom:h,set_date_zoom_range:e=>g(e.zoom),yZoom:_,setYZoom:v,stats:S?r.get(S):void 0,partCntPerPoint:S?X.of(x.data).head()?.[1]?.[0]?.material?.length:void 0,plannedTimeMinutes:C}):(0,R.jsx)(d3,{points:x.data,matsById:i.matsById,period:n,current_date_zoom:h,set_date_zoom_range:e=>g(e.zoom),showWorkorderAndInspect:!0,emptyMessage:s||p||d?`No Cycles`:`Select part, station, or pallet to see cycles.`})})]})}var Lae=Z(!0),Rae=DO(e=>e(lL)?{part:`aaa`,proc:2}:void 0),zae=DO(e=>e(lL)?`LoadOp`:`LULOccupancy`),Bae=Z(Fk),Vae=Z(void 0),Y7=Z(void 0),X7=Z(XT.empty()),Hae=Z(e=>{let t=e(vR);return t.type===`Last30`?e(Y7):e(X7).get(t.month)},(e,t,n)=>{let r=e(vR);r.type===`Last30`?t(Y7,n):t(X7,e=>e.alter(r.month,()=>n))}),Uae=Z(null);function Wae(){fL(`L/U Cycles`);let e=WE(II),t=(0,L.useCallback)(function(t){let n=t,r=[];if(n.operations)for(let t of n.operations)r.push({title:(t.mat.serial?t.mat.serial:`Material`)+` `+t.operation,value:`Open Card`,link:()=>e({type:`LogMat`,logMat:t.mat})});return r},[e]),n=Q(vR),[r,i]=GE(Lae),[a,o]=GE(Rae),[s,c]=GE(zae),[l,u]=GE(Bae),[d,f]=GE(Vae),[p,m]=GE(Hae),[h,g]=GE(Uae),_=(0,L.useMemo)(()=>a&&s===`LoadOp`?new ak(a.part,`L/U`,`LOAD-`+a.proc.toString()):a&&s===`UnloadOp`?new ak(a.part,`L/U`,`UNLOAD-`+a.proc.toString()):null,[a,s]),v=n.type===`Last30`?[VC(fw(),-29),VC(fw(),1)]:[n.month,HC(n.month,1)],y=Q(n.type===`Last30`?Sk:wk),b=Q(n.type===`Last30`?kL:jL),x=Q(n.type===`Last30`?sk:lk),S=(0,L.useMemo)(()=>a||d||l!==`@@@_FMSInsigt_FilterAnyLoadKey_@@@`?_?Lk(y.valuesToLazySeq(),{operation:_,pallet:d,station:l}):r?Rk(y.valuesToLazySeq(),{partAndProc:a,pallet:d,station:l}):Lk(y.valuesToLazySeq(),{partAndProc:a,pallet:d,station:l}):Ik(y.valuesToLazySeq()),[a,d,_,l,y,r]),C=(0,L.useMemo)(()=>{if(s===`LoadOp`||s===`UnloadOp`)return zk(S,!0)},[S,s]);return(0,R.jsxs)(G,{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`,children:[(0,R.jsxs)(G,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,R.jsxs)(W,{variant:`subtitle1`,children:[`Load/Unload Cycles for `,(0,R.jsx)(K7,{range:p??v})]}),(0,R.jsx)(G,{flexGrow:1}),(0,R.jsx)(bh,{size:`small`,children:(0,R.jsxs)(bv,{autoWidth:!0,value:r?`graph`:`table`,onChange:e=>i(e.target.value===`graph`),children:[(0,R.jsx)(I_,{value:`graph`,children:`Graph`},`graph`),(0,R.jsx)(I_,{value:`table`,children:`Table`},`table`)]})}),(0,R.jsx)(bh,{size:`small`,children:(0,R.jsxs)(bv,{autoWidth:!0,displayEmpty:!0,value:a?S.allPartAndProcNames.findIndex(e=>a.part===e.part&&a.proc===e.proc):-1,style:{marginLeft:`1em`},onChange:e=>{e.target.value===-1?(o(void 0),c(`LULOccupancy`)):o(e.target.value===-1?void 0:S.allPartAndProcNames[e.target.value])},children:[(0,R.jsx)(I_,{value:-1,children:(0,R.jsx)(`em`,{children:`Any Part`})},0),S.allPartAndProcNames.map((e,t)=>(0,R.jsx)(I_,{value:t,children:(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(IH,{part:e.part,size:20}),(0,R.jsxs)(`span`,{style:{marginRight:`1em`},children:[e.part,`-`,e.proc]})]})},t))]})}),(0,R.jsx)(bh,{size:`small`,children:(0,R.jsxs)(bv,{autoWidth:!0,displayEmpty:!0,value:s,style:{marginLeft:`1em`},onChange:e=>c(e.target.value),children:[(0,R.jsx)(I_,{value:`LULOccupancy`,children:`L/U Occupancy`}),a?(0,R.jsx)(I_,{value:`LoadOp`,children:`Load Operation (estimated)`}):void 0,a?(0,R.jsx)(I_,{value:`UnloadOp`,children:`Unload Operation (estimated)`}):void 0]})}),(0,R.jsx)(bh,{size:`small`,children:(0,R.jsxs)(bv,{autoWidth:!0,displayEmpty:!0,value:l,style:{marginLeft:`1em`},onChange:e=>{u(e.target.value)},children:[(0,R.jsx)(I_,{value:Fk,children:(0,R.jsx)(`em`,{children:`Any Station`})},-1),S.allLoadStationNames.map(e=>(0,R.jsx)(I_,{value:e,children:(0,R.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,R.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),(0,R.jsx)(bh,{size:`small`,children:(0,R.jsxs)(bv,{autoWidth:!0,displayEmpty:!0,value:d||``,style:{marginLeft:`1em`},onChange:e=>f(e.target.value===``?void 0:e.target.value),children:[(0,R.jsx)(I_,{value:``,children:(0,R.jsx)(`em`,{children:`Any Pallet`})},0),S.allPalletNames.map(e=>(0,R.jsx)(I_,{value:e,children:(0,R.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,R.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),S.data.size>0?(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(zl,{onClick:()=>Uk(S,b.matsById,p,s===`LULOccupancy`),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,R.jsx)(Mx,{})})}):void 0]}),(0,R.jsx)(`main`,{children:r?(0,R.jsx)(d7,{points:S.data,series_label:S.seriesLabel,default_date_range:v,extra_tooltip:t,current_date_zoom:p,set_date_zoom_range:e=>m(e.zoom),yZoom:h,setYZoom:g,stats:_?x.get(_):void 0,plannedTimeMinutes:C}):(0,R.jsx)(d3,{points:S.data,matsById:b.matsById,period:n,current_date_zoom:p,set_date_zoom_range:e=>m(e.zoom),showWorkorderAndInspect:!0,hideMedian:s===`LULOccupancy`,emptyMessage:a||d?`No Cycles`:`Select part, operation, or pallet to see cycles.`})})]})}var Z7=DO(e=>e(lL)?3:void 0),Q7=Z(void 0),Gae=Z(void 0),Kae=Z(null),qae=Z(e=>{let t=e(Z7),n=e(Q7);if(!t&&!n)return new Map;let r=e(e(vR).type===`Last30`?qL:YL);if(t){let e=r.get(t)?.valuesToLazySeq()??X.of([]);return n&&(e=e.filter(e=>e.mats.some(e=>e.part===n.part&&e.proc===n.proc))),new Map([[t.toString(),Array.from(e)]])}else if(n)return X.of(r).collect(([e,t])=>{let r=t.valuesToLazySeq().filter(e=>e.mats.some(e=>e.part===n.part&&e.proc===n.proc)).toRArray();return r.length>0?[e,r]:null}).toRMap(([e,t])=>[e.toString(),t]);else return new Map}),Jae=Z(e=>{let t=e(e(vR).type===`Last30`?qL:YL);return X.of(t).flatMap(([,e])=>e).flatMap(([,e])=>e.mats).distinctAndSortBy(e=>e.part,e=>e.proc).map(e=>({part:e.part,proc:e.proc})).toRArray()});function Yae(){fL(`Pallet Cycles`);let[e,t]=GE(Z7),[n,r]=GE(Q7),[i,a]=GE(Gae),[o,s]=GE(Kae),c=Q(vR),l=c.type===`Last30`?[VC(fw(),-29),VC(fw(),1)]:[c.month,HC(c.month,1)],u=Q(c.type===`Last30`?qL:YL),d=Q(qae),f=Q(Jae),p=WE(II),m=(0,L.useCallback)(function(e){return e.mats.map(e=>({title:e.part+`-`+e.proc,value:e.serial??``,link:e.serial?()=>p({type:`LogMat`,logMat:e}):void 0}))},[p]);return(0,R.jsxs)(G,{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`,children:[(0,R.jsxs)(G,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,R.jsx)(W,{variant:`subtitle1`,children:`Pallet Cycles`}),(0,R.jsx)(G,{flexGrow:1}),(0,R.jsx)(bh,{size:`small`,children:(0,R.jsxs)(bv,{autoWidth:!0,displayEmpty:!0,value:e??-1,onChange:e=>t(e.target.value===-1?void 0:e.target.value),children:[(0,R.jsx)(I_,{value:-1,children:(0,R.jsx)(`em`,{children:`Any Pallet`})},0),u.keysToLazySeq().sortBy(e=>e).map(e=>(0,R.jsx)(I_,{value:e,children:(0,R.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,R.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),f.length>0?(0,R.jsx)(bh,{size:`small`,children:(0,R.jsxs)(bv,{autoWidth:!0,displayEmpty:!0,value:n?f.findIndex(e=>n.part===e.part&&n.proc===e.proc):-1,style:{marginLeft:`1em`},onChange:e=>{r(e.target.value===-1?void 0:f[e.target.value])},children:[(0,R.jsx)(I_,{value:-1,children:(0,R.jsx)(`em`,{children:`Any Part`})},0),f.map((e,t)=>(0,R.jsx)(I_,{value:t,children:(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(IH,{part:e.part,size:20}),(0,R.jsxs)(`span`,{style:{marginRight:`1em`},children:[e.part,`-`,e.proc]})]})},t))]})}):void 0,(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(zl,{onClick:()=>Gk(u),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,R.jsx)(Mx,{})})})]}),(0,R.jsx)(`main`,{children:(0,R.jsx)(d7,{points:d,series_label:`Pallet`,default_date_range:l,current_date_zoom:i,set_date_zoom_range:e=>a(e.zoom),yZoom:o,setYZoom:s,extra_tooltip:m})})]})}function $7(e,t,n){let r=e?.zoomRange;return n?(t.get(n)??XT.empty()).valuesToAscLazySeq().transform(e=>r?e.filter(e=>e.time>=r.start&&e.time<=r.end):e).flatMap(e=>e.replacements.map(t=>({...t,station:n,time:e.time}))):t.toAscLazySeq().flatMap(([e,t])=>t.valuesToAscLazySeq().transform(e=>r?e.filter(e=>e.time>=r.start&&e.time<=r.end):e).flatMap(t=>t.replacements.map(n=>({...n,station:e,time:t.time}))))}function e9(e,t,n,r){return $7(e,t,n).groupBy(e=>e.tool).map(([e,t])=>{let n=0,r=null,i=0,a=null;for(let e of t){let t=e.type===`ReplaceBeforeCycleStart`?e.useAtReplacement:e.totalUseAtBeginningOfCycle;t&&(r===null||t>r)&&(r=t),t&&(n+=t);let o=e.type===`ReplaceBeforeCycleStart`?e.cntAtReplacement:e.totalCntAtBeginningOfCycle;o&&(a===null||o>a)&&(a=o),o&&(i+=o)}return{tool:e,numReplacements:t.length,totalUseOfAllReplacements:n,totalCntOfAllReplacements:i,maxY:r??a??1,yAxisType:r===null?`Count`:`Time`,replacements:t}}).toSortedArray(r)}function Xae(e,t){let n=e.maxY/2;return t.type===`ReplaceBeforeCycleStart`?e.yAxisType===`Time`?t.useAtReplacement??n:t.cntAtReplacement??n:e.yAxisType===`Time`?t.totalUseAtBeginningOfCycle??n:t.totalCntAtBeginningOfCycle??n}var t9=function(e){return e[e.Tool=0]=`Tool`,e[e.NumReplacements=1]=`NumReplacements`,e[e.AvgUseAtReplacement=2]=`AvgUseAtReplacement`,e[e.AvgCntAtReplacement=3]=`AvgCntAtReplacement`,e[e.Graph=4]=`Graph`,e}(t9||{}),n9=Intl.NumberFormat(void 0,{maximumFractionDigits:1}),r9=(0,L.createContext)({start:new Date,end:new Date});function Zae({tooltip:e}){return(0,R.jsxs)(Rv,{spacing:.5,children:[(0,R.jsxs)(`div`,{children:[`Tool: `,e.r.tool]}),(0,R.jsxs)(`div`,{children:[`Pocket: `,e.r.pocket]}),(0,R.jsxs)(`div`,{children:[`Time: `,e.r.time.toLocaleString()]}),(0,R.jsxs)(`div`,{children:[`Station: `,e.r.station.group,` #`,e.r.station.num]}),e.r.type===`ReplaceBeforeCycleStart`?(0,R.jsxs)(R.Fragment,{children:[e.r.useAtReplacement===null?void 0:(0,R.jsxs)(`div`,{children:[`Minutes at replacement: `,n9.format(e.r.useAtReplacement)]}),e.r.cntAtReplacement===null?void 0:(0,R.jsxs)(`div`,{children:[`Count at replacement: `,n9.format(e.r.cntAtReplacement)]})]}):(0,R.jsxs)(R.Fragment,{children:[e.r.totalUseAtBeginningOfCycle===null?void 0:(0,R.jsxs)(`div`,{children:[`Minutes at beginning of cycle: `,n9.format(e.r.totalUseAtBeginningOfCycle)]}),e.r.totalUseAtEndOfCycle===null?void 0:(0,R.jsxs)(`div`,{children:[`Minutes at end of cycle: `,n9.format(e.r.totalUseAtEndOfCycle)]}),e.r.totalCntAtBeginningOfCycle===null?void 0:(0,R.jsxs)(`div`,{children:[`Count at beginning of cycle: `,n9.format(e.r.totalCntAtBeginningOfCycle)]}),e.r.totalCntAtEndOfCycle===null?void 0:(0,R.jsxs)(`div`,{children:[`Count at end of cycle: `,n9.format(e.r.totalCntAtEndOfCycle)]})]})]})}function Qae({row:e,tooltip:t,timeScale:n,yScale:r}){let[i,a]=GE(t);return(0,R.jsx)(`g`,{children:e.replacements.map((t,o)=>(0,R.jsx)(`circle`,{cx:n(t.time),cy:r(Xae(e,t)),r:t===i?.r?4:2,onMouseEnter:e=>a({top:0,left:iA(e)?.x??0,r:t}),fill:`black`},o))})}var $ae=(0,L.memo)(function({row:e}){let t=(0,L.useContext)(r9),n=(0,L.useMemo)(()=>Z(null),[]),r=WE(n),{ref:i,width:a}=mA({refreshMode:`debounce`,refreshRate:100,handleHeight:!1}),o=rF().domain([t.start,t.end]).range([0,a??1e3]),s=BM().domain([0,e.maxY]).range([33,3]),c=e.numReplacements===0?null:s(e.totalUseOfAllReplacements/e.numReplacements);return(0,R.jsxs)(`div`,{ref:i,style:{position:`relative`,width:`100%`,height:`35px`},children:[(0,R.jsxs)(`svg`,{height:`35`,width:a??1e3,onMouseLeave:()=>r(null),children:[c===null?void 0:(0,R.jsx)(`line`,{x1:`0`,y1:c,x2:a??1e3,y2:c,stroke:`red`,strokeWidth:.5}),(0,R.jsx)(Qae,{row:e,tooltip:n,timeScale:o,yScale:s})]}),(0,R.jsx)(gA,{atom:n,TooltipContent:Zae,chartHeight:35,chartWidth:a??1e3})]})}),i9=[{id:t9.Tool,numeric:!1,label:`Tool`,getDisplay:e=>e.tool},{id:t9.NumReplacements,numeric:!0,label:`Num Replacements`,getDisplay:e=>e.numReplacements.toString(),getForSort:e=>e.numReplacements},{id:t9.AvgUseAtReplacement,numeric:!0,label:`Avg Use (min) at Replacement`,getDisplay:e=>n9.format(e.totalUseOfAllReplacements/e.numReplacements),getForSort:e=>e.totalUseOfAllReplacements/e.numReplacements},{id:t9.AvgCntAtReplacement,numeric:!0,label:`Avg Use (count) at Replacement`,getDisplay:e=>n9.format(e.totalCntOfAllReplacements/e.numReplacements),getForSort:e=>e.totalCntOfAllReplacements/e.numReplacements},{id:t9.Graph,numeric:!1,ignoreDuringExport:!0,label:`All Replacements`,getDisplay:()=>``,expanded:!0,Cell:$ae}],eoe=(0,L.memo)(function(e){let t=Q(vR),n=$$(),r=Q$(t),i=e1(t9.Tool,i9),a=Q(t.type===`Last30`?$L:tR),o=(0,L.useMemo)(()=>e9(r,a,e.station,i.sortOn),[r,a,e.station,i]),s=n?o.slice(n.page*n.rowsPerPage,(n.page+1)*n.rowsPerPage):o,c=r?.zoomRange??(t.type===`Last30`?{start:VC(fw(),-29),end:VC(fw(),1)}:{start:t.month,end:HC(t.month,1)});return(0,R.jsx)(`div`,{children:(0,R.jsxs)(r9.Provider,{value:c,children:[(0,R.jsxs)(Ty,{children:[(0,R.jsx)(G$,{columns:i9,sort:i,showDetailsCol:!1}),(0,R.jsx)(Z$,{columns:i9,pageData:s,rowsPerPage:n.rowsPerPage})]}),(0,R.jsx)(X$,{tpage:n,zoom:r.zoom,count:o.length})]})})}),a9=function(e){return e[e.Date=0]=`Date`,e[e.Station=1]=`Station`,e[e.Tool=2]=`Tool`,e[e.Pocket=3]=`Pocket`,e[e.Between=4]=`Between`,e[e.UseAtReplacement=5]=`UseAtReplacement`,e[e.UseAtEndOfCycle=6]=`UseAtEndOfCycle`,e[e.CntAtReplacement=7]=`CntAtReplacement`,e[e.CntAtEndOfCycle=8]=`CntAtEndOfCycle`,e}(a9||{}),o9=[{id:a9.Date,numeric:!1,label:`Date`,getDisplay:e=>e.time.toLocaleString(),getForSort:e=>e.time.getTime(),getForExport:e=>e.time.toISOString()},{id:a9.Station,numeric:!1,label:`Machine`,getDisplay:e=>e.station.group+` #`+e.station.num.toString(),getForSort:e=>e.station},{id:a9.Tool,numeric:!1,label:`Tool`,getDisplay:e=>e.tool},{id:a9.Pocket,numeric:!0,label:`Pocket`,getDisplay:e=>e.pocket===-1?``:e.pocket.toString(),getForSort:e=>e.pocket},{id:a9.Between,numeric:!1,label:`Type`,getDisplay:e=>e.type===`ReplaceBeforeCycleStart`?`Between Cycles`:`During Cycle`},{id:a9.UseAtReplacement,numeric:!0,label:`Use At Replacement / Start of Cycle (min)`,getDisplay:e=>{let t=e.type===`ReplaceBeforeCycleStart`?e.useAtReplacement:e.totalUseAtBeginningOfCycle;return t==null?``:n9.format(t)},getForSort:e=>e.type===`ReplaceBeforeCycleStart`?e.useAtReplacement:e.totalUseAtBeginningOfCycle},{id:a9.UseAtEndOfCycle,numeric:!0,label:`Use At End of Cycle (min)`,getDisplay:e=>{if(e.type===`ReplaceBeforeCycleStart`)return``;let t=e.totalUseAtEndOfCycle;return t==null?``:n9.format(t)},getForSort:e=>e.type===`ReplaceBeforeCycleStart`?0:e.totalUseAtEndOfCycle},{id:a9.CntAtReplacement,numeric:!0,label:`Use At Replacement / Start of Cycle (count)`,getDisplay:e=>{let t=e.type===`ReplaceBeforeCycleStart`?e.cntAtReplacement:e.totalCntAtBeginningOfCycle;return t==null?``:n9.format(t)},getForSort:e=>e.type===`ReplaceBeforeCycleStart`?e.cntAtReplacement:e.totalCntAtBeginningOfCycle},{id:a9.CntAtEndOfCycle,numeric:!0,label:`Use At End of Cycle (count)`,getDisplay:e=>{if(e.type===`ReplaceBeforeCycleStart`)return``;let t=e.totalCntAtEndOfCycle;return t==null?``:n9.format(t)},getForSort:e=>e.type===`ReplaceBeforeCycleStart`?0:e.totalCntAtEndOfCycle}],toe=(0,L.memo)(function(e){let t=Q(vR),n=$$(),r=Q$(t),i=e1(a9.Date,o9),a=Q(t.type===`Last30`?$L:tR),o=(0,L.useMemo)(()=>$7(r,a,e.station).toSortedArray(i.sortOn),[i,r,a,e.station]),s=n?o.slice(n.page*n.rowsPerPage,(n.page+1)*n.rowsPerPage):o;return(0,R.jsxs)(`div`,{children:[(0,R.jsxs)(Ty,{children:[(0,R.jsx)(G$,{columns:o9,sort:i,showDetailsCol:!1}),(0,R.jsx)(Z$,{columns:o9,pageData:s})]}),(0,R.jsx)(X$,{tpage:n,zoom:r.zoom,count:o.length})]})});function noe(e,t){t===`summary`?n1(i9,e9(void 0,e,void 0,e=>e.tool)):n1(o9,$7(void 0,e,void 0).toSortedArray(e=>e.tool,e=>e.time))}var roe=(0,L.memo)(function(e){let t=Q(Q(vR).type===`Last30`?$L:tR),n=Array.from(t.keys());return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(bh,{size:`small`,children:(0,R.jsxs)(bv,{autoWidth:!0,value:e.station===null?-1:n.indexOf(e.station),style:{marginLeft:`1em`},onChange:t=>{let r=t.target.value;r===-1?e.setSelectedStation(null):e.setSelectedStation(n[r])},children:[(0,R.jsx)(I_,{value:-1,children:(0,R.jsx)(`em`,{children:`Any Machine`})}),n.map((e,t)=>(0,R.jsx)(I_,{value:t,children:(0,R.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,R.jsxs)(`span`,{style:{marginRight:`1em`},children:[e.group,` #`,e.num]})})},t))]})}),(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(zl,{onClick:()=>noe(t,e.displayType),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,R.jsx)(Mx,{})})})]})}),ioe=Z(null),aoe=Z(`summary`),ooe=(0,L.memo)(function(){fL(`Tool Replacements`);let[e,t]=GE(ioe),[n,r]=GE(aoe);return(0,R.jsxs)(G,{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`,children:[(0,R.jsxs)(G,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,R.jsx)(W,{variant:`subtitle1`,children:`Tool Replacements`}),(0,R.jsx)(G,{flexGrow:1}),(0,R.jsx)(bh,{size:`small`,children:(0,R.jsxs)(bv,{autoWidth:!0,value:n,style:{marginLeft:`1em`},onChange:e=>r(e.target.value),children:[(0,R.jsx)(I_,{value:`summary`,children:`Summary`}),(0,R.jsx)(I_,{value:`details`,children:`Details`})]})}),(0,R.jsx)(roe,{station:e,setSelectedStation:t,displayType:n})]}),(0,R.jsx)(`main`,{children:n===`summary`?(0,R.jsx)(eoe,{station:e}):(0,R.jsx)(toe,{station:e})})]})}),s9=Z(null),soe=150,c9=40,l9=10,u9=20,d9=10,f9=80;function p9(e){return`${e.workorderId}-${e.part}`}function m9(e){return e?new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()):null}function coe(e){let t=e.map(p9),n=X.of(e).flatMap(e=>{let t=m9(e.simulatedFilled);return[m9(e.simulatedStart),t?VC(t,2):null]}).collect(e=>e),r=n.minBy(e=>e)??new Date,i=n.maxBy(e=>e)??VC(new Date,7),a=Math.max(rw(i,r)*50,30),o=Math.max(t.length*f9,f9);return{xScale:rF().domain([r,i]).range([0,a]),yScale:QA().domain(t).range([0,o])}}function loe({tooltip:e}){return(0,R.jsxs)(Rv,{children:[(0,R.jsxs)(`div`,{children:[`Workorder: `,e.data.workorderId]}),(0,R.jsxs)(`div`,{children:[`Part: `,e.data.part]}),(0,R.jsxs)(`div`,{children:[`Due Date: `,e.data.dueDate.toLocaleDateString()]}),(0,R.jsxs)(`div`,{children:[`Priority: `,e.data.priority]}),(0,R.jsxs)(`div`,{children:[`Planned Quantity: `,e.data.plannedQuantity]}),(0,R.jsxs)(`div`,{children:[`Completed Quantity: `,e.data.completedQuantity]}),(0,R.jsxs)(`div`,{children:[`Projected Start: `,m9(e.data.simulatedStart)?.toLocaleDateString()]}),(0,R.jsxs)(`div`,{children:[`Projected Filled: `,m9(e.data.simulatedFilled)?.toLocaleDateString()]})]})}function uoe({workorders:e}){return(0,R.jsx)(`div`,{children:e.map(e=>(0,R.jsxs)(Rv,{height:f9,direction:`column`,alignItems:`flex-end`,paddingRight:`10px`,justifyContent:`center`,children:[(0,R.jsx)(G,{children:e.workorderId}),(0,R.jsxs)(G,{display:`flex`,alignItems:`center`,children:[(0,R.jsx)(IH,{part:e.part,size:18}),(0,R.jsx)(G,{ml:`3px`,children:e.part})]})]},p9(e)))})}function doe({xScale:e,yScale:t}){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(OA,{scale:e,top:0}),(0,R.jsx)(SA,{scale:e,height:t.range()[1]-t.range()[0]})]})}function foe({workorders:e,xScale:t,yScale:n}){let r=WE(s9),i=(0,L.useRef)(null);function a(e){return t=>{let n=iA(t);n&&(i.current!==null&&(clearTimeout(i.current),i.current=null),r({left:n.x,top:n.y,data:e}))}}let o=(0,L.useCallback)(()=>{i.current=setTimeout(()=>{r(null)},300)},[i,r]);return(0,R.jsx)(`g`,{children:e.map(e=>{let r=p9(e);return(0,R.jsx)(`g`,{onMouseOver:a(e),onMouseLeave:o,children:e.simulatedStart&&e.simulatedFilled?(0,R.jsx)(`rect`,{x:t(m9(e.simulatedStart)),y:(n(r)??0)+20,width:t(VC(m9(e.simulatedFilled),1))-t(m9(e.simulatedStart)),height:f9-40,fill:C[600]}):void 0},r)})})}function poe(){let e=Q(GO),t=(0,L.useMemo)(()=>X.of(e.workorders??[]).toSortedArray(e=>e.simulatedFilled?.getTime()??null,e=>e.simulatedStart?.getTime()??null,e=>e.workorderId,e=>e.part),[e.workorders]),{xScale:n,yScale:r}=coe(t);return(0,R.jsxs)(G,{display:`flex`,children:[(0,R.jsx)(G,{height:r.range()[1]+c9+l9,width:soe,paddingTop:`${c9}px`,children:(0,R.jsx)(uoe,{workorders:t})}),(0,R.jsxs)(G,{flexGrow:1,width:0,position:`relative`,children:[(0,R.jsx)(`div`,{style:{overflowX:`visible`},children:(0,R.jsx)(`svg`,{height:r.range()[1]+c9+l9,width:n.range()[1]+d9+u9,children:(0,R.jsxs)(`g`,{transform:`translate(${u9}, ${c9})`,children:[(0,R.jsx)(doe,{yScale:r,xScale:n}),(0,R.jsx)(foe,{workorders:t,xScale:n,yScale:r})]})})}),(0,R.jsx)(gA,{atom:s9,TooltipContent:loe,chartHeight:r.range()[1]+c9+l9,chartWidth:n.range()[1]+d9+u9})]})]})}var h9=Z(e=>{let t=e(uL);return t.route===$.Operations_CurrentWorkorders?t.workorder??null:null},(e,t,n)=>{e(uL).route===$.Operations_CurrentWorkorders&&(n===``&&(n=null),t(uL,{route:$.Operations_CurrentWorkorders,workorder:n??void 0}))}),moe=jO(`recentSearchedWorkorders`,[]),hoe=Z(async(e,{signal:t})=>{let n=e(h9);return n===null?null:await TC.getActiveWorkorder(n,t)??[]}),goe=H(ob)({"& > *":{borderBottom:`unset !important`}}),g9=new Intl.NumberFormat(void 0,{maximumFractionDigits:1}),_oe=(0,L.memo)(function({workorder:e}){let t=WE(II),n=WE(S9),r=X.ofObject(e.activeStationTime??{}).concat(X.ofObject(e.elapsedStationTime??{})).map(([e])=>e).distinctAndSortBy(e=>e);function i(n){t({type:`MatSummary`,summary:{...n,partName:e.part}})}return(0,R.jsxs)(Rv,{direction:`row`,flexWrap:`wrap`,justifyContent:`space-around`,ml:`1em`,mr:`1em`,children:[(0,R.jsx)(`div`,{children:(0,R.jsxs)(Ty,{size:`small`,stickyHeader:!0,children:[(0,R.jsx)(Jy,{children:(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{children:`Serial`}),(0,R.jsx)(J,{children:`Quarantine?`}),(0,R.jsx)(J,{sx:{whiteSpace:`nowrap`},children:`Inspect Failed?`}),(0,R.jsx)(J,{sx:{whiteSpace:`nowrap`},children:`Close Out`}),(0,R.jsx)(J,{padding:`checkbox`})]})}),(0,R.jsx)(My,{children:(e.material??[]).map(e=>(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{children:e.serial??``}),(0,R.jsx)(J,{sx:{textAlign:`center`},padding:`checkbox`,children:e.quarantined?(0,R.jsx)(Yx,{fontSize:`inherit`}):``}),(0,R.jsx)(J,{sx:{textAlign:`center`},padding:`checkbox`,children:e.inspectionFailed?(0,R.jsx)(Sx,{fontSize:`inherit`}):``}),(0,R.jsx)(J,{sx:{textAlign:`center`},padding:`checkbox`,children:e.closeout===eC.None?``:e.closeout===eC.ClosedOut?(0,R.jsx)(lx,{fontSize:`inherit`}):(0,R.jsx)(Sx,{fontSize:`inherit`})}),(0,R.jsx)(J,{padding:`checkbox`,children:(0,R.jsx)(zl,{onClick:()=>i(e),size:`large`,children:(0,R.jsx)(Hx,{fontSize:`inherit`})})})]},e.materialID))})]})}),(0,R.jsx)(`div`,{children:(0,R.jsxs)(Ty,{size:`small`,children:[(0,R.jsx)(Jy,{children:(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{children:`Station`}),(0,R.jsx)(J,{children:`Active Minutes`}),(0,R.jsx)(J,{children:`Elapsed Minutes`})]})}),(0,R.jsx)(My,{children:r.map(t=>(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{children:t}),(0,R.jsx)(J,{children:g9.format(ik(e.activeStationTime?.[t]??0))}),(0,R.jsx)(J,{children:g9.format(ik(e.elapsedStationTime?.[t]??0))})]},t))})]})}),(0,R.jsxs)(`div`,{children:[(0,R.jsxs)(Ty,{size:`small`,children:[(0,R.jsx)(Jy,{children:(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{children:`Time`}),(0,R.jsx)(J,{children:`Comment`})]})}),(0,R.jsx)(My,{children:(e.comments??[]).map((e,t)=>(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{children:e.timeUTC.toLocaleString(void 0,{year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`})}),(0,R.jsx)(J,{children:e.comment})]},t))})]}),(0,R.jsx)(K,{sx:{mt:`0.5em`},onClick:()=>n(e),children:`Add Comment`})]})]})});function _9(e){return e?new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())).toLocaleDateString():``}function v9(e){return e.closeout===eC.ClosedOut?!1:e.quarantined||e.inspectionFailed||e.closeout===eC.CloseOutFailed}function voe({workorder:e,showSim:t}){let[n,r]=(0,L.useState)(!1),i=t?10:8;return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(goe,{children:[(0,R.jsx)(J,{children:e.workorderId}),(0,R.jsx)(J,{children:(0,R.jsxs)(G,{sx:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(G,{sx:{mr:`0.2em`},children:(0,R.jsx)(IH,{part:e.part,size:25})}),(0,R.jsx)(`div`,{children:(0,R.jsx)(W,{variant:`body2`,component:`span`,display:`block`,children:e.part})})]})}),(0,R.jsx)(J,{children:e.dueDate===null?``:e.dueDate.toLocaleDateString()}),(0,R.jsx)(J,{align:`right`,children:e.priority}),(0,R.jsx)(J,{align:`right`,children:e.plannedQuantity}),(0,R.jsx)(J,{align:`right`,children:e.material?.length??0}),(0,R.jsx)(J,{align:`right`,children:e.material?.filter(v9).length??0}),(0,R.jsx)(J,{align:`right`,children:e.completedQuantity}),t?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(J,{align:`right`,children:_9(e.simulatedStart)}),(0,R.jsx)(J,{align:`right`,children:_9(e.simulatedFilled)})]}):void 0,(0,R.jsx)(J,{children:(0,R.jsx)(q,{title:`Show Details`,children:(0,R.jsx)(zl,{size:`small`,onClick:()=>r(!n),children:n?(0,R.jsx)(Rx,{}):(0,R.jsx)(Fx,{})})})})]}),(0,R.jsx)(ob,{children:(0,R.jsx)(J,{sx:{pb:`0`,pt:`0`},colSpan:i,children:(0,R.jsx)(Ac,{in:n,timeout:`auto`,unmountOnExit:!0,children:(0,R.jsx)(_oe,{workorder:e})})})})]})}var y9=function(e){return e[e.WorkorderId=0]=`WorkorderId`,e[e.Part=1]=`Part`,e[e.PlannedQty=2]=`PlannedQty`,e[e.DueDate=3]=`DueDate`,e[e.Priority=4]=`Priority`,e[e.CompletedQty=5]=`CompletedQty`,e[e.AssignedQty=6]=`AssignedQty`,e[e.AbnormalQty=7]=`AbnormalQty`,e[e.SimulatedStart=8]=`SimulatedStart`,e[e.SimulatedFilled=9]=`SimulatedFilled`,e}(y9||{});function yoe(e,t,n){let r;switch(t){case y9.WorkorderId:r=e=>e.workorderId;break;case y9.Part:r=e=>e.part;break;case y9.PlannedQty:r=e=>e.plannedQuantity;break;case y9.DueDate:r=e=>e.dueDate.getTime();break;case y9.Priority:r=e=>e.priority;break;case y9.CompletedQty:r=e=>e.completedQuantity;break;case y9.AbnormalQty:r=e=>e.material?.filter(v9).length??0;break;case y9.AssignedQty:r=e=>e.material?.length??0;break;case y9.SimulatedStart:r=e=>e.simulatedStart?.getTime()??null;break;case y9.SimulatedFilled:r=e=>e.simulatedFilled?.getTime()??null;break}return X.of(e).toSortedArray(n===`asc`?{asc:r}:{desc:r})}function boe({sortBy:e,order:t,showSim:n}){let r=Q(GO),i=Q(hoe),a=(0,L.useMemo)(()=>yoe(i??r.workorders??[],e,t),[r.workorders,e,t,i]);return i&&i.length===0?(0,R.jsx)(ob,{children:(0,R.jsx)(J,{colSpan:n?10:8,children:`No workorders found`})}):(0,R.jsx)(R.Fragment,{children:a.map(e=>(0,R.jsx)(voe,{workorder:e,showSim:n},`${e.workorderId}-${e.part}`))})}function xoe(e,t){let n=`<table>
|
|
348
|
+
<thead><tr>`;n+=`<th>Workorder</th>`,n+=`<th>Part</th>`,n+=`<th>Due Date</th>`,n+=`<th>Priority</th>`,n+=`<th>Planned Qty</th>`,n+=`<th>Completed Qty</th>`,t&&(n+=`<th>Simulated Start</th>`,n+=`<th>Simulated Filled</th>`),n+=`<th>Serials</th>`,n+=`<th>Active Time (mins)</th>`,n+=`<th>Elapsed Time (mins)</th>`,n+=`</tr></thead>
|
|
349
|
+
<tbody>
|
|
350
|
+
`;for(let r of e)n+=`<tr>`,n+=`<td>${r.workorderId}</td>`,n+=`<td>${r.part}</td>`,n+=`<td>${r.dueDate===null?``:r.dueDate.toLocaleDateString()}</td>`,n+=`<td>${r.priority}</td>`,n+=`<td>${r.plannedQuantity}</td>`,n+=`<td>${r.completedQuantity}</td>`,t&&(n+=`<td>${_9(r.simulatedStart)}</td>`,n+=`<td>${_9(r.simulatedFilled)}</td>`),n+=`<td>${(r.material??[]).map(e=>e.serial??``).join(`;`)}</td>`,n+=`<td>${X.ofObject(r.activeStationTime??{}).map(([e,t])=>`${e}: ${ik(t)}`).toRArray().join(`;`)}</td>`,n+=`<td>${X.ofObject(r.elapsedStationTime??{}).map(([e,t])=>`${e}: ${ik(t)}`).toRArray().join(`;`)}</td>`,n+=`</tr>
|
|
351
|
+
`;n+=`</tbody></table>
|
|
352
|
+
`,(0,Mk.default)(n)}function b9(e){return(0,R.jsxs)(J,{align:e.align,sortDirection:e.sortBy===e.col?e.order:!1,children:[(0,R.jsx)(q,{title:`Sort`,enterDelay:300,children:(0,R.jsx)(pb,{active:e.sortBy===e.col,direction:e.order,onClick:()=>{e.col===e.sortBy?e.setOrder(e.order===`asc`?`desc`:`asc`):(e.setSortBy(e.col),e.setOrder(`asc`))},children:e.children})}),e.extraIcon]})}var x9=Z(`table`),Soe=(0,L.memo)(function({showSim:e}){let[t,n]=GE(x9);return(0,R.jsxs)(Rv,{direction:`row`,spacing:2,justifyContent:`flex-end`,alignItems:`center`,children:[e?(0,R.jsxs)(Rv,{direction:`row`,spacing:2,alignItems:`center`,flexGrow:1,children:[(0,R.jsx)(oS,{fontSize:`small`}),(0,R.jsx)(W,{variant:`caption`,children:`Projected dates are estimates`})]}):void 0,(0,R.jsx)(bh,{size:`small`,children:(0,R.jsxs)(bv,{variant:`outlined`,value:t,onChange:e=>n(e.target.value),children:[(0,R.jsx)(I_,{value:`table`,children:`Table`}),(0,R.jsx)(I_,{value:`gantt`,children:`Gantt`})]})})]})}),Coe=Gt`
|
|
353
|
+
0% {
|
|
354
|
+
transform: rotate(0deg);
|
|
355
|
+
}
|
|
356
|
+
100% {
|
|
357
|
+
transform: rotate(360deg);
|
|
358
|
+
}
|
|
359
|
+
`,woe=H(Bx)(()=>({animation:`${Coe} 1.5s linear infinite`}));function Toe(){let[e,t]=(0,L.useState)(!1),[n,r]=(0,L.useTransition)(),[i,a]=GE(h9),[o,s]=(0,L.useState)(null),[c,l]=GE(moe);function u(e){e!==null&&e!==``&&(r(()=>{a(e)}),t(!1),s(null),l(t=>{let n=t.filter(t=>t!==e);return n.unshift(e),n.slice(0,5)}))}return(0,R.jsxs)(R.Fragment,{children:[n?(0,R.jsx)(q,{title:`Searching.... Click to cancel`,children:(0,R.jsx)(zl,{size:`small`,onClick:()=>a(null),children:(0,R.jsx)(woe,{fontSize:`inherit`})})}):i?(0,R.jsx)(q,{title:`Clear Search`,children:(0,R.jsx)(zl,{size:`small`,onClick:()=>a(null),children:(0,R.jsx)(fx,{fontSize:`inherit`})})}):(0,R.jsx)(q,{title:`Search`,children:(0,R.jsx)(zl,{size:`small`,onClick:e=>{t(!0),e.currentTarget.blur()},children:(0,R.jsx)(Xx,{fontSize:`inherit`})})}),(0,R.jsxs)(lh,{open:e,onClose:()=>t(!1),children:[(0,R.jsx)(fh,{children:`Search Workorder`}),(0,R.jsxs)(dh,{children:[(0,R.jsx)(Bb,{variant:`outlined`,fullWidth:!0,autoFocus:!0,sx:{mt:`0.5em`,minWidth:`15em`},label:`Workorder ID`,value:o??``,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(u(o),e.preventDefault())}}),c.length>0?(0,R.jsx)(R.Fragment,{children:(0,R.jsx)(Fg,{dense:!0,sx:{mt:`1em`},subheader:(0,R.jsx)(bf,{children:`Previous Searches`}),children:c.map(e=>(0,R.jsx)(Zg,{onClick:()=>u(e),children:(0,R.jsx)(Hg,{children:(0,R.jsx)(s_,{primary:e})})},e))})}):void 0]}),(0,R.jsxs)(uh,{children:[(0,R.jsx)(K,{color:`primary`,onClick:()=>u(o),children:`Search`}),(0,R.jsx)(K,{color:`secondary`,onClick:()=>t(!1),children:`Cancel`})]})]})]})}var Eoe=(0,L.memo)(function(e){let t={sortBy:e.sortBy,setSortBy:e.setSortBy,order:e.order,setOrder:e.setOrder};return(0,R.jsx)(Jy,{children:(0,R.jsxs)(ob,{children:[(0,R.jsx)(b9,{align:`left`,col:y9.WorkorderId,...t,extraIcon:e.disableSearch?void 0:(0,R.jsx)(Toe,{}),children:`Workorder`}),(0,R.jsx)(b9,{align:`left`,col:y9.Part,...t,children:`Part`}),(0,R.jsx)(b9,{align:`left`,col:y9.DueDate,...t,children:`Due Date`}),(0,R.jsx)(b9,{align:`right`,col:y9.Priority,...t,children:`Priority`}),(0,R.jsx)(b9,{align:`right`,col:y9.PlannedQty,...t,children:`Planned Quantity`}),(0,R.jsx)(b9,{align:`right`,col:y9.AssignedQty,...t,children:`Started Quantity`}),(0,R.jsx)(b9,{align:`right`,col:y9.AbnormalQty,...t,children:`Abnormal Quantity`}),(0,R.jsx)(b9,{align:`right`,col:y9.CompletedQty,...t,children:`Completed Quantity`}),e.showSim?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(b9,{align:`right`,col:y9.SimulatedStart,...t,children:`Projected Start`}),(0,R.jsx)(b9,{align:`right`,col:y9.SimulatedFilled,...t,children:`Projected Filled`})]}):void 0,(0,R.jsx)(J,{children:(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(zl,{style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,onClick:()=>xoe(e.workorders,e.showSim),children:(0,R.jsx)(Mx,{})})})})]})})}),S9=Z(null);function Doe(){let[e,t]=GE(S9),[n,r]=(0,L.useState)(null),i=WE(JO);function a(){t(null),r(null)}function o(){e&&n&&n!==``&&i({workorder:e.workorderId,comment:n}),a()}return(0,R.jsx)(lh,{open:e!==null,onClose:a,children:e===null?void 0:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(fh,{children:(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(`div`,{children:(0,R.jsx)(IH,{part:e.part,size:40})}),(0,R.jsxs)(`div`,{style:{marginLeft:`1em`,flexGrow:1},children:[`Add Comment For `,e.workorderId]})]})}),(0,R.jsx)(dh,{children:(0,R.jsx)(Bb,{variant:`outlined`,sx:{mt:`1em`},fullWidth:!0,autoFocus:!0,value:n,onChange:e=>r(e.target.value),onKeyDown:e=>{e.key===`Enter`&&n!==null&&n!==``&&(o(),e.preventDefault())}})}),(0,R.jsxs)(uh,{children:[(0,R.jsx)(K,{color:`primary`,onClick:o,children:`Save Comment`}),(0,R.jsx)(K,{color:`primary`,onClick:a,children:`Cancel`})]})]})})}function Ooe(){let[e,t]=GE(h9);return(0,R.jsx)(ob,{children:(0,R.jsx)(J,{colSpan:10,children:(0,R.jsxs)(Rv,{direction:`column`,mt:`3em`,flex:`flex`,alignItems:`center`,width:`100%`,children:[(0,R.jsxs)(Rv,{direction:`row`,spacing:`3`,children:[(0,R.jsx)(Nl,{}),e&&e!==``?(0,R.jsxs)(W,{variant:`h6`,children:[`Searching for workorder `,e]}):(0,R.jsx)(W,{variant:`h6`,children:`Searching`})]}),(0,R.jsx)(K,{onClick:()=>t(null),children:`Cancel`})]})})})}function koe({showSim:e,disableSearch:t}){let[n,r]=(0,L.useState)(y9.WorkorderId),[i,a]=(0,L.useState)(`asc`);return(0,R.jsxs)(Ty,{stickyHeader:!0,children:[(0,R.jsx)(Eoe,{workorders:Q(GO)?.workorders??[],sortBy:n,setSortBy:r,showSim:e,order:i,setOrder:a,disableSearch:t}),(0,R.jsx)(My,{children:(0,R.jsx)(L.Suspense,{fallback:(0,R.jsx)(Ooe,{}),children:(0,R.jsx)(boe,{sortBy:n,order:i,showSim:e})})})]})}function Aoe(){let e=WE(L1),t=Q(zI),[n,r]=QI(),i=WE(II);if(t===null||t.materialID<0)return null;function a(e){t!==null&&(n({mat:t,operator:`Manager`,failed:e}),i(null))}return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(K,{color:`primary`,disabled:r,onClick:()=>a(!0),children:`Fail CloseOut`}),(0,R.jsx)(K,{color:`primary`,disabled:r,onClick:()=>a(!1),children:`Pass CloseOut`}),(0,R.jsx)(K,{color:`primary`,onClick:()=>e(!0),children:`Change Workorder`})]})}var joe=(0,L.memo)(function(){return(0,R.jsx)(lU,{buttons:(0,R.jsx)(Aoe,{})})}),C9=(0,L.memo)(function({disableSearch:e}){fL(`Workorders`);let t=Q(GO),n=Q(x9),r=(0,L.useMemo)(()=>t.workorders?.some(e=>!!e.simulatedStart||!!e.simulatedFilled)??!1,[t.workorders]);return(0,R.jsxs)(G,{component:`main`,padding:`24px`,children:[r?(0,R.jsx)(Soe,{showSim:r}):void 0,n===`table`?(0,R.jsx)(koe,{showSim:r,disableSearch:e}):(0,R.jsx)(poe,{}),(0,R.jsx)(Doe,{}),(0,R.jsx)(joe,{}),(0,R.jsx)(H1,{})]})}),Moe=C[50],Noe=C[600],Poe=E[100],w9=`3em`,Foe=`calc(${w9} * 7)`,Ioe=Z(e=>{let t=e(iR);return t===null?null:X.of(t.usage).toLookupOrderedMap(e=>e.machineGroup,e=>new Date(e.day.getUTCFullYear(),e.day.getUTCMonth(),e.day.getUTCDate()))}),Loe=Z(e=>{let t=e(iR);return t===null?JT.empty():JT.build(t.usage,e=>e.machineGroup)}),Roe=Z(e=>{let t=e(iR);return t===null?JT.empty():JT.build(t.usage,e=>new Date(e.day.getUTCFullYear(),e.day.getUTCMonth(),1))}),zoe=Z(e=>{let t=e(iR);return t===null?0:X.of(t.usage).map(e=>Math.ceil(e.usage)).maxBy(e=>e)??1}),Boe=Z(e=>{let t=e(iR);return t===null?[null,null]:[X.of(t.usage).map(e=>new Date(e.day.getUTCFullYear(),e.day.getUTCMonth(),e.day.getUTCDate())).minBy(e=>e)??null,X.of(t.usage).map(e=>new Date(e.day.getUTCFullYear(),e.day.getUTCMonth(),e.day.getUTCDate())).maxBy(e=>e)??null]});function Voe({date:e,dayColor:t,tooltip:n}){let r=new Date(e.getFullYear(),e.getMonth(),1).getDay(),i=new Date(e.getFullYear(),e.getMonth()+1,0).getDate();return(0,R.jsxs)(G,{width:Foe,children:[(0,R.jsx)(W,{variant:`h6`,textAlign:`center`,children:e.toLocaleString(`default`,{month:`long`,year:`numeric`})}),(0,R.jsxs)(G,{display:`flex`,flexWrap:`wrap`,children:[X.ofRange(0,r).map((e,t)=>(0,R.jsx)(G,{height:w9,width:w9},t)),X.ofRange(1,i+1).map((r,i)=>(0,R.jsx)(`div`,{style:{width:w9,height:w9,cursor:`default`,backgroundColor:t(new Date(e.getFullYear(),e.getMonth(),r))},children:(0,R.jsx)(q,{title:n(new Date(e.getFullYear(),e.getMonth(),r)),children:(0,R.jsx)(G,{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100%`,children:r})})},i))]})]})}function Hoe(){return(0,R.jsxs)(Rv,{direction:`row`,spacing:2,alignItems:`center`,children:[(0,R.jsx)(oS,{fontSize:`small`}),(0,R.jsx)(W,{variant:`caption`,children:`Projected dates are estimates`})]})}function Uoe({group:e,month:t}){let n=Q(Ioe),[r,i]=Q(Boe),a=Q(zoe),o=(0,L.useMemo)(()=>{let t=BM().domain([0,a]).range([Moe,Noe]);return a=>{if(i&&a>i||r&&a<r)return`white`;let o=n?.get(e)?.get(a);return o?t(o.usage):Poe}},[n,a,r,i,e]);function s(t){let a=n?.get(e)?.get(t);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`div`,{children:t.toLocaleDateString(void 0,{month:`short`,day:`numeric`,year:`numeric`})}),i&&t>i?(0,R.jsx)(`div`,{children:`Not Simulated`}):r&&t<r?(0,R.jsx)(`div`,{}):a?(0,R.jsxs)(`div`,{children:[`Usage: `,a.usage.toFixed(2)]}):(0,R.jsx)(`div`,{children:`Downtime`})]})}return(0,R.jsx)(Voe,{date:t,dayColor:o,tooltip:s})}function Woe(){fL(`Projected Machine Usage`);let e=Q(Loe),t=Q(Roe);return(0,R.jsx)(G,{component:`main`,padding:`24px`,children:(0,R.jsxs)(Rv,{direction:`column`,spacing:5,children:[(0,R.jsx)(Hoe,{}),e.toAscLazySeq().map(e=>(0,R.jsxs)(`div`,{children:[(0,R.jsx)(W,{variant:`h4`,children:e}),(0,R.jsx)(G,{display:`flex`,flexWrap:`wrap`,columnGap:`50px`,children:t.toAscLazySeq().map(t=>(0,R.jsx)(Uoe,{group:e,month:t},t.getTime()))})]},e))]})})}function Goe(){let e=WE(L1),t=Q(zI),[n,r]=QI(),i=WE(II);if(t===null||t.materialID<0)return null;function a(e){t!==null&&(n({mat:t,operator:`Manager`,failed:e}),i(null))}return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(K,{color:`primary`,disabled:r,onClick:()=>a(!0),children:`Fail CloseOut`}),(0,R.jsx)(K,{color:`primary`,disabled:r,onClick:()=>a(!1),children:`Pass CloseOut`}),(0,R.jsx)(K,{color:`primary`,onClick:()=>e(!0),children:`Change Workorder`})]})}var Koe=(0,L.memo)(function(){return(0,R.jsx)(lU,{buttons:(0,R.jsx)(Goe,{})})}),qoe=new Intl.DateTimeFormat(void 0,{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`});function Joe({day:e,setDay:t}){let n=fw();return(0,R.jsxs)(Rv,{direction:`row`,spacing:2,alignItems:`center`,children:[(0,R.jsx)(q,{title:`Previous Day`,children:(0,R.jsx)(`div`,{children:(0,R.jsx)(zl,{disabled:e<=VC(n,-28),onClick:()=>t(e=>VC(e,-1)),children:(0,R.jsx)(eS,{})})})}),(0,R.jsx)(W,{sx:{minWidth:`14em`,textAlign:`center`},children:qoe.format(e)}),(0,R.jsx)(q,{title:`Next Day`,children:(0,R.jsx)(`div`,{children:(0,R.jsx)(zl,{disabled:e>=n,onClick:()=>t(e=>VC(e,1)),children:(0,R.jsx)($x,{})})})})]})}var T9=function(e){return e[e.CompletedTime=0]=`CompletedTime`,e[e.Serial=1]=`Serial`,e[e.Part=2]=`Part`,e[e.Workorder=3]=`Workorder`,e[e.Closeout=4]=`Closeout`,e[e.CloseoutTime=5]=`CloseoutTime`,e}(T9||{});function Yoe(e,t,n){let r;switch(t){case T9.CompletedTime:r=e=>e.last_unload_time??null;break;case T9.Part:r=e=>e.partName;break;case T9.Serial:r=e=>e.serial??null;break;case T9.Workorder:r=e=>e.workorderId??null;break;case T9.Closeout:r=e=>e.closeout_failed??null;break;case T9.CloseoutTime:r=e=>e.closeout_completed??null}return X.of(e).toSortedArray(n===`asc`?{asc:r}:{desc:r},{asc:e=>e.last_unload_time??null})}function Xoe({sortBy:e,setSortBy:t,sortOrder:n,setSortOrder:r}){function i(i){i===e?r(n===`asc`?`desc`:`asc`):(t(i),r(`asc`))}return(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{sortDirection:e===T9.CompletedTime?n:!1,children:(0,R.jsx)(pb,{active:e===T9.CompletedTime,direction:n,onClick:()=>i(T9.CompletedTime),children:`Completed Time`})}),(0,R.jsx)(J,{sortDirection:e===T9.Serial?n:!1,children:(0,R.jsx)(pb,{active:e===T9.Serial,direction:n,onClick:()=>i(T9.Serial),children:`Serial`})}),(0,R.jsx)(J,{sortDirection:e===T9.Part?n:!1,children:(0,R.jsx)(pb,{active:e===T9.Part,direction:n,onClick:()=>i(T9.Part),children:`Part`})}),(0,R.jsx)(J,{sortDirection:e===T9.Workorder?n:!1,children:(0,R.jsx)(pb,{active:e===T9.Workorder,direction:n,onClick:()=>i(T9.Workorder),children:`Workorder`})}),(0,R.jsx)(J,{sortDirection:e===T9.Closeout?n:!1,children:(0,R.jsx)(pb,{active:e===T9.Closeout,direction:n,onClick:()=>i(T9.Closeout),children:`Closeout`})}),(0,R.jsx)(J,{sortDirection:e===T9.CloseoutTime?n:!1,children:(0,R.jsx)(pb,{active:e===T9.CloseoutTime,direction:n,onClick:()=>i(T9.CloseoutTime),children:`Closeout Time`})}),(0,R.jsx)(J,{})]})}var Zoe=new Intl.DateTimeFormat(void 0,{hour:`2-digit`,minute:`numeric`,second:`numeric`}),Qoe=new Intl.DateTimeFormat(void 0,{year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`}),$oe=(0,L.memo)(function({mat:e}){let t=WE(II);return(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{children:e.last_unload_time?Zoe.format(e.last_unload_time):``}),(0,R.jsx)(J,{children:e.serial}),(0,R.jsx)(J,{children:(0,R.jsxs)(Rv,{direction:`row`,spacing:`2`,alignItems:`center`,children:[(0,R.jsx)(IH,{part:e.partName,size:25}),(0,R.jsx)(W,{variant:`body2`,children:e.partName})]})}),(0,R.jsx)(J,{children:e.workorderId}),(0,R.jsx)(J,{children:e.closeout_completed===null||e.closeout_completed===void 0?``:e.closeout_failed?(0,R.jsx)(Sx,{fontSize:`inherit`}):(0,R.jsx)(lx,{fontSize:`inherit`})}),(0,R.jsx)(J,{children:e.closeout_completed?Qoe.format(e.closeout_completed):``}),(0,R.jsx)(J,{padding:`checkbox`,children:e.serial!==null&&e.serial!==``?(0,R.jsx)(zl,{onClick:()=>{e.serial&&t({type:`ManuallyEnteredSerial`,serial:e.serial})},size:`large`,children:(0,R.jsx)(Hx,{fontSize:`inherit`})}):void 0})]})});function ese({day:e}){let t=Q(kL),n=(0,L.useMemo)(()=>{let n=VC(e,1),r=[];for(let i of t.matsById.values())i.completed_last_proc_machining===!0&&i.last_unload_time&&i.last_unload_time>=e&&i.last_unload_time<n&&r.push(i);return r},[t,e]),[r,i]=(0,L.useState)(T9.CompletedTime),[a,o]=(0,L.useState)(`asc`),s=(0,L.useMemo)(()=>Yoe(n,r,a),[n,r,a]);return(0,R.jsxs)(Ty,{stickyHeader:!0,children:[(0,R.jsx)(Jy,{children:(0,R.jsx)(Xoe,{sortBy:r,setSortBy:i,sortOrder:a,setSortOrder:o})}),(0,R.jsx)(My,{children:s.map(e=>(0,R.jsx)($oe,{mat:e},e.materialID))})]})}function tse(){fL(`Close Out`);let[e,t]=(0,L.useState)(fw());return(0,R.jsxs)(G,{padding:`24px`,children:[(0,R.jsx)(G,{component:`nav`,display:`flex`,justifyContent:`center`,children:(0,R.jsx)(Joe,{day:e,setDay:t})}),(0,R.jsx)(`main`,{children:(0,R.jsx)(ese,{day:e})}),(0,R.jsx)(H1,{}),(0,R.jsx)(Koe,{})]})}var E9=function(e){return e[e.BookingId=0]=`BookingId`,e[e.Part=1]=`Part`,e[e.Quantity=2]=`Quantity`,e[e.RequestTime=3]=`RequestTime`,e[e.Priority=4]=`Priority`,e[e.Workorder=5]=`Workorder`,e[e.Canceled=6]=`Canceled`,e[e.Job=7]=`Job`,e[e.SchTime=8]=`SchTime`,e}(E9||{}),D9=Z(!1),O9=Z(!1),k9=Z(!1),A9=[{id:E9.BookingId,numeric:!1,label:`ID`,getDisplay:e=>e.bookingId,Cell:({row:e})=>e.canceled?(0,R.jsx)(W,{sx:{textDecoration:`line-through`,fontSize:`inherit`},children:e.bookingId}):e.bookingId},{id:E9.Part,numeric:!1,label:`Part`,getDisplay:e=>e.partName,Cell:({row:e})=>(0,R.jsxs)(Rv,{direction:`row`,spacing:1,alignItems:`center`,children:[(0,R.jsx)(IH,{part:e.partName,size:25}),e.partName]})},{id:E9.Quantity,numeric:!0,label:`Quantity`,getDisplay:e=>e.quantity.toString(),getForSort:e=>e.quantity},{id:E9.RequestTime,numeric:!1,label:`Request Time`,getDisplay:e=>e.timeUTC.toLocaleString(),getForSort:e=>e.timeUTC.getTime()},{id:E9.Priority,numeric:!1,label:`Priority`,getDisplay:e=>e.priority?e.priority.toString():``,getForSort:e=>e.priority??0},{id:E9.Workorder,numeric:!1,label:`Workorder`,getDisplay:e=>e.workorder??``},{id:E9.Canceled,numeric:!1,label:`Canceled`,getDisplay:e=>e.canceled?.toLocaleString()??``,getForSort:e=>e.canceled?.getTime()??0,openFilterDialog:D9},{id:E9.Job,numeric:!1,label:`Scheduled Job`,getDisplay:e=>e.job??``,openFilterDialog:D9},{id:E9.SchTime,numeric:!1,label:`Scheduled Time`,getDisplay:e=>e.schTime?e.schTime.toLocaleString():``,getForSort:e=>e.schTime?e.schTime.getTime():0}],nse=(0,L.memo)(function({setRebookingToShow:e}){let t=e1(E9.RequestTime,A9,`desc`),n=$$(),r=Q(sR),i=Q(Tne),a=Q(Ene),o=Q(O9),s=Q(k9),c=(0,L.useMemo)(()=>r.adjust(a,(e,t)=>e?{...e,job:t?.jobUnique,schTime:t?.scheduledTime}:void 0).adjust(i,(e,t)=>e?{...e,canceled:t}:void 0).valuesToAscLazySeq().transform(e=>o?e.filter(e=>!e.job):e).transform(e=>s?e.filter(e=>!e.canceled):e).toSortedArray(t.sortOn),[t.sortOn,r,i,a,o,s]);return(0,R.jsxs)(`div`,{children:[(0,R.jsxs)(Ty,{children:[(0,R.jsx)(G$,{columns:A9,sort:t,showDetailsCol:!0,copyToClipboardRows:c}),(0,R.jsx)(Z$,{columns:A9,pageData:c,rowsPerPage:n.rowsPerPage,onClickDetails:(t,n)=>e(n)})]}),(0,R.jsx)(X$,{tpage:n,count:c.length})]})}),j9=new Intl.DateTimeFormat(void 0,{year:`numeric`,month:`short`,day:`numeric`,hour:`numeric`,minute:`numeric`}),rse=(0,L.memo)(function({rebooking:e,close:t}){let[n,r]=Ane();function i(){e&&n(e.bookingId).then(()=>t(void 0)).catch(console.log)}return(0,R.jsxs)(lh,{open:e!==void 0,onClose:()=>t(void 0),children:[(0,R.jsx)(fh,{children:e?.canceled?(0,R.jsx)(W,{sx:{textDecoration:`line-through`},children:e?.bookingId}):e?.bookingId}),(0,R.jsx)(dh,{children:(0,R.jsxs)(Rv,{direction:`column`,spacing:1,children:[e?.canceled&&(0,R.jsxs)(W,{variant:`h5`,children:[`Canceled at `,j9.format(e.canceled)]}),(0,R.jsxs)(Rv,{direction:`row`,spacing:1,children:[(0,R.jsx)(`span`,{children:`Part:`}),e?.partName&&(0,R.jsx)(IH,{part:e?.partName,size:25}),(0,R.jsx)(`span`,{children:e?.partName})]}),(0,R.jsxs)(W,{children:[`Quantity: `,e?.quantity]}),(0,R.jsxs)(W,{children:[`Request Time: `,j9.format(e?.timeUTC)]}),(0,R.jsxs)(W,{children:[`Priority: `,e?.priority]}),e?.workorder&&(0,R.jsxs)(W,{children:[`Workorder: `,e?.workorder]}),(0,R.jsxs)(W,{children:[`Note: `,e?.notes]}),e?.job&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(mh,{}),(0,R.jsxs)(W,{children:[`Scheduled Job: `,e?.job]}),(0,R.jsxs)(W,{children:[`Scheduled Time: `,e?.schTime?.toLocaleString()]})]})]})}),(0,R.jsxs)(uh,{children:[!e?.canceled&&!e?.job&&(0,R.jsxs)(K,{onClick:i,color:`secondary`,disabled:r,children:[r?(0,R.jsx)(Nl,{size:24}):void 0,`Cancel Rebooking Request`]}),(0,R.jsx)(K,{onClick:()=>t(void 0),children:`Close`})]})]})}),ise=Z(e=>X.ofObject(e(GO).jobs).map(([e,t])=>t.partName).concat(e(JE).valuesToLazySeq().map(e=>e.partName)).distinctAndSortBy(e=>e).toRArray()),ase=(0,L.memo)(function(){let[e,t]=(0,L.useState)(!1),[n,r]=(0,L.useState)({part:``}),i=Q(ise),[a,o]=jne(),s=n.part!==``&&!!n.qty&&!isNaN(n.qty);function c(){t(!1),r({part:``})}function l(){s&&a(n).then(c).catch(console.log)}return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(lh,{open:e,onClose:c,children:[(0,R.jsx)(fh,{children:`Create New`}),(0,R.jsx)(dh,{children:(0,R.jsxs)(Rv,{direction:`column`,spacing:2,sx:{mt:`0.5em`,minWidth:`25em`},children:[(0,R.jsx)(yp,{freeSolo:!0,selectOnFocus:!0,clearOnBlur:!0,handleHomeEndKeys:!0,disableClearable:!0,options:i,value:n.part,onChange:(e,t)=>r(e=>({...e,part:t})),renderInput:e=>(0,R.jsx)(Bb,{...e,label:`Part Name`,slotProps:{input:{...e.InputProps,startAdornment:(0,R.jsxs)(R.Fragment,{children:[n.part===``?void 0:(0,R.jsx)(ig,{position:`start`,children:(0,R.jsx)(IH,{part:n.part,size:25})}),e.InputProps.startAdornment]})}}}),renderOption:(e,t)=>(0,R.jsx)(`li`,{...e,children:(0,R.jsxs)(Rv,{direction:`row`,spacing:`1`,alignItems:`center`,children:[(0,R.jsx)(IH,{part:t,size:25}),t]})}),filterOptions:(e,t)=>{let n=e.filter(e=>e.toLowerCase().includes(t.inputValue.toLowerCase()));return n.length===0&&t.inputValue!==``?[t.inputValue]:n}}),(0,R.jsx)(Bb,{label:`Quantity`,type:`number`,value:n.qty&&!isNaN(n.qty)?n.qty:``,onChange:e=>r(t=>({...t,qty:parseInt(e.target.value)}))}),(0,R.jsx)(Bb,{label:`Priority (optional)`,type:`number`,value:n.priority&&!isNaN(n.priority)?n.priority:``,onChange:e=>r(t=>({...t,priority:parseInt(e.target.value)}))}),(0,R.jsx)(Bb,{label:`Workorder (optional)`,value:n.workorder??``,onChange:e=>r(t=>({...t,workorder:e.target.value}))}),(0,R.jsx)(Bb,{label:`Notes (optional)`,multiline:!0,minRows:2,value:n.notes??``,onChange:e=>r(t=>({...t,notes:e.target.value}))})]})}),(0,R.jsxs)(uh,{children:[(0,R.jsxs)(K,{color:`secondary`,onClick:l,disabled:!s||o,children:[o?(0,R.jsx)(Nl,{size:24}):void 0,`Create`]}),(0,R.jsx)(K,{onClick:c,children:`Cancel`})]})]}),(0,R.jsx)(q,{title:`Add Rebooking`,children:(0,R.jsx)(gh,{onClick:()=>t(!0),sx:{position:`fixed`,bottom:`24px`,right:`24px`},color:`primary`,children:(0,R.jsx)(Qb,{})})})]})}),ose=(0,L.memo)(function(){let[e,t]=GE(D9),[n,r]=GE(O9),[i,a]=GE(k9);return(0,R.jsxs)(lh,{open:e,onClose:()=>t(!1),children:[(0,R.jsx)(fh,{children:`Filter`}),(0,R.jsx)(dh,{children:(0,R.jsxs)(Rv,{direction:`column`,spacing:2,children:[(0,R.jsx)(Eh,{control:(0,R.jsx)(_m,{checked:n,onChange:e=>r(e.target.checked)}),label:`Hide scheduled`}),(0,R.jsx)(Eh,{control:(0,R.jsx)(_m,{checked:i,onChange:e=>a(e.target.checked)}),label:`Hide canceled`})]})}),(0,R.jsx)(uh,{children:(0,R.jsx)(K,{onClick:()=>t(!1),children:`Close`})})]})});function sse(){fL(Q(CO).supportsRebookings??`Rebookings`);let[e,t]=(0,L.useState)(void 0);return(0,R.jsxs)(G,{component:`main`,sx:{padding:`24px`},children:[(0,R.jsx)(nse,{setRebookingToShow:t}),(0,R.jsx)(rse,{rebooking:e,close:t}),(0,R.jsx)(ase,{}),(0,R.jsx)(ose,{})]})}var M9=Z(Math.floor(Date.now()/6e4));M9.onMount=e=>{let t=setInterval(()=>{e(Math.floor(Date.now()/6e4))},6e4);return()=>clearInterval(t)};var N9=jO(`charts_last30WeekdayStartIdx`,0),P9=jO(`charts_last30WeekdayStartMinuteOffset`,360),F9=KE(e=>Z(t=>{let n=t(N9),r=t(P9),i=new Date(t(M9)*6e4),a=QC(XC(i),r),o=QC(qC(i,{weekStartsOn:n}),r);switch(e){case`StartOfToday`:return a;case`StartOfYesterday`:return VC(a,-1);case`StartOfWeek`:return o;case`StartOfLastWeek`:return VC(o,-7);case`Last30`:return VC(i,-30)}})),I9=KE(e=>Z(t=>{if(e===`Now`)return null;let n=t(N9),r=t(P9),i=new Date(t(M9)*6e4);switch(e){case`EndOfYesterday`:return QC(XC(i),r);case`EndOfLastWeek`:return QC(qC(i,{weekStartsOn:n}),r)}}));function cse(e){let t=jO(`charts_${e}_start`,`StartOfWeek`),n=jO(`charts_${e}_end`,`Now`);return Z(e=>{let r=e(t),i=e(n);return{startType:r,endType:i,startDate:r instanceof Date?r:e(F9(r)),endDate:i instanceof Date?i:e(I9(i))}},(e,r,i)=>{`start`in i&&r(t,i.start),`end`in i&&r(n,i.end)})}function lse(e){return e.closeout_completed===void 0?!!(X.ofObject(e.completedInspections??{}).some(([,e])=>e.success===!1)||e.currently_quarantined):e.closeout_failed!==!1}var L9=cse(`part-summary`),use=Z(e=>{let t=e(kL),n=e(Sk),r=e(L9),i=n.valuesToLazySeq().filter(e=>(r.startDate===null||e.endTime>=r.startDate)&&(r.endDate===null||e.endTime<=r.endDate)).toLookupOrderedMap(e=>e.part,e=>e.stationGroup,e=>({isLoadUnload:e.isLabor,elapsed:e.elapsedMinsPerMaterial*e.material.length,active:e.activeMinutes,medianElapsed:e.medianCycleMinutes}),(e,t)=>({isLoadUnload:e.isLoadUnload||t.isLoadUnload,elapsed:e.elapsed+t.elapsed,active:e.active+t.active,medianElapsed:e.medianElapsed+t.medianElapsed}));return t.matsById.valuesToLazySeq().filter(e=>!!(e.numProcesses&&e.unloaded_processes?.[e.numProcesses]&&(r.startDate===null||e.unloaded_processes[e.numProcesses]>=r.startDate)&&(r.endDate===null||e.unloaded_processes[e.numProcesses]<=r.endDate))).toOrderedLookup(e=>e.partName).mapValues((e,t)=>({part:t,completedQty:e.length,abnormalQty:X.of(e).sumBy(e=>lse(e)?1:0),mats:e,stationMins:XT.empty(),workorders:X.of(e).toOrderedSet(e=>e.workorderId??``).delete(``)})).adjust(i,(e,t,n)=>e?{...e,stationMins:t}:{part:n,completedQty:0,abnormalQty:0,mats:[],stationMins:t,workorders:JT.empty()}).valuesToAscLazySeq().toRArray()});function R9({label:e,date:t}){return(0,R.jsxs)(G,{children:[(0,R.jsx)(W,{children:e}),t?(0,R.jsxs)(W,{variant:`subtitle2`,children:[`(`,t.toLocaleString(),`)`]}):void 0]})}function z9({date:e,setDate:t,enabled:n}){let r=Q(F9(`Last30`));return(0,R.jsx)(Bb,{type:`datetime-local`,value:e?new Date(e.getTime()-e.getTimezoneOffset()*6e4).toISOString().slice(0,16):``,onChange:e=>t(new Date(e.target.value)),disabled:!n,label:`Custom Date`,slotProps:{inputLabel:{shrink:!0},htmlInput:{min:new Date(r.getTime()-r.getTimezoneOffset()*6e4).toISOString().slice(0,16)}}})}function dse({chartAtom:e}){let[t,n]=GE(e),r=Q(P9),[i,a]=(0,L.useState)(t.startType instanceof Date?t.startType:QC(fw(),r));function o(e){n(e===`CustomDate`?{start:i??new Date}:{start:e})}function s(e){a(e),n({start:e})}let c=Q(F9(`StartOfToday`)),l=Q(F9(`StartOfYesterday`)),u=Q(F9(`StartOfWeek`)),d=Q(F9(`StartOfLastWeek`)),f=Q(F9(`Last30`));return(0,R.jsxs)(G,{children:[(0,R.jsx)(W,{variant:`h6`,children:`Range Start`}),(0,R.jsx)(hv,{value:t.startType instanceof Date?`CustomDate`:t.startType,onChange:e=>o(e.target.value),children:(0,R.jsxs)(Rv,{direction:`column`,spacing:2,children:[(0,R.jsxs)(Rv,{direction:`row`,alignItems:`center`,sx:{minHeight:`3em`},children:[(0,R.jsx)(mv,{value:`StartOfToday`}),(0,R.jsx)(R9,{label:`Start of Today`,date:c})]}),(0,R.jsxs)(Rv,{direction:`row`,alignItems:`center`,sx:{minHeight:`3em`},children:[(0,R.jsx)(mv,{value:`StartOfYesterday`}),(0,R.jsx)(R9,{label:`Start of Yesterday`,date:l})]}),(0,R.jsxs)(Rv,{direction:`row`,alignItems:`center`,sx:{minHeight:`3em`},children:[(0,R.jsx)(mv,{value:`StartOfWeek`}),(0,R.jsx)(R9,{label:`Start of This Week`,date:u})]}),(0,R.jsxs)(Rv,{direction:`row`,alignItems:`center`,sx:{minHeight:`3em`},children:[(0,R.jsx)(mv,{value:`StartOfLastWeek`}),(0,R.jsx)(R9,{label:`Start of Last Week`,date:d})]}),(0,R.jsxs)(Rv,{direction:`row`,alignItems:`center`,sx:{minHeight:`3em`},children:[(0,R.jsx)(mv,{value:`Last30`}),(0,R.jsx)(R9,{label:`Last 30 Days`,date:f})]}),(0,R.jsxs)(Rv,{direction:`row`,alignItems:`center`,sx:{minHeight:`3em`},children:[(0,R.jsx)(mv,{value:`CustomDate`}),(0,R.jsx)(z9,{enabled:t.startType instanceof Date,date:i,setDate:s})]})]})})]})}function fse({chartAtom:e}){let[t,n]=GE(e),r=Q(P9),[i,a]=(0,L.useState)(t.endType instanceof Date?t.endType:QC(fw(),r));function o(e){n(e===`CustomDate`?{end:i??new Date}:{end:e})}function s(e){a(e),n({end:e})}let c=Q(I9(`EndOfYesterday`)),l=Q(I9(`EndOfLastWeek`));return(0,R.jsxs)(G,{children:[(0,R.jsx)(W,{variant:`h6`,children:`Range End`}),(0,R.jsx)(hv,{value:t.endType instanceof Date?`CustomDate`:t.endType,onChange:e=>o(e.target.value),children:(0,R.jsxs)(Rv,{direction:`column`,spacing:2,children:[(0,R.jsxs)(Rv,{direction:`row`,alignItems:`center`,sx:{minHeight:`3em`},children:[(0,R.jsx)(mv,{value:`Now`}),(0,R.jsx)(W,{children:`Now`})]}),(0,R.jsxs)(Rv,{direction:`row`,alignItems:`center`,sx:{minHeight:`3em`},children:[(0,R.jsx)(mv,{value:`EndOfYesterday`}),(0,R.jsx)(R9,{label:`End of Yesterday`,date:c})]}),(0,R.jsx)(G,{sx:{height:`3em`}}),(0,R.jsxs)(Rv,{direction:`row`,alignItems:`center`,sx:{minHeight:`3em`},children:[(0,R.jsx)(mv,{value:`EndOfLastWeek`}),(0,R.jsx)(R9,{label:`End of Last Week`,date:l})]}),(0,R.jsx)(G,{sx:{height:`3em`}}),(0,R.jsxs)(Rv,{direction:`row`,alignItems:`center`,sx:{minHeight:`3em`},children:[(0,R.jsx)(mv,{value:`CustomDate`}),(0,R.jsx)(z9,{enabled:t.endType instanceof Date,date:i,setDate:s})]})]})})]})}function pse(e){let t=Math.floor(e/60),n=e%60;return`${t.toString().padStart(2,`0`)}:${n.toString().padStart(2,`0`)}`}function B9({chartAtom:e,open:t,setOpen:n}){let[r,i]=GE(N9),[a,o]=GE(P9);return(0,R.jsxs)(lh,{open:t,onClose:()=>n(!1),maxWidth:`md`,children:[(0,R.jsx)(dh,{children:(0,R.jsxs)(Rv,{direction:`column`,spacing:2,divider:(0,R.jsx)(mh,{orientation:`horizontal`,flexItem:!0}),children:[(0,R.jsxs)(Rv,{direction:`row`,spacing:2,divider:(0,R.jsx)(mh,{orientation:`vertical`,flexItem:!0}),children:[(0,R.jsx)(dse,{chartAtom:e}),(0,R.jsx)(fse,{chartAtom:e})]}),(0,R.jsxs)(Rv,{direction:`row`,justifyContent:`space-around`,children:[(0,R.jsxs)(Bb,{select:!0,label:`First Day Of Week`,sx:{minWidth:`10em`},value:r,onChange:e=>i(parseInt(e.target.value)),children:[(0,R.jsx)(I_,{value:0,children:`Sunday`}),(0,R.jsx)(I_,{value:1,children:`Monday`}),(0,R.jsx)(I_,{value:2,children:`Tuesday`}),(0,R.jsx)(I_,{value:3,children:`Wednesday`}),(0,R.jsx)(I_,{value:4,children:`Thursday`}),(0,R.jsx)(I_,{value:5,children:`Friday`}),(0,R.jsx)(I_,{value:6,children:`Saturday`})]}),(0,R.jsx)(Bb,{type:`time`,label:`Day Start Time`,sx:{minWidth:`10em`},value:pse(a),onChange:e=>{let t=e.target.value;if(t===``)o(0);else{let[e,n]=t.split(`:`).map(Number);o(e*60+n)}}})]})]})}),(0,R.jsx)(uh,{children:(0,R.jsx)(K,{onClick:()=>n(!1),children:`Close`})})]})}function mse(e,t){if(e instanceof Date)return e.toLocaleString();switch(e){case`StartOfToday`:return`Start of Today${t?` (${t.toLocaleString()})`:``}`;case`StartOfYesterday`:return`Start of Yesterday${t?` (${t.toLocaleString()})`:``}`;case`StartOfWeek`:return`Start of This Week${t?` (${t.toLocaleString()})`:``}`;case`StartOfLastWeek`:return`Start of Last Week${t?` (${t.toLocaleString()})`:``}`;case`Last30`:return`Last 30 Days${t?` (${t.toLocaleString()})`:``}`}}function hse(e,t){if(e instanceof Date)return e.toLocaleString();switch(e){case`Now`:return`Now`;case`EndOfYesterday`:return`End of Yesterday${t?` (${t.toLocaleString()})`:``}`;case`EndOfLastWeek`:return`End of Last Week${t?` (${t.toLocaleString()})`:``}`}}var gse=(0,L.memo)(function({chartAtom:e}){let t=Q(e),[n,r]=(0,L.useState)(!1);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(Rv,{direction:`row`,spacing:2,alignItems:`center`,children:[(0,R.jsxs)(W,{variant:`body2`,color:`textSecondary`,children:[`Range: `,mse(t.startType,t.startDate),` -`,` `,hse(t.endType,t.endDate)]}),(0,R.jsx)(q,{title:`Edit Range`,children:(0,R.jsx)(zl,{onClick:()=>r(!0),children:(0,R.jsx)(bx,{})})})]}),(0,R.jsx)(B9,{open:n,setOpen:r,chartAtom:e})]})}),V9=new Intl.NumberFormat(void 0,{maximumFractionDigits:1}),_se=6;function vse(e,t,n){let r;switch(t){case`PartName`:r=e=>e.part;break;case`CompletedQty`:r=e=>e.completedQty;break;case`AbnormalQty`:r=e=>e.abnormalQty;break;case`Workorders`:r=e=>e.workorders.lookupMin()?.[0]??null;break;case`Elapsed`:r=e=>e.stationMins.toAscLazySeq().filter(([e,t])=>!t.isLoadUnload).sumBy(([,e])=>e.elapsed);break;case`Active`:r=e=>e.stationMins.toAscLazySeq().filter(([e,t])=>!t.isLoadUnload).sumBy(([e,t])=>t.active);break;case`Median`:r=e=>e.stationMins.toAscLazySeq().filter(([e,t])=>!t.isLoadUnload).sumBy(([e,t])=>t.medianElapsed);break}let i=[...e];return i.sort(Iw(n===`asc`?{asc:r}:{desc:r})),i}var yse=new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`});function bse(e,t,n){let r;switch(t){case`Serial`:r=e=>e.serial??null;break;case`CompletedDate`:r=e=>e.last_unload_time??null;break;case`Workorder`:r=e=>e.workorderId??null;break;case`Quarantined`:r=e=>e.currently_quarantined??null;break;case`InspectFailed`:r=e=>X.ofObject(e.completedInspections??{}).some(([,e])=>e.success===!1)?-1:0;break;case`CloseOut`:r=e=>e.closeout_failed===void 0?1:e.closeout_failed===!0?-1:0;break}let i=[...e];return i.sort(Iw(n===`asc`?{asc:r}:{desc:r})),i}function H9(e){return(0,R.jsxs)(J,{align:e.align,sortDirection:e.sortBy===e.col?e.order:!1,sx:e.noWhitespaceWrap?{whiteSpace:`nowrap`}:void 0,children:[(0,R.jsx)(q,{title:`Sort`,enterDelay:300,children:(0,R.jsx)(pb,{active:e.sortBy===e.col,direction:e.order,onClick:()=>{e.col===e.sortBy?e.setOrder(e.order===`asc`?`desc`:`asc`):(e.setSortBy(e.col),e.setOrder(`asc`))},children:e.children})}),e.extraIcon]})}var U9=(0,L.memo)(function({workorderId:e}){return!e||e===``?(0,R.jsx)(`span`,{}):(0,R.jsx)(Ite,{to:{route:$.Operations_CurrentWorkorders,workorder:e},children:e})});function xse({material:e}){let t=WE(II),[n,r]=(0,L.useState)(`Serial`),[i,a]=(0,L.useState)(`asc`),o=(0,L.useMemo)(()=>bse(e,n,i),[e,n,i]),s={sortBy:n,setSortBy:r,order:i,setOrder:a},[c,l]=(0,L.useState)(10),[u,d]=(0,L.useState)(0),f=o.slice(u*c,(u+1)*c);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(Ty,{size:`small`,children:[(0,R.jsx)(Jy,{children:(0,R.jsxs)(ob,{children:[(0,R.jsx)(H9,{col:`Serial`,...s,children:`Serial`}),(0,R.jsx)(H9,{col:`CompletedDate`,...s,children:`Completed`}),(0,R.jsx)(H9,{col:`Workorder`,...s,children:`Workorder`}),(0,R.jsx)(H9,{col:`Quarantined`,...s,children:`Quarantine?`}),(0,R.jsx)(H9,{col:`InspectFailed`,noWhitespaceWrap:!0,...s,children:`Inspect Failed?`}),(0,R.jsx)(H9,{col:`CloseOut`,noWhitespaceWrap:!0,...s,children:`Close Out`}),(0,R.jsx)(J,{padding:`checkbox`})]})}),(0,R.jsxs)(My,{children:[f.map(e=>(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{children:e.serial??``}),(0,R.jsx)(J,{children:e.last_unload_time?yse.format(e.last_unload_time):``}),(0,R.jsx)(J,{children:(0,R.jsx)(U9,{workorderId:e.workorderId})}),(0,R.jsx)(J,{sx:{textAlign:`center`},padding:`checkbox`,children:e.currently_quarantined?(0,R.jsx)(Yx,{fontSize:`inherit`}):``}),(0,R.jsx)(J,{sx:{textAlign:`center`},padding:`checkbox`,children:X.ofObject(e.completedInspections??{}).some(([,e])=>e.success===!1)?(0,R.jsx)(Sx,{fontSize:`inherit`}):``}),(0,R.jsx)(J,{sx:{textAlign:`center`},padding:`checkbox`,children:e.closeout_completed===void 0?``:e.closeout_failed===!1?(0,R.jsx)(lx,{fontSize:`inherit`}):(0,R.jsx)(Sx,{fontSize:`inherit`})}),(0,R.jsx)(J,{padding:`checkbox`,children:(0,R.jsx)(zl,{onClick:()=>t({type:`MatSummary`,summary:e}),size:`large`,children:(0,R.jsx)(Hx,{fontSize:`inherit`})})})]},e.materialID)),X.ofRange(0,c-f.length).map(e=>(0,R.jsx)(ob,{children:(0,R.jsx)(J,{colSpan:7,children:`\xA0`})},e))]})]}),(0,R.jsxs)(Qy,{variant:`dense`,sx:{mb:`0.5em`},children:[(0,R.jsx)(W,{color:`textSecondary`,variant:`caption`,children:`Rows per page:`}),(0,R.jsx)(bv,{style:{marginLeft:8,marginRight:`1em`},value:c,SelectDisplayProps:{style:{color:`rgba(0, 0, 0, 0.54)`}},input:(0,R.jsx)(Yf,{}),onChange:t=>{let n=t.target.value;l(n);let r=Math.ceil(e.length/n)-1;u>r&&d(r)},children:[10,15,20,50].map(e=>(0,R.jsx)(I_,{value:e,children:e},e))}),(0,R.jsx)(W,{color:`textSecondary`,variant:`caption`,children:`${e.length===0?0:u*c+1}-${Math.min(e.length,(u+1)*c)} of ${e.length}`}),(0,R.jsx)(zl,{onClick:()=>d(0),disabled:u===0,"aria-label":`First Page`,size:`large`,children:(0,R.jsx)(Dx,{})}),(0,R.jsx)(zl,{onClick:()=>d(u-1),disabled:u===0,"aria-label":`Previous Page`,size:`large`,children:(0,R.jsx)(Ix,{})}),(0,R.jsx)(zl,{onClick:()=>d(u+1),disabled:u>=Math.ceil(e.length/c)-1,"aria-label":`Next Page`,size:`large`,children:(0,R.jsx)(Lx,{})}),(0,R.jsx)(zl,{onClick:()=>d(Math.max(0,Math.ceil(e.length/c)-1)),disabled:u>=Math.ceil(e.length/c)-1,"aria-label":`Last Page`,size:`large`,children:(0,R.jsx)(zx,{})})]})]})}var Sse=(0,L.memo)(function({part:e}){return(0,R.jsxs)(Rv,{direction:`row`,flexWrap:`wrap`,justifyContent:`space-around`,ml:`1em`,mr:`1em`,children:[(0,R.jsx)(G,{sx:{width:`60em`,overflow:`auto`},children:(0,R.jsx)(xse,{material:e.mats})}),(0,R.jsx)(G,{sx:{width:`40em`,overflow:`auto`},children:(0,R.jsxs)(Ty,{size:`small`,children:[(0,R.jsx)(Jy,{children:(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{children:`Station`}),(0,R.jsx)(J,{children:`Active Hours`}),(0,R.jsx)(J,{children:`Elapsed Hours`}),(0,R.jsx)(J,{children:`Total Median Hours`})]})}),(0,R.jsx)(My,{children:e.stationMins.toAscLazySeq().map(([e,t])=>(0,R.jsxs)(ob,{children:[(0,R.jsx)(J,{children:e}),(0,R.jsx)(J,{children:V9.format(t.active/60)}),(0,R.jsx)(J,{children:V9.format(t.elapsed/60)}),(0,R.jsx)(J,{children:V9.format(t.medianElapsed/60)})]},e))})]})})]})}),Cse=H(ob)({"& > *":{borderBottom:`unset !important`}}),wse=(0,L.memo)(function({part:e}){let[t,n]=(0,L.useState)(!1);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(Cse,{children:[(0,R.jsx)(J,{children:(0,R.jsxs)(G,{sx:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(G,{sx:{mr:`0.2em`},children:(0,R.jsx)(IH,{part:e.part,size:25})}),(0,R.jsx)(`div`,{children:(0,R.jsx)(W,{variant:`body2`,component:`span`,display:`block`,children:e.part})})]})}),(0,R.jsx)(J,{align:`right`,children:e.completedQty}),(0,R.jsx)(J,{align:`right`,children:e.abnormalQty}),(0,R.jsx)(J,{align:`right`,children:V9.format(e.stationMins.toAscLazySeq().filter(([e,t])=>!t.isLoadUnload).sumBy(([e,t])=>t.active)/60)}),(0,R.jsx)(J,{align:`right`,children:V9.format(e.stationMins.toAscLazySeq().filter(([e,t])=>!t.isLoadUnload).sumBy(([,e])=>e.elapsed)/60)}),(0,R.jsx)(J,{align:`right`,children:V9.format(e.stationMins.toAscLazySeq().filter(([e,t])=>!t.isLoadUnload).sumBy(([,e])=>e.medianElapsed)/60)}),(0,R.jsx)(J,{align:`left`,children:e.workorders.size<=1?(0,R.jsx)(U9,{workorderId:e.workorders.lookupMin()??null}):e.workorders.size===2?(0,R.jsxs)(`span`,{children:[(0,R.jsx)(U9,{workorderId:e.workorders.lookupMin()}),` &`,` `,(0,R.jsx)(U9,{workorderId:e.workorders.lookupMax()})]}):`${e.workorders.size} workorders`}),(0,R.jsx)(J,{children:(0,R.jsx)(q,{title:`Show Details`,children:(0,R.jsx)(zl,{size:`small`,onClick:()=>n(!t),children:t?(0,R.jsx)(Rx,{}):(0,R.jsx)(Fx,{})})})})]}),(0,R.jsx)(ob,{children:(0,R.jsx)(J,{sx:{pb:`0`,pt:`0`},colSpan:_se+1,children:(0,R.jsx)(Ac,{in:t,timeout:`auto`,unmountOnExit:!0,children:(0,R.jsx)(Sse,{part:e})})})})]})});function Tse({partsAtom:e}){let t=Q(e);return(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(zl,{style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,onClick:()=>Nse(t),children:(0,R.jsx)(Mx,{})})})}function Ese(){return(0,R.jsx)(q,{title:`Total Median Hours are calculated by taking the median cycle time (excluding outliers) and adding up for each piece of material.`,children:(0,R.jsx)(`span`,{style:{verticalAlign:`middle`,marginLeft:`0.5em`,fontSize:16},children:(0,R.jsx)(kx,{fontSize:`inherit`})})})}function W9(){return(0,R.jsx)(q,{title:`The entire cycle time is credited at the time the cycle completes, so it may be that a day has more than 24 hours of credited time for example.`,children:(0,R.jsx)(`span`,{style:{verticalAlign:`middle`,marginLeft:`0.5em`,fontSize:16},children:(0,R.jsx)(kx,{fontSize:`inherit`})})})}function Dse(){return(0,R.jsx)(q,{title:`An abnormal part is one which was quarantined, had a failed inspection, or was explicitly marked as failing closeout. A successful closeout overrides this and will never be an abnormal part.`,children:(0,R.jsx)(`span`,{style:{verticalAlign:`middle`,marginLeft:`0.5em`,fontSize:16},children:(0,R.jsx)(kx,{fontSize:`inherit`})})})}var Ose=(0,L.memo)(function({partsAtom:e,order:t,setOrder:n,sortBy:r,setSortBy:i}){let a={sortBy:r,setSortBy:i,order:t,setOrder:n};return(0,R.jsx)(Jy,{children:(0,R.jsxs)(ob,{children:[(0,R.jsx)(H9,{align:`left`,col:`PartName`,...a,children:`Part`}),(0,R.jsx)(H9,{align:`right`,col:`CompletedQty`,...a,children:`Completed Quantity`}),(0,R.jsx)(H9,{align:`right`,col:`AbnormalQty`,...a,extraIcon:(0,R.jsx)(Dse,{}),children:`Abnormal Quantity`}),(0,R.jsx)(H9,{align:`right`,col:`Active`,...a,extraIcon:(0,R.jsx)(W9,{}),children:`Active Hours`}),(0,R.jsx)(H9,{align:`right`,col:`Elapsed`,...a,extraIcon:(0,R.jsx)(W9,{}),children:`Elapsed Hours`}),(0,R.jsx)(H9,{align:`right`,col:`Median`,...a,extraIcon:(0,R.jsx)(Ese,{}),children:`Total Median Hours`}),(0,R.jsx)(H9,{align:`left`,col:`Workorders`,...a,children:`Workorders`}),(0,R.jsx)(J,{children:(0,R.jsx)(Tse,{partsAtom:e})})]})})}),kse=(0,L.memo)(function({partsAtom:e}){let t=Q(e),[n,r]=(0,L.useState)(`PartName`),[i,a]=(0,L.useState)(`asc`),o=vse(t,n,i);return(0,R.jsxs)(Ty,{stickyHeader:!0,children:[(0,R.jsx)(Ose,{partsAtom:e,sortBy:n,setSortBy:r,order:i,setOrder:a}),(0,R.jsx)(My,{children:o.map(e=>(0,R.jsx)(wse,{part:e},e.part))})]})});function Ase(){let e=WE(L1),t=Q(zI),[n,r]=QI(),i=WE(II);if(t===null||t.materialID<0)return null;function a(e){t!==null&&(n({mat:t,operator:`Manager`,failed:e}),i(null))}return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(K,{color:`primary`,disabled:r,onClick:()=>a(!0),children:`Fail CloseOut`}),(0,R.jsx)(K,{color:`primary`,disabled:r,onClick:()=>a(!1),children:`Pass CloseOut`}),(0,R.jsx)(K,{color:`primary`,onClick:()=>e(!0),children:`Change Workorder`})]})}var jse=(0,L.memo)(function(){return(0,R.jsx)(lU,{buttons:(0,R.jsx)(Ase,{})})});function Mse(){return fL(`Completed Parts`),(0,R.jsxs)(G,{component:`main`,padding:`24px`,children:[(0,R.jsxs)(Rv,{direction:`row`,spacing:2,alignItems:`center`,justifyContent:`space-between`,children:[(0,R.jsx)(`span`,{children:`Completed Parts`}),(0,R.jsx)(gse,{chartAtom:L9})]}),(0,R.jsx)(kse,{partsAtom:use}),(0,R.jsx)(jse,{}),(0,R.jsx)(H1,{})]})}function Nse(e){let t=`<table>
|
|
360
|
+
<thead><tr>`;t+=`<th>Part</th>`,t+=`<th>Completed Qty</th>`,t+=`<th>Abnormal Qty</th>`,t+=`<th>Workorders</th>`,t+=`<th>Active Machine Time (mins)</th>`,t+=`<th>Elapsed Machine Time (mins)</th>`,t+=`<th>Total Median Machine Time (mins)</th>`,t+=`<th>Active L/U Time (mins)</th>`,t+=`<th>Elapsed L/U Time (mins)</th>`,t+=`<th>Total Median L/U Time (mins)</th>`,t+=`</tr></thead>
|
|
361
|
+
<tbody>
|
|
362
|
+
`;for(let n of e){t+=`<tr>`,t+=`<td>${n.part}</td>`,t+=`<td>${n.completedQty}</td>`,t+=`<td>${n.abnormalQty}</td>`,t+=`<td>${n.workorders.toAscLazySeq().toRArray().join(`;`)}</td>`;for(let e of[!1,!0]){let r=n.stationMins.toAscLazySeq().filter(([t,n])=>n.isLoadUnload===e).toRArray();r.length===0?t+=`<td>0</td><td>0</td><td>0</td>`:r.length===1?(t+=`<td>${r[0][1].active}</td>`,t+=`<td>${r[0][1].elapsed}</td>`,t+=`<td>${r[0][1].medianElapsed}</td>`):(t+=`<td>${r.map(([e,t])=>`${e}: ${t.active}`).join(`;`)}</td>`,t+=`<td>${r.map(([e,t])=>`${e}: ${t.elapsed}`).join(`;`)}</td>`,t+=`<td>${r.map(([e,t])=>`${e}: ${t.medianElapsed}`).join(`;`)}</td>`)}t+=`</tr>
|
|
363
|
+
`}t+=`</tbody></table>
|
|
364
|
+
`,(0,Mk.default)(t,{format:`text/html`})}var G9=`bms-operations-reports-tab`,K9=[{separator:`Load/Unload`},{name:`L/U Outliers`,route:{route:$.Operations_LoadOutliers},icon:(0,R.jsx)(nx,{})},{name:`L/U Hours`,route:{route:$.Operations_LoadHours},icon:(0,R.jsx)(jx,{})},{name:`L/U Cycles`,route:{route:$.Operations_LoadCycles},icon:(0,R.jsx)(rS,{})},{separator:`Machines`},{name:`MC Outliers`,route:{route:$.Operations_MachineOutliers},icon:(0,R.jsx)(nx,{})},{name:`MC Hours`,route:{route:$.Operations_MachineHours},icon:(0,R.jsx)(jx,{})},{name:`MC Cycles`,route:{route:$.Operations_MachineCycles},icon:(0,R.jsx)(rS,{})},{name:`Tools`,route:{route:$.Operations_Tools},icon:(0,R.jsx)(_x,{})},{name:`Programs`,route:{route:$.Operations_Programs},icon:(0,R.jsx)(Kx,{})},{separator:`Material`},{name:`Quality`,route:{route:$.Operations_Quality},icon:(0,R.jsx)(rx,{})},{name:`Inspections`,route:{route:$.Operations_Inspections},icon:(0,R.jsx)($b,{})},{name:`Close Out`,route:{route:$.Operations_CloseoutReport},icon:(0,R.jsx)(Wx,{})},{separator:`Cell`},{name:`Schedules`,route:{route:$.Operations_RecentSchedules},icon:(0,R.jsx)(ix,{})},{name:`Workorders`,route:{route:$.Operations_CurrentWorkorders},icon:(0,R.jsx)(Tx,{})},{name:`Production`,route:{route:$.Operations_Production},icon:(0,R.jsx)(ux,{})},{name:`Part Summary`,route:{route:$.Operations_Parts},icon:(0,R.jsx)(nS,{})},{name:e=>e.supportsRebookings??`Rebooking`,route:{route:$.Operations_Rebookings},icon:(0,R.jsx)(Jx,{}),hidden:e=>e.supportsRebookings===null||e.supportsRebookings===``}],q9=[{separator:`Efficiency`},{name:`Buffers`,route:{route:$.Analysis_Buffers},icon:(0,R.jsx)(vx,{})},{name:`Station OEE`,route:{route:$.Analysis_StationOEE},icon:(0,R.jsx)(jx,{})},{name:`Completed Parts`,route:{route:$.Analysis_PartsCompleted},icon:(0,R.jsx)(Tx,{})},{separator:`Cycles`},{name:`Machine Cycles`,route:{route:$.Analysis_MachineCycles},icon:(0,R.jsx)(rS,{})},{name:`L/U Cycles`,route:{route:$.Analysis_LoadCycles},icon:(0,R.jsx)(Zb,{})},{name:`Pallet Cycles`,route:{route:$.Analysis_PalletCycles},icon:(0,R.jsx)(Qx,{})},{separator:`Cell`},{name:`Quality`,route:{route:$.Analysis_Quality},icon:(0,R.jsx)(rx,{})},{name:`Tool Replacements`,route:{route:$.Analysis_ToolReplacements},icon:(0,R.jsx)(_x,{})},{name:`Schedules`,route:{route:$.Analysis_Schedules},icon:(0,R.jsx)(ix,{})},{separator:`Costs`},{name:`Percentages`,route:{route:$.Analysis_CostPercents},icon:(0,R.jsx)(sx,{})},{name:`Cost/Piece`,route:{route:$.Analysis_CostPerPiece},icon:(0,R.jsx)(tx,{})}];function J9({children:e}){let[t,n]=GE(uL),r=Yb(ts().breakpoints.down(`md`)),[,i]=(0,L.useTransition)(),a=K9.some(e=>`separator`in e?!1:e.route.route===t.route);return(0,R.jsx)(Fb,{variant:r&&(!Array.isArray(e)||e.length<5)?`fullWidth`:`scrollable`,value:a?G9:t.route,onChange:(e,t)=>i(()=>{n(t===G9?{route:$.Operations_MachineCycles}:{route:t})}),textColor:`inherit`,scrollButtons:!0,allowScrollButtonsMobile:!0,indicatorColor:`secondary`,children:e})}function Y9(){return(0,R.jsxs)(J9,{children:[(0,R.jsx)(yy,{label:`Operations`,value:$.Operations_Dashboard}),(0,R.jsx)(yy,{label:`Cell`,value:$.Operations_SystemOverview}),(0,R.jsx)(yy,{label:`Material`,value:$.Operations_AllMaterial}),(0,R.jsx)(yy,{label:`Reports`,value:G9})]})}function X9(){return(0,R.jsxs)(J9,{children:[(0,R.jsx)(yy,{label:`Material`,value:$.Quality_Dashboard}),(0,R.jsx)(yy,{label:`Paths`,value:$.Quality_Paths}),(0,R.jsx)(yy,{label:`Quarantine Material`,value:$.Quality_Quarantine})]})}function Z9(){return(0,R.jsxs)(J9,{children:[(0,R.jsx)(yy,{label:`Tools`,value:$.Tools_Dashboard}),(0,R.jsx)(yy,{label:`Programs`,value:$.Tools_Programs})]})}function Q9(){return(0,R.jsxs)(J9,{children:[(0,R.jsx)(yy,{label:`Cycles`,value:$.Engineering_Cycles}),(0,R.jsx)(yy,{label:`Hours`,value:$.Engineering_Hours}),(0,R.jsx)(yy,{label:`Outliers`,value:$.Engineering_Outliers})]})}function $9(){return Q(iR)===null?null:(0,R.jsxs)(J9,{children:[(0,R.jsx)(yy,{label:`Workorders`,value:$.Sales_Dashboard}),(0,R.jsx)(yy,{label:`Projections`,value:$.Sales_ProjectedUsage})]})}var Pse=(0,L.memo)(function(e){Lte();let t=Q(CO),[n,r]=GE(uL),i=t.user!==null&&t.user!==void 0,a,o,s,c,l=!0,u=!0,d=!1,f=!0;if(xO(t)&&!t.user)a=(0,R.jsxs)(`div`,{style:{textAlign:`center`,marginTop:`4em`},children:[(0,R.jsx)(`h3`,{children:`Please Login`}),(0,R.jsx)(K,{variant:`contained`,color:`primary`,onClick:()=>wO(t),children:`Login`})]}),l=!1,u=!1;else switch(n.route){case $.Station_LoadMonitor:a=(0,R.jsx)(W0,{loadNum:n.loadNum,queues:n.queues,completed:n.completed}),o=x4,s=S4,d=!0,f=!1;break;case $.Station_InspectionMonitor:a=(0,R.jsx)(Z0,{focusInspectionType:null}),o=x4,s=S4,d=!0,f=!1;break;case $.Station_InspectionMonitorWithType:a=(0,R.jsx)(Z0,{focusInspectionType:n.inspType}),o=x4,s=S4,d=!0,f=!1;break;case $.Station_Closeout:a=(0,R.jsx)(i2,{}),o=x4,s=S4,d=!0,f=!1;break;case $.Station_Queues:a=(0,R.jsx)(qJ,{queues:n.queues}),o=x4,s=S4,d=!0,f=!1;break;case $.Station_Overview:a=(0,R.jsx)(w0,{}),f=!1;break;case $.Analysis_Quality:a=(0,R.jsx)(m4,{}),o=p7,c=q9,l=!1;break;case $.Analysis_ToolReplacements:a=(0,R.jsx)(ooe,{}),o=p7,c=q9,l=!1;break;case $.Analysis_Schedules:a=(0,R.jsx)(p4,{}),o=p7,c=q9,l=!1;break;case $.Analysis_Buffers:a=(0,R.jsx)(lae,{}),o=p7,c=q9,l=!1;break;case $.Analysis_StationOEE:a=(0,R.jsx)(wae,{}),o=p7,c=q9,l=!1;break;case $.Analysis_PartsCompleted:a=(0,R.jsx)(Oae,{}),o=p7,c=q9,l=!1;break;case $.Analysis_MachineCycles:a=(0,R.jsx)(Iae,{}),o=p7,c=q9,l=!1;break;case $.Analysis_LoadCycles:a=(0,R.jsx)(Wae,{}),o=p7,c=q9,l=!1;break;case $.Analysis_PalletCycles:a=(0,R.jsx)(Yae,{}),o=p7,c=q9,l=!1;break;case $.Analysis_CostPercents:a=(0,R.jsx)(CU,{}),o=p7,c=q9,l=!1;break;case $.Analysis_CostPerPiece:a=(0,R.jsx)(TU,{}),o=p7,c=q9,l=!1;break;case $.Operations_Dashboard:a=(0,R.jsx)(Hte,{}),o=Y9;break;case $.Operations_SystemOverview:a=(0,R.jsx)(w0,{ignoreOperator:!0}),o=Y9,f=!1;break;case $.Operations_AllMaterial:a=(0,R.jsx)(DY,{displaySystemBins:!0}),o=Y9,f=!1;break;case $.Operations_LoadOutliers:a=(0,R.jsx)(f3,{outlierTy:`labor`}),o=Y9,c=K9;break;case $.Operations_LoadHours:a=(0,R.jsx)(q3,{ty:`labor`}),o=Y9,c=K9;break;case $.Operations_LoadCycles:a=(0,R.jsx)(f7,{ty:`labor`}),o=Y9,c=K9;break;case $.Operations_MachineOutliers:a=(0,R.jsx)(f3,{outlierTy:`machine`}),o=Y9,c=K9;break;case $.Operations_MachineHours:a=(0,R.jsx)(q3,{ty:`machine`}),o=Y9,c=K9;break;case $.Operations_MachineCycles:a=(0,R.jsx)(f7,{ty:`machine`}),o=Y9,c=K9;break;case $.Operations_RecentSchedules:a=(0,R.jsx)(nY,{}),o=Y9,c=K9;break;case $.Operations_CurrentWorkorders:a=(0,R.jsx)(C9,{}),o=Y9,c=K9,f=!1;break;case $.Operations_Production:a=(0,R.jsx)(G4,{}),o=Y9,c=K9;break;case $.Operations_Quality:a=(0,R.jsx)(F1,{}),o=Y9,c=K9,f=!1;break;case $.Operations_Inspections:a=(0,R.jsx)(I1,{}),o=Y9,c=K9;break;case $.Operations_CloseoutReport:a=(0,R.jsx)(tse,{}),o=Y9,c=K9,f=!1;break;case $.Operations_Tools:a=(0,R.jsx)(B2,{}),o=Y9,c=K9;break;case $.Operations_Programs:a=(0,R.jsx)(Q2,{}),o=Y9,c=K9;break;case $.Operations_Rebookings:a=(0,R.jsx)(sse,{}),o=Y9,c=K9;break;case $.Operations_Parts:a=(0,R.jsx)(Mse,{}),o=Y9,c=K9,f=!1;break;case $.Engineering_Cycles:a=(0,R.jsx)(f7,{ty:`machine`}),l=!1,o=Q9;break;case $.Engineering_Hours:a=(0,R.jsx)(q3,{ty:`machine`}),l=!1,o=Q9;break;case $.Engineering_Outliers:a=(0,R.jsx)(f3,{outlierTy:`machine`}),l=!1,o=Q9;break;case $.Quality_Dashboard:a=(0,R.jsx)(F1,{}),o=X9,l=!1,f=!1;break;case $.Quality_Paths:a=(0,R.jsx)(I1,{}),o=X9,l=!1;break;case $.Quality_Quarantine:a=(0,R.jsx)(DY,{displaySystemBins:!1}),o=X9,l=!1,f=!1;break;case $.Tools_Dashboard:a=(0,R.jsx)(B2,{}),o=Z9;break;case $.Tools_Programs:a=(0,R.jsx)(Q2,{}),o=Z9;break;case $.Sales_Dashboard:a=(0,R.jsx)(C9,{disableSearch:!0}),o=$9,l=!1;break;case $.Sales_ProjectedUsage:a=(0,R.jsx)(Woe,{}),o=$9,l=!1;break;case $.VerboseLogging:a=(0,R.jsx)(K4,{}),u=!1,l=!1;break;case $.Client_Custom:{let i=e.renderCustomPage?.(n.custom);o=i?.nav,a=i?.page??(0,R.jsx)(DU,{setRoute:r,modes:e.chooseModes?.(t)}),l=!1;break}case $.ChooseMode:default:a=(0,R.jsx)(DU,{setRoute:r,modes:e.chooseModes?.(t)}),u=!1,l=!1}return(0,R.jsxs)(`div`,{id:`App`,children:[(0,R.jsx)(a3,{showAlarms:l,showSearch:u,showLogout:i,showOperator:d,Nav1:o,Nav2:s,menuNavs:c}),(0,R.jsxs)(`div`,{style:{display:`flex`},children:[(0,R.jsx)(o3,{menuItems:c}),(0,R.jsx)(`div`,{style:{flexGrow:1},children:a})]}),f?(0,R.jsx)(lU,{}):void 0,(0,R.jsx)(c4,{}),(0,R.jsx)(uK,{})]})});function Fse(e,t,n){let r=$o({palette:{primary:C,secondary:T}});(0,Xb.createRoot)(t).render((0,R.jsxs)(us,{theme:r,children:[(0,R.jsx)(Tm,{}),(0,R.jsx)(L.StrictMode,{children:(0,R.jsx)(RE,{store:n,children:(0,R.jsx)(Pse,{...e})})})]}))}async function Ise(){kC();let e=NE();e.set(CO,await SO()),Fse(null,document.getElementById(`root`),e)}Ise().catch(e=>{console.log(e);let t=`Error loading Insight`;e instanceof xC&&(t=`Error loading Insight: `+e.message+` `+e.response);let n=document.createElement(`p`);n.textContent=t,(document.getElementById(`loading`)??document.body).appendChild(n)}),`serviceWorker`in navigator&&navigator.serviceWorker.getRegistrations().then(e=>{for(let t of e)t.unregister()});
|