@seedtactics/insight-client 16.6.0 → 16.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/dist/assets/ProgramHighlight-DPTeZ8Si.js +3 -0
  2. package/dist/assets/index-bPAFn3jp.js +364 -0
  3. package/dist/cell-status/basket-cycles.d.ts +21 -0
  4. package/dist/cell-status/basket-cycles.js +80 -0
  5. package/dist/cell-status/current-status.js +11 -3
  6. package/dist/cell-status/estimated-cycle-times.js +8 -4
  7. package/dist/cell-status/inspections.js +2 -2
  8. package/dist/cell-status/loading.js +4 -0
  9. package/dist/cell-status/material-details.d.ts +12 -4
  10. package/dist/cell-status/material-details.js +24 -13
  11. package/dist/cell-status/rebookings.js +15 -17
  12. package/dist/cell-status/scheduled-jobs.d.ts +1 -1
  13. package/dist/cell-status/scheduled-jobs.js +10 -3
  14. package/dist/cell-status/sim-production.js +3 -3
  15. package/dist/cell-status/sim-station-use.d.ts +1 -0
  16. package/dist/cell-status/sim-station-use.js +14 -8
  17. package/dist/cell-status/station-cycles.d.ts +29 -2
  18. package/dist/cell-status/station-cycles.js +81 -11
  19. package/dist/cell-status/tool-replacements.js +1 -1
  20. package/dist/cell-status/tool-usage.js +1 -1
  21. package/dist/components/App.js +101 -66
  22. package/dist/components/BarcodeScanning.js +12 -2
  23. package/dist/components/ErrorsAndLoading.js +10 -1
  24. package/dist/components/LogEntry.d.ts +0 -1
  25. package/dist/components/LogEntry.js +50 -26
  26. package/dist/components/Navigation.js +30 -4
  27. package/dist/components/analysis/AnalysisSelectToolbar.js +5 -1
  28. package/dist/components/analysis/BasketCycleCards.d.ts +1 -0
  29. package/dist/components/analysis/BasketCycleCards.js +145 -0
  30. package/dist/components/analysis/BufferChart.js +10 -4
  31. package/dist/components/analysis/CostPerPiece.js +28 -8
  32. package/dist/components/analysis/CycleChart.js +1 -1
  33. package/dist/components/analysis/DataTable.js +6 -4
  34. package/dist/components/analysis/HeatChart.js +27 -14
  35. package/dist/components/analysis/InspectionSankey.js +17 -6
  36. package/dist/components/analysis/PalletCycleCards.js +15 -4
  37. package/dist/components/analysis/PartCycleCards.js +62 -18
  38. package/dist/components/analysis/StationDataTable.js +14 -11
  39. package/dist/components/analysis/ToolReplacements.js +16 -10
  40. package/dist/components/log-entry-queue-filter.d.ts +2 -0
  41. package/dist/components/log-entry-queue-filter.js +21 -0
  42. package/dist/components/operations/AllMaterial.js +26 -10
  43. package/dist/components/operations/ChartRangeEdit.js +82 -4
  44. package/dist/components/operations/CloseoutReport.js +13 -4
  45. package/dist/components/operations/CompletedParts.js +23 -11
  46. package/dist/components/operations/CurrentWorkorders.js +31 -9
  47. package/dist/components/operations/OEEChart.js +8 -2
  48. package/dist/components/operations/Outliers.js +18 -7
  49. package/dist/components/operations/ProgramHighlight.js +4 -6
  50. package/dist/components/operations/Programs.js +9 -3
  51. package/dist/components/operations/Rebookings.js +8 -4
  52. package/dist/components/operations/RecentCycleChart.js +5 -3
  53. package/dist/components/operations/RecentProduction.js +30 -13
  54. package/dist/components/operations/RecentSchedules.js +6 -2
  55. package/dist/components/operations/RecentStationCycles.js +38 -11
  56. package/dist/components/operations/ShiftSettings.js +3 -3
  57. package/dist/components/operations/SimDayUsage.js +27 -4
  58. package/dist/components/operations/ToolReport.js +5 -1
  59. package/dist/components/operations/WorkorderGantt.js +22 -2
  60. package/dist/components/quality/QualityMaterial.js +11 -8
  61. package/dist/components/quality/RecentFailedInspections.js +3 -1
  62. package/dist/components/routes.d.ts +3 -0
  63. package/dist/components/routes.js +2 -0
  64. package/dist/components/station-monitor/BulkRawMaterial.js +11 -7
  65. package/dist/components/station-monitor/Closeout.js +14 -2
  66. package/dist/components/station-monitor/CustomStationMonitorDialog.js +1 -1
  67. package/dist/components/station-monitor/Inspection.js +23 -11
  68. package/dist/components/station-monitor/InvalidateCycle.js +3 -3
  69. package/dist/components/station-monitor/JobDetails.js +15 -2
  70. package/dist/components/station-monitor/LoadStation.js +274 -31
  71. package/dist/components/station-monitor/Material.js +71 -11
  72. package/dist/components/station-monitor/MoveMaterialArrows.js +4 -4
  73. package/dist/components/station-monitor/QuarantineButton.js +11 -0
  74. package/dist/components/station-monitor/Queues.js +28 -9
  75. package/dist/components/station-monitor/QueuesAddMaterial.js +8 -6
  76. package/dist/components/station-monitor/SelectInspType.js +1 -1
  77. package/dist/components/station-monitor/SelectWorkorder.js +1 -1
  78. package/dist/components/station-monitor/StationToolbar.js +17 -5
  79. package/dist/components/station-monitor/SystemOverview.d.ts +19 -1
  80. package/dist/components/station-monitor/SystemOverview.js +439 -20
  81. package/dist/components/station-monitor/Whiteboard.js +15 -7
  82. package/dist/data/all-material-bins.d.ts +7 -0
  83. package/dist/data/all-material-bins.js +47 -1
  84. package/dist/data/cost-per-piece.js +11 -8
  85. package/dist/data/current-cycles.d.ts +1 -1
  86. package/dist/data/current-cycles.js +62 -17
  87. package/dist/data/move-arrows.d.ts +5 -1
  88. package/dist/data/move-arrows.js +54 -4
  89. package/dist/data/part-summary.js +13 -13
  90. package/dist/data/path-lookup.js +6 -23
  91. package/dist/data/queue-material.d.ts +1 -1
  92. package/dist/data/queue-material.js +18 -17
  93. package/dist/data/results.completed-parts.js +4 -3
  94. package/dist/data/results.cycles.d.ts +15 -6
  95. package/dist/data/results.cycles.js +51 -30
  96. package/dist/data/results.inspection.js +11 -6
  97. package/dist/data/results.oee.js +8 -8
  98. package/dist/data/results.schedules.js +2 -11
  99. package/dist/data/tools-programs.js +5 -6
  100. package/dist/index.html +1 -1
  101. package/dist/network/api.d.ts +22 -4
  102. package/dist/network/api.js +40 -5
  103. package/dist/network/backend-mock.js +15 -8
  104. package/dist/network/backend.js +3 -3
  105. package/dist/network/websocket.js +15 -15
  106. package/dist/util/chart-helpers.d.ts +1 -1
  107. package/dist/util/chart-helpers.js +14 -8
  108. package/package.json +29 -31
  109. package/dist/assets/ProgramHighlight-LvRM40Qr.js +0 -3
  110. package/dist/assets/index-gAFi3Oss.js +0 -364
@@ -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),e=null),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 ee(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var te=/\/+/g;function k(e,t){return typeof e==`object`&&e&&e.key!=null?ee(``+e.key):t.toString(36)}function A(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 j(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,j(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+k(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(te,`$&/`)+`/`),j(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(te,`$&/`)+`/`)+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+k(a,u),c+=j(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+k(a,u++),c+=j(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return j(A(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 ne(e,t,n){if(e==null)return e;var r=[],i=0;return j(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function re(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 M=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)},N={map:ne,forEach:function(e,t,n){ne(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ne(e,function(){t++}),t},toArray:function(e){return ne(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=N,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:re}},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,M)}catch(e){M(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.6`})),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&&k(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&&k(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 ee=new MessageChannel,te=ee.port2;ee.port1.onmessage=D,O=function(){te.postMessage(null)}}else O=function(){_(D,0)};function k(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,k(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.6`})),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`),ee=Symbol.for(`react.activity`),te=Symbol.for(`react.memo_cache_sentinel`),k=Symbol.iterator;function A(e){return typeof e!=`object`||!e?null:(e=k&&e[k]||e[`@@iterator`],typeof e==`function`?e:null)}var j=Symbol.for(`react.client.reference`);function ne(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===j?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 ee: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?ne(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return ne(e(t))}catch{}}return null}var re=Array.isArray,M=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},ae=[],P=-1;function oe(e){return{current:e}}function F(e){0>P||(e.current=ae[P],ae[P]=null,P--)}function se(e,t){P++,ae[P]=e.current,e.current=t}var ce=oe(null),le=oe(null),ue=oe(null),de=oe(null);function fe(e,t){switch(se(ue,t),se(le,e),se(ce,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}}F(ce),se(ce,e)}function I(){F(ce),F(le),F(ue)}function pe(e){e.memoizedState!==null&&se(de,e);var t=ce.current,n=Zd(t,e.type);t!==n&&(se(le,e),se(ce,n))}function me(e){le.current===e&&(F(ce),F(le)),de.current===e&&(F(de),sp._currentValue=ie)}var he,ge;function _e(e){if(he===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);he=t&&t[1]||``,ge=-1<e.stack.indexOf(`
2
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
+ `+he+e+ge}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:``)?_e(n):``}function be(e,t){switch(e.tag){case 26:case 27:case 5:return _e(e.type);case 16:return _e(`Lazy`);case 13:return e.child!==t&&t!==null?_e(`Suspense Fallback`):_e(`Suspense`);case 19:return _e(`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 _e(`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=N.p;return e===0?(e=window.event,e===void 0?32:Cp(e.type)):e}function ot(e,t){var n=N.p;try{return N.p=e,t()}finally{N.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(re(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`),Kr=zr(`transitionend`),qr=new Map,Jr=`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(` `);Jr.push(`scrollEnd`);function Yr(e,t){qr.set(e,t),wt(t,[e])}var Xr=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)},Zr=[],Qr=0,$r=0;function ei(){for(var e=Qr,t=$r=Qr=0;t<e;){var n=Zr[t];Zr[t++]=null;var r=Zr[t];Zr[t++]=null;var i=Zr[t];Zr[t++]=null;var a=Zr[t];if(Zr[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&&ii(n,i,a)}}function ti(e,t,n,r){Zr[Qr++]=e,Zr[Qr++]=t,Zr[Qr++]=n,Zr[Qr++]=r,$r|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ni(e,t,n,r){return ti(e,t,n,r),ai(e)}function ri(e,t){return ti(e,null,null,t),ai(e)}function ii(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 ai(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 z={};function oi(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 si(e,t,n,r){return new oi(e,t,n,r)}function ci(e){return e=e.prototype,!(!e||!e.isReactComponent)}function li(e,t){var n=e.alternate;return n===null?(n=si(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 ui(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 di(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ci(e)&&(s=1);else if(typeof e==`string`)s=Qf(e,n,ce.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case ee:return e=si(31,n,t,a),e.elementType=ee,e.lanes=o,e;case y:return fi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=si(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=si(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=si(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=si(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function fi(e,t,n,r){return e=si(7,e,r,t),e.lanes=n,e}function pi(e,t,n){return e=si(6,e,null,t),e.lanes=n,e}function mi(e){var t=si(18,null,null,0);return t.stateNode=e,t}function hi(e,t,n){return t=si(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var gi=new WeakMap;function _i(e,t){if(typeof e==`object`&&e){var n=gi.get(e);return n===void 0?(t={value:e,source:t,stack:xe(t)},gi.set(e,t),t):n}return{value:e,source:t,stack:xe(t)}}var vi=[],yi=0,bi=null,xi=0,Si=[],Ci=0,wi=null,Ti=1,Ei=``;function Di(e,t){vi[yi++]=xi,vi[yi++]=bi,bi=e,xi=t}function Oi(e,t,n){Si[Ci++]=Ti,Si[Ci++]=Ei,Si[Ci++]=wi,wi=e;var r=Ti;e=Ei;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,Ti=1<<32-ze(t)+i|n<<i|r,Ei=a+e}else Ti=1<<a|n<<i|r,Ei=e}function ki(e){e.return!==null&&(Di(e,1),Oi(e,1,0))}function Ai(e){for(;e===bi;)bi=vi[--yi],vi[yi]=null,xi=vi[--yi],vi[yi]=null;for(;e===wi;)wi=Si[--Ci],Si[Ci]=null,Ei=Si[--Ci],Si[Ci]=null,Ti=Si[--Ci],Si[Ci]=null}function ji(e,t){Si[Ci++]=Ti,Si[Ci++]=Ei,Si[Ci++]=wi,Ti=t.id,Ei=t.overflow,wi=e}var Mi=null,Ni=null,Pi=!1,Fi=null,Ii=!1,Li=Error(i(519));function Ri(e){throw Wi(_i(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Li}function zi(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||Ri(e,!0)}function Bi(e){for(Mi=e.return;Mi;)switch(Mi.tag){case 5:case 31:case 13:Ii=!1;return;case 27:case 3:Ii=!0;return;default:Mi=Mi.return}}function Vi(e){if(e!==Mi)return!1;if(!Pi)return Bi(e),Pi=!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&&Ni&&Ri(e),Bi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ni=yf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ni=yf(e)}else t===27?(t=Ni,sf(e.type)?(e=vf,vf=null,Ni=e):Ni=t):Ni=Mi?_f(e.stateNode.nextSibling):null;return!0}function Hi(){Ni=Mi=null,Pi=!1}function Ui(){var e=Fi;return e!==null&&(iu===null?iu=e:iu.push.apply(iu,e),Fi=null),e}function Wi(e){Fi===null?Fi=[e]:Fi.push(e)}var Gi=oe(null),Ki=null,qi=null;function Ji(e,t,n){se(Gi,t._currentValue),t._currentValue=n}function Yi(e){e._currentValue=Gi.current,F(Gi)}function Xi(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 Zi(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),Xi(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),Xi(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 Qi(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===de.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&&Zi(t,e,n,r),t.flags|=262144}function $i(e){for(e=e.firstContext;e!==null;){if(!Sr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ea(e){Ki=e,qi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ta(e){return ra(Ki,e)}function na(e,t){return Ki===null&&ea(e),ra(e,t)}function ra(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},qi===null){if(e===null)throw Error(i(308));qi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else qi=qi.next=t;return n}var ia=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()})}},aa=t.unstable_scheduleCallback,oa=t.unstable_NormalPriority,sa={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ca(){return{controller:new ia,data:new Map,refCount:0}}function la(e){e.refCount--,e.refCount===0&&aa(oa,function(){e.controller.abort()})}var ua=null,da=0,fa=0,pa=null;function ma(e,t){if(ua===null){var n=ua=[];da=0,fa=vd(),pa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return da++,t.then(ha,ha),t}function ha(){if(--da===0&&ua!==null){pa!==null&&(pa.status=`fulfilled`);var e=ua;ua=null,fa=0,pa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ga(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 _a=M.S;M.S=function(e,t){su=De(),typeof t==`object`&&t&&typeof t.then==`function`&&ma(e,t),_a!==null&&_a(e,t)};var va=oe(null);function ya(){var e=va.current;return e===null?Hl.pooledCache:e}function ba(e,t){t===null?se(va,va.current):se(va,t.pool)}function xa(){var e=ya();return e===null?null:{parent:sa._currentValue,pool:e}}var Sa=Error(i(460)),Ca=Error(i(474)),wa=Error(i(542)),Ta={then:function(){}};function Ea(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Da(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,ja(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,ja(e),e}throw ka=t,Sa}}function Oa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ka=e,Sa):e}}var ka=null;function Aa(){if(ka===null)throw Error(i(459));var e=ka;return ka=null,e}function ja(e){if(e===Sa||e===wa)throw Error(i(483))}var Ma=null,Na=0;function Pa(e){var t=Na;return Na+=1,Ma===null&&(Ma=[]),Da(Ma,e,t)}function Fa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ia(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 La(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=li(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=pi(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&&Oa(i)===t.type)?(t=a(t,n.props),Fa(t,n),t.return=e,t):(t=di(n.type,n.key,n.props,null,e.mode,r),Fa(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=hi(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=fi(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=pi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=di(t.type,t.key,t.props,null,e.mode,n),Fa(n,t),n.return=e,n;case v:return t=hi(t,e.mode,n),t.return=e,t;case O:return t=Oa(t),f(e,t,n)}if(re(t)||A(t))return t=fi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Pa(t),n);if(t.$$typeof===C)return f(e,na(e,t),n);Ia(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=Oa(n),p(e,t,n,r)}if(re(n)||A(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Pa(n),r);if(n.$$typeof===C)return p(e,t,na(e,n),r);Ia(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=Oa(r),m(e,t,n,r,i)}if(re(r)||A(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Pa(r),i);if(r.$$typeof===C)return m(e,t,n,na(t,r),i);Ia(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),Pi&&Di(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 Pi&&Di(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)}),Pi&&Di(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),Pi&&Di(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 Pi&&Di(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)}),Pi&&Di(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&&Oa(l)===r.type){n(e,r.sibling),c=a(r,o.props),Fa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=fi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=di(o.type,o.key,o.props,null,e.mode,c),Fa(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=hi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Oa(o),b(e,r,o,c)}if(re(o))return h(e,r,o,c);if(A(o)){if(l=A(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,Pa(o),c);if(o.$$typeof===C)return b(e,r,na(e,o),c);Ia(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=pi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Na=0;var i=b(e,t,n,r);return Ma=null,i}catch(t){if(t===Sa||t===wa)throw t;var a=si(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ra=La(!0),za=La(!1),Ba=!1;function Va(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ha(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 Ua(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Wa(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=ai(e),ii(e,null,n),t}return ti(e,r,t,n),ai(e)}function Ga(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 Ka(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 qa=!1;function Ja(){if(qa){var e=pa;if(e!==null)throw e}}function Ya(e,t,n,r){qa=!1;var i=e.updateQueue;Ba=!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===fa&&(qa=!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:Ba=!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),Ql|=o,e.lanes=o,e.memoizedState=d}}function Xa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Za(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Xa(n[e],t)}var Qa=oe(null),$a=oe(0);function eo(e,t){e=Xl,se($a,e),se(Qa,t),Xl=e|t.baseLanes}function to(){se($a,Xl),se(Qa,Qa.current)}function no(){Xl=$a.current,F(Qa),F($a)}var ro=oe(null),io=null;function ao(e){var t=e.alternate;se(uo,uo.current&1),se(ro,e),io===null&&(t===null||Qa.current!==null||t.memoizedState!==null)&&(io=e)}function oo(e){se(uo,uo.current),se(ro,e),io===null&&(io=e)}function so(e){e.tag===22?(se(uo,uo.current),se(ro,e),io===null&&(io=e)):co(e)}function co(){se(uo,uo.current),se(ro,ro.current)}function lo(e){F(ro),io===e&&(io=null),F(uo)}var uo=oe(0);function fo(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 po=0,mo=null,ho=null,go=null,_o=!1,vo=!1,yo=!1,bo=0,xo=0,So=null,Co=0;function wo(){throw Error(i(321))}function To(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 Eo(e,t,n,r,i,a){return po=a,mo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?zs:Bs,yo=!1,a=n(r,i),yo=!1,vo&&(a=Oo(t,n,r,i)),Do(e),a}function Do(e){M.H=Rs;var t=ho!==null&&ho.next!==null;if(po=0,go=ho=mo=null,_o=!1,xo=0,So=null,t)throw Error(i(300));e===null||rc||(e=e.dependencies,e!==null&&$i(e)&&(rc=!0))}function Oo(e,t,n,r){mo=e;var a=0;do{if(vo&&(So=null),xo=0,vo=!1,25<=a)throw Error(i(301));if(a+=1,go=ho=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}M.H=Vs,o=t(n,r)}while(vo);return o}function ko(){var e=M.H,t=e.useState()[0];return t=typeof t.then==`function`?Io(t):t,e=e.useState()[0],(ho===null?null:ho.memoizedState)!==e&&(mo.flags|=1024),t}function Ao(){var e=bo!==0;return bo=0,e}function jo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Mo(e){if(_o){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}_o=!1}po=0,go=ho=mo=null,vo=!1,xo=bo=0,So=null}function No(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return go===null?mo.memoizedState=go=e:go=go.next=e,go}function Po(){if(ho===null){var e=mo.alternate;e=e===null?null:e.memoizedState}else e=ho.next;var t=go===null?mo.memoizedState:go.next;if(t!==null)go=t,ho=e;else{if(e===null)throw mo.alternate===null?Error(i(467)):Error(i(310));ho=e,e={memoizedState:ho.memoizedState,baseState:ho.baseState,baseQueue:ho.baseQueue,queue:ho.queue,next:null},go===null?mo.memoizedState=go=e:go=go.next=e}return go}function Fo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Io(e){var t=xo;return xo+=1,So===null&&(So=[]),e=Da(So,e,t),t=mo,(go===null?t.memoizedState:go.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?zs:Bs),e}function Lo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Io(e);if(e.$$typeof===C)return ta(e)}throw Error(i(438,String(e)))}function Ro(e){var t=null,n=mo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=mo.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=Fo(),mo.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]=te;return t.index++,n}function zo(e,t){return typeof t==`function`?t(e):t}function Bo(e){return Vo(Po(),ho,e)}function Vo(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?(po&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===fa&&(d=!0);else if((po&p)===p){u=u.next,p===fa&&(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,mo.lanes|=p,Ql|=p;f=u.action,yo&&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,mo.lanes|=f,Ql|=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=pa,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 Ho(e){var t=Po(),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 Uo(e,t,n){var r=mo,a=Po(),o=Pi;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Sr((ho||a).memoizedState,n);if(s&&(a.memoizedState=n,rc=!0),a=a.queue,ps(Ko.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||go!==null&&go.memoizedState.tag&1){if(r.flags|=2048,cs(9,{destroy:void 0},Go.bind(null,r,a,n,t),null),Hl===null)throw Error(i(349));o||po&127||Wo(r,t,n)}return n}function Wo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=mo.updateQueue,t===null?(t=Fo(),mo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Go(e,t,n,r){t.value=n,t.getSnapshot=r,qo(t)&&Jo(e)}function Ko(e,t,n){return n(function(){qo(t)&&Jo(e)})}function qo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Sr(e,n)}catch{return!0}}function Jo(e){var t=ri(e,2);t!==null&&xu(t,e,2)}function Yo(e){var t=No();if(typeof e==`function`){var n=e;if(e=n(),yo){Re(!0);try{n()}finally{Re(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:e},t}function Xo(e,t,n,r){return e.baseState=n,Vo(e,ho,typeof r==`function`?r:zo)}function Zo(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)}};M.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Qo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Qo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=M.T,o={};M.T=o;try{var s=n(i,r),c=M.S;c!==null&&c(o,s),$o(e,t,s)}catch(n){ts(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),M.T=a}}else try{a=n(i,r),$o(e,t,a)}catch(n){ts(e,t,n)}}function $o(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){es(e,t,n)},function(n){return ts(e,t,n)}):es(e,t,n)}function es(e,t,n){t.status=`fulfilled`,t.value=n,ns(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Qo(e,n)))}function ts(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ns(t),t=t.next;while(t!==r)}e.action=null}function ns(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function rs(e,t){return t}function B(e,t){if(Pi){var n=Hl.formState;if(n!==null){a:{var r=mo;if(Pi){if(Ni){b:{for(var i=Ni,a=Ii;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){Ni=_f(i.nextSibling),r=i.data===`F!`;break a}}Ri(r)}r=!1}r&&(t=n[0])}}return n=No(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rs,lastRenderedState:t},n.queue=r,n=Ms.bind(null,mo,r),r.dispatch=n,r=Yo(!1),a=Ps.bind(null,mo,!1,r.queue),r=No(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Zo.bind(null,mo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function is(e){return as(Po(),ho,e)}function as(e,t,n){if(t=Vo(e,t,rs)[0],e=Bo(zo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Io(t)}catch(e){throw e===Sa?wa:e}else r=t;t=Po();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(mo.flags|=2048,cs(9,{destroy:void 0},os.bind(null,i,n),null)),[r,a,e]}function os(e,t){e.action=t}function ss(e){var t=Po(),n=ho;if(n!==null)return as(t,n,e);Po(),t=t.memoizedState,n=Po();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function cs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=mo.updateQueue,t===null&&(t=Fo(),mo.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 ls(){return Po().memoizedState}function us(e,t,n,r){var i=No();mo.flags|=e,i.memoizedState=cs(1|t,{destroy:void 0},n,r===void 0?null:r)}function ds(e,t,n,r){var i=Po();r=r===void 0?null:r;var a=i.memoizedState.inst;ho!==null&&r!==null&&To(r,ho.memoizedState.deps)?i.memoizedState=cs(t,a,n,r):(mo.flags|=e,i.memoizedState=cs(1|t,a,n,r))}function fs(e,t){us(8390656,8,e,t)}function ps(e,t){ds(2048,8,e,t)}function ms(e){mo.flags|=4;var t=mo.updateQueue;if(t===null)t=Fo(),mo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function hs(e){var t=Po().memoizedState;return ms({ref:t,nextImpl:e}),function(){if(Vl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function gs(e,t){return ds(4,2,e,t)}function V(e,t){return ds(4,4,e,t)}function _s(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 vs(e,t,n){n=n==null?null:n.concat([e]),ds(4,4,_s.bind(null,t,e),n)}function ys(){}function bs(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&To(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function xs(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&To(t,r[1]))return r[0];if(r=e(),yo){Re(!0);try{e()}finally{Re(!1)}}return n.memoizedState=[r,t],r}function Ss(e,t,n){return n===void 0||po&1073741824&&!(Wl&261930)?e.memoizedState=t:(e.memoizedState=n,e=bu(),mo.lanes|=e,Ql|=e,n)}function Cs(e,t,n,r){return Sr(n,t)?n:Qa.current===null?!(po&42)||po&1073741824&&!(Wl&261930)?(rc=!0,e.memoizedState=n):(e=bu(),mo.lanes|=e,Ql|=e,t):(e=Ss(e,n,r),Sr(e,t)||(rc=!0),e)}function H(e,t,n,r,i){var a=N.p;N.p=a!==0&&8>a?a:8;var o=M.T,s={};M.T=s,Ps(e,!1,t,n);try{var c=i(),l=M.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ns(e,t,ga(c,r),yu(e)):Ns(e,t,r,yu(e))}catch(n){Ns(e,t,{then:function(){},status:`rejected`,reason:n},yu())}finally{N.p=a,o!==null&&s.types!==null&&(o.types=s.types),M.T=o}}function ws(){}function Ts(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Es(e).queue;H(e,a,t,ie,n===null?ws:function(){return Ds(e),n(r)})}function Es(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:ie},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ds(e){var t=Es(e);t.next===null&&(t=e.alternate.memoizedState),Ns(e,t.next.queue,{},yu())}function U(){return ta(sp)}function Os(){return Po().memoizedState}function ks(){return Po().memoizedState}function As(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=yu();e=Ua(n);var r=Wa(t,e,n);r!==null&&(xu(r,t,n),Ga(r,t,n)),t={cache:ca()},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=ni(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 ti(e,t,i,0),Hl===null&&ei(),!1}catch{}if(n=ni(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=ni(e,n,r,2),t!==null&&xu(t,e,2)}function Fs(e){var t=e.alternate;return e===mo||t!==null&&t===mo}function Is(e,t){vo=_o=!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:ta,use:Lo,useCallback:wo,useContext:wo,useEffect:wo,useImperativeHandle:wo,useLayoutEffect:wo,useInsertionEffect:wo,useMemo:wo,useReducer:wo,useRef:wo,useState:wo,useDebugValue:wo,useDeferredValue:wo,useTransition:wo,useSyncExternalStore:wo,useId:wo,useHostTransitionStatus:wo,useFormState:wo,useActionState:wo,useOptimistic:wo,useMemoCache:wo,useCacheRefresh:wo};Rs.useEffectEvent=wo;var zs={readContext:ta,use:Lo,useCallback:function(e,t){return No().memoizedState=[e,t===void 0?null:t],e},useContext:ta,useEffect:fs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),us(4194308,4,_s.bind(null,t,e),n)},useLayoutEffect:function(e,t){return us(4194308,4,e,t)},useInsertionEffect:function(e,t){us(4,2,e,t)},useMemo:function(e,t){var n=No();t=t===void 0?null:t;var r=e();if(yo){Re(!0);try{e()}finally{Re(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=No();if(n!==void 0){var i=n(t);if(yo){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,mo,e),[r.memoizedState,e]},useRef:function(e){var t=No();return e={current:e},t.memoizedState=e},useState:function(e){e=Yo(e);var t=e.queue,n=Ms.bind(null,mo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ys,useDeferredValue:function(e,t){return Ss(No(),e,t)},useTransition:function(){var e=Yo(!1);return e=H.bind(null,mo,e.queue,!0,!1),No().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=mo,a=No();if(Pi){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Hl===null)throw Error(i(349));Wl&127||Wo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,fs(Ko.bind(null,r,o,e),[e]),r.flags|=2048,cs(9,{destroy:void 0},Go.bind(null,r,o,n,t),null),n},useId:function(){var e=No(),t=Hl.identifierPrefix;if(Pi){var n=Ei,r=Ti;n=(r&~(1<<32-ze(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=bo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Co++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:U,useFormState:B,useActionState:B,useOptimistic:function(e){var t=No();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,mo,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ro,useCacheRefresh:function(){return No().memoizedState=As.bind(null,mo)},useEffectEvent:function(e){var t=No(),n={impl:e};return t.memoizedState=n,function(){if(Vl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Bs={readContext:ta,use:Lo,useCallback:bs,useContext:ta,useEffect:ps,useImperativeHandle:vs,useInsertionEffect:gs,useLayoutEffect:V,useMemo:xs,useReducer:Bo,useRef:ls,useState:function(){return Bo(zo)},useDebugValue:ys,useDeferredValue:function(e,t){return Cs(Po(),ho.memoizedState,e,t)},useTransition:function(){var e=Bo(zo)[0],t=Po().memoizedState;return[typeof e==`boolean`?e:Io(e),t]},useSyncExternalStore:Uo,useId:Os,useHostTransitionStatus:U,useFormState:is,useActionState:is,useOptimistic:function(e,t){return Xo(Po(),ho,e,t)},useMemoCache:Ro,useCacheRefresh:ks};Bs.useEffectEvent=hs;var Vs={readContext:ta,use:Lo,useCallback:bs,useContext:ta,useEffect:ps,useImperativeHandle:vs,useInsertionEffect:gs,useLayoutEffect:V,useMemo:xs,useReducer:Ho,useRef:ls,useState:function(){return Ho(zo)},useDebugValue:ys,useDeferredValue:function(e,t){var n=Po();return ho===null?Ss(n,e,t):Cs(n,ho.memoizedState,e,t)},useTransition:function(){var e=Ho(zo)[0],t=Po().memoizedState;return[typeof e==`boolean`?e:Io(e),t]},useSyncExternalStore:Uo,useId:Os,useHostTransitionStatus:U,useFormState:ss,useActionState:ss,useOptimistic:function(e,t){var n=Po();return ho===null?(n.baseState=e,[e,n.queue.dispatch]):Xo(n,ho,e,t)},useMemoCache:Ro,useCacheRefresh:ks};Vs.useEffectEvent=hs;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=Ua(r);i.payload=t,n!=null&&(i.callback=n),t=Wa(e,i,r),t!==null&&(xu(t,e,r),Ga(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=yu(),i=Ua(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Wa(e,i,r),t!==null&&(xu(t,e,r),Ga(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=yu(),r=Ua(n);r.tag=2,t!=null&&(r.callback=t),t=Wa(e,r,n),t!==null&&(xu(t,e,n),Ga(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){Xr(e)}function Js(e){console.error(e)}function Ys(e){Xr(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=Ua(n),n.tag=3,n.payload={element:null},n.callback=function(){Xs(e,t)},n}function $s(e){return e=Ua(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`&&(W===null?W=new Set([this]):W.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&&Qi(t,n,a,!0),n=ro.current,n!==null){switch(n.tag){case 31:case 13:return io===null?Nu():n.alternate===null&&Zl===0&&(Zl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ta?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===Ta?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(Pi)return t=ro.current,t===null?(r!==Li&&(t=Error(i(423),{cause:r}),Wi(_i(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=_i(r,n),a=Qs(e.stateNode,r,a),Ka(e,a),Zl!==4&&(Zl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Li&&(e=Error(i(422),{cause:r}),Wi(_i(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=_i(o,n),ru===null?ru=[o]:ru.push(o),Zl!==4&&(Zl=2),t===null)return!0;r=_i(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),Ka(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`&&(W===null||!W.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=$s(a),ec(a,e,n,r),Ka(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?za(t,null,n,r):Ra(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 ea(t),r=Eo(e,t,n,o,a,i),s=Ao(),e!==null&&!rc?(jo(e,t,i),kc(e,t,i)):(Pi&&s&&ki(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`&&!ci(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,sc(e,t,a,r,i)):(e=di(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=li(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&&ba(t,a===null?null:a.cachePool),a===null?to():eo(t,a),so(t);else return r=t.lanes=536870912,uc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ba(t,null),to(),co(t)):(ba(t,a.cachePool),eo(t,a),co(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=ya();return a=a===null?null:{parent:sa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ba(t,null),to(),so(t),e!==null&&Qi(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 Ra(t,e.child,null,n),e=dc(t,t.pendingProps),e.flags|=2,lo(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(Pi){if(r.mode===`hidden`)return e=dc(t,r),t.lanes=536870912,lc(null,e);if(oo(t),(e=Ni)?(e=pf(e,Ii),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wi===null?null:{id:Ti,overflow:Ei},retryLane:536870912,hydrationErrors:null},n=mi(e),n.return=t,t.child=n,Mi=t,Ni=null)):e=null,e===null)throw Ri(t);return t.lanes=536870912,null}return dc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(oo(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||Qi(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,ri(e,s),xu(r,e,s),nc;Nu(),t=fc(e,t,n)}else e=o.treeContext,Ni=_f(s.nextSibling),Mi=t,Pi=!0,Fi=null,Ii=!1,e!==null&&ji(t,e),t=dc(t,r),t.flags|=4096;return t}return e=li(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 ea(t),n=Eo(e,t,n,r,void 0,i),r=Ao(),e!==null&&!rc?(jo(e,t,i),kc(e,t,i)):(Pi&&r&&ki(t),t.flags|=1,ic(e,t,n,i),t.child)}function gc(e,t,n,r,i,a){return ea(t),t.updateQueue=null,n=Oo(t,r,n,i),Do(e),r=Ao(),e!==null&&!rc?(jo(e,t,a),kc(e,t,a)):(Pi&&r&&ki(t),t.flags|=1,ic(e,t,n,a),t.child)}function _c(e,t,n,r,i){if(ea(t),t.stateNode===null){var a=z,o=n.contextType;typeof o==`object`&&o&&(a=ta(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={},Va(t),o=n.contextType,a.context=typeof o==`object`&&o?ta(o):z,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),Ya(t,r,a,i),Ja(),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=z,typeof u==`object`&&u&&(o=ta(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),Ba=!1;var f=t.memoizedState;a.state=f,Ya(t,r,a,i),Ja(),l=t.memoizedState,s||f!==l||Ba?(typeof d==`function`&&(Hs(t,n,d,r),l=t.memoizedState),(c=Ba||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,Ha(e,t),o=t.memoizedProps,u=Ks(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=z,typeof l==`object`&&l&&(c=ta(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),Ba=!1,f=t.memoizedState,a.state=f,Ya(t,r,a,i),Ja();var p=t.memoizedState;o!==d||f!==p||Ba||e!==null&&e.dependencies!==null&&$i(e.dependencies)?(typeof s==`function`&&(Hs(t,n,s,r),p=t.memoizedState),(u=Ba||Ws(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&$i(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=Ra(t,e.child,null,i),t.child=Ra(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 Hi(),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:xa()}}function xc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=tu),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:(uo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Pi){if(a?ao(t):co(t),(e=Ni)?(e=pf(e,Ii),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wi===null?null:{id:Ti,overflow:Ei},retryLane:536870912,hydrationErrors:null},n=mi(e),n.return=t,t.child=n,Mi=t,Ni=null)):e=null,e===null)throw Ri(t);return hf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(co(t),a=t.mode,c=wc({mode:`hidden`,children:c},a),r=fi(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)):(ao(t),Cc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(ao(t),t.flags&=-257,t=Tc(e,t,n)):t.memoizedState===null?(co(t),c=r.fallback,a=t.mode,r=wc({mode:`visible`,children:r.children},a),c=fi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ra(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)):(co(t),t.child=e.child,t.flags|=128,t=null);else if(ao(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,Wi({value:r,source:null,stack:null}),t=Tc(e,t,n)}else if(rc||Qi(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,ri(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,Ni=_f(c.nextSibling),Mi=t,Pi=!0,Fi=null,Ii=!1,e!==null&&ji(t,e),t=Cc(t,r.children),t.flags|=4096);return t}return a?(co(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=li(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=fi(c,a,n,null),c.flags|=2):c=li(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=xa():(l=sa._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)):(ao(t),n=e.child,e=n.sibling,n=li(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=si(22,e,null,t),e.lanes=0,e}function Tc(e,t,n){return Ra(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),Xi(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=uo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,se(uo,o),ic(e,t,r,n),r=Pi?xi: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&&fo(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&&fo(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),Ql|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Qi(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=li(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=li(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&&$i(e))):!0}function jc(e,t,n){switch(t.tag){case 3:fe(t,t.stateNode.containerInfo),Ji(t,sa,e.memoizedState.cache),Hi();break;case 27:case 5:pe(t);break;case 4:fe(t,t.stateNode.containerInfo);break;case 10:Ji(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,oo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(ao(t),e=kc(e,t,n),e===null?null:e.sibling):Sc(e,t,n):(ao(t),t.flags|=128,null);ao(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Qi(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),se(uo,uo.current),r)break;return null;case 22:return t.lanes=0,cc(e,t,n,t.pendingProps);case 24:Ji(t,sa,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,Pi&&t.flags&1048576&&Oi(t,xi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Oa(t.elementType),t.type=e,typeof e==`function`)ci(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=ne(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,Ha(e,t),Ya(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ji(t,sa,r),r!==o.cache&&Zi(t,[sa],n,!0),Ja(),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=_i(Error(i(424)),t),Wi(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(Ni=_f(e.firstChild),Mi=t,Pi=!0,Fi=null,Ii=!0,n=za(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Hi(),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:Pi||(n=t.type,e=t.pendingProps,r=Yd(ue.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 pe(t),e===null&&Pi&&(r=t.stateNode=xf(t.type,t.pendingProps,ue.current),Mi=t,Ii=!0,a=Ni,sf(t.type)?(vf=a,Ni=_f(r.firstChild)):Ni=a),ic(e,t,t.pendingProps.children,n),mc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Pi&&((a=r=Ni)&&(r=df(r,t.type,t.pendingProps,Ii),r===null?a=!1:(t.stateNode=r,Mi=t,Ni=_f(r.firstChild),Ii=!1,a=!0)),a||Ri(t)),pe(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=Eo(e,t,ko,null,null,n),sp._currentValue=a),mc(e,t),ic(e,t,r,n),t.child;case 6:return e===null&&Pi&&((e=n=Ni)&&(n=ff(n,t.pendingProps,Ii),n===null?e=!1:(t.stateNode=n,Mi=t,Ni=null,e=!0)),e||Ri(t)),null;case 13:return Sc(e,t,n);case 4:return fe(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ra(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,Ji(t,t.type,r.value),ic(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ea(t),a=ta(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 ea(t),r=ta(sa),e===null?(a=ya(),a===null&&(a=Hl,o=ca(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Va(t),Ji(t,sa,a)):((e.lanes&n)!==0&&(Ha(e,t),Ya(t,null,null,n),Ja()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Ji(t,sa,r),r!==a.cache&&Zi(t,[sa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ji(t,sa,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 ka=Ta,Ca}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 ka=Ta,Ca}function Ic(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Xe(),e.lanes|=t,nu|=t)}function Lc(e,t){if(!Pi)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(Ai(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),Yi(sa),I(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Vi(t)?Nc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ui())),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(me(t),n=ue.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=ce.current,Vi(t)?zi(t,e):(e=xf(a,r,n),t.stateNode=e,Nc(t))}return Rc(t),null;case 5:if(me(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=ce.current,Vi(t))zi(t,o);else{var s=Yd(ue.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=ue.current,Vi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Mi,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||Ri(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=Vi(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 Hi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Rc(t),e=!1}else n=Ui(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(lo(t),t):(lo(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=Vi(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 Hi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Rc(t),a=!1}else a=Ui(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(lo(t),t):(lo(t),null)}return lo(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 I(),e===null&&Ad(t.stateNode.containerInfo),Rc(t),null;case 10:return Yi(t.type),Rc(t),null;case 19:if(F(uo),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(Zl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=fo(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;)ui(n,e),n=n.sibling;return se(uo,uo.current&1|2),Pi&&Di(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&De()>cu&&(t.flags|=128,a=!0,Lc(r,!1),t.lanes=4194304)}else{if(!a)if(e=fo(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&&!Pi)return Rc(t),null}else 2*De()-r.renderingStartTime>cu&&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=uo.current,se(uo,a?n&1|2:n&1),Pi&&Di(t,r.treeForkCount),e);case 22:case 23:return lo(t),no(),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&&F(va),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Yi(sa),Rc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Bc(e,t){switch(Ai(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yi(sa),I(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return me(t),null;case 31:if(t.memoizedState!==null){if(lo(t),t.alternate===null)throw Error(i(340));Hi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(lo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Hi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return F(uo),null;case 4:return I(),null;case 10:return Yi(t.type),null;case 22:case 23:return lo(t),no(),e!==null&&F(va),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Yi(sa),null;case 25:return null;default:return null}}function Vc(e,t){switch(Ai(t),t.tag){case 3:Yi(sa),I();break;case 26:case 27:case 5:me(t);break;case 4:I();break;case 31:t.memoizedState!==null&&lo(t);break;case 13:lo(t);break;case 19:F(uo);break;case 10:Yi(t.type);break;case 22:case 23:lo(t),no(),e!==null&&F(va);break;case 24:Yi(sa)}}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{Za(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{Za(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&&gt(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)&&(ou=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++)Xa(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&&la(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&&la(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&&la(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:la(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=ta(sa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ta(sa).controller.signal}},Bl=typeof WeakMap==`function`?WeakMap:Map,Vl=0,Hl=null,Ul=null,Wl=0,Gl=0,Kl=null,ql=!1,Jl=!1,Yl=!1,Xl=0,Zl=0,Ql=0,$l=0,eu=0,tu=0,nu=0,ru=null,iu=null,au=!1,ou=0,su=0,cu=1/0,lu=null,W=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:M.T===null?at():vd()}function bu(){if(tu===0)if(!(Wl&536870912)||Pi){var e=We;We<<=1,!(We&3932160)&&(We=262144),tu=e}else tu=536870912;return e=ro.current,e!==null&&(e.flags|=32),tu}function xu(e,t,n){(e===Hl&&(Gl===2||Gl===9)||e.cancelPendingCommit!==null)&&(Ou(e,0),Tu(e,Wl,tu,!1)),Qe(e,n),(!(Vl&2)||e!==Hl)&&(e===Hl&&(!(Vl&2)&&($l|=n),Zl===4&&Tu(e,Wl,tu,!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){Jl&&!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=ru;var l=c.current.memoizedState.isDehydrated;if(l&&(Ou(c,s).flags|=256),s=Pu(c,s,!1),s!==2){if(Yl&&!l){c.errorRecoveryDisabledLanes|=o,$l|=o,a=4;break a}o=iu,iu=a,o!==null&&(iu===null?iu=o:iu.push.apply(iu,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,tu,!ql);break a;case 2:iu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=ou+300-De(),10<a)){if(Tu(r,t,tu,!ql),qe(r,0,!0)!==0)break a;pu=t,r.timeoutHandle=tf(Cu.bind(null,r,n,iu,lu,au,t,tu,$l,nu,ql,o,`Throttled`,-0,0),a);break a}Cu(r,n,iu,lu,au,t,tu,$l,nu,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?ou-De():(a&4194048)===a?su-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&=~eu,t&=~$l,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,qi=Ki=null,Mo(e),Ma=null,Na=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=li(e.current,null),Wl=t,Gl=0,Kl=null,ql=!1,Jl=Je(e,t),Yl=!1,nu=tu=eu=$l=Ql=Zl=0,iu=ru=null,au=!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 Xl=t,ei(),n}function ku(e,t){mo=null,M.H=Rs,t===Sa||t===wa?(t=Aa(),Gl=3):t===Ca?(t=Aa(),Gl=4):Gl=t===nc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Kl=t,Ul===null&&(Zl=1,Xs(e,_i(t,e.current)))}function Au(){var e=ro.current;return e===null?!0:(Wl&4194048)===Wl?io===null:(Wl&62914560)===Wl||Wl&536870912?e===io:!1}function ju(){var e=M.H;return M.H=Rs,e===null?Rs:e}function Mu(){var e=M.A;return M.A=zl,e}function Nu(){Zl=4,ql||(Wl&4194048)!==Wl&&ro.current!==null||(Jl=!0),!(Ql&134217727)&&!($l&134217727)||Hl===null||Tu(Hl,Wl,tu,!1)}function Pu(e,t,n){var r=Vl;Vl|=2;var i=ju(),a=Mu();(Hl!==e||Wl!==t)&&(lu=null,Ou(e,t)),t=!1;var o=Zl;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:ro.current===null&&(t=!0);var l=Gl;if(Gl=0,Kl=null,Bu(e,s,c,l),n&&Jl){o=0;break a}break;default:l=Gl,Gl=0,Kl=null,Bu(e,s,c,l)}}Fu(),o=Zl;break}catch(t){ku(e,t)}while(1);return t&&e.shellSuspendCounter++,qi=Ki=null,Vl=r,M.H=i,M.A=a,Ul===null&&(Hl=null,Wl=0,ei()),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?(lu=null,cu=De()+500,Ou(e,t)):Jl=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(Ea(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:Ea(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(),Zl=6;break a;default:throw Error(i(462))}}Lu();break}catch(t){ku(e,t)}while(1);return qi=Ki=null,M.H=r,M.A=a,Vl=n,Ul===null?(Hl=null,Wl=0,ei(),Zl):0}function Lu(){for(;Ul!==null&&!Te();)Ru(Ul)}function Ru(e){var t=Mc(e.alternate,e,Xl);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:Mo(t);default:Vc(n,t),t=Ul=ui(t,Xl),t=Mc(n,t,Xl)}e.memoizedProps=e.pendingProps,t===null?Vu(e):Ul=t}function Bu(e,t,n,r){qi=Ki=null,Mo(t),Ma=null,Na=0;var i=t.return;try{if(tc(e,i,t,n,Wl)){Zl=1,Xs(e,_i(n,e.current)),Ul=null;return}}catch(t){if(i!==null)throw Ul=i,t;Zl=1,Xs(e,_i(n,e.current)),Ul=null;return}t.flags&32768?(Pi||r===1?e=!0:Jl||Wl&536870912?e=!1:(ql=e=!0,(r===2||r===9||r===3||r===6)&&(r=ro.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,Xl);if(n!==null){Ul=n;return}if(t=t.sibling,t!==null){Ul=t;return}Ul=t=e}while(t!==null);Zl===0&&(Zl=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);Zl=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|=$r,$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=M.T,M.T=null,a=N.p,N.p=2,s=Vl,Vl|=4;try{ol(e,t,n)}finally{Vl=s,N.p=a,M.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=M.T,M.T=null;var r=N.p;N.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,N.p=r,M.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=M.T,M.T=null;var r=N.p;N.p=2;var i=Vl;Vl|=4;try{sl(e,t.alternate,t)}finally{Vl=i,N.p=r,M.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&&(W=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=M.T,i=N.p,N.p=2,M.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{M.T=t,N.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,la(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=M.T,a=N.p;try{N.p=32>n?32:n,M.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{N.p=a,M.T=r,qu(e,t)}}function Xu(e,t,n){t=_i(n,t),t=Qs(e.stateNode,t,2),e=Wa(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`&&(W===null||!W.has(r))){e=_i(n,e),n=$s(2),r=Wa(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)||(Yl=!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&&(Zl===4||Zl===3&&(Wl&62914560)===Wl&&300>De()-ou?!(Vl&2)&&Ou(e,0):eu|=n,nu===Wl&&(nu=0)),ud(e)}function ed(e,t){t===0&&(t=Xe()),e=ri(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=fa;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);Ts(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),Ts(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Sd=0;Sd<Jr.length;Sd++){var Cd=Jr[Sd];Yr(Cd.toLowerCase(),`on`+(Cd[0].toUpperCase()+Cd.slice(1)))}Yr(Br,`onAnimationEnd`),Yr(Vr,`onAnimationIteration`),Yr(Hr,`onAnimationStart`),Yr(`dblclick`,`onDoubleClick`),Yr(`focusin`,`onFocus`),Yr(`focusout`,`onBlur`),Yr(Ur,`onTransitionRun`),Yr(Wr,`onTransitionStart`),Yr(Gr,`onTransitionCancel`),Yr(Kr,`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){Xr(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){Xr(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=qr.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 Kr: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=N.d;N.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`?Ds(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=ue.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:ie,_currentValue2:ie,_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=si(3,null,null,t),e.current=a,a.stateNode=e,t=ca(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Va(a),e}function up(e){return e?(e=z,e):z}function dp(e,t,n,r,i,a){i=up(i),r.context===null?r.context=i:r.pendingContext=i,r=Ua(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Wa(e,r,t),n!==null&&(xu(n,e,t),Ga(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=ri(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=ri(e,t);n!==null&&xu(n,e,t),pp(e,t)}}var gp=!0;function _p(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=2,yp(e,t,n,r)}finally{N.p=a,M.T=i}}function vp(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=8,yp(e,t,n,r)}finally{N.p=a,M.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)&&(cu=De()+500,dd(0,!1))}}break;case 31:case 13:s=ri(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,Ts(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}Gp.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)},Gp.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 Gp(e){this._internalRoot=e}Gp.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 Kp=n.version;if(Kp!==`19.2.6`)throw Error(i(527,Kp,`19.2.6`));N.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 qp={bundleType:0,version:`19.2.6`,rendererPackageName:`react-dom`,currentDispatcherRef:M,reconcilerVersion:`19.2.6`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Jp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jp.isDisabled&&Jp.supportsFiber)try{Ie=Jp.inject(qp),Le=Jp}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 ee(){return ee=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},ee.apply(null,arguments)}var te=!1;function k(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 A(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 j=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?!te: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(A(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=k(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}(),ne=`-ms-`,re=`-moz-`,M=`-webkit-`,N=`comm`,ie=`rule`,ae=`decl`,P=`@import`,oe=`@keyframes`,F=`@layer`,se=Math.abs,ce=String.fromCharCode,le=Object.assign;function ue(e,t){return me(e,0)^45?(((t<<2^me(e,0))<<2^me(e,1))<<2^me(e,2))<<2^me(e,3):0}function de(e){return e.trim()}function fe(e,t){return(e=t.exec(e))?e[0]:e}function I(e,t,n){return e.replace(t,n)}function pe(e,t){return e.indexOf(t)}function me(e,t){return e.charCodeAt(t)|0}function he(e,t,n){return e.slice(t,n)}function ge(e){return e.length}function _e(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 le(Ee(``,null,null,``,null,null,0),e,{length:-e.length},t)}function Oe(){return we}function ke(){return we=Ce>0?me(Te,--Ce):0,xe--,we===10&&(xe=1,be--),we}function Ae(){return we=Ce<Se?me(Te,Ce++):0,xe++,we===10&&(xe=1,be++),we}function je(){return me(Te,Ce)}function Me(){return Ce}function Ne(e,t){return he(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=ge(Te=e),Ce=0,[]}function Ie(e){return Te=``,e}function Le(e){return de(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)+`*`+ce(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&&me(C,d-1)==58){pe(C+=I(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++]=ge(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=I(C,/\f/g,``)),p>0&&ge(C)-d&&ve(p>32?qe(C+`;`,r,n,d-1):qe(I(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&&me(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+ge(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&ke()==125)continue}switch(C+=ce(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(ge(C)-1)*_,_=1;break;case 64:je()===45&&(C+=Le(Ae())),f=je(),u=d=ge(y=C+=He(Me())),v++;break;case 45:m===45&&ge(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=_e(f),m=0,h=0,g=0;m<r;++m)for(var _=0,v=he(e,d+1,d=se(h=o[m])),y=e;_<p;++_)(y=de(h>0?f[_]+` `+v:I(v,/&\f/g,f[_])))&&(c[g++]=y);return Ee(e,t,n,i===0?ie:s,c,l,u)}function Ke(e,t,n){return Ee(e,t,n,N,ce(Oe()),he(e,2,-2),0)}function qe(e,t,n,r){return Ee(e,t,n,ae,he(e,0,r),he(e,r+1,-1),r)}function Je(e,t){for(var n=``,r=_e(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 F:if(e.children.length)break;case P:case ae:return e.return=e.return||e.value;case N:return``;case oe:return e.return=e.value+`{`+Je(e.children,r)+`}`;case ie:e.value=e.props.join(`,`)}return ge(n=Je(e.children,r))?e.return=e.value+`{`+n+`}`:``}function Xe(e){var t=_e(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]+=ce(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(ue(e,t)){case 5103:return M+`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 M+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return M+e+re+e+ne+e+e;case 6828:case 4268:return M+e+ne+e+e;case 6165:return M+e+ne+`flex-`+e+e;case 5187:return M+e+I(e,/(\w+).+(:[^]+)/,M+`box-$1$2`+ne+`flex-$1$2`)+e;case 5443:return M+e+ne+`flex-item-`+I(e,/flex-|-self/,``)+e;case 4675:return M+e+ne+`flex-line-pack`+I(e,/align-content|flex-|-self/,``)+e;case 5548:return M+e+ne+I(e,`shrink`,`negative`)+e;case 5292:return M+e+ne+I(e,`basis`,`preferred-size`)+e;case 6060:return M+`box-`+I(e,`-grow`,``)+M+e+ne+I(e,`grow`,`positive`)+e;case 4554:return M+I(e,/([^-])(transform)/g,`$1`+M+`$2`)+e;case 6187:return I(I(I(e,/(zoom-|grab)/,M+`$1`),/(image-set)/,M+`$1`),e,``)+e;case 5495:case 3959:return I(e,/(image-set\([^]*)/,M+"$1$`$1");case 4968:return I(I(e,/(.+:)(flex-)?(.*)/,M+`box-pack:$3`+ne+`flex-pack:$3`),/s.+-b[^;]+/,`justify`)+M+e+e;case 4095:case 3583:case 4068:case 2532:return I(e,/(.+)-inline(.+)/,M+`$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(ge(e)-1-t>6)switch(me(e,t+1)){case 109:if(me(e,t+4)!==45)break;case 102:return I(e,/(.+:)(.+)-([^]+)/,`$1`+M+`$2-$3$1`+re+(me(e,t+3)==108?`$3`:`$2-$3`))+e;case 115:return~pe(e,`stretch`)?at(I(e,`stretch`,`fill-available`),t)+e:e}break;case 4949:if(me(e,t+1)!==115)break;case 6444:switch(me(e,ge(e)-3-(~pe(e,`!important`)&&10))){case 107:return I(e,`:`,`:`+M)+e;case 101:return I(e,/(.+:)([^;!]+)(;|!.+)?/,`$1`+M+(me(e,14)===45?`inline-`:``)+`box$3$1`+M+`$2$3$1`+ne+`$2box$3`)+e}break;case 5936:switch(me(e,t+11)){case 114:return M+e+ne+I(e,/[svh]\w+-[tblr]{2}/,`tb`)+e;case 108:return M+e+ne+I(e,/[svh]\w+-[tblr]{2}/,`tb-rl`)+e;case 45:return M+e+ne+I(e,/[svh]\w+-[tblr]{2}/,`lr`)+e}return M+e+ne+e+e}return e}var ot=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case ae:e.return=at(e.value,e.length);break;case oe:return Je([De(e,{value:I(e.value,`@`,`@`+M)})],r);case ie: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:[I(t,/:(read-\w+)/,`:`+re+`$1`)]})],r);case`::placeholder`:return Je([De(e,{props:[I(t,/:(plac\w+)/,`:`+M+`input-$1`)]}),De(e,{props:[I(t,/:(plac\w+)/,`:`+re+`$1`)]}),De(e,{props:[I(t,/:(plac\w+)/,ne+`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 j({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,ee({},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`)}let f=[];for(let e=0;e<o.length;e+=1)f.push(s(o[e]));return{keys:o,values:a,up:s,down:c,between:l,only:u,not:d,unit:n,internal_mediaKeys:f,...i}}var vn=/min-width:\s*([0-9.]+)/;function yn(e,t){if(!e.containerQueries||!bn(t))return t;let n=[];for(let e in t)e.startsWith(`@container`)&&n.push(e);n.sort((e,t)=>(e.match(vn)?.[1]||0)-+(t.match(vn)?.[1]||0));let r=t;for(let e=0;e<n.length;e+=1){let t=n[e],i=r[t];delete r[t],r[t]=i}return r}function bn(e){for(let t in e)if(t.startsWith(`@container`))return!0;return!1}function xn(e,t){return t===`@`||t.startsWith(`@`)&&(e.some(e=>t.startsWith(`@${e}`))||!!t.match(/^@\d/))}function Sn(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 Cn(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 wn={borderRadius:4};function Tn(e){if(e==null)return!0;for(let t in e)return!1;return!0}function En(e,t){let n=Array.isArray(t),r=Array.isArray(e);return jn(t)?t:Mn(e)?Nn(t):n&&r?kn(e,t):n===r?Pn(e,t):Nn(t)}function Dn(e){let t=0,n=e.length,r=Array(n);for(t=0;t<n;t+=1)r[t]=Nn(e[t]);return r}function On(e){let t={};for(let n in e)t[n]=Nn(e[n]);return t}function kn(e,t){let n=e.length;for(let r=0;r<t.length;r+=1)e[n+r]=Nn(t[r]);return e}function An(e){return typeof e==`object`&&!!e&&!(e instanceof RegExp)&&!(e instanceof Date)}function jn(e){return typeof e!=`object`||!e}function Mn(e){return typeof e!=`object`||!e||e instanceof RegExp||e instanceof Date}function Nn(e){return An(e)?Array.isArray(e)?Dn(e):On(e):e}function Pn(e,t){for(let n in t)n in e?e[n]=En(e[n],t[n]):e[n]=Nn(t[n]);return e}var Fn={},In={xs:0,sm:600,md:900,lg:1200,xl:1536},Ln=_n({values:In}),Rn={containerQueries:e=>({up:t=>{let n=typeof t==`number`?t:In[t]||t;return typeof n==`number`&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function zn(e,t,n){let r={};return Bn(r,e.theme,t,(e,t,i)=>{let a=n(t,i);e?r[e]=a:En(r,a)})}function Bn(e,t,n,r){if(t??=Fn,Array.isArray(n)){let i=t.breakpoints??Ln;for(let t=0;t<n.length;t+=1)Vn(e,i.up(i.keys[t]),n[t],void 0,r);return e}if(typeof n==`object`){let i=t.breakpoints??Ln,a=i.values??In;for(let o in n)if(xn(i.keys,o)){let i=Sn(t.containerQueries?t:Rn,o);i&&Vn(e,i,n[o],o,r)}else if(o in a)Vn(e,i.up(o),n[o],o,r);else{let t=o;e[t]=n[t]}return e}return r(void 0,n),e}function Vn(e,t,n,r,i){e[t]??={},i(t,n,r)}function Hn(e=Ln){let{internal_mediaKeys:t}=e,n={};for(let e=0;e<t.length;e+=1)n[t[e]]={};return n}function Un(e,t){let n=e.internal_mediaKeys;for(let e=0;e<n.length;e+=1){let r=n[e];Tn(t[r])&&delete t[r]}return t}function Wn(e,...t){return Un(e,[Hn(e),...t].reduce((e,t)=>hn(e,t),{}))}function Gn(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 Kn({values:e,breakpoints:t,base:n}){let r=n||Gn(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 qn(e,t){if(Array.isArray(t))return!0;if(typeof t==`object`&&t){for(let n=0;n<e.keys.length;n+=1)if(e.keys[n]in t)return!0;let n=Object.keys(t);for(let t=0;t<n.length;t+=1)if(xn(e.keys,n[t]))return!0}return!1}function Jn(e){if(typeof e!=`string`)throw Error(D(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Yn(e,t,n,r){let i;return i=typeof e==`function`?e(n):Array.isArray(e)?e[n]||n:typeof n==`string`&&Xn(e,n,!0,r)||n,t&&(i=t(i,n,e)),i}function Xn(e,t,n=!0,r=void 0){if(!e||!t)return null;let i=t.split(`.`);if(e.vars&&n){let t=Zn(e.vars,i,r);if(t!=null)return t}return Zn(e,i,r)}function Zn(e,t,n=void 0){let r,i=e,a=0;for(;a<t.length;){if(i==null)return i;r=i,i=i[t[a]],a+=1}if(n&&i===void 0){let e=t[t.length-1],i=`${n}${e===`default`?``:Jn(e)}`;return r?.[i]}return i}function Qn(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=Xn(o,r)||{};return zn(e,a,e=>{let r=Yn(s,i,e,t);return n===!1?r:{[n]:r}})};return a.propTypes={},a.filterProps=[t],a}var $n={internal_cache:{}},er={m:`margin`,p:`padding`},tr={t:`Top`,r:`Right`,b:`Bottom`,l:`Left`,x:[`Left`,`Right`],y:[`Top`,`Bottom`]},nr={marginX:`mx`,marginY:`my`,paddingX:`px`,paddingY:`py`},rr={};for(let e in er)rr[e]=[er[e]];for(let e in er)for(let t in tr){let n=er[e],r=tr[t],i=Array.isArray(r)?r.map(e=>n+e):[n+r];rr[e+t]=i}for(let e in nr)rr[e]=rr[nr[e]];var ir=new Set([`m`,`mt`,`mr`,`mb`,`ml`,`mx`,`my`,`margin`,`marginTop`,`marginRight`,`marginBottom`,`marginLeft`,`marginX`,`marginY`,`marginInline`,`marginInlineStart`,`marginInlineEnd`,`marginBlock`,`marginBlockStart`,`marginBlockEnd`]),ar=new Set([`p`,`pt`,`pr`,`pb`,`pl`,`px`,`py`,`padding`,`paddingTop`,`paddingRight`,`paddingBottom`,`paddingLeft`,`paddingX`,`paddingY`,`paddingInline`,`paddingInlineStart`,`paddingInlineEnd`,`paddingBlock`,`paddingBlockStart`,`paddingBlockEnd`]),or=new Set([...ir,...ar]);function sr(e,t,n,r){let i=Xn(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 cr(e){return sr(e,`spacing`,8,`spacing`)}function lr(e,t){return typeof t==`string`||t==null?t:e(t)}var ur=[``];function dr(e,t){let n=e.theme??$n,r=n?.internal_cache?.unarySpacing??cr(n),i={};for(let n in e){if(!t.has(n))continue;let a=rr[n]??(ur[0]=n,ur),o=e[n];Bn(i,e.theme,o,(e,t)=>{let n=e?i[e]:i;for(let e=0;e<a.length;e+=1)n[a[e]]=lr(r,t)})}return i}function fr(e){return dr(e,ir)}fr.propTypes={},fr.filterProps=ir;function pr(e){return dr(e,ar)}pr.propTypes={},pr.filterProps=ar;function mr(e){return dr(e,or)}mr.propTypes={},mr.filterProps=or;function hr(e=8,t=cr({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 gr(...e){let t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>{let n={};for(let r in e)t[r]&&En(n,t[r](e));return n};return n.propTypes={},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n}function _r(e){return typeof e==`number`?`${e}px solid`:e}function vr(e,t){return Qn({prop:e,themeKey:`borders`,transform:t})}var yr=vr(`border`,_r),br=vr(`borderTop`,_r),xr=vr(`borderRight`,_r),Sr=vr(`borderBottom`,_r),Cr=vr(`borderLeft`,_r),wr=vr(`borderColor`),Tr=vr(`borderTopColor`),Er=vr(`borderRightColor`),Dr=vr(`borderBottomColor`),Or=vr(`borderLeftColor`),kr=vr(`outline`,_r),Ar=vr(`outlineColor`),jr=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){let t=sr(e.theme,`shape.borderRadius`,4,`borderRadius`);return zn(e,e.borderRadius,e=>({borderRadius:lr(t,e)}))}return null};jr.propTypes={},jr.filterProps=[`borderRadius`],gr(yr,br,xr,Sr,Cr,wr,Tr,Er,Dr,Or,jr,kr,Ar);var Mr=e=>{if(e.gap!==void 0&&e.gap!==null){let t=sr(e.theme,`spacing`,8,`gap`);return zn(e,e.gap,e=>({gap:lr(t,e)}))}return null};Mr.propTypes={},Mr.filterProps=[`gap`];var Nr=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){let t=sr(e.theme,`spacing`,8,`columnGap`);return zn(e,e.columnGap,e=>({columnGap:lr(t,e)}))}return null};Nr.propTypes={},Nr.filterProps=[`columnGap`];var Pr=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){let t=sr(e.theme,`spacing`,8,`rowGap`);return zn(e,e.rowGap,e=>({rowGap:lr(t,e)}))}return null};Pr.propTypes={},Pr.filterProps=[`rowGap`],gr(Mr,Nr,Pr,Qn({prop:`gridColumn`}),Qn({prop:`gridRow`}),Qn({prop:`gridAutoFlow`}),Qn({prop:`gridAutoColumns`}),Qn({prop:`gridAutoRows`}),Qn({prop:`gridTemplateColumns`}),Qn({prop:`gridTemplateRows`}),Qn({prop:`gridTemplateAreas`}),Qn({prop:`gridArea`}));function Fr(e,t){return t===`grey`?t:e}gr(Qn({prop:`color`,themeKey:`palette`,transform:Fr}),Qn({prop:`bgcolor`,cssProperty:`backgroundColor`,themeKey:`palette`,transform:Fr}),Qn({prop:`backgroundColor`,themeKey:`palette`,transform:Fr}));function Ir(e){return e<=1&&e!==0?`${e*100}%`:e}var Lr=Qn({prop:`width`,transform:Ir}),Rr=e=>e.maxWidth!==void 0&&e.maxWidth!==null?zn(e,e.maxWidth,t=>{let n=e.theme?.breakpoints?.values?.[t]||In[t];return n?e.theme?.breakpoints?.unit===`px`?{maxWidth:n}:{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:Ir(t)}}):null;Rr.filterProps=[`maxWidth`];var zr=Qn({prop:`minWidth`,transform:Ir}),Br=Qn({prop:`height`,transform:Ir}),Vr=Qn({prop:`maxHeight`,transform:Ir}),Hr=Qn({prop:`minHeight`,transform:Ir});Qn({prop:`size`,cssProperty:`width`,transform:Ir}),Qn({prop:`size`,cssProperty:`height`,transform:Ir}),gr(Lr,Rr,zr,Br,Vr,Hr,Qn({prop:`boxSizing`}));var Ur={border:{themeKey:`borders`,transform:_r},borderTop:{themeKey:`borders`,transform:_r},borderRight:{themeKey:`borders`,transform:_r},borderBottom:{themeKey:`borders`,transform:_r},borderLeft:{themeKey:`borders`,transform:_r},borderColor:{themeKey:`palette`},borderTopColor:{themeKey:`palette`},borderRightColor:{themeKey:`palette`},borderBottomColor:{themeKey:`palette`},borderLeftColor:{themeKey:`palette`},outline:{themeKey:`borders`,transform:_r},outlineColor:{themeKey:`palette`},borderRadius:{themeKey:`shape.borderRadius`,style:jr},color:{themeKey:`palette`,transform:Fr},bgcolor:{themeKey:`palette`,cssProperty:`backgroundColor`,transform:Fr},backgroundColor:{themeKey:`palette`,transform:Fr},p:{style:pr},pt:{style:pr},pr:{style:pr},pb:{style:pr},pl:{style:pr},px:{style:pr},py:{style:pr},padding:{style:pr},paddingTop:{style:pr},paddingRight:{style:pr},paddingBottom:{style:pr},paddingLeft:{style:pr},paddingX:{style:pr},paddingY:{style:pr},paddingInline:{style:pr},paddingInlineStart:{style:pr},paddingInlineEnd:{style:pr},paddingBlock:{style:pr},paddingBlockStart:{style:pr},paddingBlockEnd:{style:pr},m:{style:fr},mt:{style:fr},mr:{style:fr},mb:{style:fr},ml:{style:fr},mx:{style:fr},my:{style:fr},margin:{style:fr},marginTop:{style:fr},marginRight:{style:fr},marginBottom:{style:fr},marginLeft:{style:fr},marginX:{style:fr},marginY:{style:fr},marginInline:{style:fr},marginInlineStart:{style:fr},marginInlineEnd:{style:fr},marginBlock:{style:fr},marginBlockStart:{style:fr},marginBlockEnd:{style:fr},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:Mr},rowGap:{style:Pr},columnGap:{style:Nr},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:`zIndex`},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:`shadows`},width:{transform:Ir},maxWidth:{style:Rr},minWidth:{transform:Ir},height:{transform:Ir},maxHeight:{transform:Ir},minHeight:{transform:Ir},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`}},Wr={};function Gr(){function e(t){if(!t.sx)return null;let{sx:n,theme:r=Wr,nested:i}=t,a=r.unstable_sxConfig??Ur,o={sx:null,theme:r,nested:!0};function s(n){let s=n;if(typeof n==`function`)s=n(r);else if(typeof n!=`object`)return n;if(!s)return null;let c=r.breakpoints??Ln,l=Hn(c);for(let n in s){let i=Jr(s[n],r);if(i!=null){if(typeof i!=`object`){qr(l,n,i,r,a);continue}if(a[n]){qr(l,n,i,r,a);continue}qn(c,i)?Bn(l,t.theme,i,(e,t)=>{l[e][n]=t}):(o.sx=i,l[n]=e(o))}}return!i&&r.modularCssLayers?{"@layer sx":yn(r,Un(c,l))}:yn(r,Un(c,l))}return Array.isArray(n)?n.map(s):s(n)}return e.filterProps=[`sx`],e}var Kr=Gr();function qr(e,t,n,r,i){let a=i[t];if(!a){e[t]=n;return}if(n==null)return;let{themeKey:o}=a;if(o===`typography`&&n===`inherit`){e[t]=n;return}let{style:s}=a;if(s){En(e,s({[t]:n,theme:r}));return}let{cssProperty:c=t,transform:l}=a,u=Xn(r,o);Bn(e,r,n,(n,r)=>{let i=Yn(u,l,r,t);c===!1?En(n?e[n]:e,i):n?e[n][c]=i:e[c]=i})}function Jr(e,t){return typeof e==`function`?e(t):e}function Yr(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 Xr(e={},...t){let{breakpoints:n={},palette:r={},spacing:i,shape:a={},...o}=e,s=_n(n),c=hr(i),l=hn({breakpoints:s,direction:`ltr`,components:{},palette:{mode:`light`,...r},spacing:c,shape:{...wn,...a}},o);return l=Cn(l),l.applyStyles=Yr,l=t.reduce((e,t)=>hn(e,t),l),l.unstable_sxConfig={...Ur,...o?.unstable_sxConfig},l.unstable_sx=function(e){return Kr({sx:e,theme:this})},l.internal_cache={},l}function Zr(e){return Object.keys(e).length===0}function Qr(e=null){let t=L.useContext(It);return!t||Zr(t)?e:t}var $r=Xr();function ei(e=$r){return Qr(e)}function ti(e){let t=un(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function ni({styles:e,themeId:t,defaultTheme:n={}}){let r=ei(n),i=t&&r[t]||r,a=typeof e==`function`?e(i):e;return i.modularCssLayers&&(a=Array.isArray(a)?a.map(e=>ti(typeof e==`function`?e(i):e)):ti(a)),(0,R.jsx)(on,{styles:a})}var ri=e=>e,ii=(()=>{let e=ri;return{configure(t){e=t},generate(t){return e(t)},reset(){e=ri}}})();function ai(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=ai(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=ai(e))&&(r&&(r+=` `),r+=t);return r}function oi(e={}){let{themeId:t,defaultTheme:n,defaultClassName:r=`MuiBox-root`,generateClassName:i}=e,a=sn(`div`,{shouldForwardProp:e=>e!==`theme`&&e!==`sx`&&e!==`as`})(Kr);return L.forwardRef(function(e,o){let s=ei(n),{className:c,component:l=`div`,...u}=e;return(0,R.jsx)(a,{as:l,ref:o,className:z(c,i?i(r):r),theme:t&&s[t]||s,...u})})}var si={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 ci(e,t,n=`Mui`){let r=si[t];return r?`${n}-${r}`:`${ii.generate(e)}-${t}`}function li(e,t,n=`Mui`){let r={};return t.forEach(t=>{r[t]=ci(e,t,n)}),r}function ui(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 di=Xr();function fi(e){return e!==`ownerState`&&e!==`theme`&&e!==`sx`&&e!==`as`}function pi(e,t){return t&&e&&typeof e==`object`&&e.styles&&!e.styles.startsWith(`@layer`)&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function mi(e){return e?(t,n)=>n[e]:null}function hi(e,t,n){e.theme=Tn(e.theme)?n:e.theme[t]||e.theme}function gi(e,t,n){let r=typeof t==`function`?t(e):t;if(Array.isArray(r))return r.flatMap(t=>gi(e,t,n));if(Array.isArray(r?.variants)){let t;if(r.isProcessed)t=n?pi(r.style,n):r.style;else{let{variants:e,...i}=r;t=n?pi(un(i),n):i}return _i(e,r.variants,[t],n)}return r?.isProcessed?n?pi(un(r.style),n):r.style:n?pi(un(r),n):r}function _i(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?pi(un(o.style(i)),r):o.style(i))):n.push(r?pi(un(o.style),r):o.style)}return n}function vi(e={}){let{themeId:t,defaultTheme:n=di,rootShouldForwardProp:r=fi,slotShouldForwardProp:i=fi}=e;function a(e){hi(e,t,n)}return(e,t={})=>{cn(e,e=>e.filter(e=>e!==Kr));let{name:n,slot:o,skipVariantsResolver:s,skipSx:c,overridesResolver:l=mi(bi(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=fi;o===`Root`||o===`root`?m=r:o?m=i:yi(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 gi(t,e,t.theme.modularCssLayers?d:void 0)};if(pn(e)){let t=ui(e);return function(e){return t.variants?gi(e,t,e.theme.modularCssLayers?d:void 0):e.theme.modularCssLayers?pi(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]=gi(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?_i(e,t,[],e.theme.modularCssLayers?`theme`:void 0):null}),p||o.push(Kr),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 yi(e){return typeof e==`string`&&e.charCodeAt(0)>96}function bi(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}var xi=vi();function Si(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]=Si(i[t],o[t],n)}}}else a===`className`&&n&&t.className!==void 0?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 Ci(e){let{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:Si(t.components[n].defaultProps,r)}function wi({props:e,name:t,defaultTheme:n,themeId:r}){let i=ei(n);return r&&(i=i[r]||i),Ci({theme:i,name:t,props:e})}var Ti=typeof window<`u`?L.useLayoutEffect:L.useEffect;function Ei(e,t,n,r,i){let[a,o]=L.useState(()=>i&&n?n(e).matches:r?r(e).matches:t);return Ti(()=>{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 Di={...L}.useSyncExternalStore;function Oi(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 Di(c,s,o)}function ki(e={}){let{themeId:t}=e;return function(e,n={}){let r=Qr();r&&t&&(r=r[t]||r);let i=typeof window<`u`&&window.matchMedia!==void 0?window.matchMedia:null,{defaultMatches:a=!1,matchMedia:o,ssrMatchMedia:s=null,noSsr:c=!1}=Ci({name:`MuiUseMediaQuery`,props:n,theme:r}),l=L.useMemo(()=>o===void 0?i===null?null:i.bind(window):o,[o,i]),u=typeof e==`function`?e(r):e;return u=u.replace(/^@media( ?)/m,``),u.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
+ `)),(Di===void 0?Ei:Oi)(u,a,l,s,c)}}ki();function Ai(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}function ji(e,t=0,n=1){return Ai(e,t,n)}function Mi(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 Ni(e){if(e.type)return e;if(e.charAt(0)===`#`)return Ni(Mi(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 Pi=e=>{let t=Ni(e);return t.values.slice(0,3).map((e,n)=>t.type.includes(`hsl`)&&n!==0?`${e}%`:e).join(` `)},Fi=(e,t)=>{try{return Pi(e)}catch{return e}};function Ii(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 Li(e){e=Ni(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])),Ii({type:s,values:c})}function Ri(e){e=Ni(e);let t=e.type===`hsl`||e.type===`hsla`?Ni(Li(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 zi(e,t){let n=Ri(e),r=Ri(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Bi(e,t){return e=Ni(e),t=ji(t),(e.type===`rgb`||e.type===`hsl`)&&(e.type+=`a`),e.type===`color`?e.values[3]=`/${t}`:e.values[3]=t,Ii(e)}function Vi(e,t,n){try{return Bi(e,t)}catch{return e}}function Hi(e,t){if(e=Ni(e),t=ji(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 Ii(e)}function Ui(e,t,n){try{return Hi(e,t)}catch{return e}}function Wi(e,t){if(e=Ni(e),t=ji(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 Ii(e)}function Gi(e,t,n){try{return Wi(e,t)}catch{return e}}function Ki(e,t=.15){return Ri(e)>.5?Hi(e,t):Wi(e,t)}function qi(e,t,n){try{return Ki(e,t)}catch{return e}}var Ji=L.createContext(null);function Yi(){return L.useContext(Ji)}var Xi=typeof Symbol==`function`&&Symbol.for?Symbol.for(`mui.nested`):`__THEME_NESTED__`;function Zi(e,t){return typeof t==`function`?t(e):{...e,...t}}function Qi(e){let{children:t,theme:n}=e,r=Yi(),i=L.useMemo(()=>{let e=r===null?{...n}:Zi(r,n);return e!=null&&(e[Xi]=r!==null),e},[n,r]);return(0,R.jsx)(Ji.Provider,{value:i,children:t})}var $i=L.createContext();function ea({value:e,...t}){return(0,R.jsx)($i.Provider,{value:e??!0,...t})}var ta=()=>L.useContext($i)??!1,na=L.createContext(void 0);function ra({value:e,children:t}){return(0,R.jsx)(na.Provider,{value:e,children:t})}function ia(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?Si(i.defaultProps,r,t.components.mergeClassNameAndStyle):!i.styleOverrides&&!i.variants?Si(i,r,t.components.mergeClassNameAndStyle):r}function aa({props:e,name:t}){return ia({props:e,name:t,theme:{components:L.useContext(na)}})}var oa=0;function sa(e){let[t,n]=L.useState(e),r=e||t;return L.useEffect(()=>{t??(oa+=1,n(`mui-${oa}`))},[t]),r}var ca={...L}.useId;function la(e){if(ca!==void 0){let t=ca();return e??t}return sa(e)}function ua(e){let t=Qr(),n=la()||``,{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};`,Ti(()=>{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)(ni,{styles:i}):null}var da={};function fa(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 pa(e){let{children:t,theme:n,themeId:r}=e,i=Qr(da),a=Yi()||da,o=fa(r,i,n),s=fa(r,a,n,!0),c=(r?o[r]:o).direction===`rtl`,l=ua(o);return(0,R.jsx)(Qi,{theme:s,children:(0,R.jsx)(It.Provider,{value:o,children:(0,R.jsx)(ea,{value:c,children:(0,R.jsxs)(ra,{value:r?o[r].components:o.components,children:[l,t]})})})})}var ma={theme:void 0};function ha(e){let t,n;return function(r){let i=t;return(i===void 0||r.theme!==n)&&(ma.theme=r.theme,i=ui(e(ma)),t=i,n=r.theme),i}}var ga=`mode`,_a=`color-scheme`,va=`data-color-scheme`;function ya(e){let{defaultMode:t=`system`,defaultLightColorScheme:n=`light`,defaultDarkColorScheme:r=`dark`,modeStorageKey:i=ga,colorSchemeStorageKey:a=_a,attribute:o=va,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 ba(){}var xa=({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 ba;let r=t=>{let r=t.newValue;t.key===e&&n(r)};return t.addEventListener(`storage`,r),()=>{t.removeEventListener(`storage`,r)}}});function Sa(){}function Ca(e){if(typeof window<`u`&&typeof window.matchMedia==`function`&&e===`system`)return window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}function wa(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 Ta(e){return wa(e,t=>{if(t===`light`)return e.lightColorScheme;if(t===`dark`)return e.darkColorScheme})}function Ea(e){let{defaultMode:t=`light`,defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:i=[],modeStorageKey:a=ga,colorSchemeStorageKey:o=_a,storageWindow:s=typeof window>`u`?void 0:window,storageManager:c=xa,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:Ca(e),lightColorScheme:i,darkColorScheme:a}}),[_,v]=L.useState(l||!d);L.useEffect(()=>{v(!0)},[]);let y=Ta(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:Ca(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 wa(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)})||Sa,n=p?.subscribe(e=>{(!e||u.match(e))&&x({light:e})})||Sa,r=m?.subscribe(e=>{(!e||u.match(e))&&x({dark:e})})||Sa;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 Da=`*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`;function Oa(e){let{themeId:t,theme:n={},modeStorageKey:r=ga,colorSchemeStorageKey:i=_a,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=Yi(),D=L.useContext(l),O=!!D&&!b,ee=L.useMemo(()=>u||(typeof n==`function`?n():n),[u]),te=ee[t],k=te||ee,{colorSchemes:A=d,components:j=f,cssVarPrefix:ne}=k,re=Object.keys(A).filter(e=>!!A[e]).join(`,`),M=L.useMemo(()=>re.split(`,`),[re]),N=typeof o==`string`?o:o.light,ie=typeof o==`string`?o:o.dark,{mode:ae,setMode:P,systemMode:oe,lightColorScheme:F,darkColorScheme:se,colorScheme:ce,setColorScheme:le}=Ea({supportedColorSchemes:M,defaultLightColorScheme:N,defaultDarkColorScheme:ie,modeStorageKey:p,colorSchemeStorageKey:m,defaultMode:A[N]&&A[ie]?S:A[k.defaultColorScheme]?.palette?.mode||k.palette?.mode,storageManager:g,storageWindow:_,noSsr:w}),ue=ae,de=ce;O&&(ue=D.mode,de=D.colorScheme);let fe=de||k.defaultColorScheme;k.vars&&!C&&(fe=k.defaultColorScheme);let I=L.useMemo(()=>{let e=k.generateThemeVars?.()||k.vars,t={...k,components:j,colorSchemes:A,cssVarPrefix:ne,vars:e};if(typeof t.generateSpacing==`function`&&(t.spacing=t.generateSpacing()),fe){let e=A[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},[k,fe,j,A,ne]),pe=k.colorSchemeSelector;Ti(()=>{if(de&&y&&pe&&pe!==`media`){let e=pe,t=pe;if(e===`class`&&(t=`.%s`),e===`data`&&(t=`[data-%s]`),e?.startsWith(`data-`)&&!e.includes(`%s`)&&(t=`[${e}="%s"]`),t.startsWith(`.`))y.classList.remove(...M.map(e=>t.substring(1).replace(`%s`,e))),y.classList.add(t.substring(1).replace(`%s`,de));else{let e=t.replace(`%s`,de).match(/\[([^\]]+)\]/);if(e){let[t,n]=e[1].split(`=`);n||M.forEach(e=>{y.removeAttribute(t.replace(de,e))}),y.setAttribute(t,n?n.replace(/"|'/g,``):``)}else y.setAttribute(t,de)}}},[de,pe,y,M]),L.useEffect(()=>{let e;if(h&&T.current&&v){let t=v.createElement(`style`);t.appendChild(v.createTextNode(Da)),v.head.appendChild(t),window.getComputedStyle(v.body),e=setTimeout(()=>{v.head.removeChild(t)},1)}return()=>{clearTimeout(e)}},[de,h,v]),L.useEffect(()=>(T.current=!0,()=>{T.current=!1}),[]);let me=L.useMemo(()=>({allColorSchemes:M,colorScheme:de,darkColorScheme:se,lightColorScheme:F,mode:ue,setColorScheme:le,setMode:P,systemMode:oe}),[M,de,se,F,ue,le,P,oe,I.colorSchemeSelector]),he=!0;(x||k.cssVariables===!1||O&&E?.cssVarPrefix===ne)&&(he=!1);let ge=(0,R.jsxs)(L.Fragment,{children:[(0,R.jsx)(pa,{themeId:te?t:void 0,theme:I,children:c}),he&&(0,R.jsx)(on,{styles:I.generateStyleSheets?.()||[]})]});return O?ge:(0,R.jsx)(l.Provider,{value:me,children:ge})}let m=typeof o==`string`?o:o.light,h=typeof o==`string`?o:o.dark;return{CssVarsProvider:p,useColorScheme:u,getInitColorSchemeScript:e=>ya({colorSchemeStorageKey:i,defaultLightColorScheme:m,defaultDarkColorScheme:h,modeStorageKey:r,...e})}}function ka(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 Aa=(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])})},ja=(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)},Ma=(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 Na(e,t){let{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},a={},o={};return ja(e,(e,t,s)=>{if((typeof t==`string`||typeof t==`number`)&&(!r||!r(e,t))){let r=`--${n?`${n}-`:``}${e.join(`-`)}`,c=Ma(e,t);Object.assign(i,{[r]:c}),Aa(a,e,`var(${r})`,s),Aa(o,e,`var(${r}, ${c})`,s)}},e=>e[0]===`vars`),{css:i,vars:a,varsWithDefaults:o}}function Pa(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}=Na(l,t),p=f,m={},{[c]:h,...g}=o;if(Object.entries(g||{}).forEach(([e,n])=>{let{vars:r,css:i,varsWithDefaults:a}=Na(n,t);p=hn(p,a),m[e]={css:i,vars:r}}),h){let{css:e,vars:n,varsWithDefaults:r}=Na(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 Fa(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 Ia(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 La(e,t){return L.isValidElement(e)&&t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}var Ra=(e,t)=>e.filter(e=>t.includes(e)),za=(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:Ra(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 Ba(e){return`--Grid-${e}Spacing`}function Va(e){return`--Grid-parent-${e}Spacing`}var Ha=`--Grid-columns`,Ua=`--Grid-parent-columns`,Wa=({theme:e,ownerState:t})=>{let n={};return za(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(${Ua}) - (var(${Ua}) - ${t}) * (var(${Va(`column`)}) / var(${Ua})))`}),e(n,r)}),n},Ga=({theme:e,ownerState:t})=>{let n={};return za(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(${Ua}) + var(${Va(`column`)}) * ${t} / var(${Ua}))`}),e(n,r)}),n},Ka=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={[Ha]:12};return za(e.breakpoints,t.columns,(e,t)=>{let r=t??12;e(n,{[Ha]:r,"> *":{[Ua]:r}})}),n},qa=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={};return za(e.breakpoints,t.rowSpacing,(t,r)=>{let i=typeof r==`string`?r:e.spacing?.(r);t(n,{[Ba(`row`)]:i,"> *":{[Va(`row`)]:i}})}),n},Ja=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={};return za(e.breakpoints,t.columnSpacing,(t,r)=>{let i=typeof r==`string`?r:e.spacing?.(r);t(n,{[Ba(`column`)]:i,"> *":{[Va(`column`)]:i}})}),n},Ya=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={};return za(e.breakpoints,t.direction,(e,t)=>{e(n,{flexDirection:t})}),n},Xa=({ownerState:e})=>({minWidth:0,boxSizing:`border-box`,...e.container&&{display:`flex`,flexWrap:`wrap`,...e.wrap&&e.wrap!==`wrap`&&{flexWrap:e.wrap},gap:`var(${Ba(`row`)}) var(${Ba(`column`)})`}}),Za=e=>{let t=[];return Object.entries(e).forEach(([e,n])=>{n!==!1&&n!==void 0&&t.push(`grid-${e}-${String(n)}`)}),t},Qa=(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[]},$a=e=>e===void 0?[]:typeof e==`object`?Object.entries(e).map(([e,t])=>`direction-${e}-${t}`):[`direction-xs-${String(e)}`],eo=Xr(),to=xi(`div`,{name:`MuiGrid`,slot:`Root`});function no(e){return wi({props:e,name:`MuiGrid`,defaultTheme:eo})}function ro(e={}){let{createStyledComponent:t=to,useThemeProps:n=no,useTheme:r=ei,componentName:i=`MuiGrid`}=e,a=(e,t)=>{let{container:n,direction:r,spacing:a,wrap:o,size:s}=e;return Ia({root:[`root`,n&&`container`,o!==`wrap`&&`wrap-xs-${String(o)}`,...$a(r),...Za(s),...n?Qa(a,t.breakpoints.keys[0]):[]]},e=>ci(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(Ka,Ja,qa,Wa,Ya,Xa,Ga),c=L.forwardRef(function(e,t){let i=r(),c=n(e),{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),ee={...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:ee,className:z(a(ee,i).root,l),...S,children:L.Children.map(u,e=>L.isValidElement(e)&&La(e,[`Grid`])&&f&&e.props.container?L.cloneElement(e,{unstable_level:e.props?.unstable_level??x+1}):e)})});return c.muiName=`Grid`,c}var io=Xr(),ao=xi(`div`,{name:`MuiStack`,slot:`Root`});function oo(e){return wi({props:e,name:`MuiStack`,defaultTheme:io})}function so(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 co=e=>({row:`Left`,"row-reverse":`Right`,column:`Top`,"column-reverse":`Bottom`})[e],lo=({ownerState:e,theme:t})=>{let n={display:`flex`,flexDirection:`column`,...zn({theme:t},Kn({values:e.direction,breakpoints:t.breakpoints.values}),e=>({flexDirection:e}))};if(e.spacing){let r=cr(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=Kn({values:e.direction,base:i}),o=Kn({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,zn({theme:t},o,(t,n)=>e.useFlexGap?{gap:lr(r,t)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${co(n?a[n]:e.direction)}`]:lr(r,t)}}))}return n=Wn(t.breakpoints,n),n};function uo(e={}){let{createStyledComponent:t=ao,useThemeProps:n=oo,componentName:r=`MuiStack`}=e,i=()=>Ia({root:[`root`]},e=>ci(r,e),{}),a=t(lo);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}=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?so(l,c):l})})}function fo(){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 po=fo();function mo(){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 ho=mo();function go(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=Wi(e.main,i):t===`dark`&&(e.dark=Hi(e.main,a)))}function _o(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 vo(e=`light`){return e===`dark`?{main:x[200],light:x[50],dark:x[400]}:{main:x[700],light:x[400],dark:x[800]}}function yo(e=`light`){return e===`dark`?{main:b[200],light:b[50],dark:b[400]}:{main:b[500],light:b[300],dark:b[700]}}function bo(e=`light`){return e===`dark`?{main:y[500],light:y[300],dark:y[700]}:{main:y[700],light:y[400],dark:y[800]}}function xo(e=`light`){return e===`dark`?{main:S[400],light:S[300],dark:S[700]}:{main:S[700],light:S[500],dark:S[900]}}function So(e=`light`){return e===`dark`?{main:C[400],light:C[300],dark:C[700]}:{main:C[800],light:C[500],dark:C[900]}}function Co(e=`light`){return e===`dark`?{main:w[400],light:w[300],dark:w[700]}:{main:`#ed6c02`,light:w[500],dark:w[900]}}function wo(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function To(e){let{mode:t=`light`,contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:i,...a}=e,o=e.primary||vo(t),s=e.secondary||yo(t),c=e.error||bo(t),l=e.info||xo(t),u=e.success||So(t),d=e.warning||Co(t);function f(e){return i?wo(e):zi(e,ho.text.primary)>=n?ho.text.primary:po.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?(_o(i,e,`light`,a,r),_o(i,e,`dark`,o,r)):(go(e,`light`,a,r),go(e,`dark`,o,r)),e.contrastText||=f(e.main),e},m;return t===`light`?m=fo():t===`dark`&&(m=mo()),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 Eo(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 Do(e,t){return{toolbar:{minHeight:56,[e.up(`xs`)]:{"@media (orientation: landscape)":{minHeight:48}},[e.up(`sm`)]:{minHeight:64}},...t}}function Oo(e){return Math.round(e*1e5)/1e5}var ko={textTransform:`uppercase`},Ao=`"Roboto", "Helvetica", "Arial", sans-serif`;function jo(e,t){let{fontFamily:n=Ao,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===Ao?{letterSpacing:`${Oo(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,ko),caption:m(a,12,1.66,.4),overline:m(a,12,2.66,1,ko),inherit:{fontFamily:`inherit`,fontWeight:`inherit`,fontSize:`inherit`,lineHeight:`inherit`,letterSpacing:`inherit`}},d,{clone:!1})}var Mo=.2,No=.14,Po=.12;function Fo(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Mo})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${No})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Po})`].join(`,`)}var Io=[`none`,Fo(0,2,1,-1,0,1,1,0,0,1,3,0),Fo(0,3,1,-2,0,2,2,0,0,1,5,0),Fo(0,3,3,-2,0,3,4,0,0,1,8,0),Fo(0,2,4,-1,0,4,5,0,0,1,10,0),Fo(0,3,5,-1,0,5,8,0,0,1,14,0),Fo(0,3,5,-1,0,6,10,0,0,1,18,0),Fo(0,4,5,-2,0,7,10,1,0,2,16,1),Fo(0,5,5,-3,0,8,10,1,0,3,14,2),Fo(0,5,6,-3,0,9,12,1,0,3,16,2),Fo(0,6,6,-3,0,10,14,1,0,4,18,3),Fo(0,6,7,-4,0,11,15,1,0,4,20,3),Fo(0,7,8,-4,0,12,17,2,0,5,22,4),Fo(0,7,8,-4,0,13,19,2,0,5,24,4),Fo(0,7,9,-4,0,14,21,2,0,5,26,4),Fo(0,8,9,-5,0,15,22,2,0,6,28,5),Fo(0,8,10,-5,0,16,24,2,0,6,30,5),Fo(0,8,11,-5,0,17,26,2,0,6,32,5),Fo(0,9,11,-5,0,18,28,2,0,7,34,6),Fo(0,9,12,-6,0,19,29,2,0,7,36,6),Fo(0,10,13,-6,0,20,31,3,0,8,38,7),Fo(0,10,13,-6,0,21,33,3,0,8,40,7),Fo(0,10,14,-6,0,22,35,3,0,8,42,7),Fo(0,11,14,-7,0,23,36,3,0,9,44,8),Fo(0,11,15,-7,0,24,38,3,0,9,46,8)],Lo={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)`},Ro={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function zo(e){return`${Math.round(e)}ms`}function Bo(e){if(!e)return 0;let t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function Vo(e){let t={...Lo,...e.easing},n={...Ro,...e.duration};return{getAutoHeightDuration:Bo,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:zo(i)} ${a} ${typeof o==`string`?o:zo(o)}`).join(`,`)},...e,easing:t,duration:n}}var Ho={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Uo(e){return pn(e)||e===void 0||typeof e==`string`||typeof e==`boolean`||typeof e==`number`||Array.isArray(e)}function Wo(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];!Uo(a)||i.startsWith(`unstable_`)||i.startsWith(`internal_`)?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 Go(e){return typeof e==`number`?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}var Ko=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 qo(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})`:Bi(t,Ko(n))},lighten(t,n){let r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #fff ${Go(n)})`:Wi(t,n)},darken(t,n){let r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #000 ${Go(n)})`:Hi(t,n)}})}function Jo(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(22));let d=To({...a,colorSpace:l}),f=Xr(e),p=hn(f,{mixins:Do(f.breakpoints,r),palette:d,shadows:Io.slice(),typography:jo(d,s),transitions:Vo(o),zIndex:{...Ho}});return p=hn(p,u),p=t.reduce((e,t)=>hn(e,t),p),p.unstable_sxConfig={...Ur,...u?.unstable_sxConfig},p.unstable_sx=function(e){return Kr({sx:e,theme:this})},p.toRuntimeSource=Wo,qo(p),p}function Yo(e){let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}var Xo=[...Array(25)].map((e,t)=>{if(t===0)return`none`;let n=Yo(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Zo(e){return{inputPlaceholder:e===`dark`?.5:.42,inputUnderline:e===`dark`?.7:.42,switchTrackDisabled:e===`dark`?.2:.12,switchTrack:e===`dark`?.3:.38}}function Qo(e){return e===`dark`?Xo:[]}function $o(e){let{palette:t={mode:`light`},opacity:n,overlays:r,colorSpace:i,...a}=e,o=To({...t,colorSpace:i});return{palette:o,opacity:{...Zo(o.mode),...n},overlays:r||Qo(o.mode),...a}}function es(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 ts=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:``}overlays-${n}`),`--${e?`${e}-`:``}palette-AppBar-darkBg`,`--${e?`${e}-`:``}palette-AppBar-darkColor`],ns=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 ts(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 rs(e,t){t.forEach(t=>{e[t]||(e[t]={})})}function B(e,t,n){!e[t]&&n&&(e[t]=n)}function is(e){return typeof e!=`string`||!e.startsWith(`hsl`)?e:Li(e)}function as(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Fi(is(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 os(e){return typeof e==`number`?`${e}px`:typeof e==`string`||typeof e==`function`||Array.isArray(e)?e:`8px`}var ss=e=>{try{return e()}catch{}},cs=(e=`mui`)=>ka(e);function ls(e,t,n,r,i){if(!n)return;n=n===!0?{}:n;let a=i===`dark`?`dark`:`light`;if(!r){t[i]=$o({...n,palette:{mode:a,...n?.palette},colorSpace:e});return}let{palette:o,...s}=Jo({...r,palette:{mode:a,...n?.palette},colorSpace:e});return t[i]={...n,palette:o,opacity:{...Zo(a),...n?.opacity},overlays:n?.overlays||Qo(a)},s}function us(e={},...t){let{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:a=`mui`,nativeColor:o=!1,shouldSkipGeneratingVar:s=es,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=cs(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=ls(b,v,y,u,f);h&&!v.light&&ls(b,v,h,void 0,`light`),g&&!v.dark&&ls(b,v,g,void 0,`dark`);let S={defaultColorScheme:f,...x,cssVarPrefix:a,colorSchemeSelector:c,rootSelector:l,getCssVar:p,colorSchemes:v,font:{...Eo(x.typography),...x.font},spacing:os(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`&&(B(t.common,`background`,`#fff`),B(t.common,`onBackground`,`#000`)),t.mode===`dark`&&(B(t.common,`background`,`#000`),B(t.common,`onBackground`,`#fff`));function r(e,t,n){if(b){let r;return e===Vi&&(r=`transparent ${((1-n)*100).toFixed(0)}%`),e===Ui&&(r=`#000 ${(n*100).toFixed(0)}%`),e===Gi&&(r=`#fff ${(n*100).toFixed(0)}%`),`color-mix(in ${b}, ${t}, ${r})`}return e(t,n)}if(rs(t,[`Alert`,`AppBar`,`Avatar`,`Button`,`Chip`,`FilledInput`,`LinearProgress`,`Skeleton`,`Slider`,`SnackbarContent`,`SpeedDialAction`,`StepConnector`,`StepContent`,`Switch`,`TableCell`,`Tooltip`]),t.mode===`light`){B(t.Alert,`errorColor`,r(Ui,o?p(`palette-error-light`):t.error.light,.6)),B(t.Alert,`infoColor`,r(Ui,o?p(`palette-info-light`):t.info.light,.6)),B(t.Alert,`successColor`,r(Ui,o?p(`palette-success-light`):t.success.light,.6)),B(t.Alert,`warningColor`,r(Ui,o?p(`palette-warning-light`):t.warning.light,.6)),B(t.Alert,`errorFilledBg`,n(`palette-error-main`)),B(t.Alert,`infoFilledBg`,n(`palette-info-main`)),B(t.Alert,`successFilledBg`,n(`palette-success-main`)),B(t.Alert,`warningFilledBg`,n(`palette-warning-main`)),B(t.Alert,`errorFilledColor`,ss(()=>t.getContrastText(t.error.main))),B(t.Alert,`infoFilledColor`,ss(()=>t.getContrastText(t.info.main))),B(t.Alert,`successFilledColor`,ss(()=>t.getContrastText(t.success.main))),B(t.Alert,`warningFilledColor`,ss(()=>t.getContrastText(t.warning.main))),B(t.Alert,`errorStandardBg`,r(Gi,o?p(`palette-error-light`):t.error.light,.9)),B(t.Alert,`infoStandardBg`,r(Gi,o?p(`palette-info-light`):t.info.light,.9)),B(t.Alert,`successStandardBg`,r(Gi,o?p(`palette-success-light`):t.success.light,.9)),B(t.Alert,`warningStandardBg`,r(Gi,o?p(`palette-warning-light`):t.warning.light,.9)),B(t.Alert,`errorIconColor`,n(`palette-error-main`)),B(t.Alert,`infoIconColor`,n(`palette-info-main`)),B(t.Alert,`successIconColor`,n(`palette-success-main`)),B(t.Alert,`warningIconColor`,n(`palette-warning-main`)),B(t.AppBar,`defaultBg`,n(`palette-grey-100`)),B(t.Avatar,`defaultBg`,n(`palette-grey-400`)),B(t.Button,`inheritContainedBg`,n(`palette-grey-300`)),B(t.Button,`inheritContainedHoverBg`,n(`palette-grey-A100`)),B(t.Chip,`defaultBorder`,n(`palette-grey-400`)),B(t.Chip,`defaultAvatarColor`,n(`palette-grey-700`)),B(t.Chip,`defaultIconColor`,n(`palette-grey-700`)),B(t.FilledInput,`bg`,`rgba(0, 0, 0, 0.06)`),B(t.FilledInput,`hoverBg`,`rgba(0, 0, 0, 0.09)`),B(t.FilledInput,`disabledBg`,`rgba(0, 0, 0, 0.12)`),B(t.LinearProgress,`primaryBg`,r(Gi,o?p(`palette-primary-main`):t.primary.main,.62)),B(t.LinearProgress,`secondaryBg`,r(Gi,o?p(`palette-secondary-main`):t.secondary.main,.62)),B(t.LinearProgress,`errorBg`,r(Gi,o?p(`palette-error-main`):t.error.main,.62)),B(t.LinearProgress,`infoBg`,r(Gi,o?p(`palette-info-main`):t.info.main,.62)),B(t.LinearProgress,`successBg`,r(Gi,o?p(`palette-success-main`):t.success.main,.62)),B(t.LinearProgress,`warningBg`,r(Gi,o?p(`palette-warning-light`):t.warning.main,.62)),B(t.Skeleton,`bg`,b?r(Vi,o?p(`palette-text-primary`):t.text.primary,.11):`rgba(${n(`palette-text-primaryChannel`)} / 0.11)`),B(t.Slider,`primaryTrack`,r(Gi,o?p(`palette-primary-main`):t.primary.main,.62)),B(t.Slider,`secondaryTrack`,r(Gi,o?p(`palette-secondary-main`):t.secondary.main,.62)),B(t.Slider,`errorTrack`,r(Gi,o?p(`palette-error-main`):t.error.main,.62)),B(t.Slider,`infoTrack`,r(Gi,o?p(`palette-info-main`):t.info.main,.62)),B(t.Slider,`successTrack`,r(Gi,o?p(`palette-success-main`):t.success.main,.62)),B(t.Slider,`warningTrack`,r(Gi,o?p(`palette-warning-main`):t.warning.main,.62));let e=b?r(Ui,o?p(`palette-background-default`):t.background.default,.6825):qi(t.background.default,.8);B(t.SnackbarContent,`bg`,e),B(t.SnackbarContent,`color`,ss(()=>b?ho.text.primary:t.getContrastText(e))),B(t.SpeedDialAction,`fabHoverBg`,qi(t.background.paper,.15)),B(t.StepConnector,`border`,n(`palette-grey-400`)),B(t.StepContent,`border`,n(`palette-grey-400`)),B(t.Switch,`defaultColor`,n(`palette-common-white`)),B(t.Switch,`defaultDisabledColor`,n(`palette-grey-100`)),B(t.Switch,`primaryDisabledColor`,r(Gi,o?p(`palette-primary-main`):t.primary.main,.62)),B(t.Switch,`secondaryDisabledColor`,r(Gi,o?p(`palette-secondary-main`):t.secondary.main,.62)),B(t.Switch,`errorDisabledColor`,r(Gi,o?p(`palette-error-main`):t.error.main,.62)),B(t.Switch,`infoDisabledColor`,r(Gi,o?p(`palette-info-main`):t.info.main,.62)),B(t.Switch,`successDisabledColor`,r(Gi,o?p(`palette-success-main`):t.success.main,.62)),B(t.Switch,`warningDisabledColor`,r(Gi,o?p(`palette-warning-main`):t.warning.main,.62)),B(t.TableCell,`border`,r(Gi,Vi(o?p(`palette-divider`):t.divider,1),.88)),B(t.Tooltip,`bg`,r(Vi,o?p(`palette-grey-700`):t.grey[700],.92))}if(t.mode===`dark`){B(t.Alert,`errorColor`,r(Gi,o?p(`palette-error-light`):t.error.light,.6)),B(t.Alert,`infoColor`,r(Gi,o?p(`palette-info-light`):t.info.light,.6)),B(t.Alert,`successColor`,r(Gi,o?p(`palette-success-light`):t.success.light,.6)),B(t.Alert,`warningColor`,r(Gi,o?p(`palette-warning-light`):t.warning.light,.6)),B(t.Alert,`errorFilledBg`,n(`palette-error-dark`)),B(t.Alert,`infoFilledBg`,n(`palette-info-dark`)),B(t.Alert,`successFilledBg`,n(`palette-success-dark`)),B(t.Alert,`warningFilledBg`,n(`palette-warning-dark`)),B(t.Alert,`errorFilledColor`,ss(()=>t.getContrastText(t.error.dark))),B(t.Alert,`infoFilledColor`,ss(()=>t.getContrastText(t.info.dark))),B(t.Alert,`successFilledColor`,ss(()=>t.getContrastText(t.success.dark))),B(t.Alert,`warningFilledColor`,ss(()=>t.getContrastText(t.warning.dark))),B(t.Alert,`errorStandardBg`,r(Ui,o?p(`palette-error-light`):t.error.light,.9)),B(t.Alert,`infoStandardBg`,r(Ui,o?p(`palette-info-light`):t.info.light,.9)),B(t.Alert,`successStandardBg`,r(Ui,o?p(`palette-success-light`):t.success.light,.9)),B(t.Alert,`warningStandardBg`,r(Ui,o?p(`palette-warning-light`):t.warning.light,.9)),B(t.Alert,`errorIconColor`,n(`palette-error-main`)),B(t.Alert,`infoIconColor`,n(`palette-info-main`)),B(t.Alert,`successIconColor`,n(`palette-success-main`)),B(t.Alert,`warningIconColor`,n(`palette-warning-main`)),B(t.AppBar,`defaultBg`,n(`palette-grey-900`)),B(t.AppBar,`darkBg`,n(`palette-background-paper`)),B(t.AppBar,`darkColor`,n(`palette-text-primary`)),B(t.Avatar,`defaultBg`,n(`palette-grey-600`)),B(t.Button,`inheritContainedBg`,n(`palette-grey-800`)),B(t.Button,`inheritContainedHoverBg`,n(`palette-grey-700`)),B(t.Chip,`defaultBorder`,n(`palette-grey-700`)),B(t.Chip,`defaultAvatarColor`,n(`palette-grey-300`)),B(t.Chip,`defaultIconColor`,n(`palette-grey-300`)),B(t.FilledInput,`bg`,`rgba(255, 255, 255, 0.09)`),B(t.FilledInput,`hoverBg`,`rgba(255, 255, 255, 0.13)`),B(t.FilledInput,`disabledBg`,`rgba(255, 255, 255, 0.12)`),B(t.LinearProgress,`primaryBg`,r(Ui,o?p(`palette-primary-main`):t.primary.main,.5)),B(t.LinearProgress,`secondaryBg`,r(Ui,o?p(`palette-secondary-main`):t.secondary.main,.5)),B(t.LinearProgress,`errorBg`,r(Ui,o?p(`palette-error-main`):t.error.main,.5)),B(t.LinearProgress,`infoBg`,r(Ui,o?p(`palette-info-main`):t.info.main,.5)),B(t.LinearProgress,`successBg`,r(Ui,o?p(`palette-success-main`):t.success.main,.5)),B(t.LinearProgress,`warningBg`,r(Ui,o?p(`palette-warning-main`):t.warning.main,.5)),B(t.Skeleton,`bg`,b?r(Vi,o?p(`palette-text-primary`):t.text.primary,.13):`rgba(${n(`palette-text-primaryChannel`)} / 0.13)`),B(t.Slider,`primaryTrack`,r(Ui,o?p(`palette-primary-main`):t.primary.main,.5)),B(t.Slider,`secondaryTrack`,r(Ui,o?p(`palette-secondary-main`):t.secondary.main,.5)),B(t.Slider,`errorTrack`,r(Ui,o?p(`palette-error-main`):t.error.main,.5)),B(t.Slider,`infoTrack`,r(Ui,o?p(`palette-info-main`):t.info.main,.5)),B(t.Slider,`successTrack`,r(Ui,o?p(`palette-success-main`):t.success.main,.5)),B(t.Slider,`warningTrack`,r(Ui,o?p(`palette-warning-light`):t.warning.main,.5));let e=b?r(Gi,o?p(`palette-background-default`):t.background.default,.985):qi(t.background.default,.98);B(t.SnackbarContent,`bg`,e),B(t.SnackbarContent,`color`,ss(()=>b?po.text.primary:t.getContrastText(e))),B(t.SpeedDialAction,`fabHoverBg`,qi(t.background.paper,.15)),B(t.StepConnector,`border`,n(`palette-grey-600`)),B(t.StepContent,`border`,n(`palette-grey-600`)),B(t.Switch,`defaultColor`,n(`palette-grey-300`)),B(t.Switch,`defaultDisabledColor`,n(`palette-grey-600`)),B(t.Switch,`primaryDisabledColor`,r(Ui,o?p(`palette-primary-main`):t.primary.main,.55)),B(t.Switch,`secondaryDisabledColor`,r(Ui,o?p(`palette-secondary-main`):t.secondary.main,.55)),B(t.Switch,`errorDisabledColor`,r(Ui,o?p(`palette-error-main`):t.error.main,.55)),B(t.Switch,`infoDisabledColor`,r(Ui,o?p(`palette-info-main`):t.info.main,.55)),B(t.Switch,`successDisabledColor`,r(Ui,o?p(`palette-success-main`):t.success.main,.55)),B(t.Switch,`warningDisabledColor`,r(Ui,o?p(`palette-warning-light`):t.warning.main,.55)),B(t.TableCell,`border`,r(Ui,Vi(o?p(`palette-divider`):t.divider,1),.68)),B(t.Tooltip,`bg`,r(Vi,o?p(`palette-grey-700`):t.grey[700],.92))}o||(as(t.background,`default`),as(t.background,`paper`),as(t.common,`background`),as(t.common,`onBackground`),as(t,`divider`)),Object.keys(t).forEach(e=>{let n=t[e];e!==`tonalOffset`&&!o&&n&&typeof n==`object`&&(n.main&&B(t[e],`mainChannel`,Fi(is(n.main))),n.light&&B(t[e],`lightChannel`,Fi(is(n.light))),n.dark&&B(t[e],`darkChannel`,Fi(is(n.dark))),n.contrastText&&B(t[e],`contrastTextChannel`,Fi(is(n.contrastText))),e===`text`&&(as(t[e],`primary`),as(t[e],`secondary`)),e===`action`&&(n.active&&as(t[e],`active`),n.selected&&as(t[e],`selected`)))})}),S=t.reduce((e,t)=>hn(e,t),S);let C={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:ns(S),enableContrastVars:o},{vars:w,generateThemeVars:T,generateStyleSheets:E}=Pa(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 hr(u.spacing,cr(this))},S.getColorSchemeSelector=Fa(c),S.spacing=S.generateSpacing(),S.shouldSkipGeneratingVar=s,S.unstable_sxConfig={...Ur,...u?.unstable_sxConfig},S.unstable_sx=function(e){return Kr({sx:e,theme:this})},S.internal_cache={},S.toRuntimeSource=Wo,S}function ds(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:To({...n===!0?{}:n.palette,mode:t})})}function fs(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 Jo(e,...t);let r=n;`palette`in e||l[s]&&(l[s]===!0?s===`dark`&&(r={mode:`dark`}):r=l[s].palette);let i=Jo({...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},ds(i,`dark`,l.dark)),i.palette.mode===`dark`&&(i.colorSchemes.dark={...l.dark!==!0&&l.dark,palette:i.palette},ds(i,`light`,l.light)),i}return!n&&!(`light`in l)&&s===`light`&&(l.light=!0),us({...o,colorSchemes:l,defaultColorScheme:s,...typeof r!=`boolean`&&r},...t)}var ps=fs();function ms(){let e=ei(ps);return e.$$material||e}function hs(e){return e!==`ownerState`&&e!==`theme`&&e!==`sx`&&e!==`as`}var gs=e=>hs(e)&&e!==`classes`,V=vi({themeId:O,defaultTheme:ps,rootShouldForwardProp:gs});function _s({theme:e,...t}){let n=`$$material`in e?e[O]:void 0;return(0,R.jsx)(pa,{...t,themeId:n?O:void 0,theme:n||e})}var vs={attribute:`data-mui-color-scheme`,colorSchemeStorageKey:`mui-color-scheme`,defaultLightColorScheme:`light`,defaultDarkColorScheme:`dark`,modeStorageKey:`mui-mode`},{CssVarsProvider:ys,useColorScheme:bs,getInitColorSchemeScript:xs}=Oa({themeId:O,theme:()=>fs({cssVariables:!0}),colorSchemeStorageKey:vs.colorSchemeStorageKey,modeStorageKey:vs.modeStorageKey,defaultColorScheme:{light:vs.defaultLightColorScheme,dark:vs.defaultDarkColorScheme},resolveTheme:e=>{let t={...e,typography:jo(e.palette,e.typography)};return t.unstable_sx=function(e){return Kr({sx:e,theme:this})},t}}),Ss=ys;function Cs({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)(_s,{theme:n,...t}):(0,R.jsx)(Ss,{theme:e,...t})}var H=Jn;function ws(...e){return e.reduce((e,t)=>t==null?e:function(...n){e.apply(this,n),t.apply(this,n)},()=>{})}var Ts=ws;function Es(e){return(0,R.jsx)(ni,{...e,defaultTheme:ps,themeId:O})}function Ds(e){return function(t){return(0,R.jsx)(Es,{styles:typeof e==`function`?n=>e({theme:n,...t}):e})}}var U=ha;function Os(e){return aa(e)}function ks(e){return ci(`MuiSvgIcon`,e)}li(`MuiSvgIcon`,[`root`,`colorPrimary`,`colorSecondary`,`colorAction`,`colorError`,`colorDisabled`,`fontSizeInherit`,`fontSizeSmall`,`fontSizeMedium`,`fontSizeLarge`]);var As=e=>{let{color:t,fontSize:n,classes:r}=e;return Ia({root:[`root`,t!==`inherit`&&`color${H(t)}`,`fontSize${H(n)}`]},ks,r)},js=V(`svg`,{name:`MuiSvgIcon`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color!==`inherit`&&t[`color${H(n.color)}`],t[`fontSize${H(n.fontSize)}`]]}})(U(({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}}]}))),Ms=L.forwardRef(function(e,t){let n=Os({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)(js,{as:o,className:z(As(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]})});Ms.muiName=`SvgIcon`;function Ns(e,t){function n(t,n){return(0,R.jsx)(Ms,{"data-testid":void 0,ref:n,...t,children:e})}return n.muiName=Ms.muiName,L.memo(L.forwardRef(n))}function Ps(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}return r.clear=()=>{clearTimeout(n)},r}var Fs=Ps,Is=La;function Ls(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}var Rs=Ls;function zs(e){return e&&e.ownerDocument||document}var Bs=zs;function Vs(e){return zs(e).defaultView||window}var Hs=Vs;function Us(e,t){typeof e==`function`?e(t):e&&(e.current=t)}var Ws=Ti,Gs=la;function Ks(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 qs=Ks;function Js(e){let t=L.useRef(e);return Ti(()=>{t.current=e}),L.useRef((...e)=>(0,t.current)(...e)).current}var Ys=Js;function Xs(...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 Zs=Xs;function Qs(e,t){let n=e.charCodeAt(2);return e[0]===`o`&&e[1]===`n`&&n>=65&&n<=90&&typeof t==`function`}function $s(e,t){if(!e)return t;function n(e,t){let n={};return Object.keys(t).forEach(r=>{Qs(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 ec(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 tc(e,t){return tc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},tc(e,t)}function nc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,tc(e,t)}var rc={disabled:!1},ic=L.createContext(null),ac=function(e){return e.scrollTop},oc=l(h()),sc=`unmounted`,cc=`exited`,lc=`entering`,uc=`entered`,dc=`exiting`,fc=function(e){nc(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=cc,r.appearStatus=lc):o=uc:o=t.unmountOnExit||t.mountOnEnter?sc:cc,r.state={status:o},r.nextCallback=null,r}t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:cc}: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=lc):(n===`entering`||n===`entered`)&&(t=dc)}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:oc.default.findDOMNode(this);n&&ac(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:sc})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[oc.default.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;if(!e&&!n||rc.disabled){this.safeSetState({status:uc},function(){t.props.onEntered(a)});return}this.props.onEnter(a,o),this.safeSetState({status:lc},function(){t.props.onEntering(a,o),t.onTransitionEnd(c,function(){t.safeSetState({status:uc},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:oc.default.findDOMNode(this);if(!t||rc.disabled){this.safeSetState({status:cc},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:dc},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:cc},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:oc.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=ec(t,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return L.createElement(ic.Provider,{value:null},typeof n==`function`?n(e,r):L.cloneElement(L.Children.only(n),r))},t}(L.Component);fc.contextType=ic,fc.propTypes={};function pc(){}fc.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:pc,onEntering:pc,onEntered:pc,onExit:pc,onExiting:pc,onExited:pc},fc.UNMOUNTED=sc,fc.EXITED=cc,fc.ENTERING=lc,fc.ENTERED=uc,fc.EXITING=dc;function mc(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function hc(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 gc(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 _c(e,t,n){return n[t]==null?e.props[t]:n[t]}function vc(e,t){return hc(e.children,function(n){return(0,L.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:_c(n,`appear`,e),enter:_c(n,`enter`,e),exit:_c(n,`exit`,e)})})}function yc(e,t,n){var r=hc(e.children),i=gc(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:_c(o,`exit`,e),enter:_c(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:_c(o,`exit`,e),enter:_c(o,`enter`,e)}))}}),i}var bc=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},xc={component:`div`,childFactory:function(e){return e}},Sc=function(e){nc(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.state={contextValue:{isMounting:!0},handleExited:r.handleExited.bind(mc(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?vc(e,r):yc(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=hc(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=ee({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=ec(e,[`component`,`childFactory`]),i=this.state.contextValue,a=bc(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,t===null?L.createElement(ic.Provider,{value:i},a):L.createElement(ic.Provider,{value:i},L.createElement(t,r,a))},t}(L.Component);Sc.propTypes={},Sc.defaultProps=xc;var Cc={};function wc(e,t){let n=L.useRef(Cc);return n.current===Cc&&(n.current=e(t)),n}var Tc=[];function Ec(e){L.useEffect(e,Tc)}var Dc=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 Oc(){let e=wc(Dc.create).current;return Ec(e.disposeEffect),e}var kc=e=>e.scrollTop;function Ac(e,t){return n=>{if(t){let r=e.current;n===void 0?t(r):t(r,n)}}}function jc(e,t,n,r,i,a){let o=e===`exited`&&!t?r:n[e]||n.exited;return i||a?{...o,...i,...a}:o}function Mc(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 Nc(e){return typeof e==`string`}function Pc(e,t,n){return e===void 0||Nc(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function Fc(e,t,n){return typeof e==`function`?e(t,n):e}function Ic(e){if(e===void 0)return{};let t={};for(let n of Object.keys(e))Qs(n,e[n])&&(t[n]=e[n]);return t}function Lc(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 Rc(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=Ic({...i,...r}),s=Lc(r),c=Lc(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 zc(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=Fc(d[e],i),{props:{component:h,...g},internalRef:_}=Rc({className:n,...c,externalForwardedProps:e===`root`?f:void 0,externalSlotProps:m}),v=Xs(_,m?.ref,t.ref),y=e===`root`?h||l:h;return[p,Pc(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 Bc(e){return ci(`MuiCollapse`,e)}li(`MuiCollapse`,[`root`,`horizontal`,`vertical`,`entered`,`hidden`,`wrapper`,`wrapperInner`]);var Vc=e=>{let{orientation:t,classes:n}=e;return Ia({root:[`root`,t],entered:[`entered`],hidden:[`hidden`],wrapper:[`wrapper`,t],wrapperInner:[`wrapperInner`,t]},Bc,n)},Hc=V(`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]}})(U(({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`}}]}))),Uc=V(`div`,{name:`MuiCollapse`,slot:`Wrapper`})({display:`flex`,width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),Wc=V(`div`,{name:`MuiCollapse`,slot:`WrapperInner`})({width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),Gc=L.forwardRef(function(e,t){let n=Os({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=Ro.standard,TransitionComponent:x=fc,...S}=n,C={...n,orientation:g,collapsedSize:o},w=Vc(C),T=ms(),E=Oc(),D=L.useRef(null),O=L.useRef(),ee=typeof o==`number`?`${o}px`:o,te=g===`horizontal`,k=te?`width`:`height`,A=L.useRef(null),j=Zs(t,A),ne=()=>D.current?D.current[te?`clientWidth`:`clientHeight`]:0,re=Ac(A,(e,t)=>{D.current&&te&&(D.current.style.position=`absolute`),e.style[k]=ee,u&&u(e,t)}),M=Ac(A,(e,t)=>{let n=ne();D.current&&te&&(D.current.style.position=``);let{duration:r,easing:i}=Mc({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[k]=`${n}px`,e.style.transitionTimingFunction=i,f&&f(e,t)}),N=Ac(A,(e,t)=>{e.style[k]=`auto`,d&&d(e,t)}),ie=Ac(A,e=>{e.style[k]=`${ne()}px`,p&&p(e)}),ae=Ac(A,m),P=Ac(A,e=>{let t=ne(),{duration:n,easing:r}=Mc({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[k]=ee,e.style.transitionTimingFunction=r,h&&h(e)}),oe=e=>{b===`auto`&&E.start(O.current||0,e),r&&r(A.current,e)},F={slots:_,slotProps:v,component:s},[se,ce]=zc(`root`,{ref:j,className:z(w.root,a),elementType:Hc,externalForwardedProps:F,ownerState:C,additionalProps:{style:{[te?`minWidth`:`minHeight`]:ee,...y}}}),[le,ue]=zc(`wrapper`,{ref:D,className:w.wrapper,elementType:Uc,externalForwardedProps:F,ownerState:C}),[de,fe]=zc(`wrapperInner`,{className:w.wrapperInner,elementType:Wc,externalForwardedProps:F,ownerState:C});return(0,R.jsx)(x,{in:l,onEnter:re,onEntered:N,onEntering:M,onExit:ie,onExited:ae,onExiting:P,addEndListener:oe,nodeRef:A,timeout:b===`auto`?null:b,...S,children:(e,{ownerState:t,...n})=>{let r={...C,state:e};return(0,R.jsx)(se,{...ce,className:z(ce.className,{entered:w.entered,exited:!l&&ee===`0px`&&w.hidden}[e]),ownerState:r,...n,children:(0,R.jsx)(le,{...ue,ownerState:r,children:(0,R.jsx)(de,{...fe,ownerState:r,children:i})})})}})});Gc&&(Gc.muiSupportAuto=!0);function Kc(e){return ci(`MuiPaper`,e)}li(`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 qc=e=>{let{square:t,elevation:n,variant:r,classes:i}=e;return Ia({root:[`root`,r,!t&&`rounded`,r===`elevation`&&`elevation${n}`]},Kc,i)},Jc=V(`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}`]]}})(U(({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)`}}]}))),Yc=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiPaper`}),r=ms(),{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)(Jc,{as:a,ownerState:u,className:z(qc(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(${Bi(`#fff`,Yo(o))}, ${Bi(`#fff`,Yo(o))})`}},...l.style}})}),Xc=L.createContext({});function Zc(e){return ci(`MuiAccordion`,e)}var Qc=li(`MuiAccordion`,[`root`,`heading`,`rounded`,`expanded`,`disabled`,`gutters`,`region`]),$c=e=>{let{classes:t,square:n,expanded:r,disabled:i,disableGutters:a}=e;return Ia({root:[`root`,!n&&`rounded`,r&&`expanded`,i&&`disabled`,!a&&`gutters`],heading:[`heading`],region:[`region`]},Zc,t)},el=V(Yc,{name:`MuiAccordion`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${Qc.region}`]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})(U(({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`}},[`&.${Qc.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:`none`}}},[`&.${Qc.disabled}`]:{backgroundColor:(e.vars||e).palette.action.disabledBackground}}}),U(({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:{[`&.${Qc.expanded}`]:{margin:`16px 0`}}}]}))),tl=V(`h3`,{name:`MuiAccordion`,slot:`Heading`})({all:`unset`}),nl=V(`div`,{name:`MuiAccordion`,slot:`Region`})({}),rl=L.forwardRef(function(e,t){let n=Os({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={},...f}=n,[p,m]=qs({controlled:c,default:a,name:`Accordion`,state:`expanded`}),h=L.useCallback(e=>{m(!p),l&&l(e,!p)},[p,l,m]),[g,..._]=L.Children.toArray(r),v=L.useMemo(()=>({expanded:p,disabled:o,disableGutters:s,toggle:h}),[p,o,s,h]),y={...n,disabled:o,disableGutters:s,expanded:p},b=$c(y),x={slots:u,slotProps:d},[S,C]=zc(`root`,{elementType:el,externalForwardedProps:{...x,...f},className:z(b.root,i),shouldForwardComponentProp:!0,ownerState:y,ref:t}),[w,T]=zc(`heading`,{elementType:tl,externalForwardedProps:x,className:b.heading,ownerState:y}),[E,D]=zc(`transition`,{elementType:Gc,externalForwardedProps:x,ownerState:y}),[O,ee]=zc(`region`,{elementType:nl,externalForwardedProps:x,ownerState:y,className:b.region,additionalProps:{"aria-labelledby":g.props.id,id:g.props[`aria-controls`],role:`region`}});return(0,R.jsxs)(S,{...C,children:[(0,R.jsx)(w,{...T,children:(0,R.jsx)(Xc.Provider,{value:v,children:g})}),(0,R.jsx)(E,{in:p,timeout:`auto`,...D,children:(0,R.jsx)(O,{...ee,children:_})})]})});function il(e){return ci(`MuiAccordionDetails`,e)}li(`MuiAccordionDetails`,[`root`]);var al=e=>{let{classes:t}=e;return Ia({root:[`root`]},il,t)},ol=V(`div`,{name:`MuiAccordionDetails`,slot:`Root`})(U(({theme:e})=>({padding:e.spacing(1,2,2)}))),sl=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiAccordionDetails`}),{className:r,...i}=n,a=n;return(0,R.jsx)(ol,{className:z(al(a).root,r),ref:t,ownerState:a,...i})});function cl(e){try{return e.matches(`:focus-visible`)}catch{}return!1}function ll(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return L.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}var ul={};function dl(e){let{nativeButton:t,nativeButtonProp:n,internalNativeButton:r=t,allowInferredHostMismatch:i=!1,disabled:a,type:o,hasFormAction:s=!1,tabIndex:c=0,focusableWhenDisabled:l,stopEventPropagation:u=!1,onBeforeKeyDown:d,onBeforeKeyUp:f}=e,p=L.useRef(null),m=l===!0,h=ll({focusableWhenDisabled:m,disabled:a,isNativeButton:t,tabIndex:c}),g=L.useCallback(()=>{let e=p.current;return e==null?t:e.tagName===`BUTTON`?!0:!!(e.tagName===`A`&&e.href)},[t]),_=L.useMemo(()=>{let e=m?{}:{tabIndex:a?-1:c};return t?(e.type=o===void 0&&!s?`button`:o,m||(e.disabled=a)):(e.role=`button`,!m&&a&&(e[`aria-disabled`]=a)),m?{...e,...h}:e},[a,m,h,s,t,c,o]);return{getButtonProps:L.useCallback((e=ul)=>{let{onClick:t,onKeyDown:n,onKeyUp:r,...i}=e,o=e=>{if(u&&e.stopPropagation(),a){e.preventDefault();return}t?.(e)},s=e=>{if(m&&h.onKeyDown(e),!a&&(d?.(e),n?.(e),!(e.target!==e.currentTarget||g()))){if(e.key===` `){e.preventDefault();return}e.key===`Enter`&&(e.preventDefault(),e.currentTarget.click())}},c=e=>{a||(f?.(e),r?.(e),e.target===e.currentTarget&&!g()&&e.key===` `&&!e.defaultPrevented&&e.currentTarget.click())};return{..._,...i,onClick:o,onKeyDown:s,onKeyUp:c}},[_,a,m,h,g,d,f,u]),rootRef:p}}var fl=class e{static create(){return new e}static use(){let t=wc(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=ml(),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 pl(){return fl.use()}function ml(){let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n}function hl(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 gl=li(`MuiTouchRipple`,[`root`,`ripple`,`rippleVisible`,`ripplePulsate`,`child`,`childLeaving`,`childPulsate`]),_l=550,vl=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
+ `,yl=Gt`
56
+ 0% {
57
+ opacity: 1;
58
+ }
59
+
60
+ 100% {
61
+ opacity: 0;
62
+ }
63
+ `,bl=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
+ `,xl=V(`span`,{name:`MuiTouchRipple`,slot:`Root`})({overflow:`hidden`,pointerEvents:`none`,position:`absolute`,zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:`inherit`}),Sl=V(hl,{name:`MuiTouchRipple`,slot:`Ripple`})`
76
+ opacity: 0;
77
+ position: absolute;
78
+
79
+ &.${gl.rippleVisible} {
80
+ opacity: 0.3;
81
+ transform: scale(1);
82
+ animation-name: ${vl};
83
+ animation-duration: ${_l}ms;
84
+ animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
85
+ }
86
+
87
+ &.${gl.ripplePulsate} {
88
+ animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms;
89
+ }
90
+
91
+ & .${gl.child} {
92
+ opacity: 1;
93
+ display: block;
94
+ width: 100%;
95
+ height: 100%;
96
+ border-radius: 50%;
97
+ background-color: currentColor;
98
+ }
99
+
100
+ & .${gl.childLeaving} {
101
+ opacity: 0;
102
+ animation-name: ${yl};
103
+ animation-duration: ${_l}ms;
104
+ animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
105
+ }
106
+
107
+ & .${gl.childPulsate} {
108
+ position: absolute;
109
+ /* @noflip */
110
+ left: 0px;
111
+ top: 0;
112
+ animation-name: ${bl};
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
+ `,Cl=L.forwardRef(function(e,t){let{center:n=!1,classes:r={},className:i,...a}=Os({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=Oc(),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)(Sl,{classes:{ripple:z(r.ripple,gl.ripple),rippleVisible:z(r.rippleVisible,gl.rippleVisible),ripplePulsate:z(r.ripplePulsate,gl.ripplePulsate),child:z(r.child,gl.child),childLeaving:z(r.childLeaving,gl.childLeaving),childPulsate:z(r.childPulsate,gl.childPulsate)},timeout:_l,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)(xl,{className:z(gl.root,r.root,i),ref:p,...a,children:(0,R.jsx)(Sc,{component:null,exit:!0,children:o})})});function wl(e){return ci(`MuiButtonBase`,e)}var Tl=li(`MuiButtonBase`,[`root`,`disabled`,`focusVisible`]),El=e=>{let{disabled:t,focusVisible:n,focusVisibleClassName:r,suppressFocusVisible:i,classes:a}=e,o=Ia({root:[`root`,t&&`disabled`,n&&!i&&`focusVisible`]},wl,a);return n&&!i&&r&&(o.root+=` ${r}`),o},Dl=V(`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`},[`&.${Tl.disabled}`]:{pointerEvents:`none`,cursor:`default`},"@media print":{colorAdjust:`exact`}}),Ol=L.forwardRef(function(e,t){let n=Os({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,focusableWhenDisabled:p,suppressFocusVisible:m=!1,internalNativeButton:h,LinkComponent:g=`a`,nativeButton:_,onBlur:v,onClick:y,onContextMenu:b,onDragLeave:x,onFocus:S,onFocusVisible:C,onKeyDown:w,onKeyUp:T,onMouseDown:E,onMouseLeave:D,onMouseUp:O,onTouchEnd:ee,onTouchMove:te,onTouchStart:k,tabIndex:A=0,TouchRippleProps:j,touchRippleRef:ne,type:re,...M}=n,N=!!(M.href||M.to),ie=!!M.formAction,ae=s;ae===`button`&&N&&(ae=g);let P=typeof ae==`string`?ae===`button`:h??!1,oe=_??P,F=pl(),se=Zs(F.ref,ne),[ce,le]=L.useState(!1);(c||m)&&ce&&le(!1);let ue=Ys(e=>{d&&!e.repeat&&ce&&e.key===` `&&F.stop(e,()=>{F.start(e)})}),de=Ys(e=>{d&&e.key===` `&&ce&&!e.defaultPrevented&&F.stop(e,()=>{F.pulsate(e)})}),{getButtonProps:fe,rootRef:I}=dl({nativeButton:oe,nativeButtonProp:_,internalNativeButton:P,allowInferredHostMismatch:N||typeof ae==`string`,disabled:c,type:re,hasFormAction:ie,tabIndex:A,onBeforeKeyDown:ue,onBeforeKeyUp:de}),{onClick:pe,onKeyDown:me,onKeyUp:he,...ge}=fe({onClick:y,onKeyDown:w,onKeyUp:T});L.useImperativeHandle(r,()=>({focusVisible:()=>{le(!0),I.current.focus()}}),[I]);let _e=F.shouldMount&&!l&&!c;L.useEffect(()=>{ce&&d&&!l&&F.pulsate()},[l,d,ce,F]);let ve=kl(F,`start`,E,u),ye=kl(F,`stop`,b,u),be=kl(F,`stop`,x,u),xe=kl(F,`stop`,O,u),Se=kl(F,`stop`,e=>{ce&&e.preventDefault(),D&&D(e)},u),Ce=kl(F,`start`,k,u),we=kl(F,`stop`,ee,u),Te=kl(F,`stop`,te,u),Ee=kl(F,`stop`,e=>{cl(e.target)||le(!1),v&&v(e)},!1),De=Ys(e=>{I.current||=e.currentTarget,!m&&cl(e.target)&&(le(!0),C&&C(e)),S&&S(e)}),Oe={};N&&(Oe.tabIndex=c?-1:A,c&&(Oe[`aria-disabled`]=c),Oe.type=re);let ke=Zs(t,I),Ae={...n,centerRipple:i,component:s,disabled:c,disableRipple:l,disableTouchRipple:u,focusRipple:d,suppressFocusVisible:m,tabIndex:A,focusVisible:ce},je=El(Ae);return(0,R.jsxs)(Dl,{as:ae,className:z(je.root,o),ownerState:Ae,onBlur:Ee,onClick:pe,onContextMenu:ye,onFocus:De,onKeyDown:me,onKeyUp:he,onMouseDown:ve,onMouseLeave:Se,onMouseUp:xe,onDragLeave:be,onTouchEnd:we,onTouchMove:Te,onTouchStart:Ce,ref:ke,...N?Oe:ge,...M,children:[a,_e?(0,R.jsx)(Cl,{ref:se,center:i,...j}):null]})});function kl(e,t,n,r=!1){return Ys(i=>(n&&n(i),r||e[t](i),!0))}function Al(e){return ci(`MuiAccordionSummary`,e)}var jl=li(`MuiAccordionSummary`,[`root`,`expanded`,`focusVisible`,`disabled`,`gutters`,`content`,`expandIconWrapper`]),Ml=e=>{let{classes:t,expanded:n,disabled:r,disableGutters:i}=e;return Ia({root:[`root`,n&&`expanded`,r&&`disabled`,!i&&`gutters`],focusVisible:[`focusVisible`],content:[`content`,n&&`expanded`],expandIconWrapper:[`expandIconWrapper`,n&&`expanded`]},Al,t)},Nl=V(Ol,{name:`MuiAccordionSummary`,slot:`Root`})(U(({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),[`&.${jl.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${jl.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${jl.disabled})`]:{cursor:`pointer`},variants:[{props:e=>!e.disableGutters,style:{[`&.${jl.expanded}`]:{minHeight:64}}}]}})),Pl=V(`span`,{name:`MuiAccordionSummary`,slot:`Content`})(U(({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}),[`&.${jl.expanded}`]:{margin:`20px 0`}}}]}))),Fl=V(`span`,{name:`MuiAccordionSummary`,slot:`ExpandIconWrapper`})(U(({theme:e})=>({display:`flex`,color:(e.vars||e).palette.action.active,transform:`rotate(0deg)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shortest}),[`&.${jl.expanded}`]:{transform:`rotate(180deg)`}}))),Il=L.forwardRef(function(e,t){let n=Os({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(Xc),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]=zc(`root`,{ref:t,shouldForwardComponentProp:!0,className:z(_.root,i),elementType:Nl,externalForwardedProps:{...v,...u},ownerState:g,additionalProps:{focusRipple:!1,disableRipple:!0,internalNativeButton:!0,disabled:d,"aria-expanded":p,focusVisibleClassName:z(_.focusVisible,o)},getSlotProps:e=>({...e,onClick:t=>{e.onClick?.(t),h(t)}})}),[x,S]=zc(`content`,{className:_.content,elementType:Pl,externalForwardedProps:v,ownerState:g}),[C,w]=zc(`expandIconWrapper`,{className:_.expandIconWrapper,elementType:Fl,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 Ll(e){return typeof e.main==`string`}function Rl(e,t=[]){if(!Ll(e))return!1;for(let n of t)if(!e.hasOwnProperty(n)||typeof e[n]!=`string`)return!1;return!0}function zl(e=[]){return([,t])=>t&&Rl(t,e)}function Bl(e){return ci(`MuiCircularProgress`,e)}li(`MuiCircularProgress`,[`root`,`determinate`,`indeterminate`,`colorPrimary`,`colorSecondary`,`svg`,`track`,`circle`,`circleDisableShrink`]);var Vl=44,Hl=Gt`
119
+ 0% {
120
+ transform: rotate(0deg);
121
+ }
122
+
123
+ 100% {
124
+ transform: rotate(360deg);
125
+ }
126
+ `,Ul=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
+ `,Wl=typeof Hl==`string`?null:Wt`
142
+ animation: ${Hl} 1.4s linear infinite;
143
+ `,Gl=typeof Ul==`string`?null:Wt`
144
+ animation: ${Ul} 1.4s ease-in-out infinite;
145
+ `,Kl=e=>{let{classes:t,variant:n,color:r,disableShrink:i}=e;return Ia({root:[`root`,n,`color${H(r)}`],svg:[`svg`],track:[`track`],circle:[`circle`,i&&`circleDisableShrink`]},Bl,t)},ql=V(`span`,{name:`MuiCircularProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`color${H(n.color)}`]]}})(U(({theme:e})=>({display:`inline-block`,variants:[{props:{variant:`determinate`},style:{transition:e.transitions.create(`transform`)}},{props:{variant:`indeterminate`},style:Wl||{animation:`${Hl} 1.4s linear infinite`}},...Object.entries(e.palette).filter(zl()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),Jl=V(`svg`,{name:`MuiCircularProgress`,slot:`Svg`})({display:`block`}),Yl=V(`circle`,{name:`MuiCircularProgress`,slot:`Circle`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.circle,n.disableShrink&&t.circleDisableShrink]}})(U(({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:Gl||{animation:`${Ul} 1.4s ease-in-out infinite`}}]}))),Xl=V(`circle`,{name:`MuiCircularProgress`,slot:`Track`})(U(({theme:e})=>({stroke:`currentColor`,opacity:(e.vars||e).palette.action.activatedOpacity}))),Zl=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiCircularProgress`}),{className:r,color:i=`primary`,disableShrink:a=!1,enableTrackSlot:o=!1,min:s,max:c,size:l=40,style:u,thickness:d=3.6,value:f=n.min??0,variant:p=`indeterminate`,...m}=n,h=s??0,g=c??100,_={...n,color:i,disableShrink:a,size:l,thickness:d,value:f,variant:p,enableTrackSlot:o},v=Kl(_),y={},b={},x={};if(p===`determinate`){let e=2*Math.PI*((Vl-d)/2),t=g-h;y.strokeDasharray=e.toFixed(3),y.strokeDashoffset=t>0?`${((g-f)/t*e).toFixed(3)}px`:`${e.toFixed(3)}px`,b.transform=`rotate(-90deg)`,x[`aria-valuenow`]=f,x[`aria-valuemin`]=h,x[`aria-valuemax`]=g}return(0,R.jsx)(ql,{className:z(v.root,r),style:{width:l,height:l,...b,...u},ownerState:_,ref:t,role:`progressbar`,...x,...m,children:(0,R.jsxs)(Jl,{className:v.svg,ownerState:_,viewBox:`${Vl/2} ${Vl/2} ${Vl} ${Vl}`,children:[o?(0,R.jsx)(Xl,{className:v.track,ownerState:_,cx:Vl,cy:Vl,r:(Vl-d)/2,fill:`none`,strokeWidth:d,"aria-hidden":`true`}):null,(0,R.jsx)(Yl,{className:v.circle,style:y,ownerState:_,cx:Vl,cy:Vl,r:(Vl-d)/2,fill:`none`,strokeWidth:d})]})})});function Ql(e){return ci(`MuiIconButton`,e)}var $l=li(`MuiIconButton`,[`root`,`disabled`,`colorInherit`,`colorPrimary`,`colorSecondary`,`colorError`,`colorInfo`,`colorSuccess`,`colorWarning`,`edgeStart`,`edgeEnd`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`loading`,`loadingIndicator`,`loadingWrapper`]),eu=e=>{let{classes:t,disabled:n,color:r,edge:i,size:a,loading:o}=e;return Ia({root:[`root`,o&&`loading`,n&&`disabled`,r!==`default`&&`color${H(r)}`,i&&`edge${H(i)}`,`size${H(a)}`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},Ql,t)},tu=V(Ol,{name:`MuiIconButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!==`default`&&t[`color${H(n.color)}`],n.edge&&t[`edge${H(n.edge)}`],t[`size${H(n.size)}`]]}})(U(({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}}]})),U(({theme:e})=>({variants:[{props:{color:`inherit`},style:{color:`inherit`}},...Object.entries(e.palette).filter(zl()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main,"--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)}}],[`&.${$l.disabled}`]:{backgroundColor:`transparent`,color:(e.vars||e).palette.action.disabled},[`&.${$l.loading}`]:{color:`transparent`}}))),nu=V(`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`}}]})),ru=L.forwardRef(function(e,t){let n=Os({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=Gs(u),h=f??(0,R.jsx)(Zl,{"aria-labelledby":m,color:`inherit`,size:16}),g={...n,edge:r,color:o,disabled:s,disableFocusRipple:c,loading:d,loadingIndicator:h,size:l},_=eu(g);return(0,R.jsxs)(tu,{id:d?m:u,className:z(_.root,a),centerRipple:!0,internalNativeButton:!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)(nu,{className:_.loadingIndicator,ownerState:g,children:d&&h})}),i]})}),iu=Ns((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 au(e){return ci(`MuiTypography`,e)}var ou=li(`MuiTypography`,[`root`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`subtitle1`,`subtitle2`,`body1`,`body2`,`inherit`,`button`,`caption`,`overline`,`alignLeft`,`alignRight`,`alignCenter`,`alignJustify`,`noWrap`,`gutterBottom`]),su=e=>{let{align:t,gutterBottom:n,noWrap:r,variant:i,classes:a}=e;return Ia({root:[`root`,i,e.align!==`inherit`&&`align${H(t)}`,n&&`gutterBottom`,r&&`noWrap`]},au,a)},cu=V(`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${H(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom]}})(U(({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(zl()).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${H(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`}}]}))),lu={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 n=Os({props:e,name:`MuiTypography`}),{color:r,align:i=`inherit`,className:a,component:o,gutterBottom:s=!1,noWrap:c=!1,variant:l=`body1`,variantMapping:u=lu,...d}=n,f={...n,align:i,color:r,className:a,component:o,gutterBottom:s,noWrap:c,variant:l,variantMapping:u};return(0,R.jsx)(cu,{as:o||u[l]||lu[l]||`span`,ref:t,className:z(su(f).root,a),...d,ownerState:f,style:{...i!==`inherit`&&{"--Typography-textAlign":i},...d.style}})});function uu(e){return ci(`MuiAppBar`,e)}li(`MuiAppBar`,[`root`,`positionFixed`,`positionAbsolute`,`positionSticky`,`positionStatic`,`positionRelative`,`colorDefault`,`colorPrimary`,`colorSecondary`,`colorInherit`,`colorTransparent`,`colorError`,`colorInfo`,`colorSuccess`,`colorWarning`]);var du=e=>{let{color:t,position:n,classes:r}=e;return Ia({root:[`root`,`color${H(t)}`,`position${H(n)}`]},uu,r)},fu=(e,t)=>e?`${e.replace(`)`,``)}, ${t})`:t,pu=V(Yc,{name:`MuiAppBar`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`position${H(n.position)}`],t[`color${H(n.color)}`]]}})(U(({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(zl([`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?fu(e.vars.palette.AppBar.darkBg,`var(--AppBar-background)`):null,color:e.vars?fu(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`})}}]}))),mu=L.forwardRef(function(e,t){let n=Os({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)(pu,{square:!0,component:`header`,ownerState:c,elevation:4,className:z(du(c).root,r,o===`fixed`&&`mui-fixed`),ref:t,...s})});function hu(){let[,e]=L.useState({});return L.useCallback(()=>{e({})},[])}function gu(e,t){if(!e||!t)return!1;if(e.contains(t))return!0;let n=t.getRootNode?.();if(n&&n instanceof ShadowRoot){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode??n.host??null}}return!1}function _u(e){let t=L.useRef({});return L.useEffect(()=>{t.current=e}),t.current}function vu({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 yu(e){return e.normalize(`NFD`).replace(/[\u0300-\u036f]/g,``)}function bu(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=yu(l));let u=l?e.filter(e=>{let r=(a||c)(e);return n&&(r=r.toLowerCase()),t&&(r=yu(r)),i===`start`?r.startsWith(l):r.includes(l)}):e;return typeof r==`number`?u.slice(0,r):u}}var xu=bu(),Su=5,Cu=e=>e.current!==null&&gu(e.current.parentElement,document.activeElement),wu=(e,t)=>e===t,Tu=[];function Eu(e,t,n,r){if(t||e==null||r)return``;let i=n(e);return typeof i==`string`?i:``}function Du(e){let{unstable_isActiveElementInListbox:t=Cu,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?Tu:null,disableClearable:d=!1,disableCloseOnSelect:f=!1,disabled:p,disabledItemsFocusable:m=!1,disableListWrap:h=!1,filterOptions:g=xu,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=wu,multiple:O=!1,onChange:ee,onClose:te,onHighlightChange:k,onInputChange:A,onOpen:j,open:ne,openOnFocus:re=!1,options:M,readOnly:N=!1,renderValue:ie,selectOnFocus:ae=!e.freeSolo,value:P}=e,oe=la(w),F=x;F=e=>{let t=x(e);return typeof t==`string`?t:String(t)};let se=L.useRef(!1),ce=L.useRef(!0),le=L.useRef(null),ue=L.useRef(null),de=L.useRef(!1),[fe,I]=L.useState(null),[pe,me]=L.useState(-1),he=i?0:-1,ge=L.useRef(he),_e=L.useRef(null),ve=L.useRef(!1),ye=L.useRef(!1),be=L.useRef(Eu(u??P,O,F)).current,[xe,Se]=Ks({controlled:P,default:u,name:l}),[Ce,we]=Ks({controlled:E,default:be,name:l,state:`inputValue`}),[Te,Ee]=L.useState(!1),De=L.useCallback((e,t,n)=>{if(!(O?xe.length<t.length:t!==null)&&!s&&!(n===`reset`&&v&&!O&&t===null))return;let r=Eu(t,O,F,ie);Ce!==r&&(we(r),A&&A(e,r,n))},[F,Ce,O,A,we,s,v,xe,ie]),[Oe,ke]=Ks({controlled:ne,default:!1,name:l,state:`open`}),[Ae,je]=L.useState(!0),Me=!O&&xe!=null&&Ce===F(xe),Ne=Oe&&!N,Pe=L.useMemo(()=>O?xe:xe==null?[]:[xe],[O,xe]),Fe=L.useMemo(()=>D!==wu||Pe.length===0?null:new Set(Pe),[D,Pe]),Ie=L.useCallback(e=>Fe?Fe.has(e):Pe.some(t=>t!=null&&D(e,t)),[D,Pe,Fe]),Le=Ne?g(M.filter(e=>!(_&&Ie(e))),{inputValue:Me&&Ae?``:Ce,getOptionLabel:F}):[],Re=_u({filteredOptions:Le,value:xe,inputValue:Ce});L.useEffect(()=>{let e=xe!==Re.value;Te&&!e||v&&!e||De(null,xe,`reset`)},[xe,De,Te,Re.value,v]);let ze=Oe&&Le.length>0&&!N,Be=Js(e=>{e===-1?le.current.focus():fe.querySelector(`[data-item-index="${e}"]`).focus()});L.useEffect(()=>{O&&pe>xe.length-1&&(me(-1),Be(-1))},[xe,O,pe,Be]);function Ve(e,t){if(!ue.current||e<0||e>=Le.length)return-1;let n=e;for(;;){let r=ue.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)%Le.length:(n-1+Le.length)%Le.length,n===e)return-1}}let He=Js(({index:e,reason:t,preserveScroll:r=!1})=>{if(e===-1?le.current.removeAttribute(`aria-activedescendant`):le.current.setAttribute(`aria-activedescendant`,`${oe}-option-${e}`),!ue.current)return;let i=ue.current.querySelector(`[role="option"].${n}-focused`);i&&(i.classList.remove(`${n}-focused`),i.classList.remove(`${n}-focusVisible`));let a=ue.current;if(ue.current.getAttribute(`role`)!==`listbox`&&(a=ue.current.parentElement.querySelector(`[role="listbox"]`)),!a)return;if(e===-1){r||(a.scrollTop=0);return}let o=ue.current.querySelector(`[data-option-index="${e}"]`);if(o&&(o.classList.add(`${n}-focused`),t===`keyboard`&&o.classList.add(`${n}-focusVisible`),a.scrollHeight>a.clientHeight&&t!==`mouse`&&t!==`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))}}),Ue=Js(({event:e,index:t,reason:n,preserveScroll:r=!1})=>{ge.current=t,_e.current=n??null,k&&[`mouse`,`keyboard`,`touch`].includes(n)&&k(e,t===-1?null:Le[t],n),He({index:t,reason:n,preserveScroll:r})}),We=Js(({index:e})=>{ge.current=e,He({index:e,reason:_e.current})}),Ge=Js(({event:e,diff:t,direction:n=`next`,reason:i,preserveScroll:a})=>{if(!Ne)return;i===`keyboard`&&(ve.current=!1,ye.current=!1);let o=Ve((()=>{let e=Le.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(Ue({index:o,reason:i,event:e,preserveScroll:a}),r&&t!==`reset`)if(o===-1)le.current.value=Ce;else{let e=F(Le[o]);le.current.value=e,e.toLowerCase().indexOf(Ce.toLowerCase())===0&&Ce.length>0&&le.current.setSelectionRange(Ce.length,e.length)}}),Ke=!vu({array1:Re.filteredOptions,array2:Le,parser:F}),qe=()=>{if(ge.current!==-1&&!vu({array1:Re.filteredOptions,array2:Le,parser:F})&&Re.inputValue===Ce&&(O?xe.length===Re.value.length&&Re.value.every((e,t)=>F(xe[t])===F(e)):((e,t)=>(e?F(e):``)===(t?F(t):``))(Re.value,xe))){let e=Re.filteredOptions[ge.current];if(e)return Le.findIndex(t=>F(t)===F(e))}return-1},Je=L.useCallback(()=>{if(!Ne)return;let e=qe();if(e!==-1){We({index:e});return}let t=O?xe[0]:xe;if(Le.length===0||t==null){Ge({diff:`reset`,preserveScroll:Ke&&Re.inputValue===Ce&&Re.filteredOptions?.length>0&&Le.length>Re.filteredOptions.length&&Re.filteredOptions.every((e,t)=>F(e)===F(Le[t]))});return}if(ue.current){if(t!=null){let e=Le[ge.current];if(O&&e&&xe.findIndex(t=>D(e,t))!==-1&&Re.filteredOptions?.length>0){We({index:ge.current});return}let n=Le.findIndex(e=>D(e,t));n===-1?Ge({diff:`reset`}):Ue({index:n});return}if(ge.current>=Le.length-1){Ue({index:Le.length-1});return}Ue({index:ge.current})}},[Le.length,O?!1:xe,Ge,Ue,We,Ne,Ce,O]),Ye=Js(e=>{Us(ue,e),e&&Je()});L.useEffect(()=>{(Ke||Ne&&!f)&&Je()},[Je,Ke,Ne,f]),L.useEffect(()=>{if(typeof window>`u`)return;let e=()=>{de.current=!0};return window.addEventListener(`blur`,e),()=>{window.removeEventListener(`blur`,e)}},[]);let Xe=e=>{Oe||(ke(!0),je(!0),ye.current=!1,j&&j(e))},Ze=(e,t)=>{Oe&&(ke(!1),ve.current=!1,_e.current=null,te&&te(e,t))},Qe=(e,t,n,r)=>{if(O){if(xe.length===t.length&&xe.every((e,n)=>e===t[n]))return}else if(xe===t)return;ee&&ee(e,t,n,r),Se(t)},$e=(e,t,n=`selectOption`,r=`options`)=>{let i=n,a=t;if(O){a=Array.isArray(xe)?xe.slice():[];let e=a.findIndex(e=>D(t,e));e===-1?a.push(t):r!==`freeSolo`&&(a.splice(e,1),i=`removeOption`)}De(e,a,i),Qe(e,a,i,{option:t}),!f&&(!e||!e.ctrlKey&&!e.metaKey)&&Ze(e,i),(o===!0||o===`touch`&&ye.current||o===`mouse`&&!ye.current)&&le.current.blur()};function et(e,t){if(e===-1)return-1;let n=e;for(;;){if(t===`next`&&n===xe.length||t===`previous`&&n===-1)return-1;let e=fe.querySelector(`[data-item-index="${n}"]`);if(!e||!e.hasAttribute(`tabindex`)||e.disabled||e.getAttribute(`aria-disabled`)===`true`)n+=t===`next`?1:-1;else return n}}let tt=(e,t)=>{if(!O)return;Ce===``&&Ze(e,`toggleInput`);let n=pe;pe===-1&&t===`previous`?(n=xe.length-1,v&&Ce!==``&&(we(``),A&&A(e,``,`reset`))):(n+=t===`next`?1:-1,n<0&&(n=0),n===xe.length&&(n=-1)),n=et(n,t),me(n),Be(n)},nt=e=>{we(``),A&&A(e,``,`clear`),Qe(e,O?[]:null,`clear`)},rt=e=>t=>{if(e.onKeyDown&&e.onKeyDown(t),!t.defaultMuiPrevented&&(pe!==-1&&![`ArrowLeft`,`ArrowRight`].includes(t.key)&&(me(-1),Be(-1)),t.which!==229))switch(t.key){case`Home`:Ne&&C&&(t.preventDefault(),Ge({diff:`start`,direction:`next`,reason:`keyboard`,event:t}));break;case`End`:Ne&&C&&(t.preventDefault(),Ge({diff:`end`,direction:`previous`,reason:`keyboard`,event:t}));break;case`PageUp`:t.preventDefault(),Ge({diff:-5,direction:`previous`,reason:`keyboard`,event:t}),Xe(t);break;case`PageDown`:t.preventDefault(),Ge({diff:Su,direction:`next`,reason:`keyboard`,event:t}),Xe(t);break;case`ArrowDown`:t.preventDefault(),Ge({diff:1,direction:`next`,reason:`keyboard`,event:t}),Xe(t);break;case`ArrowUp`:t.preventDefault(),Ge({diff:-1,direction:`previous`,reason:`keyboard`,event:t}),Xe(t);break;case`ArrowLeft`:{let e=le.current;if(!(e&&e.selectionStart===0&&e.selectionEnd===0))return;!O&&ie&&xe!=null?(v&&Ce!==``&&(we(``),A&&A(t,``,`reset`)),me(0),Be(0)):tt(t,`previous`);break}case`ArrowRight`:!O&&ie?(me(-1),Be(-1)):tt(t,`next`);break;case`Enter`:{let e=!v||Ae||_e.current!==null;if(ge.current!==-1&&Ne&&e&&!ve.current){let e=Le[ge.current],n=y?y(e):!1;if(t.preventDefault(),n)return;$e(t,e,`selectOption`),r&&le.current.setSelectionRange(le.current.value.length,le.current.value.length)}else v&&Ce!==``&&Me===!1?(O&&t.preventDefault(),$e(t,Ce,`createOption`,`freeSolo`)):Ne&&ve.current&&(t.preventDefault(),Ze(t,`escape`));break}case`Escape`:Ne?(t.preventDefault(),t.stopPropagation(),Ze(t,`escape`)):c&&(Ce!==``||O&&xe.length>0||ie)&&(t.preventDefault(),t.stopPropagation(),nt(t));break;case`Backspace`:if(O&&!N&&Ce===``&&xe.length>0){let e=pe===-1?xe.length-1:pe,n=xe.slice();n.splice(e,1),Qe(t,n,`removeOption`,{option:xe[e]})}!O&&ie&&!N&&Ce===``&&Qe(t,null,`removeOption`,{option:xe});break;case`Delete`:if(O&&!N&&Ce===``&&xe.length>0&&pe!==-1){let e=pe,n=xe.slice();n.splice(e,1),Qe(t,n,`removeOption`,{option:xe[e]})}!O&&ie&&!N&&Ce===``&&Qe(t,null,`removeOption`,{option:xe});break;default:}},it=e=>{if(Ee(!0),pe!==-1&&(me(-1),Be(-1)),de.current){de.current=!1;return}re&&!se.current&&Xe(e)},at=e=>{if(t(ue)){le.current.focus();return}Ee(!1),ce.current=!0,se.current=!1,a&&ge.current!==-1&&Ne&&_e.current!==`mouse`&&_e.current!==`touch`?$e(e,Le[ge.current],`blur`):a&&v&&Ce!==``?$e(e,Ce,`blur`,`freeSolo`):s&&De(e,xe,`blur`),Ze(e,`blur`)},ot=e=>{let t=e.target.value,n=Ce!==t;n&&(we(t),ve.current=!1,A&&A(e,t,`input`)),t===``?!d&&!O&&!ie&&Qe(e,null,`clear`):Xe(e),n&&je(!1)},st=e=>{let t=Number(e.currentTarget.getAttribute(`data-option-index`));ge.current===t?_e.current=`mouse`:Ue({event:e,index:t,reason:`mouse`}),ye.current||(ve.current=!1)},ct=e=>{ve.current=!1,Ue({event:e,index:Number(e.currentTarget.getAttribute(`data-option-index`)),reason:`touch`}),ye.current=!0},lt=e=>{$e(e,Le[Number(e.currentTarget.getAttribute(`data-option-index`))],`selectOption`),ye.current=!1},ut=e=>t=>{let n=xe.slice();n.splice(e,1),Qe(t,n,`removeOption`,{option:xe[e]})},dt=e=>{Qe(e,null,`removeOption`,{option:xe})},ft=e=>{Oe?Ze(e,`toggleInput`):Xe(e)},pt=e=>{gu(e.currentTarget,e.target)&&(fe&&!gu(fe,e.target)||e.target.getAttribute(`id`)!==oe&&e.preventDefault())},mt=e=>{gu(e.currentTarget,e.target)&&(fe&&!gu(fe,e.target)||(le.current.focus(),ae&&ce.current&&le.current.selectionEnd-le.current.selectionStart===0&&le.current.select(),ce.current=!1))},ht=e=>{!p&&(Ce===``||!Oe)&&e.button===0&&ft(e)},gt=v&&Ce.length>0;gt||=O?xe.length>0:xe!==null;let _t=Le;return S&&(_t=Le.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&&Te&&at(),{getRootProps:(e={})=>({...e,onKeyDown:rt(e),onMouseDown:pt,onClick:mt}),getInputLabelProps:()=>({id:`${oe}-label`,htmlFor:oe}),getInputProps:()=>({id:oe,value:Ce,onBlur:at,onFocus:it,onChange:ot,onMouseDown:ht,"aria-activedescendant":Ne?``:null,"aria-autocomplete":r?`both`:`list`,"aria-controls":ze?`${oe}-listbox`:void 0,"aria-expanded":ze,autoComplete:`off`,ref:le,autoCapitalize:`none`,spellCheck:`false`,role:`combobox`,disabled:p}),getClearProps:()=>({tabIndex:-1,type:`button`,onClick:e=>{se.current=!0,nt(e)}}),getItemProps:({index:e=0}={})=>({...O&&{key:e},"data-item-index":e,tabIndex:-1,...!N&&{onDelete:O?ut(e):dt}}),getPopupIndicatorProps:()=>({tabIndex:-1,type:`button`,onClick:ft}),getListboxProps:()=>({role:`listbox`,id:`${oe}-listbox`,"aria-labelledby":`${oe}-label`,"aria-multiselectable":O||void 0,ref:Ye,onMouseDown:e=>{e.preventDefault()},onScroll:()=>{ye.current&&(ve.current=!0)}}),getOptionProps:({index:e,option:t})=>{let n=Ie(t),r=y?y(t):!1;return{key:b?.(t)??F(t),tabIndex:-1,role:`option`,id:`${oe}-option-${e}`,onMouseMove:st,onClick:lt,onTouchStart:ct,"data-option-index":e,"aria-disabled":r,"aria-selected":n}},id:oe,inputValue:Ce,value:xe,dirty:gt,expanded:Ne&&fe,popupOpen:Ne,focused:Te||pe!==-1,anchorEl:fe,setAnchorEl:I,focusedItem:pe,groupedOptions:_t}}var Ou=`bottom`,ku=`right`,Au=`left`,ju=`auto`,Mu=[`top`,Ou,ku,Au],Nu=`start`,Pu=`clippingParents`,Fu=`viewport`,Iu=`popper`,Lu=`reference`,Ru=Mu.reduce(function(e,t){return e.concat([t+`-`+Nu,t+`-end`])},[]),zu=[].concat(Mu,[ju]).reduce(function(e,t){return e.concat([t,t+`-`+Nu,t+`-end`])},[]),Bu=[`beforeRead`,`read`,`afterRead`,`beforeMain`,`main`,`afterMain`,`beforeWrite`,`write`,`afterWrite`];function Vu(e){return e?(e.nodeName||``).toLowerCase():null}function Hu(e){if(e==null)return window;if(e.toString()!==`[object Window]`){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Uu(e){return e instanceof Hu(e).Element||e instanceof Element}function Wu(e){return e instanceof Hu(e).HTMLElement||e instanceof HTMLElement}function Gu(e){return typeof ShadowRoot>`u`?!1:e instanceof Hu(e).ShadowRoot||e instanceof ShadowRoot}function Ku(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];!Wu(i)||!Vu(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 qu(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},{});!Wu(r)||!Vu(r)||(Object.assign(r.style,a),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}}var Ju={name:`applyStyles`,enabled:!0,phase:`write`,fn:Ku,effect:qu,requires:[`computeStyles`]};function Yu(e){return e.split(`-`)[0]}var Xu=Math.max,Zu=Math.min,Qu=Math.round;function $u(){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 ed(){return!/^((?!chrome|android).)*safari/i.test($u())}function td(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&Wu(e)&&(i=e.offsetWidth>0&&Qu(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&Qu(r.height)/e.offsetHeight||1);var o=(Uu(e)?Hu(e):window).visualViewport,s=!ed()&&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 nd(e){var t=td(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 rd(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Gu(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function id(e){return Hu(e).getComputedStyle(e)}function ad(e){return[`table`,`td`,`th`].indexOf(Vu(e))>=0}function od(e){return((Uu(e)?e.ownerDocument:e.document)||window.document).documentElement}function sd(e){return Vu(e)===`html`?e:e.assignedSlot||e.parentNode||(Gu(e)?e.host:null)||od(e)}function cd(e){return!Wu(e)||id(e).position===`fixed`?null:e.offsetParent}function ld(e){var t=/firefox/i.test($u());if(/Trident/i.test($u())&&Wu(e)&&id(e).position===`fixed`)return null;var n=sd(e);for(Gu(n)&&(n=n.host);Wu(n)&&[`html`,`body`].indexOf(Vu(n))<0;){var r=id(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 ud(e){for(var t=Hu(e),n=cd(e);n&&ad(n)&&id(n).position===`static`;)n=cd(n);return n&&(Vu(n)===`html`||Vu(n)===`body`&&id(n).position===`static`)?t:n||ld(e)||t}function dd(e){return[`top`,`bottom`].indexOf(e)>=0?`x`:`y`}function fd(e,t,n){return Xu(e,Zu(t,n))}function pd(e,t,n){var r=fd(e,t,n);return r>n?n:r}function md(){return{top:0,right:0,bottom:0,left:0}}function hd(e){return Object.assign({},md(),e)}function gd(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var _d=function(e,t){return e=typeof e==`function`?e(Object.assign({},t.rects,{placement:t.placement})):e,hd(typeof e==`number`?gd(e,Mu):e)};function vd(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=Yu(n.placement),c=dd(s),l=[`left`,`right`].indexOf(s)>=0?`height`:`width`;if(!(!a||!o)){var u=_d(i.padding,n),d=nd(a),f=c===`y`?`top`:Au,p=c===`y`?Ou:ku,m=n.rects.reference[l]+n.rects.reference[c]-o[c]-n.rects.popper[l],h=o[c]-n.rects.reference[c],g=ud(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=fd(y,x,b),C=c;n.modifiersData[r]=(t={},t[C]=S,t.centerOffset=S-x,t)}}function yd(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)||rd(t.elements.popper,r)&&(t.elements.arrow=r))}var bd={name:`arrow`,enabled:!0,phase:`main`,fn:vd,effect:yd,requires:[`popperOffsets`],requiresIfExists:[`preventOverflow`]};function xd(e){return e.split(`-`)[1]}var Sd={top:`auto`,right:`auto`,bottom:`auto`,left:`auto`};function Cd(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Qu(n*i)/i||0,y:Qu(r*i)/i||0}}function wd(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=Au,b=`top`,x=window;if(l){var S=ud(n),C=`clientHeight`,w=`clientWidth`;if(S===Hu(n)&&(S=od(n),id(S).position!==`static`&&s===`absolute`&&(C=`scrollHeight`,w=`scrollWidth`)),S=S,i===`top`||(i===`left`||i===`right`)&&a===`end`){b=Ou;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=ku;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&&Sd),O=u===!0?Cd({x:p,y:h},Hu(n)):{x:p,y:h};if(p=O.x,h=O.y,c){var ee;return Object.assign({},D,(ee={},ee[b]=v?`0`:``,ee[y]=_?`0`:``,ee.transform=(x.devicePixelRatio||1)<=1?`translate(`+p+`px, `+h+`px)`:`translate3d(`+p+`px, `+h+`px, 0)`,ee))}return Object.assign({},D,(t={},t[b]=v?h+`px`:``,t[y]=_?p+`px`:``,t.transform=``,t))}function Td(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:Yu(t.placement),variation:xd(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,wd(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,wd(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 Ed={name:`computeStyles`,enabled:!0,phase:`beforeWrite`,fn:Td,data:{}},Dd={passive:!0};function Od(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=Hu(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach(function(e){e.addEventListener(`scroll`,n.update,Dd)}),s&&c.addEventListener(`resize`,n.update,Dd),function(){a&&l.forEach(function(e){e.removeEventListener(`scroll`,n.update,Dd)}),s&&c.removeEventListener(`resize`,n.update,Dd)}}var kd={name:`eventListeners`,enabled:!0,phase:`write`,fn:function(){},effect:Od,data:{}},Ad={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function jd(e){return e.replace(/left|right|bottom|top/g,function(e){return Ad[e]})}var Md={start:`end`,end:`start`};function Nd(e){return e.replace(/start|end/g,function(e){return Md[e]})}function Pd(e){var t=Hu(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Fd(e){return td(od(e)).left+Pd(e).scrollLeft}function Id(e,t){var n=Hu(e),r=od(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var l=ed();(l||!l&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+Fd(e),y:c}}function Ld(e){var t=od(e),n=Pd(e),r=e.ownerDocument?.body,i=Xu(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=Xu(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),o=-n.scrollLeft+Fd(e),s=-n.scrollTop;return id(r||t).direction===`rtl`&&(o+=Xu(t.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:o,y:s}}function Rd(e){var t=id(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function zd(e){return[`html`,`body`,`#document`].indexOf(Vu(e))>=0?e.ownerDocument.body:Wu(e)&&Rd(e)?e:zd(sd(e))}function Bd(e,t){t===void 0&&(t=[]);var n=zd(e),r=n===e.ownerDocument?.body,i=Hu(n),a=r?[i].concat(i.visualViewport||[],Rd(n)?n:[]):n,o=t.concat(a);return r?o:o.concat(Bd(sd(a)))}function Vd(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Hd(e,t){var n=td(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 Ud(e,t,n){return t===`viewport`?Vd(Id(e,n)):Uu(t)?Hd(t,n):Vd(Ld(od(e)))}function Wd(e){var t=Bd(sd(e)),n=[`absolute`,`fixed`].indexOf(id(e).position)>=0&&Wu(e)?ud(e):e;return Uu(n)?t.filter(function(e){return Uu(e)&&rd(e,n)&&Vu(e)!==`body`}):[]}function Gd(e,t,n,r){var i=t===`clippingParents`?Wd(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(t,n){var i=Ud(e,n,r);return t.top=Xu(i.top,t.top),t.right=Zu(i.right,t.right),t.bottom=Zu(i.bottom,t.bottom),t.left=Xu(i.left,t.left),t},Ud(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 Kd(e){var t=e.reference,n=e.element,r=e.placement,i=r?Yu(r):null,a=r?xd(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 Ou:c={x:o,y:t.y+t.height};break;case ku:c={x:t.x+t.width,y:s};break;case Au:c={x:t.x-n.width,y:s};break;default:c={x:t.x,y:t.y}}var l=i?dd(i):null;if(l!=null){var u=l===`y`?`height`:`width`;switch(a){case Nu: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 qd(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?Pu:s,l=n.rootBoundary,u=l===void 0?Fu:l,d=n.elementContext,f=d===void 0?Iu:d,p=n.altBoundary,m=p===void 0?!1:p,h=n.padding,g=h===void 0?0:h,_=hd(typeof g==`number`?gd(g,Mu):g),v=f===`popper`?Lu:Iu,y=e.rects.popper,b=e.elements[m?v:f],x=Gd(Uu(b)?b:b.contextElement||od(e.elements.popper),c,u,o),S=td(e.elements.reference),C=Kd({reference:S,element:y,strategy:`absolute`,placement:i}),w=Vd(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 Jd(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?zu:c,u=xd(r),d=u?s?Ru:Ru.filter(function(e){return xd(e)===u}):Mu,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]=qd(e,{placement:n,boundary:i,rootBoundary:a,padding:o})[Yu(n)],t},{});return Object.keys(p).sort(function(e,t){return p[e]-p[t]})}function Yd(e){if(Yu(e)===`auto`)return[];var t=jd(e);return[Nd(e),t,Nd(t)]}function Xd(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,_=Yu(g)===g,v=c||(_||!m?[jd(g)]:Yd(g)),y=[g].concat(v).reduce(function(e,n){return e.concat(Yu(n)===`auto`?Jd(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=Yu(E),O=xd(E)===Nu,ee=[`top`,Ou].indexOf(D)>=0,te=ee?`width`:`height`,k=qd(t,{placement:E,boundary:u,rootBoundary:d,altBoundary:f,padding:l}),A=ee?O?ku:Au:O?Ou:`top`;b[te]>x[te]&&(A=jd(A));var j=jd(A),ne=[];if(a&&ne.push(k[D]<=0),s&&ne.push(k[A]<=0,k[j]<=0),ne.every(function(e){return e})){w=E,C=!1;break}S.set(E,ne)}if(C)for(var re=m?3:1,M=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`},N=re;N>0&&M(N)!==`break`;N--);t.placement!==w&&(t.modifiersData[r]._skip=!0,t.placement=w,t.reset=!0)}}var Zd={name:`flip`,enabled:!0,phase:`main`,fn:Xd,requiresIfExists:[`offset`],data:{_skip:!1}};function Qd(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 $d(e){return[`top`,ku,Ou,Au].some(function(t){return e[t]>=0})}function ef(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=qd(t,{elementContext:`reference`}),s=qd(t,{altBoundary:!0}),c=Qd(o,r),l=Qd(s,i,a),u=$d(c),d=$d(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 tf={name:`hide`,enabled:!0,phase:`main`,requiresIfExists:[`preventOverflow`],fn:ef};function nf(e,t,n){var r=Yu(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 rf(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=zu.reduce(function(e,n){return e[n]=nf(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 af={name:`offset`,enabled:!0,phase:`main`,requires:[`popperOffsets`],fn:rf};function of(e){var t=e.state,n=e.name;t.modifiersData[n]=Kd({reference:t.rects.reference,element:t.rects.popper,strategy:`absolute`,placement:t.placement})}var sf={name:`popperOffsets`,enabled:!0,phase:`read`,fn:of,data:{}};function cf(e){return e===`x`?`y`:`x`}function lf(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=qd(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),_=Yu(t.placement),v=xd(t.placement),y=!v,b=dd(_),x=cf(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 ee=b===`y`?`top`:Au,te=b===`y`?Ou:ku,k=b===`y`?`height`:`width`,A=S[b],j=A+g[ee],ne=A-g[te],re=p?-w[k]/2:0,M=v===`start`?C[k]:w[k],N=v===`start`?-w[k]:-C[k],ie=t.elements.arrow,ae=p&&ie?nd(ie):{width:0,height:0},P=t.modifiersData[`arrow#persistent`]?t.modifiersData[`arrow#persistent`].padding:md(),oe=P[ee],F=P[te],se=fd(0,C[k],ae[k]),ce=y?C[k]/2-re-se-oe-E.mainAxis:M-se-oe-E.mainAxis,le=y?-C[k]/2+re+se+F+E.mainAxis:N+se+F+E.mainAxis,ue=t.elements.arrow&&ud(t.elements.arrow),de=ue?b===`y`?ue.clientTop||0:ue.clientLeft||0:0,fe=D?.[b]??0,I=A+ce-fe-de,pe=A+le-fe,me=fd(p?Zu(j,I):j,A,p?Xu(ne,pe):ne);S[b]=me,O[b]=me-A}if(s){var he=b===`x`?`top`:Au,ge=b===`x`?Ou:ku,_e=S[x],ve=x===`y`?`height`:`width`,ye=_e+g[he],be=_e-g[ge],xe=[`top`,Au].indexOf(_)!==-1,Se=D?.[x]??0,Ce=xe?ye:_e-C[ve]-w[ve]-Se+E.altAxis,we=xe?_e+C[ve]+w[ve]-Se-E.altAxis:be,Te=p&&xe?pd(Ce,_e,we):fd(p?Ce:ye,_e,p?we:be);S[x]=Te,O[x]=Te-_e}t.modifiersData[r]=O}}var uf={name:`preventOverflow`,enabled:!0,phase:`main`,fn:lf,requiresIfExists:[`offset`]};function df(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function ff(e){return e===Hu(e)||!Wu(e)?Pd(e):df(e)}function pf(e){var t=e.getBoundingClientRect(),n=Qu(t.width)/e.offsetWidth||1,r=Qu(t.height)/e.offsetHeight||1;return n!==1||r!==1}function mf(e,t,n){n===void 0&&(n=!1);var r=Wu(t),i=Wu(t)&&pf(t),a=od(t),o=td(e,i,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((Vu(t)!==`body`||Rd(a))&&(s=ff(t)),Wu(t)?(c=td(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=Fd(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function hf(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 gf(e){var t=hf(e);return Bu.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}function _f(e){var t;return function(){return t||=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})}),t}}function vf(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 yf={placement:`bottom`,modifiers:[],strategy:`absolute`};function bf(){return![...arguments].some(function(e){return!(e&&typeof e.getBoundingClientRect==`function`)})}function xf(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?yf:i;return function(e,t,n){n===void 0&&(n=a);var i={placement:`bottom`,orderedModifiers:[],options:Object.assign({},yf,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:Uu(e)?Bd(e):e.contextElement?Bd(e.contextElement):[],popper:Bd(t)};var s=gf(vf([].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(bf(t,n)){i.rects={reference:mf(t,ud(n),i.options.strategy===`fixed`),popper:nd(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:_f(function(){return new Promise(function(e){c.forceUpdate(),e(i)})}),destroy:function(){u(),s=!0}};if(!bf(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 Sf=xf({defaultModifiers:[kd,sf,Ed,Ju,af,Zd,uf,bd,tf]});function Cf(e){let{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...a}=e,o=i?{}:Fc(n,r),{props:s,internalRef:c}=Rc({...a,externalSlotProps:o}),l=Xs(c,o?.ref,e.additionalProps?.ref);return Pc(t,{...s,ref:l},r)}function wf(e){return e?.props?.ref||null}function Tf(e){return typeof e==`function`?e():e}var Ef=L.forwardRef(function(e,t){let{children:n,container:r,disablePortal:i=!1}=e,[a,o]=L.useState(null),s=Xs(L.isValidElement(n)?wf(n):null,t);if(Ti(()=>{i||o(Tf(r)||document.body)},[r,i]),Ti(()=>{if(a&&!i)return Us(t,a),()=>{Us(t,null)}},[t,a,i]),i){if(L.isValidElement(n)){let e={ref:s};return L.cloneElement(n,e)}return n}return a&&oc.createPortal(n,a)});function Df(e){return ci(`MuiPopper`,e)}li(`MuiPopper`,[`root`]);function Of(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 kf(e){return typeof e==`function`?e():e}function Af(e){return e.nodeType!==void 0}var jf=e=>{let{classes:t}=e;return Ia({root:[`root`]},Df,t)},Mf={},Nf=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),_=Xs(g,t),v=L.useRef(null),y=Xs(v,u),b=L.useRef(y);Ti(()=>{b.current=y},[y]),L.useImperativeHandle(u,()=>v.current,[]);let x=Of(c,i),[S,C]=L.useState(x),[w,T]=L.useState(kf(n));L.useEffect(()=>{v.current&&v.current.forceUpdate()}),L.useEffect(()=>{n&&T(kf(n))},[n]),Ti(()=>{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=Sf(w,g.current,{placement:x,...l,modifiers:t});b.current(n);let r=g.current;return()=>{if(r){let{style:e}=r,t=e.position,i=e.top,a=e.left,o=e.transform;n.destroy(),e.position=t,e.top=i,e.left=a,e.transform=o}else n.destroy();b.current(null)}},[w,a,o,s,l,x]);let E={placement:S};p!==null&&(E.TransitionProps=p);let D=jf(e),O=f.root??`div`;return(0,R.jsx)(O,{...Cf({elementType:O,externalSlotProps:d.root,externalForwardedProps:h,additionalProps:{role:`tooltip`,ref:_},ownerState:e,className:D.root}),children:typeof r==`function`?r(E):r})}),Pf=V(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=Mf,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=kf(n);S=e&&Af(e)?zs(e).body:zs(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)(Ef,{disablePortal:o,container:S,children:(0,R.jsx)(Nf,{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`})({}),Ff=L.forwardRef(function(e,t){let n=ta(),{anchorEl:r,component:i,container:a,disablePortal:o,keepMounted:s,modifiers:c,open:l,placement:u,popperOptions:d,popperRef:f,transition:p,slots:m,slotProps:h,...g}=Os({props:e,name:`MuiPopper`}),_={anchorEl:r,container:a,disablePortal:o,keepMounted:s,modifiers:c,open:l,placement:u,popperOptions:d,popperRef:f,transition:p,...g};return(0,R.jsx)(Pf,{as:i,direction:n?`rtl`:`ltr`,slots:m,slotProps:h,..._,ref:t})});function If(e){return ci(`MuiListSubheader`,e)}li(`MuiListSubheader`,[`root`,`colorPrimary`,`colorInherit`,`gutters`,`inset`,`sticky`]);var Lf=e=>{let{classes:t,color:n,disableGutters:r,inset:i,disableSticky:a}=e;return Ia({root:[`root`,n!==`default`&&`color${H(n)}`,!r&&`gutters`,i&&`inset`,!a&&`sticky`]},If,t)},Rf=V(`li`,{name:`MuiListSubheader`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color!==`default`&&t[`color${H(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(U(({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}}]}))),zf=L.forwardRef(function(e,t){let n=Os({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)(Rf,{as:a,className:z(Lf(u).root,r),ref:t,ownerState:u,...l})}),Bf=Ns((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 Vf(e){return ci(`MuiChip`,e)}var Hf=li(`MuiChip`,[`root`,`sizeSmall`,`sizeMedium`,`colorDefault`,`colorError`,`colorInfo`,`colorPrimary`,`colorSecondary`,`colorSuccess`,`colorWarning`,`disabled`,`clickable`,`deletable`,`outlined`,`filled`,`avatar`,`icon`,`label`,`deleteIcon`,`focusVisible`]),Uf=e=>{let{classes:t,disabled:n,size:r,color:i,onDelete:a,clickable:o,variant:s}=e;return Ia({root:[`root`,s,n&&`disabled`,`size${H(r)}`,`color${H(i)}`,o&&`clickable`,a&&`deletable`],label:[`label`],avatar:[`avatar`],icon:[`icon`],deleteIcon:[`deleteIcon`]},Vf,t)},Wf=V(`div`,{name:`MuiChip`,slot:`Root`,shouldForwardProp:e=>gs(e)&&e!==`focusableWhenDisabled`&&e!==`skipFocusWhenDisabled`,overridesResolver:(e,t)=>{let{ownerState:n}=e,{color:r,clickable:i,onDelete:a,size:o,variant:s}=n;return[{[`& .${Hf.avatar}`]:t.avatar},{[`& .${Hf.icon}`]:t.icon},{[`& .${Hf.deleteIcon}`]:t.deleteIcon},t.root,t[`size${H(o)}`],t[`color${H(r)}`],i&&t.clickable,a&&t.deletable,t[s]]}})(U(({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`,[`&.${Hf.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:`none`},[`& .${Hf.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${Hf.icon}`]:{marginLeft:5,marginRight:-6},[`& .${Hf.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:{color:`primary`},style:{[`& .${Hf.avatar}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark}}},{props:{color:`secondary`},style:{[`& .${Hf.avatar}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark}}},{props:{size:`small`},style:{height:24,[`& .${Hf.avatar}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Hf.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${Hf.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(zl([`contrastText`])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText,[`& .${Hf.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:{[`& .${Hf.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:e=>e.iconColor===e.color&&e.color!==`default`,style:{[`& .${Hf.icon}`]:{color:`inherit`}}},{props:{onDelete:!0},style:{[`&.${Hf.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(zl([`dark`])).map(([t])=>({props:{color:t,onDelete:!0},style:{[`&.${Hf.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}`)},[`&.${Hf.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(zl([`dark`])).map(([t])=>({props:{color:t,clickable:!0},style:{[`&:hover, &.${Hf.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]}`,[`&.${Hf.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Hf.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Hf.avatar}`]:{marginLeft:4},[`& .${Hf.icon}`]:{marginLeft:4},[`& .${Hf.deleteIcon}`]:{marginRight:5}}},{props:{size:`small`,variant:`outlined`},style:{[`& .${Hf.avatar}`]:{marginLeft:2},[`& .${Hf.icon}`]:{marginLeft:2},[`& .${Hf.deleteIcon}`]:{marginRight:3}}},...Object.entries(e.palette).filter(zl()).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)}`,[`&.${Hf.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)},[`&.${Hf.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.focusOpacity)},[`& .${Hf.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[t].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].main}}}}))]}})),Gf=V(`span`,{name:`MuiChip`,slot:`Label`})({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 Kf(e){return e.key===`Backspace`||e.key===`Delete`}var qf=L.forwardRef(function(e,t){let n=Os({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,{nativeButton:C,...w}=S,T=Zs(L.useRef(null),t),E=e=>{e.stopPropagation(),p(e)},D=e=>{e.currentTarget===e.target&&Kf(e)&&e.preventDefault(),m&&m(e)},O=e=>{e.currentTarget===e.target&&p&&Kf(e)&&p(e),h&&h(e)},ee=a!==!1&&f?!0:a,te=ee||p?Ol:s||`div`,k={...n,component:te,disabled:l,size:g,color:o,iconColor:L.isValidElement(u)&&u.props.color||o,onDelete:!!p,clickable:ee,variant:_},A=Uf(k),j=te===Ol?{component:s||`div`,internalNativeButton:!1,focusVisibleClassName:A.focusVisible,...p&&{disableRipple:!0},...C!==void 0&&{nativeButton:C}}:{},ne=null;p&&(ne=c&&L.isValidElement(c)?L.cloneElement(c,{className:z(c.props.className,A.deleteIcon),onClick:E}):(0,R.jsx)(Bf,{className:A.deleteIcon,onClick:E}));let re=null;r&&L.isValidElement(r)&&(re=L.cloneElement(r,{className:z(A.avatar,r.props.className)}));let M=null;u&&L.isValidElement(u)&&(M=L.cloneElement(u,{className:z(A.icon,u.props.className)}));let N={slots:b,slotProps:x},[ie,ae]=zc(`root`,{elementType:Wf,externalForwardedProps:{...N,...w},ownerState:k,shouldForwardComponentProp:!0,ref:T,className:z(A.root,i),additionalProps:{disabled:ee&&l?!0:void 0,tabIndex:y&&l?-1:v,...j},getSlotProps:e=>({...e,onClick:t=>{e.onClick?.(t),f?.(t)},onKeyDown:t=>{e.onKeyDown?.(t),D(t)},onKeyUp:t=>{e.onKeyUp?.(t),O(t)}})}),[P,oe]=zc(`label`,{elementType:Gf,externalForwardedProps:N,ownerState:k,className:A.label});return(0,R.jsxs)(ie,{as:te,...ae,children:[re||M,(0,R.jsx)(P,{...oe,children:d}),ne]})});function Jf(e){return parseInt(e,10)||0}var Yf={shadow:{visibility:`hidden`,position:`absolute`,overflow:`hidden`,height:0,top:0,left:0,transform:`translateZ(0)`}};function Xf(e){for(let t in e)return!1;return!0}function Zf(e){return Xf(e)||e.outerHeightStyle===0&&!e.overflowing}var Qf=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=Xs(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=Vs(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=Jf(a.paddingBottom)+Jf(a.paddingTop),c=Jf(a.borderBottomWidth)+Jf(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=Js(()=>{let e=l.current,t=p();if(!e||!t||Zf(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||Zf(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 Ti(()=>{let e=Ps(h),t=l?.current;if(!t)return;let n=Vs(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]),Ti(()=>{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:{...Yf.shadow,...a,paddingTop:0,paddingBottom:0}})]})}),$f=L.createContext(void 0);function ep(){return L.useContext($f)}function tp({props:e,states:t}){let n=L.useContext($f),r={};return t.forEach(t=>{let i=e[t];r[t]=i===void 0&&n?n[t]:i}),[r,n]}function np(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function rp(e,t=!1){return e&&(np(e.value)&&e.value!==``||t&&np(e.defaultValue)&&e.defaultValue!==``)}function ip(e){return e.startAdornment}function ap(e){return ci(`MuiInputBase`,e)}var op=li(`MuiInputBase`,[`root`,`formControl`,`focused`,`disabled`,`adornedStart`,`adornedEnd`,`error`,`sizeSmall`,`multiline`,`colorSecondary`,`fullWidth`,`hiddenLabel`,`readOnly`,`input`,`inputTypeSearch`]),sp,cp=`mui-auto-fill`,lp=`mui-auto-fill-cancel`,up=(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${H(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},dp=(e,t)=>{let{ownerState:n}=e;return[t.input,n.type===`search`&&t.inputTypeSearch]},fp=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 Ia({root:[`root`,`color${H(n)}`,r&&`disabled`,i&&`error`,c&&`fullWidth`,o&&`focused`,s&&`formControl`,f&&f!==`medium`&&`size${H(f)}`,u&&`multiline`,p&&`adornedStart`,a&&`adornedEnd`,l&&`hiddenLabel`,d&&`readOnly`],input:[`input`,r&&`disabled`,m===`search`&&`inputTypeSearch`,d&&`readOnly`]},ap,t)},pp=V(`div`,{name:`MuiInputBase`,slot:`Root`,overridesResolver:up})(U(({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`,[`&.${op.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%`}}]}))),mp=V(`input`,{name:`MuiInputBase`,slot:`Input`,overridesResolver:dp})(U(({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] + .${op.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},[`&.${op.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:e})=>!e.disableInjectingGlobalStyles,style:{animationName:lp,animationDuration:`10ms`,"&:-webkit-autofill":{animationDuration:`5000s`,animationName:cp}}},{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`}}]}})),hp=Ds({[`@keyframes ${cp}`]:{from:{animationName:cp}},[`@keyframes ${lp}`]:{from:{animationName:lp}}}),gp=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiInputBase`}),{"aria-describedby":r,"aria-label":i,autoComplete:a,autoFocus:o,className:s,color:c,defaultValue:l,disabled:u,disableInjectingGlobalStyles:d,endAdornment:f,error:p,fullWidth:m=!1,id:h,inputComponent:g=`input`,inputProps:_={},inputRef:v,margin:y,maxRows:b,minRows:x,multiline:S=!1,name:C,onBlur:w,onChange:T,onClick:E,onFocus:O,onKeyDown:ee,onKeyUp:te,placeholder:k,readOnly:A,renderSuffix:j,rows:ne,size:re,slotProps:M={},slots:N={},startAdornment:ie,type:ae=`text`,value:P,...oe}=n,F=_.value==null?P:_.value,{current:se}=L.useRef(F!=null),ce=L.useRef(),le=L.useCallback(e=>{},[]),ue=Zs(ce,v,_.ref,le),[de,fe]=L.useState(!1),[I,pe]=tp({props:n,states:[`color`,`disabled`,`error`,`hiddenLabel`,`size`,`required`,`filled`]});I.focused=pe?pe.focused:de,L.useEffect(()=>{!pe&&u&&de&&(fe(!1),w&&w())},[pe,u,de,w]);let me=pe&&pe.onFilled,he=pe&&pe.onEmpty,ge=L.useCallback(e=>{rp(e)?me&&me():he&&he()},[me,he]);Ws(()=>{se&&ge({value:F})},[F,ge,se]),Ws(()=>{if(!o)return;let e=ce.current;if(!e)return;let t=Bs(e),n=Rs(t),r=n==null||n===t.body||n===t.documentElement;e===n?pe&&pe.onFocus?pe.onFocus():fe(!0):r&&e.focus()},[o]);let _e=e=>{O&&O(e),_.onFocus&&_.onFocus(e),pe&&pe.onFocus?pe.onFocus(e):fe(!0)},ve=e=>{w&&w(e),_.onBlur&&_.onBlur(e),pe&&pe.onBlur?pe.onBlur(e):fe(!1)},ye=(e,...t)=>{if(!se){let t=e.target||ce.current;if(t==null)throw Error(D(1));ge({value:t.value})}_.onChange&&_.onChange(e,...t),T&&T(e,...t)};L.useEffect(()=>{ge(ce.current)},[]);let be=e=>{ce.current&&e.currentTarget===e.target&&ce.current.focus(),E&&E(e)},xe=g,Se=_;S&&xe===`input`&&(Se=ne?{type:void 0,minRows:ne,maxRows:ne,...Se}:{type:void 0,maxRows:b,minRows:x,...Se},xe=Qf);let Ce=e=>{ge(e.animationName===lp?ce.current:{value:`x`})};L.useEffect(()=>{pe&&pe.setAdornedStart(!!ie)},[pe,ie]);let we={...n,color:I.color||`primary`,disabled:I.disabled,endAdornment:f,error:I.error,focused:I.focused,formControl:pe,fullWidth:m,hiddenLabel:I.hiddenLabel,multiline:S,size:I.size,startAdornment:ie,type:ae},Te=fp(we),Ee=N.root||pp,De=M.root||{},Oe=N.input||mp;return Se={...Se,...M.input},(0,R.jsxs)(L.Fragment,{children:[!d&&typeof hp==`function`&&(sp||=(0,R.jsx)(hp,{})),(0,R.jsxs)(Ee,{...De,ref:t,onClick:be,...oe,...!Nc(Ee)&&{ownerState:{...we,...De.ownerState}},className:z(Te.root,De.className,s,A&&`MuiInputBase-readOnly`),children:[ie,(0,R.jsx)($f.Provider,{value:null,children:(0,R.jsx)(Oe,{"aria-invalid":I.error,"aria-describedby":r,"aria-label":i,autoComplete:a,autoFocus:o,defaultValue:l,disabled:I.disabled,id:h,onAnimationStart:Ce,name:C,placeholder:k,readOnly:A,required:I.required,rows:ne,value:F,onKeyDown:ee,onKeyUp:te,type:ae,...Se,...!Nc(Oe)&&{as:xe,ownerState:{...we,...Se.ownerState}},ref:ue,className:z(Te.input,Se.className,A&&`MuiInputBase-readOnly`),onBlur:ve,onChange:ye,onFocus:_e})}),f,j?j({...I,startAdornment:ie}):null]})]})});function _p(e){return ci(`MuiInput`,e)}var vp={...op,...li(`MuiInput`,[`root`,`underline`,`input`])};function yp(e){return ci(`MuiOutlinedInput`,e)}var bp={...op,...li(`MuiOutlinedInput`,[`root`,`notchedOutline`,`input`])};function xp(e){return ci(`MuiFilledInput`,e)}var Sp={...op,...li(`MuiFilledInput`,[`root`,`underline`,`input`,`adornedStart`,`adornedEnd`,`sizeSmall`,`multiline`,`hiddenLabel`])},Cp=Ns((0,R.jsx)(`path`,{d:`M7 10l5 5 5-5z`}),`ArrowDropDown`);function wp(e){return ci(`MuiAutocomplete`,e)}var Tp=li(`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(`.`)),Ep,Dp,Op=e=>{let{classes:t,disablePortal:n,expanded:r,focused:i,fullWidth:a,hasClearIcon:o,hasPopupIcon:s,inputFocused:c,popupOpen:l,size:u}=e;return Ia({root:[`root`,r&&`expanded`,i&&`focused`,a&&`fullWidth`,o&&`hasClearIcon`,s&&`hasPopupIcon`],inputRoot:[`inputRoot`],input:[`input`,c&&`inputFocused`],tag:[`tag`,`tagSize${H(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`]},wp,t)},kp=V(`div`,{name:`MuiAutocomplete`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e,{fullWidth:r,hasClearIcon:i,hasPopupIcon:a,inputFocused:o,size:s}=n;return[{[`& .${Tp.tag}`]:t.tag},{[`& .${Tp.tag}`]:t[`tagSize${H(s)}`]},{[`& .${Tp.inputRoot}`]:t.inputRoot},{[`& .${Tp.input}`]:t.input},{[`& .${Tp.input}`]:o&&t.inputFocused},t.root,r&&t.fullWidth,a&&t.hasPopupIcon,i&&t.hasClearIcon]}})({[`&.${Tp.focused} .${Tp.clearIndicator}`]:{visibility:`visible`},"@media (pointer: fine)":{[`&:hover .${Tp.clearIndicator}`]:{visibility:`visible`}},[`& .${Tp.tag}`]:{margin:3,maxWidth:`calc(100% - 6px)`},[`& .${Tp.inputRoot}`]:{[`.${Tp.hasPopupIcon}&, .${Tp.hasClearIcon}&`]:{paddingRight:30},[`.${Tp.hasPopupIcon}.${Tp.hasClearIcon}&`]:{paddingRight:56},[`& .${Tp.input}`]:{width:0,minWidth:30}},[`& .${vp.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:`4px 4px 4px 0px`}},[`& .${vp.root}.${op.sizeSmall}`]:{[`& .${vp.input}`]:{padding:`2px 4px 3px 0`}},[`& .${bp.root}`]:{padding:9,[`.${Tp.hasPopupIcon}&, .${Tp.hasClearIcon}&`]:{paddingRight:39},[`.${Tp.hasPopupIcon}.${Tp.hasClearIcon}&`]:{paddingRight:65},[`& .${Tp.input}`]:{padding:`7.5px 4px 7.5px 5px`},[`& .${Tp.endAdornment}`]:{right:9}},[`& .${bp.root}.${op.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${Tp.input}`]:{padding:`2.5px 4px 2.5px 8px`}},[`& .${Sp.root}`]:{paddingTop:19,paddingLeft:8,[`.${Tp.hasPopupIcon}&, .${Tp.hasClearIcon}&`]:{paddingRight:39},[`.${Tp.hasPopupIcon}.${Tp.hasClearIcon}&`]:{paddingRight:65},[`& .${Sp.input}`]:{padding:`7px 4px`},[`& .${Tp.endAdornment}`]:{right:9}},[`& .${Sp.root}.${op.sizeSmall}`]:{paddingBottom:1,[`& .${Sp.input}`]:{padding:`2.5px 4px`}},[`& .${op.hiddenLabel}`]:{paddingTop:8},[`& .${Sp.root}.${op.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${Tp.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${Sp.root}.${op.hiddenLabel}.${op.sizeSmall}`]:{[`& .${Tp.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${Tp.input}`]:{flexGrow:1,textOverflow:`ellipsis`,opacity:0},variants:[{props:{fullWidth:!0},style:{width:`100%`}},{props:{size:`small`},style:{[`& .${Tp.tag}`]:{margin:2,maxWidth:`calc(100% - 4px)`}}},{props:{inputFocused:!0},style:{[`& .${Tp.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${Tp.inputRoot}`]:{flexWrap:`wrap`}}}]}),Ap=V(`div`,{name:`MuiAutocomplete`,slot:`EndAdornment`})({position:`absolute`,right:0,top:`50%`,transform:`translate(0, -50%)`}),jp=V(ru,{name:`MuiAutocomplete`,slot:`ClearIndicator`})({marginRight:-2,padding:4,visibility:`hidden`}),Mp=V(ru,{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)`}}]}),Np=V(Ff,{name:`MuiAutocomplete`,slot:`Popper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${Tp.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(U(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:`absolute`}}]}))),Pp=V(Yc,{name:`MuiAutocomplete`,slot:`Paper`})(U(({theme:e})=>({...e.typography.body1,overflow:`auto`}))),Fp=V(`div`,{name:`MuiAutocomplete`,slot:`Loading`})(U(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:`14px 16px`}))),Ip=V(`div`,{name:`MuiAutocomplete`,slot:`NoOptions`})(U(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:`14px 16px`}))),Lp=V(`ul`,{name:`MuiAutocomplete`,slot:`Listbox`})(U(({theme:e})=>({listStyle:`none`,margin:0,padding:`8px 0`,maxHeight:`40vh`,overflow:`auto`,isolation:`isolate`,position:`relative`,[`& .${Tp.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`},[`&.${Tp.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`},[`&.${Tp.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),[`&.${Tp.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}},[`&.${Tp.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}}}))),Rp=V(zf,{name:`MuiAutocomplete`,slot:`GroupLabel`})(U(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),zp=V(`ul`,{name:`MuiAutocomplete`,slot:`GroupUl`})({padding:0,[`& .${Tp.option}`]:{paddingLeft:24}}),Bp=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiAutocomplete`}),{autoComplete:r=!1,autoHighlight:i=!1,autoSelect:a=!1,blurOnSelect:o=!1,className:s,clearIcon:c=Ep||=(0,R.jsx)(iu,{fontSize:`small`}),clearOnBlur:l=!n.freeSolo,clearOnEscape:u=!1,clearText:d=`Clear`,closeText:f=`Close`,defaultValue:p=n.multiple?[]:null,disableClearable:m=!1,disableCloseOnSelect:h=!1,disabled:g=!1,disabledItemsFocusable:_=!1,disableListWrap:v=!1,disablePortal:y=!1,filterOptions:b,filterSelectedOptions:x=!1,forcePopupIcon:S=`auto`,freeSolo:C=!1,fullWidth:w=!1,getLimitTagsText:T=e=>`+${e}`,getOptionDisabled:E,getOptionKey:D,getOptionLabel:O,isOptionEqualToValue:ee,groupBy:te,handleHomeEndKeys:k=!n.freeSolo,id:A,includeInputInList:j=!1,inputValue:ne,limitTags:re=-1,loading:M=!1,loadingText:N=`Loading…`,multiple:ie=!1,noOptionsText:ae=`No options`,onChange:P,onClose:oe,onHighlightChange:F,onInputChange:se,onOpen:ce,open:le,openOnFocus:ue=!1,openText:de=`Open`,options:fe,popupIcon:I=Dp||=(0,R.jsx)(Cp,{}),readOnly:pe=!1,renderGroup:me,renderInput:he,renderOption:ge,renderValue:_e,selectOnFocus:ve=!n.freeSolo,size:ye=`medium`,slots:be={},slotProps:xe={},value:Se,...Ce}=n,{getRootProps:we,getInputProps:Te,getInputLabelProps:Ee,getPopupIndicatorProps:De,getClearProps:Oe,getItemProps:ke,getListboxProps:Ae,getOptionProps:je,value:Me,dirty:Ne,expanded:Pe,id:Fe,popupOpen:Ie,focused:Le,focusedItem:Re,anchorEl:ze,setAnchorEl:Be,inputValue:Ve,groupedOptions:He}=Du({...n,componentName:`Autocomplete`}),Ue=hu();L.useEffect(()=>{if(!Ie||!ze||typeof ResizeObserver>`u`)return;let e=ze.clientWidth,t=new ResizeObserver(()=>{let t=ze.clientWidth;e!==t&&(e=t,Ue())});return t.observe(ze),()=>{t.disconnect()}},[Ie,ze,Ue]);let We=L.useRef([]),Ge=L.useRef(!1),Ke=Ie?He:We.current;Ti(()=>{Ie&&!Ge.current&&(We.current=[]),Ge.current=Ie,Ie&&He.length>0&&(We.current=He)},[Ie,He]);let qe=!m&&!g&&Ne&&!pe,Je=(!C||S===!0)&&S!==!1,{onMouseDown:Ye}=Te(),{ref:Xe,...Ze}=Ae(),Qe=O||(e=>e.label??e),$e={...n,disablePortal:y,expanded:Pe,focused:Le,fullWidth:w,getOptionLabel:Qe,hasClearIcon:qe,hasPopupIcon:Je,inputFocused:Re===-1,popupOpen:Ie,size:ye},et=Op($e),tt={slots:be,slotProps:xe},[nt,rt]=zc(`root`,{ref:t,className:[et.root,s],elementType:kp,externalForwardedProps:{...tt,...Ce},getSlotProps:we,ownerState:$e}),[it,at]=zc(`listbox`,{elementType:Lp,externalForwardedProps:tt,ownerState:$e,className:et.listbox,additionalProps:Ze,ref:Xe}),[ot,st]=zc(`paper`,{elementType:Yc,externalForwardedProps:tt,ownerState:$e,className:et.paper}),[ct,lt]=zc(`popper`,{elementType:Ff,externalForwardedProps:tt,ownerState:$e,className:et.popper,additionalProps:{disablePortal:y,style:{width:ze?ze.clientWidth:null,pointerEvents:Ie?void 0:`none`},role:`presentation`,anchorEl:ze,open:Ie}}),ut=Ke.length>0||M||!C||lt.keepMounted===!0,[dt,ft]=zc(`clearIndicator`,{elementType:jp,externalForwardedProps:tt,ownerState:$e,className:et.clearIndicator,shouldForwardComponentProp:!0,additionalProps:{...Oe(),"aria-label":d,title:d}}),[pt,mt]=zc(`popupIndicator`,{elementType:Mp,externalForwardedProps:tt,ownerState:$e,className:et.popupIndicator,shouldForwardComponentProp:!0,additionalProps:{...De(),disabled:g,"aria-label":Ie?f:de,title:Ie?f:de}}),ht,gt=e=>({className:et.tag,disabled:g,...ke(e)});if(ie?Me.length>0&&(ht=_e?_e(Me,gt,$e):Me.map((e,t)=>{let{key:n,...r}=gt({index:t});return(0,R.jsx)(qf,{label:Qe(e),size:ye,...r,...tt.slotProps.chip},n)})):_e&&Me!=null&&(ht=_e(Me,gt,$e)),re>-1&&Array.isArray(ht)){let e=ht.length-re;!Le&&e>0&&(ht=ht.splice(0,re),ht.push((0,R.jsx)(`span`,{className:et.tag,children:T(e)},ht.length)))}let _t=me||(e=>(0,R.jsxs)(`li`,{children:[(0,R.jsx)(Rp,{className:et.groupLabel,ownerState:$e,component:`div`,children:e.group}),(0,R.jsx)(zp,{className:et.groupUl,ownerState:$e,children:e.children})]},e.key)),vt=ge||((e,t)=>{let{key:n,...r}=e;return(0,R.jsx)(`li`,{...r,children:Qe(t)},n)}),yt=(e,t)=>{let n=je({option:e,index:t});return vt({...n,className:et.option},e,{selected:n[`aria-selected`],index:t,inputValue:Ve},$e)};return(0,R.jsxs)(L.Fragment,{children:[(0,R.jsx)(nt,{...rt,children:he({id:Fe,disabled:g,fullWidth:n.fullWidth??!0,size:ye===`small`?`small`:void 0,slotProps:{inputLabel:Ee(),input:{ref:Be,className:et.inputRoot,startAdornment:ht,onMouseDown:e=>{e.target===e.currentTarget&&Ye(e)},...(qe||Je)&&{endAdornment:(0,R.jsxs)(Ap,{className:et.endAdornment,ownerState:$e,children:[qe?(0,R.jsx)(dt,{...ft,children:c}):null,Je?(0,R.jsx)(pt,{...mt,children:I}):null]})}},htmlInput:{className:et.input,disabled:g,readOnly:pe,...Te()}}})}),ze&&ut?(0,R.jsx)(Np,{as:ct,...lt,children:(0,R.jsxs)(Pp,{as:ot,...st,children:[M&&Ke.length===0?(0,R.jsx)(Fp,{className:et.loading,ownerState:$e,children:N}):null,Ke.length===0&&!C&&!M?(0,R.jsx)(Ip,{className:et.noOptions,ownerState:$e,role:`presentation`,onMouseDown:e=>{e.preventDefault()},children:ae}):null,Ke.length>0?(0,R.jsx)(it,{...at,children:Ke.map((e,t)=>te?_t({key:e.key,group:e.group,children:e.options.map((t,n)=>yt(t,e.index+n))}):yt(e,t))}):null]})}):null]})}),Vp=Ns((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 Hp(e){return ci(`MuiAvatar`,e)}li(`MuiAvatar`,[`root`,`colorDefault`,`circular`,`rounded`,`square`,`img`,`fallback`]);var Up=e=>{let{classes:t,variant:n,colorDefault:r}=e;return Ia({root:[`root`,n,r&&`colorDefault`],img:[`img`],fallback:[`fallback`]},Hp,t)},Wp=V(`div`,{name:`MuiAvatar`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(U(({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,"@media (forced-colors: active)":{boxSizing:`border-box`,border:`1px solid ButtonBorder`},...e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.grey[400],...e.applyStyles(`dark`,{backgroundColor:e.palette.grey[600]})}}}]}))),Gp=V(`img`,{name:`MuiAvatar`,slot:`Img`})({width:`100%`,height:`100%`,textAlign:`center`,objectFit:`cover`,color:`transparent`,textIndent:1e4}),Kp=V(Vp,{name:`MuiAvatar`,slot:`Fallback`})({width:`75%`,height:`75%`});function qp(e,t,n,r){let[i,a]=L.useState(!1);return L.useEffect(()=>{if(!e&&!t)return;a(!1);let i=!0,o=new Image;return o.onload=()=>{i&&a(`loaded`)},o.onerror=()=>{i&&a(`error`)},o.crossOrigin=n,o.referrerPolicy=r,o.src=e,t&&(o.srcset=t),()=>{i=!1}},[n,r,e,t]),i}var Jp=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiAvatar`}),{alt:r,children:i,className:a,component:o=`div`,slots:s={},slotProps:c={},sizes:l,src:u,srcSet:d,variant:f=`circular`,...p}=n,m=null,h={...n,component:o,variant:f},{crossOrigin:g,referrerPolicy:_}=(typeof c.img==`function`?c.img(h):c.img)??{},v=qp(u,d,g,_),y=u||d,b=y&&v!==`error`;h.colorDefault=!b,delete h.ownerState;let x=Up(h),S={slots:s,slotProps:c},[C,w]=zc(`root`,{ref:t,className:z(x.root,a),elementType:Wp,externalForwardedProps:{...S,component:o,...p},ownerState:h}),[T,E]=zc(`img`,{className:x.img,elementType:Gp,externalForwardedProps:S,additionalProps:{alt:r,src:u,srcSet:d,sizes:l},ownerState:h}),[D,O]=zc(`fallback`,{className:x.fallback,elementType:Kp,externalForwardedProps:S,shouldForwardComponentProp:!0,ownerState:h});return m=b?(0,R.jsx)(T,{...E}):i||i===0?i:y&&r?r[0]:(0,R.jsx)(D,{...O}),(0,R.jsx)(C,{...w,children:m})}),eee={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}},Yp={opacity:0,visibility:`hidden`},Xp=L.forwardRef(function(e,t){let n=ms(),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,..._}=e,v=L.useRef(null),y=Zs(v,wf(o),t),b=Ac(v,d),x=Ac(v,(e,t)=>{kc(e);let r=Mc({style:h,timeout:g,easing:s},{mode:`enter`});e.style.transition=n.transitions.create(`opacity`,r),l&&l(e,t)}),S=Ac(v,u),C=Ac(v,m),w=Ac(v,e=>{let t=Mc({style:h,timeout:g,easing:s},{mode:`exit`});e.style.transition=n.transitions.create(`opacity`,t),f&&f(e)}),T=Ac(v,e=>{e.style.transition=``,p&&p(e)});return(0,R.jsx)(fc,{appear:a,in:c,nodeRef:v,onEnter:x,onEntered:S,onEntering:b,onExit:w,onExited:T,onExiting:C,addEndListener:e=>{i&&i(v.current,e)},timeout:g,..._,children:(e,{ownerState:t,...n})=>{let r=jc(e,c,eee,Yp,h,o.props.style);return L.cloneElement(o,{style:r,ref:y,...n})}})});function Zp(e){return ci(`MuiBackdrop`,e)}li(`MuiBackdrop`,[`root`,`invisible`]);var Qp=e=>{let{classes:t,invisible:n}=e;return Ia({root:[`root`,n&&`invisible`]},Zp,t)},$p=V(`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`}}]}),em=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiBackdrop`}),{children:r,className:i,component:a=`div`,invisible:o=!1,open:s,slotProps:c={},slots:l={},transitionDuration:u,...d}=n,f={...n,component:a,invisible:o},p=Qp(f),m={component:a,slots:l,slotProps:c},[h,g]=zc(`root`,{elementType:$p,externalForwardedProps:m,className:z(p.root,i),ownerState:f}),[_,v]=zc(`transition`,{elementType:Xp,externalForwardedProps:m,ownerState:f});return(0,R.jsx)(_,{in:s,timeout:u,...d,...v,children:(0,R.jsx)(h,{...g,ref:t,children:r})})});function tee(e){let{badgeContent:t,invisible:n=!1,max:r=99,showZero:i=!1}=e,a=_u({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 nee(e){return ci(`MuiBadge`,e)}var ree=li(`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`]),tm=10,nm=4,rm=e=>{let{color:t,anchorOrigin:n,invisible:r,overlap:i,variant:a,classes:o={}}=e;return Ia({root:[`root`],badge:[`badge`,a,r&&`invisible`,`anchorOrigin${H(n.vertical)}${H(n.horizontal)}`,`anchorOrigin${H(n.vertical)}${H(n.horizontal)}${H(i)}`,`overlap${H(i)}`,t!==`default`&&`color${H(t)}`]},nee,o)},im=V(`span`,{name:`MuiBadge`,slot:`Root`})({position:`relative`,display:`inline-flex`,verticalAlign:`middle`,flexShrink:0}),am=V(`span`,{name:`MuiBadge`,slot:`Badge`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${H(n.anchorOrigin.vertical)}${H(n.anchorOrigin.horizontal)}${H(n.overlap)}`],n.color!==`default`&&t[`color${H(n.color)}`],n.invisible&&t.invisible]}})(U(({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:tm*2,lineHeight:1,padding:`0 6px`,height:tm*2,borderRadius:tm,zIndex:1,"@media (forced-colors: active)":{border:`1px solid ButtonBorder`},transition:e.transitions.create(`transform`,{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.entries(e.palette).filter(zl([`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:nm,height:nm*2,minWidth:nm*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%`}`,[`&.${ree.invisible}`]:{transform:`scale(0) translate(var(--Badge-translateX), var(--Badge-translateY))`}}}}]})));function om(e){return{vertical:e?.vertical??`top`,horizontal:e?.horizontal??`right`}}var sm=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiBadge`}),{anchorOrigin:r,className:i,classes:a,component:o,children:s,overlap:c=`rectangular`,color:l=`default`,invisible:u=!1,max:d=99,badgeContent:f,slots:p,slotProps:m,showZero:h=!1,variant:g=`standard`,..._}=n,{badgeContent:v,invisible:y,max:b,displayValue:x}=tee({max:d,invisible:u,badgeContent:f,showZero:h}),S=_u({anchorOrigin:om(r),color:l,overlap:c,variant:g,badgeContent:f}),C=y||v==null&&g!==`dot`,{color:w=l,overlap:T=c,anchorOrigin:E,variant:D=g}=C?S:n,O=om(E),ee=D===`dot`?void 0:x,te={...n,badgeContent:v,invisible:C,max:b,displayValue:ee,showZero:h,anchorOrigin:O,color:w,overlap:T,variant:D},k=rm(te),A={slots:p,slotProps:m},[j,ne]=zc(`root`,{elementType:im,externalForwardedProps:{...A,..._},ownerState:te,className:z(k.root,i),ref:t,additionalProps:{as:o}}),[re,M]=zc(`badge`,{elementType:am,externalForwardedProps:A,ownerState:te,className:k.badge});return(0,R.jsxs)(j,{...ne,children:[s,(0,R.jsx)(re,{...M,children:ee})]})}),cm=li(`MuiBox`,[`root`]),G=oi({themeId:O,defaultTheme:fs(),defaultClassName:cm.root,generateClassName:ii.generate});function iee(e){return ci(`MuiButton`,e)}var lm=li(`MuiButton`,`root.text.outlined.contained.disableElevation.focusVisible.disabled.colorInherit.colorPrimary.colorSecondary.colorSuccess.colorError.colorInfo.colorWarning.sizeMedium.sizeSmall.sizeLarge.fullWidth.startIcon.endIcon.icon.loading.loadingWrapper.loadingIconPlaceholder.loadingIndicator.loadingPositionCenter.loadingPositionStart.loadingPositionEnd`.split(`.`)),aee=L.createContext({}),oee=L.createContext(void 0),see=e=>{let{color:t,disableElevation:n,fullWidth:r,size:i,variant:a,loading:o,loadingPosition:s,classes:c}=e,l=Ia({root:[`root`,o&&`loading`,a,`size${H(i)}`,`color${H(t)}`,n&&`disableElevation`,r&&`fullWidth`,o&&`loadingPosition${H(s)}`],startIcon:[`icon`,`startIcon`],endIcon:[`icon`,`endIcon`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},iee,c);return{...c,...l}},um=[{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}}}],cee=V(Ol,{shouldForwardProp:e=>gs(e)||e===`classes`,name:`MuiButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`size${H(n.size)}`],n.color===`inherit`&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(U(({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`},[`&.${lm.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.startIcon||e.loading&&e.loadingPosition===`start`,style:{"&::before":{content:`"\\200b"`,width:0,overflow:`hidden`}}},{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]},[`&.${lm.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${lm.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)`,[`&.${lm.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(zl()).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`},[`&.${lm.focusVisible}`]:{boxShadow:`none`},"&:active":{boxShadow:`none`},[`&.${lm.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}),[`&.${lm.loading}`]:{color:`transparent`}}}]}})),lee=V(`span`,{name:`MuiButton`,slot:`StartIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart]}})(({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}},...um]})),uee=V(`span`,{name:`MuiButton`,slot:`EndIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd]}})(({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}},...um]})),dee=V(`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}}]})),dm=V(`span`,{name:`MuiButton`,slot:`LoadingIconPlaceholder`})({display:`inline-block`,width:`1em`,height:`1em`}),K=L.forwardRef(function(e,t){let n=L.useContext(aee),r=L.useContext(oee),i=Os({props:Si(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=Gs(h),T=_??(0,R.jsx)(Zl,{"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=see(E),O=(b||g&&v===`start`)&&(0,R.jsx)(lee,{className:D.startIcon,ownerState:E,children:b||(0,R.jsx)(dm,{className:D.loadingIconPlaceholder,ownerState:E})}),ee=(f||g&&v===`end`)&&(0,R.jsx)(uee,{className:D.endIcon,ownerState:E,children:f||(0,R.jsx)(dm,{className:D.loadingIconPlaceholder,ownerState:E})}),te=r||``,k=typeof g==`boolean`?(0,R.jsx)(`span`,{className:D.loadingWrapper,style:{display:`contents`},children:g&&(0,R.jsx)(dee,{className:D.loadingIndicator,ownerState:E,children:T})}):null,{root:A,...j}=D;return(0,R.jsxs)(cee,{ownerState:E,className:z(n.className,D.root,c,te),component:s,disabled:l||g,focusRipple:!d,focusVisibleClassName:z(D.focusVisible,p),ref:t,internalNativeButton:!0,type:x,id:g?w:h,...C,classes:j,children:[O,v!==`end`&&k,a,v===`end`&&k,ee]})});function fee(e){return ci(`MuiCard`,e)}li(`MuiCard`,[`root`]);var fm=e=>{let{classes:t}=e;return Ia({root:[`root`]},fee,t)},pm=V(Yc,{name:`MuiCard`,slot:`Root`})({overflow:`hidden`}),mm=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiCard`}),{className:r,raised:i=!1,...a}=n,o={...n,raised:i};return(0,R.jsx)(pm,{className:z(fm(o).root,r),elevation:i?8:void 0,ref:t,ownerState:o,...a})});function hm(e){return ci(`MuiCardContent`,e)}li(`MuiCardContent`,[`root`]);var gm=e=>{let{classes:t}=e;return Ia({root:[`root`]},hm,t)},_m=V(`div`,{name:`MuiCardContent`,slot:`Root`})({padding:16,"&:last-child":{paddingBottom:24}}),vm=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiCardContent`}),{className:r,component:i=`div`,...a}=n,o={...n,component:i};return(0,R.jsx)(_m,{as:i,className:z(gm(o).root,r),ownerState:o,ref:t,...a})});function ym(e){return ci(`PrivateSwitchBase`,e)}li(`PrivateSwitchBase`,[`root`,`checked`,`disabled`,`input`,`edgeStart`,`edgeEnd`]);var bm=e=>{let{classes:t,checked:n,disabled:r,edge:i}=e;return Ia({root:[`root`,n&&`checked`,r&&`disabled`,i&&`edge${H(i)}`],input:[`input`]},ym,t)},xm=V(Ol,{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}}]}),Sm=V(`input`,{name:`MuiSwitchBase`,shouldForwardProp:gs})({cursor:`inherit`,position:`absolute`,opacity:0,width:`100%`,height:`100%`,top:0,left:0,margin:0,padding:0,zIndex:1}),Cm=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,name:d,onBlur:f,onChange:p,onFocus:m,readOnly:h,required:g=!1,tabIndex:_,type:v,value:y,slots:b={},slotProps:x={},...S}=e,{nativeButton:C,...w}=S,[T,E]=qs({controlled:r,default:!!a,name:`SwitchBase`,state:`checked`}),D=ep(),O=e=>{m&&m(e),D&&D.onFocus&&D.onFocus(e)},ee=e=>{f&&f(e),D&&D.onBlur&&D.onBlur(e)},te=e=>{if(e.nativeEvent.defaultPrevented||h)return;let t=e.target.checked;E(t),p&&p(e,t)},k=o;D&&k===void 0&&(k=D.disabled);let A=v===`checkbox`||v===`radio`,j={...e,checked:T,disabled:k,disableFocusRipple:s,edge:c},ne=bm(j),re={slots:b,slotProps:x},[M,N]=zc(`root`,{ref:t,elementType:xm,className:ne.root,shouldForwardComponentProp:!0,externalForwardedProps:{...re,component:`span`,...w},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),O(t)},onBlur:t=>{e.onBlur?.(t),ee(t)}}),ownerState:j,additionalProps:{centerRipple:!0,focusRipple:!s,role:void 0,tabIndex:null}}),[ie,ae]=zc(`input`,{elementType:Sm,className:ne.input,externalForwardedProps:re,getSlotProps:e=>({...e,onChange:t=>{e.onChange?.(t),te(t)}}),ownerState:j,additionalProps:{autoFocus:n,checked:r,defaultChecked:a,disabled:k,id:A?u:void 0,name:d,readOnly:h,required:g,tabIndex:_,type:v,...v===`checkbox`&&y===void 0?{}:{value:y}}});return(0,R.jsxs)(M,{...N,children:[(0,R.jsx)(ie,{...ae}),T?i:l]})}),wm=Ns((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`),Tm=Ns((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`),Em=Ns((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 Dm(e){return ci(`MuiCheckbox`,e)}var Om=li(`MuiCheckbox`,[`root`,`checked`,`disabled`,`indeterminate`,`colorPrimary`,`colorSecondary`,`sizeSmall`,`sizeMedium`]),km=e=>{let{classes:t,indeterminate:n,color:r,size:i}=e,a=Ia({root:[`root`,n&&`indeterminate`,`color${H(r)}`,`size${H(i)}`]},Dm,t);return{...t,...a}},Am=V(Cm,{shouldForwardProp:e=>gs(e)||e===`classes`,name:`MuiCheckbox`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${H(n.size)}`],n.color!==`default`&&t[`color${H(n.color)}`]]}})(U(({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(zl()).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(zl()).map(([t])=>({props:{color:t},style:{[`&.${Om.checked}, &.${Om.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${Om.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:`transparent`}}}}]}))),jm=(0,R.jsx)(Tm,{}),Mm=(0,R.jsx)(wm,{}),Nm=(0,R.jsx)(Em,{}),Pm=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiCheckbox`}),{checkedIcon:r=jm,color:i=`primary`,icon:a=Mm,indeterminate:o=!1,indeterminateIcon:s=Nm,size:c=`medium`,disableRipple:l=!1,className:u,slots:d={},slotProps:f={},...p}=n,m=o?s:a,h=o?s:r,g={...n,disableRipple:l,color:i,indeterminate:o,size:c},_=km(g),v=f.input,[y,b]=zc(`root`,{ref:t,elementType:Am,className:z(_.root,u),shouldForwardComponentProp:!0,externalForwardedProps:{slots:d,slotProps:f,...p},ownerState:g,additionalProps:{type:`checkbox`,icon:L.cloneElement(m,{fontSize:m.props.fontSize??c}),checkedIcon:L.cloneElement(h,{fontSize:h.props.fontSize??c}),disableRipple:l,slots:d,slotProps:{input:$s(typeof v==`function`?v(g):v,{"data-indeterminate":o,"aria-checked":o?`mixed`:void 0})}}});return(0,R.jsx)(y,{...b,classes:_})}),Fm=typeof Ds({})==`function`,Im=(e,t)=>({WebkitFontSmoothing:`antialiased`,MozOsxFontSmoothing:`grayscale`,boxSizing:`border-box`,WebkitTextSizeAdjust:`100%`,...t&&!e.vars&&{colorScheme:e.palette.mode}}),Lm=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}}),Rm=(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:Im(e,t),"*, *::before, *::after":{boxSizing:`inherit`},"strong, b":{fontWeight:e.typography.fontWeightBold},body:{margin:0,...Lm(e),"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}},...n},i=e.components?.MuiCssBaseline?.styleOverrides;return i&&(r=[r,i]),r},zm=`mui-ecs`,Bm=e=>{let t=Rm(e,!1),n=Array.isArray(t)?t[0]:t;return!e.vars&&n&&(n.html[`:root:has(${zm})`]={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(.${zm}))`]:{colorScheme:r.palette?.mode}}:n[i.replace(/\s*&/,``)]={[`&:not(:has(.${zm}))`]:{colorScheme:r.palette?.mode}}}),t},Vm=Ds(Fm?({theme:e,enableColorScheme:t})=>Rm(e,t):({theme:e})=>Bm(e));function pee(e){let{children:t,enableColorScheme:n=!1}=Os({props:e,name:`MuiCssBaseline`});return(0,R.jsxs)(L.Fragment,{children:[Fm&&(0,R.jsx)(Vm,{enableColorScheme:n}),!Fm&&!n&&(0,R.jsx)(`span`,{className:zm,style:{display:`none`}}),t]})}function Hm(e=window){let t=e.document.documentElement.clientWidth;return e.innerWidth-t}function mee(e){let t=zs(e);return t.body===e?Vs(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Um(e,t){t?e.setAttribute(`aria-hidden`,`true`):e.removeAttribute(`aria-hidden`)}function Wm(e){return parseFloat(Vs(e).getComputedStyle(e).paddingRight)||0}function hee(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 Gm(e,t,n,r,i){let a=[t,n,...r];[].forEach.call(e.children,e=>{let t=!a.includes(e),n=!hee(e);t&&n&&Um(e,i)})}function Km(e,t){let n=-1;return e.some((e,r)=>t(e)?(n=r,!0):!1),n}function gee(e,t){let n=[],r=e.container;if(!t.disableScrollLock){if(mee(r)){let e=Hm(Vs(r));n.push({value:r.style.paddingRight,property:`padding-right`,el:r}),r.style.paddingRight=`${Wm(r)+e}px`;let t=zs(r).querySelectorAll(`.mui-fixed`);[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:`padding-right`,el:t}),t.style.paddingRight=`${Wm(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=zs(r).body;else{let t=r.parentElement,n=Vs(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 _ee(e){let t=[];return[].forEach.call(e.children,e=>{e.getAttribute(`aria-hidden`)===`true`&&t.push(e)}),t}var vee=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&&Um(e.modalRef,!1);let r=_ee(t);Gm(t,e.mount,e.modalRef,r,!0);let i=Km(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=Km(this.containers,t=>t.modals.includes(e)),r=this.containers[n];r.restore||=gee(r,t)}remove(e,t=!0){let n=this.modals.indexOf(e);if(n===-1)return n;let r=Km(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&&Um(e.modalRef,t),Gm(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&&Um(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}},qm=gu,Jm=`data-mui-focusable`;function yee(e){return e?e.hasAttribute(`data-mui-focusable`)?e:e.querySelector(`[${Jm}]`):null}var bee=[`input`,`select`,`textarea`,`a[href]`,`button`,`[tabindex]`,`audio[controls]`,`video[controls]`,`[contenteditable]:not([contenteditable="false"])`].join(`,`);function xee(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 See(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 Cee(e){return!(e.disabled||e.tagName===`INPUT`&&e.type===`hidden`||See(e))}function wee(e){let t=[],n=[];return Array.from(e.querySelectorAll(bee)).forEach((e,r)=>{let i=xee(e);i===-1||!Cee(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 Tee(){return!0}function Eee(e){let{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:a=wee,isEnabled:o=Tee,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=Xs(wf(t),m),g=L.useRef(null);L.useEffect(()=>{!s||!m.current||(p.current=!n)},[n,s]),L.useEffect(()=>{if(c.current=!1,!s||!m.current)return;let e=Rs(zs(m.current)),t=yee(m.current)??m.current;return qm(m.current,e)||(t.hasAttribute(`tabIndex`)||t.setAttribute(`tabIndex`,`-1`),p.current&&t.focus()),()=>{!i&&d.current&&(c.current=!0,d.current.focus(),d.current=null)}},[s]),L.useEffect(()=>{if(!s||!m.current)return;let e=zs(m.current),t=t=>{g.current=t,!(r||!o()||t.key!==`Tab`)&&Rs(e)===m.current&&t.shiftKey&&(c.current=!0,u.current&&u.current.focus())},n=()=>{let t=m.current;if(t===null)return;let n=Rs(e);if(!e.hasFocus()||!o()||c.current){c.current=!1;return}if(qm(t,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=Rs(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 Dee(e){return typeof e==`function`?e():e}function Oee(e){return e?e.props.hasOwnProperty(`in`):!1}var Ym=()=>{},Xm=new vee;function kee(e){let{container:t,disableScrollLock:n=!1,closeAfterTransition:r=!1,onTransitionEnter:i,onTransitionExited:a,children:o,onClose:s,open:c,rootRef:l}=e,u=L.useRef({}),d=L.useRef(null),f=L.useRef(null),p=Xs(f,l),[m,h]=L.useState(!c),g=Oee(o),_=!0;(e[`aria-hidden`]===`false`||e[`aria-hidden`]===!1)&&(_=!1);let v=()=>zs(d.current),y=()=>(u.current.modalRef=f.current,u.current.mount=d.current,u.current),b=()=>{Xm.mount(y(),{disableScrollLock:n}),f.current&&(f.current.scrollTop=0)},x=Js(()=>{let e=Dee(t)||v().body;Xm.add(y(),e),f.current&&b()}),S=()=>Xm.isTopModal(y()),C=Js(e=>{d.current=e,e&&(c&&S()?b():f.current&&Um(f.current,_))}),w=L.useCallback(()=>{Xm.remove(y(),_)},[_]);L.useEffect(()=>()=>{w()},[w]),L.useEffect(()=>{c?x():(!g||!r)&&w()},[c,w,g,r,x]);let T=e=>t=>{e.onKeyDown?.(t),!(t.key!==`Escape`||t.which===229||!S())&&(t.stopPropagation(),s&&s(t,`escapeKeyDown`))},E=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&s&&s(t,`backdropClick`)};return{getRootProps:(t={})=>{let n=Ic(e);delete n.onTransitionEnter,delete n.onTransitionExited;let r={...n,...t};return{role:`presentation`,...r,onKeyDown:T(r),ref:p}},getBackdropProps:(e={})=>{let t=e;return{"aria-hidden":!0,...t,onClick:E(t),open:c}},getTransitionProps:()=>({onEnter:ws(()=>{h(!1),i&&i()},o?.props.onEnter??Ym),onExited:ws(()=>{h(!0),a&&a(),r&&w()},o?.props.onExited??Ym)}),rootRef:p,portalRef:C,isTopModal:S,exited:m,hasTransition:g}}function Aee(e){return ci(`MuiModal`,e)}li(`MuiModal`,[`root`,`hidden`,`backdrop`]);var jee=e=>{let{open:t,exited:n,classes:r}=e;return Ia({root:[`root`,!t&&n&&`hidden`],backdrop:[`backdrop`]},Aee,r)},Mee=V(`div`,{name:`MuiModal`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(U(({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`}}]}))),Nee=V(em,{name:`MuiModal`,slot:`Backdrop`})({zIndex:-1}),Zm=L.forwardRef(function(e,t){let n=Os({name:`MuiModal`,props:e}),{classes:r,className:i,closeAfterTransition:a=!1,children:o,container:s,component:c,disableAutoFocus:l=!1,disableEnforceFocus:u=!1,disablePortal:d=!1,disableRestoreFocus:f=!1,disableScrollLock:p=!1,hideBackdrop:m=!1,keepMounted:h=!1,onClose:g,onTransitionEnter:_,onTransitionExited:v,open:y,slotProps:b={},slots:x={},theme:S,...C}=n,w={...n,closeAfterTransition:a,disableAutoFocus:l,disableEnforceFocus:u,disablePortal:d,disableRestoreFocus:f,disableScrollLock:p,hideBackdrop:m,keepMounted:h},{getRootProps:T,getBackdropProps:E,getTransitionProps:D,portalRef:O,isTopModal:ee,exited:te,hasTransition:k}=kee({...w,rootRef:t}),A={...w,exited:te},j=jee(A),ne={};if(o.props.tabIndex===void 0&&(ne.tabIndex=`-1`),k){let{onEnter:e,onExited:t}=D();ne.onEnter=e,ne.onExited=t}let re={slots:x,slotProps:b},[M,N]=zc(`root`,{ref:t,elementType:Mee,externalForwardedProps:{...re,...C,component:c},getSlotProps:T,ownerState:A,className:z(i,j?.root,!A.open&&A.exited&&j?.hidden)}),[ie,ae]=zc(`backdrop`,{elementType:Nee,externalForwardedProps:re,shouldForwardComponentProp:!0,getSlotProps:e=>E({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:j?.backdrop,ownerState:A});return!h&&!y&&(!k||te)?null:(0,R.jsx)(Ef,{ref:O,container:s,disablePortal:d,children:(0,R.jsxs)(M,{...N,children:[m?null:(0,R.jsx)(ie,{...ae}),(0,R.jsx)(Eee,{disableEnforceFocus:u,disableAutoFocus:l,disableRestoreFocus:f,isEnabled:ee,open:y,children:L.cloneElement(o,ne)})]})})});function Pee(e){return ci(`MuiDialog`,e)}li(`MuiDialog`,[`root`,`backdrop`,`scrollPaper`,`scrollBody`,`container`,`paper`,`paperWidthFalse`,`paperWidthXs`,`paperWidthSm`,`paperWidthMd`,`paperWidthLg`,`paperWidthXl`,`paperFullWidth`,`paperFullScreen`]);var Qm=L.createContext({}),Fee=V(em,{name:`MuiDialog`,slot:`Backdrop`})({zIndex:-1}),Iee=e=>{let{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:a}=e;return Ia({root:[`root`],backdrop:[`backdrop`],container:[`container`,`scroll${H(n)}`],paper:[`paper`,`paperWidth${H(String(r))}`,i&&`paperFullWidth`,a&&`paperFullScreen`]},Pee,t)},Lee=V(Zm,{name:`MuiDialog`,slot:`Root`})({"@media print":{position:`absolute !important`}}),Ree=V(`div`,{name:`MuiDialog`,slot:`Container`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.container,t[`scroll${H(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`}}}]}),zee=V(Yc,{name:`MuiDialog`,slot:`Paper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.paper,t[`paperWidth${H(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(U(({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)`}},{props:{maxWidth:`xs`,scroll:`body`},style:{[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}`}})),...Object.keys(e.breakpoints.values).filter(e=>e!==`xs`).map(t=>({props:{maxWidth:t,scroll:`body`},style:{[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}},{props:({ownerState:e})=>e.fullScreen&&e.scroll===`body`,style:{margin:0,maxWidth:`100%`}}]}))),$m=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiDialog`}),r=ms(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":o,"aria-modal":s=!0,children:c,className:l,fullScreen:u=!1,fullWidth:d=!1,maxWidth:f=`sm`,onClick:p,onClose:m,open:h,PaperComponent:g=Yc,role:_=`dialog`,scroll:v=`paper`,slots:y={},slotProps:b={},transitionDuration:x=i,...S}=n,C={...n,fullScreen:u,fullWidth:d,maxWidth:f,scroll:v},w=Iee(C),T=L.useRef(),E=e=>{T.current=e.target===e.currentTarget},D=e=>{p&&p(e),T.current&&(T.current=null,m&&m(e,`backdropClick`))},O=la(o),ee=L.useMemo(()=>({titleId:O}),[O]),te={slots:y,slotProps:b},[k,A]=zc(`root`,{elementType:Lee,shouldForwardComponentProp:!0,externalForwardedProps:te,ownerState:C,className:z(w.root,l),ref:t}),[j,ne]=zc(`backdrop`,{elementType:Fee,shouldForwardComponentProp:!0,externalForwardedProps:te,ownerState:C,className:w.backdrop}),[re,M]=zc(`paper`,{elementType:zee,shouldForwardComponentProp:!0,externalForwardedProps:te,ownerState:C,className:w.paper,additionalProps:{elevation:24,role:_,"aria-describedby":a,"aria-labelledby":O,"aria-modal":s,tabIndex:-1,[Jm]:``}}),[N,ie]=zc(`container`,{elementType:Ree,externalForwardedProps:te,ownerState:C,className:w.container}),[ae,P]=zc(`transition`,{elementType:Xp,externalForwardedProps:te,ownerState:C,additionalProps:{appear:!0,in:h,timeout:x,role:`presentation`}});return(0,R.jsx)(k,{closeAfterTransition:!0,slots:{backdrop:j},slotProps:{backdrop:{transitionDuration:x,...ne}},onClose:m,open:h,onClick:D,...A,...S,children:(0,R.jsx)(ae,{...P,children:(0,R.jsx)(N,{onMouseDown:E,...ie,children:(0,R.jsx)(re,{as:g,...M,children:(0,R.jsx)(Qm.Provider,{value:ee,children:c})})})})})});function Bee(e){return ci(`MuiDialogActions`,e)}li(`MuiDialogActions`,[`root`,`spacing`]);var Vee=e=>{let{classes:t,disableSpacing:n}=e;return Ia({root:[`root`,!n&&`spacing`]},Bee,t)},Hee=V(`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}}}]}),eh=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiDialogActions`}),{className:r,disableSpacing:i=!1,...a}=n,o={...n,disableSpacing:i};return(0,R.jsx)(Hee,{className:z(Vee(o).root,r),ownerState:o,ref:t,...a})});function Uee(e){return ci(`MuiDialogContent`,e)}li(`MuiDialogContent`,[`root`,`dividers`]);function Wee(e){return ci(`MuiDialogTitle`,e)}var Gee=li(`MuiDialogTitle`,[`root`]),th=e=>{let{classes:t,dividers:n}=e;return Ia({root:[`root`,n&&`dividers`]},Uee,t)},nh=V(`div`,{name:`MuiDialogContent`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(U(({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:{[`.${Gee.root} + &`]:{paddingTop:0}}}]}))),rh=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiDialogContent`}),{className:r,dividers:i=!1,...a}=n,o={...n,dividers:i};return(0,R.jsx)(nh,{className:z(th(o).root,r),ownerState:o,ref:t,...a})}),ih=e=>{let{classes:t}=e;return Ia({root:[`root`]},Wee,t)},ah=V(W,{name:`MuiDialogTitle`,slot:`Root`})({padding:`16px 24px`,flex:`0 0 auto`}),oh=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiDialogTitle`}),{className:r,id:i,...a}=n,o=n,s=ih(o),{titleId:c=i}=L.useContext(Qm);return(0,R.jsx)(ah,{component:`h2`,className:z(s.root,r),ownerState:o,ref:t,variant:`h6`,id:i??c,...a})});function sh(e){return ci(`MuiDivider`,e)}var ch=li(`MuiDivider`,[`root`,`absolute`,`fullWidth`,`inset`,`middle`,`flexItem`,`vertical`,`withChildren`,`textAlignRight`,`textAlignLeft`,`wrapper`,`wrapperVertical`]),lh=e=>{let{absolute:t,children:n,classes:r,flexItem:i,orientation:a,textAlign:o,variant:s}=e;return Ia({root:[`root`,t&&`absolute`,s,a===`vertical`&&`vertical`,i&&`flexItem`,n&&`withChildren`,o===`right`&&a!==`vertical`&&`textAlignRight`,o===`left`&&a!==`vertical`&&`textAlignLeft`],wrapper:[`wrapper`,a===`vertical`&&`wrapperVertical`]},sh,r)},uh=V(`div`,{name:`MuiDivider`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.orientation===`vertical`&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.textAlign===`right`&&n.orientation!==`vertical`&&t.textAlignRight,n.textAlign===`left`&&n.orientation!==`vertical`&&t.textAlignLeft]}})(U(({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:{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%`}}}]}))),dh=V(`span`,{name:`MuiDivider`,slot:`Wrapper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.wrapper,n.orientation===`vertical`&&t.wrapperVertical]}})(U(({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)`}}]}))),fh=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiDivider`}),{absolute:r=!1,children:i,className:a,orientation:o=`horizontal`,component:s=i||o===`vertical`?`div`:`hr`,flexItem:c=!1,role:l=s===`hr`?void 0:`separator`,textAlign:u=`center`,variant:d=`fullWidth`,...f}=n,p={...n,absolute:r,component:s,flexItem:c,orientation:o,role:l,textAlign:u,variant:d},m=lh(p);return(0,R.jsx)(uh,{as:s,className:z(m.root,a),role:l,ref:t,ownerState:p,"aria-orientation":l===`separator`&&(s!==`hr`||o===`vertical`)?o:void 0,...f,children:i?(0,R.jsx)(dh,{className:m.wrapper,ownerState:p,children:i}):null})});function ph(e){return ci(`MuiFab`,e)}var mh=li(`MuiFab`,[`root`,`primary`,`secondary`,`extended`,`circular`,`focusVisible`,`disabled`,`colorInherit`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`info`,`error`,`warning`,`success`]),hh=e=>{let{color:t,variant:n,classes:r,size:i}=e,a=Ia({root:[`root`,n,`size${H(i)}`,t===`inherit`?`colorInherit`:t]},ph,r);return{...r,...a}},gh=V(Ol,{name:`MuiFab`,slot:`Root`,shouldForwardProp:e=>gs(e)||e===`classes`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`size${H(n.size)}`],n.color===`inherit`&&t.colorInherit,t[H(n.size)],t[n.color]]}})(U(({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`},[`&.${mh.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`}}]})),U(({theme:e})=>({variants:[...Object.entries(e.palette).filter(zl([`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}}}}))]})),U(({theme:e})=>({[`&.${mh.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}))),_h=L.forwardRef(function(e,t){let n=Os({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=hh(p),{root:h,...g}=m;return(0,R.jsx)(gh,{className:z(m.root,i),component:o,internalNativeButton:!0,disabled:s,focusRipple:!c,focusVisibleClassName:z(m.focusVisible,l),ownerState:p,ref:t,...f,classes:g,children:r})}),vh=e=>{let{classes:t,disableUnderline:n,startAdornment:r,endAdornment:i,size:a,hiddenLabel:o,multiline:s}=e,c=Ia({root:[`root`,!n&&`underline`,r&&`adornedStart`,i&&`adornedEnd`,a===`small`&&`size${H(a)}`,o&&`hiddenLabel`,s&&`multiline`],input:[`input`]},xp,t);return{...t,...c}},yh=V(pp,{shouldForwardProp:e=>gs(e)||e===`classes`,name:`MuiFilledInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...up(e,t),!n.disableUnderline&&t.underline]}})(U(({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}},[`&.${Sp.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${Sp.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`},[`&.${Sp.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${Sp.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:`""`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${Sp.disabled}, .${Sp.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Sp.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(zl()).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}}]}})),bh=V(mp,{name:`MuiFilledInput`,slot:`Input`,overridesResolver:dp})(U(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,"&:-webkit-autofill":{...!e.vars&&{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&&e.applyStyles(`dark`,{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}}]}))),xh=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiFilledInput`}),{disableUnderline:r=!1,fullWidth:i=!1,hiddenLabel:a,inputComponent:o=`input`,multiline:s=!1,notched:c,slotProps:l,slots:u={},type:d=`text`,...f}=n,p={...n,disableUnderline:r,fullWidth:i,inputComponent:o,multiline:s,type:d},m=vh(n),h={root:{ownerState:p},input:{ownerState:p}},g=l?hn(h,l):h;return(0,R.jsx)(gp,{slots:{root:u.root??yh,input:u.input??bh},slotProps:g,fullWidth:i,inputComponent:o,multiline:s,ref:t,type:d,...f,classes:m})});xh.muiName=`Input`;function Sh(e){return ci(`MuiFormControl`,e)}li(`MuiFormControl`,[`root`,`marginNone`,`marginNormal`,`marginDense`,`fullWidth`,`disabled`]);var Ch=e=>{let{classes:t,margin:n,fullWidth:r}=e;return Ia({root:[`root`,n!==`none`&&`margin${H(n)}`,r&&`fullWidth`]},Sh,t)},wh=V(`div`,{name:`MuiFormControl`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`margin${H(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%`}}]}),Th=L.forwardRef(function(e,t){let n=Os({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=Ch(_),[y,b]=L.useState(()=>{let e=!1;return r&&L.Children.forEach(r,t=>{if(!Is(t,[`Input`,`Select`]))return;let n=Is(t,[`Select`])?t.props.input:t;n&&ip(n.props)&&(e=!0)}),e}),[x,S]=L.useState(()=>{let e=!1;return r&&L.Children.forEach(r,t=>{Is(t,[`Input`,`Select`])&&(rp(t.props,!0)||rp(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)($f.Provider,{value:O,children:(0,R.jsx)(wh,{as:o,ownerState:_,className:z(v.root,i),ref:t,...g,children:r})})});function Eh(e){return ci(`MuiFormControlLabel`,e)}var Dh=li(`MuiFormControlLabel`,[`root`,`labelPlacementStart`,`labelPlacementTop`,`labelPlacementBottom`,`disabled`,`label`,`error`,`required`,`asterisk`]),Oh=e=>{let{classes:t,disabled:n,labelPlacement:r,error:i,required:a}=e;return Ia({root:[`root`,n&&`disabled`,`labelPlacement${H(r)}`,i&&`error`,a&&`required`],label:[`label`,n&&`disabled`],asterisk:[`asterisk`,i&&`error`]},Eh,t)},kh=V(`label`,{name:`MuiFormControlLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${Dh.label}`]:t.label},t.root,t[`labelPlacement${H(n.labelPlacement)}`]]}})(U(({theme:e})=>({display:`inline-flex`,alignItems:`center`,cursor:`pointer`,verticalAlign:`middle`,WebkitTapHighlightColor:`transparent`,marginLeft:-11,marginRight:16,[`&.${Dh.disabled}`]:{cursor:`default`},[`& .${Dh.label}`]:{[`&.${Dh.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}}]}))),Ah=V(`span`,{name:`MuiFormControlLabel`,slot:`Asterisk`})(U(({theme:e})=>({[`&.${Dh.error}`]:{color:(e.vars||e).palette.error.main}}))),jh=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiFormControlLabel`}),{checked:r,className:i,control:a,disabled:o,disableTypography:s,inputRef:c,label:l,labelPlacement:u=`end`,name:d,onChange:f,required:p,slots:m={},slotProps:h={},value:g,..._}=n,[v,y]=tp({props:n,states:[`error`]}),b=o??a.props.disabled??y?.disabled,x=p??a.props.required,S={disabled:b,required:x};[`checked`,`name`,`onChange`,`value`,`inputRef`].forEach(e=>{a.props[e]===void 0&&n[e]!==void 0&&(S[e]=n[e])});let C={...n,disabled:b,labelPlacement:u,required:x,error:v.error},w=Oh(C),[T,E]=zc(`typography`,{elementType:W,externalForwardedProps:{slots:m,slotProps:h},ownerState:C}),D=l;return D!=null&&D.type!==W&&!s&&(D=(0,R.jsx)(T,{component:`span`,...E,className:z(w.label,E?.className),children:D})),(0,R.jsxs)(kh,{className:z(w.root,i),ownerState:C,ref:t,..._,children:[L.cloneElement(a,S),x?(0,R.jsxs)(`div`,{children:[D,(0,R.jsxs)(Ah,{ownerState:C,"aria-hidden":!0,className:w.asterisk,children:[` `,`*`]})]}):D]})});function Mh(e){return ci(`MuiFormGroup`,e)}li(`MuiFormGroup`,[`root`,`row`,`error`]);var Nh=e=>{let{classes:t,row:n,error:r}=e;return Ia({root:[`root`,n&&`row`,r&&`error`]},Mh,t)},Ph=V(`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`}}]}),Fh=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiFormGroup`}),{className:r,row:i=!1,...a}=n,[o]=tp({props:n,states:[`error`]}),s={...n,row:i,error:o.error};return(0,R.jsx)(Ph,{className:z(Nh(s).root,r),ownerState:s,ref:t,...a})});function Ih(e){return ci(`MuiFormHelperText`,e)}var Lh=li(`MuiFormHelperText`,[`root`,`error`,`disabled`,`sizeSmall`,`sizeMedium`,`contained`,`focused`,`filled`,`required`]),Rh,zh=e=>{let{classes:t,contained:n,size:r,disabled:i,error:a,filled:o,focused:s,required:c}=e;return Ia({root:[`root`,i&&`disabled`,a&&`error`,r&&`size${H(r)}`,n&&`contained`,s&&`focused`,o&&`filled`,c&&`required`]},Ih,t)},Bh=V(`p`,{name:`MuiFormHelperText`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.size&&t[`size${H(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(U(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:`left`,marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${Lh.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Lh.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}}]}))),Vh=L.forwardRef(function(e,t){let n=Os({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]=tp({props:n,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)(Bh,{as:a,className:z(zh(h).root,i),ref:t,...p,ownerState:h,children:r===` `?Rh||=(0,R.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:`​`}):r})});function Hh(e){return ci(`MuiFormLabel`,e)}var Uh=li(`MuiFormLabel`,[`root`,`colorSecondary`,`focused`,`disabled`,`error`,`filled`,`required`,`asterisk`]),Wh=e=>{let{classes:t,color:n,focused:r,disabled:i,error:a,filled:o,required:s}=e;return Ia({root:[`root`,`color${H(n)}`,i&&`disabled`,a&&`error`,o&&`filled`,r&&`focused`,s&&`required`],asterisk:[`asterisk`,a&&`error`]},Hh,t)},Gh=V(`label`,{name:`MuiFormLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color===`secondary`&&t.colorSecondary,n.filled&&t.filled]}})(U(({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(zl()).map(([t])=>({props:{color:t},style:{[`&.${Uh.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${Uh.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Uh.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),Kh=V(`span`,{name:`MuiFormLabel`,slot:`Asterisk`})(U(({theme:e})=>({[`&.${Uh.error}`]:{color:(e.vars||e).palette.error.main}}))),qh=L.forwardRef(function(e,t){let n=Os({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]=tp({props:n,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=Wh(m);return(0,R.jsxs)(Gh,{as:o,ownerState:m,className:z(h.root,i),ref:t,...f,children:[r,p.required&&(0,R.jsxs)(Kh,{ownerState:m,"aria-hidden":!0,className:h.asterisk,children:[` `,`*`]})]})}),Jh=ro({createStyledComponent:V(`div`,{name:`MuiGrid`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.container&&t.container]}}),componentName:`MuiGrid`,useThemeProps:e=>Os({props:e,name:`MuiGrid`}),useTheme:ms});function Yh(e){return`scale(${e}, ${e**2})`}var Xh={entering:{opacity:1,transform:Yh(1)},entered:{opacity:1,transform:`none`},exiting:{opacity:0,transform:Yh(.75)},exited:{opacity:0,transform:Yh(.75)}},Zh={opacity:0,transform:Yh(.75),visibility:`hidden`},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`,...h}=e,g=Oc(),_=L.useRef(),v=ms(),y=L.useRef(null),b=Zs(y,wf(i),t),x=Ac(y,l),S=Ac(y,(e,t)=>{kc(e);let{duration:n,delay:r,easing:i}=Mc({style:p,timeout:m,easing:a},{mode:`enter`}),o;m===`auto`?(o=v.transitions.getAutoHeightDuration(e.clientHeight),_.current=o):o=n,e.style.transition=[v.transitions.create(`opacity`,{duration:o,delay:r}),v.transitions.create(`transform`,{duration:o*.666,delay:r,easing:i})].join(`,`),s&&s(e,t)}),C=Ac(y,c),w=Ac(y,f),T=Ac(y,e=>{let{duration:t,delay:n,easing:r}=Mc({style:p,timeout:m,easing:a},{mode:`exit`}),i;m===`auto`?(i=v.transitions.getAutoHeightDuration(e.clientHeight),_.current=i):i=t,e.style.transition=[v.transitions.create(`opacity`,{duration:i,delay:n}),v.transitions.create(`transform`,{duration:i*.666,delay:n||i*.333,easing:r})].join(`,`),e.style.opacity=0,e.style.transform=Yh(.75),u&&u(e)}),E=Ac(y,e=>{e.style.transition=``,d&&d(e)});return(0,R.jsx)(fc,{appear:r,in:o,nodeRef:y,onEnter:S,onEntered:C,onEntering:x,onExit:T,onExited:E,onExiting:w,addEndListener:e=>{m===`auto`&&g.start(_.current||0,e),n&&n(y.current,e)},timeout:m===`auto`?null:m,...h,children:(e,{ownerState:t,...n})=>{let r=jc(e,o,Xh,Zh,p,i.props.style);return L.cloneElement(i,{style:r,ref:b,...n})}})});Qh&&(Qh.muiSupportAuto=!0);function $h(e){return ci(`MuiInputLabel`,e)}var eg=li(`MuiInputLabel`,[`root`,`focused`,`disabled`,`error`,`required`,`asterisk`,`formControl`,`sizeSmall`,`shrink`,`animated`,`standard`,`filled`,`outlined`]),tg=e=>{let{classes:t,disableUnderline:n}=e,r=Ia({root:[`root`,!n&&`underline`],input:[`input`]},_p,t);return{...t,...r}},ng=V(pp,{shouldForwardProp:e=>gs(e)||e===`classes`,name:`MuiInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...up(e,t),!n.disableUnderline&&t.underline]}})(U(({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 + &, .${eg.root} + &`]:{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`},[`&.${vp.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${vp.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${vp.disabled}, .${vp.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${vp.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(zl()).map(([t])=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}}))]}})),rg=V(mp,{name:`MuiInput`,slot:`Input`,overridesResolver:dp})({}),ig=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiInput`}),{disableUnderline:r=!1,fullWidth:i=!1,inputComponent:a=`input`,multiline:o=!1,notched:s,slotProps:c,slots:l={},type:u=`text`,...d}=n,f=tg(n),p={root:{ownerState:{disableUnderline:r}}},m=c?hn(c,p):p;return(0,R.jsx)(gp,{slots:{root:l.root??ng,input:l.input??rg},slotProps:m,fullWidth:i,inputComponent:a,multiline:o,ref:t,type:u,...d,classes:f})});ig.muiName=`Input`;function ag(e){return ci(`MuiInputAdornment`,e)}var og=li(`MuiInputAdornment`,[`root`,`filled`,`standard`,`outlined`,`positionStart`,`positionEnd`,`disablePointerEvents`,`hiddenLabel`,`sizeSmall`]),sg,cg=(e,t)=>{let{ownerState:n}=e;return[t.root,t[`position${H(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},lg=e=>{let{classes:t,disablePointerEvents:n,hiddenLabel:r,position:i,size:a,variant:o}=e;return Ia({root:[`root`,n&&`disablePointerEvents`,i&&`position${H(i)}`,o,r&&`hiddenLabel`,a&&`size${H(a)}`]},ag,t)},ug=V(`div`,{name:`MuiInputAdornment`,slot:`Root`,overridesResolver:cg})(U(({theme:e})=>({display:`flex`,maxHeight:`2em`,alignItems:`center`,whiteSpace:`nowrap`,color:(e.vars||e).palette.action.active,variants:[{props:{variant:`filled`},style:{[`&.${og.positionStart}&:not(.${og.hiddenLabel})`]:{marginTop:16}}},{props:{position:`start`},style:{marginRight:8}},{props:{position:`end`},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:`none`}}]}))),dg=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiInputAdornment`}),{children:r,className:i,component:a=`div`,disablePointerEvents:o=!1,disableTypography:s=!1,position:c,variant:l,...u}=n,d=ep()||{},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=lg(p);return(0,R.jsx)($f.Provider,{value:null,children:(0,R.jsx)(ug,{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`?sg||=(0,R.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:`​`}):null,r]})})})}),fg=e=>{let{classes:t,formControl:n,size:r,shrink:i,disableAnimation:a,variant:o,required:s}=e,c=Ia({root:[`root`,n&&`formControl`,!a&&`animated`,i&&`shrink`,r&&r!==`medium`&&`size${H(r)}`,o],asterisk:[s&&`asterisk`]},$h,t);return{...t,...c}},pg=V(qh,{shouldForwardProp:e=>gs(e)||e===`classes`,name:`MuiInputLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${Uh.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]]}})(U(({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)`}}]}))),mg=L.forwardRef(function(e,t){let n=Os({name:`MuiInputLabel`,props:e}),{disableAnimation:r=!1,margin:i,shrink:a,variant:o,className:s,...c}=n,[l,u]=tp({props:n,states:[`size`,`variant`,`required`,`focused`]}),d=a;d===void 0&&u&&(d=u.filled||u.focused||u.adornedStart);let f={...n,disableAnimation:r,formControl:u,shrink:d,size:l.size,variant:l.variant,required:l.required,focused:l.focused},p=fg(f);return(0,R.jsx)(pg,{"data-shrink":d,ref:t,className:z(p.root,s),...c,ownerState:f,classes:p})});function hg(e){return ci(`MuiLinearProgress`,e)}li(`MuiLinearProgress`,[`root`,`colorPrimary`,`colorSecondary`,`determinate`,`indeterminate`,`buffer`,`query`,`dashed`,`bar`,`bar1`,`bar2`]);var gg=4,_g=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
+ `,vg=typeof _g==`string`?null:Wt`
163
+ animation: ${_g} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
164
+ `,yg=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
+ `,bg=typeof yg==`string`?null:Wt`
180
+ animation: ${yg} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
181
+ `,xg=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
+ `,Sg=typeof xg==`string`?null:Wt`
197
+ animation: ${xg} 3s infinite linear;
198
+ `,Cg=e=>{let{classes:t,variant:n,color:r}=e;return Ia({root:[`root`,`color${H(r)}`,n],dashed:[`dashed`],bar1:[`bar`,`bar1`],bar2:[`bar`,`bar2`,n===`buffer`&&`color${H(r)}`]},hg,t)},wg=(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),Tg=V(`span`,{name:`MuiLinearProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`color${H(n.color)}`],t[n.variant]]}})(U(({theme:e})=>({position:`relative`,overflow:`hidden`,display:`block`,height:4,zIndex:0,"@media print":{colorAdjust:`exact`},variants:[...Object.entries(e.palette).filter(zl()).map(([t])=>({props:{color:t},style:{backgroundColor:wg(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)`}}]}))),Eg=V(`span`,{name:`MuiLinearProgress`,slot:`Dashed`})(U(({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(zl()).map(([t])=>{let n=wg(e,t);return{props:{color:t},style:{backgroundImage:`radial-gradient(${n} 0%, ${n} 16%, transparent 42%)`}}})]})),Sg||{animation:`${xg} 3s infinite linear`}),Dg=V(`span`,{name:`MuiLinearProgress`,slot:`Bar1`,overridesResolver:(e,t)=>[t.bar,t.bar1]})(U(({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(zl()).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main}})),{props:{variant:`determinate`},style:{transition:`transform .${gg}s linear`}},{props:{variant:`buffer`},style:{zIndex:1,transition:`transform .${gg}s linear`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:{width:`auto`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:vg||{animation:`${_g} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}}]}))),Og=V(`span`,{name:`MuiLinearProgress`,slot:`Bar2`,overridesResolver:(e,t)=>[t.bar,t.bar2]})(U(({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(zl()).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(zl()).map(([t])=>({props:{color:t,variant:`buffer`},style:{backgroundColor:wg(e,t),transition:`transform .${gg}s linear`}})),{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:{width:`auto`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:bg||{animation:`${yg} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}}]}))),kg=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiLinearProgress`}),{className:r,color:i=`primary`,max:a,min:o,value:s,valueBuffer:c,variant:l=`indeterminate`,...u}=n,d={...n,color:i,variant:l},f=o??0,p=a??100,m=Cg(d),h=ta(),g={},_={bar1:{},bar2:{}};if((l===`determinate`||l===`buffer`)&&s!==void 0){let e=p-f,t=(s-f)/e*100-100;h&&(t=-t),_.bar1.transform=e>0?`translateX(${t}%)`:`translateX(-100%)`,g[`aria-valuenow`]=s,g[`aria-valuemin`]=f,g[`aria-valuemax`]=p}if(l===`buffer`&&c!==void 0){let e=p-f,t=(c-f)/e*100-100;h&&(t=-t),_.bar2.transform=e>0?`translateX(${t}%)`:`translateX(-100%)`}return(0,R.jsxs)(Tg,{className:z(m.root,r),ownerState:d,role:`progressbar`,...g,ref:t,...u,children:[l===`buffer`?(0,R.jsx)(Eg,{className:m.dashed,ownerState:d}):null,(0,R.jsx)(Dg,{className:m.bar1,ownerState:d,style:_.bar1}),l===`determinate`?null:(0,R.jsx)(Og,{className:m.bar2,ownerState:d,style:_.bar2})]})});function Ag(e){return ci(`MuiLink`,e)}var jg=li(`MuiLink`,[`root`,`underlineNone`,`underlineHover`,`underlineAlways`,`button`,`focusVisible`]),Mg=({theme:e,ownerState:t})=>{let n=t.color;if(`colorSpace`in e&&e.colorSpace){let r=Xn(e,`palette.${n}.main`)||Xn(e,`palette.${n}`)||t.color;return e.alpha(r,.4)}let r=Xn(e,`palette.${n}.main`,!1)||Xn(e,`palette.${n}`,!1)||t.color,i=Xn(e,`palette.${n}.mainChannel`)||Xn(e,`palette.${n}Channel`);return`vars`in e&&i?`rgba(${i} / 0.4)`:Bi(r,.4)},Ng={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Pg=e=>{let{classes:t,component:n,focusVisible:r,underline:i}=e;return Ia({root:[`root`,`underline${H(i)}`,n===`button`&&`button`,r&&`focusVisible`]},Ag,t)},Fg=V(W,{name:`MuiLink`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`underline${H(n.underline)}`],n.component===`button`&&t.button]}})(U(({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(zl()).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`},[`&.${jg.focusVisible}`]:{outline:`auto`}}}]}))),Ig=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiLink`}),r=ms(),{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=>{cl(e.target)||h(!1),s&&s(e)},_=e=>{cl(e.target)&&h(!0),c&&c(e)},v={...n,color:a,component:o,focusVisible:m,underline:u,variant:d};return(0,R.jsx)(Fg,{color:a,className:z(Pg(v).root,i),classes:l,component:o,onBlur:g,onFocus:_,ref:t,ownerState:v,variant:d,...p,sx:[...Ng[a]===void 0?[{color:a}]:[],...Array.isArray(f)?f:[f]],style:{...p.style,...u===`always`&&a!==`inherit`&&!Ng[a]&&{"--Link-underlineColor":Mg({theme:r,ownerState:v})}}})}),Lg=L.createContext({});function Rg(e){return ci(`MuiList`,e)}li(`MuiList`,[`root`,`padding`,`dense`,`subheader`]);var zg=e=>{let{classes:t,disablePadding:n,dense:r,subheader:i}=e;return Ia({root:[`root`,!n&&`padding`,r&&`dense`,i&&`subheader`]},Rg,t)},Bg=V(`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,isolation:`isolate`}}]}),Vg=L.forwardRef(function(e,t){let n=Os({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=zg(d);return(0,R.jsx)(Lg.Provider,{value:u,children:(0,R.jsxs)(Bg,{as:a,className:z(f.root,i),ref:t,ownerState:d,...l,children:[c,r]})})});function Hg(e){return ci(`MuiListItem`,e)}li(`MuiListItem`,[`root`,`dense`,`alignItemsFlexStart`,`divider`,`gutters`,`padding`,`secondaryAction`]);function Ug(e){return ci(`MuiListItemButton`,e)}var Wg=li(`MuiListItemButton`,[`root`,`focusVisible`,`dense`,`alignItemsFlexStart`,`disabled`,`divider`,`gutters`,`selected`]),Gg=(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]},Kg=e=>{let{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:a,divider:o,selected:s}=e,c=Ia({root:[`root`,r&&`dense`,!a&&`gutters`,o&&`divider`,i&&`disabled`,t===`flex-start`&&`alignItemsFlexStart`,s&&`selected`]},Ug,n);return{...n,...c}},qg=V(Ol,{shouldForwardProp:e=>gs(e)||e===`classes`,name:`MuiListItemButton`,slot:`Root`,overridesResolver:Gg})(U(({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`}},[`&.${Wg.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${Wg.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${Wg.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)}},[`&.${Wg.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Wg.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}}]}))),Jg=L.forwardRef(function(e,t){let n=Os({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(Lg),h=L.useMemo(()=>({dense:s||m.dense||!1,alignItems:r,disableGutters:c}),[r,m.dense,s,c]),g=L.useRef(null);Ws(()=>{i&&g.current&&g.current.focus()},[i]);let _={...n,alignItems:r,dense:h.dense,disableGutters:c,divider:l,selected:d},v=Kg(_),{root:y,...b}=v,x=Zs(g,t);return(0,R.jsx)(Lg.Provider,{value:h,children:(0,R.jsx)(qg,{ref:x,href:p.href||p.to,component:(p.href||p.to)&&a===`div`?`button`:a,internalNativeButton:!1,focusVisibleClassName:z(v.focusVisible,u),ownerState:_,className:z(v.root,f),...p,classes:b,children:o})})});function Yg(e){return ci(`MuiListItemSecondaryAction`,e)}li(`MuiListItemSecondaryAction`,[`root`,`disableGutters`]);var Xg=e=>{let{disableGutters:t,classes:n}=e;return Ia({root:[`root`,t&&`disableGutters`]},Yg,n)},Zg=V(`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}}]}),Qg=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiListItemSecondaryAction`}),{className:r,component:i,...a}=n,o=L.useContext(Lg),s={...n,disableGutters:o.disableGutters};return(0,R.jsx)(Zg,{as:i,className:z(Xg(s).root,r),ownerState:s,ref:t,...a})});Qg.muiName=`ListItemSecondaryAction`;var $g=(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]},Kee=e=>{let{alignItems:t,classes:n,dense:r,disableGutters:i,disablePadding:a,divider:o}=e;return Ia({root:[`root`,r&&`dense`,!i&&`gutters`,!a&&`padding`,o&&`divider`,t===`flex-start`&&`alignItemsFlexStart`],secondaryAction:[`secondaryAction`]},Hg,n)},qee=V(`div`,{name:`MuiListItem`,slot:`Root`,overridesResolver:$g})(U(({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:{[`& > .${Wg.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`}}}}]}))),Jee=V(Qg,{name:`MuiListItem`,slot:`secondaryAction`})({}),e_=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiListItem`}),{alignItems:r=`center`,children:i,className:a,component:o=`li`,dense:s=!1,disableGutters:c=!1,disablePadding:l=!1,divider:u=!1,secondaryAction:d,slotProps:f={},slots:p={},...m}=n,h=L.useContext(Lg),g=L.useMemo(()=>({dense:s||h.dense||!1,alignItems:r,disableGutters:c}),[r,h.dense,s,c]),_={...n,alignItems:r,dense:g.dense,disableGutters:c,disablePadding:l,divider:u,secondaryAction:d},v=Kee(_),y={slots:p,slotProps:f},[b,x]=zc(`root`,{ref:t,elementType:qee,externalForwardedProps:{component:o,...y,...m},ownerState:_,className:z(v.root,a)}),[S,C]=zc(`secondaryAction`,{elementType:Jee,shouldForwardComponentProp:!0,externalForwardedProps:y,ownerState:_,className:v.secondaryAction});return(0,R.jsx)(Lg.Provider,{value:g,children:(0,R.jsxs)(b,{...x,children:[i,d&&(0,R.jsx)(S,{...C,children:d})]})})});function Yee(e){return ci(`MuiListItemIcon`,e)}var t_=li(`MuiListItemIcon`,[`root`,`alignItemsFlexStart`]),Xee=e=>{let{alignItems:t,classes:n}=e;return Ia({root:[`root`,t===`flex-start`&&`alignItemsFlexStart`]},Yee,n)},Zee=V(`div`,{name:`MuiListItemIcon`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.alignItems===`flex-start`&&t.alignItemsFlexStart]}})(U(({theme:e})=>({minWidth:e.spacing(4.5),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=Os({props:e,name:`MuiListItemIcon`}),{className:r,...i}=n,a=L.useContext(Lg),o={...n,alignItems:a.alignItems};return(0,R.jsx)(Zee,{className:z(Xee(o).root,r),ownerState:o,ref:t,...i})});function Qee(e){return ci(`MuiListItemText`,e)}var r_=li(`MuiListItemText`,[`root`,`multiline`,`dense`,`inset`,`primary`,`secondary`]),$ee=e=>{let{classes:t,inset:n,primary:r,secondary:i,dense:a}=e;return Ia({root:[`root`,n&&`inset`,a&&`dense`,r&&i&&`multiline`],primary:[`primary`],secondary:[`secondary`]},Qee,t)},ete=V(`div`,{name:`MuiListItemText`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${r_.primary}`]:t.primary},{[`& .${r_.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,[`.${ou.root}:where(& .${r_.primary})`]:{display:`block`},[`.${ou.root}:where(& .${r_.secondary})`]:{display:`block`},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),i_=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiListItemText`}),{children:r,className:i,disableTypography:a=!1,inset:o=!1,primary:s,secondary:c,slots:l={},slotProps:u={},...d}=n,{dense:f}=L.useContext(Lg),p=s??r,m=c,h={...n,disableTypography:a,inset:o,primary:!!p,secondary:!!m,dense:f},g=$ee(h),_={slots:l,slotProps:u},[v,y]=zc(`root`,{className:z(g.root,i),elementType:ete,externalForwardedProps:{..._,...d},ownerState:h,ref:t}),[b,x]=zc(`primary`,{className:g.primary,elementType:W,externalForwardedProps:_,ownerState:h}),[S,C]=zc(`secondary`,{className:g.secondary,elementType:W,externalForwardedProps:_,ownerState:h});return p!=null&&p.type!==W&&!a&&(p=(0,R.jsx)(b,{variant:f?`body2`:`body1`,component:x?.variant?void 0:`span`,...x,children:p})),m!=null&&m.type!==W&&!a&&(m=(0,R.jsx)(S,{variant:`body2`,color:`textSecondary`,...C,children:m})),(0,R.jsxs)(v,{...y,children:[p,m]})}),a_=L.createContext(void 0);function o_(){let e=L.useContext(a_);if(e===void 0)throw Error(`MUI: RovingTabIndexContext is missing. Roving tab index items must be placed within a roving tab index provider.`);return e}var tte=Object.is;function nte(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=0,r=0;for(let r in e)if(n+=1,!tte(e[r],t[r])||!(r in t))return!1;for(let e in t)r+=1;return n===r}var rte=[`ArrowRight`,`ArrowLeft`,`ArrowUp`,`ArrowDown`,`Home`,`End`];function s_(e){let{activeItemId:t,getDefaultActiveItemId:n,orientation:r,isRtl:i=!1,isItemFocusable:a=y_,wrap:o=!0}=e,[s,c]=L.useState(t),l=L.useRef(t),u=s;t!==l.current&&(l.current=t,t!==void 0&&t!==s&&(u=t,c(t)));let d=L.useRef(null),f=L.useRef(new Map),[p,m]=L.useState(0),h=L.useMemo(()=>g_(f.current),[p]),g=l_(u,h,a,n),_=L.useRef(g);_.current=g;let v=L.useCallback(()=>{let e=g_(f.current);return p_(e,l_(_.current,e,a,n))},[n,a]),y=L.useCallback(()=>f.current,[]),b=Js(e=>{nte(f.current.get(e.id)??null,e)||(f.current.set(e.id,e),m(e=>e+1))}),x=Js(e=>{f.current.delete(e)&&m(e=>e+1)}),S=Js(e=>{c(e)}),C=L.useCallback(e=>_.current===e,[]),w=L.useCallback((e,t,n,r)=>{let i=d_(__(f.current),e,t,n,r??a);return i?(i.element?.focus(),c(i.id),i):null},[a]),T=L.useCallback(e=>({onFocus:e=>{let t=__(f.current),n=h_(t,e.target);n!==-1&&c(t[n].id)},onKeyDown:e=>{if(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey||!rte.includes(e.key))return;let t=r===`horizontal`?`ArrowLeft`:`ArrowUp`,n=r===`horizontal`?`ArrowRight`:`ArrowDown`;r===`horizontal`&&i&&(t=`ArrowRight`,n=`ArrowLeft`);let a=__(f.current),s=Ls(zs(d.current)),c=s===d.current,l=u_(a,s,_.current),u=`next`;switch(e.key){case t:u=`previous`,e.preventDefault(),c&&(l=a.length);break;case n:e.preventDefault(),c&&(l=-1);break;case`Home`:e.preventDefault(),l=-1;break;case`End`:e.preventDefault(),u=`previous`,l=a.length;break;default:return}w(l,u,o)},ref:ste(e,e=>{d.current=e})}),[w,i,r,o]),E=L.useCallback(e=>{let t=__(f.current),n=Ls(zs(d.current));return w(n===d.current?-1:u_(t,n,_.current),`next`,!0,e)?.id??null},[w]);return L.useMemo(()=>({activeItemId:g,focusNext:E,getActiveItem:v,getContainerProps:T,getItemMap:y,isItemActive:C,registerItem:b,setActiveItemId:S,unregisterItem:x}),[g,E,v,T,y,C,b,S,x])}function c_(e){let{activeItemId:t,registerItem:n,unregisterItem:r}=o_(),i=L.useRef(null),a=L.useMemo(()=>({disabled:e.disabled??!1,element:null,focusableWhenDisabled:e.focusableWhenDisabled??!1,id:e.id,selected:e.selected??!1,textValue:e.textValue}),[e.disabled,e.focusableWhenDisabled,e.id,e.selected,e.textValue]),o=L.useRef(a);o.current=a;let s=L.useCallback(t=>{if(i.current=t,t==null){queueMicrotask(()=>{i.current??r(e.id)});return}n({...o.current,element:t})},[e.id,n,r]),c=Xs(e.ref,s);return Ti(()=>{i.current&&n({...a,element:i.current})},[a,n]),Ti(()=>{let t=e.id;return()=>{r(t)}},[e.id,r]),{ref:c,tabIndex:t===e.id?0:-1}}function l_(e,t,n,r){return e==null?ate(t,n,r):ite(e,t,n)}function ite(e,t,n){let r=m_(t,e);return r===-1?f_(t,n):n(t[r])?t[r].id:d_(t,r,`next`,!1,n)?.id??null}function ate(e,t,n){let r=n?.(e);if(r!=null){let n=p_(e,r);if(n&&t(n))return n.id}return f_(e,t)}function u_(e,t,n){if(t){let n=h_(e,t);if(n!==-1)return n}return m_(e,n)}function d_(e,t,n,r,i){let a=e.length-1;if(a===-1)return null;let o=!1,s=v_(t,a,n,r),c=s;for(;s!==-1;){if(s===c){if(o)return null;o=!0}let t=e[s];if(!t||!i(t))s=v_(s,a,n,r);else return t}return null}function f_(e,t){return e.find(e=>t(e))?.id??null}function p_(e,t){return t==null?null:e.find(e=>e.id===t)??null}function m_(e,t){return t==null?-1:e.findIndex(e=>e.id===t)}function h_(e,t){return t?e.findIndex(e=>e.element===t||e.element?.contains(t)):-1}function g_(e){let t=Array.from(e.values());if(t.every(e=>e.element==null))return t;let n=t.filter(b_).sort((e,t)=>ote(e.element,t.element)),r=t.filter(e=>!b_(e));return[...n,...r]}function __(e){return g_(e).filter(b_)}function v_(e,t,n,r=!0){return n===`next`?e===t?r?0:-1:e+1:e===0?r?t:-1:e-1}function y_(e){return e.element?e.focusableWhenDisabled?!0:!e.disabled&&!e.element.hasAttribute(`disabled`)&&e.element.getAttribute(`aria-disabled`)!==`true`&&e.element.hasAttribute(`tabindex`):!1}function b_(e){return e.element!=null&&e.element.isConnected}function ote(e,t){if(e===t)return 0;let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function ste(...e){return t=>{e.forEach(e=>{Us(e??null,t)})}}var cte=Hm;function x_(e,t){if(t==null){e.focus();return}try{e.focus({focusVisible:t===`keyboard`})}catch{e.focus()}}function lte(e){return e?e.type===`mousedown`||e.type===`pointerdown`||e.type===`touchstart`?`pointer`:e.type===`keydown`||e.type===`click`&&e.detail===0?`keyboard`:null:null}function ute(e){return e==null||typeof e==`string`&&!e.trim()}function S_(e,t){return typeof t==`object`&&t?e===t:String(e)===String(t)}var C_=L.createContext(null);function w_(){return L.useContext(C_)}var dte=C_.Provider,T_=L.createContext(void 0);function fte(){let e=L.useContext(T_);if(e===void 0)throw Error(`MUI: MenuListContext is missing. MenuItems must be placed within Menu or MenuList.`);return e}function pte(e){let t=e?.element??e;if(!t)return``;if(e?.textValue!==void 0)return e.textValue;let n=t.innerText;return n===void 0&&(n=t.textContent),n??``}function E_(e,t){if(t===void 0)return!0;let n=pte(e);return n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(``))}function mte(e,t){return E_(e,t)?y_(e):!1}function hte(e,t){x_(e,t)}var gte=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(!1),[m,h]=L.useState(!1),g=w_(),_=L.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null}),v=s_({activeItemId:void 0,getDefaultActiveItemId:L.useCallback(e=>u===`selectedMenu`?e.find(e=>e.selected&&y_(e))?.id??e.find(e=>y_(e))?.id??null:e.find(e=>y_(e))?.id??null,[u]),orientation:`vertical`,wrap:!c}),{activeItemId:y,focusNext:b,getActiveItem:x,getContainerProps:S,getItemMap:C}=v,w=Ys((e=!1)=>{if(!f.current||!e&&p.current)return null;if(i){let e=x();if(e?.element){let t=Array.from(C().values()).some(e=>e.selected);return h(u===`menu`&&t&&!e.selected&&g==null),hte(e.element,g),p.current=!0,e.element}return r?(h(!1),f.current.focus(),f.current):null}return r?(h(!1),f.current.focus(),p.current=!0,f.current):(h(!1),null)});Ws(()=>{if(!r&&!i){p.current=!1,h(!1);return}w()},[y,i,r,w]),L.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{let n=!f.current.style.width;if(e.clientHeight<f.current.clientHeight&&n){let n=`${cte(Hs(e))}px`;f.current.style[t===`rtl`?`paddingLeft`:`paddingRight`]=n,f.current.style.width=`calc(100% + ${n})`}return f.current},focusInitialTarget:()=>{if(!f.current)return null;let e=Rs(Bs(f.current));return e&&qm(f.current,e)?e:w(!0)}}),[w]);let T=S(),E=Zs(f,T.ref,t),D=L.useMemo(()=>({itemsFocusableWhenDisabled:s,suppressInitialFocusVisible:m,variant:u}),[s,m,u]);return(0,R.jsx)(Vg,{role:`menu`,ref:E,className:o,onKeyDown:Ys(e=>{if(m&&h(!1),(e.ctrlKey||e.metaKey||e.altKey)&&l){l(e);return}if(T.onKeyDown(e),e.key.length===1){let t=_.current,n=e.key.toLowerCase(),r=performance.now();t.keys.length>0&&(r-t.lastTime>500?(t.keys=[],t.repeating=!0,t.previousKeyMatched=!0):t.repeating&&n!==t.keys[0]&&(t.repeating=!1)),t.lastTime=r,t.keys.push(n);let i=Rs(Bs(f.current)),a=i&&!t.repeating&&E_(i,t);t.previousKeyMatched&&(a||b(e=>mte(e,t))!=null)?e.preventDefault():t.previousKeyMatched=!1}l&&l(e)}),onFocus:T.onFocus,tabIndex:-1,...d,children:(0,R.jsx)(T_.Provider,{value:D,children:(0,R.jsx)(a_.Provider,{value:v,children:a})})})});function _te(e){return ci(`MuiPopover`,e)}li(`MuiPopover`,[`root`,`paper`]);function D_(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.height/2:t===`bottom`&&(n=e.height),n}function O_(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.width/2:t===`right`&&(n=e.width),n}function k_(e){return[e.horizontal,e.vertical].map(e=>typeof e==`number`?`${e}px`:e).join(` `)}function A_(e){return typeof e==`function`?e():e}var vte=e=>{let{classes:t}=e;return Ia({root:[`root`],paper:[`paper`]},_te,t)},yte=V(Zm,{name:`MuiPopover`,slot:`Root`})({}),j_=V(Yc,{name:`MuiPopover`,slot:`Paper`})({position:`absolute`,overflowY:`auto`,overflowX:`hidden`,minWidth:16,minHeight:16,maxWidth:`calc(100% - 32px)`,maxHeight:`calc(100% - 32px)`,outline:0}),bte=L.forwardRef(function(e,t){let n=Os({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,disableAutoFocus:d=!1,elevation:f=8,marginThreshold:p=16,open:m,slots:h={},slotProps:g={},transformOrigin:_={vertical:`top`,horizontal:`left`},transitionDuration:v=`auto`,disableScrollLock:y=!1,...b}=n,x=L.useRef(),S={...n,anchorOrigin:a,anchorReference:s,elevation:f,marginThreshold:p,transformOrigin:_,transitionDuration:v},C=vte(S),w=L.useCallback(()=>{if(s===`anchorPosition`)return o;let e=A_(i),t=(e&&e.nodeType===1?e:Bs(x.current).body).getBoundingClientRect();return{top:t.top+D_(t,a.vertical),left:t.left+O_(t,a.horizontal)}},[i,a.horizontal,a.vertical,o,s]),T=L.useCallback(e=>({vertical:D_(e,_.vertical),horizontal:O_(e,_.horizontal)}),[_.horizontal,_.vertical]),E=L.useCallback(e=>{let t={width:e.offsetWidth,height:e.offsetHeight},n=T(t);if(s===`none`)return{top:null,left:null,transformOrigin:k_(n)};let r=w(),a=r.top-n.vertical,o=r.left-n.horizontal,c=a+t.height,l=o+t.width,u=Hs(A_(i)),d=u.innerHeight-p,f=u.innerWidth-p;if(p!=null&&a<p){let e=a-p;a-=e,n.vertical+=e}else if(p!=null&&c>d){let e=c-d;a-=e,n.vertical+=e}if(p!=null&&o<p){let e=o-p;o-=e,n.horizontal+=e}else if(l>f){let e=l-f;o-=e,n.horizontal+=e}return{top:`${Math.round(a)}px`,left:`${Math.round(o)}px`,transformOrigin:k_(n)}},[i,s,w,T,p]),[D,O]=L.useState(m),ee=L.useCallback(()=>{let e=x.current;if(!e)return;let t=E(e);t.top!=null&&e.style.setProperty(`top`,t.top),t.left!=null&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,O(!0)},[E]);L.useEffect(()=>(y&&window.addEventListener(`scroll`,ee),()=>window.removeEventListener(`scroll`,ee)),[i,y,ee]);let te=()=>{ee()},k=()=>{O(!1)};L.useEffect(()=>{m&&ee()}),L.useImperativeHandle(r,()=>m?{updatePosition:()=>{ee()}}:null,[m,ee]),L.useEffect(()=>{if(!m)return;let e=Fs(()=>{ee()}),t=Hs(A_(i));return t.addEventListener(`resize`,e),()=>{e.clear(),t.removeEventListener(`resize`,e)}},[i,m,ee]);let A=v,j={slots:h,slotProps:g},[ne,re]=zc(`transition`,{elementType:Qh,externalForwardedProps:j,ownerState:S,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),te()},onExited:t=>{e.onExited?.(t),k()}}),additionalProps:{appear:!0,in:m}});v===`auto`&&!ne.muiSupportAuto&&(A=void 0);let M=u||(i?Bs(A_(i)).body:void 0),[N,{slots:ie,slotProps:ae,...P}]=zc(`root`,{ref:t,elementType:yte,externalForwardedProps:{...j,...b},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:h.backdrop},slotProps:{backdrop:$s(typeof g.backdrop==`function`?g.backdrop(S):g.backdrop,{invisible:!0})},container:M,open:m},ownerState:S,className:z(C.root,l)}),[oe,F]=zc(`paper`,{ref:x,className:C.paper,elementType:j_,externalForwardedProps:j,shouldForwardComponentProp:!0,additionalProps:{elevation:f,style:D?void 0:{opacity:0}},ownerState:S});return(0,R.jsx)(N,{...P,...!Nc(N)&&{slots:ie,slotProps:ae,disableAutoFocus:d,disableScrollLock:y},children:(0,R.jsx)(ne,{...re,timeout:A,children:(0,R.jsx)(oe,{...F,children:c})})})});function xte(e){return ci(`MuiMenu`,e)}li(`MuiMenu`,[`root`,`paper`,`list`]);var Ste={vertical:`top`,horizontal:`right`},Cte={vertical:`top`,horizontal:`left`},wte=e=>{let{classes:t}=e;return Ia({root:[`root`],paper:[`paper`],list:[`list`]},xte,t)},Tte=V(bte,{shouldForwardProp:e=>gs(e)||e===`classes`,name:`MuiMenu`,slot:`Root`})({}),Ete=V(j_,{name:`MuiMenu`,slot:`Paper`})({maxHeight:`calc(100% - 96px)`,WebkitOverflowScrolling:`touch`}),Dte=V(gte,{name:`MuiMenu`,slot:`List`})({outline:0}),M_=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiMenu`}),{autoFocus:r=!0,children:i,className:a,disableAutoFocusItem:o=!1,onClose:s,open:c,PopoverClasses:l,transitionDuration:u=`auto`,variant:d=`selectedMenu`,slots:f={},slotProps:p={},...m}=n,h=ta(),g={...n,autoFocus:r,disableAutoFocusItem:o,transitionDuration:u,variant:d},_=wte(g),v=r&&c,y=v&&!o,b=L.useRef(null),x=(e,t)=>{b.current&&(b.current.adjustStyleForScrollbar(e,{direction:h?`rtl`:`ltr`}),v&&b.current.focusInitialTarget?.())},S=e=>{e.key===`Tab`&&(e.preventDefault(),s&&s(e,`tabKeyDown`))},C={slots:f,slotProps:p},w=Cf({elementType:f.root,externalSlotProps:p.root,ownerState:g,className:[_.root,a]}),[T,E]=zc(`paper`,{className:_.paper,elementType:Ete,externalForwardedProps:C,shouldForwardComponentProp:!0,ownerState:g}),[D,O]=zc(`list`,{className:_.list,elementType:Dte,shouldForwardComponentProp:!0,externalForwardedProps:C,getSlotProps:e=>({...e,onKeyDown:t=>{S(t),e.onKeyDown?.(t)}}),ownerState:g}),ee=typeof p.transition==`function`?p.transition(g):p.transition;return(0,R.jsx)(Tte,{disableAutoFocus:r,onClose:s,anchorOrigin:{vertical:`bottom`,horizontal:h?`right`:`left`},transformOrigin:h?Ste:Cte,slots:{root:f.root,paper:T,backdrop:f.backdrop,transition:f.transition},slotProps:{root:w,paper:E,backdrop:typeof p.backdrop==`function`?p.backdrop(g):p.backdrop,transition:{...ee,onEntering:(...e)=>{x(...e),ee?.onEntering?.(...e)}}},open:c,ref:t,transitionDuration:u,ownerState:g,...m,classes:l,children:(0,R.jsx)(D,{actions:b,autoFocus:v,autoFocusItem:y,variant:d,...O,children:i})})});function Ote(e){return ci(`MuiMenuItem`,e)}var N_=li(`MuiMenuItem`,[`root`,`focusVisible`,`dense`,`disabled`,`divider`,`gutters`,`selected`]),kte=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Ate=e=>{let{disabled:t,dense:n,divider:r,disableGutters:i,selected:a,classes:o}=e,s=Ia({root:[`root`,n&&`dense`,t&&`disabled`,!i&&`gutters`,r&&`divider`,a&&`selected`]},Ote,o);return{...o,...s}},jte=V(Ol,{shouldForwardProp:e=>gs(e)||e===`classes`,name:`MuiMenuItem`,slot:`Root`,overridesResolver:kte})(U(({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`}},[`&.${N_.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${N_.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${N_.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)}},[`&.${N_.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${N_.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${ch.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${ch.inset}`]:{marginLeft:52},[`& .${r_.root}`]:{marginTop:0,marginBottom:0},[`& .${r_.inset}`]:{paddingLeft:36},[`& .${t_.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,[`& .${t_.root} svg`]:{fontSize:`1.25rem`}}}]}))),P_=L.forwardRef(function(e,t){let n=Os({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=w_(),m=L.useContext(Lg),h=L.useMemo(()=>({dense:a||m.dense||!1,disableGutters:s}),[m.dense,a,s]),g=fte(),_=Gs(),v=g.suppressInitialFocusVisible,y=g.itemsFocusableWhenDisabled,b=L.useRef(null);Ws(()=>{r&&b.current&&x_(b.current,p)},[r]);let x={...n,dense:h.dense,divider:o,disableGutters:s},S=Ate(n),{root:C,...w}=S,T=c_({id:_,ref:t,disabled:n.disabled,focusableWhenDisabled:y,selected:n.selected}),E=Zs(b,T.ref),D;return u===void 0?g.variant===`selectedMenu`?D=T.tabIndex:(!n.disabled||y)&&(D=-1):D=u,(0,R.jsx)(Lg.Provider,{value:h,children:(0,R.jsx)(jte,{ref:E,role:l,tabIndex:D,component:i,internalNativeButton:!1,focusableWhenDisabled:y,suppressFocusVisible:v,focusVisibleClassName:z(S.focusVisible,c),className:z(S.root,d),...f,ownerState:x,classes:w})})});function Mte(e){return ci(`MuiNativeSelect`,e)}var F_=li(`MuiNativeSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`icon`,`iconOpen`,`iconFilled`,`iconOutlined`,`iconStandard`,`nativeInput`,`error`]),Nte=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return Ia({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,`icon${H(n)}`,a&&`iconOpen`,r&&`disabled`]},Mte,t)},I_=V(`select`,{name:`MuiNativeSelect`})(({theme:e})=>({MozAppearance:`none`,WebkitAppearance:`none`,userSelect:`none`,borderRadius:0,cursor:`pointer`,"&:focus":{borderRadius:0},[`&.${F_.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}}}]})),Pte=V(I_,{name:`MuiNativeSelect`,slot:`Select`,shouldForwardProp:gs,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${F_.multiple}`]:t.multiple}]}})({}),L_=V(`svg`,{name:`MuiNativeSelect`})(({theme:e})=>({position:`absolute`,right:0,top:`calc(50% - .5em)`,pointerEvents:`none`,color:(e.vars||e).palette.action.active,[`&.${F_.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}}]})),Fte=V(L_,{name:`MuiNativeSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${H(n.variant)}`],n.open&&t.iconOpen]}})({}),Ite=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=Nte(l);return(0,R.jsxs)(L.Fragment,{children:[(0,R.jsx)(Pte,{ownerState:l,className:z(u.select,n),disabled:r,ref:o||t,...c}),e.multiple?null:(0,R.jsx)(Fte,{as:a,ownerState:l,className:u.icon})]})}),Lte,Rte=V(`fieldset`,{name:`MuiNotchedOutlined`,shouldForwardProp:gs})({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%`}),zte=V(`legend`,{name:`MuiNotchedOutlined`,shouldForwardProp:gs})(U(({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 Bte(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)(Rte,{"aria-hidden":!0,className:r,ownerState:c,...o,children:(0,R.jsx)(zte,{ownerState:c,children:s?(0,R.jsx)(`span`,{children:i}):Lte||=(0,R.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:`​`})})})}var Vte=e=>{let{classes:t}=e,n=Ia({root:[`root`],notchedOutline:[`notchedOutline`],input:[`input`]},yp,t);return{...t,...n}},Hte=V(pp,{shouldForwardProp:e=>gs(e)||e===`classes`,name:`MuiOutlinedInput`,slot:`Root`,overridesResolver:up})(U(({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 .${bp.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${bp.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${bp.focused} .${bp.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(zl()).map(([t])=>({props:{color:t},style:{[`&.${bp.focused} .${bp.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${bp.error} .${bp.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${bp.disabled} .${bp.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`}}]}})),Ute=V(Bte,{name:`MuiOutlinedInput`,slot:`NotchedOutline`})(U(({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}})),Wte=V(mp,{name:`MuiOutlinedInput`,slot:`Input`,overridesResolver:dp})(U(({theme:e})=>({padding:`16.5px 14px`,"&:-webkit-autofill":{...!e.vars&&{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&&e.applyStyles(`dark`,{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}}]}))),R_=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiOutlinedInput`}),{fullWidth:r=!1,inputComponent:i=`input`,label:a,multiline:o=!1,notched:s,slots:c={},slotProps:l={},type:u=`text`,...d}=n,f=Vte(n),[p,m]=tp({props:n,states:[`color`,`disabled`,`error`,`focused`,`hiddenLabel`,`size`,`required`]}),h={...n,color:p.color||`primary`,disabled:p.disabled,error:p.error,focused:p.focused,formControl:m,fullWidth:r,hiddenLabel:p.hiddenLabel,multiline:o,size:p.size,type:u},g=c.root??Hte,_=c.input??Wte,[v,y]=zc(`notchedOutline`,{elementType:Ute,className:f.notchedOutline,shouldForwardComponentProp:!0,ownerState:h,externalForwardedProps:{slots:c,slotProps:l},additionalProps:{label:a!=null&&a!==``&&p.required?(0,R.jsxs)(L.Fragment,{children:[a,` `,`*`]}):a}});return(0,R.jsx)(gp,{slots:{root:g,input:_},slotProps:l,renderSuffix:e=>(0,R.jsx)(v,{...y,notched:s===void 0?!!(e.startAdornment||e.filled||e.focused):s}),fullWidth:r,inputComponent:i,multiline:o,ref:t,type:u,...d,classes:{...f,notchedOutline:null}})});R_.muiName=`Input`;var Gte=Ns((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`),Kte=Ns((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`),qte=V(`span`,{name:`MuiRadioButtonIcon`,shouldForwardProp:gs})({position:`relative`,display:`flex`}),Jte=V(Gte,{name:`MuiRadioButtonIcon`})({transform:`scale(1)`}),Yte=V(Kte,{name:`MuiRadioButtonIcon`})(U(({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 z_(e){let{checked:t=!1,classes:n={},fontSize:r}=e,i={...e,checked:t};return(0,R.jsxs)(qte,{className:n.root,ownerState:i,children:[(0,R.jsx)(Jte,{fontSize:r,className:n.background,ownerState:i}),(0,R.jsx)(Yte,{fontSize:r,className:n.dot,ownerState:i})]})}var B_=L.createContext(void 0);function Xte(){return L.useContext(B_)}function Zte(e){return ci(`MuiRadio`,e)}var V_=li(`MuiRadio`,[`root`,`checked`,`disabled`,`colorPrimary`,`colorSecondary`,`sizeSmall`]),Qte=e=>{let{classes:t,color:n,size:r}=e,i={root:[`root`,`color${H(n)}`,r!==`medium`&&`size${H(r)}`]};return{...t,...Ia(i,Zte,t)}},$te=V(Cm,{shouldForwardProp:e=>gs(e)||e===`classes`,name:`MuiRadio`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.size!==`medium`&&t[`size${H(n.size)}`],t[`color${H(n.color)}`]]}})(U(({theme:e})=>({color:(e.vars||e).palette.text.secondary,[`&.${V_.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(zl()).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(zl()).map(([t])=>({props:{color:t,disabled:!1},style:{[`&.${V_.checked}`]:{color:(e.vars||e).palette[t].main}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:`transparent`}}}}]})));function ene(e,t){return typeof t==`object`&&t?e===t:String(e)===String(t)}var tne=(0,R.jsx)(z_,{checked:!0}),nne=(0,R.jsx)(z_,{}),H_=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiRadio`}),{checked:r,checkedIcon:i=tne,color:a=`primary`,icon:o=nne,name:s,onChange:c,size:l=`medium`,className:u,disabled:d,disableRipple:f=!1,slots:p={},slotProps:m={},...h}=n,g=ep(),_=d;g&&_===void 0&&(_=g.disabled),_??=!1;let v={...n,disabled:_,disableRipple:f,color:a,size:l},y=Qte(v),b=Xte(),x=r,S=Ts(c,b&&b.onChange),C=s;b&&(x===void 0&&(x=ene(b.value,n.value)),C===void 0&&(C=b.name));let w=m.input,[T,E]=zc(`root`,{ref:t,elementType:$te,className:z(y.root,u),shouldForwardComponentProp:!0,externalForwardedProps:{slots:p,slotProps:m,...h},getSlotProps:e=>({...e,onChange:(t,...n)=>{e.onChange?.(t,...n),S(t,...n)}}),ownerState:v,additionalProps:{type:`radio`,icon:L.cloneElement(o,{fontSize:o.props.fontSize??l}),checkedIcon:L.cloneElement(i,{fontSize:i.props.fontSize??l}),disabled:_,name:C,checked:x,slots:p,slotProps:{input:typeof w==`function`?w(v):w}}});return(0,R.jsx)(T,{...E,classes:y})});function rne(e){return ci(`MuiRadioGroup`,e)}li(`MuiRadioGroup`,[`root`,`row`,`error`]);var ine=e=>{let{classes:t,row:n,error:r}=e;return Ia({root:[`root`,n&&`row`,r&&`error`]},rne,t)},U_=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=ine(e),[f,p]=qs({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=Zs(t,u),h=Gs(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)(B_.Provider,{value:g,children:(0,R.jsx)(Fh,{role:`radiogroup`,ref:m,className:z(d.root,i),...l,children:r})})}),ane={border:0,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,whiteSpace:`nowrap`,width:`1px`};function W_(e){return ci(`MuiSelect`,e)}var G_=li(`MuiSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`focused`,`icon`,`iconOpen`,`nativeInput`,`error`]),one,K_=2,q_=400,J_=200;function Y_(e,t){if(!t)return!1;if(e.composedPath().includes(t)||e.target?.nodeType&&t.contains(e.target))return!0;let n=t.getBoundingClientRect();return n.width===0&&n.height===0?!1:e.clientX>=n.left-K_&&e.clientX<=n.right+K_&&e.clientY>=n.top-K_&&e.clientY<=n.bottom+K_}var X_=V(I_,{name:`MuiSelect`,slot:`Select`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`&.${G_.select}`]:t.select},{[`&.${G_.select}`]:t[n.variant]},{[`&.${G_.error}`]:t.error},{[`&.${G_.multiple}`]:t.multiple}]}})({[`&.${G_.select}`]:{height:`auto`,minHeight:`1.4375em`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,overflow:`hidden`}}),Z_=V(L_,{name:`MuiSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.open&&t.iconOpen]}})({}),Q_=V(`input`,{shouldForwardProp:e=>hs(e)&&e!==`classes`,name:`MuiSelect`,slot:`NativeInput`})({bottom:0,left:0,position:`absolute`,opacity:0,pointerEvents:`none`,width:`100%`,boxSizing:`border-box`}),$_=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return Ia({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,a&&`iconOpen`,r&&`disabled`],nativeInput:[`nativeInput`]},W_,t)},ev=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:ee,required:te,SelectDisplayProps:k={},tabIndex:A,type:j,value:ne,variant:re=`standard`,...M}=e,[N,ie]=qs({controlled:ne,default:l,name:`Select`}),[ae,P]=qs({controlled:E,default:c,name:`Select`}),oe=L.useRef(null),F=L.useRef(null),se=L.useRef(null),ce=L.useRef(!1),le=L.useRef(!1),ue=L.useRef(null),de=L.useRef(!1),fe=L.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),I=Oc(),pe=Oc(),[me,he]=L.useState(null),{current:ge}=L.useRef(E!=null),[_e,ve]=L.useState(),[ye,be]=L.useState(null),xe=Zs(t,m),Se=L.useCallback(e=>{F.current=e,e&&he(e)},[]),Ce=me?.parentNode;L.useImperativeHandle(xe,()=>({focus:()=>{F.current.focus()},node:oe.current,value:N}),[N]);let we=me!==null&&ae;Ws(()=>{ce.current=we},[we]);let Te=L.useCallback(()=>{I.clear(),pe.clear()},[I,pe]),Ee=L.useCallback(()=>{Te(),de.current=!1,fe.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},[Te]),De=L.useCallback(()=>{ue.current&&=(ue.current(),null)},[]);L.useEffect(()=>{we||(Ee(),De())},[we,Ee,De]),L.useEffect(()=>()=>{Ee(),De()},[Ee,De]),L.useEffect(()=>{if(!we||!Ce||a||typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{ve(Ce.clientWidth)});return e.observe(Ce),()=>{e.disconnect()}},[we,Ce,a]),L.useEffect(()=>{c&&ae&&me&&!ge&&(ve(a?null:Ce.clientWidth),F.current.focus())},[me,a]),L.useEffect(()=>{i&&F.current.focus()},[i]),L.useEffect(()=>{if(!h)return;let e=Bs(F.current).getElementById(h);if(e){let t=()=>{getSelection().isCollapsed&&F.current.focus()};return e.addEventListener(`click`,t),()=>{e.removeEventListener(`click`,t)}}},[h]);let Oe=Ys((e,t)=>{e||(Ee(),De()),e?(be(lte(t)),T&&T(t)):(be(null),x&&x(t)),ge||(ce.current=e,ve(a?null:Ce.clientWidth),P(e))}),ke=()=>{Ee(),le.current?pe.start(J_,()=>{fe.current.allowUnselectedMouseUp=!0,I.start(J_,()=>{fe.current.allowSelectedMouseUp=!0})}):I.start(q_,()=>{fe.current.allowSelectedMouseUp=!0,fe.current.allowUnselectedMouseUp=!0})},Ae=e=>{if(w?.(e),e.button!==0)return;e.preventDefault(),F.current.focus();let t=Bs(e.currentTarget);ke(),De();let n=e=>{ue.current=null,F.current&&(Y_(e,F.current)||Y_(e,se.current)||!ce.current&&ge||Oe(!1,e))};t.addEventListener(`mouseup`,n,{capture:!0,once:!0}),ue.current=()=>{t.removeEventListener(`mouseup`,n,!0)},Oe(!0,e)},je=e=>{Oe(!1,e)},Me=L.Children.toArray(o),Ne=e=>{let t=Me.find(t=>t.props.value===e.target.value);t!==void 0&&(ie(t.props.value),b&&b(e,t))},Pe=e=>t=>{de.current=!1;let n;if(t.currentTarget.hasAttribute(`tabindex`)){if(_){n=Array.isArray(N)?N.slice():[];let t=N.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),N!==n&&(ie(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)}_||Oe(!1,t)}},Fe=(e,t)=>n=>{if(e.props.onMouseUp?.(n),de.current){de.current=!1;return}let r=!fe.current.allowSelectedMouseUp&&t,i=!fe.current.allowUnselectedMouseUp&&!t;r||i||n.currentTarget.click()},Ie=e=>{O||([` `,`ArrowUp`,`ArrowDown`,`Enter`].includes(e.key)&&(e.preventDefault(),Oe(!0,e)),C?.(e))},Le=e=>{!we&&y&&(Object.defineProperty(e,"target",{writable:!0,value:{value:N,name:v}}),y(e))};delete M[`aria-invalid`];let Re,ze,Be=[],Ve=!1,He=!1;(rp({value:N})||d)&&(ee?Re=ee(N):Ve=!0);let Ue=Me.map(e=>{if(!L.isValidElement(e))return null;let t;if(_){if(!Array.isArray(N))throw Error(D(2));t=N.some(t=>S_(t,e.props.value)),t&&Ve&&Be.push(e.props.children)}else t=S_(N,e.props.value),t&&Ve&&(ze=e.props.children);return t&&(He=!0),L.cloneElement(e,{"aria-selected":t?`true`:`false`,onMouseDown:t=>{de.current=!0,e.props.onMouseDown?.(t)},onPointerDown:t=>{de.current=!0,e.props.onPointerDown?.(t)},onClick:Pe(e),onMouseUp:Fe(e,t),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})});Ws(()=>{le.current=He},[He]),Ve&&(Re=_?Be.length===0?null:Be.reduce((e,t,n)=>(e.push(t),n<Be.length-1&&e.push(`, `),e),[]):ze);let We=_e;!a&&ge&&me&&(We=Ce.clientWidth);let Ge;Ge=A===void 0?u?null:0:A;let Ke=k.id||(v?`mui-component-select-${v}`:void 0),qe={...e,variant:re,value:N,open:we,error:f},Je=$_(qe),Ye=typeof g.slotProps?.paper==`function`?g.slotProps.paper(qe):g.slotProps?.paper,Xe=Zs(Ye?.ref,se),Ze=typeof g.slotProps?.list==`function`?g.slotProps.list(qe):g.slotProps?.list,Qe=la(),$e=la();return(0,R.jsxs)(L.Fragment,{children:[(0,R.jsx)(X_,{as:`div`,ref:Se,tabIndex:Ge,role:`combobox`,"aria-controls":we?Qe:void 0,"aria-disabled":u?`true`:void 0,"aria-expanded":we?`true`:`false`,"aria-haspopup":`listbox`,"aria-label":r,"aria-labelledby":h,"aria-describedby":n,"aria-required":te?`true`:void 0,"aria-invalid":f?`true`:void 0,onKeyDown:Ie,onMouseDown:u||O?null:Ae,onBlur:Le,onFocus:S,...k,ownerState:qe,className:z(k.className,Je.select,s),id:Ke,children:ute(Re)?one||=(0,R.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:`​`}):Re}),(0,R.jsx)(Q_,{"aria-invalid":f,value:Array.isArray(N)?N.join(`,`):N,name:v,ref:oe,"aria-hidden":!0,onChange:Ne,tabIndex:-1,disabled:u,className:Je.nativeInput,autoFocus:i,required:te,...M,id:M.id??$e,ownerState:qe}),(0,R.jsx)(Z_,{as:p,className:Je.icon,ownerState:qe}),(0,R.jsx)(dte,{value:ye,children:(0,R.jsx)(M_,{id:`menu-${v||``}`,anchorEl:Ce,open:we,onClose:je,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:Qe,...Ze},paper:{...Ye,ref:Xe,style:{minWidth:We,...Ye?.style}}},children:Ue})})]})}),tv=e=>{let{classes:t}=e,n=Ia({root:[`root`]},W_,t);return{...t,...n}},nv={name:`MuiSelect`,slot:`Root`,shouldForwardProp:e=>gs(e)&&e!==`variant`},rv=V(ig,nv)(``),iv=V(R_,nv)(``),av=V(xh,nv)(``),ov=L.forwardRef(function(e,t){let n=Os({name:`MuiSelect`,props:e}),{autoWidth:r=!1,children:i,classes:a={},className:o,defaultOpen:s=!1,displayEmpty:c=!1,IconComponent:l=Cp,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=_?Ite:ev,[E]=tp({props:n,states:[`variant`,`error`]}),D=E.variant||C,O={...n,variant:D,classes:a},ee=tv(O),{root:te,...k}=ee,A=d||{standard:(0,R.jsx)(rv,{ownerState:O}),outlined:(0,R.jsx)(iv,{label:p,ownerState:O}),filled:(0,R.jsx)(av,{ownerState:O})}[D],j=Zs(t,wf(A));return(0,R.jsx)(L.Fragment,{children:L.cloneElement(A,{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(k,f.classes):k,...d?d.props.inputProps:{}},...(g&&_||c)&&D===`outlined`?{notched:!0}:{},ref:j,className:z(A.props.className,o,ee.root),...!d&&{variant:D},...w})})});ov.muiName=`Select`;function sv(e,t,n=(e,t)=>e===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}var cv=2,lv=[],uv={};function dv(e,t,n,r,i){return n===1?Math.min(e+t,i):Math.max(e-t,r)}function fv(e,t){return e-t}function pv(e,t,n=-1){let{index:r}=e.reduce((e,n,r)=>{let i=Math.abs(t-n);return e==null||i<=e.distance?{distance:i,index:r}:e},null)??uv;return r==null?r:n>=0&&e[n]===e[r]?n:r}function mv(e,t){if(t.current!=null&&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 hv(e,t,n){return(e-t)*100/(n-t)}function gv(e,t,n){return(n-t)*e+t}function _v(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 vv(e,t,n){let r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(_v(t)))}function yv(e,t,n){let r=e.slice();return r[n]=t,r.sort(fv)}function bv(e,t,n,r){let i=Rs(zs(e.current));if(!qm(e.current,i)||Number(i?.getAttribute(`data-index`))!==t){let n=e.current?.querySelector(`[type="range"][data-index="${t}"]`);n!=null&&(r==null?n.focus({preventScroll:!0}):n.focus({preventScroll:!0,focusVisible:r}))}n&&n(t)}function xv(e,t){return typeof e==`number`&&typeof t==`number`?e===t:typeof e==`object`&&typeof t==`object`?sv(e,t):!1}var Sv={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}%`})}},Cv=e=>e;function wv(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=Cv,step:h=1,shiftStep:g=10,tabIndex:_,value:v}=e,y=L.useRef(void 0),b=L.useRef(null),[x,S]=L.useState(-1),[C,w]=L.useState(-1),[T,E]=L.useState(!1),D=L.useRef(0),O=L.useRef(-1),ee=L.useRef(!1),te=L.useRef(-1),k=Js(()=>{b.current!=null&&(cancelAnimationFrame(b.current),b.current=null)}),A=L.useRef(null),[j,ne]=Ks({controlled:v,default:n??c,name:`Slider`}),re=Js((e,t,n)=>{let r=`nativeEvent`in e?e.nativeEvent:e,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:t,name:l}}),A.current=t,u?.(i,t,n)}),M=Array.isArray(j),N=L.useMemo(()=>{if(typeof j==`number`)return[Ai(j,c,s)];if(j==null)return[c];let e=j.slice().sort(fv);for(let t=0;t<e.length;t+=1){let n=e[t];e[t]=n==null?c:Ai(n,c,s)}return e},[j,c,s]),ie=L.useMemo(()=>{if(o===!0&&h!=null){let e=Array(Math.floor((s-c)/h)+1);for(let t=0;t<e.length;t+=1)e[t]={value:c+h*t};return e}return Array.isArray(o)?o:lv},[o,h,c,s]),ae=L.useMemo(()=>{let e=Array(ie.length);for(let t=0;t<ie.length;t+=1)e[t]=ie[t].value;return e},[ie]),[P,oe]=L.useState(-1),F=L.useRef(null),se=Xs(p,F),ce=e=>t=>{let n=Number(t.currentTarget.getAttribute(`data-index`));cl(t.target)&&oe(n),w(n),e?.onFocus?.(t)},le=e=>t=>{cl(t.target)||oe(-1),w(-1),e?.onBlur?.(t)},ue=(e,t)=>{let n=Number(e.currentTarget.getAttribute(`data-index`)),r=N[n],a=ae.indexOf(r),o=t;if(ie&&h==null){let e=ae[ae.length-1];o=o>=e?e:o<=ae[0]?ae[0]:o<r?ae[a-1]:ae[a+1]}if(o=Ai(o,c,s),M){i&&(o=Ai(o,N[n-1]||-1/0,N[n+1]||1/0));let e=o;o=yv(N,o,n);let t=n;i||(t=o.indexOf(e)),bv(F,t)}ne(o),oe(n),u&&!xv(o,j)&&re(e,o,n),d&&d(e,A.current??o)},de=e=>t=>{if([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`PageUp`,`PageDown`,`Home`,`End`].includes(t.key)){t.preventDefault();let e=N[Number(t.currentTarget.getAttribute(`data-index`))],n=null;if(h!=null){let r=t.shiftKey?g:h;switch(t.key){case`ArrowUp`:n=dv(e,r,1,c,s);break;case`ArrowRight`:n=dv(e,r,a?-1:1,c,s);break;case`ArrowDown`:n=dv(e,r,-1,c,s);break;case`ArrowLeft`:n=dv(e,r,a?1:-1,c,s);break;case`PageUp`:n=dv(e,g,1,c,s);break;case`PageDown`:n=dv(e,g,-1,c,s);break;case`Home`:n=c;break;case`End`:n=s;break;default:break}}else if(ie){let r=ae[ae.length-1],i=ae.indexOf(e),o=[a?`ArrowRight`:`ArrowLeft`,`ArrowDown`,`PageDown`,`Home`],s=[a?`ArrowLeft`:`ArrowRight`,`ArrowUp`,`PageUp`,`End`];o.includes(t.key)?n=i===0?ae[0]:ae[i-1]:s.includes(t.key)&&(n=i===ae.length-1?r:ae[i+1])}n!=null&&ue(t,n)}e?.onKeyDown?.(t)};Ti(()=>{let e=Rs(zs(F.current));r&&qm(F.current,e)&&e!=null&&`blur`in e&&e.blur()},[r]),r&&x!==-1&&S(-1),r&&P!==-1&&oe(-1);let fe=e=>t=>{e.onChange?.(t),ue(t,t.currentTarget.valueAsNumber)},I=L.useRef(void 0),pe=f;a&&f===`horizontal`&&(pe+=`-reverse`);let me=e=>{let{current:t}=F;if(!t)return null;let{width:n,height:r,bottom:a,left:o}=t.getBoundingClientRect(),l;l=pe.startsWith(`vertical`)?(a-e.y)/r:(e.x-o)/n,pe.includes(`-reverse`)&&(l=1-l);let u;u=gv(l,c,s),u=h?vv(u,h,c):ae[pv(ae,u)],u=Ai(u,c,s);let d=0;if(M){let e=I.current!==-1;d=e?I.current:pv(N,u,O.current),i&&(u=Ai(u,N[d-1]||-1/0,N[d+1]||1/0));let t=u;u=yv(N,u,d),i&&e||(d=u.indexOf(t),I.current=d)}return{newValue:u,activeIndex:d}},he=Js(e=>{if(`pointerId`in e&&e.pointerId!==te.current)return;let t=mv(e,y);if(!t)return;if(D.current+=1,e.type===`pointermove`&&e.buttons===0){ge(e);return}let n=me(t);n&&(bv(F,n.activeIndex,S,!1),O.current=n.activeIndex,ne(n.newValue),!T&&D.current>cv&&E(!0),u&&!xv(n.newValue,j)&&re(e,n.newValue,n.activeIndex))}),ge=Js(e=>{if(`pointerId`in e&&e.pointerId!==te.current)return;let t=mv(e,y);if(E(!1),!t)return;let n=me(t);S(-1),e.type===`touchend`&&w(-1),n&&d&&d(e,A.current??n.newValue),`pointerType`in e&&F.current?.hasPointerCapture(e.pointerId)&&F.current.releasePointerCapture(e.pointerId),y.current=void 0,te.current=-1,ve()}),_e=Js(e=>{if(r)return;if(ee.current){ee.current=!1;let t=e.changedTouches[0];t!=null&&(y.current=t.identifier);return}let t=e.changedTouches[0];t!=null&&(y.current=t.identifier);let n=mv(e,y);if(n!==!1){I.current=-1;let t=me(n);t&&(bv(F,t.activeIndex,S,!1),O.current=t.activeIndex,ne(t.newValue),u&&!xv(t.newValue,j)&&re(e,t.newValue,t.activeIndex))}D.current=0;let i=zs(F.current);i.addEventListener(`touchmove`,he,{passive:!0}),i.addEventListener(`touchend`,ge,{passive:!0})}),ve=L.useCallback(()=>{let e=zs(F.current);e.removeEventListener(`pointermove`,he),e.removeEventListener(`pointerup`,ge),e.removeEventListener(`touchmove`,he),e.removeEventListener(`touchend`,ge)},[ge,he]);L.useEffect(()=>{let e=F.current;if(e)return e.addEventListener(`touchstart`,_e,{passive:!0}),()=>{e.removeEventListener(`touchstart`,_e),k(),ve()}},[ve,_e,k]),L.useEffect(()=>{r&&(ve(),k())},[r,ve,k]);let ye=e=>t=>{if(e.onPointerDown?.(t),t.pointerType===`touch`&&(ee.current=!0),r||t.defaultPrevented||t.button!==0)return;let n=mv(t,y);if(n!==!1){I.current=-1;let e=me(n);if(e){let n=F.current?.querySelector(`input[type="range"][data-index="${e.activeIndex}"]`),r=zs(F.current),i=n!=null&&n===Rs(r);S(e.activeIndex),O.current=e.activeIndex,i?t.preventDefault():(k(),b.current=requestAnimationFrame(()=>{b.current=null,bv(F,e.activeIndex,void 0,!1)})),ne(e.newValue),u&&!xv(e.newValue,j)&&re(t,e.newValue,e.activeIndex)}}D.current=0,te.current=t.pointerId;let i=zs(F.current);try{t.currentTarget.setPointerCapture(t.pointerId)}catch{}i.addEventListener(`pointermove`,he,{passive:!0}),i.addEventListener(`pointerup`,ge)},be=hv(M?N[0]:c,c,s),xe=hv(N[N.length-1],c,s)-be,Se=(e=uv)=>{let t=Ic(e),n={onPointerDown:ye(t)},r={...t,...n};return{...e,ref:se,...r}},Ce=e=>t=>{e.onMouseOver?.(t),w(Number(t.currentTarget.getAttribute(`data-index`)))},we=e=>t=>{e.onMouseLeave?.(t),w(-1)},Te=(e=uv)=>{let t=Ic(e),n={onMouseOver:Ce(t),onMouseLeave:we(t)};return{...e,...t,...n}},Ee=e=>{let t;return M?x===e?t=2:O.current===e&&(t=1):x===e&&(t=1),{pointerEvents:x!==-1&&x!==e?`none`:void 0,zIndex:t}},De;return f===`vertical`&&(De=a?`vertical-rl`:`vertical-lr`),{active:x,axis:pe,axisProps:Sv,dragging:T,focusedThumbIndex:P,getHiddenInputProps:(n=uv)=>{let i=Ic(n),o={onChange:fe(i),onFocus:ce(i),onBlur:le(i),onKeyDown:de(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:{...ane,direction:a?`rtl`:`ltr`,width:`100%`,height:`100%`,writingMode:De}}},getRootProps:Se,getThumbProps:Te,marks:ie,open:C,range:M,rootRef:se,trackLeap:xe,trackOffset:be,values:N,getThumbStyle:Ee}}function Tv(e){return ci(`MuiSlider`,e)}var Ev=li(`MuiSlider`,`root.active.colorPrimary.colorSecondary.colorError.colorInfo.colorSuccess.colorWarning.disabled.dragging.focusVisible.mark.markActive.marked.markLabel.markLabelActive.rail.sizeSmall.thumb.track.trackInverted.trackFalse.valueLabel.valueLabelOpen.valueLabelCircle.valueLabelLabel.vertical`.split(`.`)),Dv=e=>{let{open:t}=e;return{offset:z(t&&Ev.valueLabelOpen),circle:Ev.valueLabelCircle,label:Ev.valueLabelLabel}};function Ov(e){let{children:t,className:n,value:r}=e,i=Dv(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 kv(e){return e}var Av=V(`span`,{name:`MuiSlider`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`color${H(n.color)}`],n.size!==`medium`&&t[`size${H(n.size)}`],n.marked&&t.marked,n.orientation===`vertical`&&t.vertical,n.track===`inverted`&&t.trackInverted,n.track===!1&&t.trackFalse]}})(U(({theme:e})=>({borderRadius:12,boxSizing:`content-box`,display:`inline-block`,position:`relative`,cursor:`pointer`,touchAction:`none`,WebkitTapHighlightColor:`transparent`,"@media print":{colorAdjust:`exact`},[`&.${Ev.disabled}`]:{pointerEvents:`none`,cursor:`default`,color:(e.vars||e).palette.grey[400]},[`&.${Ev.dragging}`]:{[`& .${Ev.thumb}, & .${Ev.track}`]:{transition:`none`}},variants:[...Object.entries(e.palette).filter(zl()).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}}]}))),jv=V(`span`,{name:`MuiSlider`,slot:`Rail`})({display:`block`,position:`absolute`,borderRadius:`inherit`,backgroundColor:`currentColor`,opacity:.38,"@media (forced-colors: active)":{border:`1px solid transparent`,boxSizing:`border-box`},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}}]}),Mv=V(`span`,{name:`MuiSlider`,slot:`Track`})(U(({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:{"@media (forced-colors: none)":{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(zl()).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)})}}}))]}))),Nv=V(`span`,{name:`MuiSlider`,slot:`Thumb`})(U(({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}),"@media (forced-colors: active)":{border:`1px solid ButtonBorder`},"&::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%)`},[`&.${Ev.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(zl()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${Ev.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.alpha((e.vars||e).palette[t].main,.16)}`,"@media (hover: none)":{boxShadow:`none`}},[`&.${Ev.active}`]:{boxShadow:`0px 0px 0px 14px ${e.alpha((e.vars||e).palette[t].main,.16)}`}}}))]}))),Pv=V(Ov,{name:`MuiSlider`,slot:`ValueLabel`})(U(({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%`},[`&.${Ev.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%`},[`&.${Ev.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`}}]}))),Fv=V(`span`,{name:`MuiSlider`,slot:`Mark`,shouldForwardProp:e=>hs(e)&&e!==`markActive`,overridesResolver:(e,t)=>{let{markActive:n}=e;return[t.mark,n&&t.markActive]}})(U(({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}}]}))),Iv=V(`span`,{name:`MuiSlider`,slot:`MarkLabel`,shouldForwardProp:e=>hs(e)&&e!==`markLabelActive`})(U(({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}}]}))),Lv=e=>{let{disabled:t,dragging:n,marked:r,orientation:i,track:a,classes:o,color:s,size:c}=e;return Ia({root:[`root`,t&&`disabled`,n&&`dragging`,r&&`marked`,i===`vertical`&&`vertical`,a===`inverted`&&`trackInverted`,a===!1&&`trackFalse`,s&&`color${H(s)}`,c&&`size${H(c)}`],rail:[`rail`],track:[`track`],mark:[`mark`],markActive:[`markActive`],markLabel:[`markLabel`],markLabelActive:[`markLabelActive`],valueLabel:[`valueLabel`],thumb:[`thumb`,t&&`disabled`],active:[`active`],disabled:[`disabled`],focusVisible:[`focusVisible`]},Tv,o)},Rv=({children:e})=>e,zv=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiSlider`}),r=ta(),{"aria-label":i,"aria-valuetext":a,"aria-labelledby":o,color:s=`primary`,classes:c,className:l,disableSwap:u=!1,disabled:d=!1,getAriaLabel:f,getAriaValueText:p,marks:m=!1,max:h=100,min:g=0,name:_,onChange:v,onChangeCommitted:y,orientation:b=`horizontal`,shiftStep:x=10,size:S=`medium`,step:C=1,scale:w=kv,slotProps:T={},slots:E={},tabIndex:D,track:O=`normal`,value:ee,valueLabelDisplay:te=`off`,valueLabelFormat:k=kv,...A}=n,j={...n,isRtl:r,max:h,min:g,classes:c,disabled:d,disableSwap:u,orientation:b,marks:m,color:s,size:S,step:C,shiftStep:x,scale:w,track:O,valueLabelDisplay:te,valueLabelFormat:k},{axisProps:ne,getRootProps:re,getHiddenInputProps:M,getThumbProps:N,open:ie,active:ae,axis:P,focusedThumbIndex:oe,range:F,dragging:se,marks:ce,values:le,trackOffset:ue,trackLeap:de,getThumbStyle:fe}=wv({...j,rootRef:t});j.marked=ce.length>0&&ce.some(e=>e.label),j.dragging=se,j.focusedThumbIndex=oe;let I=Lv(j),pe={slots:E,slotProps:T},[me,he]=zc(`root`,{elementType:Av,getSlotProps:re,externalForwardedProps:{...pe,...A},ownerState:j,className:[I.root,l]}),[ge,_e]=zc(`rail`,{elementType:jv,externalForwardedProps:pe,ownerState:j,className:I.rail}),[ve,ye]=zc(`track`,{elementType:Mv,externalForwardedProps:pe,additionalProps:{style:{...ne[P].offset(ue),...ne[P].leap(de)}},ownerState:j,className:I.track}),[be,xe]=zc(`thumb`,{elementType:Nv,getSlotProps:N,externalForwardedProps:pe,ownerState:j,className:I.thumb}),[Se,Ce]=zc(`valueLabel`,{elementType:Pv,externalForwardedProps:pe,ownerState:j,className:I.valueLabel}),[we,Te]=zc(`mark`,{elementType:Fv,externalForwardedProps:pe,ownerState:j,className:I.mark}),[Ee,De]=zc(`markLabel`,{elementType:Iv,externalForwardedProps:pe,ownerState:j,className:I.markLabel}),[Oe,ke]=zc(`input`,{elementType:`input`,getSlotProps:M,externalForwardedProps:pe,ownerState:j});return(0,R.jsxs)(me,{...he,children:[(0,R.jsx)(ge,{..._e}),(0,R.jsx)(ve,{...ye}),ce.filter(e=>e.value>=g&&e.value<=h).map((e,t)=>{let n=hv(e.value,g,h),r=ne[P].offset(n),i;return i=O===!1?le.includes(e.value):O===`normal`&&(F?e.value>=le[0]&&e.value<=le[le.length-1]:e.value<=le[0])||O===`inverted`&&(F?e.value<=le[0]||e.value>=le[le.length-1]:e.value>=le[0]),(0,R.jsxs)(L.Fragment,{children:[(0,R.jsx)(we,{"data-index":t,...Te,...!Nc(we)&&{markActive:i},style:{...r,...Te.style},className:z(Te.className,i&&I.markActive)}),e.label==null?null:(0,R.jsx)(Ee,{"aria-hidden":!0,"data-index":t,...De,...!Nc(Ee)&&{markLabelActive:i},style:{...r,...De.style},className:z(I.markLabel,De.className,i&&I.markLabelActive),children:e.label})]},t)}),le.map((e,t)=>{let n=hv(e,g,h),r=ne[P].offset(n),s=te===`off`?Rv:Se;return(0,R.jsx)(s,{...!Nc(s)&&{valueLabelFormat:k,valueLabelDisplay:te,value:typeof k==`function`?k(w(e),t):k,index:t,open:ie===t||ae===t||te===`on`,disabled:d},...Ce,children:(0,R.jsx)(be,{"data-index":t,...xe,className:z(I.thumb,xe.className,ae===t&&I.active,oe===t&&I.focusVisible),style:{...r,...fe(t),...xe.style},children:(0,R.jsx)(Oe,{"data-index":t,"aria-label":f?f(t):i,"aria-valuenow":w(e),"aria-labelledby":o,"aria-valuetext":p?p(w(e),t):a,value:le[t],...ke})})},t)})]})});function Bv(e){return ci(`MuiTooltip`,e)}var Vv=li(`MuiTooltip`,[`popper`,`popperInteractive`,`popperArrow`,`popperClose`,`tooltip`,`tooltipArrow`,`touch`,`tooltipPlacementLeft`,`tooltipPlacementRight`,`tooltipPlacementTop`,`tooltipPlacementBottom`,`arrow`]);function Hv(e){return Math.round(e*1e5)/1e5}var Uv=e=>{let{classes:t,disableInteractive:n,arrow:r,touch:i,placement:a}=e;return Ia({popper:[`popper`,!n&&`popperInteractive`,r&&`popperArrow`],tooltip:[`tooltip`,r&&`tooltipArrow`,i&&`touch`,`tooltipPlacement${H(a.split(`-`)[0])}`],arrow:[`arrow`]},Bv,t)},Wv=V(Ff,{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]}})(U(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:`none`,variants:[{props:({ownerState:e,open:t})=>t&&!e.disableInteractive,style:{pointerEvents:`auto`}},{props:({ownerState:e})=>e.arrow,style:{[`&[data-popper-placement*="bottom"] .${Vv.arrow}`]:{top:0,marginTop:`-0.71em`,"&::before":{transformOrigin:`0 100%`}},[`&[data-popper-placement*="top"] .${Vv.arrow}`]:{bottom:0,marginBottom:`-0.71em`,"&::before":{transformOrigin:`100% 0`}},[`&[data-popper-placement*="right"] .${Vv.arrow}`]:{height:`1em`,width:`0.71em`,insetInlineStart:0,marginInlineStart:`-0.71em`,"&::before":{transformOrigin:`100% 100%`}},[`&[data-popper-placement*="left"] .${Vv.arrow}`]:{height:`1em`,width:`0.71em`,insetInlineEnd:0,marginInlineEnd:`-0.71em`,"&::before":{transformOrigin:`0 0`}}}}]}))),Gv=V(`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${H(n.placement.split(`-`)[0])}`]]}})(U(({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,[`.${Vv.popper}[data-popper-placement*="left"] &`]:{transformOrigin:`right center`,marginInlineEnd:`14px`},[`.${Vv.popper}[data-popper-placement*="right"] &`]:{transformOrigin:`left center`,marginInlineStart:`14px`},[`.${Vv.popper}[data-popper-placement*="top"] &`]:{transformOrigin:`center bottom`,marginBottom:`14px`},[`.${Vv.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:`center top`,marginTop:`14px`},variants:[{props:({ownerState:e})=>e.arrow,style:{position:`relative`,marginBlock:0}},{props:({ownerState:e})=>e.touch,style:{padding:`8px 16px`,fontSize:e.typography.pxToRem(14),lineHeight:`${Hv(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:e})=>e.touch,style:{[`.${Vv.popper}[data-popper-placement*="left"] &`]:{marginInlineEnd:`24px`},[`.${Vv.popper}[data-popper-placement*="right"] &`]:{marginInlineStart:`24px`},[`.${Vv.popper}[data-popper-placement*="top"] &`]:{marginBottom:`24px`},[`.${Vv.popper}[data-popper-placement*="bottom"] &`]:{marginTop:`24px`}}}]}))),Kv=V(`span`,{name:`MuiTooltip`,slot:`Arrow`})(U(({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)`}}))),qv=!1,Jv=new Dc,Yv={x:0,y:0};function Xv(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}var q=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiTooltip`}),{arrow:r=!1,children:i,classes:a,describeChild:o=!1,disableFocusListener:s=!1,disableHoverListener:c=!1,disableInteractive:l=!1,disableTouchListener:u=!1,enterDelay:d=100,enterNextDelay:f=0,enterTouchDelay:p=700,followCursor:m=!1,id:h,leaveDelay:g=0,leaveTouchDelay:_=1500,onClose:v,onOpen:y,open:b,placement:x=`bottom`,slotProps:S={},slots:C={},title:w,...T}=n,E=L.isValidElement(i)?i:(0,R.jsx)(`span`,{children:i}),D=ms(),[O,ee]=L.useState(),[te,k]=L.useState(null),A=L.useRef(!1),j=l||m,ne=Oc(),re=Oc(),M=Oc(),N=Oc(),[ie,ae]=qs({controlled:b,default:!1,name:`Tooltip`,state:`open`}),P=ie,oe=Gs(h),F=L.useRef(),se=Ys(()=>{F.current!==void 0&&(document.body.style.WebkitUserSelect=F.current,F.current=void 0),N.clear()});L.useEffect(()=>se,[se]);let ce=e=>{Jv.clear(),qv=!0,ae(!0),y&&!P&&y(e)},le=Ys(e=>{Jv.start(800+g,()=>{qv=!1}),ae(!1),v&&P&&v(e),ne.start(D.transitions.duration.shortest,()=>{A.current=!1})}),ue=e=>{A.current&&e.type!==`touchstart`||(O&&O.removeAttribute(`title`),re.clear(),M.clear(),d||qv&&f?re.start(qv?f:d,()=>{ce(e)}):ce(e))},de=e=>{re.clear(),M.start(g,()=>{le(e)})},[,fe]=L.useState(!1),I=e=>{let t=e?.target??O;if(!t||t.disabled||!cl(t)){fe(!1);let n=e??new Event(`blur`);!e&&t&&(Object.defineProperty(n,"target",{value:t}),Object.defineProperty(n,"currentTarget",{value:t})),de(n)}},pe=e=>{if(O||ee(e.currentTarget),cl(e.target)){let t=e=>{e.target.disabled&&I(e),e.target.removeEventListener(`blur`,t)};e.target.addEventListener(`blur`,t),fe(!0),ue(e)}},me=e=>{A.current=!0;let t=E.props;t.onTouchStart&&t.onTouchStart(e)},he=e=>{me(e),M.clear(),ne.clear(),se(),F.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect=`none`,N.start(p,()=>{document.body.style.WebkitUserSelect=F.current,ue(e)})},ge=e=>{E.props.onTouchEnd&&E.props.onTouchEnd(e),se(),M.start(_,()=>{le(e)})};L.useEffect(()=>{if(!P)return;function e(e){e.key===`Escape`&&le(e)}return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[le,P]);let _e=Zs(wf(E),ee,t);!w&&w!==0&&(P=!1);let ve=L.useRef(),ye=e=>{let t=E.props;t.onMouseMove&&t.onMouseMove(e),Yv={x:e.clientX,y:e.clientY},ve.current&&ve.current.update()},be={},xe=typeof w==`string`;o?(be.title=!P&&xe&&!c?w:null,be[`aria-describedby`]=P?oe:null):(be[`aria-label`]=xe?w:null,be[`aria-labelledby`]=P&&!xe?oe:null);let Se={...be,...T,...E.props,className:z(T.className,E.props.className),onTouchStart:me,ref:_e,...m?{onMouseMove:ye}:{}},Ce={};u||(Se.onTouchStart=he,Se.onTouchEnd=ge),c||(Se.onMouseOver=Xv(ue,Se.onMouseOver),Se.onMouseLeave=Xv(de,Se.onMouseLeave),j||(Ce.onMouseOver=ue,Ce.onMouseLeave=de)),s||(Se.onFocus=Xv(pe,Se.onFocus),Se.onBlur=Xv(I,Se.onBlur),j||(Ce.onFocus=pe,Ce.onBlur=I));let we={...n,arrow:r,disableInteractive:j,placement:x,touch:A.current},Te=typeof S.popper==`function`?S.popper(we):S.popper,Ee=L.useMemo(()=>{let e=[{name:`arrow`,enabled:!!te,options:{element:te,padding:4}}];return Te?.popperOptions?.modifiers&&(e=e.concat(Te.popperOptions.modifiers)),{...Te?.popperOptions,modifiers:e}},[te,Te?.popperOptions]),De=Uv(we),Oe={slots:C,slotProps:{arrow:S.arrow,popper:Te,tooltip:S.tooltip,transition:S.transition}},[ke,Ae]=zc(`popper`,{elementType:Wv,externalForwardedProps:Oe,ownerState:we,className:De.popper}),[je,Me]=zc(`transition`,{elementType:Qh,externalForwardedProps:Oe,ownerState:we}),[Ne,Pe]=zc(`tooltip`,{elementType:Gv,className:De.tooltip,externalForwardedProps:Oe,ownerState:we}),[Fe,Ie]=zc(`arrow`,{elementType:Kv,className:De.arrow,externalForwardedProps:Oe,ownerState:we,ref:k});return(0,R.jsxs)(L.Fragment,{children:[L.cloneElement(E,Se),(0,R.jsx)(ke,{as:Ff,placement:x,anchorEl:m?{getBoundingClientRect:()=>({top:Yv.y,left:Yv.x,right:Yv.x,bottom:Yv.y,width:0,height:0})}:O,popperRef:ve,open:O?P:!1,id:oe,transition:!0,...Ce,...Ae,popperOptions:Ee,children:({TransitionProps:e})=>(0,R.jsx)(je,{timeout:D.transitions.duration.shorter,...e,...Me,children:(0,R.jsxs)(Ne,{...Pe,children:[w,r?(0,R.jsx)(Fe,{...Ie}):null]})})})]})}),Zv=uo({createStyledComponent:V(`div`,{name:`MuiStack`,slot:`Root`}),useThemeProps:e=>Os({props:e,name:`MuiStack`})}),Qv=L.createContext({});function $v(){return L.useContext(Qv)}var ey=L.createContext({});function ty(e){return ci(`MuiStep`,e)}li(`MuiStep`,[`root`,`horizontal`,`vertical`,`alternativeLabel`,`completed`]);var ny=e=>{let{classes:t,orientation:n,alternativeLabel:r,completed:i}=e;return Ia({root:[`root`,n,r&&`alternativeLabel`,i&&`completed`]},ty,t)},ry=V(`li`,{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`}}]}),iy=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiStep`}),{active:r,children:i,className:a,component:o=`li`,completed:s,disabled:c,expanded:l=!1,index:u,last:d,...f}=n,{activeStep:p,connector:m,alternativeLabel:h,orientation:g,nonLinear:_,isTabList:v}=$v(),[y=!1,b=!1,x=!1]=[r,s,c];p===u?y=r===void 0?!0:r:!_&&p>u?b=s===void 0?!0:s:!_&&p<u&&(x=c===void 0?!0:c);let S=L.useMemo(()=>({index:u,last:d,expanded:l,icon:u+1,active:y,completed:b,disabled:x}),[u,d,l,y,b,x]),C={...n,active:y,orientation:g,alternativeLabel:h,completed:b,disabled:x,expanded:l,component:o},w=(0,R.jsxs)(ry,{as:o,className:z(ny(C).root,a),ref:t,ownerState:C,role:v?`presentation`:void 0,...f,children:[m&&h&&u!==0?m:null,i]});return(0,R.jsx)(ey.Provider,{value:S,children:m&&!h&&u!==0?(0,R.jsxs)(L.Fragment,{children:[m,w]}):w})}),ay=Ns((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`),oy=Ns((0,R.jsx)(`path`,{d:`M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z`}),`Warning`);function sy(e){return ci(`MuiStepIcon`,e)}var cy=li(`MuiStepIcon`,[`root`,`active`,`completed`,`error`,`text`]),ly,uy=e=>{let{classes:t,active:n,completed:r,error:i}=e;return Ia({root:[`root`,n&&`active`,r&&`completed`,i&&`error`],text:[`text`]},sy,t)},dy=V(Ms,{name:`MuiStepIcon`,slot:`Root`})(U(({theme:e})=>({display:`block`,transition:e.transitions.create(`color`,{duration:e.transitions.duration.shortest}),color:(e.vars||e).palette.text.disabled,[`&.${cy.completed}, &.${cy.active}`]:{color:(e.vars||e).palette.primary.main},[`&.${cy.error}`]:{color:(e.vars||e).palette.error.main}}))),fy=V(`text`,{name:`MuiStepIcon`,slot:`Text`})(U(({theme:e})=>({fill:(e.vars||e).palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily}))),py=L.forwardRef(function(e,t){let n=Os({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=uy(l);if(typeof s==`number`||typeof s==`string`){let e=z(i,u.root);return o?(0,R.jsx)(dy,{as:oy,className:e,ref:t,ownerState:l,...c}):a?(0,R.jsx)(dy,{as:ay,className:e,ref:t,ownerState:l,...c}):(0,R.jsxs)(dy,{className:e,ref:t,ownerState:l,...c,children:[ly||=(0,R.jsx)(`circle`,{cx:`12`,cy:`12`,r:`12`}),(0,R.jsx)(fy,{className:u.text,x:`12`,y:`12`,textAnchor:`middle`,dominantBaseline:`central`,ownerState:l,children:s})]})}return s});function my(e){return ci(`MuiStepLabel`,e)}var hy=li(`MuiStepLabel`,[`root`,`horizontal`,`vertical`,`label`,`active`,`completed`,`error`,`disabled`,`iconContainer`,`alternativeLabel`,`labelContainer`]),gy=e=>{let{classes:t,orientation:n,active:r,completed:i,error:a,disabled:o,alternativeLabel:s}=e;return Ia({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`]},my,t)},_y=V(`span`,{name:`MuiStepLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation]]}})({display:`flex`,alignItems:`center`,[`&.${hy.alternativeLabel}`]:{flexDirection:`column`},[`&.${hy.disabled}`]:{cursor:`default`},variants:[{props:{orientation:`vertical`},style:{textAlign:`left`,padding:`8px 0`}}]}),vy=V(`span`,{name:`MuiStepLabel`,slot:`Label`})(U(({theme:e})=>({...e.typography.body2,display:`block`,transition:e.transitions.create(`color`,{duration:e.transitions.duration.shortest}),[`&.${hy.active}, &.${hy.completed}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${hy.alternativeLabel}`]:{marginTop:16},[`&.${hy.error}`]:{color:(e.vars||e).palette.error.main}}))),yy=V(`span`,{name:`MuiStepLabel`,slot:`IconContainer`})({flexShrink:0,display:`flex`,paddingRight:8,[`&.${hy.alternativeLabel}`]:{paddingRight:0}}),by=V(`span`,{name:`MuiStepLabel`,slot:`LabelContainer`})(U(({theme:e})=>({width:`100%`,color:(e.vars||e).palette.text.secondary,[`&.${hy.alternativeLabel}`]:{textAlign:`center`}}))),xy=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiStepLabel`}),{children:r,className:i,error:a=!1,icon:o,optional:s,slots:c={},slotProps:l={},...u}=n,{alternativeLabel:d,orientation:f}=$v(),{active:p,disabled:m,completed:h,icon:g}=L.useContext(ey),_=o||g,v={...n,active:p,alternativeLabel:d,completed:h,disabled:m,error:a,orientation:f},y=gy(v),b={slots:c,slotProps:l},[x,S]=zc(`root`,{elementType:_y,externalForwardedProps:{...b,...u},ownerState:v,ref:t,className:z(y.root,i)}),[C,w]=zc(`label`,{elementType:vy,externalForwardedProps:b,ownerState:v}),[T,E]=zc(`stepIcon`,{elementType:_?py:void 0,externalForwardedProps:b,ownerState:v});return(0,R.jsxs)(x,{...S,children:[_||T?(0,R.jsx)(yy,{className:y.iconContainer,ownerState:v,children:(0,R.jsx)(T,{completed:h,active:p,error:a,icon:_,...E})}):null,(0,R.jsxs)(by,{className:y.labelContainer,ownerState:v,children:[r?(0,R.jsx)(C,{...w,className:z(y.label,w?.className),children:r}):null,s]})]})});xy.muiName=`StepLabel`;function Sy(e){return ci(`MuiStepButton`,e)}var Cy=li(`MuiStepButton`,[`root`,`horizontal`,`vertical`,`touchRipple`]),wy=e=>{let{classes:t,orientation:n}=e;return Ia({root:[`root`,n],touchRipple:[`touchRipple`]},Sy,t)},Ty=V(Ol,{name:`MuiStepButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${Cy.touchRipple}`]:t.touchRipple},t.root,t[n.orientation]]}})({width:`100%`,padding:`24px 16px`,margin:`-24px -16px`,boxSizing:`content-box`,[`& .${Cy.touchRipple}`]:{color:`rgba(0, 0, 0, 0.3)`},variants:[{props:{orientation:`vertical`},style:{justifyContent:`flex-start`,padding:`8px`,margin:`-8px`}}]}),Ey=L.forwardRef(function(e,t){let{children:n,disabled:r,index:i,...a}=e;return(0,R.jsx)(Ty,{disabled:r,...c_({id:i,ref:t,disabled:r}),...a,children:n})}),Dy=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiStepButton`}),{children:r,className:i,icon:a,optional:o,...s}=n,{disabled:c,active:l,index:u}=L.useContext(ey),{orientation:d,totalSteps:f,isTabList:p}=$v(),m={...n,orientation:d},h=wy(m),g={icon:a,optional:o},_=Is(r,[`StepLabel`])?L.cloneElement(r,g):(0,R.jsx)(xy,{...g,children:r}),v={internalNativeButton:!0,focusRipple:!0,disabled:c,TouchRippleProps:{className:h.touchRipple},className:z(h.root,i),ownerState:m,"aria-selected":l,"aria-posinset":u+1,"aria-setsize":f,role:`tab`,...s};return p?(0,R.jsx)(Ey,{...v,index:u,ref:t,children:_}):(0,R.jsx)(Ty,{ref:t,tabIndex:l?0:-1,...v,children:_})});function Oy(e){return ci(`MuiStepConnector`,e)}li(`MuiStepConnector`,[`root`,`horizontal`,`vertical`,`alternativeLabel`,`active`,`completed`,`disabled`,`line`]);var ky=e=>{let{classes:t,orientation:n,alternativeLabel:r,active:i,completed:a,disabled:o}=e;return Ia({root:[`root`,n,r&&`alternativeLabel`,i&&`active`,a&&`completed`,o&&`disabled`],line:[`line`]},Oy,t)},Ay=V(`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)`}}]}),jy=V(`span`,{name:`MuiStepConnector`,slot:`Line`})(U(({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}}]}})),My=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiStepConnector`}),{className:r,...i}=n,{alternativeLabel:a,orientation:o=`horizontal`}=$v(),{active:s,disabled:c,completed:l}=L.useContext(ey),u={...n,alternativeLabel:a,orientation:o,active:s,completed:l,disabled:c},d=ky(u);return(0,R.jsx)(Ay,{className:z(d.root,r),ref:t,ownerState:u,...i,children:(0,R.jsx)(jy,{className:d.line,ownerState:u})})});function Ny(e){return ci(`MuiStepper`,e)}li(`MuiStepper`,[`root`,`horizontal`,`vertical`,`nonLinear`,`alternativeLabel`]);var Py=e=>{let{orientation:t,nonLinear:n,alternativeLabel:r,classes:i}=e;return Ia({root:[`root`,t,n&&`nonLinear`,r&&`alternativeLabel`]},Ny,i)},Fy=V(`ol`,{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`,listStyle:`none`,margin:0,padding:0,variants:[{props:{orientation:`horizontal`},style:{flexDirection:`row`,alignItems:`center`}},{props:{orientation:`vertical`},style:{flexDirection:`column`}},{props:{alternativeLabel:!0},style:{alignItems:`flex-start`}}]}),Iy=(0,R.jsx)(My,{});function Ly(e){let{children:t,className:n,component:r,forwardedRef:i,isRtl:a,orientation:o,ownerState:s,...c}=e,l=s_({orientation:o,isRtl:a}),u=l.getContainerProps(i);return(0,R.jsx)(a_.Provider,{value:l,children:(0,R.jsx)(Fy,{as:r,ownerState:s,className:n,role:`tablist`,"aria-orientation":o,...u,...c,children:t})})}var Ry=L.forwardRef(function(e,t){let n=ta(),r=Os({props:e,name:`MuiStepper`}),{activeStep:i=0,alternativeLabel:a=!1,children:o,className:s,component:c=`ol`,connector:l=Iy,nonLinear:u=!1,orientation:d=`horizontal`,...f}=r,p={...r,nonLinear:u,alternativeLabel:a,orientation:d,component:c},m=Py(p),h=L.Children.toArray(o).filter(Boolean),g=h.length,_=h.some(e=>{if(!L.isValidElement(e))return!1;if(e.type===Dy)return!0;let t=e.props.children;return t?L.Children.toArray(t).some(e=>L.isValidElement(e)&&e.type===Dy):!1}),v=h.map((e,t)=>L.cloneElement(e,{index:t,last:t+1===g,...e.props})),y=L.useMemo(()=>({activeStep:i,alternativeLabel:a,connector:l,nonLinear:u,orientation:d,totalSteps:g,isTabList:_}),[i,a,l,u,d,g,_]);return _?(0,R.jsx)(Qv.Provider,{value:y,children:(0,R.jsx)(Ly,{forwardedRef:t,isRtl:n,className:z(m.root,s),component:c,orientation:d,ownerState:p,...f,children:v})}):(0,R.jsx)(Qv.Provider,{value:y,children:(0,R.jsx)(Fy,{as:c,ownerState:p,className:z(m.root,s),ref:t,...f,children:v})})});function zy(e){return ci(`MuiTab`,e)}var By=li(`MuiTab`,[`root`,`labelIcon`,`textColorInherit`,`textColorPrimary`,`textColorSecondary`,`selected`,`disabled`,`fullWidth`,`wrapped`,`icon`]),Vy=e=>{let{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:a,label:o,selected:s,disabled:c}=e;return Ia({root:[`root`,a&&o&&`labelIcon`,`textColor${H(n)}`,r&&`fullWidth`,i&&`wrapped`,s&&`selected`,c&&`disabled`],icon:[`icon`]},zy,t)},Hy=V(Ol,{name:`MuiTab`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${H(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${By.icon}`]:t.icon}]}})(U(({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:{[`& > .${By.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`bottom`,style:{[`& > .${By.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`start`,style:{[`& > .${By.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`end`,style:{[`& > .${By.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:`inherit`},style:{color:`inherit`,opacity:.6,[`&.${By.selected}`]:{opacity:1},[`&.${By.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:`primary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${By.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${By.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:`secondary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${By.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${By.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)}}]}))),Uy=L.forwardRef(function(e,t){let n=Os({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=o_(),x=c_({id:_,ref:t,disabled:i,selected:m}),S=b.getItemMap().size===0&&m?0:x.tabIndex,C={...n,disabled:i,disableFocusRipple:a,selected:m,icon:!!s,iconPosition:c,label:!!u,fullWidth:o,textColor:g,wrapped:v},w=Vy(C),T=s&&u&&L.isValidElement(s)?L.cloneElement(s,{className:z(w.icon,s.props.className)}):s;return(0,R.jsxs)(Hy,{internalNativeButton:!0,focusRipple:!a,className:z(w.root,r),ref:x.ref,role:`tab`,"aria-selected":m,disabled:i,onClick:e=>{!m&&d&&d(e,_),f&&f(e)},onFocus:e=>{h&&!m&&d&&d(e,_),p&&p(e)},tabIndex:S,ownerState:C,...y,children:[c===`top`||c===`start`?(0,R.jsxs)(L.Fragment,{children:[T,u]}):(0,R.jsxs)(L.Fragment,{children:[u,T]}),l]})}),Wy=L.createContext();function Gy(e){return ci(`MuiTable`,e)}li(`MuiTable`,[`root`,`stickyHeader`]);var Ky=e=>{let{classes:t,stickyHeader:n}=e;return Ia({root:[`root`,n&&`stickyHeader`]},Gy,t)},qy=V(`table`,{name:`MuiTable`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})(U(({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`}}]}))),Jy=`table`,Yy=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiTable`}),{className:r,component:i=Jy,padding:a=`normal`,size:o=`medium`,stickyHeader:s=!1,...c}=n,l={...n,component:i,padding:a,size:o,stickyHeader:s},u=Ky(l),d=L.useMemo(()=>({padding:a,size:o,stickyHeader:s}),[a,o,s]);return(0,R.jsx)(Wy.Provider,{value:d,children:(0,R.jsx)(qy,{as:i,role:i===Jy?null:`table`,ref:t,className:z(u.root,r),ownerState:l,...c})})}),Xy=L.createContext();function Zy(e){return ci(`MuiTableBody`,e)}li(`MuiTableBody`,[`root`]);var Qy=e=>{let{classes:t}=e;return Ia({root:[`root`]},Zy,t)},$y=V(`tbody`,{name:`MuiTableBody`,slot:`Root`})({display:`table-row-group`}),eb={variant:`body`},tb=`tbody`,nb=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiTableBody`}),{className:r,component:i=tb,...a}=n,o={...n,component:i},s=Qy(o);return(0,R.jsx)(Xy.Provider,{value:eb,children:(0,R.jsx)($y,{className:z(s.root,r),as:i,ref:t,role:i===tb?null:`rowgroup`,ownerState:o,...a})})});function rb(e){return ci(`MuiTableCell`,e)}var ib=li(`MuiTableCell`,[`root`,`head`,`body`,`footer`,`sizeSmall`,`sizeMedium`,`paddingCheckbox`,`paddingNone`,`alignLeft`,`alignCenter`,`alignRight`,`alignJustify`,`stickyHeader`]),ab=e=>{let{classes:t,variant:n,align:r,padding:i,size:a,stickyHeader:o}=e;return Ia({root:[`root`,n,o&&`stickyHeader`,r!==`inherit`&&`align${H(r)}`,i!==`normal`&&`padding${H(i)}`,`size${H(a)}`]},rb,t)},ob=V(`td`,{name:`MuiTableCell`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`size${H(n.size)}`],n.padding!==`normal`&&t[`padding${H(n.padding)}`],n.align!==`inherit`&&t[`align${H(n.align)}`],n.stickyHeader&&t.stickyHeader]}})(U(({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`,[`&.${ib.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=Os({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(Wy),p=L.useContext(Xy),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=ab(v),b=null;return l&&(b=l===`asc`?`ascending`:`descending`),(0,R.jsx)(ob,{as:h,ref:t,className:z(y.root,i),"aria-sort":b,scope:g,ownerState:v,...d})});function sb(e){return ci(`MuiTableFooter`,e)}li(`MuiTableFooter`,[`root`]);var cb=e=>{let{classes:t}=e;return Ia({root:[`root`]},sb,t)},lb=V(`tfoot`,{name:`MuiTableFooter`,slot:`Root`})({display:`table-footer-group`}),ub={variant:`footer`},db=`tfoot`,fb=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiTableFooter`}),{className:r,component:i=db,...a}=n,o={...n,component:i},s=cb(o);return(0,R.jsx)(Xy.Provider,{value:ub,children:(0,R.jsx)(lb,{as:i,className:z(s.root,r),ref:t,role:i===db?null:`rowgroup`,ownerState:o,...a})})});function pb(e){return ci(`MuiTableHead`,e)}li(`MuiTableHead`,[`root`]);var mb=e=>{let{classes:t}=e;return Ia({root:[`root`]},pb,t)},hb=V(`thead`,{name:`MuiTableHead`,slot:`Root`})({display:`table-header-group`}),gb={variant:`head`},_b=`thead`,vb=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiTableHead`}),{className:r,component:i=_b,...a}=n,o={...n,component:i},s=mb(o);return(0,R.jsx)(Xy.Provider,{value:gb,children:(0,R.jsx)(hb,{as:i,className:z(s.root,r),ref:t,role:i===_b?null:`rowgroup`,ownerState:o,...a})})});function yb(e){return ci(`MuiToolbar`,e)}li(`MuiToolbar`,[`root`,`gutters`,`regular`,`dense`]);var bb=e=>{let{classes:t,disableGutters:n,variant:r}=e;return Ia({root:[`root`,!n&&`gutters`,r]},yb,t)},xb=V(`div`,{name:`MuiToolbar`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(U(({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}]}))),Sb=L.forwardRef(function(e,t){let n=Os({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)(xb,{as:i,className:z(bb(c).root,r),ref:t,ownerState:c,...s})}),Cb=Ns((0,R.jsx)(`path`,{d:`M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z`}),`KeyboardArrowLeft`),wb=Ns((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 ci(`MuiTableRow`,e)}var Eb=li(`MuiTableRow`,[`root`,`selected`,`hover`,`head`,`footer`]),Db=e=>{let{classes:t,selected:n,hover:r,head:i,footer:a}=e;return Ia({root:[`root`,n&&`selected`,r&&`hover`,i&&`head`,a&&`footer`]},Tb,t)},Ob=V(`tr`,{name:`MuiTableRow`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})(U(({theme:e})=>({color:`inherit`,display:`table-row`,verticalAlign:`middle`,outline:0,[`&.${Eb.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Eb.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}`)}}}))),kb=`tr`,Ab=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiTableRow`}),{className:r,component:i=kb,hover:a=!1,selected:o=!1,...s}=n,c=L.useContext(Xy),l={...n,component:i,hover:a,selected:o,head:c&&c.variant===`head`,footer:c&&c.variant===`footer`};return(0,R.jsx)(Ob,{as:i,ref:t,className:z(Db(l).root,r),role:i===kb?null:`row`,ownerState:l,...s})}),jb=Ns((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 Mb(e){return ci(`MuiTableSortLabel`,e)}var Nb=li(`MuiTableSortLabel`,[`root`,`active`,`icon`,`directionDesc`,`directionAsc`]),Pb=e=>{let{classes:t,direction:n,active:r}=e;return Ia({root:[`root`,r&&`active`,`direction${H(n)}`],icon:[`icon`]},Mb,t)},Fb=V(Ol,{name:`MuiTableSortLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.active&&t.active]}})(U(({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,[`& .${Nb.icon}`]:{opacity:.5}},[`&.${Nb.active}`]:{color:(e.vars||e).palette.text.primary,[`& .${Nb.icon}`]:{opacity:1,color:(e.vars||e).palette.text.secondary}}}))),Ib=V(`span`,{name:`MuiTableSortLabel`,slot:`Icon`})(U(({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)`}}]}))),Lb=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiTableSortLabel`}),{active:r=!1,children:i,className:a,direction:o=`asc`,hideSortIcon:s=!1,IconComponent:c=jb,slots:l={},slotProps:u={},...d}=n,f={...n,active:r,direction:o,hideSortIcon:s,IconComponent:c},p=Pb(f),m={slots:l,slotProps:u},[h,g]=zc(`root`,{elementType:Fb,externalForwardedProps:m,ownerState:f,className:z(p.root,a),ref:t,additionalProps:{internalNativeButton:!1}}),[_,v]=zc(`icon`,{elementType:Ib,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 Rb(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function zb(e,t,n,r={},i=()=>{}){let{ease:a=Rb,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 Bb={width:99,height:99,position:`absolute`,top:-9999,overflow:`scroll`,pointerEvents:`none`};function Vb(e){let{onChange:t,...n}=e,r=L.useRef(),i=L.useRef(null),a=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return Ws(()=>{let e=Fs(()=>{let e=r.current;a(),e!==r.current&&t(r.current)}),n=Hs(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:Bb,...n,ref:i})}function Hb(e){return ci(`MuiTabScrollButton`,e)}var Ub=li(`MuiTabScrollButton`,[`root`,`vertical`,`horizontal`,`disabled`]),Wb=e=>{let{classes:t,orientation:n,disabled:r}=e;return Ia({root:[`root`,n,r&&`disabled`]},Hb,t)},Gb=V(Ol,{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,[`&.${Ub.disabled}`]:{opacity:0},variants:[{props:{orientation:`vertical`},style:{width:`100%`,height:40,"& svg":{transform:`var(--TabScrollButton-svgRotate)`}}}]}),Kb=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiTabScrollButton`}),{className:r,slots:i={},slotProps:a={},direction:o,orientation:s,disabled:c,...l}=n,{nativeButton:u,...d}=l,f=ta(),p={isRtl:f,...n},m=Wb(p),h=i.StartScrollButtonIcon??Cb,g=i.EndScrollButtonIcon??wb,_=Cf({elementType:h,externalSlotProps:a.startScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:p}),v=Cf({elementType:g,externalSlotProps:a.endScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:p});return(0,R.jsx)(Gb,{component:`div`,className:z(m.root,r),ref:t,role:null,ownerState:p,tabIndex:null,...d,style:{...d.style,...s===`vertical`&&{"--TabScrollButton-svgRotate":`rotate(${f?-90:90}deg)`}},children:o===`left`?(0,R.jsx)(h,{..._}):(0,R.jsx)(g,{...v})})});function qb(e){return ci(`MuiTabs`,e)}var Jb=li(`MuiTabs`,[`root`,`vertical`,`list`,`centered`,`scroller`,`fixed`,`scrollableX`,`scrollableY`,`hideScrollbar`,`scrollButtons`,`scrollButtonsHideMobile`,`indicator`]),Yb=e=>{let{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:a,centered:o,scrollButtonsHideMobile:s,classes:c}=e;return Ia({root:[`root`,t&&`vertical`],scroller:[`scroller`,n&&`fixed`,r&&`hideScrollbar`,i&&`scrollableX`,a&&`scrollableY`],list:[`list`,t&&`vertical`,o&&`centered`],indicator:[`indicator`],scrollButtons:[`scrollButtons`,s&&`scrollButtonsHideMobile`],scrollableX:[i&&`scrollableX`],hideScrollbar:[r&&`hideScrollbar`]},qb,c)},Xb=V(`div`,{name:`MuiTabs`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${Jb.scrollButtons}`]:t.scrollButtons},{[`& .${Jb.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(U(({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:{[`& .${Jb.scrollButtons}`]:{[e.breakpoints.down(`sm`)]:{display:`none`}}}}]}))),Zb=V(`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`}}]}),Qb=V(`div`,{name:`MuiTabs`,slot:`List`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.list,n.centered&&t.centered]}})({display:`flex`,variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:`column`}},{props:({ownerState:e})=>e.centered,style:{justifyContent:`center`}}]}),$b=V(`span`,{name:`MuiTabs`,slot:`Indicator`})(U(({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}}]}))),ex=V(Vb)({overflowX:`auto`,overflowY:`hidden`,scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`}}),tx={},nx=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiTabs`}),r=ms(),i=ta(),{"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`,scrollButtons:g=`auto`,selectionFollowsFocus:_,slots:v={},slotProps:y={},textColor:b=`primary`,value:x,variant:S=`standard`,visibleScrollbar:C=!1,...w}=n,T=S===`scrollable`,E=h===`vertical`,D=E?`scrollTop`:`scrollLeft`,O=E?`top`:`left`,ee=E?`bottom`:`right`,te=E?`clientHeight`:`clientWidth`,k=E?`height`:`width`,A={...n,component:d,allowScrollButtonsMobile:f,indicatorColor:p,orientation:h,vertical:E,scrollButtons:g,textColor:b,variant:S,visibleScrollbar:C,fixed:!T,hideScrollbar:T&&!C,scrollableX:T&&!E,scrollableY:T&&E,centered:c&&!T,scrollButtonsHideMobile:!f},j=Yb(A),ne=Cf({elementType:v.startScrollButtonIcon,externalSlotProps:y.startScrollButtonIcon,ownerState:A}),re=Cf({elementType:v.endScrollButtonIcon,externalSlotProps:y.endScrollButtonIcon,ownerState:A}),[M,N]=L.useState(!1),[ie,ae]=L.useState(tx),[P,oe]=L.useState(!1),[F,se]=L.useState(!1),[ce,le]=L.useState(!1),ue=x===!1?null:x,[de,fe]=L.useState(!1),[I,pe]=L.useState({overflow:`hidden`,scrollbarWidth:0}),me=new Map,he=L.useRef(null),ge=L.useRef(null),_e={slots:v,slotProps:y},ve=()=>{let e=he.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&&x!==!1){let e=ge.current.children;if(e.length>0){let t=e[me.get(x)];n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},ye=Ys(()=>{let{tabsMeta:e,tabMeta:t}=ve(),n=0,r;E?(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,[k]:t?t[k]:0};if(typeof ie[r]!=`number`||typeof ie[k]!=`number`)ae(a);else{let e=Math.abs(ie[r]-a[r]),t=Math.abs(ie[k]-a[k]);(e>=1||t>=1)&&ae(a)}}),be=(e,{animation:t=!0}={})=>{t?zb(D,he.current,e,{duration:r.transitions.duration.standard}):he.current[D]=e},xe=e=>{let t=he.current[D];E?t+=e:t+=e*(i?-1:1),be(t)},Se=()=>{let e=he.current[te],t=0,n=Array.from(ge.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}]=zc(`scrollbar`,{className:z(j.scrollableX,j.hideScrollbar),elementType:ex,shouldForwardComponentProp:!0,externalForwardedProps:_e,ownerState:A}),Oe=L.useCallback(e=>{Ee?.(e),pe({overflow:null,scrollbarWidth:e})},[Ee]),[ke,Ae]=zc(`scrollButtons`,{className:j.scrollButtons,elementType:Kb,externalForwardedProps:_e,ownerState:A,additionalProps:{orientation:h,slots:{StartScrollButtonIcon:v.startScrollButtonIcon,EndScrollButtonIcon:v.endScrollButtonIcon},slotProps:{startScrollButtonIcon:ne,endScrollButtonIcon:re}}}),je=()=>{let e={};e.scrollbarSizeListener=T?(0,R.jsx)(Te,{...De,onChange:Oe}):null;let t=T&&(g===`auto`&&(P||F)||g===!0);return e.scrollButtonStart=t?(0,R.jsx)(ke,{direction:i?`right`:`left`,onClick:Ce,disabled:!P,...Ae}):null,e.scrollButtonEnd=t?(0,R.jsx)(ke,{direction:i?`left`:`right`,onClick:we,disabled:!F,...Ae}):null,e},Me=Ys(e=>{let{tabsMeta:t,tabMeta:n}=ve();!n||!t||(n[O]<t[O]?be(t[D]+(n[O]-t[O]),{animation:e}):n[ee]>t[ee]&&be(t[D]+(n[ee]-t[ee]),{animation:e}))}),Ne=Ys(()=>{T&&g!==!1&&le(!ce)});L.useEffect(()=>{let e=Fs(()=>{he.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=Hs(he.current);r.addEventListener(`resize`,e);let i;return typeof ResizeObserver<`u`&&(t=new ResizeObserver(e),Array.from(ge.current.children).forEach(e=>{t.observe(e)})),typeof MutationObserver<`u`&&(i=new MutationObserver(n),i.observe(ge.current,{childList:!0})),()=>{e.clear(),r.removeEventListener(`resize`,e),i?.disconnect(),t?.disconnect()}},[ye,Ne]),L.useEffect(()=>{let e=Array.from(ge.current.children),t=e.length;if(typeof IntersectionObserver<`u`&&t>0&&T&&g!==!1){let n=e[0],r=e[t-1],i={root:he.current,threshold:.99},a=new IntersectionObserver(e=>{oe(!e[0].isIntersecting)},i);a.observe(n);let o=new IntersectionObserver(e=>{se(!e[0].isIntersecting)},i);return o.observe(r),()=>{a.disconnect(),o.disconnect()}}},[T,g,ce,l?.length]),L.useEffect(()=>{N(!0)},[]),L.useEffect(()=>{ye()}),L.useEffect(()=>{Me(tx!==ie)},[Me,ie]),L.useImperativeHandle(s,()=>({updateIndicator:ye,updateScrollButtons:Ne}),[ye,Ne]);let[Pe,Fe]=zc(`indicator`,{className:j.indicator,elementType:$b,externalForwardedProps:_e,ownerState:A,additionalProps:{style:ie}}),Ie=(0,R.jsx)(Pe,{...Fe}),Le=s_({activeItemId:de?void 0:ue,orientation:h,isRtl:i}),Re=Le.getContainerProps(),ze=L.Children.toArray(l).filter(L.isValidElement).map((e,t)=>{let n=e.props.value===void 0?t:e.props.value;return me.set(n,t),{child:e,index:t,childValue:n}}).map(({child:e,childValue:t})=>{let n=t===x;return L.cloneElement(e,{fullWidth:S===`fullWidth`,indicator:n&&!M&&Ie,selected:n,selectionFollowsFocus:_,onChange:m,textColor:b,value:t})}),Be=je(),[Ve,He]=zc(`root`,{ref:t,className:z(j.root,u),elementType:Xb,externalForwardedProps:{..._e,...w,component:d},ownerState:A}),[Ue,We]=zc(`scroller`,{ref:he,className:j.scroller,elementType:Zb,externalForwardedProps:_e,ownerState:A,additionalProps:{style:{overflow:I.overflow,[E?`margin${i?`Left`:`Right`}`:`marginBottom`]:C?void 0:-I.scrollbarWidth}}}),Ge=Zs(Re.ref,ge),Ke=e=>{let t=ge.current;Rs(Bs(t))?.getAttribute(`role`)===`tab`&&Re.onKeyDown(e)},[qe,Je]=zc(`list`,{ref:Ge,className:j.list,elementType:Qb,externalForwardedProps:_e,ownerState:A,getSlotProps:e=>({...e,onBlur:t=>{qm(t.currentTarget,t.relatedTarget)||fe(!1),e.onBlur?.(t)},onKeyDown:t=>{Ke(t),e.onKeyDown?.(t)},onFocus:t=>{fe(!0),Re.onFocus(t),e.onFocus?.(t)}})});return(0,R.jsxs)(Ve,{...He,children:[Be.scrollButtonStart,Be.scrollbarSizeListener,(0,R.jsxs)(Ue,{...We,children:[(0,R.jsx)(qe,{"aria-label":a,"aria-labelledby":o,"aria-orientation":h===`vertical`?`vertical`:null,role:`tablist`,...Je,children:(0,R.jsx)(a_.Provider,{value:Le,children:ze})}),M&&Ie]}),Be.scrollButtonEnd]})});function rx(e){return ci(`MuiTextField`,e)}li(`MuiTextField`,[`root`]);var ix={standard:ig,filled:xh,outlined:R_},ax=e=>{let{classes:t}=e;return Ia({root:[`root`]},rx,t)},ox=V(Th,{name:`MuiTextField`,slot:`Root`})({}),sx=L.forwardRef(function(e,t){let n=Os({props:e,name:`MuiTextField`}),{autoComplete:r,autoFocus:i=!1,children:a,className:o,color:s=`primary`,defaultValue:c,disabled:l=!1,error:u=!1,fullWidth:d=!1,helperText:f,id:p,inputRef:m,label:h,maxRows:g,minRows:_,multiline:v=!1,name:y,onBlur:b,onChange:x,onFocus:S,placeholder:C,required:w=!1,rows:T,select:E=!1,slots:D={},slotProps:O={},type:ee,value:te,variant:k=`outlined`,...A}=n,j={...n,autoFocus:i,color:s,disabled:l,error:u,fullWidth:d,multiline:v,required:w,select:E,variant:k},ne=ax(j),re=la(p),M=f&&re?`${re}-helper-text`:void 0,N=h&&re?`${re}-label`:void 0,ie=ix[k],ae={slots:D,slotProps:O},[P,oe]=zc(`select`,{elementType:ov,externalForwardedProps:ae,ownerState:j}),F=E&&oe.native,se={},ce=ae.slotProps.inputLabel;k===`outlined`&&(ce&&ce.shrink!==void 0&&(se.notched=ce.shrink),se.label=h),E&&(F||(se.id=void 0),se[`aria-describedby`]=void 0);let[le,ue]=zc(`root`,{elementType:ox,shouldForwardComponentProp:!0,externalForwardedProps:{...ae,...A},ownerState:j,className:z(ne.root,o),ref:t,additionalProps:{disabled:l,error:u,fullWidth:d,required:w,color:s,variant:k}}),[de,fe]=zc(`input`,{elementType:ie,externalForwardedProps:ae,additionalProps:se,ownerState:j}),[I,pe]=zc(`inputLabel`,{elementType:mg,externalForwardedProps:ae,ownerState:j}),[me,he]=zc(`htmlInput`,{elementType:`input`,externalForwardedProps:ae,ownerState:j}),[ge,_e]=zc(`formHelperText`,{elementType:Vh,externalForwardedProps:ae,ownerState:j}),ve=(0,R.jsx)(de,{"aria-describedby":M,autoComplete:r,autoFocus:i,defaultValue:c,fullWidth:d,multiline:v,name:y,rows:T,maxRows:g,minRows:_,type:ee,value:te,id:re,inputRef:m,onBlur:b,onChange:x,onFocus:S,placeholder:C,inputProps:he,slots:{input:D.htmlInput?me:void 0},...fe});return(0,R.jsxs)(le,{...ue,children:[h!=null&&h!==``&&(0,R.jsx)(I,{htmlFor:E&&!F?void 0:re,id:N,...E&&!F&&{component:`div`},...pe,children:h}),E?(0,R.jsx)(P,{"aria-describedby":M,id:re,labelId:N,value:te,input:ve,...oe,children:a}):ve,f&&(0,R.jsx)(ge,{id:M,..._e,children:f})]})});function cx(e){return ci(`MuiToggleButton`,e)}var lx=li(`MuiToggleButton`,[`root`,`disabled`,`selected`,`standard`,`primary`,`secondary`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`fullWidth`]),ux=L.createContext({}),dx=L.createContext(void 0);function fx(e,t){return t===void 0||e===void 0?!1:Array.isArray(t)?t.includes(e):e===t}var px=e=>{let{classes:t,fullWidth:n,selected:r,disabled:i,size:a,color:o}=e;return Ia({root:[`root`,r&&`selected`,i&&`disabled`,n&&`fullWidth`,`size${H(a)}`,o]},cx,t)},mx=V(Ol,{name:`MuiToggleButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`size${H(n.size)}`]]}})(U(({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,[`&.${lx.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:{[`&.${lx.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(zl()).map(([t])=>({props:{color:t},style:{[`&.${lx.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)}}]}))),hx=L.forwardRef(function(e,t){let{value:n,...r}=L.useContext(ux),i=L.useContext(dx),a=Os({props:Si({...r,selected:fx(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=px(v),b=e=>{p&&(p(e,g),e.defaultPrevented)||f&&f(e,g)},x=i||``;return(0,R.jsx)(mx,{className:z(r.className,y.root,s,x),internalNativeButton:!0,disabled:l,focusRipple:!u,ref:t,onClick:b,onChange:f,value:g,ownerState:v,"aria-pressed":m,..._,children:o})}),gx=ki({themeId:O}),_x=_(),vx=Ns((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`),yx=Ns((0,R.jsx)(`path`,{d:`M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z`}),`Add`),bx=Ns((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`),xx=Ns((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`),Sx=Ns((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`),Cx=Ns((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`),wx=Ns((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`),Tx=Ns((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`),Ex=Ns((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`),Dx=Ns((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`),Ox=Ns((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`),kx=Ns([(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`),Ax=Ns((0,R.jsx)(`path`,{d:`M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z`}),`Check`),jx=Ns((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`),Mx=Ns((0,R.jsx)(`path`,{d:`M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z`}),`ChevronRight`),Nx=Ns((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=Ns((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`),Fx=Ns((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`),Ix=Ns((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`),Lx=Ns((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`),Rx=Ns((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`),zx=Ns((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`),Bx=Ns((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`),Vx=Ns((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`),Hx=Ns((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`),Ux=Ns((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`}),`ErrorOutlined`),Wx=Ns((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`),Gx=Ns((0,R.jsx)(`path`,{d:`M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z`}),`ExpandMore`),Kx=Ns((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`),qx=Ns((0,R.jsx)(`path`,{d:`M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z`}),`FilterList`),Jx=Ns((0,R.jsx)(`path`,{d:`M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z`}),`FirstPage`),Yx=Ns((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`),Xx=Ns((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 17h-2v-2h2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25`}),`HelpOutlined`),Zx=Ns((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`),Qx=Ns((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`),$x=Ns((0,R.jsx)(`path`,{d:`M9 3 5 6.99h3V14h2V6.99h3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99z`}),`ImportExport`),eS=Ns((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`),tS=Ns((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`),nS=Ns((0,R.jsx)(`path`,{d:`M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z`}),`KeyboardArrowDown`),rS=Ns((0,R.jsx)(`path`,{d:`M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6z`}),`KeyboardArrowLeft`),iS=Ns((0,R.jsx)(`path`,{d:`M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z`}),`KeyboardArrowRight`),aS=Ns((0,R.jsx)(`path`,{d:`M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z`}),`KeyboardArrowUp`),oS=Ns((0,R.jsx)(`path`,{d:`M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z`}),`LastPage`),sS=Ns((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`),cS=Ns((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`),lS=Ns((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`),uS=Ns((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`),dS=Ns((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`),fS=Ns((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`),pS=Ns((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`),mS=Ns((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`),hS=Ns((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`),gS=Ns((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`),_S=Ns((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`),vS=Ns((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`),yS=Ns((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`),bS=Ns((0,R.jsx)(`path`,{d:`m6 18 8.5-6L6 6zM16 6v12h2V6z`}),`SkipNext`),xS=Ns((0,R.jsx)(`path`,{d:`M6 6h2v12H6zm3.5 6 8.5 6V6z`}),`SkipPrevious`),SS=Ns((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`),CS=Ns((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`),wS=Ns((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`),TS=Ns((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`),ES=Ns((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`),DS=Ns((0,R.jsx)(`path`,{d:`M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z`}),`Warning`),OS=Ns([(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`),kS=Ns((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`),AS=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=>OC(`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=>OC(`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=SC.fromJS(i),OC(`A server side error occurred.`,t,e,n,r)}):t!==200&&t!==204?e.text().then(e=>OC(`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=SC.fromJS(i),OC(`A server side error occurred.`,t,e,n,r)}):t!==200&&t!==204?e.text().then(e=>OC(`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?une.fromJS(n):null,t}):t!==200&&t!==204?e.text().then(e=>OC(`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=>OC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}},jS=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=wC.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>OC(`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=wC.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>OC(`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=pne.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>OC(`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=mne.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>OC(`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=rC.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>OC(`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(TC.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>OC(`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=>OC(`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=>OC(`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(uC.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>OC(`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=iC.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>OC(`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=uC.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>OC(`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=>OC(`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=>OC(`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=>OC(`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=>OC(`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=CC.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>OC(`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=>OC(`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=>OC(`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(gne.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>OC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}},MS=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(LS.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>OC(`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=>OC(`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(LS.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>OC(`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(LS.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>OC(`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(LS.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>OC(`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(LS.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>OC(`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(LS.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>OC(`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(LS.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>OC(`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=CC.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>OC(`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(CC.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>OC(`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(CC.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>OC(`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=LS.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>OC(`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=LS.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>OC(`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=LS.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>OC(`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=LS.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>OC(`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=LS.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>OC(`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=LS.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>OC(`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=LS.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>OC(`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=LS.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>OC(`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=LS.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>OC(`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(_C.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>OC(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}},NS=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(bne.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>OC(`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(xne.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>OC(`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(Sne.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>OC(`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=>OC(`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=>OC(`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}},FS=function(e){return e.DoNotShow=`DoNotShow`,e.AddBulkUnassigned=`AddBulkUnassigned`,e.LookupExistingSerial=`LookupExistingSerial`,e.ManualBarcodeScan=`ManualBarcodeScan`,e}({}),IS=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?LS.fromJS(e.LogEntry):void 0,this.newJobs=e.NewJobs?HS.fromJS(e.NewJobs):void 0,this.newCurrentStatus=e.NewCurrentStatus?rC.fromJS(e.NewCurrentStatus):void 0,this.editMaterialInLog=e.EditMaterialInLog?lne.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}},LS=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(RS.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(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.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}},RS=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}({}),zS=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}},BS=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(VS.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}},VS=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}},HS=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(US.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(XS.fromJS(t))}if(Array.isArray(e.StationUseForCurrentStatus)){this.stationUseForCurrentStatus=[];for(let t of e.StationUseForCurrentStatus)this.stationUseForCurrentStatus.push(XS.fromJS(t))}if(Array.isArray(e.SimDayUsage)){this.simDayUsage=[];for(let t of e.SimDayUsage)this.simDayUsage.push(QS.fromJS(t))}if(Array.isArray(e.SimWorkordersFilled)){this.simWorkordersFilled=[];for(let t of e.SimWorkordersFilled)this.simWorkordersFilled.push($S.fromJS(t))}if(Array.isArray(e.CurrentUnfilledWorkorders)){this.currentUnfilledWorkorders=[];for(let t of e.CurrentUnfilledWorkorders)this.currentUnfilledWorkorders.push(eC.fromJS(t))}if(Array.isArray(e.Programs)){this.programs=[];for(let t of e.Programs)this.programs.push(nC.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}},US=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?WS.fromJS(e.HoldEntireJob):void 0,this.cycles=e.Cycles,Array.isArray(e.ProcsAndPaths)){this.procsAndPaths=[];for(let t of e.ProcsAndPaths)this.procsAndPaths.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.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}},WS=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}},GS=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){if(Array.isArray(e.BasketLoadStations)){this.basketLoadStations=[];for(let t of e.BasketLoadStations)this.basketLoadStations.push(t)}if(this.expectedBasketLoadTime=e.ExpectedBasketLoadTime,Array.isArray(e.BasketUnloadStations)){this.basketUnloadStations=[];for(let t of e.BasketUnloadStations)this.basketUnloadStations.push(t)}if(this.expectedBasketUnloadTime=e.ExpectedBasketUnloadTime,Array.isArray(e.paths)){this.paths=[];for(let t of e.paths)this.paths.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:{},Array.isArray(this.basketLoadStations)){e.BasketLoadStations=[];for(let t of this.basketLoadStations)e.BasketLoadStations.push(t)}if(e.ExpectedBasketLoadTime=this.expectedBasketLoadTime,Array.isArray(this.basketUnloadStations)){e.BasketUnloadStations=[];for(let t of this.basketUnloadStations)e.BasketUnloadStations.push(t)}if(e.ExpectedBasketUnloadTime=this.expectedBasketUnloadTime,Array.isArray(this.paths)){e.paths=[];for(let t of this.paths)e.paths.push(t?t.toJSON():void 0)}return e}},KS=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(qS.fromJS(t))}if(Array.isArray(e.SimulatedProduction)){this.simulatedProduction=[];for(let t of e.SimulatedProduction)this.simulatedProduction.push(JS.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?WS.fromJS(e.HoldMachining):void 0,this.holdLoadUnload=e.HoldLoadUnload?WS.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(YS.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}},qS=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}},JS=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}},YS=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}},XS=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(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.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}},ZS=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}},QS=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?EC(this.day):void 0,e.MachineGroup=this.machineGroup,e.Usage=this.usage,e}},$S=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?EC(this.started):void 0,e.Filled=this.filled?EC(this.filled):void 0,e}},eC=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(tC.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}},tC=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}},nC=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}},rC=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]?aC.fromJS(e.Jobs[t]):new aC)}if(e.Pallets){this.pallets={};for(let t in e.Pallets)e.Pallets.hasOwnProperty(t)&&(this.pallets[t]=e.Pallets[t]?sC.fromJS(e.Pallets[t]):new sC)}if(Array.isArray(e.Material)){this.material=[];for(let t of e.Material)this.material.push(uC.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]?hC.fromJS(e.Queues[t]):new hC)}if(Array.isArray(e.MachineLocations)){this.machineLocations=[];for(let t of e.MachineLocations)this.machineLocations.push(sne.fromJS(t))}if(Array.isArray(e.Workorders)){this.workorders=[];for(let t of e.Workorders)this.workorders.push(_C.fromJS(t))}if(e.Baskets){this.baskets={};for(let t in e.Baskets)e.Baskets.hasOwnProperty(t)&&(this.baskets[t]=e.Baskets[t]?bC.fromJS(e.Baskets[t]):new bC)}}}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}},iC=class e extends US{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(oC.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}},aC=class e extends iC{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}},oC=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}},sC=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.currentPalletLocation=new cC)}init(e){if(e){if(this.palletNum=e.PalletNum,this.fixtureOnPallet=e.FixtureOnPallet,this.onHold=e.OnHold,this.currentPalletLocation=e.CurrentPalletLocation?cC.fromJS(e.CurrentPalletLocation):new cC,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?cC.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}},cC=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}},lC=function(e){return e.LoadUnload=`LoadUnload`,e.Machine=`Machine`,e.MachineQueue=`MachineQueue`,e.Buffer=`Buffer`,e.Cart=`Cart`,e}({}),uC=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.signaledInspections=[],this.location=new dC,this.action=new pC)}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?dC.fromJS(e.Location):new dC,this.action=e.Action?pC.fromJS(e.Action):new pC}}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}},dC=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}},fC=function(e){return e.Free=`Free`,e.OnPallet=`OnPallet`,e.InQueue=`InQueue`,e.InBasket=`InBasket`,e}({}),pC=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}},mC=function(e){return e.Waiting=`Waiting`,e.Loading=`Loading`,e.UnloadToInProcess=`UnloadToInProcess`,e.UnloadToCompletedMaterial=`UnloadToCompletedMaterial`,e.Machining=`Machining`,e}({}),hC=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}},gC=function(e){return e.RawMaterial=`RawMaterial`,e.InProcessTransfer=`InProcessTransfer`,e.Quarantine=`Quarantine`,e.Other=`Other`,e}({}),sne=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}},_C=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(vC.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(cne.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?EC(this.simulatedStart):void 0,e.SimulatedFilled=this.simulatedFilled?EC(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}},vC=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}},cne=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}},yC=function(e){return e.None=`None`,e.ClosedOut=`ClosedOut`,e.CloseOutFailed=`CloseOutFailed`,e}({}),bC=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.location=e.Location,this.locationNum=e.LocationNum,this.locationTitle=e.LocationTitle,this.slot=e.Slot)}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.Location=this.location,e.LocationNum=this.locationNum,e.LocationTitle=this.locationTitle,e.Slot=this.slot,e}},xC=function(e){return e.LoadUnload=`LoadUnload`,e.LoadStationStaging=`LoadStationStaging`,e.Storage=`Storage`,e.InTransit=`InTransit`,e}({}),lne=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(LS.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}},SC=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}},une=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?CC.fromJS(e.ExistingMaterial):void 0,this.potentialNewMaterial=e.PotentialNewMaterial?dne.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}},CC=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}},dne=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=>fne.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}},fne=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}},wC=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]?iC.fromJS(e.Jobs[t]):new iC)}if(Array.isArray(e.StationUse)){this.stationUse=[];for(let t of e.StationUse)this.stationUse.push(XS.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}},pne=class e extends wC{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(QS.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}},mne=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(iC.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(TC.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}},TC=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}},hne=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}},gne=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}},_ne=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}},vne=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}},yne=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}},bne=class e extends yne{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}},xne=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}},Sne=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 EC(e){return e.getUTCFullYear()+`-`+(e.getUTCMonth()<9?`0`+(e.getUTCMonth()+1):e.getUTCMonth()+1)+`-`+(e.getUTCDate()<10?`0`+e.getUTCDate():e.getUTCDate())}var DC=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 OC(e,t,n,r,i){throw i??new DC(e,t,n,r,null)}var kC,AC,jC,MC,NC=[],PC=[];function Cne(){jC=new MS,MC=new NS,AC=new jS,kC=new AS}function wne(e){NC=e,PC=e.map(e=>new MS(e))}function Tne(e){let t=e.access_token;function n(e,n){let r=new Headers(n?.headers);return r.set(`Authorization`,`Bearer `+t),window.fetch(e,n?{...n,headers:r}:{headers:r})}kC=new AS(void 0,{fetch:n}),AC=new jS(void 0,{fetch:n}),jC=new MS(void 0,{fetch:n}),PC=NC.map(e=>new MS(e,{fetch:n}))}function FC(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 Ene=365.2425,Dne=864e5,IC=6e4,One=36e5,LC=3600*24;LC*7,LC*Ene/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*One,n)}var kne={};function Ane(){return kne}function GC(e,t){let n=Ane(),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 KC(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 qC(e,...t){let n=zC.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function JC(e,t){let n=BC(e,t?.in);return n.setHours(0,0,0,0),n}function jne(e,t,n){let[r,i]=qC(n?.in,e,t),a=JC(r),o=JC(i),s=+a-KC(a),c=+o-KC(o);return Math.round((s-c)/Dne)}function YC(e,t,n){let r=BC(e,n?.in);return r.setTime(r.getTime()+t*IC),r}function XC(e,t,n){return UC(e,t*1e3,n)}function ZC(e,t,n){return HC(e,t*12,n)}function QC(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 Mne(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 $C(e,t,n){let[r,i]=qC(n?.in,e,t),a=ew(r,i),o=Math.abs(jne(r,i));r.setDate(r.getDate()-a*o);let s=a*(o-Number(ew(r,i)===-a));return s===0?0:s}function ew(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 tw(e){return t=>{let n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function nw(e,t){return BC(e)-+BC(t)}function rw(e,t,n){let r=nw(e,t)/IC;return tw(n?.roundingMethod)(r)}function Nne(e,t){let n=BC(e,t?.in);return n.setHours(23,59,59,999),n}function iw(e,t,n){let r=nw(e,t)/1e3;return tw(n?.roundingMethod)(r)}function aw(e,t){let n=BC(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Pne(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 ow(e){return JC(Date.now(),e)}var sw=3,cw=2;function lw(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 uw(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 dw(e,t,n,r){let i=r.left,a=r.right;return i.size<cw*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 fw(e,t,n,r){let i=n.left,a=n.right;return a.size<cw*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 pw(e,t,n,r){if(r===null)return e===null?{key:t,val:n,size:1,left:null,right:null}:uw(t,n,e);let i=e;return i.size>sw*r.size?fw(t,n,i,r):{key:t,val:n,size:1+i.size+r.size,left:e,right:r}}function mw(e,t,n,r){if(e===null)return r===null?{key:t,val:n,size:1,left:null,right:null}:lw(t,n,r);let i=r;return i.size>sw*e.size?dw(t,n,e,i):{key:t,val:n,size:1+e.size+i.size,left:e,right:r}}function hw(e,t,n,r){return e===null?r===null?{key:t,val:n,size:1,left:null,right:null}:lw(t,n,r):r===null?uw(t,n,e):r.size>sw*e.size?dw(t,n,e,r):e.size>sw*r.size?fw(t,n,e,r):{key:t,val:n,size:1+e.size+r.size,left:e,right:r}}function gw(e,t,n){return n===null?{key:e,val:t,size:1,left:null,right:null}:pw(gw(e,t,n.left),n.key,n.val,n.right)}function _w(e,t,n){if(n===null)return{key:e,val:t,size:1,left:null,right:null};let r=_w(e,t,n.right);return mw(n.left,n.key,n.val,r)}function vw(e,t,n,r){return e===null?gw(t,n,r):r===null?_w(t,n,e):r.size>sw*e.size?pw(vw(e,t,n,r.left),r.key,r.val,r.right):e.size>sw*r.size?mw(e.left,e.key,e.val,vw(e.right,t,n,r)):{key:t,val:n,size:1+e.size+r.size,left:e,right:r}}function yw(e){let t=e.left;if(t===null)return{k:e.key,v:e.val,rest:e.right};{let n=yw(t);return n.rest=mw(n.rest,e.key,e.val,e.right),n}}function bw(e){let t=e.right;if(t===null)return{k:e.key,v:e.val,rest:e.left};{let n=bw(t);return n.rest=pw(e.left,e.key,e.val,n.rest),n}}function xw(e,t){if(e===null)return t;if(t===null)return e;if(e.size>t.size){let{k:n,v:r,rest:i}=bw(e);return mw(i,n,r,t)}else{let{k:n,v:r,rest:i}=yw(t);return pw(e,n,r,i)}}function Sw(e,t){return e===null?t:t===null?e:t.size>sw*e.size?pw(Sw(e,t.left),t.key,t.val,t.right):e.size>sw*t.size?mw(e.left,e.key,e.val,Sw(e.right,t)):xw(e,t)}function Cw(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 ww(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 Tw(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 Ew(e){let t=e.left.size,n=e.right?.size??0;if(t>sw*n&&t+n>1){let t=e.left.left?.size??0;return(e.left.right?.size??0)<cw*t||(e.left=ww(e.left)),Tw(e)}return e}function Dw(e){let t=e.left?.size??0,n=e.right.size;return n>sw*t&&t+n>1?((e.right.left?.size??0)<cw*(e.right.right?.size??0)||(e.right=Tw(e.right)),ww(e)):e}function Ow(e){return typeof e==`object`&&!!e&&`compare`in e}function kw(e,t){return`asc`in e?e.asc(t):`desc`in e?e.desc(t):e(t)}function Aw(...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(Ow(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(Ow(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 jw(e,t){return e===t?0:e?1:-1}function Mw(e,t){return e-t}function Nw(e,t){return e.localeCompare(t)}function Pw(e,t){return e.getTime()-t.getTime()}function Fw(e,t){return e.compare(t)}function Iw(){let e;function t(t){switch(typeof t){case`object`:if(t instanceof Date){e.compare=Pw;return}else if(Ow(t)){e.compare=Fw;return}else throw Error(`key type must have compare method`);case`string`:e.compare=Nw;return;case`number`:e.compare=Mw;return;case`boolean`:e.compare=jw;return;default:throw Error(`cannot compare keys`)}}function n(n,r){return t(n),e.compare(n,r)}return e={compare:n},e}function Lw({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 Rw(e){let t=e;for(;;){let e=t.left;if(e)t=e;else return[t.key,t.val]}}function zw(e){let t=e;for(;;){let e=t.right;if(e)t=e;else return[t.key,t.val]}}function Bw({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?xw(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:hw(e,r.key,r.val,r.right)}else{let e=i(r.right);return e===r.right?r:hw(r.left,r.key,r.val,e)}}return i(r)}function Vw({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),Ew(i);if(s>0)return i.right=o(i.right),a&&(i.size+=1),Dw(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 Fne({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),Ew(t)):a>0?(t.right=s(t.right),o&&(t.size+=1),Dw(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 Hw({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),Ew(t);if(n>0)return t.right=c(t.right),s&&(t.size+=1),Dw(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*Uw(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*Ww(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 Gw(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 Kw(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 qw(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 Jw(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?Sw(i,o):a===n.val&&i===n.left&&o===n.right?n:vw(i,n.key,a,o)}return r(n)}function Yw({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=vw(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:vw(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 Xw(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:vw(r,t.key,t.val,a),Sw(i,o)];{let e=o===t.right&&i===t.left?t:vw(i,t.key,t.val,o);return[Sw(r,a),e]}}return n(t)}function Zw(e){return yw(e)}function Qw(e){return bw(e)}function $w(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=Yw(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 Ine(e,t,n){if(!t||!n)return!0;function r(t,n){if(!t||!n)return!0;if(t.size===1)return Lw(e,t.key,n)===void 0;let i=Yw(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 eT({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 tT(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 nT(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 nT(e,t.left);{let r=nT(e-n-1,t.right);return vw(t.left,t.key,t.val,r)}}function rT(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?vw(rT(e,t.left),t.key,t.val,t.right):e===n?gw(t.key,t.val,t.right):rT(e-n-1,t.right)}function iT(e,t,n){if(e<0||n===null)return n;let r=n.left?n.left.size:0;if(e<r){let r=iT(e,t,n.left);return r===n.left?n:hw(r,n.key,n.val,n.right)}else if(e===r){let e=t(n.key,n.val);return e===void 0?xw(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=iT(e-r-1,t,n.right);return i===n.right?n:hw(n.left,n.key,n.val,i)}}function aT(e,t,n,r){function i(n,r){if(!n)return r;if(!r)return n;if(!n.left&&!n.right)return Bw(e,n.key,e=>e===void 0?n.val:t(n.val,e,n.key),r);if(!r.left&&!r.right)return Bw(e,r.key,e=>e===void 0?r.val:t(e,r.val,r.key),n);let a=Yw(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?vw(o,n.key,n.val,s):vw(o,n.key,t(n.val,a.val,n.key),s)}return i(n,r)}function oT(e,t,n,r){function i(n,r){if(!n||!r)return null;let a=Yw(e,n.key,r),o=i(n.left,a.below),s=i(n.right,a.above);return a.val===void 0?Sw(o,s):o===n.left&&s===n.right&&a.val===n.val?n:vw(o,n.key,t(n.val,a.val,n.key),s)}return i(n,r)}function sT(e,t,n){function r(t,n){if(!t)return null;if(!n)return t;let i=Yw(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:vw(a,t.key,t.val,o):Sw(a,o)}return r(t,n)}function cT(e,t,n){function r(t,n){if(!t)return n;if(!n)return t;if(!t.left&&!t.right)return Bw(e,t.key,e=>e===void 0?t.val:void 0,n);if(!n.left&&!n.right)return Bw(e,n.key,e=>e===void 0?n.val:void 0,t);let i=Yw(e,t.key,n),a=r(t.left,i.below),o=r(t.right,i.above);return i.val===void 0?vw(a,t.key,t.val,o):Sw(a,o)}return r(t,n)}function lT(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 Jw(i,!1,r);let o=Yw(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?Sw(s,c):e===n.val&&s===n.left&&c===n.right?n:vw(s,n.key,e,c)}else if(s===n.left&&c===n.right)return n;else return vw(s,n.key,n.val,c)}return a(n,r)}function uT(e){return typeof e==`object`&&!!e&&`hash`in e}function dT(e,t){return e*16777619^t}function fT(e){let t=2166136261;for(let n=0;n<e.length;n++)t=dT(t,e.charCodeAt(n));return dT(t,e.length)}function pT(e){return+!!e}function mT(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 dT(dT(2166136261,n[0]),n[1])}}function Lne(e){return mT(e.getTime())}function hT(...e){let t=e.length===1?0:2166136261;for(let n=0;n<e.length;n++){let r=e[n];if(r==null)t=dT(t,0);else switch(typeof r){case`string`:t=dT(t,fT(r));break;case`number`:t=dT(t,mT(r));break;case`boolean`:t=dT(t,pT(r));break;default:t=r instanceof Date?dT(t,mT(r.getTime())):uT(r)?dT(t,r.hash()):dT(t,fT(r.toString()));break}}return e.length===1?t:dT(t,e.length)}function gT(){let e;function t(t){switch(typeof t){case`object`:if(t instanceof Date){e.compare=Pw,e.hash=Lne;return}else if(uT(t)){e.compare=Fw,e.hash=e=>e.hash();return}else throw Error(`key type must have compare and hash methods`);case`string`:e.compare=Nw,e.hash=fT;return;case`number`:e.compare=Mw,e.hash=mT;return;case`boolean`:e.compare=jw,e.hash=pT;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 _T=5,vT=(1<<_T)-1,yT=-1;function bT(e,t){return 1<<(e>>>t&vT)}function xT(e){return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),(e+(e>>4)&252645135)*16843009>>24}function ST(e,t){return xT(e&t-1)}function CT(e,t){return e>>>t&vT}function wT(){}function TT(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!==yT){let t=bT(r,i);if((e&t)===0)return;a=a.children[ST(e,t)],i+=_T}else a=a.children[CT(r,i)],i+=_T}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 Lw(e,t,a.collision);else return;while(a);throw Error(`Internal immutable-collections violation: node undefined during lookup`)}function ET(e,t,n){let r=t.hash,i=n.hash,a,o;for(;;){let s=bT(r,e),c=bT(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+=_T}else{let l={bitmap:s|c,children:CT(r,e)<CT(i,e)?[t,n]:[n,t]};return o!==void 0&&(o[0]=l),a??l}}}function DT(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!==yT){let d=bT(i,c);if(e=ST(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=CT(i,c),r={bitmap:yT,children:[...l.children]};a===void 0&&(a=r),o!==void 0&&(o[s]=r),o=r.children,s=e,c+=_T,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:Cw(a,t,n(void 0),l.key,l.val)}}else u=ET(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=Bw(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=ET(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 OT(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!==yT){let o=bT(a,c);if(e=ST(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=CT(a,c);o=l.children,s=e,c+=_T,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:Cw(o,t,r(void 0,n),l.key,l.val)}}else u=ET(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=Vw(e,t,n,r,l.collision),i;else{let e=ET(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 kT(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=OT(e,n,i,a,r);return[r,i]}function AT(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=OT(e,n(r),r,o,i);return[i,a]}function jT(e){for(;;)if(`children`in e)if(e.children.length===1)e=e.children[0];else return null;else return e}function MT(e,t,n){let r=e[e.length-1];if(r.node.bitmap===yT){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=jT(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&=~bT(t,n-_T),r.node.children.splice(r.childIdx,1),e[0].node}function NT(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 PT(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!==yT){let a=bT(r,i);if((t&a)===0)return n;e=ST(t,a)}else e=CT(r,i);let s={bitmap:t,children:[...o.children]};NT(a,s,e),i+=_T,o=s.children[e]}else if(`key`in o)return r===o.hash&&e.compare(t,o.key)===0?a.length===0?null:MT(a,r,i):n;else if(r===o.hash){let i=Bw(e,t,wT,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 FT(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!==yT){let l=bT(i,o);if((c&l)===0){let e=n(void 0);if(e===void 0)return[r,0];{let n=s.children,r=ST(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=ST(c,l)}else e=CT(i,o);let l={bitmap:c,children:[...s.children]};NT(a,l,e),o+=_T,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]:[MT(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:Cw(u,t,e,s.key,s.val)},l=1}}else{let e=n(void 0);if(e===void 0)return[r,0];c=ET(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=Bw(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=ET(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*IT(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*Uw(e,r.collision)}function LT(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):Gw(e,r,a.collision);return r}function RT(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=qw(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&&jT(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=Jw(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:Cw(n,r.key,r.val,o.key,o.val)}}else return ET(n,r,o);else if(`key`in r&&`collision`in o)if(r.hash===o.hash){let n=Bw(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 ET(n,r,o);else if(`collision`in r&&`key`in o)if(r.hash===o.hash){let n=Bw(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 ET(n,r,o);else if(`collision`in r&&`collision`in o)if(r.hash===o.hash){let n=aT(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 ET(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+_T,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===yT)s=CT(e,n);else{let r=bT(e,n);if(t&r)s=ST(t,r);else{let e=ST(t,r),n=[...i.slice(0,e),o,...i.slice(e)];return{bitmap:t|r,children:n}}}let c=i[s],l=a(n+_T,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===yT)c=CT(e,n);else{let t=bT(e,n);if(i&t)c=ST(i,t);else{let e=ST(i,t),n=[...s.slice(0,e),r,...s.slice(e)];return{bitmap:i|t,children:n}}}let l=s[c],u=a(n+_T,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=TT(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=TT(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=oT(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+_T,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?jT(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===yT)i=CT(e,n);else{let r=bT(e,n);if(r&t)i=ST(t,r);else return null}return a(n+_T,r.children[i],o)}else{let e=r.hash,t=o,i=t.bitmap,s;if(i===yT)s=CT(e,n);else{let t=bT(e,n);if(t&i)s=ST(i,t);else return null}return a(n+_T,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 TT(e,n.key,a,n.hash,t)===void 0?n:(r+=1,null);if(`key`in a){let i=PT(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+_T,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?jT(s[0])??{bitmap:c,children:s}:{bitmap:c,children:s}:n}else if(`collision`in n&&`collision`in a){let t=sT(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===yT)o=CT(e,t),s=1<<o;else if(s=bT(e,t),r&s)o=ST(r,s);else return n;let c=n.children,l=c[o],u=i(t+_T,l,a);if(u===l)return n;if(u===null)if(c.length===2){let e=c[1-o];return jT(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===yT)s=CT(e,t);else{let r=bT(e,t);if(r&o)s=ST(o,r);else return n}return i(t+_T,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:Cw(n,r.key,r.val,s.key,e)})}}else{let e=t(void 0,s.val,s.key);return e===void 0?r:(--a,ET(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=Bw(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,ET(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=lT(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=Jw(i,!1,s.collision);return e===null?r:e.size===1?(--a,ET(n,r,{hash:s.hash,key:e.key,val:e.val})):(a-=e.size,ET(n,r,{hash:s.hash,collision:e}))}else if(`collision`in r&&`collision`in s)if(r.hash===s.hash){let n=lT(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=Jw(i,!1,s.collision);return e===null?r:e.size===1?(--a,ET(n,r,{hash:s.hash,key:e.key,val:e.val})):(a-=e.size,ET(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+_T,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?jT(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===yT?(l=CT(t,n),u=1<<l):(u=bT(t,n),l=ST(c,u)),c&u){let e=r.children,t=e[l],i=o(n+_T,t,s);if(i===null)if(e.length===2){let t=e[1-l];return jT(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=ST(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=bT(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+_T,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?jT(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(gT(),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=gT();function a(e){return e===void 0&&r++,!0}for(let e of t)n=OT(i,e,void 0,a,n);return new e(i,n,r)}static build(t,n){let r=null,i=0,a=gT();function o(e){return e===void 0&&i++,!0}for(let e of t)r=OT(a,n(e),void 0,o,r);return new e(a,r,i)}has(e){return this.root===null?!1:TT(this.cfg,e,this.root)!==void 0}[Symbol.iterator](){return IT(e=>e,this.root)}entries(){return IT(e=>[e,e],this.root)}keys(){return IT(e=>e,this.root)}values(){return IT(e=>e,this.root)}forEach(e){LT((t,n)=>{e(n,n,this)},void 0,this.root)}fold(e,t){return LT((t,n)=>e(t,n),t,this.root)}toLazySeq(){let e=this.root;return X.ofIterator(()=>IT(e=>e,e))}add(t){let[n,r]=DT(this.cfg,t,WT,this.root);return n===this.root?this:new e(this.cfg,n,this.size+ +!!r)}delete(t){let n=PT(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(Iw(),null)}static ofKeys(t){let n=t;return new e(n.cfg,n.root)}static from(t){let n=Iw();return new e(n,Hw(n,t,e=>e,KT))}static build(t,n){let r=Iw();return new e(r,Hw(r,t,n,KT))}get size(){return this.root===null?0:this.root.size}has(e){return this.root===null?!1:Lw(this.cfg,e,this.root)!==void 0}[Symbol.iterator](){return Uw(e=>e,this.root)}entries(){return Uw(e=>[e,e],this.root)}keys(){return Uw(e=>e,this.root)}values(){return Uw(e=>e,this.root)}forEach(e){Gw((t,n)=>{e(n,n,this)},void 0,this.root)}foldl(e,t){return Gw((t,n)=>e(t,n),t,this.root)}foldr(e,t){return Kw((t,n,r)=>e(t,r),t,this.root)}toAscLazySeq(){let e=this.root;return X.ofIterator(()=>Uw(e=>e,e))}toDescLazySeq(){let e=this.root;return X.ofIterator(()=>Ww(e=>e,e))}add(t){let n=Bw(this.cfg,t,KT,this.root);return n===this.root?this:new e(this.cfg,n)}delete(t){let n=Bw(this.cfg,t,qT,this.root);return n===this.root?this:new e(this.cfg,n)}partition(t){let[n,r]=Xw(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=Jw((e,n)=>t(n)?!0:void 0,!1,this.root);return n===this.root?this:new e(this.cfg,n)}split(t){let n=Yw(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 Rw(this.root)[0]}lookupMax(){if(this.root!==null)return zw(this.root)[0]}deleteMin(){if(this.root===null)return this;let t=Zw(this.root);return new e(this.cfg,t.rest)}deleteMax(){if(this.root===null)return this;let t=Qw(this.root);return new e(this.cfg,t.rest)}minView(){if(this.root!==null){let t=Zw(this.root);return{min:t.k,rest:new e(this.cfg,t.rest)}}}maxView(){if(this.root!==null){let t=Qw(this.root);return{max:t.k,rest:new e(this.cfg,t.rest)}}}indexOf(e){return eT(this.cfg,e,this.root)}getByIndex(e){return tT(e,this.root)?.[0]}take(t){let n=nT(t,this.root);return n===this.root?this:new e(this.cfg,n)}drop(t){let n=rT(t,this.root);return n===this.root?this:new e(this.cfg,n)}deleteByIndex(t){let n=iT(t,qT,this.root);return n===this.root?this:new e(this.cfg,n)}union(t){let n=aT(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=aT(r.cfg,KT,t,r.root)}return t===n[0].root?n[0]:new e(n[0].cfg,t)}}intersection(t){let n=oT(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=oT(r.cfg,KT,n,r.root)}return n===t[0].root?t[0]:new e(t[0].cfg,n)}}difference(t){let n=sT(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n)}symmetricDifference(t){let n=cT(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n)}isSubsetOf(e){return $w(this.cfg,this.root,e.root)}isSupersetOf(e){return $w(this.cfg,e.root,this.root)}isDisjointFrom(e){return Ine(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(Iw(),null)}static from(t,n){let r=Iw();return new e(r,Fne(r,t,n))}static build(t,n,r){let i=Iw();return new e(i,Hw(i,t,n,r))}get size(){return this.root===null?0:this.root.size}get(e){return Lw(this.cfg,e,this.root)}has(e){return Lw(this.cfg,e,this.root)!==void 0}[Symbol.iterator](){return Uw((e,t)=>[e,t],this.root)}entries(){return Uw((e,t)=>[e,t],this.root)}keys(){return Uw(e=>e,this.root)}values(){return Uw((e,t)=>t,this.root)}forEach(e){Gw((t,n,r)=>{e(r,n,this)},void 0,this.root)}foldl(e,t){return Gw(e,t,this.root)}foldr(e,t){return Kw(e,t,this.root)}toAscLazySeq(){let e=this.root;return X.ofIterator(()=>Uw((e,t)=>[e,t],e))}keysToAscLazySeq(){let e=this.root;return X.ofIterator(()=>Uw(e=>e,e))}valuesToAscLazySeq(){let e=this.root;return X.ofIterator(()=>Uw((e,t)=>t,e))}toDescLazySeq(){let e=this.root;return X.ofIterator(()=>Ww((e,t)=>[e,t],e))}keysToDescLazySeq(){let e=this.root;return X.ofIterator(()=>Ww(e=>e,e))}valuesToDescLazySeq(){let e=this.root;return X.ofIterator(()=>Ww((e,t)=>t,e))}keySet(){return JT.ofKeys(this)}set(t,n){let r=Bw(this.cfg,t,()=>n,this.root);return r===this.root?this:new e(this.cfg,r)}alter(t,n){let r=Bw(this.cfg,t,n,this.root);return r===this.root?this:new e(this.cfg,r)}delete(t){let n=Bw(this.cfg,t,YT,this.root);return n===this.root?this:new e(this.cfg,n)}partition(t){let[n,r]=Xw(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=qw(t,this.root);return n===this.root?this:new e(this.cfg,n)}collectValues(t){let n=Jw(t,!0,this.root);return n===this.root?this:new e(this.cfg,n)}filter(t){let n=Jw((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=Yw(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 Rw(this.root)}lookupMax(){if(this.root!==null)return zw(this.root)}deleteMin(){if(this.root===null)return this;let t=Zw(this.root);return new e(this.cfg,t.rest)}deleteMax(){if(this.root===null)return this;let t=Qw(this.root);return new e(this.cfg,t.rest)}minView(){if(this.root!==null){let t=Zw(this.root);return{minKey:t.k,minVal:t.v,rest:new e(this.cfg,t.rest)}}}maxView(){if(this.root!==null){let t=Qw(this.root);return{maxKey:t.k,maxVal:t.v,rest:new e(this.cfg,t.rest)}}}indexOf(e){return eT(this.cfg,e,this.root)}getByIndex(e){return tT(e,this.root)}take(t){let n=nT(t,this.root);return n===this.root?this:new e(this.cfg,n)}drop(t){let n=rT(t,this.root);return n===this.root?this:new e(this.cfg,n)}setByIndex(t,n){let r=iT(t,()=>n,this.root);return r===this.root?this:new e(this.cfg,r)}deleteByIndex(t){let n=iT(t,YT,this.root);return n===this.root?this:new e(this.cfg,n)}alterByIndex(t,n){let r=iT(t,n,this.root);return r===this.root?this:new e(this.cfg,r)}union(t,n){let r=aT(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=aT(i.cfg,t,n,i.root)}return n===r[0].root?r[0]:new e(r[0].cfg,n)}}intersection(t,n){let r=oT(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=oT(i.cfg,t,r,i.root)}return r===n[0].root?n[0]:new e(n[0].cfg,r)}}difference(t){let n=sT(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n)}symmetricDifference(t){let n=cT(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n)}withoutKeys(t){let n=t,r=sT(this.cfg,this.root,n.root);return r===this.root?this:new e(this.cfg,r)}adjust(t,n){let r=lT(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)},QT=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},$T,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})}[($T=new WeakMap,Symbol.iterator)](){return ZT(this,$T,`f`)[Symbol.iterator]()}aggregate(t,n,r){let i=new Map;for(let e of ZT(this,$T,`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,$T,`f`);return e.ofIterator(function*(){yield*n,yield t})}chunk(t){let n=ZT(this,$T,`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,$T,`f`);return e.ofIterator(function*(){yield*n,yield*t})}distinct(){let t=ZT(this,$T,`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,$T,`f`),i={hash:e=>hT(...n.map(t=>t(e))),compare:Aw(...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=OT(i,a,!0,n,e),t&&(yield a)})}distinctAndSortBy(t,...n){n.unshift(t);let r={compare:Aw(...n)},i=null;function a(e,t){return e===void 0?t:e}for(let e of ZT(this,$T,`f`))i=Vw(r,e,e,a,i);return e.ofIterator(()=>Uw(e=>e,i))}drop(t){let n=ZT(this,$T,`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,$T,`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,$T,`f`);return e.ofIterator(function*(){for(let e of n)t(e)&&(yield e)})}flatMap(t){let n=ZT(this,$T,`f`);return e.ofIterator(function*(){for(let e of n)yield*t(e)})}groupBy(t,...n){n.unshift(t);let r={hash:e=>hT(...n.map(t=>t(e))),compare:Aw(...n)},i=null;function a(e,t){return e===void 0?[t]:(e.push(t),e)}for(let e of ZT(this,$T,`f`))i=OT(r,e,e,a,i);return e.ofIterator(()=>IT((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:Aw(...n)},i=null;function a(e,t){return e===void 0?[t]:(e.push(t),e)}for(let e of ZT(this,$T,`f`))i=Vw(r,e,e,a,i);return e.ofIterator(()=>Uw((e,t)=>n.length===1?[kw(n[0],e),t]:[n.map(t=>kw(t,e)),t],i))}map(t){let n=ZT(this,$T,`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,$T,`f`);return e.ofIterator(function*(){for(let e of n){let n=t(e);n!=null&&(yield n)}})}prepend(t){let n=ZT(this,$T,`f`);return e.ofIterator(function*(){yield t,yield*n})}prependAll(t){let n=ZT(this,$T,`f`);return e.ofIterator(function*(){yield*t,yield*n})}sortWith(t){return e.of(Array.from(ZT(this,$T,`f`)).sort(t))}sortBy(t,...n){return e.of(Array.from(ZT(this,$T,`f`)).sort(Aw(t,...n)))}tail(){let t=ZT(this,$T,`f`);return e.ofIterator(function*(){let e=!1;for(let n of t)e?yield n:e=!0})}take(t){let n=ZT(this,$T,`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,$T,`f`);return e.ofIterator(function*(){for(let e of n)if(t(e))yield e;else return})}zip(t){let n=ZT(this,$T,`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,$T,`f`))if(!e(t))return!1;return!0}some(e){for(let t of ZT(this,$T,`f`))if(e(t))return!0;return!1}isEmpty(){return ZT(this,$T,`f`)[Symbol.iterator]().next().done===!0}find(e){for(let t of ZT(this,$T,`f`))if(e(t))return t}head(){let e=ZT(this,$T,`f`)[Symbol.iterator]().next();if(!e.done)return e.value}length(){let e=0;for(let t of ZT(this,$T,`f`))e+=1;return e}maxBy(e,...t){let n=Aw(e,...t),r;for(let e of ZT(this,$T,`f`))(r===void 0||n(r,e)<=0)&&(r=e);return r}minBy(e,...t){let n=Aw(e,...t),r;for(let e of ZT(this,$T,`f`))(r===void 0||n(r,e)>=0)&&(r=e);return r}sumBy(e){let t=0;for(let n of ZT(this,$T,`f`))t+=e(n);return t}toRArray(){return Array.from(ZT(this,$T,`f`))}toMutableArray(){return Array.from(ZT(this,$T,`f`))}toSortedArray(e,...t){return Array.from(ZT(this,$T,`f`)).sort(Aw(e,...t))}toHashMap(e,t){return eE.from(this.map(e),t)}buildHashMap(e,t){return eE.build(ZT(this,$T,`f`),e,t)}toOrderedMap(e,t){return XT.from(this.map(e),t)}buildOrderedMap(e,t){return XT.build(ZT(this,$T,`f`),e,t)}toRMap(e,t){return this.toMutableMap(e,t)}toMutableMap(e,t){let n=new Map;for(let r of ZT(this,$T,`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,$T,`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,$T,`f`),e)}toOrderedSet(e){return JT.build(ZT(this,$T,`f`),e)}toRSet(e){return this.toMutableSet(e)}toMutableSet(e){let t=new Set;for(let n of ZT(this,$T,`f`))t.add(e(n));return t}fold(e,t){let n=e;for(let e of ZT(this,$T,`f`))n=t(n,e);return n}reduce(e,t){if(t===void 0){let t=!0,n;for(let r of ZT(this,$T,`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),eE.build(ZT(this,$T,`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,$T,`f`),e,n)}toLookupMap(e,t,n,r){let i;return i=n===void 0?(e,n)=>(e??eE.empty()).set(t(n),n):r===void 0?(e,r)=>(e??eE.empty()).set(t(r),n(r)):(e,i)=>(e??eE.empty()).alter(t(i),e=>e===void 0?n(i):r(e,n(i))),eE.build(ZT(this,$T,`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,$T,`f`),e,i)}toRLookup(e,t){let n=new Map;for(let r of ZT(this,$T,`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){$T.set(this,void 0),QT(this,$T,e,`f`)}},eE=class e{static empty(){return new e(gT(),null,0)}static from(t,n){let r=gT(),[i,a]=kT(r,t,n);return new e(r,i,a)}static build(t,n,r){let i=gT(),[a,o]=AT(i,t,n,r);return new e(i,a,o)}get(e){if(this.root!==null)return TT(this.cfg,e,this.root)}has(e){return this.get(e)!==void 0}[Symbol.iterator](){return IT((e,t)=>[e,t],this.root)}entries(){return IT((e,t)=>[e,t],this.root)}keys(){return IT(e=>e,this.root)}values(){return IT((e,t)=>t,this.root)}forEach(e){LT((t,n,r)=>{e(r,n,this)},void 0,this.root)}fold(e,t){return LT(e,t,this.root)}toLazySeq(){let e=this.root;return X.ofIterator(()=>IT((e,t)=>[e,t],e))}keysToLazySeq(){let e=this.root;return X.ofIterator(()=>IT(e=>e,e))}valuesToLazySeq(){let e=this.root;return X.ofIterator(()=>IT((e,t)=>t,e))}keySet(){return GT.ofKeys(this)}set(e,t){return this.modify(e,()=>t)}modify(t,n){let[r,i]=DT(this.cfg,t,n,this.root);return r===this.root?this:new e(this.cfg,r,this.size+ +!!i)}delete(t){let n=PT(this.cfg,t,this.root);return n===this.root?this:new e(this.cfg,n,this.size-1)}alter(t,n){let[r,i]=FT(this.cfg,t,n,this.root);return r===this.root?this:new e(this.cfg,r,this.size+i)}mapValues(t){let n=RT(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(eE.prototype,"@@__IMMUTABLE_KEYED__@@",{value:!0});function tE(e){return`init`in e}function nE(e){return typeof e.write==`function`}function rE(e){return!!e.onMount}function iE(e){return`v`in e||`e`in e}function aE(e){if(`e`in e)throw e.e;return e.v}function oE(e){return typeof e?.then==`function`}function sE(e,t,n){if(!n.p.has(e)){n.p.add(e);let r=()=>n.p.delete(e);t.then(r,r)}}function cE(e,t,n){let r=n.get(e)?.t,i=t.p;if(!r?.size)return i;if(!i.size)return r;let a=new Set(r);for(let e of i)a.add(e);return a}function lE(e){return!!e.INTERNAL_onInit}var uE=(e,t,n,...r)=>n.read(...r),dE=(e,t,n,...r)=>n.write(...r),fE=(e,t,n)=>n.INTERNAL_onInit(t),pE=(e,t,n,r)=>n.onMount?.call(n,r),mE=(e,t,n)=>{var r;let i=e[0],a=i.get(n);if(!a){let o=e[6],s=e[9];a={d:new Map,p:new Set,n:0},i.set(n,a),(r=o.i)==null||r.call(o,n),lE(n)&&s(e,t,n)}return a},hE=(e,t)=>{let n=e[1],r=e[3],i=e[4],a=e[5],o=e[6],s=e[13];if(!o.f&&!r.size&&!i.size&&!a.size)return;let c=[],l=e=>{try{e()}catch(e){c.push(e)}};do{o.f&&l(o.f);let c=new Set;for(let e of r){let t=n.get(e)?.l;if(t)for(let e of t)c.add(e)}r.clear();for(let e of a)c.add(e);a.clear();for(let e of i)c.add(e);i.clear();for(let e of c)l(e);r.size&&s(e,t)}while(r.size||a.size||i.size);if(c.length)throw AggregateError(c)},gE=(e,t)=>{let n=e[1],r=e[2],i=e[3],a=e[11],o=e[14],s=e[17];if(!i.size)return;let c=[],l=[],u=new WeakSet,d=new WeakSet,f=[],p=[];for(let n of i)f.push(n),p.push(a(e,t,n));for(;f.length;){let i=f.length-1,o=f[i],s=p[i];if(d.has(o)){f.pop(),p.pop();continue}if(u.has(o)){r.get(o)===s.n&&(c.push(o),l.push(s)),d.add(o),f.pop(),p.pop();continue}u.add(o);for(let r of cE(o,s,n))u.has(r)||(f.push(r),p.push(a(e,t,r)))}for(let n=c.length-1;n>=0;--n){let a=c[n],u=l[n],d=!1;for(let e of u.d.keys())if(e!==a&&i.has(e)){d=!0;break}d&&(r.set(a,u.n),o(e,t,a),s(e,t,a)),r.delete(a)}},_E=(e,t,n)=>{var r,i;let a=e[1],o=e[2],s=e[3],c=e[6],l=e[7],u=e[11],d=e[12],f=e[13],p=e[14],m=e[16],h=e[17],g=e[20],_=e[26],v=e[28],y=u(e,t,n),b=v[0];if(iE(y)){if(a.has(n)&&o.get(n)!==y.n||y.m===b)return y.m=b,y;let r=!1;for(let[n,i]of y.d)if(p(e,t,n).n!==i){r=!0;break}if(!r)return y.m=b,y}let x=!0,S=new Set(y.d.keys()),C=()=>{for(let e of S)y.d.delete(e)},w=()=>{if(a.has(n)){let r=!s.size;h(e,t,n),r&&(f(e,t),d(e,t))}},T=r=>{var i;if(r===n){let n=u(e,t,r);if(!iE(n))if(tE(r))g(e,t,r,r.init);else throw Error(`no atom init`);return aE(n)}let o=p(e,t,r);try{return aE(o)}finally{S.delete(r),y.d.set(r,o.n),oE(y.v)&&sE(n,y.v,o),a.has(n)&&((i=a.get(r))==null||i.t.add(n)),x||w()}},E,D,O={get signal(){return E||=new AbortController,E.signal},get setSelf(){return!D&&nE(n)&&(D=(...r)=>{if(!x)try{return m(e,t,n,r)}finally{f(e,t),d(e,t)}}),D}},ee=y.n,te=o.get(n)===ee;try{let i=l(e,t,n,T,O);if(g(e,t,n,i),oE(i)){_(e,t,i,()=>E?.abort());let n=()=>{C(),w()};i.then(n,n)}else C();return(r=c.r)==null||r.call(c,n),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&&te&&(o.set(n,y.n),s.add(n),(i=c.c)==null||i.call(c,n))}},vE=(e,t,n)=>{let r=e[1],i=e[2],a=e[11],o=[n];for(;o.length;){let n=o.pop(),s=a(e,t,n);for(let c of cE(n,s,r)){let n=a(e,t,c);i.get(c)!==n.n&&(i.set(c,n.n),o.push(c))}}},yE=(e,t,n,r)=>{let i=e[3],a=e[6],o=e[8],s=e[11],c=e[12],l=e[13],u=e[14],d=e[15],f=e[16],p=e[17],m=e[20],h=e[28],g=!0,_=n=>aE(u(e,t,n)),v=(r,...o)=>{var u;let _=s(e,t,r);try{if(r===n){if(!tE(r))throw Error(`atom not writable`);let n=_.n,s=o[0];m(e,t,r,s),p(e,t,r),n!==_.n&&(++h[0],i.add(r),d(e,t,r),(u=a.c)==null||u.call(a,r));return}else return f(e,t,r,o)}finally{g||(l(e,t),c(e,t))}};try{return o(e,t,n,_,v,...r)}finally{g=!1}},bE=(e,t,n)=>{var r;let i=e[1],a=e[3],o=e[6],s=e[11],c=e[15],l=e[18],u=e[19],d=s(e,t,n),f=i.get(n);if(f&&d.d.size>0){for(let[i,u]of d.d)if(!f.d.has(i)){let d=s(e,t,i);l(e,t,i).t.add(n),f.d.add(i),u!==d.n&&(a.add(i),c(e,t,i),(r=o.c)==null||r.call(o,i))}for(let r of f.d)d.d.has(r)||(f.d.delete(r),u(e,t,r)?.t.delete(n))}},xE=(e,t,n)=>{var r;let i=e[1],a=e[4],o=e[6],s=e[10],c=e[11],l=e[12],u=e[13],d=e[14],f=e[16],p=e[18],m=c(e,t,n),h=i.get(n);if(!h){d(e,t,n);for(let r of m.d.keys())p(e,t,r).t.add(n);h={l:new Set,d:new Set(m.d.keys()),t:new Set},i.set(n,h),nE(n)&&rE(n)&&a.add(()=>{let r=!0,i=(...i)=>{try{return f(e,t,n,i)}finally{r||(u(e,t),l(e,t))}};try{let a=s(e,t,n,i);a&&(h.u=()=>{r=!0;try{a()}finally{r=!1}})}finally{r=!1}}),(r=o.m)==null||r.call(o,n)}return h},SE=(e,t,n)=>{var r;let i=e[1],a=e[5],o=e[6],s=e[11],c=e[19],l=s(e,t,n),u=i.get(n);if(!u||u.l.size)return u;let d=!1;for(let e of u.t)if(i.get(e)?.d.has(n)){d=!0;break}if(!d){u.u&&a.add(u.u),u=void 0,i.delete(n);for(let r of l.d.keys())c(e,t,r)?.t.delete(n);(r=o.u)==null||r.call(o,n);return}return u},CE=(e,t,n,r)=>{let i=e[11],a=e[27],o=i(e,t,n),s=`v`in o,c=o.v;if(oE(r))for(let a of o.d.keys())sE(n,r,i(e,t,a));o.v=r,delete o.e,(!s||!Object.is(c,o.v))&&(++o.n,oE(c)&&a(e,t,c))},wE=(e,t,n)=>{let r=e[14];return aE(r(e,t,n))},TE=(e,t,n,...r)=>{let i=e[3],a=e[12],o=e[13],s=e[16],c=i.size;try{return s(e,t,n,r)}finally{i.size!==c&&(o(e,t),a(e,t))}},EE=(e,t,n,r)=>{let i=e[12],a=e[18],o=e[19],s=a(e,t,n).l;return s.add(r),i(e,t),()=>{s.delete(r),o(e,t,n),i(e,t)}},DE=(e,t,n,r)=>{let i=e[25],a=i.get(n);if(!a){a=new Set,i.set(n,a);let e=()=>i.delete(n);n.then(e,e)}a.add(r)},OE=(e,t,n)=>{e[25].get(n)?.forEach(e=>e())},kE=new WeakMap;function AE(e){let t=kE.get(e),n=t[24];return n?n(t,e):t}function jE(...e){let t={get(e){return r(n,t,e)},set(e,...r){return i(n,t,e,...r)},sub(e,r){return a(n,t,e,r)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},uE,dE,fE,pE,mE,hE,gE,_E,vE,yE,bE,xE,SE,CE,wE,TE,EE,void 0,new WeakMap,DE,OE,[0]].map((t,n)=>e[n]||t);kE.set(t,Object.freeze(n));let r=n[21],i=n[22],a=n[23];return t}var ME=0;function Z(e,t){let n=`atom${++ME}`,r={toString(){return n}};return typeof e==`function`?r.read=e:(r.init=e,r.read=NE,r.write=PE),t&&(r.write=t),r}function NE(e){return e(this)}function PE(e,t,n){return t(this,typeof n==`function`?n(e(this)):n)}var FE;function IE(){return FE?FE():jE()}var LE;function RE(){return LE||=IE(),LE}var zE=(0,L.createContext)(void 0);function BE(e){let t=(0,L.useContext)(zE);return e?.store||t||RE()}function VE({children:e,store:t}){let n=(0,L.useRef)(null);return t?(0,L.createElement)(zE.Provider,{value:t},e):(n.current===null&&(n.current=IE()),(0,L.createElement)(zE.Provider,{value:n.current},e))}var HE=e=>typeof e?.then==`function`,UE=e=>{e.status||(e.status=`pending`,e.then(t=>{e.status=`fulfilled`,e.value=t},t=>{e.status=`rejected`,e.reason=t}))},WE=L.use||(e=>{if(e.status===`pending`)throw e;if(e.status===`fulfilled`)return e.value;throw e.status===`rejected`?e.reason:(UE(e),e)}),GE=new WeakMap,KE=(e,t,n)=>{let r=AE(e),i=r[26],a=GE.get(t);return a||(a=new Promise((o,s)=>{let c=t,l=e=>t=>{c===e&&o(t)},u=e=>t=>{c===e&&s(t)},d=()=>{try{let t=n();HE(t)?(GE.set(t,a),c=t,t.then(l(t),u(t)),i(r,e,t,d)):o(t)}catch(e){s(e)}};t.then(l(t),u(t)),i(r,e,t,d)}),GE.set(t,a)),a};function Q(e,t){let{delay:n,unstable_promiseStatus:r=!L.use}=t||{},i=BE(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);HE(t)&&UE(KE(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),HE(l)){let t=KE(i,l,()=>i.get(e));return r&&UE(t),WE(t)}return l}function qE(e,t){let n=BE(t);return(0,L.useCallback)((...t)=>n.set(e,...t),[n,e])}function JE(e,t){return[Q(e,t),qE(e,t)]}function YE(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 XE=Z(eE.empty()),ZE=XE,QE=Z(GT.empty()),$E=QE,eD=Z(eE.empty()),tD=eD;function nD(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 rD=Z(null,(e,t,n)=>{t(XE,e=>e.union(X.ofObject(n.jobs).toHashMap(e=>e))),t(QE,e=>e.union(X.ofObject(n.jobs).collect(([,e])=>e.scheduleId).toHashSet(e=>e)))}),iD=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(XE,e=>{if(i){let t=VC(r,-30);e=e.filter(e=>e.routeStartUTC>=t)}return e.union(a.toHashMap(e=>{let t=new iC({...e,copiedToSystem:!0});return[e.unique,t]}))}),e&&t(QE,t=>t.add(e))}}),aD=Z(null,(e,t,n)=>{t(eD,X.ofObject(n.jobs).toHashMap(e=>e))}),oD=YE(e=>Z(t=>t(ZE).get(e)?.comment??null,(t,n,r)=>{let i=r===null?``:r;n(XE,t=>{let n=t.get(e);return n===void 0?t:t.set(e,{...n,comment:i??void 0})})})),sD=class extends Error{};sD.prototype.name=`InvalidTokenError`;function cD(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 lD(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 cD(t)}catch{return atob(t)}}function uD(e,t){if(typeof e!=`string`)throw new sD(`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 sD(`Invalid token specified: missing part #${n+1}`);let i;try{i=lD(r)}catch(e){throw new sD(`Invalid token specified: invalid base64 for part #${n+1} (${e.message})`)}try{return JSON.parse(i)}catch(e){throw new sD(`Invalid token specified: invalid json for part #${n+1} (${e.message})`)}}var dD={debug:()=>void 0,info:()=>void 0,warn:()=>void 0,error:()=>void 0},fD,pD,mD=(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))(mD||{});(e=>{function t(){fD=3,pD=dD}e.reset=t;function n(e){if(!(0<=e&&e<=4))throw Error(`Invalid log level`);fD=e}e.setLevel=n;function r(e){pD=e}e.setLogger=r})(mD||={});var hD=class e{constructor(e){this._name=e}debug(...t){fD>=4&&pD.debug(e._format(this._name,this._method),...t)}info(...t){fD>=3&&pD.info(e._format(this._name,this._method),...t)}warn(...t){fD>=2&&pD.warn(e._format(this._name,this._method),...t)}error(...t){fD>=1&&pD.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){fD>=4&&pD.debug(e._format(t),...n)}static info(t,...n){fD>=3&&pD.info(e._format(t),...n)}static warn(t,...n){fD>=2&&pD.warn(e._format(t),...n)}static error(t,...n){fD>=1&&pD.error(e._format(t),...n)}};mD.reset();var gD=class{static decode(e){try{return uD(e)}catch(e){throw hD.error(`JwtUtils.decode`,e),e}}static async generateSignedJwt(e,t,n){let r=`${bD.encodeBase64Url(new TextEncoder().encode(JSON.stringify(e)))}.${bD.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}.${bD.encodeBase64Url(new Uint8Array(i))}`}static async generateSignedJwtWithHmac(e,t,n){let r=`${bD.encodeBase64Url(new TextEncoder().encode(JSON.stringify(e)))}.${bD.encodeBase64Url(new TextEncoder().encode(JSON.stringify(t)))}`,i=await window.crypto.subtle.sign(`HMAC`,n,new TextEncoder().encode(r));return`${r}.${bD.encodeBase64Url(new Uint8Array(i))}`}},_D=`10000000-1000-4000-8000-100000000000`,vD=e=>btoa([...new Uint8Array(e)].map(e=>String.fromCharCode(e)).join(``)),yD=class e{static _randomWord(){let e=new Uint32Array(1);return crypto.getRandomValues(e),e[0]}static generateUUIDv4(){return _D.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 vD(await crypto.subtle.digest(`SHA-256`,t)).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}catch(e){throw hD.error(`CryptoUtils.generateCodeChallenge`,e),e}}static generateBasicAuth(e,t){return vD(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 gD.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 gD.generateSignedJwtWithHmac(o,s,u)}};yD.encodeBase64Url=e=>vD(e).replace(/=/g,``).replace(/\+/g,`-`).replace(/\//g,`_`);var bD=yD,xD=class{constructor(e){this._name=e,this._callbacks=[],this._logger=new hD(`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)}},SD=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(`,`)}},CD=class e extends xD{constructor(){super(...arguments),this._logger=new hD(`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)}},wD=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))}},TD=`;`,ED=class extends Error{constructor(e,t){if(super(e.error_description||e.error||``),this.form=t,this.name=`ErrorResponse`,!e.error)throw hD.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}},DD=class extends Error{constructor(e){super(e),this.name=`ErrorTimeout`}},OD=class{constructor(e){this._logger=new hD(`AccessTokenEvents`),this._expiringTimer=new CD(`Access token expiring`),this._expiredTimer=new CD(`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)}},kD=class{constructor(e,t,n,r,i){this._callback=e,this._client_id=t,this._intervalInSeconds=r,this._stopOnError=i,this._logger=new hD(`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)}},AD=class{constructor(){this._logger=new hD(`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]}},jD=class extends Error{constructor(e,t){super(t),this.name=`ErrorDPoPNonce`,this.nonce=e}},MD=class{constructor(e=[],t=null,n={}){this._jwtHandler=t,this._extraHeaders=n,this._logger=new hD(`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 DD(`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 ED(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 jD(c.headers.get(`dpop-nonce`),`${JSON.stringify(d)}`):d.error?new ED(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)})}},ND=class{constructor(e){this._settings=e,this._logger=new hD(`MetadataService`),this._signingKeys=null,this._metadata=null,this._metadataUrl=this._settings.metadataUrl,this._jsonService=new MD([`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}},PD=class{constructor({prefix:e=`oidc.`,store:t=localStorage}={}){this._logger=new hD(`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}},FD=`code`,ID=`openid`,LD=`client_secret_post`,RD=900,zD=class{constructor({authority:e,metadataUrl:t,metadata:n,signingKeys:r,metadataSeed:i,client_id:a,client_secret:o,response_type:s=FD,scope:c=ID,redirect_uri:l,post_logout_redirect_uri:u,client_authentication:d=LD,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=RD,mergeClaimsStrategy:w={array:`replace`},disablePKCE:T=!1,stateStore:E,revokeTokenAdditionalContentTypes:D,fetchRequestCredentials:O,refreshTokenAllowedScope:ee,extraQueryParams:te={},extraTokenParams:k={},extraHeaders:A={},dpop:j,omitScopeWhenRequesting:ne=!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=ne,this.disablePKCE=!!T,this.revokeTokenAdditionalContentTypes=D,this.fetchRequestCredentials=O||`same-origin`,this.requestTimeoutInSeconds=S,E)this.stateStore=E;else{let e=typeof window<`u`?window.localStorage:new AD;this.stateStore=new PD({store:e})}if(this.refreshTokenAllowedScope=ee,this.extraQueryParams=te,this.extraTokenParams=k,this.extraHeaders=A,this.dpop=j,this.dpop&&!this.dpop?.store)throw Error(`A DPoPStore is required when dpop is enabled`)}},BD=class{constructor(e,t){this._settings=e,this._metadataService=t,this._logger=new hD(`UserInfoService`),this._getClaimsFromJwt=async e=>{let t=this._logger.create(`_getClaimsFromJwt`);try{let n=gD.decode(e);return t.debug(`JWT decoding successful`),n}catch(e){throw t.error(`Error parsing JWT response`),e}},this._jsonService=new MD(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}},VD=class{constructor(e,t){this._settings=e,this._metadataService=t,this._logger=new hD(`TokenClient`),this._jsonService=new MD(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=bD.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 bD.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=bD.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 bD.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=bD.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 bD.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`)}},HD=class{constructor(e,t,n){this._settings=e,this._metadataService=t,this._claimsService=n,this._logger=new hD(`ResponseValidator`),this._userInfoService=new BD(this._settings,this._metadataService),this._tokenClient=new VD(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 ED(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 ED(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=gD.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=gD.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}},UD=class e{constructor(e){this.id=e.id||bD.generateUUIDv4(),this.data=e.data,e.created&&e.created>0?this.created=e.created:this.created=CD.getEpochTime(),this.request_type=e.request_type,this.url_state=e.url_state}toStorageString(){return new hD(`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 hD.createStatic(`State`,`fromStorageString`),Promise.resolve(new e(JSON.parse(t)))}static async clearStaleState(t,n){let r=hD.createStatic(`State`,`clearStaleState`),i=CD.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))}}},WD=class e extends UD{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?bD.generateCodeVerifier():t.code_verifier||void 0,r=n?await bD.generateCodeChallenge(n):void 0;return new e({...t,code_verifier:n,code_challenge:r})}toStorageString(){return new hD(`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){hD.createStatic(`SigninState`,`fromStorageString`);let n=JSON.parse(t);return e.create(n)}},GD=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 WD.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}${TD}${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})}};GD._logger=new hD(`SigninRequest`);var KD=GD,qD=`openid`,JD=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(TD);this.state=e[0],e.length>1&&(this.url_state=e.slice(1).join(TD))}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-CD.getEpochTime()}set expires_in(e){typeof e==`string`&&(e=Number(e)),e!==void 0&&e>=0&&(this.expires_at=Math.floor(e)+CD.getEpochTime())}get isOpenId(){return this.scope?.split(` `).includes(qD)||!!this.id_token}},YD=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 hD(`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 UD({data:t,request_type:a,url_state:s});let e=this.state.id;s&&(e=`${e}${TD}${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}},XD=class{constructor(e){if(this.state=e.get(`state`),this.state){let e=decodeURIComponent(this.state).split(TD);this.state=e[0],e.length>1&&(this.url_state=e.slice(1).join(TD))}this.error=e.get(`error`),this.error_description=e.get(`error_description`),this.error_uri=e.get(`error_uri`)}},ZD=[`nbf`,`jti`,`auth_time`,`nonce`,`acr`,`amr`,`azp`,`at_hash`],QD=[`sub`,`iss`,`aud`,`exp`,`iat`],$D=class{constructor(e){this._settings=e,this._logger=new hD(`ClaimsService`)}filterProtocolClaims(e){let t={...e};if(this._settings.filterProtocolClaims){let e;e=Array.isArray(this._settings.filterProtocolClaims)?this._settings.filterProtocolClaims:ZD;for(let n of e)QD.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}},eO=class{constructor(e,t){this.keys=e,this.nonce=t}},tO=class{constructor(e,t){this._logger=new hD(`OidcClient`),this.settings=e instanceof zD?e:new zD(e),this.metadataService=t??new ND(this.settings),this._claimsService=new $D(this.settings),this._validator=new HD(this.settings,this.metadataService,this._claimsService),this._tokenClient=new VD(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 KD.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 JD(wD.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 WD.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 jD&&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 bD.generateDPoPKeys(),r=new eO(n,t),await e.set(this.settings.client_id,r)),await bD.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 JD(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 jD&&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 JD(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 YD({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 XD(wD.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 ED(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 UD.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`),UD.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})}},nO=class{constructor(e){this._userManager=e,this._logger=new hD(`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 kD(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)}}}},rO=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-CD.getEpochTime()}set expires_in(e){e!==void 0&&(this.expires_at=Math.floor(e)+CD.getEpochTime())}get expired(){let e=this.expires_in;if(e!==void 0)return e<=0}get scopes(){return this.scope?.split(` `)??[]}toStorageString(){return new hD(`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 hD.createStatic(`User`,`fromStorageString`),new e(JSON.parse(t))}},iO=`oidc-client`,aO=class{constructor(){this._abort=new xD(`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!==iO)){try{let n=wD.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:iO,url:t,keepOpen:n},a=new hD(`_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()}}},oO={location:!1,toolbar:!1,height:640,closePopupWindowAfterInSeconds:-1},sO=`_blank`,cO=60,lO=2,uO=10,dO=class extends zD{constructor(e){let{popup_redirect_uri:t=e.redirect_uri,popup_post_logout_redirect_uri:n=e.post_logout_redirect_uri,popupWindowFeatures:r=oO,popupWindowTarget:i=sO,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:_=lO,query_status_response_type:v=`code`,stopCheckSessionOnError:y=!0,revokeTokenTypes:b=[`access_token`,`refresh_token`],revokeTokensOnSignout:x=!1,includeIdTokenInSilentSignout:S=!1,accessTokenExpiringNotificationTimeInSeconds:C=cO,maxSilentRenewTimeoutRetries:w,userStore:T}=e;if(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||uO,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;else{let e=typeof window<`u`?window.sessionStorage:new AD;this.userStore=new PD({store:e})}}},fO=class e extends aO{constructor({silentRequestTimeoutInSeconds:t=uO}){super(),this._logger=new hD(`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 DD(`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)}},pO=class{constructor(e){this._settings=e,this._logger=new hD(`IFrameNavigator`)}async prepare({silentRequestTimeoutInSeconds:e=this._settings.silentRequestTimeoutInSeconds}){return new fO({silentRequestTimeoutInSeconds:e})}async callback(e){this._logger.create(`callback`),fO.notifyParent(e,this._settings.iframeNotifyParentOrigin)}},mO=500,hO=1e3,gO=class extends aO{constructor({popupWindowTarget:e=sO,popupWindowFeatures:t={},popupSignal:n,popupAbortOnClose:r}){super(),this._logger=new hD(`PopupWindow`);let i=SD.center({...oO,...t});this._window=window.open(void 0,e,SD.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*hO)}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`)))},mO),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()}},_O=class{constructor(e){this._settings=e,this._logger=new hD(`PopupNavigator`)}async prepare({popupWindowFeatures:e=this._settings.popupWindowFeatures,popupWindowTarget:t=this._settings.popupWindowTarget,popupSignal:n,popupAbortOnClose:r}){return new gO({popupWindowFeatures:e,popupWindowTarget:t,popupSignal:n,popupAbortOnClose:r})}async callback(e,{keepOpen:t=!1}){this._logger.create(`callback`),gO.notifyOpener(e,t)}},vO=class{constructor(e){this._settings=e,this._logger=new hD(`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(){}},yO=class extends OD{constructor(e){super({expiringNotificationTimeInSeconds:e.accessTokenExpiringNotificationTimeInSeconds}),this._logger=new hD(`UserManagerEvents`),this._userLoaded=new xD(`User loaded`),this._userUnloaded=new xD(`User unloaded`),this._silentRenewError=new xD(`Silent renew error`),this._userSignedIn=new xD(`User signed in`),this._userSignedOut=new xD(`User signed out`),this._userSessionChanged=new xD(`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()}},bO=class{constructor(e){this._userManager=e,this._logger=new hD(`SilentRenewService`),this._isStarted=!1,this._retryTimer=new CD(`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 DD){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)}},xO=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}},SO=class{constructor(e,t,n,r){this._logger=new hD(`UserManager`),this.settings=new dO(e),this._client=new tO(e),this._redirectNavigator=t??new vO(this.settings),this._popupNavigator=n??new _O(this.settings),this._iframeNavigator=r??new pO(this.settings),this._events=new yO(this.settings),this._silentRenewService=new bO(this),this.settings.automaticSilentRenew&&this.startSilentRenew(),this._sessionMonitor=null,this.settings.monitorSession&&(this._sessionMonitor=new nO(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 xO(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 rO({...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 ED)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 rO(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 ED({...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`),rO.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 bD.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 eO(await bD.generateDPoPKeys()),await e.store.set(this.settings.client_id,t)),await bD.generateDPoPJkt(t.keys)}},CO;function wO(e){return e.openIDConnectClientId?location.hostname===`localhost`?!!e.localhostOpenIDConnectAuthority:!!e.openIDConnectAuthority:!1}async function TO(){let e=await kC.fMSInformation();e.additionalLogServers&&e.additionalLogServers.length>0&&wne(e.additionalLogServers);let t=null;if(wO(e)){if(CO=new SO({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 CO.getUser(),!t){try{t=await CO.signinRedirectCallback()}catch{t=null}window.history.replaceState({},``,`/`)}t&&(Tne(t),localStorage.setItem(`current-operator`,t.profile.name||t.profile.sub))}return{...e,user:t===null?void 0:t}}var EO=Z({name:`FMS Insight`,version:``});function DO(e){CO&&!e.user&&CO.signinRedirect().catch(e=>console.log(e))}function OO(){CO&&CO.signoutRedirect().catch(e=>console.log(e))}var kO=Symbol(``);function AO(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===kO?t:o)});return r}var jO=e=>typeof e?.then==`function`;function MO(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 jO(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 NO=MO();function PO(e,t,n=NO,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===kO?(a(i,t),n.removeItem(e)):jO(s)?s.then(t=>(a(i,t),n.setItem(e,t))):(a(i,s),n.setItem(e,s))})}var FO=(e,t,n)=>(t.has(n)?t:t.set(n,e())).get(n),IO=new WeakMap,LO=(e,t,n)=>FO(e,FO(()=>new WeakMap,IO,t),n),RO=e=>typeof e?.then==`function`,zO=()=>void 0;function BO(e,t=zO){return LO(()=>{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(!RO(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 VO=PO(`current-operator`,null),HO=PO(`operators`,[]),UO=Z(e=>{let t=e(VO),n=e(EO);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 aC(t);return r.comment=i,{...e,jobs:{...e.jobs,[n]:r}}}else return e}),t(oD(n),i),AC.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 _C({...e,comments:[...e.comments??[],new vC({comment:r,timeUTC:new Date})]}):e)}:e),jC.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 uC(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!==fC.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!==fC.InQueue||e.location.queuePosition===void 0||e.location.currentQueue===void 0)return e;if(e.materialID===r)return new uC({...e,location:new dC({...e.location,type:fC.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 uC({...e,location:new dC({...e.location,queuePosition:t})})});return{...e,material:s}})}),$O=RegExp(`P(-?\\d+(?:[\\.,]\\d+)?Y)?(-?\\d+(?:[\\.,]\\d+)?M)?(-?\\d+(?:[\\.,]\\d+)?D)?(?:T(-?\\d+(?:[\\.,]\\d+)?H)?(-?\\d+(?:[\\.,]\\d+)?M)?(-?\\d+(?:[\\.,]\\d+)?S)?)?`);function ek(e){let t=$O.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 tk(e){let t=ek(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 nk(e){return tk(e)/60}var rk=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.type===Y.BasketLoadUnload)&&t.material.length>0?t.result+`-`+t.material[0].proc.toString():t.program)}static ofPartCycle(t){return new e(t.part,t.stationGroup,t.carrier.kind!==`machining`&&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 hT(this.part,this.statGroup,this.operation)}toString(){return`{part: ${this.part}}, statGroup: ${this.statGroup}, operation: ${this.operation}}`}},ik=Z(eE.empty()),ak=ik,ok=Z(eE.empty()),sk=ok;function ck(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 lk(e,t){return e.medianMinutesForSingleMat===0||t<e.medianMinutesForSingleMat?!1:(t-e.medianMinutesForSingleMat)/e.MAD_aboveMinutes>2}function uk(e){let t=e.toSortedArray(e=>e);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 dk(e){let t=uk(X.of(e)),n=1.4826*uk(X.of(e).filter(e=>e<=t).map(e=>t-e));n<.25&&(n=.25);let r=1.4826*uk(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=>!ck(i,e)).toRArray(),o=a.reduce((e,t)=>e+t,0)/a.length;return{...i,expectedCycleMinutesForSingleMat:o}}function fk(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]:iw(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 pk(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 mk(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 fk(X.of(e).filter(e=>(e.type===Y.LoadUnloadCycle||e.type===Y.BasketLoadUnload||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=nk(e[0].elapsed);return e.length>=2&&e.every(e=>nk(e.elapsed)===n&&e.material.every(e=>!t.has(e.id)))?pk(e,e=>nk(e.elapsed),e=>e.active===``?-1:nk(e.active)):e.map(e=>({cycle:e,elapsedForSingleMaterialMinutes:e.material.length>0?nk(e.elapsed)/e.material.length:0}))})}function hk(e){return mk(e).toLookup(e=>rk.ofLogCycle(e.cycle),e=>e.elapsedForSingleMaterialMinutes).mapValues(dk)}var gk=Z(null,(e,t,n)=>{t(ik,e=>e.size===0?hk(n):e)}),_k=Z(null,(e,t,n)=>{t(ok,hk(n))});function vk(e){return e.carrier.kind!==`machining`}function yk(e){return e.carrier.kind===`machining`}function bk(e){return e.carrier.kind===`pallet-lul`}function xk(e){return e.carrier.kind===`basket-lul`}function Sk(e){return e.carrier.kind===`basket-lul`?void 0:e.carrier.pallet}function Ck(e){return e.carrier.kind===`basket-lul`?e.carrier.basket:void 0}function wk(e,t){return e.startsWith(`Inspect`)?e:e+` #`+t.toString()}function Tk(e,t){let n=t?.[e.toString()];return n&&n.trim().length>0?n:`L/U #${e}`}function Ek(e,t,n){return e===`L/U`?Tk(t,n):wk(e,t)}function Dk(e){return e&&e.trim().length>0?e:`Basket`}function Ok(e,t=`Basket`){switch(e.carrier.kind){case`machining`:case`pallet-lul`:return`Pallet ${e.carrier.pallet}`;case`basket-lul`:return`${t} ${e.carrier.basket}`}}function kk(e){switch(e.carrier.kind){case`machining`:case`pallet-lul`:return e.carrier.pallet;case`basket-lul`:return e.carrier.basket+1e6}}function Ak(e){return e.valuesToLazySeq().some(e=>e.carrier.kind===`basket-lul`)}var jk=Z(eE.empty()),Mk=jk,Nk=Z(e=>Ak(e(jk))),Pk=Z(eE.empty()),Fk=Pk,Ik=Z(e=>Ak(e(Pk)));function Lk(e,t,n,r){if(t.startofcycle||t.type!==Y.LoadUnloadCycle&&t.type!==Y.BasketLoadUnload&&t.type!==Y.MachineCycle||t.loc===``)return null;let i=t.type===Y.MachineCycle?{kind:`machining`,pallet:t.pal}:t.type===Y.LoadUnloadCycle?{kind:`pallet-lul`,pallet:t.pal}:{kind:`basket-lul`,basket:t.pal},a=nk(t.active);if(i.kind===`basket-lul`&&n<=0&&a<=0)return null;let o=t.material.length>0?t.material[0].part:``,s=t.material.length>0?e.get(rk.ofLogCycle(t)):void 0,c=a;return(t.active===``||c<=0||t.material.length==0)&&(c=(s?.expectedCycleMinutesForSingleMat??0)*t.material.length),{endTime:t.endUTC,elapsedMinsPerMaterial:n,cntr:t.counter,activeMinutes:c,medianCycleMinutes:(s?.medianMinutesForSingleMat??0)*t.material.length,MAD_aboveMinutes:s?.MAD_aboveMinutes??0,part:o,carrier:i,material:t.material,isOutlier:s?ck(s,n):!1,stationGroup:t.loc,stationNumber:t.locnum,stationLabel:Ek(t.loc,t.locnum,r),operation:i.kind===`machining`?t.program:t.result,operator:t.details&&t.details.operator||``}}function Rk(e,t,n){return mk(t).collect(t=>Lk(e,t.cycle,t.elapsedForSingleMaterialMinutes,n)).buildHashMap(e=>e.cntr)}function zk(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 Bk=Z(null,(e,t,n)=>{let r=e(ak),i=e(EO)?.loadStationNames;t(jk,e=>e.union(Rk(r,n,i)))}),Vk=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(jk,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(ak),o=n.logEntry.material.length>0?nk(n.logEntry.elapsed)/n.logEntry.material.length:0,s=e(EO)?.loadStationNames,c=Lk(a,n.logEntry,o,s);if(!c)return;t(jk,e=>{if(i){let t=VC(r,-30);e=e.filter(e=>e.endTime>=t)}return e=e.set(c.cntr,c),e})}else if(n.editMaterialInLog){let e=n.editMaterialInLog;t(jk,t=>zk(e,t))}}),Hk=Z(null,(e,t,n)=>{let r=e(sk),i=e(EO)?.loadStationNames;t(Pk,Rk(r,n,i))}),Uk=Object.create,Wk=Object.defineProperty,Gk=Object.getOwnPropertyDescriptor,Kk=Object.getOwnPropertyNames,qk=Object.getPrototypeOf,Jk=Object.prototype.hasOwnProperty,Yk=(e,t)=>function(){return t||(0,e[Kk(e)[0]])((t={exports:{}}).exports,t),t.exports},Xk=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of Kk(t))!Jk.call(e,i)&&i!==n&&Wk(e,i,{get:()=>t[i],enumerable:!(r=Gk(t,i))||r.enumerable});return e},Zk=((e,t,n)=>(n=e==null?{}:Uk(qk(e)),Xk(t||!e||!e.__esModule?Wk(n,`default`,{value:e,enumerable:!0}):n,e)))(Yk({"node_modules/toggle-selection/index.js"(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()}}}})(),1).default,Qk=`Copy to clipboard: #{key}, Enter`;function $k(e){var t=((navigator.userAgentData?/mac/i.test(navigator.userAgentData.platform):/mac os x/i.test(navigator.userAgent))?`⌘`:`Ctrl`)+`+C`;return e.replace(/#{\s*key\s*}/g,t)}function eA(e,t){var n={};return n[`text/plain`]=new Blob([e],{type:`text/plain`}),t&&t!==`text/plain`&&(n[t]=new Blob([e],{type:t})),new ClipboardItem(n)}async function tA(e,t){if(!t.format&&!t.onCopy)return await navigator.clipboard.writeText(e),!0;var n=eA(e,t.format);return t.onCopy&&(n=t.onCopy(n)||n),await navigator.clipboard.write([n]),!0}function nA(e,t){var n=document.createElement(`span`);return n.textContent=e,n.ariaHidden=`true`,n.style.all=`unset`,n.style.position=`fixed`,n.style.top=`0`,n.style.clip=`rect(0, 0, 0, 0)`,n.style.whiteSpace=`pre`,n.style.webkitUserSelect=`text`,n.style.MozUserSelect=`text`,n.style.msUserSelect=`text`,n.style.userSelect=`text`,n.addEventListener(`copy`,function(n){n.stopPropagation(),t.format&&(n.preventDefault(),n.clipboardData&&n.clipboardData.setData(t.format,e)),t.onCopy&&n.clipboardData&&t.onCopy(n.clipboardData)}),n}function rA(){let e=document.activeElement;for(;e;){if(e.tagName===`DIALOG`&&e.open)return e;e=e.parentElement}return null}function iA(e,t){var n=Zk(),r=document.createRange(),i=document.getSelection(),a=nA(e,t),o=rA()||document.fullscreenElement||document.body,s=!1;try{if(o.appendChild(a),r.selectNodeContents(a),i.removeAllRanges(),i.addRange(r),!document.execCommand(`copy`))throw Error(`copy command was unsuccessful`);s=!0}finally{typeof i.removeRange==`function`?i.removeRange(r):i.removeAllRanges(),o.removeChild(a),n()}return s}async function aA(e,t={}){var n=t.debug||!1;if(window.isSecureContext&&navigator.clipboard)try{return await tA(e,t)}catch(e){n&&console.error(`unable to copy using navigator.clipboard: `,e),n&&console.warn(`falling back to execCommand`)}else n&&!window.isSecureContext&&console.warn(`copy-to-clipboard: navigator.clipboard requires a secure context (HTTPS/localhost). Falling back to execCommand.`);try{return iA(e,t)}catch(i){if(n&&console.error(`unable to copy using execCommand: `,i),n&&console.error(`falling back to prompt`),t.fallbackToPrompt){var r=$k(`message`in t?t.message:Qk);window.prompt(r,e)}}return!1}var oA=aA;function sA(e,t){return!t&&e===`Basket`?`Any`:e}function cA(e,t){let n=JT.empty(),r=JT.empty(),i=JT.empty(),a=XT.empty(),o=JT.empty(),s=!1;for(let c of e){let e=Sk(c);e!==void 0&&(n=n.add(e)),s||=xk(c),vk(c)?r=r.add(c.stationLabel):(i=i.add(c.stationLabel),t&&c.part==t.part&&c.material.some(e=>e.proc===t.proc)&&(o=o.add(rk.ofPartCycle(c))));for(let e of c.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(),hasBasketCycles:s}}var lA=`@@@_FMSInsight_FilterAnyMachineKey_@@@`,uA=`@@@_FMSInsigt_FilterAnyLoadKey_@@@`;function dA(e){return{...cA(e),seriesLabel:`Station`,data:new Map}}function fA(e,{zoom:t,partAndProc:n,pallet:r,station:i,operation:a,carrierKind:o}){let s=n&&i&&i!==`@@@_FMSInsight_FilterAnyMachineKey_@@@`&&i!==`@@@_FMSInsigt_FilterAnyLoadKey_@@@`,c=r&&!a&&i&&i!==`@@@_FMSInsight_FilterAnyMachineKey_@@@`&&i!==`@@@_FMSInsigt_FilterAnyLoadKey_@@@`;return{...cA(e,n),seriesLabel:s?`Carrier`:c?`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&&Sk(e)!==r||o===`Pallet`&&Ck(e)!==void 0||o===`Basket`&&Ck(e)===void 0)return!1;if(i===`@@@_FMSInsight_FilterAnyMachineKey_@@@`){if(vk(e))return!1}else if(i===`@@@_FMSInsigt_FilterAnyLoadKey_@@@`){if(!vk(e))return!1}else if(i&&e.stationLabel!==i)return!1;return!(a&&a.compare(rk.ofPartCycle(e))!==0)}).toRLookup(e=>s?Ok(e):c?e.part+`-`+X.of(e.material).map(e=>e.proc).distinctAndSortBy(e=>e).toRArray().join(`:`):e.stationLabel,e=>({...e,x:e.endTime,y:e.elapsedMinsPerMaterial*e.material.length}))}}function pA(e,{zoom:t,partAndProc:n,pallet:r,station:i,carrierKind:a}){let o=X.of(e).filter(e=>a===`Pallet`&&Ck(e)!==void 0||a===`Basket`&&Ck(e)===void 0?!1:!i||i===`@@@_FMSInsigt_FilterAnyLoadKey_@@@`?vk(e):vk(e)&&e.stationLabel===i);return{...cA(e,n),seriesLabel:`Station`,data:fk(o,e=>e.stationLabel,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&&Sk(e)!==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 mA(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 hA(e){return fk(e,e=>e.stationLabel,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=XC(n[0].endTime,-t*60),i=X.of(n).sumBy(e=>e.activeMinutes);yield{station:e,startTime:r,endActive:i>0?YC(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 gA(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 _A(e,t,n,r,i,a,o){let s=`<table>
221
+ <thead><tr>`;s+=`<th>Date</th><th>Part</th><th>Station</th><th>Carrier</th>`,s+=`<th>Serial</th><th>Workorder</th><th>Inspection</th>`,s+=`<th>Elapsed Min</th><th>Target Min</th>`,i||(s+=`<th>Median Elapsed Min</th><th>Median Deviation</th>`),s+=`</tr></thead>
222
+ <tbody>
223
+ `;let c=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 c)s+=`<tr>`,s+=`<td>`+e.endTime.toLocaleString(void 0,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`})+`</td>`,s+=`<td>`+e.part+`-`+X.of(e.material).map(e=>e.proc).distinctAndSortBy(e=>e).toRArray().join(`:`)+`</td>`,s+=`<td>`+Ek(e.stationGroup,e.stationNumber,a)+`</td>`,s+=`<td>`+Ok(e,Dk(o))+`</td>`,s+=`<td>`+e.material.filter(e=>e.serial).map(e=>e.serial).join(`,`)+`</td>`,s+=`<td>`+e.material.filter(e=>e.workorder).map(e=>e.workorder).join(`,`)+`</td>`,s+=`<td>`+gA(e,t)+`</td>`,s+=`<td>`+(e.elapsedMinsPerMaterial*e.material.length).toFixed(1)+`</td>`,s+=`<td>`+e.activeMinutes.toFixed(1)+`</td>`,i||(s+=`<td>`+e.medianCycleMinutes.toFixed(1)+`</td>`,s+=`<td>`+e.MAD_aboveMinutes.toFixed(1)+`</td>`),s+=`</tr>
224
+ `;return s+=`</tbody>
225
+ </table>`,s}function vA(e,t,n,r,i,a){oA(_A(e,t,n?n.start:void 0,n?n.end:void 0,r,i,a)).catch(console.error)}function yA(e,t=`Pallet`){let n=`<table>
226
+ <thead><tr>`;n+=`<th>${t}</th><th>Date</th><th>Elapsed (min)</th>`,n+=`</tr></thead>
227
+ <tbody>
228
+ `;let r=e.keysToLazySeq().toSortedArray(e=>e);for(let t of r)for(let r of e.get(t)?.valuesToLazySeq()??[])n+=`<tr>`,n+=`<td>`+t.toString()+`</td>`,n+=`<td>`+r.x.toLocaleString(void 0,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`})+`</td>`,n+=`<td>`+r.y.toFixed(1)+`</td>`,n+=`</tr>
229
+ `;return n+=`</tbody>
230
+ </table>`,n}function bA(e,t=`Pallet`){oA(yA(e,t)).catch(console.error)}function xA(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 SA(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 CA(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>`+xA(n)+`</td>`,t+=`<td>`+n.pal.toString()+`</td>`,t+=`<td>`+(e.serial||``)+`</td>`,t+=`<td>`+(e.workorder||``)+`</td>`,t+=`<td>`+SA(n)+`</td>`,t+=`<td>`+nk(n.elapsed).toFixed(1)+`</td>`,t+=`<td>`+nk(n.active).toFixed(1)+`</td>`,t+=`</tr>
234
+ `;return t+=`</tbody>
235
+ </table>`,t}function wA(e){oA(CA(e)).catch(console.error)}var TA=Z([]),EA=TA,DA=Z([]),OA=DA;function kA(e,t){return e.map(e=>({station:e.stationGroup+` #`+e.stationNum.toString(),stationLabel:Ek(e.stationGroup,e.stationNum,t),start:e.startUTC,end:e.endUTC,plannedDown:e.planDown??!1,parts:e.parts?.map(e=>({uniq:e.jobUnique,proc:e.process,path:e.path}))}))}var AA=Z(null,(e,t,n)=>{let r=e(EO)?.loadStationNames;t(TA,e=>e.concat(kA(n.stationUse,r)))}),jA=Z(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.newJobs?.stationUse){let a=n.newJobs?.stationUse,o=e(EO)?.loadStationNames;t(TA,e=>{if(i){let t=VC(r,-30),n=X.of(e).minBy(e=>e.end.getTime());if((n===void 0||n.start>=t)&&a.length===0)return e;e=e.filter(e=>e.start>=t)}return e.concat(kA(a,o))})}}),MA=Z(null,(e,t,n)=>{let r=e(EO)?.loadStationNames;t(DA,kA(n.stationUse,r))});function NA(e){let{target:t}=e;if(!(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 PA=`__bms_measure_text_element`;function FA(e,t){try{let n=document.getElementById(PA),r;if(n instanceof SVGTextElement)r=n;else{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`;let n=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);if(!(n instanceof SVGTextElement))return null;r=n,r.setAttribute(`id`,PA),t&&(r.style.fontSize=t.toString()),e.appendChild(r),document.body.appendChild(e)}return r.textContent=e,r.getComputedTextLength()}catch{return null}}function IA(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 LA(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=IA(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 RA(e,t=0,n={}){let{leading:r=!0,trailing:i=!0}=n;return LA(e,t,{leading:r,maxWait:t,trailing:i})}var zA=(e,t,n,r)=>{switch(t){case`debounce`:return LA(e,n,r);case`throttle`:return RA(e,n,r);default:return e}},BA=e=>{let t=L.useRef(e);return L.useEffect(()=>{t.current=e}),L.useMemo(()=>((...e)=>t.current?.call(t,...e)),[])},VA=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}},HA=(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 UA({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=BA(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}=VA(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=HA(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)(zA(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 WA=V(`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}=UA({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)(WA,{ref:a,style:i?.zIndex?{zIndex:i.zIndex}:void 0,children:(0,R.jsx)(r,{tooltip:i})})})}function KA({chart:e,tooltipAtom:t,TooltipContent:n,sx:r,autoHeight:i}){let{ref:a,width:o,height:s}=UA({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 qA(e){return X.ofObject(e.baskets??{}).collect(([,e])=>e.location===xC.LoadUnload||e.location===xC.LoadStationStaging?[e.basketId,{group:`L/U`,num:e.locationNum}]:null).toRMap(([e,t])=>[e,t])}function JA(e,t,n,r){if(e.action.type===mC.Loading){if(e.action.loadOntoPalletNum)return n.get(e.action.loadOntoPalletNum)??null;if(e.action.loadFromBasketId)return r.get(e.action.loadFromBasketId)??null;let i=e.action.processAfterLoad??e.process,a=t[e.jobUnique]?.procsAndPaths?.[i-1]?.basketLoadStations??[];for(let[,e]of r)if(a.length===0||a.includes(e.num))return e;return null}else{if(e.location.palletNum)return n.get(e.location.palletNum)??null;if(e.location.basketId)return r.get(e.location.basketId)??null}return null}function YA(e,t,n,r){return X.of(e.material).collect(e=>{if(e.action.type!==mC.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,i],a])=>{let o=t.get(new rk(a[0].mat.partName,n,a[0].mat.action.program??``)),s=tk(a[0].mat.action.elapsedMachiningTime??`PT0S`),c=tk(a[0].mat.action.expectedRemainingMachiningTime??`PT0S`);return{station:Ek(n,i,r),start:XC(e.timeOfCurrentStatusUTC,-s),expectedEnd:XC(e.timeOfCurrentStatusUTC,c),isOutlier:o?lk(o,s/60/a.length):!1,parts:[{part:a[0].mat.partName,oper:a[0].mat.action.program??``}]}})}function XA(e,t,n,r){let i=qA(e);return X.of(e.material).collect(t=>{if(t.action.type===mC.UnloadToCompletedMaterial||t.action.type===mC.UnloadToInProcess){let r=JA(t,e.jobs,n,i);return r?{mat:t,material:[t],proc:t.process,path:t.path,loc:r}:null}else if(t.action.type===mC.Loading){let r=JA(t,e.jobs,n,i);return r?{mat:t,material:[t],proc:t.action.processAfterLoad??t.process,path:t.action.pathAfterLoad??t.path,loc:r}:null}return null}).map(t=>{let n=e.jobs[t.mat.jobUnique],r=n?.procsAndPaths?.[t.proc-1],i=n?.procsAndPaths?.[t.proc-1]?.paths?.[t.path-1];if(t.mat.action.type===mC.Loading){let e=t.mat.action.loadOntoPalletNum!==null&&t.mat.action.loadOntoPalletNum!==void 0?i?.expectedLoadTime:r?.expectedBasketLoadTime??i?.expectedLoadTime;return{...t,expectedLoadSecs:tk(e??`PT0S`)}}else{let e=t.mat.location.palletNum!==null&&t.mat.location.palletNum!==void 0?i?.expectedUnloadTime:r?.expectedBasketUnloadTime??i?.expectedUnloadTime;return{...t,expectedLoadSecs:tk(e??`PT0S`)}}}).groupBy(({loc:e})=>e.group,({loc:e})=>e.num).map(([[n,i],a])=>{let o=pk(a,e=>nk(e.mat.action.elapsedLoadUnloadTime??`PT0S`),e=>e.expectedLoadSecs/60),s=!1,c=0;for(let{cycle:e,elapsedForSingleMaterialMinutes:r}of o){let i=t.get(new rk(e.mat.partName,n,e.mat.action.type===mC.Loading?`LOAD-`+e.proc.toString():`UNLOAD-`+e.proc.toString()));i&&lk(i,r)&&(s=!0),e.expectedLoadSecs>0?c+=e.expectedLoadSecs:i?.expectedCycleMinutesForSingleMat&&(c+=i.expectedCycleMinutesForSingleMat*60)}let l=tk(a[0].mat.action.elapsedLoadUnloadTime??`PT0S`);return{station:Ek(n,i,r),start:XC(e.timeOfCurrentStatusUTC,-l),expectedEnd:XC(e.timeOfCurrentStatusUTC,-l+c),isOutlier:s,parts:X.of(a).distinctAndSortBy(e=>e.mat.partName,e=>e.proc,e=>e.mat.action.type===mC.Loading?`LOAD`:`UNLOAD`).map(e=>({part:e.mat.partName+`-`+e.proc.toString(),oper:e.mat.action.type===mC.Loading?`LOAD`:`UNLOAD`})).toRArray()}})}function ZA(e,t,n){let r=X.ofObject(e.pallets).buildHashMap(([,e])=>e.palletNum,(e,[,t])=>t.currentPalletLocation);return YA(e,t,r,n).concat(XA(e,t,r,n)).toRArray()}function QA({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 $A({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 ej({xScale:e,yScale:t,width:n,height:r,rowTickOverride:i,colTickOverride:a}){return(0,R.jsxs)(`g`,{children:[(0,R.jsx)(QA,{scale:t,width:n,tickOverride:i}),(0,R.jsx)($A,{scale:e,height:r,tickOverride:a})]})}var tj=8;function nj(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 rj({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=nj(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:tj,y2:0,stroke:`#222`,strokeWidth:1,shapeRendering:`crispEdges`}),(0,R.jsx)(`text`,{dy:13,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:tj+r+20,textAnchor:`middle`,fontSize:r+2,fill:`#222`,children:n}):void 0]})}function ij({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=nj(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:-8,x2:0,y1:0,y2:0,stroke:`#222`,strokeWidth:1,shapeRendering:`crispEdges`}),(0,R.jsx)(`text`,{dx:-13,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:-8-r-20,textAnchor:`middle`,fontSize:r+2,fill:`#222`,transform:`rotate(-90)`,children:n}):void 0]})}function aj({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=nj(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:-8,stroke:`#222`,strokeWidth:1,shapeRendering:`crispEdges`}),(0,R.jsx)(`text`,{dy:-13,textAnchor:`middle`,fontSize:r,fill:`#222`,children:i(e.tick)})]},t)),n?(0,R.jsx)(`text`,{x:(s[0]+s[1])/2,y:-8-r-20,textAnchor:`middle`,fontSize:r+2,fill:`#222`,children:n}):void 0]})}function oj(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function sj(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function cj(e){let t,n,r;e.length===2?(t=e===oj||e===sj?e:lj,n=e,r=e):(t=oj,n=(t,n)=>oj(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 lj(){return 0}function uj(e){return e===null?NaN:+e}var dj=cj(oj),fj=dj.right;dj.left,cj(uj).center;var pj=class extends Map{constructor(e,t=_j){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(mj(this,e))}has(e){return super.has(mj(this,e))}set(e,t){return super.set(hj(this,e),t)}delete(e){return super.delete(gj(this,e))}};function mj({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function hj({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function gj({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function _j(e){return typeof e==`object`&&e?e.valueOf():e}var vj=Math.sqrt(50),yj=Math.sqrt(10),bj=Math.sqrt(2);function xj(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=vj?10:a>=yj?5:a>=bj?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?xj(e,t,n*2):[s,c,l]}function Sj(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?xj(t,e,n):xj(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 Cj(e,t,n){return t=+t,e=+e,n=+n,xj(e,t,n)[2]}function wj(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?Cj(t,e,n):Cj(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function Tj(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 Ej(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}var Dj=Symbol(`implicit`);function Oj(){var e=new pj,t=[],n=[],r=Dj;function i(i){let a=e.get(i);if(a===void 0){if(r!==Dj)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 pj;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 Oj(t,n).unknown(r)},Ej.apply(i,arguments),i}function kj(){var e=Oj().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=Tj(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 kj(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},Ej.apply(d(),arguments)}function Aj(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function jj(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Mj(){}var Nj=.7,Pj=1/Nj,Fj=`\\s*([+-]?\\d+)\\s*`,Ij=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,Lj=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,Rj=/^#([0-9a-f]{3,8})$/,zj=RegExp(`^rgb\\(${Fj},${Fj},${Fj}\\)$`),Bj=RegExp(`^rgb\\(${Lj},${Lj},${Lj}\\)$`),Vj=RegExp(`^rgba\\(${Fj},${Fj},${Fj},${Ij}\\)$`),Hj=RegExp(`^rgba\\(${Lj},${Lj},${Lj},${Ij}\\)$`),Uj=RegExp(`^hsl\\(${Ij},${Lj},${Lj}\\)$`),Wj=RegExp(`^hsla\\(${Ij},${Lj},${Lj},${Ij}\\)$`),Gj={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};Aj(Mj,Xj,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Kj,formatHex:Kj,formatHex8:qj,formatHsl:Jj,formatRgb:Yj,toString:Yj});function Kj(){return this.rgb().formatHex()}function qj(){return this.rgb().formatHex8()}function Jj(){return lM(this).formatHsl()}function Yj(){return this.rgb().formatRgb()}function Xj(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=Rj.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Zj(t):n===3?new tM(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Qj(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Qj(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=zj.exec(e))?new tM(t[1],t[2],t[3],1):(t=Bj.exec(e))?new tM(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Vj.exec(e))?Qj(t[1],t[2],t[3],t[4]):(t=Hj.exec(e))?Qj(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Uj.exec(e))?cM(t[1],t[2]/100,t[3]/100,1):(t=Wj.exec(e))?cM(t[1],t[2]/100,t[3]/100,t[4]):Gj.hasOwnProperty(e)?Zj(Gj[e]):e===`transparent`?new tM(NaN,NaN,NaN,0):null}function Zj(e){return new tM(e>>16&255,e>>8&255,e&255,1)}function Qj(e,t,n,r){return r<=0&&(e=t=n=NaN),new tM(e,t,n,r)}function $j(e){return e instanceof Mj||(e=Xj(e)),e?(e=e.rgb(),new tM(e.r,e.g,e.b,e.opacity)):new tM}function eM(e,t,n,r){return arguments.length===1?$j(e):new tM(e,t,n,r??1)}function tM(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Aj(tM,eM,jj(Mj,{brighter(e){return e=e==null?Pj:Pj**+e,new tM(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Nj:Nj**+e,new tM(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new tM(oM(this.r),oM(this.g),oM(this.b),aM(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:nM,formatHex:nM,formatHex8:rM,formatRgb:iM,toString:iM}));function nM(){return`#${sM(this.r)}${sM(this.g)}${sM(this.b)}`}function rM(){return`#${sM(this.r)}${sM(this.g)}${sM(this.b)}${sM((isNaN(this.opacity)?1:this.opacity)*255)}`}function iM(){let e=aM(this.opacity);return`${e===1?`rgb(`:`rgba(`}${oM(this.r)}, ${oM(this.g)}, ${oM(this.b)}${e===1?`)`:`, ${e})`}`}function aM(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function oM(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function sM(e){return e=oM(e),(e<16?`0`:``)+e.toString(16)}function cM(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new dM(e,t,n,r)}function lM(e){if(e instanceof dM)return new dM(e.h,e.s,e.l,e.opacity);if(e instanceof Mj||(e=Xj(e)),!e)return new dM;if(e instanceof dM)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 dM(o,s,c,e.opacity)}function uM(e,t,n,r){return arguments.length===1?lM(e):new dM(e,t,n,r??1)}function dM(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Aj(dM,uM,jj(Mj,{brighter(e){return e=e==null?Pj:Pj**+e,new dM(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Nj:Nj**+e,new dM(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 tM(mM(e>=240?e-240:e+120,i,r),mM(e,i,r),mM(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new dM(fM(this.h),pM(this.s),pM(this.l),aM(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=aM(this.opacity);return`${e===1?`hsl(`:`hsla(`}${fM(this.h)}, ${pM(this.s)*100}%, ${pM(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function fM(e){return e=(e||0)%360,e<0?e+360:e}function pM(e){return Math.max(0,Math.min(1,e||0))}function mM(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 hM=e=>()=>e;function gM(e,t){return function(n){return e+n*t}}function _M(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function vM(e){return(e=+e)==1?yM:function(t,n){return n-t?_M(t,n,e):hM(isNaN(t)?n:t)}}function yM(e,t){var n=t-e;return n?gM(e,n):hM(isNaN(e)?t:e)}var bM=(function e(t){var n=vM(t);function r(e,t){var r=n((e=eM(e)).r,(t=eM(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=yM(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 xM(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 SM(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function CM(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]=MM(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 wM(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function TM(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function EM(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]=MM(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var DM=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,OM=new RegExp(DM.source,`g`);function kM(e){return function(){return e}}function AM(e){return function(t){return e(t)+``}}function jM(e,t){var n=DM.lastIndex=OM.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=DM.exec(e))&&(i=OM.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:TM(r,i)})),n=OM.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?AM(c[0].x):kM(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 MM(e,t){var n=typeof t,r;return t==null||n===`boolean`?hM(t):(n===`number`?TM:n===`string`?(r=Xj(t))?(t=r,bM):jM:t instanceof Xj?bM:t instanceof Date?wM:SM(t)?xM:Array.isArray(t)?CM:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?EM:TM)(e,t)}function NM(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function PM(e){return function(){return e}}function FM(e){return+e}var IM=[0,1];function LM(e){return e}function RM(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:PM(isNaN(t)?NaN:.5)}function zM(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function BM(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=RM(i,r),a=n(o,a)):(r=RM(r,i),a=n(a,o)),function(e){return a(r(e))}}function VM(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]=RM(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=fj(e,t,1,r)-1;return a[n](i[n](t))}}function HM(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function UM(){var e=IM,t=IM,n=MM,r,i,a,o=LM,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==LM&&(o=zM(e[0],e[n-1])),s=n>2?VM:BM,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),TM))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,FM),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:LM,u()):o!==LM},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 WM(){return UM()(LM,LM)}function GM(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function KM(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 qM(e){return e=KM(Math.abs(e)),e?e[1]:NaN}function JM(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 YM(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var XM=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ZM(e){if(!(t=XM.exec(e)))throw Error(`invalid format: `+e);var t;return new QM({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]})}ZM.prototype=QM.prototype;function QM(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+``}QM.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 $M(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 eN;function tN(e,t){var n=KM(e,t);if(!n)return eN=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(eN=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`)+KM(e,Math.max(0,t+a-1))[0]}function nN(e,t){var n=KM(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 rN={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:GM,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)=>nN(e*100,t),r:nN,s:tN,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function iN(e){return e}var aN=Array.prototype.map,oN=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function sN(e){var t=e.grouping===void 0||e.thousands===void 0?iN:JM(aN.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?iN:YM(aN.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=ZM(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`):rN[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=rN[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=$M(e)),w&&+e==0&&f!==`+`&&(w=!1),n=(w?f===`(`?f:s:f===`-`||f===`(`?``:f)+n,r=(y===`s`&&!isNaN(e)&&eN!==void 0?oN[8+eN/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(qM(t)/3)))*3,r=10**-n,i=l((e=ZM(e),e.type=`f`,e),{suffix:oN[8+n/3]});return function(e){return i(r*e)}}return{format:l,formatPrefix:u}}var cN,lN,uN;dN({thousands:`,`,grouping:[3],currency:[`$`,``]});function dN(e){return cN=sN(e),lN=cN.format,uN=cN.formatPrefix,cN}function fN(e){return Math.max(0,-qM(Math.abs(e)))}function pN(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(qM(t)/3)))*3-qM(Math.abs(e)))}function mN(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,qM(t)-qM(e))+1}function hN(e,t,n,r){var i=wj(e,t,n),a;switch(r=ZM(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=pN(i,o))&&(r.precision=a),uN(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=mN(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=fN(i))&&(r.precision=a-(r.type===`%`)*2);break}return lN(r)}function gN(e){var t=e.domain;return e.ticks=function(e){var n=t();return Sj(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return hN(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=Cj(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 _N(){var e=WM();return e.copy=function(){return HM(e,_N())},Ej.apply(e,arguments),gN(e)}function vN(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 yN=new Date,bN=new Date;function xN(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=>xN(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)=>(yN.setTime(+t),bN.setTime(+r),e(yN),e(bN),Math.floor(n(yN,bN))),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 SN=xN(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);SN.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?xN(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):SN),SN.range;var CN=1e3,wN=CN*60,TN=wN*60,EN=TN*24,DN=EN*7,ON=EN*30,kN=EN*365,AN=xN(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*CN)},(e,t)=>(t-e)/CN,e=>e.getUTCSeconds());AN.range;var jN=xN(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*CN)},(e,t)=>{e.setTime(+e+t*wN)},(e,t)=>(t-e)/wN,e=>e.getMinutes());jN.range;var MN=xN(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*wN)},(e,t)=>(t-e)/wN,e=>e.getUTCMinutes());MN.range;var NN=xN(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*CN-e.getMinutes()*wN)},(e,t)=>{e.setTime(+e+t*TN)},(e,t)=>(t-e)/TN,e=>e.getHours());NN.range;var PN=xN(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*TN)},(e,t)=>(t-e)/TN,e=>e.getUTCHours());PN.range;var FN=xN(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*wN)/EN,e=>e.getDate()-1);FN.range;var IN=xN(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/EN,e=>e.getUTCDate()-1);IN.range;var LN=xN(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/EN,e=>Math.floor(e/EN));LN.range;function RN(e){return xN(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())*wN)/DN)}var zN=RN(0),BN=RN(1),VN=RN(2),HN=RN(3),UN=RN(4),WN=RN(5),GN=RN(6);zN.range,BN.range,VN.range,HN.range,UN.range,WN.range,GN.range;function KN(e){return xN(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)/DN)}var qN=KN(0),JN=KN(1),YN=KN(2),XN=KN(3),ZN=KN(4),QN=KN(5),$N=KN(6);qN.range,JN.range,YN.range,XN.range,ZN.range,QN.range,$N.range;var eP=xN(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());eP.range;var tP=xN(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());tP.range;var nP=xN(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());nP.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:xN(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)}),nP.range;var rP=xN(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());rP.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:xN(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)}),rP.range;function iP(e,t,n,r,i,a){let o=[[AN,1,CN],[AN,5,5*CN],[AN,15,15*CN],[AN,30,30*CN],[a,1,wN],[a,5,5*wN],[a,15,15*wN],[a,30,30*wN],[i,1,TN],[i,3,3*TN],[i,6,6*TN],[i,12,12*TN],[r,1,EN],[r,2,2*EN],[n,1,DN],[t,1,ON],[t,3,3*ON],[e,1,kN]];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=cj(([,,e])=>e).right(o,i);if(a===o.length)return e.every(wj(t/kN,n/kN,r));if(a===0)return SN.every(Math.max(wj(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[Rne,zne]=iP(rP,tP,qN,LN,PN,MN),[aP,oP]=iP(nP,eP,zN,FN,NN,jN);function sP(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 cP(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 lP(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function uP(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=_P(i),u=vP(i),d=_P(a),f=vP(a),p=_P(o),m=vP(o),h=_P(s),g=vP(s),_=_P(c),v=vP(c),y={a:j,A:ne,b:re,B:M,c:null,d:zP,e:zP,f:WP,g:tF,G:rF,H:BP,I:VP,j:HP,L:UP,m:GP,M:KP,p:N,q:ie,Q:fF,s:pF,S:qP,u:JP,U:YP,V:ZP,w:QP,W:$P,x:null,X:null,y:eF,Y:nF,Z:iF,"%":dF},b={a:ae,A:P,b:oe,B:F,c:null,d:aF,e:aF,f:Bne,g:Xne,G:Qne,H:oF,I:sF,j:cF,L:lF,m:Vne,M:Hne,p:se,q:ce,Q:fF,s:pF,S:Une,u:Wne,U:Gne,V:Kne,w:qne,W:Jne,x:null,X:null,y:Yne,Y:Zne,Z:$ne,"%":dF},x={a:E,A:D,b:O,B:ee,c:te,d:kP,e:kP,f:FP,g:TP,G:wP,H:jP,I:jP,j:AP,L:PP,m:OP,M:MP,p:T,q:DP,Q:LP,s:RP,S:NP,u:bP,U:xP,V:SP,w:yP,W:CP,x:k,X:A,y:TP,Y:wP,Z:EP,"%":IP};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=dP[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=lP(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=cP(lP(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?JN.ceil(a):JN(a),a=IN.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=sP(lP(r.y,0,1)),o=a.getDay(),a=o>4||o===0?BN.ceil(a):BN(a),a=FN.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)),o=`Z`in r?cP(lP(r.y,0,1)).getUTCDay():sP(lP(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,cP(r)):sP(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 dP?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 ee(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 te(e,n,r){return w(e,t,n,r)}function k(e,t,r){return w(e,n,t,r)}function A(e,t,n){return w(e,r,t,n)}function j(e){return o[e.getDay()]}function ne(e){return a[e.getDay()]}function re(e){return c[e.getMonth()]}function M(e){return s[e.getMonth()]}function N(e){return i[+(e.getHours()>=12)]}function ie(e){return 1+~~(e.getMonth()/3)}function ae(e){return o[e.getUTCDay()]}function P(e){return a[e.getUTCDay()]}function oe(e){return c[e.getUTCMonth()]}function F(e){return s[e.getUTCMonth()]}function se(e){return i[+(e.getUTCHours()>=12)]}function ce(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 dP={"-":``,_:` `,0:`0`},fP=/^\s*\d+/,pP=/^%/,mP=/[\\^$*+?|[\]().{}]/g;function hP(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 gP(e){return e.replace(mP,`\\$&`)}function _P(e){return RegExp(`^(?:`+e.map(gP).join(`|`)+`)`,`i`)}function vP(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function yP(e,t,n){var r=fP.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function bP(e,t,n){var r=fP.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function xP(e,t,n){var r=fP.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function SP(e,t,n){var r=fP.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function CP(e,t,n){var r=fP.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function wP(e,t,n){var r=fP.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function TP(e,t,n){var r=fP.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function EP(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 DP(e,t,n){var r=fP.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function OP(e,t,n){var r=fP.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function kP(e,t,n){var r=fP.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function AP(e,t,n){var r=fP.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function jP(e,t,n){var r=fP.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function MP(e,t,n){var r=fP.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function NP(e,t,n){var r=fP.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function PP(e,t,n){var r=fP.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function FP(e,t,n){var r=fP.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function IP(e,t,n){var r=pP.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function LP(e,t,n){var r=fP.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function RP(e,t,n){var r=fP.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function zP(e,t){return hP(e.getDate(),t,2)}function BP(e,t){return hP(e.getHours(),t,2)}function VP(e,t){return hP(e.getHours()%12||12,t,2)}function HP(e,t){return hP(1+FN.count(nP(e),e),t,3)}function UP(e,t){return hP(e.getMilliseconds(),t,3)}function WP(e,t){return UP(e,t)+`000`}function GP(e,t){return hP(e.getMonth()+1,t,2)}function KP(e,t){return hP(e.getMinutes(),t,2)}function qP(e,t){return hP(e.getSeconds(),t,2)}function JP(e){var t=e.getDay();return t===0?7:t}function YP(e,t){return hP(zN.count(nP(e)-1,e),t,2)}function XP(e){var t=e.getDay();return t>=4||t===0?UN(e):UN.ceil(e)}function ZP(e,t){return e=XP(e),hP(UN.count(nP(e),e)+(nP(e).getDay()===4),t,2)}function QP(e){return e.getDay()}function $P(e,t){return hP(BN.count(nP(e)-1,e),t,2)}function eF(e,t){return hP(e.getFullYear()%100,t,2)}function tF(e,t){return e=XP(e),hP(e.getFullYear()%100,t,2)}function nF(e,t){return hP(e.getFullYear()%1e4,t,4)}function rF(e,t){var n=e.getDay();return e=n>=4||n===0?UN(e):UN.ceil(e),hP(e.getFullYear()%1e4,t,4)}function iF(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+hP(t/60|0,`0`,2)+hP(t%60,`0`,2)}function aF(e,t){return hP(e.getUTCDate(),t,2)}function oF(e,t){return hP(e.getUTCHours(),t,2)}function sF(e,t){return hP(e.getUTCHours()%12||12,t,2)}function cF(e,t){return hP(1+IN.count(rP(e),e),t,3)}function lF(e,t){return hP(e.getUTCMilliseconds(),t,3)}function Bne(e,t){return lF(e,t)+`000`}function Vne(e,t){return hP(e.getUTCMonth()+1,t,2)}function Hne(e,t){return hP(e.getUTCMinutes(),t,2)}function Une(e,t){return hP(e.getUTCSeconds(),t,2)}function Wne(e){var t=e.getUTCDay();return t===0?7:t}function Gne(e,t){return hP(qN.count(rP(e)-1,e),t,2)}function uF(e){var t=e.getUTCDay();return t>=4||t===0?ZN(e):ZN.ceil(e)}function Kne(e,t){return e=uF(e),hP(ZN.count(rP(e),e)+(rP(e).getUTCDay()===4),t,2)}function qne(e){return e.getUTCDay()}function Jne(e,t){return hP(JN.count(rP(e)-1,e),t,2)}function Yne(e,t){return hP(e.getUTCFullYear()%100,t,2)}function Xne(e,t){return e=uF(e),hP(e.getUTCFullYear()%100,t,2)}function Zne(e,t){return hP(e.getUTCFullYear()%1e4,t,4)}function Qne(e,t){var n=e.getUTCDay();return e=n>=4||n===0?ZN(e):ZN.ceil(e),hP(e.getUTCFullYear()%1e4,t,4)}function $ne(){return`+0000`}function dF(){return`%`}function fF(e){return+e}function pF(e){return Math.floor(e/1e3)}var mF,hF;ere({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 ere(e){return mF=uP(e),hF=mF.format,mF.parse,mF.utcFormat,mF.utcParse,mF}function tre(e){return new Date(e)}function nre(e){return e instanceof Date?+e:+new Date(+e)}function gF(e,t,n,r,i,a,o,s,c,l){var u=WM(),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,nre)):f().map(tre)},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(vN(n,e)):u},u.copy=function(){return HM(u,gF(e,t,n,r,i,a,o,s,c,l))},u}function _F(){return Ej.apply(gF(aP,oP,nP,eP,zN,FN,NN,jN,AN,hF).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var vF=C[200],yF=C[600],bF=C[900],xF=y[700],rre=E[400],ire=E[100];function are(){let e=Q(ZE),t=Q(EA);return(0,L.useMemo)(()=>{let n=WC(new Date,-12);return X.of(t).filter(e=>e.end>=n).sortBy(e=>+!!e.plannedDown).map(t=>({station:t.stationLabel,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 SF=Z(null),CF=14,wF=20,TF=10,EF=2;function ore(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=>FA(e,CF)).maxBy(e=>e??0)??20)+30,s=Math.max(r-o-EF,5),c=Math.max(i-TF-wF,5),l=_F().domain([WC(n,-12),WC(n,8)]).range([0,s]),u=kj().domain(Array.from(a)).range([0,c]).padding(.3);return{xScale:l,yScale:u,actualPlannedScale:kj().domain([`actual`,`planned`]).range([0,u.bandwidth()]).padding(.1),marginLeft:o}}function sre({xScale:e,yScale:t}){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(rj,{scale:e,top:t.range()[1]}),(0,R.jsx)(ij,{scale:t,left:e.range()[0],fontSize:CF}),(0,R.jsx)($A,{scale:e,height:t.range()[1]-t.range()[0]})]})}function cre({cycles:e,xScale:t,yScale:n,actualPlannedScale:r,hideTooltipRef:i}){let a=r(`actual`)??0,o=qE(SF);function s(e){return t=>{let n=NA(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:yF}),(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?xF:bF})]},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:yF})},i))})}function lre(e,t,n,r){return`M ${e} ${t} A ${n} ${r} 0 0 1 ${e} ${t+r}`}function ure({now:e,cycles:t,xScale:n,yScale:r,actualPlannedScale:i,hideTooltipRef:a}){let o=i(`actual`)??0,s=qE(SF);function c(t){return n=>{let r=NA(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:yF}),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?xF:bF}),(0,R.jsx)(`path`,{d:lre(n(e),(r(t.station)??0)+o,80,i.bandwidth()),fill:vF})]}):(0,R.jsx)(`rect`,{x:n(e),y:(r(t.station)??0)+o,width:n(t.expectedEnd)-n(e),height:i.bandwidth(),fill:vF})]},a))})}function dre({sim:e,xScale:t,yScale:n,actualPlannedScale:r,hideTooltipRef:i}){let a=r(`planned`)??0,o=qE(SF);function s(e){return t=>{let n=NA(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?ire:rre})},i))})}function fre({tooltip:e}){return(0,R.jsx)(Zv,{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:`,` `,rw(e.data.cycle.endActive,e.data.cycle.startTime)]}),(0,R.jsxs)(`div`,{children:[`Occupied Minutes:`,` `,rw(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`,` `,rw(e.data.now,e.data.cycle.expectedEnd),` Minutes`]}):(0,R.jsxs)(`div`,{children:[`Expected Remaining Minutes:`,` `,rw(e.data.cycle.expectedEnd,e.data.now)]}),(0,R.jsxs)(`div`,{children:[`Occupied Minutes: `,rw(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 pre({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 DF({height:e,width:t}){let n=Q(Mk),r=Q(ak),i=are(),a=Q(GO),o=Q(EO),s=(0,L.useMemo)(()=>{let e=WC(new Date,-12);return hA(n.valuesToLazySeq().filter(t=>t.endTime>=e))},[n]),c=(0,L.useMemo)(()=>ZA(a,r,o.loadStationNames),[a,r,o.loadStationNames]),l=new Date,[,u]=(0,L.useState)(0),d=(0,L.useRef)(null);(0,L.useEffect)(()=>{d.current!==null&&clearTimeout(d.current),d.current=setTimeout(()=>{u(e=>e+1)},300*1e3)});let{xScale:f,yScale:p,actualPlannedScale:m,marginLeft:h}=ore(s,c,l,t,e),g=(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(${h}, ${TF})`,children:[(0,R.jsx)(`clipPath`,{id:`recent-cycle-clip-body`,children:(0,R.jsx)(`rect`,{x:0,y:0,width:t-EF-h,height:e-wF-TF})}),(0,R.jsx)(sre,{xScale:f,yScale:p}),(0,R.jsxs)(`g`,{clipPath:`url(#recent-cycle-clip-body)`,children:[(0,R.jsx)(cre,{cycles:s,xScale:f,yScale:p,hideTooltipRef:g,actualPlannedScale:m}),(0,R.jsx)(ure,{now:l,cycles:c,xScale:f,yScale:p,hideTooltipRef:g,actualPlannedScale:m}),(0,R.jsx)(dre,{sim:i,xScale:f,yScale:p,actualPlannedScale:m,hideTooltipRef:g})]}),(0,R.jsx)(pre,{now:l,xScale:f,yScale:p})]})}),(0,R.jsx)(GA,{chartHeight:e,chartWidth:t,atom:SF,TooltipContent:fre})]})}var mre=Object.defineProperty,OF=(e,t)=>mre(e,`name`,{value:t,configurable:!0}),kF=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`}};OF(kF,`Part`);var hre=/[$_\p{ID_Start}]/u,gre=/[$_\u200C\u200D\p{ID_Continue}]/u,AF=`.*`;function jF(e,t){return(t?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(e)}OF(jF,`isASCII`);function MF(e,t=!1){let n=[],r=0;for(;r<e.length;){let i=e[r],a=OF(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&&hre.test(n)||i!==r+1&&gre.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}OF(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=OF(e=>{if(o<n.length&&n[o].type===e)return n[o++].value},`tryConsume`),l=OF(()=>c(`OTHER_MODIFIER`)??c(`ASTERISK`),`tryConsumeModifier`),u=OF(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=OF(()=>{let e=``,t;for(;t=c(`CHAR`)??c(`ESCAPED_CHAR`);)e+=t;return e},`consumeText`),f=OF(e=>e,`DefaultEncodePart`),p=t.encodePart||f,m=``,h=OF(e=>{m+=e},`appendToPendingFixedValue`),g=OF(()=>{m.length&&(i.push(new kF(3,``,``,p(m),``,3)),m=``)},`maybeAddPartFromPendingFixedValue`),_=OF((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 kF(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 kF(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}OF(NF,`parse`);function PF(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,`\\$1`)}OF(PF,`escapeString`);function FF(e){return e&&e.ignoreCase?`ui`:`u`}OF(FF,`flags`);function IF(e,t,n){return RF(NF(e,n),t,n)}OF(IF,`stringToRegexp`);function LF(e){switch(e){case 0:return`*`;case 1:return`?`;case 2:return`+`;case 3:return``}}OF(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))}OF(RF,`partsToRegexp`);var zF={delimiter:``,prefixes:``,sensitive:!0,strict:!0},_re={delimiter:`.`,prefixes:``,sensitive:!0,strict:!0},vre={delimiter:`/`,prefixes:`/`,sensitive:!0,strict:!0};function BF(e,t){return e.length?e[0]===`/`?!0:!t||e.length<2?!1:(e[0]==`\\`||e[0]==`{`)&&e[1]==`/`:!1}OF(BF,`isAbsolutePathname`);function VF(e,t){return e.startsWith(t)?e.substring(t.length,e.length):e}OF(VF,`maybeStripPrefix`);function HF(e,t){return e.endsWith(t)?e.substr(0,e.length-t.length):e}OF(HF,`maybeStripSuffix`);function UF(e){return!e||e.length<2?!1:e[0]===`[`||(e[0]===`\\`||e[0]===`{`)&&e[1]===`[`}OF(UF,`treatAsIPv6Hostname`);var WF=[`ftp`,`file`,`http`,`https`,`ws`,`wss`];function GF(e){if(!e)return!0;for(let t of WF)if(e.test(t))return!0;return!1}OF(GF,`isSpecialScheme`);function KF(e,t){if(e=VF(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):``}OF(KF,`canonicalizeHash`);function qF(e,t){if(e=VF(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):``}OF(qF,`canonicalizeSearch`);function JF(e,t){return t||e===``?e:UF(e)?aI(e):iI(e)}OF(JF,`canonicalizeHostname`);function YF(e,t){if(t||e===``)return e;let n=new URL(`https://example.com`);return n.password=e,n.password}OF(YF,`canonicalizePassword`);function XF(e,t){if(t||e===``)return e;let n=new URL(`https://example.com`);return n.username=e,n.username}OF(XF,`canonicalizeUsername`);function ZF(e,t,n){if(n||e===``)return e;if(t&&!WF.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}OF(ZF,`canonicalizePathname`);function QF(e,t,n){return eI(t)===e&&(e=``),n||e===``?e:oI(e)}OF(QF,`canonicalizePort`);function $F(e,t){return e=HF(e,`:`),t||e===``?e:tI(e)}OF($F,`canonicalizeProtocol`);function eI(e){switch(e){case`ws`:case`http`:return`80`;case`wws`:case`https`:return`443`;case`ftp`:return`21`;default:return``}}OF(eI,`defaultPortForProtocol`);function tI(e){if(e===``)return e;if(/^[-+.A-Za-z0-9]*$/.test(e))return e.toLowerCase();throw TypeError(`Invalid protocol '${e}'.`)}OF(tI,`protocolEncodeCallback`);function nI(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.username=e,t.username}OF(nI,`usernameEncodeCallback`);function rI(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.password=e,t.password}OF(rI,`passwordEncodeCallback`);function iI(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}OF(iI,`hostnameEncodeCallback`);function aI(e){if(e===``)return e;if(/[^0-9a-fA-F[\]:]/g.test(e))throw TypeError(`Invalid IPv6 hostname '${e}'`);return e.toLowerCase()}OF(aI,`ipv6HostnameEncodeCallback`);function oI(e){if(e===``||/^[0-9]*$/.test(e)&&parseInt(e)<=65535)return e;throw TypeError(`Invalid port '${e}'.`)}OF(oI,`portEncodeCallback`);function sI(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)}OF(sI,`standardURLPathnameEncodeCallback`);function cI(e){return e===``?e:new URL(`data:${e}`).pathname}OF(cI,`pathURLPathnameEncodeCallback`);function lI(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.search=e,t.search.substring(1,t.search.length)}OF(lI,`searchEncodeCallback`);function uI(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.hash=e,t.hash.substring(1,t.hash.length)}OF(uI,`hashEncodeCallback`);var dI=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=tI;let t=IF(this.#O(),void 0,e);this.#l=GF(t)}};OF(dI,`Parser`);var fI=[`protocol`,`username`,`password`,`hostname`,`port`,`pathname`,`search`,`hash`],pI=`*`;function mI(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)}}OF(mI,`extractValues`);function hI(e,t){return t?_I(e):e}OF(hI,`processBaseURLString`);function gI(e,t,n){let r;if(typeof t.baseURL==`string`)try{r=new URL(t.baseURL),t.protocol===void 0&&(e.protocol=hI(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=hI(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=hI(r.password,n)),t.protocol===void 0&&t.hostname===void 0&&(e.hostname=hI(r.hostname,n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&(e.port=hI(r.port,n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&(e.pathname=hI(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=hI(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=hI(r.hash.substring(1,r.hash.length),n))}catch{throw TypeError(`invalid baseURL '${t.baseURL}'.`)}if(typeof t.protocol==`string`&&(e.protocol=$F(t.protocol,n)),typeof t.username==`string`&&(e.username=XF(t.username,n)),typeof t.password==`string`&&(e.password=YF(t.password,n)),typeof t.hostname==`string`&&(e.hostname=JF(t.hostname,n)),typeof t.port==`string`&&(e.port=QF(t.port,e.protocol,n)),typeof t.pathname==`string`){if(e.pathname=t.pathname,r&&!BF(e.pathname,n)){let t=r.pathname.lastIndexOf(`/`);t>=0&&(e.pathname=hI(r.pathname.substring(0,t+1),n)+e.pathname)}e.pathname=ZF(e.pathname,e.protocol,n)}return typeof t.search==`string`&&(e.search=qF(t.search,n)),typeof t.hash==`string`&&(e.hash=KF(t.hash,n)),e}OF(gI,`applyInit`);function _I(e){return e.replace(/([+*?:{}()\\])/g,`\\$1`)}OF(_I,`escapePatternString`);function vI(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,`\\$1`)}OF(vI,`escapeRegexpString`);function yI(e,t){t.delimiter??=`/#?`,t.prefixes??=`./`,t.sensitive??=!1,t.strict??=!1,t.end??=!0,t.start??=!0,t.endsWith=``;let n=`[^${vI(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+=_I(o.value);continue}i+=`{${_I(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+=_I(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+=_I(o.suffix),c&&(i+=`}`),o.modifier!==3&&(i+=LF(o.modifier))}return i}OF(yI,`partsToPattern`);var bI=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 dI(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},a={pathname:pI,protocol:pI,username:pI,password:pI,hostname:pI,port:pI,search:pI,hash:pI};this.#e=gI(a,e,!0),eI(this.#e.protocol)===this.#e.port&&(this.#e.port=``);let o;for(o of fI){if(!(o in this.#e))continue;let e={},t=this.#e[o];switch(this.#n[o]=[],o){case`protocol`:Object.assign(e,zF),e.encodePart=tI;break;case`username`:Object.assign(e,zF),e.encodePart=nI;break;case`password`:Object.assign(e,zF),e.encodePart=rI;break;case`hostname`:Object.assign(e,_re),UF(t)?e.encodePart=aI:e.encodePart=iI;break;case`port`:Object.assign(e,zF),e.encodePart=oI;break;case`pathname`:GF(this.#t.protocol)?(Object.assign(e,vre,i),e.encodePart=sI):(Object.assign(e,zF,i),e.encodePart=cI);break;case`search`:Object.assign(e,zF,i),e.encodePart=lI;break;case`hash`:Object.assign(e,zF,i),e.encodePart=uI;break}try{this.#i[o]=NF(t,e),this.#t[o]=RF(this.#i[o],this.#n[o],e),this.#r[o]=yI(this.#i[o],e),this.#a=this.#a||this.#i[o].some(e=>e.type===2)}catch{throw TypeError(`invalid ${o} pattern '${this.#e[o]}'.`)}}}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`?gI(n,e,!1):gI(n,mI(e,t),!1)}catch{return!1}let r;for(r of fI)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`?gI(n,e,!1):gI(n,mI(e,t),!1)}catch{return null}let r={};t?r.inputs=[e,t]:r.inputs=[e];let i;for(i of fI){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=OF((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 kF(3,``,``,``,``,3),a=new kF(0,``,``,``,``,3),o=OF((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}};OF(bI,`URLPattern`),globalThis.URLPattern||(globalThis.URLPattern=bI);function*yre(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 xI=V(`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 bre(e,t){let n=Dk(t.basketName);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.BasketLoadUnload:return e.program===`LOAD`?`${n} Load`:`${n} Unload`;case Y.BasketCycle:return`${n} Cycle`;case Y.BasketInLocation:return e.startofcycle?`Depart`:`Arrive`;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 SI(e){return e.details?.PalletCycleInvalidated===`1`}function CI(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 wI(e){return e.length>1?`${e[0].part} x${e.length}`:e.length===1?e[0].part:``}function xre(e,t){let n=e.entry;switch(n.type){case Y.LoadUnloadCycle:return(0,R.jsxs)(`span`,{children:[CI(n.material),` on `,(0,R.jsxs)(xI,{$type:`pallet`,children:[`pallet `,n.pal]}),` at`,` `,(0,R.jsx)(xI,{$type:`loadStation`,children:Tk(n.locnum,t.loadStationNames)})]});case Y.BasketLoadUnload:{let e=Dk(t.basketName);return(0,R.jsxs)(`span`,{children:[CI(n.material),` `,n.program===`LOAD`?`loaded onto`:`unloaded from`,` `,(0,R.jsxs)(xI,{$type:`pallet`,children:[e,` `,n.pal]}),` `,`at`,` `,(0,R.jsx)(xI,{$type:`loadStation`,children:Tk(n.locnum,t.loadStationNames)})]})}case Y.BasketCycle:{let e=Dk(t.basketName);return n.startofcycle?(0,R.jsxs)(`span`,{children:[e,` `,n.pal,` started cycle`]}):(0,R.jsxs)(`span`,{children:[e,` `,n.pal,` completed cycle`]})}case Y.BasketInLocation:{let e=Dk(t.basketName);return n.startofcycle?(0,R.jsxs)(`span`,{children:[e,` `,n.pal,` departed from `,n.loc,n.locnum>0?` position ${n.locnum}`:``]}):(0,R.jsxs)(`span`,{children:[e,` `,n.pal,` arrived at `,n.loc,n.locnum>0?` position ${n.locnum}`:``]})}case Y.MachineCycle:return(0,R.jsxs)(`span`,{children:[CI(n.material),` on `,(0,R.jsxs)(xI,{$type:`pallet`,children:[`pallet `,n.pal]}),` at`,` `,(0,R.jsxs)(xI,{$type:`machine`,children:[n.loc,` `,n.locnum.toString()]}),n.program&&n.program!==``?(0,R.jsxs)(`span`,{children:[` with program `,n.program]}):void 0]});case Y.PartMark:return(0,R.jsxs)(`span`,{children:[CI(n.material),` marked with `,n.result]});case Y.OrderAssignment:return(0,R.jsxs)(`span`,{children:[CI(n.material),` assigned to workorder `,n.result]});case Y.PalletCycle:return n.startofcycle?(0,R.jsxs)(`span`,{children:[`Pallet `,n.pal,` started route`]}):(0,R.jsxs)(`span`,{children:[`Pallet `,n.pal,` completed route`]});case Y.Inspection:{let e=(n.details||{}).InspectionType||``;return n.result.toLowerCase()===`true`||n.result===`1`?(0,R.jsxs)(`span`,{children:[CI(n.material),` signaled for inspection`,` `,(0,R.jsx)(xI,{$type:`inspectionSignaled`,children:e})]}):(0,R.jsxs)(`span`,{children:[CI(n.material),` skipped inspection`,` `,(0,R.jsx)(xI,{$type:`inspectionNotSignaled`,children:e})]})}case Y.InspectionForce:{let e=n.program;return n.result.toLowerCase()===`true`||n.result===`1`?(0,R.jsxs)(`span`,{children:[CI(n.material),` declared for inspection`,` `,(0,R.jsx)(xI,{$type:`inspectionSignaled`,children:e})]}):(0,R.jsxs)(`span`,{children:[CI(n.material),` passed over for inspection`,` `,(0,R.jsx)(xI,{$type:`inspectionNotSignaled`,children:e})]})}case Y.WorkorderComment:return(0,R.jsxs)(`span`,{children:[`Workorder `,n.result,` Comment`]});case Y.InspectionResult:return n.result.toLowerCase()===`false`?(0,R.jsxs)(xI,{$type:`inspectionSignaled`,children:[n.program,` Failed`]}):(0,R.jsxs)(xI,{$type:`inspectionSignaled`,children:[n.program,` Succeeded`]});case Y.CloseOut:return n.result.toLowerCase()===`failed`?(0,R.jsxs)(xI,{$type:`closeoutFailed`,children:[n.program&&n.program!==``?n.program:`CloseOut`,` Failed`]}):(0,R.jsxs)(`span`,{children:[n.program&&n.program!==``?n.program:`CloseOut`,` Completed`]});case Y.AddToQueue:switch(n.program){case`Unloaded`:return(0,R.jsxs)(`span`,{children:[wI(n.material),` unloaded into queue`,` `,(0,R.jsx)(xI,{$type:`queue`,children:n.loc})]});case`SetByOperator`:return(0,R.jsxs)(`span`,{children:[wI(n.material),` set manually into queue`,` `,(0,R.jsx)(xI,{$type:`queue`,children:n.loc})]});case`Quarantine`:return(0,R.jsxs)(`span`,{children:[wI(n.material),` quarantined into queue`,` `,(0,R.jsx)(xI,{$type:`queue`,children:n.loc})]});case`SwapMaterial`:return(0,R.jsxs)(`span`,{children:[wI(n.material),` swapped off pallet into queue`,` `,(0,R.jsx)(xI,{$type:`queue`,children:n.loc})]});case`MaterialMissingOnPallet`:return(0,R.jsxs)(`span`,{children:[wI(n.material),` removed from cell controller, added to queue`,` `,(0,R.jsx)(xI,{$type:`queue`,children:n.loc})]});default:return(0,R.jsxs)(`span`,{children:[wI(n.material),` added to queue`,` `,(0,R.jsx)(xI,{$type:`queue`,children:n.loc}),n.program&&n.program!==``?` (`+n.program+`)`:void 0]})}case Y.RemoveFromQueue:return(0,R.jsxs)(`span`,{children:[wI(n.material),` removed from queue`,` `,(0,R.jsx)(xI,{$type:`queue`,children:n.loc})]});case Y.PalletInStocker:return n.startofcycle?(0,R.jsxs)(`span`,{children:[(0,R.jsxs)(xI,{$type:`pallet`,children:[`Pallet `,n.pal]}),` arrived at stocker `,n.locnum]}):(0,R.jsxs)(`span`,{children:[(0,R.jsxs)(xI,{$type:`pallet`,children:[`Pallet `,n.pal]}),` departed stocker `,n.locnum]});case Y.PalletOnRotaryInbound:return n.startofcycle?(0,R.jsxs)(`span`,{children:[(0,R.jsxs)(xI,{$type:`pallet`,children:[`Pallet `,n.pal]}),` arrived at`,` `,(0,R.jsxs)(xI,{$type:`machine`,children:[n.loc,` `,n.locnum.toString()]})]}):n.result==`RotateIntoWorktable`?(0,R.jsxs)(`span`,{children:[(0,R.jsxs)(xI,{$type:`pallet`,children:[`Pallet `,n.pal]}),` rotated into`,` `,(0,R.jsxs)(xI,{$type:`machine`,children:[n.loc,` `,n.locnum.toString()]}),` `,`worktable`]}):(0,R.jsxs)(`span`,{children:[(0,R.jsxs)(xI,{$type:`pallet`,children:[`Pallet `,n.pal]}),` left`,` `,(0,R.jsxs)(xI,{$type:`machine`,children:[n.loc,` `,n.locnum.toString()]})]});case Y.SignalQuarantine:return(0,R.jsxs)(`span`,{children:[CI(n.material),` signaled for quarantine after unload`]});case Y.SwapMaterialOnPallet:return(0,R.jsx)(`span`,{children:n.result});case Y.InvalidateCycle:return(0,R.jsx)(`span`,{children:n.result});case Y.Rebooking:return(0,R.jsxs)(`span`,{children:[`Rebooking requested with ID `,n.result]});case Y.CancelRebooking:return(0,R.jsxs)(`span`,{children:[`Rebooking `,n.result,` canceled`]});default:return(0,R.jsx)(`span`,{children:n.result})}}function Sre(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=nk(n.toolUseDuringCycle).toFixed(1)+` minutes used during cycle.`,n.totalToolUseAtEndOfCycle&&n.configuredToolLife&&n.totalToolUseAtEndOfCycle!==``&&n.configuredToolLife!==``)){let t=tk(n.totalToolUseAtEndOfCycle),r=tk(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 Cre=[Y.AddToQueue,Y.RemoveFromQueue,Y.LoadUnloadCycle,Y.BasketLoadUnload,Y.MachineCycle],wre=V(Ab,{shouldForwardProp:e=>e.toString()[0]!==`$`})(({$highlightProc:e,$invalidCycle:t})=>({...e&&{backgroundColor:`#eeeeee`},...t&&{textDecoration:`line-through`}})),Tre=(0,L.memo)(function(e){let t=Sre(e.entry),n=e.highlightProcsGreaterOrEqualTo,r=Q(EO);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(wre,{$highlightProc:n!==void 0&&e.entry.material.findIndex(e=>e.proc>=n)>=0&&Cre.indexOf(e.entry.type)>=0,$invalidCycle:SI(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:bre(e.entry,r)}),(0,R.jsx)(J,{size:`small`,children:xre(e,r)}),(0,R.jsx)(J,{padding:`checkbox`,children:t.length>0?(0,R.jsx)(ru,{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)(Mx,{fontSize:`inherit`})}):void 0})]}),t.length>0&&e.entry.counter===e.detailLogCounter?(0,R.jsx)(Ab,{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]})}),TI=(0,L.memo)(function(e){let[t,n]=(0,L.useState)(null);return(0,R.jsxs)(Yy,{children:[(0,R.jsx)(vb,{children:(0,R.jsxs)(Ab,{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)(ru,{onClick:()=>wA(e.entries),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,R.jsx)($x,{})})}):void 0})]})}),(0,R.jsx)(nb,{children:Array.from(yre(e.entries)).map((r,i)=>(0,R.jsx)(Tre,{entry:r,detailLogCounter:t,setDetail:n,highlightProcsGreaterOrEqualTo:e.highlightProcsGreaterOrEqualTo},i))})]})}),EI=Z(null),DI=Z(e=>e(EI),(e,t,n)=>{n===null?(t(EI,null),t(FI,[])):t(EI,n)}),OI=Z(async e=>{let t=e(EI);if(t&&t.type===`Barcode`){if(kC===void 0)return null;let n=e(YI),r=t.toQueue?[t.toQueue]:n.route===$.Station_LoadMonitor||n.route===$.Station_Queues?n.queues:null;return await kC.parseBarcode(t.barcode,r)}else return null}),kI=Z(async e=>(await e(OI))?.potentialNewMaterial??null),AI=Z(async e=>{let t=e(EI);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(OI);return t?.existingMaterial&&t.existingMaterial.materialID>=0?t.existingMaterial:null}case`ManuallyEnteredSerial`:case`AddMatWithEnteredSerial`:return jC===void 0?null:(await jC.materialForSerial(t.serial))?.[0]??null}}),jI=BO(AI,e=>e??null),MI=Z(async e=>{let t=e(GO),n=e(EI);if(n===null)return null;if(n.type===`InProcMat`)return n.inproc;let r=(await e(AI))?.materialID??null;return r!==null&&r>=0?t.material.find(e=>e.materialID===r)??null:null}),NI=Z(async e=>{let t=e(EI);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(OI);return t?.existingMaterial?.serial??t?.potentialNewMaterial?.serial??null}case`ManuallyEnteredSerial`:case`AddMatWithEnteredSerial`:return t.serial}}),Ere=BO(NI,e=>e??null),PI=Z(async e=>{let t=e(EI);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(OI);return t?.existingMaterial?.workorder??t?.potentialNewMaterial?.workorder??null}case`ManuallyEnteredSerial`:case`AddMatWithEnteredSerial`:return null}}),FI=Z([]),Dre=BO(Z(async(e,{signal:t})=>{let n=await e(AI);return n===null||jC===void 0?[]:n.materialID>=0?await jC.logForMaterial(n.materialID,t):n.serial&&n.serial!==``?await jC.logForSerial(n.serial):[]}),e=>e??[]),Ore=BO(Z(async(e,{signal:t})=>{let n=await e(NI);if(n===null||n===``)return[];let r=[];for(let e of PC)r.push.apply(await e.logForSerial(n,t));return r}),e=>e??[]),II=Z(e=>{let t=e(FI);return X.of(e(Dre)).concat(e(Ore)).sortBy(e=>e.endUTC.getTime(),e=>e.counter).concat(t).toRArray()}),LI=Z(async e=>{let t=await e(AI);if(t===null)return null;let n=e(II),r=X.of(n).filter(e=>!SI(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}),RI=Z(e=>{let t=e(EI),n=e(II);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)}}),kre=Z(async e=>{let t=await e(AI);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 zI(){let[e,t]=(0,L.useState)(!1),n=qE(FI);return[(0,L.useCallback)(e=>{t(!0),jC.setInspectionDecision(e.mat.materialID,e.inspType,1,e.inspect).then(e=>n(t=>[...t,e])).catch(console.log).finally(()=>t(!1))},[n]),e]}function Are(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(e=>{t(!0),jC.recordInspectionCompleted(new _ne({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 BI(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(e=>{t(!0),jC.recordCloseoutCompleted(new vne({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 VI(){let[e,t]=(0,L.useState)(!1),n=qE(FI);return[(0,L.useCallback)((e,r)=>{t(!0),jC.setWorkorder(e.materialID,1,r).then(e=>n(t=>[...t,e])).catch(console.log).finally(()=>t(!1))},[n]),e]}function jre(){let[e,t]=(0,L.useState)(!1),n=qE(FI);return[(0,L.useCallback)(e=>{t(!0),jC.recordOperatorNotes(e.matId,e.process,e.operator,e.notes).then(e=>n(t=>[...t,e])).catch(console.log).finally(()=>t(!1))},[n]),e]}function HI(){let[e,t]=(0,L.useState)(!1),[n,r]=(0,L.useState)(!1);return[(0,L.useCallback)(e=>{t(!0),kC.printLabel(e.materialId,e.proc).catch(console.log).finally(()=>{t(!1),r(!0)})},[]),e,n]}function Mre(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)((e,n)=>{t(!0),AC.removeMaterialFromAllQueues(e,n??void 0).catch(console.log).finally(()=>t(!1))},[]),e]}function Nre(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)((e,n,r)=>{t(!0),AC.signalMaterialForQuarantine(e,n,r===``?void 0:r).catch(console.log).finally(()=>t(!1))},[]),e]}function UI(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(e=>{t(!0),AC.setMaterialInQueue(e.materialId,e.operator,new hne({queue:e.queue,position:e.queuePosition})).catch(console.log).finally(()=>t(!1))},[]),e]}function Pre(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(e=>{t(!0),AC.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 WI(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(e=>{t(!0),AC.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_BasketCycles=`/analysis/basket-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}({}),Fre=X.ofObject($).map(([,e])=>[e,new URLPattern(e,location.origin)]).append([`/operations/recent-schedules`,new URLPattern(`/operations/completed`,location.origin)]).append([`/station/closeout`,new URLPattern(`/station/wash`,location.origin)]).toRArray();function GI(e){switch(e.route){case`/station/loadunload/:num`: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/inspection/:type`: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/current-workorders`: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 KI(e){for(let[t,n]of Fre){let r=n.exec(e.origin+e.pathname)?.pathname?.groups;if(r)switch(t){case`/station/loadunload/:num`:return{route:t,loadNum:parseInt(r.num??`1`),queues:e.searchParams.getAll(`queue`),completed:e.searchParams.has(`completed`)};case`/station/inspection/:type`:{let e=r.type;return e?{route:`/station/inspection/:type`,inspType:e}:{route:`/station/inspection`}}case`/station/queues`:return{route:`/station/queues`,queues:e.searchParams.getAll(`queue`)};case`/operations/current-workorders`:return{route:`/operations/current-workorders`,workorder:e.searchParams.get(`workorder`)??void 0};case`/client/:custom+`:return{route:`/client/:custom+`,custom:r?.custom?.split(`/`)?.map(e=>decodeURIComponent(e))??[]};default:return{route:t}}}return{route:`/`}}var qI=Z(KI(new URL(location.href))),JI=Z(!1),YI=Z(e=>e(qI),(e,t,n)=>{let r=e(JI);t(qI,n),t(DI,null),r||history.pushState(null,``,GI(n))});function Ire({to:e,children:t}){let n=qE(YI);return(0,L.createElement)(Ig,{href:GI(e),onClick:t=>{t.preventDefault(),t.stopPropagation(),n(e)}},t)}function Lre(){let e=Q(JI),t=qE(qI);(0,L.useEffect)(()=>{if(e)return;function n(){t(KI(new URL(location.href)))}return addEventListener(`popstate`,n),()=>removeEventListener(`popstate`,n)},[e,t])}function XI(){return Q(JI)}function ZI(e){(0,L.useEffect)(()=>{document.title=e+` - FMS Insight`},[XI(),e])}function Rre(e){switch(e.route){case`/station/loadunload/:num`:case`/station/inspection`:case`/station/inspection/:type`:case`/station/closeout`:case`/station/queues`:case`/station/overview`:return`https://www.seedtactics.com/docs/fms-insight/client-station-monitor`;case`/operations`:case`/operations/load-outliers`:case`/operations/load-hours`:case`/operations/load-cycles`:case`/operations/system-overview`:case`/operations/material`:case`/operations/recent-schedules`:case`/operations/current-workorders`:case`/operations/closeout`:case`/operations/recent-production`:case`/analysis/rebookings`:case`/operations/parts`:return`https://www.seedtactics.com/docs/fms-insight/client-operations`;case`/operations/machine-outliers`:case`/operations/machine-hours`:case`/operations/machine-cycles`: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`:case`/engineering/outliers`:case`/engineering/hours`:return`https://www.seedtactics.com/docs/fms-insight/client-engineering`;case`/quality`:case`/quality/paths`:case`/quality/quarantine`:return`https://www.seedtactics.com/docs/fms-insight/client-quality`;case`/tools`:case`/tools/programs`:return`https://www.seedtactics.com/docs/fms-insight/client-tools-programs`;case`/analysis/schedules`:case`/analysis/buffers`:case`/analysis/station-oee`:case`/analysis/parts-completed`:case`/analysis/machine-cycles`:case`/analysis/load-cycles`:case`/analysis/pallet-cycles`:case`/analysis/quality`:case`/analysis/cost-percents`:case`/analysis/tool-replacements`:case`/analysis/cost`:return`https://www.seedtactics.com/docs/fms-insight/client-efficiency`;case`/sales`:case`/sales/projected-usage`:return`https://www.seedtactics.com/docs/fms-insight/client-sales`;default:return`https://www.seedtactics.com/docs/fms-insight/client-launch`}}var QI=new Intl.NumberFormat(void 0,{style:`percent`,minimumFractionDigits:1});function zre(){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 $I=(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(zre()),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)(kg,{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:QI.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)(kg,{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:QI.format(n/r)})})]})})});function Bre(){let{ref:e,width:t,height:n}=UA({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)($I,{})}),(0,R.jsx)(`div`,{ref:e,style:{flexGrow:1,overflow:`hidden`,margin:`8px`},children:t&&n&&(0,R.jsx)(DF,{width:t,height:n})})]})}function Vre(){let{ref:e,width:t}=UA({refreshMode:`debounce`,refreshRate:100,handleHeight:!1});return(0,R.jsxs)(`main`,{style:{padding:`8px`},children:[(0,R.jsx)($I,{}),(0,R.jsx)(`div`,{ref:e,style:{overflow:`hidden`},children:t&&(0,R.jsx)(DF,{width:t,height:500})})]})}function Hre(){return ZI(`Dashboard`),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(G,{sx:{display:{xs:`none`,md:`block`}},children:(0,R.jsx)(Bre,{})}),(0,R.jsx)(G,{sx:{display:{xs:`block`,md:`none`}},children:(0,R.jsx)(Vre,{})})]})}var eL=Z([]),tL=eL,nL=Z([]),Ure=nL;function*rL(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+=nk(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 Wre=Z(null,(e,t,n)=>{t(eL,e=>[...e,...rL(Object.values(n.jobs))])}),Gre=Z(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.newJobs){let e=n.newJobs.jobs;t(eL,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,...rL(e)]})}}),Kre=Z(null,(e,t,n)=>{t(nL,Array.from(rL(Object.values(n.jobs))))}),iL=Z(eE.empty()),qre=iL,aL=Z(eE.empty()),Jre=aL;function oL(e){if(e.elapsed===``)return null;let t=tk(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 Yre=Z(null,(e,t,n)=>{t(iL,e=>e.union(X.of(n).collect(oL).toHashMap(e=>e)))}),Xre=Z(null,(e,t,{evt:n,now:r,expire:i})=>{if(!n.logEntry)return;let a=oL(n.logEntry);a&&t(iL,e=>{if(i){let t=VC(r,-30);e=e.filter(e=>e.endTime>=t)}return e.set(a[0],a[1])})}),Zre=Z(null,(e,t,n)=>{t(aL,X.of(n).collect(oL).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 hT(this.part,this.inspType)}toString(){return`{part: ${this.part}}, inspType: ${this.inspType}}`}},lL=Z(eE.empty()),uL=lL,dL=Z(eE.empty()),Qre=dL;function fL(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=Array.isArray(n)?n:[],i=[];for(let e of r)i.push(BS.fromJS(e));let a=(e.details||{}).InspectionType||``,o;return o=e.result.toLowerCase()===`true`||e.result===`1`,{key:new cL(t.part,a),entry:{cntr:e.counter,time:e.endUTC,materialID:t.id,serial:t.serial,workorder:t.workorder,result:{type:0,actualPath:i,toInspect:o},part:t.part,inspType:a}}}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:1,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:2,success:n},part:t.part,inspType:e.program}}}})}var $re=Z(null,(e,t,n)=>{t(lL,e=>e.union(X.of(n).flatMap(fL).toLookupMap(e=>e.key,e=>e.entry.cntr,e=>e.entry),(e,t)=>e.union(t)))}),eie=Z(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.logEntry){let e=fL(n.logEntry);if(e.length===0)return;t(lL,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(lL,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}))}}),tie=Z(null,(e,t,n)=>{t(dL,X.of(n).flatMap(fL).toLookupMap(e=>e.key,e=>e.entry.cntr,e=>e.entry))}),pL=Z({matsById:eE.empty(),matIdsForJob:eE.empty()}),mL=pL,hL=Z({matsById:eE.empty(),matIdsForJob:eE.empty()}),gL=hL;function _L(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 vL(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 nie(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 rie(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 iie=Z(null,(e,t,n)=>{t(pL,e=>n.reduce(vL,e))}),aie=Z(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.logEntry){let e=n.logEntry;t(pL,t=>{let n=vL(t,e);return n===t||!i?t:nie(VC(r,-30),n)})}else if(n.editMaterialInLog){let e=n.editMaterialInLog;t(pL,t=>rie(e,t))}}),oie=Z(null,(e,t,n)=>{t(hL,n.reduce(vL,{matsById:eE.empty(),matIdsForJob:eE.empty()}))}),yL=Z(new Set),bL=yL,xL=Z(new Set),sie=xL,SL=Z(new Set),cie=SL,CL=Z(new Set),wL=CL,lie=Z(null,(e,t,{evt:n})=>{n.newJobs?TL(t,n.newJobs.jobs):n.logEntry?DL(t,[n.logEntry]):n.newCurrentStatus&&EL(e,t,n.newCurrentStatus)}),uie=Z(null,(e,t,n)=>{TL(t,Object.values(n.jobs))}),die=Z(null,(e,t,n)=>DL(t,n)),fie=Z(null,EL);function TL(e,t){e(SL,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 EL(e,t,n){TL(t,Object.values(n.jobs));let r=e(yL),i=e(xL),a=new Set,o=new Set;for(let[e,t]of X.ofObject(n.queues))t.role===gC.RawMaterial?r.has(e)||a.add(e):t.role===gC.InProcessTransfer&&(i.has(e)||o.add(e));a.size>0&&t(yL,new Set([...r,...a])),o.size>0&&t(xL,new Set([...i,...o]))}function DL(e,t){e(CL,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 OL=Z(eE.empty()),kL=OL;function AL(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(rk.ofLogCycle(e)):void 0,i=nk(e.elapsed);if(r===void 0||ck(r,i))return n;let a=rk.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!==``?nk(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(wk(e.loc,e.locnum)),recentCycles:n}}else return{machines:JT.empty().add(wk(e.loc,e.locnum)),recentCycles:[{tools:o}]}})}var pie=Z(null,(e,t,n)=>{let r=e(ak);t(OL,e=>n.reduce((e,t)=>AL(t,r,e),e))}),mie=Z(null,(e,t,{evt:n})=>{if(n.logEntry){let r=n.logEntry,i=e(ak);t(OL,e=>AL(r,i,e))}}),jL=Z(eE.empty()),ML=jL,NL=Z(eE.empty()),PL=NL;function FL(e){return{cntr:e.counter,x:e.endUTC,y:nk(e.elapsed),active:nk(e.active),mats:e.material}}var hie=Z(null,(e,t,n)=>{t(jL,e=>e.union(X.of(n).filter(e=>!e.startofcycle&&e.type===Y.PalletCycle&&e.pal!==0).toLookupMap(e=>e.pal,e=>e.counter,FL),(e,t)=>e.union(t)))}),gie=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(jL,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??eE.empty()).set(e.counter,FL(e)))})}}),_ie=Z(null,(e,t,n)=>{t(NL,X.of(n).filter(e=>!e.startofcycle&&e.type===Y.PalletCycle&&e.pal!==0).toLookupMap(e=>e.pal,e=>e.counter,FL))}),IL=Z(eE.empty()),LL=IL,vie=Z(e=>e(IL).size>0),RL=Z(eE.empty()),zL=RL,yie=Z(e=>e(RL).size>0);function BL(e){return{cntr:e.counter,x:e.endUTC,y:nk(e.elapsed),active:nk(e.active),mats:e.material}}var bie=Z(null,(e,t,n)=>{t(IL,e=>e.union(X.of(n).filter(e=>!e.startofcycle&&e.type===Y.BasketCycle&&e.pal!==0).toLookupMap(e=>e.pal,e=>e.counter,BL),(e,t)=>e.union(t)))}),xie=Z(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.logEntry&&!n.logEntry.startofcycle&&n.logEntry.type===Y.BasketCycle&&n.logEntry.pal!==0){let e=n.logEntry;t(IL,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??eE.empty()).set(e.counter,BL(e)))})}}),Sie=Z(null,(e,t,n)=>{t(RL,X.of(n).filter(e=>!e.startofcycle&&e.type===Y.BasketCycle&&e.pal!==0).toLookupMap(e=>e.pal,e=>e.counter,BL))}),Cie=class e{constructor(e,t){this.group=e,this.num=t}static ofLogCycle(t){return new e(t.loc,t.locnum)}hash(){return hT(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()}},VL={replacements:XT.empty(),recentUse:eE.empty()},HL=Z(VL),UL=Z(e=>e(HL).replacements),WL=Z(VL),GL=Z(e=>e(WL).replacements);function KL(e,t){let n=Cie.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?nk(r.toolUseDuringCycle):null,a=r.totalToolUseAtEndOfCycle!==null&&r.totalToolUseAtEndOfCycle!==void 0?nk(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?nk(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?nk(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 qL=Z(null,(e,t,n)=>{t(HL,e=>X.of(n).filter(e=>e.type===Y.MachineCycle&&!e.startofcycle&&!!e.tooluse&&e.tooluse.length>0).fold(e,KL))}),JL=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(HL,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 KL(t,e)})}}),YL=Z(null,(e,t,n)=>{t(WL,X.of(n).filter(e=>e.type===Y.MachineCycle&&!e.startofcycle&&!!e.tooluse&&e.tooluse.length>0).fold(VL,KL))}),XL=Z(null),ZL=XL;function QL(e,t,n,r){let i=e(ZL);(i===null||i.simId<n)&&t(XL,{simId:n,usage:r})}var $L=Z(null,(e,t,n)=>{!n.mostRecentSimulationId||!n.mostRecentSimDayUsage||n.mostRecentSimDayUsage.length===0||QL(e,t,n.mostRecentSimulationId,n.mostRecentSimDayUsage)}),eR=Z(null,(e,t,{evt:n})=>{n.newJobs&&n.newJobs.simDayUsage&&n.newJobs.simDayUsage.length>0&&QL(e,t,n.newJobs.scheduleId,n.newJobs.simDayUsage)}),tR=Z(XT.empty()),nR=BO(Z(async(e,{signal:t})=>{if(AC===void 0)return XT.empty();let n=await AC.unscheduledRebookings(t);return XT.build(n,e=>e.bookingId)}),e=>e??XT.empty()),rR=Z(e=>{let t=e(tR),n=e(nR);return t.union(n,(e,t)=>e??t)}),iR=Z(XT.empty()),aR=iR,oR=Z(XT.empty()),sR=oR;function cR(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 lR=Z(null,(e,t,n)=>{t(tR,e=>e.union(X.of(n).filter(e=>e.type===Y.Rebooking).toOrderedMap(e=>[e.result,cR(e)]))),t(iR,e=>e.union(X.of(n).filter(e=>e.type===Y.CancelRebooking).toOrderedMap(e=>[e.result,e.endUTC])))});function uR(e,t,n){e(oR,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 dR=Z(null,(e,t,n)=>{uR(t,X.ofObject(n.jobs).map(([,e])=>e))}),fR=Z(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.newJobs)uR(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(tR,t=>t.set(e.result,cR(e))):e.type===Y.CancelRebooking&&t(iR,t=>t.set(e.result,e.endUTC))}});function pR(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(e=>(t(!0),jC.cancelRebooking(e).then(()=>{}).catch(console.log).finally(()=>t(!1))),[]),e]}function mR(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(e=>(t(!0),jC.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 hR=Z(null),gR=hR,_R=Z(null,(e,t,n)=>{if(t(Gre,n),t(jA,n),t(iD,n),t(Xre,n),t(XO,n),t(aie,n),t(eie,n),t(lie,n),t(mie,n),t(gie,n),t(xie,n),t(JL,n),t(Vk,n),t(fR,n),t(eR,n),n.evt.logEntry){let e=n.evt.logEntry.counter;t(hR,t=>t===null?t:Math.max(t,e))}}),vR=Z(null,(e,t,n)=>{let r=nD(e($E),n);t(AA,r),t(Wre,r),t(rD,r),t(uie,r),t($L,r),t(dR,r)}),yR=Z(null,(e,t,n)=>{t(gk,n),t(Yre,n),t($re,n),t(iie,n),t(die,n),t(pie,n),t(hie,n),t(bie,n),t(qL,n),t(Bk,n),t(lR,n);let r=X.of(n).maxBy(e=>e.counter)?.counter??null;t(hR,e=>e===null?r:Math.max(e,r??-1))}),bR=Z(null,(e,t,n)=>{t(YO,n),t(fie,n)}),xR=Z(null,(e,t,n)=>{t(MA,n),t(Kre,n),t(aD,n)}),SR=Z(null,(e,t,n)=>{t(_k,n),t(Zre,n),t(tie,n),t(oie,n),t(_ie,n),t(Sie,n),t(YL,n),t(Hk,n)}),CR=Z(`Last30`),wR=Z(aw(new Date)),TR=Z(e=>e(wR),(e,t,n)=>{t(CR,`SpecificMonth`),t(wR,n),e(DR)!==n&&!e(OR)&&MR(n,t)}),ER=Z(e=>e(CR)===`Last30`?{type:`Last30`}:{type:`SpecificMonth`,month:e(wR)}),DR=Z(null),OR=Z(!1),kR=OR,AR=Z(null),jR=AR;function MR(e,t){t(OR,!0),t(AR,null);let n=HC(e,1),r=AC.history(e,n).then(e=>t(xR,e)),i=jC.get(e,n).then(e=>t(SR,e));Promise.all([r,i]).then(()=>t(DR,e)).catch(e=>t(AR,e.message??`Error`)).finally(()=>t(OR,!1))}function NR(){let e=qE(CR);return()=>e(`Last30`)}function PR(){return qE(wR)}function FR(e){return bk(e)&&e.operation===`UNLOAD`}function IR(e){return Object.prototype.hasOwnProperty.call(e,`month`)}function LR(e,t,n,r){let i=IR(r)?r.month:r.thirtyDaysAgo,a=IR(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(FR(e)&&(o+=1),vk(e))c+=e.activeMinutes;else if(yk(e)){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=>yk(e)).buildOrderedMap(e=>e.stationGroup,(e,t)=>(e??0)+t.activeMinutes).mapValues((e,t)=>e/(s.get(t)??1)),labor:X.of(t).filter(e=>vk(e)).sumBy(e=>e.activeMinutes/c),automation:o>0?t.reduce((e,t)=>FR(t)?e+1:e,0)/o:0})).toRArray(),machineQuantities:X.of(l).toOrderedMap(([e,t])=>[e,t.size]),type:r}}function RR(e,t,n,r){let i=IR(e.type)?Pne(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 zR(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 BR(e){oA(zR(e))}function VR(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 HR(e){oA(VR(e))}function UR(e,t,n){return parseInt(e.substr(t,n),16)}function WR(e){return e|=0,e<0?`00`:e<16?`0`+e.toString(16):e<256?e.toString(16):`ff`}function GR(e,t,n){return n=n<0?n+6:n>6?n-6:n,WR(255*(n<1?e+(t-e)*n:n<3?t:n<4?e+(t-e)*(4-n):e))}function KR(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 qR(e,t,n){let r;if(t==0){let e=WR(n*255);r=e+e+e}else{let i=n<=.5?n*(t+1):n+t-n*t,a=n*2-i;r=GR(a,i,e*6+2)+GR(a,i,e*6)+GR(a,i,e*6-2)}return`#`+r}function JR(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,qR(e,t,n)}var YR=typeof window<`u`?window:typeof self<`u`?self:typeof global<`u`?global:{},XR={V:`jdenticon_config`,n:`config`},ZR={};function QR(e,t){let n=typeof e==`object`&&e||ZR[XR.n]||YR[XR.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:KR(s),X:typeof e==`number`?e:typeof c==`number`?c:t}}var $R=class{constructor(e,t){this.x=e,this.y=t}},ez=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 $R(i-t-(r||0),this.t+e):o===2?new $R(i-e-(n||0),a-t-(r||0)):o===3?new $R(this.q+t,a-e-(n||0)):new $R(this.q+e,this.t+t)}},tz=new ez(0,0,0,0),nz=class{constructor(e){this.J=e,this.u=tz}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 rz(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 iz(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 az(e,t){return e=t.W(e),[JR(e,t.D,t.F(0)),JR(e,t.o,t.p(.5)),JR(e,t.D,t.F(1)),JR(e,t.o,t.p(1)),JR(e,t.o,t.p(0))]}function oz(e,t,n){let r=QR(n,.08);r.G&&e.m(r.G);let i=e.k,a=.5+i*r.X|0;i-=a*2;let o=new nz(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=UR(t,i,1),m=a?UR(t,a,1):0;e.L(d[f[n]]);for(let e=0;e<u.length;e++)o.u=new ez(c+u[e][0]*s,l+u[e][1]*s,s,m++%4),r(p,o,s,e);e.M()}let d=az(UR(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=UR(t,8+e,1)%d.length,(m([0,4])||m([2,3]))&&(p=1),f.push(p);u(0,iz,2,3,[[1,0],[2,0],[2,3],[1,3],[0,1],[3,1],[3,2],[0,2]]),u(1,iz,4,5,[[0,0],[3,0],[3,3],[0,3]]),u(2,rz,1,null,[[1,1],[2,1],[2,2],[1,2]]),e.finish()}function sz(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 cz(e){return/^[0-9a-f]{11,}$/i.test(e)&&e}function lz(e){return sz(e==null?``:``+e)}typeof document<`u`&&document.querySelectorAll.bind(document);function uz(e){return(e*10+.5|0)/10}var dz=class{constructor(){this.v=``}g(e){let t=``;for(let n=0;n<e.length;n++)t+=(n?`L`:`M`)+uz(e[n].x)+` `+uz(e[n].y);this.v+=t+`Z`}h(e,t,n){let r=+!n,i=uz(t/2),a=uz(t),o=`a`+i+`,`+i+` 0 1,`+r+` `;this.v+=`M`+uz(e.x)+` `+uz(e.y+t/2)+o+a+`,0`+o+-a+`,0`}},fz=class{constructor(e){this.A,this.B={},this.O=e,this.k=e.k}m(e){let t=/^(#......)(..)?/.exec(e),n=t[2]?UR(t[2],0)/255:1;this.O.m(t[1],n)}L(e){this.A=this.B[e]||(this.B[e]=new dz)}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)}},pz={R:`http://www.w3.org/2000/svg`,S:`width`,T:`height`},mz=class{constructor(e){this.k=e,this.C=`<svg xmlns="`+pz.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 hz(e,t,n){let r=new mz(t);return oz(new fz(r),cz(e)||lz(e),n),r.toString()}function gz(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 _z=(e,t,n)=>{let r=e===1?t:t+`s`;return e+` `+r+` `+n};function vz(){return vz=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},vz.apply(null,arguments)}var yz=60,bz=yz*60,xz=bz*24,Sz=xz*7,Cz=xz*30,wz=xz*365,Tz=()=>Date.now();function Ez({date:e,formatter:t,component:n=`time`,live:r=!0,minPeriod:i=0,maxPeriod:a=Sz,title:o,now:s=Tz,...c}){let[l,u]=(0,L.useState)(s());(0,L.useEffect)(()=>{if(!r)return;let t=(()=>{let t=gz(e).valueOf();if(!t)return console.warn(`[react-timeago] Invalid Date provided`),0;let n=Math.round(Math.abs(l-t)/1e3),r=Math.min(Math.max(n<yz?1e3:n<bz?1e3*yz:n<xz?1e3*bz:1e3*Sz,i*1e3),a*1e3);return r?setTimeout(()=>{u(s())},r):0})();return()=>{t&&clearTimeout(t)}},[e,r,a,i,s,l]),(0,L.useEffect)(()=>{u(s())},[e]);let d=n,f=gz(e).valueOf();if(!f)return null;let p=Math.round(Math.abs(l-f)/1e3),m=f<l?`ago`:`from now`,[h,g]=p<yz?[Math.round(p),`second`]:p<bz?[Math.round(p/yz),`minute`]:p<xz?[Math.round(p/bz),`hour`]:p<Sz?[Math.round(p/xz),`day`]:p<Cz?[Math.round(p/Sz),`week`]:p<wz?[Math.round(p/Cz),`month`]:[Math.round(p/wz),`year`],_=o===void 0?typeof e==`string`?e:gz(e).toISOString().substring(0,16).replace(`T`,` `):o,v=d===`time`?{...c,dateTime:gz(e).toISOString()}:c,y=(e=e,t=t,n=n,r=f,i=_z,a=a)=>_z(e,t,n,r,i,a),b=t||_z,x;try{x=b(h,g,m,f,y,s),x||=_z(h,g,m,f,y,s)}catch(e){console.error(`[react-timeago] Formatter threw an error:`,e),x=_z(h,g,m,f,y,s)}return L.createElement(d,vz({},v,{title:_}),x)}function Dz(){var e=[...arguments];return(0,L.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var Oz=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function kz(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function Az(e){return`nodeType`in e}function jz(e){return e?kz(e)?e:Az(e)?e.ownerDocument?.defaultView??window:window:window}function Mz(e){let{Document:t}=jz(e);return e instanceof t}function Nz(e){return kz(e)?!1:e instanceof jz(e).HTMLElement}function Pz(e){return e instanceof jz(e).SVGElement}function Fz(e){return e?kz(e)?e.document:Az(e)?Mz(e)?e:Nz(e)||Pz(e)?e.ownerDocument:document:document:document}var Iz=Oz?L.useLayoutEffect:L.useEffect;function Lz(e){let t=(0,L.useRef)(e);return Iz(()=>{t.current=e}),(0,L.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function Rz(){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 zz(e,t){t===void 0&&(t=[e]);let n=(0,L.useRef)(e);return Iz(()=>{n.current!==e&&(n.current=e)},t),n}function Bz(e,t){let n=(0,L.useRef)();return(0,L.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function Vz(e){let t=Lz(e),n=(0,L.useRef)(null);return[n,(0,L.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function Hz(e){let t=(0,L.useRef)();return(0,L.useEffect)(()=>{t.current=e},[e]),t.current}var Uz={};function Wz(e,t){return(0,L.useMemo)(()=>{if(t)return t;let n=Uz[e]==null?0:Uz[e]+1;return Uz[e]=n,e+`-`+n},[e,t])}function Gz(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 Kz=Gz(1),qz=Gz(-1);function Jz(e){return`clientX`in e&&`clientY`in e}function Yz(e){if(!e)return!1;let{KeyboardEvent:t}=jz(e.target);return t&&e instanceof t}function Xz(e){if(!e)return!1;let{TouchEvent:t}=jz(e.target);return t&&e instanceof t}function Zz(e){if(Xz(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 Jz(e)?{x:e.clientX,y:e.clientY}:null}var Qz=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[Qz.Translate.toString(e),Qz.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),$z=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function eB(e){return e.matches($z)?e:e.querySelector($z)}var tB={display:`none`};function nB(e){let{id:t,value:n}=e;return L.createElement(`div`,{id:t,style:tB},n)}function rB(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 iB(){let[e,t]=(0,L.useState)(``);return{announce:(0,L.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var aB=(0,L.createContext)(null);function oB(e){let t=(0,L.useContext)(aB);(0,L.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function sB(){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 cB={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
+ `},lB={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 uB(e){let{announcements:t=lB,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=cB}=e,{announce:a,announcement:o}=iB(),s=Wz(`DndLiveRegion`),[c,l]=(0,L.useState)(!1);if((0,L.useEffect)(()=>{l(!0)},[]),oB((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(nB,{id:r,value:i.draggable}),L.createElement(rB,{id:s,announcement:o}));return n?(0,oc.createPortal)(u,n):u}var dB;(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`})(dB||={});function fB(){}function pB(e,t){return(0,L.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function mB(){var e=[...arguments];return(0,L.useMemo)(()=>[...e].filter(e=>e!=null),[...e])}var hB=Object.freeze({x:0,y:0});function gB(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function _B(e,t){let n=Zz(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 vB(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function yB(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function bB(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 xB(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function SB(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 CB=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=SB(t,t.left,t.top),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=gB(SB(r),i);a.push({id:t,data:{droppableContainer:e,value:n}})}}return a.sort(vB)},wB=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=bB(t),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=bB(r),o=i.reduce((e,t,r)=>e+gB(n[r],t),0),s=Number((o/4).toFixed(4));a.push({id:t,data:{droppableContainer:e,value:s}})}}return a.sort(vB)};function TB(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 EB=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=TB(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(yB)};function DB(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 OB=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&&DB(r,a)){let n=bB(a).reduce((e,t)=>e+gB(r,t),0),o=Number((n/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:o}})}}return i.sort(vB)};function kB(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function AB(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:hB}function jB(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 MB=jB(1);function NB(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 PB(e,t,n){let r=NB(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 FB={ignoreTransform:!1};function IB(e,t){t===void 0&&(t=FB);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=jz(e).getComputedStyle(e);t&&(n=PB(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 LB(e){return IB(e,{ignoreTransform:!0})}function RB(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function zB(e,t){return t===void 0&&(t=jz(e).getComputedStyle(e)),t.position===`fixed`}function BB(e,t){t===void 0&&(t=jz(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 VB(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(Mz(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!Nz(i)||Pz(i)||n.includes(i))return n;let a=jz(e).getComputedStyle(i);return i!==e&&BB(i,a)&&n.push(i),zB(i,a)?n:r(i.parentNode)}return e?r(e):n}function HB(e){let[t]=VB(e,1);return t??null}function UB(e){return!Oz||!e?null:kz(e)?e:Az(e)?Mz(e)||e===Fz(e).scrollingElement?window:Nz(e)?e:null:null}function WB(e){return kz(e)?e.scrollX:e.scrollLeft}function GB(e){return kz(e)?e.scrollY:e.scrollTop}function KB(e){return{x:WB(e),y:GB(e)}}var qB;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(qB||={});function JB(e){return!Oz||!e?!1:e===document.scrollingElement}function YB(e){let t={x:0,y:0},n=JB(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 XB={x:.2,y:.2};function ZB(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=XB);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=YB(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=qB.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=qB.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=qB.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=qB.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function QB(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 $B(e){return e.reduce((e,t)=>Kz(e,KB(t)),hB)}function eV(e){return e.reduce((e,t)=>e+WB(t),0)}function tV(e){return e.reduce((e,t)=>e+GB(t),0)}function nV(e,t){if(t===void 0&&(t=IB),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);HB(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var rV=[[`x`,[`left`,`right`],eV],[`y`,[`top`,`bottom`],tV]],iV=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=VB(t),r=$B(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of rV)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})}},aV=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 oV(e){let{EventTarget:t}=jz(e);return e instanceof t?e:Fz(e)}function sV(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 cV;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(cV||={});function lV(e){e.preventDefault()}function uV(e){e.stopPropagation()}var dV;(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`})(dV||={});var fV={start:[dV.Space,dV.Enter],cancel:[dV.Esc],end:[dV.Space,dV.Enter,dV.Tab]},pV=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case dV.Right:return{...n,x:n.x+25};case dV.Left:return{...n,x:n.x-25};case dV.Down:return{...n,y:n.y+25};case dV.Up:return{...n,y:n.y-25}}},mV=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 aV(Fz(t)),this.windowListeners=new aV(jz(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(cV.Resize,this.handleCancel),this.windowListeners.add(cV.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(cV.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&nV(n),t(hB)}handleKeyDown(e){if(Yz(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=fV,coordinateGetter:a=pV,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}:hB;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=qz(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}=YB(n),p=QB(n),m={x:Math.min(i===dV.Right?p.right-p.width/2:p.right,Math.max(i===dV.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===dV.Down?p.bottom-p.height/2:p.bottom,Math.max(i===dV.Down?p.top:p.top+p.height/2,u.y))},h=i===dV.Right&&!s||i===dV.Left&&!c,g=i===dV.Down&&!l||i===dV.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===dV.Right&&e<=d.x||i===dV.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}a?r.x=n.scrollLeft-e:r.x=i===dV.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===dV.Down&&e<=d.y||i===dV.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}a?r.y=n.scrollTop-e:r.y=i===dV.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,Kz(qz(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()}};mV.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=fV,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 hV(e){return!!(e&&`distance`in e)}function gV(e){return!!(e&&`delay`in e)}var _V=class{constructor(e,t,n){n===void 0&&(n=oV(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=Fz(i),this.documentListeners=new aV(this.document),this.listeners=new aV(n),this.windowListeners=new aV(jz(i)),this.initialCoordinates=Zz(r)??hB,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(cV.Resize,this.handleCancel),this.windowListeners.add(cV.DragStart,lV),this.windowListeners.add(cV.VisibilityChange,this.handleCancel),this.windowListeners.add(cV.ContextMenu,lV),this.documentListeners.add(cV.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(gV(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(hV(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(cV.Click,uV,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(cV.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=Zz(e)??hB,s=qz(n,o);if(!t&&a){if(hV(a)){if(a.tolerance!=null&&sV(s,a.tolerance))return this.handleCancel();if(sV(s,a.distance))return this.handleStart()}if(gV(a)&&sV(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===dV.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},vV={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},yV=class extends _V{constructor(e){let{event:t}=e,n=Fz(t.target);super(e,vV,n)}};yV.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 bV={move:{name:`mousemove`},end:{name:`mouseup`}},xV;(function(e){e[e.RightClick=2]=`RightClick`})(xV||={});var SV=class extends _V{constructor(e){super(e,bV,Fz(e.event.target))}};SV.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===xV.RightClick?!1:(r?.({event:n}),!0)}}];var CV={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},wV=class extends _V{constructor(e){super(e,CV)}static setup(){return window.addEventListener(CV.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(CV.move.name,e)};function e(){}}};wV.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 TV;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(TV||={});var EV;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(EV||={});function DV(e){let{acceleration:t,activator:n=TV.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:s=EV.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:u,delta:d,threshold:f}=e,p=kV({delta:d,disabled:!a}),[m,h]=Rz(),g=(0,L.useRef)({x:0,y:0}),_=(0,L.useRef)({x:0,y:0}),v=(0,L.useMemo)(()=>{switch(n){case TV.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case TV.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===EV.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}=ZB(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 OV={x:{[qB.Backward]:!1,[qB.Forward]:!1},y:{[qB.Backward]:!1,[qB.Forward]:!1}};function kV(e){let{delta:t,disabled:n}=e,r=Hz(t);return Bz(e=>{if(n||!r||!e)return OV;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[qB.Backward]:e.x[qB.Backward]||i.x===-1,[qB.Forward]:e.x[qB.Forward]||i.x===1},y:{[qB.Backward]:e.y[qB.Backward]||i.y===-1,[qB.Forward]:e.y[qB.Forward]||i.y===1}}},[n,t,r])}function AV(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return Bz(e=>t==null?null:r??e??null,[r,t])}function jV(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 MV;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(MV||={});var NV;(function(e){e.Optimized=`optimized`})(NV||={});var PV=new Map;function FV(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=zz(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=Bz(t=>{if(d&&!n)return PV;if(!t||t===PV||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 iV(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 MV.Always:return!1;case MV.BeforeDragging:return n;default:return!n}}}function IV(e,t){return Bz(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function LV(e,t){return IV(e,t)}function RV(e){let{callback:t,disabled:n}=e,r=Lz(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 zV(e){let{callback:t,disabled:n}=e,r=Lz(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 BV(e){return new iV(IB(e),e)}function VV(e,t,n){t===void 0&&(t=BV);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=RV({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=zV({callback:a});return Iz(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),r}function HV(e){return AB(e,IV(e))}var UV=[];function WV(e){let t=(0,L.useRef)(e),n=Bz(n=>e?n&&n!==UV&&e&&t.current&&e.parentNode===t.current.parentNode?n:VB(e):UV,[e]);return(0,L.useEffect)(()=>{t.current=e},[e]),n}function GV(e){let[t,n]=(0,L.useState)(null),r=(0,L.useRef)(e),i=(0,L.useCallback)(e=>{let t=UB(e.target);t&&n(e=>e?(e.set(t,KB(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=UB(e);return t?(t.addEventListener(`scroll`,i,{passive:!0}),[t,KB(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=>{UB(e)?.removeEventListener(`scroll`,i)})}},[i,e]),(0,L.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>Kz(e,t),hB):$B(e):hB,[e,t])}function KV(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!==hB;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?qz(e,n.current):hB}function qV(e){(0,L.useEffect)(()=>{if(!Oz)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 JV(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 YV(e){return(0,L.useMemo)(()=>e?RB(e):null,[e])}var XV=[];function ZV(e,t){t===void 0&&(t=IB);let[n]=e,r=YV(n?jz(n):null),[i,a]=(0,L.useState)(XV);function o(){a(()=>e.length?e.map(e=>JB(e)?r:new iV(t(e),e)):XV)}let s=zV({callback:o});return Iz(()=>{s?.disconnect(),o(),e.forEach(e=>s?.observe(e))},[e]),i}function QV(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return Nz(t)?t:e}function $V(e){let{measure:t}=e,[n,r]=(0,L.useState)(null),i=zV({callback:(0,L.useCallback)(e=>{for(let{target:n}of e)if(Nz(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[a,o]=Vz((0,L.useCallback)(e=>{let n=QV(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 eH=[{sensor:yV,options:{}},{sensor:mV,options:{}}],tH={current:{}},nH={draggable:{measure:LB},droppable:{measure:LB,strategy:MV.WhileDragging,frequency:NV.Optimized},dragOverlay:{measure:IB}},rH=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}},iH={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new rH,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:fB},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:nH,measureDroppableContainers:fB,windowRect:null,measuringScheduled:!1},aH={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:fB,draggableNodes:new Map,over:null,measureDroppableContainers:fB},oH=(0,L.createContext)(aH),sH=(0,L.createContext)(iH);function cH(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new rH}}}function lH(e,t){switch(t.type){case dB.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case dB.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 dB.DragEnd:case dB.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case dB.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new rH(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case dB.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 rH(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case dB.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new rH(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function uH(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,L.useContext)(oH),a=Hz(r),o=Hz(n?.id);return(0,L.useEffect)(()=>{if(!t&&!r&&a&&o!=null){if(!Yz(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=eB(e);if(t){t.focus();break}}})}},[r,t,i,o,a]),null}function dH(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}function fH(e){return(0,L.useMemo)(()=>({draggable:{...nH.draggable,...e?.draggable},droppable:{...nH.droppable,...e?.droppable},dragOverlay:{...nH.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function pH(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;Iz(()=>{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=AB(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=HB(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,s,r,n])}var mH=(0,L.createContext)({...hB,scaleX:1,scaleY:1}),hH;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(hH||={});var gH=(0,L.memo)(function(e){let{id:t,accessibility:n,autoScroll:r=!0,children:i,sensors:a=eH,collisionDetection:o=EB,measuring:s,modifiers:c,...l}=e,[u,d]=(0,L.useReducer)(lH,void 0,cH),[f,p]=sB(),[m,h]=(0,L.useState)(hH.Uninitialized),g=m===hH.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??tH,rect:S},[_,x]),w=(0,L.useRef)(null),[T,E]=(0,L.useState)(null),[D,O]=(0,L.useState)(null),ee=zz(l,Object.values(l)),te=Wz(`DndDescribedBy`,t),k=(0,L.useMemo)(()=>b.getEnabled(),[b]),A=fH(s),{droppableRects:j,measureDroppableContainers:ne,measuringScheduled:re}=FV(k,{dragging:g,dependencies:[y.x,y.y],config:A.droppable}),M=AV(v,_),N=(0,L.useMemo)(()=>D?Zz(D):null,[D]),ie=Me(),ae=LV(M,A.draggable.measure);pH({activeNode:_==null?null:v.get(_),config:ie.layoutShiftCompensation,initialRect:ae,measure:A.draggable.measure});let P=VV(M,A.draggable.measure,ae),oe=VV(M?M.parentElement:null),F=(0,L.useRef)({activatorEvent:null,active:null,activeNode:M,collisionRect:null,collisions:null,droppableRects:j,draggableNodes:v,draggingNode:null,draggingNodeRect:null,droppableContainers:b,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),se=b.getNodeFor(F.current.over?.id),ce=$V({measure:A.dragOverlay.measure}),le=ce.nodeRef.current??M,ue=g?ce.rect??P:null,de=!!(ce.nodeRef.current&&ce.rect),fe=HV(de?null:P),I=YV(le?jz(le):null),pe=WV(g?se??M:null),me=ZV(pe),he=dH(c,{transform:{x:y.x-fe.x,y:y.y-fe.y,scaleX:1,scaleY:1},activatorEvent:D,active:C,activeNodeRect:P,containerNodeRect:oe,draggingNodeRect:ue,over:F.current.over,overlayNodeRect:ce.rect,scrollableAncestors:pe,scrollableAncestorRects:me,windowRect:I}),ge=N?Kz(N,y):null,_e=GV(pe),ve=KV(_e),ye=KV(_e,[P]),be=Kz(he,ve),xe=ue?MB(ue,he):null,Se=C&&xe?o({active:C,collisionRect:xe,droppableRects:j,droppableContainers:k,pointerCoordinates:ge}):null,Ce=xB(Se,`id`),[we,Te]=(0,L.useState)(null),Ee=kB(de?he:Kz(he,ye),we?.rect??null,P),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:F,onAbort(e){if(!v.get(e))return;let{onDragAbort:t}=ee.current,n={id:e};t?.(n),f({type:`onDragAbort`,event:n})},onPending(e,t,n,r){if(!v.get(e))return;let{onDragPending:i}=ee.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}=ee.current,i={activatorEvent:a,active:{id:t,data:n.data,rect:S}};(0,oc.unstable_batchedUpdates)(()=>{r?.(i),h(hH.Initializing),d({type:dB.DragStart,initialCoordinates:e,active:t}),f({type:`onDragStart`,event:i}),E(De.current),O(a)})},onMove(e){d({type:dB.DragMove,coordinates:e})},onEnd:o(dB.DragEnd),onCancel:o(dB.DragCancel)});function o(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=F.current,o=null;if(t&&i){let{cancelDrop:s}=ee.current;o={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===dB.DragEnd&&typeof s==`function`&&await Promise.resolve(s(o))&&(e=dB.DragCancel)}w.current=null,(0,oc.unstable_batchedUpdates)(()=>{d({type:e}),h(hH.Uninitialized),Te(null),E(null),O(null),De.current=null;let t=e===dB.DragEnd?`onDragEnd`:`onDragCancel`;if(o){let e=ee.current[t];e?.(o),f({type:t,event:o})}})}}},[v]),ke=jV(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]));qV(a),Iz(()=>{P&&m===hH.Initializing&&h(hH.Initialized)},[P,m]),(0,L.useEffect)(()=>{let{onDragMove:e}=ee.current,{active:t,activatorEvent:n,collisions:r,over:i}=F.current;if(!t||!n)return;let a={active:t,activatorEvent:n,collisions:r,delta:{x:be.x,y:be.y},over:i};(0,oc.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}=F.current;if(!e||w.current==null||!t||!i)return;let{onDragOver:a}=ee.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,oc.unstable_batchedUpdates)(()=>{Te(s),a?.(c),f({type:`onDragOver`,event:c})})},[Ce]),Iz(()=>{F.current={activatorEvent:D,active:C,activeNode:M,collisionRect:xe,collisions:Se,droppableRects:j,draggableNodes:v,draggingNode:le,draggingNodeRect:ue,droppableContainers:b,over:we,scrollableAncestors:pe,scrollAdjustedTranslate:be},S.current={initial:ue,translated:xe}},[C,M,Se,xe,v,le,ue,j,b,we,pe,be]),DV({...ie,delta:y,draggingRect:xe,pointerCoordinates:ge,scrollableAncestors:pe,scrollableAncestorRects:me});let Ae=(0,L.useMemo)(()=>({active:C,activeNode:M,activeNodeRect:P,activatorEvent:D,collisions:Se,containerNodeRect:oe,dragOverlay:ce,draggableNodes:v,droppableContainers:b,droppableRects:j,over:we,measureDroppableContainers:ne,scrollableAncestors:pe,scrollableAncestorRects:me,measuringConfiguration:A,measuringScheduled:re,windowRect:I}),[C,M,P,D,Se,oe,ce,v,b,j,we,ne,pe,me,A,re,I]),je=(0,L.useMemo)(()=>({activatorEvent:D,activators:ke,active:C,activeNodeRect:P,ariaDescribedById:{draggable:te},dispatch:d,draggableNodes:v,over:we,measureDroppableContainers:ne}),[D,ke,C,P,d,te,v,we,ne]);return L.createElement(aB.Provider,{value:p},L.createElement(oH.Provider,{value:je},L.createElement(sH.Provider,{value:Ae},L.createElement(mH.Provider,{value:Ee},i)),L.createElement(uH,{disabled:n?.restoreFocus===!1})),L.createElement(uB,{...n,hiddenTextDescribedById:te}));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}}}),_H=(0,L.createContext)(null),vH=`button`,yH=`Draggable`;function bH(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=Wz(yH),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,L.useContext)(oH),{role:p=vH,roleDescription:m=`draggable`,tabIndex:h=0}=i??{},g=c?.id===t,_=(0,L.useContext)(g?mH:_H),[v,y]=Vz(),[b,x]=Vz(),S=JV(o,t),C=zz(n);return Iz(()=>(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===vH?!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 xH(){return(0,L.useContext)(sH)}var SH=`Droppable`,CH={timeout:25};function wH(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=Wz(SH),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,L.useContext)(oH),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}={...CH,...i},_=zz(h??r),v=zV({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]=Vz((0,L.useCallback)((e,t)=>{v&&(t&&(v.unobserve(t),d.current=!1),e&&v.observe(e))},[v])),x=zz(t);return(0,L.useEffect)(()=>{!v||!y.current||(v.disconnect(),d.current=!1,v.observe(y.current))},[y,v]),(0,L.useEffect)(()=>(s({type:dB.RegisterDroppable,element:{id:r,key:a,disabled:n,node:y,rect:f,data:x}}),()=>s({type:dB.UnregisterDroppable,key:a,id:r})),[r]),(0,L.useEffect)(()=>{n!==u.current.disabled&&(s({type:dB.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 TH(e){let{animation:t,children:n}=e,[r,i]=(0,L.useState)(null),[a,o]=(0,L.useState)(null),s=Hz(n);return!n&&!r&&s&&i(s),Iz(()=>{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 EH={x:0,y:0,scaleX:1,scaleY:1};function DH(e){let{children:t}=e;return L.createElement(oH.Provider,{value:aH},L.createElement(mH.Provider,{value:EH},t))}var OH={position:`fixed`,touchAction:`none`},kH=e=>Yz(e)?`transform 250ms ease`:void 0,AH=(0,L.forwardRef)((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:a,className:o,rect:s,style:c,transform:l,transition:u=kH}=e;if(!s)return null;let d=i?l:{...l,scaleX:1,scaleY:1},f={...OH,width:s.width,height:s.height,top:s.top,left:s.left,transform:Qz.Transform.toString(d),transformOrigin:i&&r?_B(r,s):void 0,transition:typeof u==`function`?u(r):u,...c};return L.createElement(n,{className:o,style:f,ref:t},a)}),jH={duration:250,easing:`ease`,keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Qz.Transform.toString(t)},{transform:Qz.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 MH(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return Lz((e,a)=>{if(t===null)return;let o=n.get(e);if(!o)return;let s=o.node.current;if(!s)return;let c=QV(a);if(!c)return;let{transform:l}=jz(a).getComputedStyle(a),u=NB(l);if(!u)return;let d=typeof t==`function`?t:NH(t);return nV(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 NH(e){let{duration:t,easing:n,sideEffects:r,keyframes:i}={...jH,...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 PH=0;function FH(e){return(0,L.useMemo)(()=>{if(e!=null)return PH++,PH},[e])}var IH=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}=xH(),S=(0,L.useContext)(mH),C=FH(d?.id),w=dH(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=IV(f),E=MH({config:r,draggableNodes:m,droppableContainers:h,measuringConfiguration:v}),D=T?g.setRef:void 0;return L.createElement(DH,null,L.createElement(TH,{animation:E},d&&C?L.createElement(AH,{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 LH(e,t,n){let r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function RH(e,t){return e.reduce((e,n,r)=>{let i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function zH(e){return e!==null&&e>=0}function BH(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 VH(e){return typeof e==`boolean`?{draggable:e,droppable:e}:e}var HH={scaleX:1,scaleY:1},UH=e=>{let{rects:t,activeNodeRect:n,activeIndex:r,overIndex:i,index:a}=e,o=t[r]??n;if(!o)return null;let s=WH(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,...HH}:null}return a>r&&a<=i?{x:-o.width-s,y:0,...HH}:a<r&&a>=i?{x:o.width+s,y:0,...HH}:{x:0,y:0,...HH}};function WH(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 GH=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e,a=LH(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}},KH={scaleX:1,scaleY:1},qH=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,...KH}:null}let s=JH(i,r,t);return r>t&&r<=a?{x:0,y:-o.height-s,...KH}:r<t&&r>=a?{x:0,y:o.height+s,...KH}:{x:0,y:0,...KH}};function JH(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 YH=`Sortable`,XH=L.createContext({activeIndex:-1,containerId:YH,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:GH,disabled:{draggable:!1,droppable:!1}});function ZH(e){let{children:t,id:n,items:r,strategy:i=GH,disabled:a=!1}=e,{active:o,dragOverlay:s,droppableRects:c,over:l,measureDroppableContainers:u}=xH(),d=Wz(YH,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=!BH(p,_.current),y=g!==-1&&h===-1||v,b=VH(a);Iz(()=>{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:RH(p,c),strategy:i}),[h,d,b.draggable,b.droppable,y,p,g,c,f,i]);return L.createElement(XH.Provider,{value:x},t)}var QH=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return LH(n,r,i).indexOf(t)},$H=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},eU={duration:200,easing:`ease`},tU=`transform`,nU=Qz.Transition.toString({property:tU,duration:0,easing:`linear`}),rU={roleDescription:`sortable`};function iU(e){let{disabled:t,index:n,node:r,rect:i}=e,[a,o]=(0,L.useState)(null),s=(0,L.useRef)(n);return Iz(()=>{if(!t&&n!==s.current&&r.current){let e=i.current;if(e){let t=IB(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 aU(e){let{animateLayoutChanges:t=$H,attributes:n,disabled:r,data:i,getNewIndex:a=QH,id:o,strategy:s,resizeObserverConfig:c,transition:l=eU}=e,{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:m,sortedRects:h,overIndex:g,useDragOverlay:_,strategy:v}=(0,L.useContext)(XH),y=oU(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}=wH({id:o,data:x,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:S,...c}}),{active:D,activatorEvent:O,activeNodeRect:ee,attributes:te,setNodeRef:k,listeners:A,isDragging:j,over:ne,setActivatorNodeRef:re,transform:M}=bH({id:o,data:x,attributes:{...rU,...n},disabled:y.draggable}),N=Dz(E,k),ie=!!D,ae=ie&&!m&&zH(f)&&zH(g),P=!_&&j,oe=ae?(P&&ae?M:null)??(s??v)({rects:h,activeNodeRect:ee,activeIndex:f,overIndex:g,index:b}):null,F=zH(f)&&zH(g)?a({id:o,items:u,activeIndex:f,overIndex:g}):b,se=D?.id,ce=(0,L.useRef)({activeId:se,items:u,newIndex:F,containerId:d}),le=u!==ce.current.items,ue=t({active:D,containerId:d,isDragging:j,isSorting:ie,id:o,index:b,items:u,newIndex:ce.current.newIndex,previousItems:ce.current.items,previousContainerId:ce.current.containerId,transition:l,wasDragging:ce.current.activeId!=null}),de=iU({disabled:!ue,index:b,node:w,rect:C});return(0,L.useEffect)(()=>{ie&&ce.current.newIndex!==F&&(ce.current.newIndex=F),d!==ce.current.containerId&&(ce.current.containerId=d),u!==ce.current.items&&(ce.current.items=u)},[ie,F,d,u]),(0,L.useEffect)(()=>{if(se===ce.current.activeId)return;if(se!=null&&ce.current.activeId==null){ce.current.activeId=se;return}let e=setTimeout(()=>{ce.current.activeId=se},50);return()=>clearTimeout(e)},[se]),{active:D,activeIndex:f,attributes:te,data:x,rect:C,index:b,newIndex:F,items:u,isOver:T,isSorting:ie,isDragging:j,listeners:A,node:w,overIndex:g,over:ne,setNodeRef:N,setActivatorNodeRef:re,setDroppableNodeRef:E,setDraggableNodeRef:k,transform:de??oe,transition:fe()};function fe(){if(de||le&&ce.current.newIndex===b)return nU;if(!(P&&!Yz(O)||!l)&&(ie||ue))return Qz.Transition.toString({...l,property:tU})}}function oU(e,t){return typeof e==`boolean`?{draggable:e,droppable:!1}:{draggable:e?.draggable??t.draggable,droppable:e?.droppable??t.droppable}}function sU(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 cU=[dV.Down,dV.Right,dV.Up,dV.Left],lU=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:a,over:o,scrollableAncestors:s}}=t;if(cU.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 dV.Down:r.top<a.top&&t.push(n);break;case dV.Up:r.top>a.top&&t.push(n);break;case dV.Left:r.left>a.left&&t.push(n);break;case dV.Right:r.left<a.left&&t.push(n);break}});let c=wB({active:n,collisionRect:r,droppableRects:i,droppableContainers:t,pointerCoordinates:null}),l=xB(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=VB(c).some((e,t)=>s[t]!==e),i=uU(e,t),a=dU(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:qz(u,l)}}}};function uU(e,t){return!sU(e)||!sU(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function dU(e,t){return!sU(e)||!sU(t)||!uU(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}var fU=(0,L.createContext)(null),pU={didCatch:!1,error:null},mU=class extends L.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=pU}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(pU))}componentDidCatch(e,t){this.props.onError?.(e,t)}componentDidUpdate(e,t){let{didCatch:n}=this.state,{resetKeys:r}=this.props;n&&t.error!==null&&hU(e.resetKeys,r)&&(this.props.onReset?.({next:r,prev:e.resetKeys,reason:`keys`}),this.setState(pU))}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)(fU.Provider,{value:{didCatch:i,error:a,resetErrorBoundary:this.resetErrorBoundary}},o)}};function hU(e=[],t=[]){return e.length!==t.length||e.some((e,n)=>!Object.is(e,t[n]))}function gU(e){return typeof e==`string`?e:typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`?e.toString():JSON.stringify(e)??``}function _U(){return(0,R.jsxs)(`div`,{style:{textAlign:`center`,marginTop:`4em`},children:[(0,R.jsx)(Zl,{}),(0,R.jsx)(`p`,{children:`Loading`})]})}function vU({error:e}){return e===void 0?(0,R.jsx)(R.Fragment,{}):DC.isApiException(e)?(0,R.jsx)(mm,{children:(0,R.jsxs)(vm,{children:[(0,R.jsx)(`h3`,{children:`FMS Insight Server Error`}),(0,R.jsx)(`p`,{children:e.response})]})}):e instanceof Error?(0,R.jsx)(mm,{children:(0,R.jsx)(vm,{children:e.message})}):(0,R.jsx)(mm,{children:(0,R.jsxs)(vm,{children:[(0,R.jsx)(`h3`,{children:`Unknown Error`}),(0,R.jsx)(`p`,{children:gU(e)})]})})}function yU(e){return(0,R.jsx)(mU,{FallbackComponent:vU,children:(0,R.jsx)(L.Suspense,{fallback:e.fallback??(0,R.jsx)(_U,{}),children:e.children})})}var bU=class extends L.PureComponent{render(){let e=this.props.size||50,t=hz(this.props.part,e);return(0,R.jsx)(`div`,{style:{width:e,height:e},dangerouslySetInnerHTML:{__html:t}})}},xU=2,SU=Gt`
250
+ from, to { transform: translate(0, 0) }
251
+ 10% { transform: translate(${xU}px, 0) }
252
+ 20% { transform: translate(0, 0) }
253
+ 30% { transform: translate(${xU}px, 0) }
254
+ 40% { transform: translate(0, 0) }
255
+ 50% { transform: translate(${xU}px, 0) }
256
+ 60% { transform: translate(0, 0) }
257
+ `,CU=`${SU} 1s ease-in-out infinite`;function wU(e){return`animationName`in e}function TU(e){let t=e.currentTarget.getAnimations().find(e=>wU(e)&&e.animationName===SU.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 EU=V(`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`}}}}),DU=V(`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 OU({mat:e,displayActionForSinglePallet:t,fsize:n}){let r=Q(GO),i=Dk(Q(EO).basketName);switch(e.action.type){case mC.Loading:if(e.action.loadFromBasketId){if(e.action.loadOntoPalletNum===null||e.action.loadOntoPalletNum===void 0)return(0,R.jsxs)(DU,{fsize:n,children:[`Load into `,i,` `,e.action.loadFromBasketId]});if(t===void 0)return(0,R.jsxs)(DU,{fsize:n,children:[`Load from `,i,` `,e.action.loadFromBasketId,` to pal `,e.action.loadOntoPalletNum??``]});if(t===e.action.loadOntoPalletNum){let t=e.action.loadOntoFace??0,a=e.action.loadOntoPalletNum?r.pallets[e.action.loadOntoPalletNum]?.faceNames?.[t-1]:null;return(0,R.jsxs)(DU,{fsize:n,children:[`Load from `,i,` `,e.action.loadFromBasketId,` to `,a??`face ${t}`]})}else return null}switch(e.location.type){case fC.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)(DU,{fsize:n,children:[`Reclamp material to process # `,e.action.processAfterLoad]}):null;{let t=e.action.loadOntoFace??0;return(0,R.jsxs)(DU,{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)(DU,{fsize:n,children:[`Load to `,a??`face ${i}`,` of pal `,e.action.loadOntoPalletNum??``]}):t===e.action.loadOntoPalletNum?(0,R.jsxs)(DU,{fsize:n,children:[`Load to `,a??`face ${i}`]}):null}}case mC.UnloadToInProcess:case mC.UnloadToCompletedMaterial:return e.action.unloadToBasketId?(0,R.jsxs)(DU,{fsize:n,children:[`Unload to `,i,` `,e.action.unloadToBasketId,e.action.unloadToBasketSubPosition?` position ${e.action.unloadToBasketSubPosition+1}`:``]}):e.action.unloadIntoQueue?(0,R.jsxs)(DU,{fsize:n,children:[`Unload into queue `,e.action.unloadIntoQueue]}):(0,R.jsx)(DU,{fsize:n,children:`Unload from pallet`});case mC.Waiting:if(e.location.type===fC.InQueue&&e.jobUnique&&e.jobUnique!==``)return(0,R.jsxs)(DU,{fsize:n,children:[`Waiting; next process is #`,e.process+1]});if(e.location.type===fC.InBasket)return(0,R.jsxs)(DU,{fsize:n,children:[`In `,i,` `,e.location.basketId]});if(e.location.type===fC.OnPallet&&(e.lastCompletedMachiningRouteStopIndex===null||e.lastCompletedMachiningRouteStopIndex===void 0))return(0,R.jsx)(DU,{fsize:n,children:`Waiting for machining`});break;case mC.Machining:return(0,R.jsxs)(DU,{fsize:n,children:[`Machining program `,e.action.program??``]})}return null}function kU({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)(DS,{})})}function AU({fsize:e,mat:t}){let n=Q(GO).jobs[t.jobUnique],r=t.path;if(t.action.type===mC.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)(DU,{fsize:e,children:i.casting}):null}function jU({fsize:e,uniq:t}){let n=Q(GO).jobs[t],r=Q(rR);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)(DU,{fsize:e,style:{textOverflow:`ellipsis`,overflow:`hidden`,whiteSpace:`nowrap`,maxWidth:`10em`},children:t.notes})}return null}function MU(){let e=Q(GO),t=Q(PI);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 NU=(0,L.forwardRef)(function(e,t){let n=qE(DI),r=e.mat.completedInspections||{},i;return e.focusInspectionType&&r[e.focusInspectionType]?i=(0,R.jsxs)(DU,{fsize:e.fsize,children:[(0,R.jsx)(`span`,{children:`Inspection completed `}),(0,R.jsx)(Ez,{date:r[e.focusInspectionType].time})]}):e.focusInspectionType&&e.mat.last_unload_time?i=(0,R.jsxs)(DU,{fsize:e.fsize,children:[(0,R.jsx)(`span`,{children:`Unloaded `}),(0,R.jsx)(Ez,{date:e.mat.last_unload_time})]}):e.mat.closeout_completed&&(i=(0,R.jsxs)(DU,{fsize:e.fsize,children:[(0,R.jsxs)(`span`,{children:[e.mat.closeout_failed?`Failed `:``,`Closed Out `]}),(0,R.jsx)(Ez,{date:e.mat.closeout_completed})]})),(0,R.jsxs)(Yc,{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?CU:void 0,"&:hover":{animationPlayState:`paused`}},onAnimationIteration:TU,...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)(Bx,{fontSize:`large`,color:`action`})}):void 0,(0,R.jsx)(Ol,{focusRipple:!0,sx:{width:`100%`},onClick:()=>n(e.inProcMat?{type:`InProcMat`,inproc:e.inProcMat}:{type:`MatSummary`,summary:e.mat}),children:(0,R.jsxs)(G,{sx:{display:`flex`,textAlign:`left`,alignItems:`center`,width:`100%`},children:[(0,R.jsx)(bU,{part:e.mat.partName}),(0,R.jsxs)(G,{sx:{marginLeft:`8px`,flexGrow:1},children:[(0,R.jsx)(EU,{fsize:e.fsize,children:e.mat.partName}),e.displayJob?(0,R.jsx)(DU,{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)(DU,{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)(DU,{fsize:e.fsize,children:[`Workorder: `,e.mat.workorderId]}),e.mat.jobUnique!==void 0&&e.showRawMaterial&&e.inProcMat&&e.inProcMat.process===0?(0,R.jsx)(AU,{fsize:e.fsize,mat:e.inProcMat}):void 0,e.showJobComment&&e.mat.jobUnique&&e.mat.jobUnique!==``?(0,R.jsx)(jU,{fsize:e.fsize,uniq:e.mat.jobUnique}):void 0,e.inProcMat?(0,R.jsx)(OU,{mat:e.inProcMat,displayActionForSinglePallet:e.displayActionForSinglePallet,fsize:e.fsize}):void 0,e.inProcMat?.problem?(0,R.jsx)(DU,{fsize:e.fsize,children:(0,R.jsxs)(W,{variant:`body2`,color:`error`,sx:{fontWeight:`bold`},children:[`⚠ `,e.inProcMat.problem]})}):void 0,i]}),(0,R.jsxs)(G,{sx:{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)(Jp,{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)(kU,{mat:e.mat})})]})]})})]})}),PU=(0,L.memo)(NU),FU=(0,L.memo)(function(e){return(0,R.jsx)(NU,{mat:_L(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})}),IU=(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}=aU({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)(NU,{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:_L(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 LU(e){return(0,R.jsx)(NU,{mat:_L(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 RU=(0,L.memo)(function(e){return(0,R.jsx)(Yc,{elevation:4,sx:{display:`flex`,minWidth:`10em`,padding:`8px`,margin:`8px`},children:(0,R.jsx)(sm,{badgeContent:e.material.length<2?0:e.material.length,color:`secondary`,children:(0,R.jsx)(Ol,{focusRipple:!0,onClick:()=>e.onOpen(),children:(0,R.jsxs)(G,{sx:{display:`flex`,textAlign:`left`},children:[(0,R.jsx)(bU,{part:e.partOrCasting}),(0,R.jsxs)(G,{sx:{marginLeft:`8px`,flexGrow:1},children:[(0,R.jsx)(W,{variant:`h6`,children:e.partOrCasting}),(0,R.jsx)(DU,{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)(Jp,{style:{width:`30px`,height:`30px`},children:e.material[0].serial.slice(-1)})}):void 0]})})})})}),zU=(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,{sx:{display:`flex`,textAlign:`left`},children:[e===``?(0,R.jsx)(_S,{}):(0,R.jsx)(bU,{part:e}),(0,R.jsxs)(G,{sx:{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 BU({notes:e}){let t=Q(jI),n=Q(Ere);return(0,R.jsx)(zU,{notes:e,partName:t?.partName??``,serial:t?.serial??n})}function VU(){let e=Q(RI);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 HU({highlightProcsGreaterOrEqualTo:e}){return(0,R.jsx)(TI,{entries:Q(II),copyToClipboard:!0,highlightProcsGreaterOrEqualTo:e})}function UU(){let e=Q(MI),t=Q(GO).jobs,n=Q(rR),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 WU=(0,L.memo)(function({highlightProcsGreaterOrEqualTo:e}){let t=Q(DI),n=Q(AI),r=Q(kI);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)(yU,{fallback:(0,R.jsxs)(`small`,{children:[`Inspections: `,(0,R.jsx)(Zl,{size:`10`})]}),children:(0,R.jsx)(VU,{})})}),(0,R.jsx)(`div`,{children:(0,R.jsx)(yU,{fallback:(0,R.jsx)(`div`,{}),children:(0,R.jsx)(UU,{})})})]}),(0,R.jsx)(yU,{fallback:(0,R.jsx)(Zl,{}),children:(0,R.jsx)(HU,{highlightProcsGreaterOrEqualTo:e})})]})});function GU(e){let[t,n]=(0,L.useState)(``),r=Q(UO),[i]=jre(),a=Q(AI);return a===null?null:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(rh,{children:(0,R.jsx)(sx,{sx:{mt:`5px`},multiline:!0,label:`Note`,autoFocus:!0,variant:`outlined`,value:t,onChange:e=>n(e.target.value)})}),(0,R.jsxs)(eh,{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 KU(){let e=Q(DI);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)(Zl,{}),(0,R.jsx)(`div`,{style:{marginTop:`1em`},children:t})]})}function qU({setNotesOpen:e}){let t=Q(AI);return t===null||t.materialID<0?null:(0,R.jsx)(K,{onClick:()=>e(!0),color:`primary`,children:`Add Note`})}var JU=(0,L.memo)(function(e){let[t,n]=(0,L.useState)(!1),[r,i]=JE(DI);function a(){i(null),e.onClose&&e.onClose()}let o,s;return r&&(o=(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(oh,{children:(0,R.jsx)(BU,{})}),(0,R.jsx)(rh,{children:(0,R.jsxs)(yU,{fallback:(0,R.jsx)(KU,{}),children:[(0,R.jsx)(WU,{highlightProcsGreaterOrEqualTo:e.highlightProcsGreaterOrEqualTo}),(0,R.jsx)(yU,{fallback:(0,R.jsx)(Zl,{}),children:e.extraDialogElements})]})}),(0,R.jsxs)(eh,{children:[r&&(e.buttons||e.allowNote)?(0,R.jsx)(mU,{fallback:(0,R.jsx)(`div`,{}),children:(0,R.jsxs)(L.Suspense,{fallback:(0,R.jsx)(`div`,{}),children:[r&&e.allowNote?(0,R.jsx)(qU,{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)(oh,{children:(0,R.jsx)(BU,{notes:!0})}),(0,R.jsxs)(yU,{fallback:(0,R.jsx)(rh,{children:(0,R.jsx)(Zl,{})}),children:[(0,R.jsx)(GU,{setNotesOpen:n}),`;`]})]}))),(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)($m,{open:r!==null,onClose:a,maxWidth:`lg`,children:o}),e.allowNote?(0,R.jsx)($m,{open:t,onClose:()=>n(!1),maxWidth:`md`,children:s}):void 0]})}),YU=PO(`MachineCostPerYear`,{}),XU=PO(`AutomationCostPerYear`,null),ZU=PO(`Last30LaborCost`,null),QU=YE(e=>PO(`PerMonthLabor-`+e.getFullYear().toString()+`-`+e.getMonth().toString(),null)),$U=Z(e=>e(e(ER).type===`Last30`?ZE:tD).valuesToLazySeq().filter(e=>e.procsAndPaths.length===1&&e.procsAndPaths[0].paths.length===1&&e.procsAndPaths[0].paths[0].stops.length===1&&tk(e.procsAndPaths[0].paths[0].stops[0].expectedCycleTime)===0).toHashSet(e=>e.partName)),eW=Z(e=>{let t=e(ER),n=e(t.type===`Last30`?Mk:Fk),r=e(t.type===`Last30`?mL:gL),i=e($U),a=VC(ow(),-30),o=t.type===`Last30`?null:t.month;return LR(n.valuesToLazySeq(),i,r.matsById,o?{month:o}:{thirtyDaysAgo:a})}),tW=Z(e=>{let t=e(ER),n=e(YU),r=e(XU),i=e(t.type===`Last30`?ZU:QU(t.month));return RR(e(eW),n,r,i??0)});function nW(){let[e,t]=(0,L.useState)(null),[n,r]=JE(XU);return(0,R.jsx)(sx,{id:`auotmation-cost-year`,type:`number`,label:`Cost for automated handling system per year`,style:{marginTop:`1.5em`},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)},slotProps:{htmlInput:{min:0}}})}function rW(){let e=Q(ER),t=e.type===`Last30`?null:e.month,[n,r]=(0,L.useState)(null),[i,a]=JE(t===null?ZU:QU(t));return(0,R.jsx)(sx,{type:`number`,label:`Total labor cost for `+(t===null?`last 30 days`:t.toLocaleDateString(void 0,{month:`long`,year:`numeric`})),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)},slotProps:{htmlInput:{min:0}}})}function iW(e){let[t,n]=(0,L.useState)(null),[r,i]=JE(YU);return(0,R.jsx)(sx,{type:`number`,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)},slotProps:{htmlInput:{min:0}}})}function aW(){let e=Q(tW);return(0,R.jsx)(R.Fragment,{children:e.machineQuantities.keysToAscLazySeq().map((t,n)=>(0,R.jsx)(iW,{machineQuantities:e.machineQuantities,machineGroup:t},n))})}var oW=Intl.NumberFormat(void 0,{minimumFractionDigits:1,maximumFractionDigits:1}),sW=new Intl.NumberFormat(void 0,{style:`percent`,minimumFractionDigits:1,maximumFractionDigits:1});function cW(){ZI(`Cost Percentages`);let e=Q(eW);return(0,R.jsxs)(G,{sx:{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,{sx:{flexGrow:1}}),(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(ru,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>HR(e),size:`large`,children:(0,R.jsx)($x,{})})})]}),(0,R.jsx)(`main`,{children:(0,R.jsxs)(Yy,{stickyHeader:!0,children:[(0,R.jsx)(vb,{children:(0,R.jsxs)(Ab,{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)(nb,{children:X.of(e.parts).sortBy(e=>e.part).map((t,n)=>(0,R.jsxs)(Ab,{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)(bU,{part:t.part,size:25})}),(0,R.jsx)(`div`,{children:(0,R.jsx)(W,{variant:`body2`,component:`span`,sx:{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:sW.format(t.machine.get(e)??0)},e)),(0,R.jsx)(J,{align:`right`,children:sW.format(t.labor)}),(0,R.jsx)(J,{align:`right`,children:sW.format(t.automation)})]},n))})]})})]})}function lW(){let e=Q(tW);return(0,R.jsxs)(Yy,{stickyHeader:!0,children:[(0,R.jsx)(vb,{children:(0,R.jsxs)(Ab,{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)(ru,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>BR(e),size:`large`,children:(0,R.jsx)($x,{})})})]})]})}),(0,R.jsx)(nb,{children:X.of(e.parts).sortBy(e=>e.part).map((t,n)=>(0,R.jsxs)(Ab,{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)(bU,{part:t.part,size:25})}),(0,R.jsx)(`div`,{children:(0,R.jsx)(W,{variant:`body2`,component:`span`,sx:{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:oW.format(t.machine.get(e)??0)},e)),(0,R.jsx)(J,{align:`right`,children:oW.format(t.labor)}),(0,R.jsx)(J,{align:`right`,children:oW.format(t.automation)}),(0,R.jsx)(J,{align:`right`,children:oW.format(t.machine.valuesToAscLazySeq().sumBy(e=>e)+t.labor+t.automation)})]},n))})]})}var uW=(0,L.memo)(function(){return ZI(`Cost Per Piece`),(0,R.jsx)(G,{component:`main`,sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`20px`},children:(0,R.jsxs)(Zv,{direction:`column`,spacing:4,children:[(0,R.jsxs)(Zv,{direction:`column`,spacing:2,children:[(0,R.jsx)(rW,{}),(0,R.jsx)(nW,{}),(0,R.jsx)(aW,{})]}),(0,R.jsx)(lW,{})]})})}),dW=[{type:`Subheader`,caption:`Shop Floor`},{type:`Link`,route:{route:$.Station_LoadMonitor,loadNum:1,queues:[],completed:!1},icon:(0,R.jsx)(Lx,{}),label:`Load Station`},{type:`Link`,route:{route:$.Station_Queues,queues:[]},icon:(0,R.jsx)(Kx,{}),label:`Queue Management`},{type:`Link`,route:{route:$.Station_InspectionMonitor},icon:(0,R.jsx)(eS,{}),label:`Inspection Stand`},{type:`Link`,route:{route:$.Station_Closeout},icon:(0,R.jsx)(dS,{}),label:`Close Out`},{type:`Link`,route:{route:$.Tools_Dashboard},icon:(0,R.jsx)(wx,{}),label:`Tool Management`},{type:`Link`,route:{route:$.Station_Overview},icon:(0,R.jsx)(Dx,{}),label:`System Overview`},{type:`Subheader`,caption:`Daily Monitoring`},{type:`Link`,route:{route:$.Operations_Dashboard},icon:(0,R.jsx)(yS,{}),label:`Operation Management`},{type:`Link`,route:{route:$.Engineering_Cycles},icon:(0,R.jsx)(cS,{}),label:`Engineering`},{type:`Link`,route:{route:$.Quality_Dashboard},icon:(0,R.jsx)(SS,{}),label:`Quality Analysis`},{type:`Link`,route:{route:$.Sales_Dashboard},icon:(0,R.jsx)(fS,{}),label:`Sales`},{type:`Subheader`,caption:`Monthly Review`},{type:`Link`,route:{route:$.Analysis_Buffers},icon:(0,R.jsx)(tS,{}),label:`Flexibility Analysis`}];function fW(e){let t=(0,R.jsx)(Yc,{children:(0,R.jsx)(Vg,{component:`nav`,dense:!0,children:(e.modes??dW).map((t,n)=>t.type===`Subheader`?(0,R.jsx)(zf,{children:t.caption},n):(0,R.jsx)(e_,{children:(0,R.jsxs)(Jg,{onClick:()=>e.setRoute(t.route),children:[(0,R.jsx)(n_,{children:t.icon}),(0,R.jsx)(i_,{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 pW=[[`All`,`*`,`*`,` `,0,`All`],[`AllReadable`,`*`,`r`,` `,0,`All Readable`],[`AllCreatable`,`*`,`w`,` `,0,`All Creatable`],[`AllLinear`,`*`,`l`,` `,0,`All Linear`],[`AllMatrix`,`*`,`m`,` `,0,`All Matrix`],[`AllGS1`,`*`,`G`,` `,0,`All GS1`],[`AllRetail`,`*`,`R`,` `,0,`All Retail`],[`AllIndustrial`,`*`,`I`,` `,0,`All Industrial`],[`Codabar`,`F`,` `,`lrw `,18,`Codabar`],[`Code39`,`A`,` `,`lrw I`,8,`Code 39`],[`Code39Std`,`A`,`s`,`lrw I`,8,`Code 39 Standard`],[`Code39Ext`,`A`,`e`,`lr I`,9,`Code 39 Extended`],[`Code32`,`A`,`2`,`lr I`,129,`Code 32`],[`PZN`,`A`,`p`,`lr I`,52,`Pharmazentralnummer`],[`Code93`,`G`,` `,`lrw I`,25,`Code 93`],[`Code128`,`C`,` `,`lrwGI`,20,`Code 128`],[`ITF`,`I`,` `,`lrw I`,3,`ITF`],[`ITF14`,`I`,`4`,`lr I`,89,`ITF-14`],[`DataBar`,`e`,` `,`lr GR`,29,`DataBar`],[`DataBarOmni`,`e`,`o`,`lr GR`,29,`DataBar Omni`],[`DataBarStk`,`e`,`s`,`lr GR`,79,`DataBar Stacked`],[`DataBarStkOmni`,`e`,`O`,`lr GR`,80,`DataBar Stacked Omni`],[`DataBarLtd`,`e`,`l`,`lr GR`,30,`DataBar Limited`],[`DataBarExp`,`e`,`e`,`lr GR`,31,`DataBar Expanded`],[`DataBarExpStk`,`e`,`E`,`lr GR`,81,`DataBar Expanded Stacked`],[`EANUPC`,`E`,` `,`lr R`,15,`EAN/UPC`],[`EAN13`,`E`,`1`,`lrw R`,15,`EAN-13`],[`EAN8`,`E`,`8`,`lrw R`,10,`EAN-8`],[`EAN5`,`E`,`5`,`l R`,12,`EAN-5`],[`EAN2`,`E`,`2`,`l R`,11,`EAN-2`],[`ISBN`,`E`,`i`,`lr R`,69,`ISBN`],[`UPCA`,`E`,`a`,`lrw R`,34,`UPC-A`],[`UPCE`,`E`,`e`,`lrw R`,37,`UPC-E`],[`OtherBarcode`,`X`,` `,` r `,0,`Other barcode`],[`DXFilmEdge`,`X`,`x`,`lr `,147,`DX Film Edge`],[`PDF417`,`L`,` `,`mrw `,55,`PDF417`],[`CompactPDF417`,`L`,`c`,`mr `,56,`Compact PDF417`],[`MicroPDF417`,`L`,`m`,`m `,84,`MicroPDF417`],[`Aztec`,`z`,` `,`mr G `,92,`Aztec`],[`AztecCode`,`z`,`c`,`mrwG `,92,`Aztec Code`],[`AztecRune`,`z`,`r`,`mr `,128,`Aztec Rune`],[`QRCode`,`Q`,` `,`mrwG `,58,`QR Code`],[`QRCodeModel1`,`Q`,`1`,`mr `,0,`QR Code Model 1`],[`QRCodeModel2`,`Q`,`2`,`mr `,58,`QR Code Model 2`],[`MicroQRCode`,`Q`,`m`,`mr `,97,`Micro QR Code`],[`RMQRCode`,`Q`,`r`,`mr G `,145,`rMQR Code`],[`DataMatrix`,`d`,` `,`mrwG `,71,`Data Matrix`],[`MaxiCode`,`U`,` `,`mr `,57,`MaxiCode`]],mW={DataBarExpanded:`DataBarExp`,DataBarLimited:`DataBarLtd`,"Linear-Codes":`AllLinear`,"Matrix-Codes":`AllMatrix`,Any:`All`,rMQRCode:`RMQRCode`};pW.map(e=>e[5]),pW.filter(e=>e[1]===`*`).map(e=>e[0]),pW.filter(e=>e[1]!==`*`).map(e=>e[0]),pW.filter(e=>e[2]===` `).map(e=>e[0]),pW.filter(e=>e[3][0]===`l`).map(e=>e[0]),pW.filter(e=>e[3][0]===`m`).map(e=>e[0]),pW.filter(e=>e[3][1]===`r`).map(e=>e[0]),pW.filter(e=>e[3][2]===`w`||e[4]!==0).map(e=>e[0]),pW.filter(e=>e[3][3]===`G`).map(e=>e[0]),pW.filter(e=>e[3][4]===`R`).map(e=>e[0]),pW.filter(e=>e[3][4]===`I`).map(e=>e[0]);function hW(e){return mW[e]??e}function gW(e){return e.map(hW).join(`,`)}var _W=[`LocalAverage`,`GlobalHistogram`,`FixedThreshold`,`BoolCast`];function vW(e){return _W.indexOf(e)}var yW=`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.UTF8.UTF16LE.UTF32BE.UTF32LE.BINARY`.split(`.`);function bW(e){return e===`UnicodeBig`?yW.indexOf(`UTF16BE`):yW.indexOf(e)}var xW=[`Text`,`Binary`,`Mixed`,`GS1`,`ISO15434`,`UnknownECI`];function SW(e){return xW[e]}var CW=[`Ignore`,`Read`,`Require`];function wW(e){return CW.indexOf(e)}var TW=[`Plain`,`ECI`,`HRI`,`Escaped`,`Hex`,`HexECI`];function EW(e){return TW.indexOf(e)}var DW={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,tryDenoise:!1,binarizer:`LocalAverage`,isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,validateOptionalChecksum:!1,returnErrors:!1,eanAddOnSymbol:`Ignore`,textMode:`HRI`,characterSet:`Unknown`,tryCode39ExtendedMode:!0};function OW(e){return{...e,formats:gW(e.formats),binarizer:vW(e.binarizer),eanAddOnSymbol:wW(e.eanAddOnSymbol),textMode:EW(e.textMode),characterSet:bW(e.characterSet),tryCode39ExtendedMode:e.tryCode39ExtendedMode??!0}}function kW(e){return{...e,format:e.format,symbology:e.symbology,contentType:SW(e.contentType)}}var AW={format:`QRCode`,readerInit:!1,forceSquareDataMatrix:!1,ecLevel:``,scale:1,sizeHint:0,rotate:0,invert:!1,withHRT:!1,withQuietZones:!0,addHRT:!1,addQuietZones:!0,options:``},jW={locateFile:(e,t)=>{let n=e.match(/_(.+?)\.wasm$/);return n?`https://fastly.jsdelivr.net/npm/zxing-wasm@3.0.3/dist/${n[1]}/${e}`:t+e}},MW=new WeakMap;function NW(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 PW(e,{overrides:t,equalityFn:n=NW,fireImmediately:r=!1}={}){let[i,a]=MW.get(e)??[jW],o=t??i,s;if(r){if(a&&(s=n(i,o)))return a;let t=e({...o});return MW.set(e,[o,t]),t}(s??n(i,o))||MW.set(e,[o])}function FW(e){let t=e.byteLength>>2,n=new Uint8Array(t);for(let r=0;r<t;r++){let t=r<<2;n[r]=306*e[t]+601*e[t+1]+117*e[t+2]+512>>10}return n}async function IW(e,t,n=DW){let r={...DW,...n},i=await PW(e,{fireImmediately:!0}),a,o;if(`width`in t&&`height`in t&&`data`in t){let{data:e,width:n,height:s}=t,c=FW(e),l=c.byteLength;if(o=i._malloc(l),!o)throw Error(`Failed to allocate ${l} bytes in WASM memory`);try{i.HEAPU8.set(c,o),a=i.readBarcodesFromPixmap(o,n,s,OW(r))}finally{i._free(o)}}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`);if(o=i._malloc(e),!o)throw Error(`Failed to allocate ${e} bytes in WASM memory`);try{i.HEAPU8.set(n,o),a=i.readBarcodesFromImage(o,e,OW(r))}finally{i._free(o)}}let s=[];for(let e=0;e<a.size();++e)s.push(kW(a.get(e)));return s}({...DW}),[...DW.formats],{...AW};async function LW(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=!1;function x(){var e=dr.buffer;M=new Int8Array(e),ne=new Int16Array(e),i.HEAPU8=oe=new Uint8Array(e),ae=new Uint16Array(e),re=new Int32Array(e),P=new Uint32Array(e),N=new Float32Array(e),ie=new Float64Array(e)}function S(){if(i.preRun)for(typeof i.preRun==`function`&&(i.preRun=[i.preRun]);i.preRun.length;)ue(i.preRun.shift());F(le)}function C(){b=!0,ei.Ba()}function w(){if(i.postRun)for(typeof i.postRun==`function`&&(i.postRun=[i.postRun]);i.postRun.length;)ce(i.postRun.shift());F(se)}function T(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 E;function D(){return d(`zxing_reader.wasm`)}function O(e){if(e==E&&g)return new Uint8Array(g);if(p)return p(e);throw`both async and sync fetching of the wasm failed`}async function ee(e){if(!g)try{var t=await f(e);return new Uint8Array(t)}catch{}return O(e)}async function te(e,t){try{var n=await ee(e);return await WebAssembly.instantiate(n,t)}catch(e){h(`failed to asynchronously prepare wasm: ${e}`),T(e)}}async function k(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 te(t,n)}function A(){return{a:mr}}async function j(){function e(e,t){return ei=e.exports,pr(ei),x(),ei}function t(t){return e(t.instance)}var n=A();return i.instantiateWasm?new Promise((t,r)=>{i.instantiateWasm(n,(n,r)=>{t(e(n,r))})}):(E??=D(),t(await k(g,E,n)))}var ne,re,M,N,ie,ae,P,oe,F=e=>{for(;e.length>0;)e.shift()(i)},se=[],ce=e=>se.push(e),le=[],ue=e=>le.push(e),de=e=>rr(e),fe=()=>ir(),I=[],pe=0,me=e=>{var t=new _e(e);return t.get_caught()||(t.set_caught(!0),pe--),t.set_rethrown(!1),I.push(t),er(e)},he=0,ge=()=>{tr(0,0);var e=I.pop();ar(e.excPtr),he=0};class _e{constructor(e){this.excPtr=e,this.ptr=e-24}set_type(e){P[this.ptr+4>>2]=e}get_type(){return P[this.ptr+4>>2]}set_destructor(e){P[this.ptr+8>>2]=e}get_destructor(){return P[this.ptr+8>>2]}set_caught(e){e=+!!e,M[this.ptr+12]=e}get_caught(){return M[this.ptr+12]!=0}set_rethrown(e){e=+!!e,M[this.ptr+13]=e}get_rethrown(){return M[this.ptr+13]!=0}init(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)}set_adjusted_ptr(e){P[this.ptr+16>>2]=e}get_adjusted_ptr(){return P[this.ptr+16>>2]}}var ve=e=>nr(e),ye=e=>{var t=he;if(!t)return ve(0),0;var n=new _e(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(sr(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=I.pop();e||T(`no exception to throw`);var t=e.excPtr;throw e.get_rethrown()||(I.push(e),e.set_rethrown(!0),e.set_caught(!1),pe++),or(t),he=t,he},we=(e,t,n)=>{throw new _e(e).init(t,n),or(e),he=e,pe++,he},Te=()=>pe,Ee=e=>{throw he||=e,he},De=()=>T(``),Oe={},ke=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function Ae(e){return this.fromWireType(P[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=oe[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(oe[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=[],$e=()=>{for(;Qe.length;){var e=Qe.pop();e.$$.deleteScheduled=!1,e.delete()}},et,tt=()=>{let e=nt.prototype;Object.assign(e,{isAliasOf(e){if(!(this instanceof nt)||!(e instanceof nt))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`),Qe.push(this),Qe.length===1&&et&&et($e),this.$$.deleteScheduled=!0,this}});let t=Symbol.dispose;t&&(e[t]=e.delete)};function nt(){}var rt=(e,t)=>Object.defineProperty(t,"name",{value:e}),it={},at=(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}},ot=(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`),at(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)},st=48,ct=57,lt=e=>{e=e.replace(/[^a-zA-Z0-9_]/g,`$`);var t=e.charCodeAt(0);return t>=st&&t<=ct?`_${e}`:e};function ut(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 dt=(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},ft=e=>{if(e===null)return`null`;var t=typeof e;return t===`object`||t===`array`||t===`function`?e.toString():``+e};function pt(e,t){if(t===null)return this.isReference&&Ve(`null is not a valid ${this.name}`),0;t.$$||Ve(`Cannot pass "${ft(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 dt(t.$$.ptr,n,this.registeredClass)}function mt(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 "${ft(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=dt(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,Wt.toHandle(()=>i.delete())),e!==null&&e.push(this.rawDestructor,n)}break;default:Ve(`Unsupported sharing policy`)}return n}function ht(e,t){if(t===null)return this.isReference&&Ve(`null is not a valid ${this.name}`),0;t.$$||Ve(`Cannot pass "${ft(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 dt(t.$$.ptr,n,this.registeredClass)}var gt=(e,t,n)=>{if(t===n)return e;if(n.baseClass===void 0)return null;var r=gt(e,t,n.baseClass);return r===null?null:n.downcast(r)},_t={},vt=(e,t)=>{for(t===void 0&&Ve(`ptr should not be undefined`);e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},yt=(e,t)=>(t=vt(e,t),_t[t]),bt=(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 xt(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var n=yt(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?bt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):bt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a=it[this.registeredClass.getActualType(t)];if(!a)return i.call(this);var o=this.isConst?a.constPointerType:a.pointerType,s=gt(t,this.registeredClass,o.registeredClass);return s===null?i.call(this):this.isSmartPointer?bt(o.registeredClass.instancePrototype,{ptrType:o,ptr:s,smartPtrType:this,smartPtr:e}):bt(o.registeredClass.instancePrototype,{ptrType:o,ptr:s})}var St=()=>{Object.assign(Ct.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:xt})};function Ct(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=pt,this.destructorFunction=null):(this.toWireType=ht,this.destructorFunction=null):this.toWireType=mt}var wt=(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)},Tt={},Et=(e,t,n)=>{e=e.replace(/p/g,`i`);var r=Tt[e];return r(t,...n)},Dt=[],Ot=e=>{var t=Dt[e];return t||(Dt[e]=t=fr.get(e)),t},kt=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(arguments.length>3&&arguments[3]!==void 0&&arguments[3],e.includes(`j`))return Et(e,t,n);var r=Ot(t)(...n);function i(e){return e}return i(r)},L=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return function(){return kt(e,t,[...arguments],n)}},At=function(e,t){arguments.length>2&&arguments[2]!==void 0&&arguments[2],e=ze(e);function n(){return e.includes(`j`)?L(e,t):Ot(t)}var r=n();return typeof r!=`function`&&Ve(`unknown function pointer with signature ${e}: ${t}`),r};class jt extends Error{}var Mt=e=>{var t=Zn(e),n=ze(t);return Qn(t),n},Nt=(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 jt(`${e}: `+n.map(Mt).join([`, `]))},Pt=(e,t,n,r,i,a,o,s,c,l,u,d,f)=>{u=ze(u),a=At(i,a),s&&=At(o,s),l&&=At(c,l),f=At(d,f);var p=lt(u);ot(p,function(){Nt(`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=nt.prototype;var o=rt(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 ut(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 Ct(u,d,!0,!1,!1),g=new Ct(u+`*`,d,!1,!1,!1),_=new Ct(u+` const*`,d,!1,!0,!1);return it[e]={pointerType:g,constPointerType:_},wt(p,o),[h,g,_]})},Ft=(e,t)=>{for(var n=[],r=0;r<e;r++)n.push(P[t+r*4>>2]);return n};function It(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].destructorFunction===void 0)return!0;return!1}function Lt(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=It(t),l=!t[0].isVoid,u=o-2,d=Array(u),f=[],p=[];return rt(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 Rt=(e,t,n,r,i,a)=>{var o=Ft(t,n);i=At(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]=()=>{Nt(`Cannot construct ${e.name} due to unbound types`,o)},Ie([],o,r=>(r.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Lt(n,r,null,i,a),[])),[]})},zt=e=>{e=e.trim();let t=e.indexOf(`(`);return t===-1?e:e.slice(0,t)},Bt=(e,t,n,r,i,a,o,s,c,l)=>{var u=Ft(n,r);t=ze(t),t=zt(t),a=At(i,a,c),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(){Nt(`Cannot call ${r} due to unbound types`,u)}var l=e.registeredClass.instancePrototype,d=l[t];return d===void 0||d.overloadTable===void 0&&d.className!==e.name&&d.argCount===n-2?(i.argCount=n-2,i.className=e.name,l[t]=i):(at(l,t,r),l[t].overloadTable[n-2]=i),Ie([],u,i=>{var s=Lt(r,i,e,a,o,c);return l[t].overloadTable===void 0?(s.argCount=n-2,l[t]=s):l[t].overloadTable[n-2]=s,[]}),[]})},Vt=[],Ht=[0,1,,1,null,1,!0,1,!1,1],Ut=e=>{e>9&&--Ht[e+1]===0&&(Ht[e]=void 0,Vt.push(e))},Wt={toValue:e=>(e||Ve(`Cannot use deleted val. handle = ${e}`),Ht[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=Vt.pop()||Ht.length;return Ht[t]=e,Ht[t+1]=1,t}}}},Gt={name:`emscripten::val`,fromWireType:e=>{var t=Wt.toValue(e);return Ut(e),t},toWireType:(e,t)=>Wt.toHandle(t),readValueFromPointer:Ae,destructorFunction:null},Kt=e=>Ue(e,Gt),qt=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(N[e>>2])};case 8:return function(e){return this.fromWireType(ie[e>>3])};default:throw TypeError(`invalid float width (${t}): ${e}`)}},Jt=(e,t,n)=>{t=ze(t),Ue(e,{name:t,fromWireType:e=>e,toWireType:(e,t)=>t,readValueFromPointer:qt(t,n),destructorFunction:null})},Yt=(e,t,n,r,i,a,o,s)=>{var c=Ft(t,n);e=ze(e),e=zt(e),i=At(r,i,o),ot(e,function(){Nt(`Cannot call ${e} due to unbound types`,c)},t-1),Ie([],c,n=>{var r=[n[0],null].concat(n.slice(1));return wt(e,Lt(e,r,null,i,a,o),t-1),[]})},Xt=(e,t,n)=>{switch(t){case 1:return n?e=>M[e]:e=>oe[e];case 2:return n?e=>ne[e>>1]:e=>ae[e>>1];case 4:return n?e=>re[e>>2]:e=>P[e>>2];default:throw TypeError(`invalid integer width (${t}): ${e}`)}},Zt=(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:Xt(t,n,r!==0),destructorFunction:null})},Qt=(e,t,n)=>{let r=(e,t)=>{let n=0;return{next(){if(n>=e)return{done:!0};let r=n;return n++,{value:t(r),done:!1}},[Symbol.iterator](){return this}}};e[Symbol.iterator]||(e[Symbol.iterator]=function(){return r(this[t](),e=>this[n](e))})},$t=(e,t,n,r)=>{n=ze(n),r=ze(r),Ie([],[e,t],e=>{let t=e[0];return Qt(t.registeredClass.instancePrototype,n,r),[]})},en=(e,t,n)=>{var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function i(e){var t=P[e>>2],n=P[e+4>>2];return new r(M.buffer,n,t)}n=ze(n),Ue(e,{name:n,fromWireType:i,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},tn=Object.assign({optional:!0},Gt),nn=(e,t)=>{Ue(e,tn)},rn=(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},R=(e,t,n)=>rn(e,oe,t,n),an=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},on=globalThis.TextDecoder&&new TextDecoder,sn=(e,t,n,r)=>{var i=t+n;if(r)return i;for(;e[t]&&!(t>=i);)++t;return t},cn=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=sn(e,t,n,r);if(i-t>16&&e.buffer&&on)return on.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},ln=(e,t,n)=>e?cn(oe,e,t,n):``,un=(e,t)=>{t=ze(t);var n=!0;Ue(e,{name:t,fromWireType(e){var t=P[e>>2],r=e+4,i;if(n)i=ln(r,t,!0);else{i=``;for(var a=0;a<t;++a)i+=String.fromCharCode(oe[r+a])}return Qn(e),i},toWireType(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var r,i=typeof t==`string`;i||ArrayBuffer.isView(t)&&t.BYTES_PER_ELEMENT==1||Ve(`Cannot pass non-string to std::string`),r=n&&i?an(t):t.length;var a=$n(4+r+1),o=a+4;if(P[a>>2]=r,i)if(n)R(t,o,r+1);else for(var s=0;s<r;++s){var c=t.charCodeAt(s);c>255&&(Qn(a),Ve(`String has UTF-16 code units that do not fit in 8 bits`)),oe[o+s]=c}else oe.set(t,o);return e!==null&&e.push(Qn,a),a},readValueFromPointer:Ae,destructorFunction(e){Qn(e)}})},dn=globalThis.TextDecoder?new TextDecoder(`utf-16le`):void 0,fn=(e,t,n)=>{var r=e>>1,i=sn(ae,r,t/2,n);if(i-r>16&&dn)return dn.decode(ae.subarray(r,i));for(var a=``,o=r;o<i;++o){var s=ae[o];a+=String.fromCharCode(s)}return a},pn=(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);ne[t>>1]=o,t+=2}return ne[t>>1]=0,t-r},mn=e=>e.length*2,hn=(e,t,n)=>{for(var r=``,i=e>>2,a=0;!(a>=t/4);a++){var o=P[i+a];if(!o&&!n)break;r+=String.fromCodePoint(o)}return r},gn=(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++,re[t>>2]=o,t+=4,t+4>i)break}return re[t>>2]=0,t-r},_n=e=>{for(var t=0,n=0;n<e.length;++n)e.codePointAt(n)>65535&&n++,t+=4;return t},vn=(e,t,n)=>{n=ze(n);var r,i,a;t===2?(r=fn,i=pn,a=mn):(r=hn,i=gn,a=_n),Ue(e,{name:n,fromWireType:e=>{var n=P[e>>2],i=r(e+4,n*t,!0);return Qn(e),i},toWireType:(e,r)=>{typeof r!=`string`&&Ve(`Cannot pass non-string to C++ string type ${n}`);var o=a(r),s=$n(4+o+t);return P[s>>2]=o/t,i(r,s+4,o+t),e!==null&&e.push(Qn,s),s},readValueFromPointer:Ae,destructorFunction(e){Qn(e)}})},yn=(e,t,n,r,i,a)=>{Oe[e]={name:ze(t),rawConstructor:At(n,r),rawDestructor:At(i,a),fields:[]}},bn=(e,t,n,r,i,a,o,s,c,l)=>{Oe[e].fields.push({fieldName:ze(t),getterReturnType:n,getter:At(r,i),getterContext:a,setterArgumentType:o,setter:At(s,c),setterContext:l})},xn=(e,t)=>{t=ze(t),Ue(e,{isVoid:!0,name:t,fromWireType:()=>void 0,toWireType:(e,t)=>void 0})},Sn=[],Cn=e=>{var t=Sn.length;return Sn.push(e),t},wn=(e,t)=>{var n=Me[e];return n===void 0&&Ve(`${t} has unknown type ${Mt(e)}`),n},Tn=(e,t)=>{for(var n=Array(e),r=0;r<e;++r)n[r]=wn(P[t+r*4>>2],`parameter ${r}`);return n},En=(e,t,n)=>{var r=[],i=e(r,n);return r.length&&(P[t>>2]=Wt.toHandle(r)),i},Dn={},On=e=>{var t=Dn[e];return t===void 0?ze(e):t},kn=(e,t,n)=>{var r=8,[i,...a]=Tn(e,t),o=i.toWireType.bind(i),s=a.map(e=>e.readValueFromPointer.bind(e));e--;var c=Array(e);return Cn(rt(`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=Wt.toValue(t).apply(null,c);break;case 2:f=Reflect.construct(Wt.toValue(t),c);break;case 3:f=c[0];break;case 1:f=Wt.toValue(t)[On(i)](...c);break}return En(o,a,f)}))},An=e=>e?(e=On(e),Wt.toHandle(globalThis[e])):Wt.toHandle(globalThis),jn=e=>{e>9&&(Ht[e+1]+=1)},Mn=(e,t,n,r,i)=>Sn[e](t,n,r,i),Nn=e=>{ke(Wt.toValue(e)),Ut(e)},Pn=(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);P[e>>2]=l*60,re[t>>2]=Number(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?(R(d,n,17),R(f,r,17)):(R(d,r,17),R(f,n,17))},Fn=()=>2147483648,In=(e,t)=>Math.ceil(e/t)*t,Ln=e=>{var t=(e-dr.buffer.byteLength+65535)/65536|0;try{return dr.grow(t),x(),1}catch{}},Rn=e=>{var t=oe.length;e>>>=0;var n=Fn();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),Ln(Math.min(n,In(Math.max(e,i),65536))))return!0}return!1},zn={},Bn=()=>c||`./this.program`,Vn=()=>{if(!Vn.strings){var e={USER:`web_user`,LOGNAME:`web_user`,PATH:`/`,PWD:`/`,HOME:`/home/web_user`,LANG:(globalThis.navigator?.language??`C`).replace(`-`,`_`)+`.UTF-8`,_:Bn()};for(var t in zn)zn[t]===void 0?delete e[t]:e[t]=zn[t];var n=[];for(var t in e)n.push(`${t}=${e[t]}`);Vn.strings=n}return Vn.strings},Hn=(e,t)=>{var n=0,r=0;for(var i of Vn()){var a=t+n;P[e+r>>2]=a,n+=R(i,a,1/0)+1,r+=4}return 0},Un=(e,t)=>{var n=Vn();P[e>>2]=n.length;var r=0;for(var i of n)r+=an(i)+1;return P[t>>2]=r,0},Wn=e=>52,Gn=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+t*4294967296:NaN;function Kn(e,t,n,r,i){return Gn(t,n),70}var qn=[null,[],[]],Jn=(e,t)=>{var n=qn[e];t===0||t===10?((e===1?m:h)(cn(n)),n.length=0):n.push(t)},Yn=(e,t,n,r)=>{for(var i=0,a=0;a<n;a++){var o=P[t>>2],s=P[t+4>>2];t+=8;for(var c=0;c<s;c++)Jn(e,oe[o+c]);i+=s}return P[r>>2]=i,0},Xn=e=>e;if(tt(),St(),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 Zn,Qn,$n,er,tr,nr,rr,ir,ar,or,sr,cr,lr,ur,dr,fr;function pr(e){Zn=e.Ca,Qn=i._free=e.Da,$n=i._malloc=e.Fa,er=e.Ga,tr=e.Ha,nr=e.Ia,rr=e.Ja,ir=e.Ka,ar=e.La,or=e.Ma,sr=e.Na,Tt.viijii=e.Oa,cr=Tt.viijjijjjjjj=e.Pa,lr=Tt.iiijj=e.Qa,Tt.jiji=e.Ra,ur=Tt.jiiii=e.Sa,Tt.iiiiij=e.Ta,Tt.iiiiijj=e.Ua,Tt.iiiiiijj=e.Va,dr=e.Aa,fr=e.Ea}var mr={s:me,x:ge,a:be,i:xe,m:Se,R:Ce,p:we,ga:Te,d:Ee,ca:De,xa:Le,ba:Re,ra:We,va:Pt,ua:Rt,H:Bt,pa:Kt,X:Jt,Y:Yt,A:Zt,ta:$t,u:en,wa:nn,qa:un,S:vn,I:yn,ya:bn,sa:xn,O:kn,za:Ut,E:An,T:jn,N:Mn,la:Nn,da:Pn,ha:Rn,ea:Hn,fa:Un,ia:Wn,_:Kn,V:Yn,na:Ir,M:zr,C:Gr,P:Sr,U:qr,q:Fr,b:_r,F:Rr,ka:Ur,c:yr,ja:Wr,g:xr,j:Or,r:Ar,Q:Lr,t:Mr,G:Nr,B:Pr,K:Jr,$:Zr,Z:Qr,f:Cr,l:hr,e:vr,W:Br,h:br,L:Kr,k:gr,ma:Vr,o:jr,y:Tr,v:kr,D:Dr,w:Hr,n:wr,J:Yr,oa:Er,aa:Xr,z:Xn};function hr(e,t){var n=fe();try{Ot(e)(t)}catch(e){if(de(n),e!==e+0)throw e;tr(1,0)}}function gr(e,t,n,r,i){var a=fe();try{Ot(e)(t,n,r,i)}catch(e){if(de(a),e!==e+0)throw e;tr(1,0)}}function _r(e,t){var n=fe();try{return Ot(e)(t)}catch(e){if(de(n),e!==e+0)throw e;tr(1,0)}}function vr(e,t,n){var r=fe();try{Ot(e)(t,n)}catch(e){if(de(r),e!==e+0)throw e;tr(1,0)}}function yr(e,t,n){var r=fe();try{return Ot(e)(t,n)}catch(e){if(de(r),e!==e+0)throw e;tr(1,0)}}function br(e,t,n,r){var i=fe();try{Ot(e)(t,n,r)}catch(e){if(de(i),e!==e+0)throw e;tr(1,0)}}function xr(e,t,n,r){var i=fe();try{return Ot(e)(t,n,r)}catch(e){if(de(i),e!==e+0)throw e;tr(1,0)}}function Sr(e,t,n,r,i,a){var o=fe();try{return Ot(e)(t,n,r,i,a)}catch(e){if(de(o),e!==e+0)throw e;tr(1,0)}}function Cr(e){var t=fe();try{Ot(e)()}catch(e){if(de(t),e!==e+0)throw e;tr(1,0)}}function wr(e,t,n,r,i,a,o,s,c,l,u){var d=fe();try{Ot(e)(t,n,r,i,a,o,s,c,l,u)}catch(e){if(de(d),e!==e+0)throw e;tr(1,0)}}function Tr(e,t,n,r,i,a,o){var s=fe();try{Ot(e)(t,n,r,i,a,o)}catch(e){if(de(s),e!==e+0)throw e;tr(1,0)}}function Er(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g){var _=fe();try{Ot(e)(t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g)}catch(e){if(de(_),e!==e+0)throw e;tr(1,0)}}function Dr(e,t,n,r,i,a,o,s,c){var l=fe();try{Ot(e)(t,n,r,i,a,o,s,c)}catch(e){if(de(l),e!==e+0)throw e;tr(1,0)}}function Or(e,t,n,r,i){var a=fe();try{return Ot(e)(t,n,r,i)}catch(e){if(de(a),e!==e+0)throw e;tr(1,0)}}function kr(e,t,n,r,i,a,o,s){var c=fe();try{Ot(e)(t,n,r,i,a,o,s)}catch(e){if(de(c),e!==e+0)throw e;tr(1,0)}}function Ar(e,t,n,r,i,a){var o=fe();try{return Ot(e)(t,n,r,i,a)}catch(e){if(de(o),e!==e+0)throw e;tr(1,0)}}function jr(e,t,n,r,i,a){var o=fe();try{Ot(e)(t,n,r,i,a)}catch(e){if(de(o),e!==e+0)throw e;tr(1,0)}}function Mr(e,t,n,r,i,a,o){var s=fe();try{return Ot(e)(t,n,r,i,a,o)}catch(e){if(de(s),e!==e+0)throw e;tr(1,0)}}function Nr(e,t,n,r,i,a,o,s){var c=fe();try{return Ot(e)(t,n,r,i,a,o,s)}catch(e){if(de(c),e!==e+0)throw e;tr(1,0)}}function Pr(e,t,n,r,i,a,o,s,c){var l=fe();try{return Ot(e)(t,n,r,i,a,o,s,c)}catch(e){if(de(l),e!==e+0)throw e;tr(1,0)}}function Fr(e){var t=fe();try{return Ot(e)()}catch(e){if(de(t),e!==e+0)throw e;tr(1,0)}}function Ir(e,t,n){var r=fe();try{return Ot(e)(t,n)}catch(e){if(de(r),e!==e+0)throw e;tr(1,0)}}function Lr(e,t,n,r,i,a,o){var s=fe();try{return Ot(e)(t,n,r,i,a,o)}catch(e){if(de(s),e!==e+0)throw e;tr(1,0)}}function Rr(e,t,n,r){var i=fe();try{return Ot(e)(t,n,r)}catch(e){if(de(i),e!==e+0)throw e;tr(1,0)}}function zr(e,t,n,r){var i=fe();try{return Ot(e)(t,n,r)}catch(e){if(de(i),e!==e+0)throw e;tr(1,0)}}function Br(e,t,n,r,i,a,o,s,c){var l=fe();try{Ot(e)(t,n,r,i,a,o,s,c)}catch(e){if(de(l),e!==e+0)throw e;tr(1,0)}}function Vr(e,t,n,r,i,a,o,s){var c=fe();try{Ot(e)(t,n,r,i,a,o,s)}catch(e){if(de(c),e!==e+0)throw e;tr(1,0)}}function Hr(e,t,n,r,i,a,o,s,c,l){var u=fe();try{Ot(e)(t,n,r,i,a,o,s,c,l)}catch(e){if(de(u),e!==e+0)throw e;tr(1,0)}}function Ur(e,t,n){var r=fe();try{return Ot(e)(t,n)}catch(e){if(de(r),e!==e+0)throw e;tr(1,0)}}function Wr(e,t,n,r,i){var a=fe();try{return Ot(e)(t,n,r,i)}catch(e){if(de(a),e!==e+0)throw e;tr(1,0)}}function Gr(e,t,n,r,i,a){var o=fe();try{return Ot(e)(t,n,r,i,a)}catch(e){if(de(o),e!==e+0)throw e;tr(1,0)}}function Kr(e,t,n,r,i,a,o){var s=fe();try{Ot(e)(t,n,r,i,a,o)}catch(e){if(de(s),e!==e+0)throw e;tr(1,0)}}function qr(e,t,n,r){var i=fe();try{return Ot(e)(t,n,r)}catch(e){if(de(i),e!==e+0)throw e;tr(1,0)}}function Jr(e,t,n,r,i,a,o,s,c,l,u,d){var f=fe();try{return Ot(e)(t,n,r,i,a,o,s,c,l,u,d)}catch(e){if(de(f),e!==e+0)throw e;tr(1,0)}}function Yr(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){var g=fe();try{Ot(e)(t,n,r,i,a,o,s,c,l,u,d,f,p,m,h)}catch(e){if(de(g),e!==e+0)throw e;tr(1,0)}}function Xr(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y){var b=fe();try{cr(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y)}catch(e){if(de(b),e!==e+0)throw e;tr(1,0)}}function Zr(e,t,n,r,i,a,o){var s=fe();try{return lr(e,t,n,r,i,a,o)}catch(e){if(de(s),e!==e+0)throw e;tr(1,0)}}function Qr(e,t,n,r,i){var a=fe();try{return ur(e,t,n,r,i)}catch(e){if(de(a),e!==e+0)throw e;tr(1,0)}}function $r(){S();function e(){var e,t;i.calledRun=!0,!_&&(C(),(e=v)==null||e(i),(t=i.onRuntimeInitialized)==null||t.call(i),w())}i.setStatus?(i.setStatus(`Running...`),setTimeout(()=>{setTimeout(()=>i.setStatus(``),1),e()},1)):e()}var ei=await j();return $r(),t=b?i:new Promise((e,t)=>{v=e,y=t}),t}function RW(e){return PW(LW,e)}async function zW(e,t){return IW(LW,e,t)}var BW=[[`aztec`,`Aztec`],[`aztec_code`,`AztecCode`],[`aztec_rune`,`AztecRune`],[`code_128`,`Code128`],[`code_39`,`Code39`],[`code_39_standard`,`Code39Std`],[`code_39_extended`,`Code39Ext`],[`code_32`,`Code32`],[`pzn`,`PZN`],[`code_93`,`Code93`],[`codabar`,`Codabar`],[`databar`,`DataBar`],[`databar_omni`,`DataBarOmni`],[`databar_stacked`,`DataBarStk`],[`databar_stacked_omni`,`DataBarStkOmni`],[`databar_expanded`,`DataBarExp`],[`databar_expanded_stacked`,`DataBarExpStk`],[`databar_limited`,`DataBarLtd`],[`data_matrix`,`DataMatrix`],[`dx_film_edge`,`DXFilmEdge`],[`ean_13`,`EAN13`],[`ean_upc`,`EANUPC`],[`isbn`,`ISBN`],[`ean_8`,`EAN8`],[`itf`,`ITF`],[`itf_14`,`ITF14`],[`maxi_code`,`MaxiCode`],[`micro_qr_code`,`MicroQRCode`],[`pdf417`,`PDF417`],[`compact_pdf417`,`CompactPDF417`],[`qr_code`,`QRCode`],[`qr_code_model_1`,`QRCodeModel1`],[`qr_code_model_2`,`QRCodeModel2`],[`rm_qr_code`,`RMQRCode`],[`upc_a`,`UPCA`],[`upc_e`,`UPCE`],[`other_barcode`,`OtherBarcode`],[`linear_codes`,`AllLinear`],[`matrix_codes`,`AllMatrix`],[`gs1_codes`,`AllGS1`],[`retail_codes`,`AllRetail`],[`industrial_codes`,`AllIndustrial`],[`any`,`All`]],VW=[...BW,[`unknown`]].map(e=>e[0]),HW=new Map(BW);function UW(e){for(let[t,n]of HW)if(e===n)return t;return`unknown`}function WW(e){if(GW(e))return{width:e.naturalWidth,height:e.naturalHeight};if(KW(e))return{width:e.width.baseVal.value,height:e.height.baseVal.value};if(qW(e))return{width:e.videoWidth,height:e.videoHeight};if(YW(e))return{width:e.width,height:e.height};if(ZW(e))return{width:e.displayWidth,height:e.displayHeight};if(JW(e)||XW(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 GW(e){try{var t;return e instanceof(e==null||(t=e.ownerDocument)==null||(t=t.defaultView)==null?void 0:t.HTMLImageElement)}catch{return!1}}function KW(e){try{var t;return e instanceof(e==null||(t=e.ownerDocument)==null||(t=t.defaultView)==null?void 0:t.SVGImageElement)}catch{return!1}}function qW(e){try{var t;return e instanceof(e==null||(t=e.ownerDocument)==null||(t=t.defaultView)==null?void 0:t.HTMLVideoElement)}catch{return!1}}function JW(e){try{var t;return e instanceof(e==null||(t=e.ownerDocument)==null||(t=t.defaultView)==null?void 0:t.HTMLCanvasElement)}catch{return!1}}function YW(e){try{return e instanceof ImageBitmap||Object.prototype.toString.call(e)===`[object ImageBitmap]`}catch{return!1}}function XW(e){try{return e instanceof OffscreenCanvas||Object.prototype.toString.call(e)===`[object OffscreenCanvas]`}catch{return!1}}function ZW(e){try{return e instanceof VideoFrame||Object.prototype.toString.call(e)===`[object VideoFrame]`}catch{return!1}}function QW(e){try{return e instanceof Blob||Object.prototype.toString.call(e)===`[object Blob]`}catch{return!1}}function $W(e){try{return e instanceof ImageData||Object.prototype.toString.call(e)===`[object ImageData]`}catch{return!1}}function eG(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 tG(e){if(GW(e)&&!await aG(e))throw new DOMException(`Failed to load or decode HTMLImageElement.`,`InvalidStateError`);if(KW(e)&&!await oG(e))throw new DOMException(`Failed to load or decode SVGImageElement.`,`InvalidStateError`);if(ZW(e)&&sG(e))throw new DOMException(`VideoFrame is closed.`,`InvalidStateError`);if(qW(e)&&(e.readyState===0||e.readyState===1))throw new DOMException(`Invalid element or state.`,`InvalidStateError`);if(YW(e)&&lG(e))throw new DOMException(`The image source is detached.`,`InvalidStateError`);let{width:t,height:n}=WW(e);if(t===0||n===0)return null;let r=eG(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 nG(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 tG(t)}function rG(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 iG(e){if(QW(e))return await nG(e);if($W(e)){if(cG(e))throw new DOMException(`The image data has been detached.`,`InvalidStateError`);return e}return JW(e)||XW(e)?rG(e):await tG(e)}async function aG(e){try{return await e.decode(),!0}catch{return!1}}async function oG(e){try{return await e.decode?.call(e),!0}catch{return!1}}function sG(e){return e.format===null}function cG(e){return e.data.buffer.byteLength===0}function lG(e){return e.width===0&&e.height===0}function uG(e,t){return dG(e)?new DOMException(`${t}: ${e.message}`,e.name):fG(e)?new e.constructor(`${t}: ${e.message}`):Error(`${t}: ${e}`)}function dG(e){return e instanceof DOMException||Object.prototype.toString.call(e)===`[object DOMException]`}function fG(e){return e instanceof Error||Object.prototype.toString.call(e)===`[object Error]`}function pG(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function mG(e,t,n){pG(e,t),t.set(e,n)}function hG(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function gG(e,t,n){return e.set(hG(e,t),n),n}function _G(e,t){return e.get(hG(e,t))}var vG=new WeakMap,yG=class{constructor(e={}){mG(this,vG,void 0);try{var t;let n=e==null||(t=e.formats)==null?void 0:t.filter(e=>e!==`unknown`);if(n?.length===0)throw TypeError(`Hint option provided, but is empty.`);for(let e of n??[])if(!HW.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.`);gG(vG,this,n??[]),RW({fireImmediately:!0}).catch(()=>{})}catch(e){throw uG(e,`Failed to construct 'BarcodeDetector'`)}}static async getSupportedFormats(){return VW.filter(e=>e!==`unknown`)}async detect(e){try{let t=await iG(e);if(t===null)return[];let n,r={textMode:`Plain`,formats:_G(vG,this).map(e=>HW.get(e))};try{n=await zW(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 uG(e,`Failed to execute 'detect' on 'BarcodeDetector'`)}}},bG=!0,xG=!0;function SG(e,t,n){let r=e.match(t);return r&&r.length>=n&&parseFloat(r[n],10)}function CG(e,t,n){if(!e.RTCPeerConnection)return;if(!Object.getOwnPropertyDescriptor(EventTarget.prototype,`addEventListener`).writable){EG(`Unable to polyfill events`);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 wG(e){return typeof e==`boolean`?(bG=e,e?`adapter.js logging disabled`:`adapter.js logging enabled`):Error(`Argument type: `+typeof e+`. Please use a boolean.`)}function TG(e){return typeof e==`boolean`?(xG=!e,`adapter.js deprecation warnings `+(e?`disabled`:`enabled`)):Error(`Argument type: `+typeof e+`. Please use a boolean.`)}function EG(){if(typeof window==`object`){if(bG)return;typeof console<`u`&&typeof console.log==`function`&&console.log.apply(console,arguments)}}function DG(e,t){xG&&console.warn(e+` is deprecated, please use `+t+` instead.`)}function OG(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(SG(n.userAgent,/Firefox\/(\d+)\./,1));else if(n.webkitGetUserMedia||e.isSecureContext===!1&&e.webkitRTCPeerConnection)t.browser=`chrome`,t.version=parseInt(SG(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2))||null;else if(e.RTCPeerConnection&&n.userAgent.match(/AppleWebKit\/(\d+)\./))t.browser=`safari`,t.version=parseInt(SG(n.userAgent,/AppleWebKit\/(\d+)\./,1)),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&`currentDirection`in e.RTCRtpTransceiver.prototype,t._safariVersion=SG(n.userAgent,/Version\/(\d+(\.?\d+))/,1);else return t.browser=`Not a supported browser.`,t;return t}function kG(e){return Object.prototype.toString.call(e)===`[object Object]`}function AG(e){return kG(e)?Object.keys(e).reduce(function(t,n){let r=kG(e[n]),i=r?AG(e[n]):e[n],a=r&&!Object.keys(i).length;return i===void 0||a?t:Object.assign(t,{[n]:i})},{}):e}function jG(e,t,n){!t||n.has(t.id)||(n.set(t.id,t),Object.keys(t).forEach(r=>{r.endsWith(`Id`)?jG(e,e.get(t[r]),n):r.endsWith(`Ids`)&&t[r].forEach(t=>{jG(e,e.get(t),n)})}))}function MG(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&&jG(e,n,i)})}),i}var NG=EG;function PG(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),NG(`chrome: `+JSON.stringify(e)),i(e)})}e.video=r(e.video)}return NG(`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 FG=s({fixNegotiationNeeded:()=>UG,shimAddTrackRemoveTrack:()=>VG,shimAddTrackRemoveTrackWithNative:()=>BG,shimGetSendersWithDtmf:()=>RG,shimGetUserMedia:()=>PG,shimMediaStream:()=>IG,shimOnTrack:()=>LG,shimPeerConnection:()=>HG,shimSenderReceiverGetStats:()=>zG});function IG(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function LG(e,t){if(!(t.version>102))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 CG(e,`track`,e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e))}function RG(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 zG(e,t){if(t.version>=67||!(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=>MG(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}),CG(e,`track`,e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){let e=this;return this._pc.getStats().then(t=>MG(t,e.track,!1))}}if(!(`getStats`in e.RTCRtpSender.prototype&&`getStats`in e.RTCRtpReceiver.prototype))return;let n=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 n.apply(this,arguments)}}function BG(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 VG(e,t){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return BG(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 HG(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 UG(e,t){t.version>102||CG(e,`negotiationneeded`,e=>{let n=e.target;if(!((t.version<72||n.getConfiguration&&n.getConfiguration().sdpSemantics===`plan-b`)&&n.signalingState!==`stable`))return e})}function WG(e,t){let n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,r){DG(`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 GG(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 KG=s({shimAddTransceiver:()=>eK,shimCreateAnswer:()=>rK,shimCreateOffer:()=>nK,shimGetDisplayMedia:()=>GG,shimGetParameters:()=>tK,shimGetStats:()=>YG,shimGetUserMedia:()=>WG,shimOnTrack:()=>qG,shimPeerConnection:()=>JG,shimRTCDataChannel:()=>$G,shimReceiverGetStats:()=>ZG,shimRemoveStream:()=>QG,shimSenderGetStats:()=>XG});function qG(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 JG(e,t){typeof e!=`object`||!(e.RTCPeerConnection||e.mozRTCPeerConnection)||(!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]}))}function YG(e,t){if(typeof e!=`object`||!(e.RTCPeerConnection||e.mozRTCPeerConnection)||t.version>=151)return;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 this.signalingState===`closed`?Promise.resolve(new Map):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 XG(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 ZG(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}),CG(e,`track`,e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function QG(e){!e.RTCPeerConnection||`removeStream`in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){DG(`removeStream`,`removeTrack`),this.getSenders().forEach(t=>{t.track&&e.getTracks().includes(t.track)&&this.removeTrack(t)})})}function $G(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function eK(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 tK(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 nK(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 rK(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 iK=s({shimAudioContext:()=>pK,shimCallbacksAPI:()=>sK,shimConstraints:()=>lK,shimCreateOfferLegacy:()=>fK,shimGetUserMedia:()=>cK,shimLocalStreamsAPI:()=>aK,shimRTCIceServerUrls:()=>uK,shimRemoteStreamsAPI:()=>oK,shimTrackEventTransceiver:()=>dK});function aK(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 oK(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 sK(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 cK(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(lK(e))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}.bind(t))}function lK(e){return e&&e.video!==void 0?Object.assign({},e,{video:AG(e.video)}):e}function uK(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?(DG(`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 dK(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 fK(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 pK(e){typeof e!=`object`||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var mK=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!==void 0&&(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)})),hK=s({removeExtmapAllowMixed:()=>SK,shimAddIceCandidateNullOrEmpty:()=>CK,shimConnectionState:()=>xK,shimMaxMessageSize:()=>yK,shimParameterlessSetLocalDescription:()=>wK,shimRTCIceCandidate:()=>_K,shimRTCIceCandidateRelayProtocol:()=>vK,shimSendThrowTypeError:()=>bK}),gK=l(mK());function _K(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=gK.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,CG(e,`icecandidate`,t=>(t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:`false`}),t))}function vK(e){!e.RTCIceCandidate||e.RTCIceCandidate&&`relayProtocol`in e.RTCIceCandidate.prototype||CG(e,`icecandidate`,e=>{if(e.candidate){let t=gK.default.parseCandidate(e.candidate.candidate);t.type===`relay`&&(e.candidate.relayProtocol={0:`tls`,1:`tcp`,2:`udp`}[t.priority>>24])}return e})}function yK(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=gK.default.splitSections(e.sdp);return t.shift(),t.some(e=>{let t=gK.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=gK.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 bK(e,t){if(!(e.RTCPeerConnection&&`createDataChannel`in e.RTCPeerConnection.prototype)||t.browser===`chrome`&&t.version>149||t.browser===`firefox`&&t.version>60)return;function n(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 r=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){let e=r.apply(this,arguments);return n(e,this),e},CG(e,`datachannel`,e=>(n(e.channel,e.target),e))}function xK(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 SK(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 CK(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 wK(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 TK({window:e}={},t={shimChrome:!0,shimFirefox:!0,shimSafari:!0}){let n=EG,r=OG(e),i={browserDetails:r,commonShim:hK,extractVersion:SG,disableLog:wG,disableWarnings:TG,sdp:gK};switch(r.browser){case`chrome`:if(!FG||!HG||!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=FG,CK(e,r),wK(e,r),PG(e,r),IG(e,r),HG(e,r),LG(e,r),VG(e,r),RG(e,r),zG(e,r),UG(e,r),_K(e,r),vK(e,r),xK(e,r),yK(e,r),bK(e,r),SK(e,r);break;case`firefox`:if(!KG||!JG||!t.shimFirefox)return n(`Firefox shim is not included in this adapter release.`),i;n(`adapter.js shimming firefox.`),i.browserShim=KG,CK(e,r),wK(e,r),WG(e,r),JG(e,r),YG(e,r),qG(e,r),QG(e,r),XG(e,r),ZG(e,r),$G(e,r),eK(e,r),tK(e,r),nK(e,r),rK(e,r),_K(e,r),xK(e,r),yK(e,r),bK(e,r);break;case`safari`:if(!iK||!t.shimSafari)return n(`Safari shim is not included in this adapter release.`),i;n(`adapter.js shimming safari.`),i.browserShim=iK,CK(e,r),wK(e,r),uK(e,r),fK(e,r),sK(e,r),aK(e,r),oK(e,r),dK(e,r),cK(e,r),pK(e,r),_K(e,r),vK(e,r),yK(e,r),bK(e,r),SK(e,r);break;default:n(`Unsupported browser!`);break}return i}TK({window:typeof window>`u`?void 0:window}),typeof window<`u`&&`BarcodeDetector`in window;var EK=3e3,DK=500;function OK(e={}){let{startTimeoutMs:t=EK,settleDelayMs:n=DK}=e,r=(0,L.useRef)(Promise.resolve({type:`stop`,data:{}})),i=(0,L.useRef)(null),a=(0,L.useRef)(null),[o,s]=(0,L.useState)({}),[c,l]=(0,L.useState)({}),u=(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 o=await navigator.mediaDevices.getUserMedia({audio:!1,video:r});e.srcObject=o;let c;try{await Promise.race([e.play(),new Promise((e,n)=>{c=setTimeout(()=>n(Error(`Loading camera stream timed out after ${t} ms.`)),t)})])}finally{c!==void 0&&clearTimeout(c)}n>0&&await new Promise(e=>setTimeout(e,n));let[u]=o.getVideoTracks();return l(u.getSettings()),s(u.getCapabilities?.()??{}),i.current=o,a.current=u,{type:`start`,data:{videoEl:e,stream:o,constraints:r}}},[t,n]),d=(0,L.useCallback)(async(e,t)=>{e.srcObject=null,e.removeAttribute(`src`),e.load();for(let e of t.getTracks())t.removeTrack(e),e.stop();return i.current=null,a.current=null,l({}),{type:`stop`,data:{}}},[]),f=(0,L.useCallback)(async(e,{constraints:t,restart:n=!1})=>{let i=null;r.current=r.current.then(r=>{if(r.type===`start`){let{data:{videoEl:i,stream:a,constraints:o}}=r;return!n&&e===i&&t===o?r:d(i,a).then(()=>u(e,t))}return u(e,t)}).catch(e=>(i=e,{type:`stop`,data:{}}));let a=await r.current;if(i)throw i;if(a.type===`stop`)throw Error(`Something went wrong with the camera task queue (start task).`)},[u,d]),p=(0,L.useCallback)(async()=>{if(r.current=r.current.then(e=>{if(e.type===`stop`)return e;let{data:{videoEl:t,stream:n}}=e;return d(t,n)}),(await r.current).type===`start`)throw Error(`Something went wrong with the camera task queue (stop task).`)},[d]),m=(0,L.useCallback)(async e=>{let t=null;if(r.current=r.current.then(async n=>{let r=a.current;if(!r||n.type!==`start`)return t=Error(`No active video track found.`),n;try{e.advanced?.[0]?.zoom&&r.getCapabilities().torch&&(await r.applyConstraints({advanced:[{torch:!1}]}),l(r.getSettings())),await r.applyConstraints(e),s(r.getCapabilities()),l(r.getSettings())}catch(e){t=e}return n}),await r.current,t)throw t},[]),h=(0,L.useCallback)(async()=>{try{await r.current}catch{}},[]);return(0,L.useEffect)(()=>()=>{p()},[p]),{capabilities:o,settings:c,startCamera:f,stopCamera:p,updateConstraints:m,flush:h,getStream:()=>i.current}}var kK=`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`,AK={NotAllowedError:`permission-denied`,PermissionDeniedError:`permission-denied`,NotFoundError:`no-camera`,DevicesNotFoundError:`no-camera`,NotReadableError:`in-use`,TrackStartError:`in-use`,OverconstrainedError:`overconstrained`,ConstraintNotSatisfiedError:`overconstrained`,AbortError:`aborted`,SecurityError:`security`,TypeError:`type-error`};function jK(e){if(e instanceof DOMException||e instanceof Error){let t=e.name??``,n=e.message??String(e);return n.includes(`secure context`)?{kind:`insecure-context`,message:n,cause:e}:n.includes(`Stream API`)?{kind:`unsupported`,message:n,cause:e}:{kind:AK[t]??`unknown`,message:n,cause:e}}return{kind:`unknown`,message:typeof e==`string`?e:`Unknown scanner error`,cause:e}}var MK=[];function NK(e){let{videoElementRef:t,onScan:n,onFound:r,onError:i,retryDelay:a=100,scanDelay:o=0,formats:s=MK,allowMultiple:c=!1,sound:l=!0}=e,u=(0,L.useMemo)(()=>[...s].sort().join(`|`),[s]),d=(0,L.useRef)(null),f=(0,L.useRef)(null),p=(0,L.useRef)(null);typeof window<`u`&&d.current===null&&(d.current=new yG({formats:s})),(0,L.useEffect)(()=>{typeof window>`u`||(d.current=new yG({formats:s}))},[u]),(0,L.useEffect)(()=>{if(typeof window>`u`||!l){f.current=null;return}return f.current=new Audio(typeof l==`string`?l:kK),()=>{f.current?.pause(),f.current=null}},[l]);let m=(0,L.useCallback)(e=>async s=>{let u=d.current;if(t.current===null||t.current.readyState<=1||u===null)return;let{lastScan:h,contentBefore:g,lastScanHadContent:_}=e;if(s-h<a){p.current=window.requestAnimationFrame(m(e));return}let v;try{v=await u.detect(t.current)}catch(e){i?.(jK(e));return}let y=v.some(e=>!g.has(e.rawValue)),b=v.length>0,x=e.lastOnScan,S=s-x>=o;(y||c&&b&&S)&&(l&&f.current?.paused&&f.current.play().catch(e=>console.error(`Error playing the sound`,e)),x=s,n(v)),(b||_)&&r(v);let C=y?new Set(v.map(e=>e.rawValue)):g,w={lastScan:s,lastOnScan:x,lastScanHadContent:b,contentBefore:C};p.current=window.requestAnimationFrame(m(w))},[n,r,i,a,c,o,l]);return{startScanning:(0,L.useCallback)(()=>{if(typeof window>`u`)return;let e=performance.now(),t={lastScan:e,lastOnScan:e,contentBefore:new Set,lastScanHadContent:!1};p.current=window.requestAnimationFrame(m(t))},[m]),stopScanning:(0,L.useCallback)(()=>{p.current!==null&&(window.cancelAnimationFrame(p.current),p.current=null)},[])}}var PK={finder:!0,torch:!0,tracker:void 0,onOff:!1,zoom:!1},FK={facingMode:`environment`,width:{min:640,ideal:720,max:1920},height:{min:640,ideal:720,max:1080}},IK={container:{width:`100%`,height:`100%`,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,overflow:`hidden`,aspectRatio:`1/1`},video:{width:`100%`,height:`100%`,objectFit:`cover`,overflow:`hidden`}},LK=e=>e instanceof Date,RK=e=>e==null,zK=e=>typeof e==`object`,BK=e=>!RK(e)&&!Array.isArray(e)&&zK(e)&&!LK(e),VK=e=>RK(e)||!zK(e);function HK(e,t){if(VK(e)||VK(t))return e===t;if(LK(e)&&LK(t))return e.getTime()===t.getTime();if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!HK(e[n],t[n]))return!1;return!0}if(!BK(e)||!BK(t))return!1;let n=e,r=t,i=Object.keys(n),a=Object.keys(r);if(i.length!==a.length)return!1;let o=new Set(a);for(let e of i){if(!o.has(e))return!1;if(e===`ref`)continue;let t=n[e],i=r[e],a=BK(t)&&BK(i),s=Array.isArray(t)&&Array.isArray(i),c=LK(t)&&LK(i);if(a||s||c){if(!HK(t,i))return!1}else if(t!==i)return!1}return!0}function UK(e){let{disabled:t=!1,className:n,style:r}=e;return(0,R.jsx)(`svg`,{"aria-hidden":`true`,focusable:`false`,className:n,style:{stroke:t?`grey`:`yellow`,fill:`none`,strokeLinejoin:`round`,strokeLinecap:`round`,strokeWidth:1.5,...r},width:`28px`,height:`28px`,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,children:(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 WK(e){let{disabled:t=!1,className:n,style:r}=e;return(0,R.jsxs)(`svg`,{"aria-hidden":`true`,focusable:`false`,className:n,style:{stroke:t?`grey`:`yellow`,fill:`none`,strokeLinejoin:`round`,strokeLinecap:`round`,strokeWidth:1.5,...r},width:`28px`,height:`28px`,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,children:[(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`})]})}var GK={bottom:85,right:8,position:`absolute`,zIndex:2,background:`transparent`,border:0,padding:4,margin:0,display:`inline-flex`,alignItems:`center`,justifyContent:`center`};function KK(e){let{scanning:t,startScanning:n,stopScanning:r}=e,[i,a]=(0,L.useState)(!1),o=(0,L.useRef)(null);(0,L.useEffect)(()=>()=>{o.current!==null&&clearTimeout(o.current)},[]);function s(){i||(a(!0),t?r():n(),o.current!==null&&clearTimeout(o.current),o.current=setTimeout(()=>{a(!1),o.current=null},1e3))}return(0,R.jsx)(`button`,{type:`button`,"aria-label":t?`Turn camera off`:`Turn camera on`,"aria-pressed":t,disabled:i,onClick:s,style:{...GK,cursor:i?`default`:`pointer`},children:t?(0,R.jsx)(UK,{disabled:i}):(0,R.jsx)(WK,{disabled:i})})}function qK(e){let{className:t,style:n}=e;return(0,R.jsx)(`svg`,{"aria-hidden":`true`,focusable:`false`,width:`30px`,height:`30px`,viewBox:`0 0 24 24`,className:t,style:n,xmlns:`http://www.w3.org/2000/svg`,children:(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 JK(e){let{className:t,style:n}=e;return(0,R.jsx)(`svg`,{"aria-hidden":`true`,focusable:`false`,width:`30px`,height:`30px`,viewBox:`0 0 24 24`,className:t,style:n,xmlns:`http://www.w3.org/2000/svg`,children:(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`})})}var YK={bottom:35,right:8,position:`absolute`,zIndex:2,background:`transparent`,border:0,padding:4,margin:0,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`};function XK(e){let{status:t,scanning:n,torchToggle:r}=e;return n?(0,R.jsx)(`button`,{type:`button`,"aria-label":t?`Turn flashlight off`:`Turn flashlight on`,"aria-pressed":t,onClick:()=>r(!t),style:YK,children:t?(0,R.jsx)(qK,{}):(0,R.jsx)(JK,{})}):null}function ZK(e){let{className:t,disabled:n=!1,style:r}=e;return(0,R.jsx)(`svg`,{"aria-hidden":`true`,focusable:`false`,width:`30px`,height:`30px`,viewBox:`0 0 24 24`,className:t,style:{stroke:n?`grey`:`yellow`,fill:n?`grey`:`yellow`,...r},xmlns:`http://www.w3.org/2000/svg`,children:(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 QK(e){let{className:t,disabled:n=!1,style:r}=e;return(0,R.jsx)(`svg`,{"aria-hidden":`true`,focusable:`false`,width:`30px`,height:`30px`,viewBox:`0 0 24 24`,className:t,style:{stroke:n?`grey`:`yellow`,fill:n?`grey`:`yellow`,...r},xmlns:`http://www.w3.org/2000/svg`,children:(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`})})}var $K={bottom:130,right:8,position:`absolute`,zIndex:2,background:`transparent`,border:0,padding:4,margin:0,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`},eq={...$K,bottom:180};function tq(e){let{scanning:t,capabilities:n,onZoom:r,value:i}=e;if(!t)return null;let a=n.step>0?n.step:1;function o(){r(Math.min(i+a,n.max))}function s(){r(Math.max(i-a,n.min))}let c=i<=n.min,l=i>=n.max;return(0,R.jsxs)(L.Fragment,{children:[(0,R.jsx)(`button`,{type:`button`,"aria-label":`Zoom out`,disabled:c,onClick:s,style:{...$K,cursor:c?`default`:`pointer`},children:(0,R.jsx)(QK,{disabled:c})}),(0,R.jsx)(`button`,{type:`button`,"aria-label":`Zoom in`,disabled:l,onClick:o,style:{...eq,cursor:l?`default`:`pointer`},children:(0,R.jsx)(ZK,{disabled:l})})]})}var nq={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 rq(e){let{scanning:t,capabilities:n,onOff:r,torch:i,zoom:a,startScanning:o,stopScanning:s}=e;return(0,R.jsx)(`div`,{style:nq.fullContainer,children:(0,R.jsxs)(`div`,{style:nq.innerContainer,children:[(0,R.jsx)(`div`,{style:nq.overlay,children:(0,R.jsxs)(`div`,{style:nq.borderBox,children:[(0,R.jsx)(`div`,{style:nq.cornerTopLeft}),(0,R.jsx)(`div`,{style:nq.cornerTopRight}),(0,R.jsx)(`div`,{style:nq.cornerBottomLeft}),(0,R.jsx)(`div`,{style:nq.cornerBottomRight})]})}),r&&(0,R.jsx)(KK,{scanning:t,startScanning:o,stopScanning:s}),i&&n.torch&&(0,R.jsx)(XK,{scanning:t,status:i.status,torchToggle:i.toggle}),a&&n.zoom&&(0,R.jsx)(tq,{scanning:t,capabilities:n.zoom,value:a.value,onZoom:a.onChange})]})})}var iq={position:`absolute`,width:`100%`,height:`100%`},aq={position:`absolute`,width:`100%`,height:`100%`},oq={position:`absolute`,width:`100%`,height:`100%`};function sq(e){if(e===null)return;let t=e.getContext(`2d`);t!==null&&t.clearRect(0,0,e.width,e.height)}function cq(e,t,n,r){if(n===null||t===null)return;if(e.length===0||r===void 0){sq(n);return}let i=t.offsetWidth,a=t.offsetHeight,o=t.videoWidth,s=t.videoHeight;if(o===0||s===0){sq(n);return}let c=Math.max(i/o,a/s),l=o*c,u=s*c,d=l/o,f=u/s,p=(i-l)/2,m=(a-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})}});n.width=i,n.height=a;let v=n.getContext(`2d`);v!==null&&r(_,v)}var lq=(0,L.forwardRef)(function(e,t){let{onScan:n,constraints:r,formats:i=[`any`],paused:a=!1,components:o,tracker:s,children:c,styles:l,classNames:u,allowMultiple:d,scanDelay:f,retryDelay:p,onError:m,sound:h,startTimeoutMs:g,settleDelayMs:_}=e,v=(0,L.useRef)(null),y=(0,L.useRef)(null),b=(0,L.useRef)(null),x=(0,L.useMemo)(()=>{let e={...FK,...r};return r?.deviceId&&delete e.facingMode,e},[r]),S=(0,L.useMemo)(()=>({...PK,...o}),[o]),C=s??S.tracker,[w,T]=(0,L.useState)(!1),[E,D]=(0,L.useState)(!1),[O,ee]=(0,L.useState)(x),te=OK({startTimeoutMs:g,settleDelayMs:_}),k=(0,L.useRef)(te),A=(0,L.useRef)(n),j=(0,L.useRef)(m),ne=(0,L.useRef)(C);(0,L.useEffect)(()=>{k.current=te},[te]),(0,L.useEffect)(()=>{A.current=n},[n]),(0,L.useEffect)(()=>{j.current=m},[m]),(0,L.useEffect)(()=>{ne.current=C},[C]);let re=(0,L.useCallback)(e=>{A.current?.(e)},[]),M=(0,L.useCallback)(e=>{j.current?.(e)},[]),{startScanning:N,stopScanning:ie}=NK({videoElementRef:v,onScan:re,onFound:(0,L.useCallback)(e=>{cq(e,v.current,b.current,ne.current)},[]),onError:M,formats:i,retryDelay:p??(C===void 0?500:33),scanDelay:f,allowMultiple:d,sound:h});(0,L.useEffect)(()=>(T(!0),()=>{T(!1)}),[]),(0,L.useEffect)(()=>{HK(x,O)||ee(x)},[x,O]);let ae=(0,L.useMemo)(()=>({constraints:O,shouldStream:w&&!a}),[O,w,a]),P=(0,L.useCallback)(async()=>{let e=v.current,t=y.current;if(e===null||t===null)return;let n=t.getContext(`2d`);if(n!==null)try{ae.shouldStream?(await k.current.stopCamera(),D(!1),await k.current.startCamera(e,{constraints:ae.constraints}),D(!0)):(e.videoWidth>0&&e.videoHeight>0&&(t.width=e.videoWidth,t.height=e.videoHeight,n.drawImage(e,0,0,e.videoWidth,e.videoHeight)),await k.current.stopCamera(),D(!1))}catch(e){D(!1),j.current?.(jK(e))}},[ae]);(0,L.useEffect)(()=>{P()},[P]);let oe=(0,L.useMemo)(()=>ae.shouldStream&&E,[ae.shouldStream,E]);(0,L.useEffect)(()=>(oe&&(sq(y.current),sq(b.current),N()),()=>{ie()}),[oe,N,ie]),(0,L.useImperativeHandle)(t,()=>({getVideoElement:()=>v.current,getStream:()=>k.current.getStream()}),[]);let F=(0,L.useMemo)(()=>({...IK.container,...l?.container}),[l?.container]),se=(0,L.useMemo)(()=>({...IK.video,...l?.video,visibility:a?`hidden`:`visible`}),[l?.video,a]),ce=(0,L.useMemo)(()=>({...aq,display:a?`block`:`none`}),[a]);return(0,R.jsxs)(`div`,{style:F,className:u?.container,children:[(0,R.jsx)(`video`,{ref:v,style:se,className:u?.video,autoPlay:!0,muted:!0,playsInline:!0}),(0,R.jsx)(`canvas`,{ref:y,style:ce}),(0,R.jsx)(`canvas`,{ref:b,style:oq}),(0,R.jsxs)(`div`,{style:iq,children:[S.finder&&(0,R.jsx)(rq,{scanning:E,capabilities:te.capabilities,onOff:S.onOff,zoom:S.zoom&&te.settings.zoom?{value:te.settings.zoom,onChange:async e=>{try{await te.updateConstraints({...O,advanced:[{zoom:e}]})}catch(e){j.current?.(jK(e))}}}:void 0,torch:S.torch?{status:te.settings.torch??!1,toggle:async e=>{try{await te.updateConstraints({...O,advanced:[{torch:e}]})}catch(e){j.current?.(jK(e))}}}:void 0,startScanning:async()=>await P(),stopScanning:async()=>{try{await te.stopCamera(),sq(b.current),D(!1)}catch(e){j.current?.(jK(e))}}}),c]})]})}),uq=(0,L.memo)(function(){let e=qE(DI);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}),dq=(0,L.memo)(function(){let[e,t]=(0,L.useState)(!1),n=qE(DI),[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)($m,{open:e,onClose:()=>t(!1),children:[(0,R.jsx)(oh,{children:`Scan a QR Code`}),(0,R.jsxs)(rh,{children:[(0,R.jsx)(G,{sx:{width:`15em`,height:`15em`},children:e?(0,R.jsx)(lq,{onScan:a}):void 0}),(0,R.jsx)(G,{sx:{marginTop:`1em`},children:(0,R.jsx)(sx,{label:`Manual Entry`,value:r,variant:`outlined`,fullWidth:!0,onKeyDown:e=>{e.key===`Enter`&&o()},onChange:e=>i(e.target.value)})})]}),(0,R.jsxs)(eh,{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)(ru,{onClick:()=>t(!0),size:`large`,children:(0,R.jsx)(kx,{})})})]})}),fq=Z(null),pq=(0,L.memo)(function(){let[e,t]=JE(fq),[n,r]=(0,L.useState)(``),i=qE(DI);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)($m,{open:e!==null,onClose:()=>t(null),maxWidth:`md`,children:[(0,R.jsxs)(oh,{children:[`Scan a Barcode To Add To `,e]}),(0,R.jsxs)(rh,{children:[window.location.protocol===`https:`?(0,R.jsx)(G,{sx:{width:`15em`,height:`15em`},children:e===null?void 0:(0,R.jsx)(lq,{onScan:a})}):void 0,(0,R.jsx)(G,{sx:{marginTop:`1em`},children:(0,R.jsx)(sx,{label:`Manual Entry`,value:n,variant:`outlined`,fullWidth:!0,onKeyDown:e=>{e.key===`Enter`&&o()},onChange:e=>r(e.target.value)})})]}),(0,R.jsxs)(eh,{children:[n===``?void 0:(0,R.jsx)(K,{onClick:o,children:`Submit`}),(0,R.jsx)(K,{onClick:()=>t(null),children:`Cancel`})]})]})});function mq(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=X.of(a.values()).toSortedArray({desc:e=>e.routeStartTime.getTime()},e=>e.partName),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 hq(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 gq(e,t){oA(hq(e,t))}var _q=PO(`fmsinsight.hide-nonloading-loadstation`,!1);function vq(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 yq(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 bq(e,t,n){let r=t?.workorder;return X.of(t?.possibleCastingsByQueue?.[n]??[]).map(t=>({casting:t,message:r?yq(e,r,t):null})).toSortedArray(e=>e.casting)}function xq(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(vq).join(` | `)??``}))}}).toSortedArray(e=>e.job?.partName??e.jobUnique)}function Sq(e){let t=Q(ZE),n=Q(GO),r=Q(kI),i=Q(bL);return(0,L.useMemo)(()=>r===null||e===null?{castings:[],jobs:[]}:{castings:i.has(e)?bq(n,r,e):[],jobs:xq(n,t,r,e)},[n,t,e,r,i])}function Cq(e,t){return t.jobUnique===e&&t.location.type===fC.InQueue&&t.action.type!==mC.Loading&&t.process===0}function wq(e,t){return t.partName===e&&t.location.type===fC.InQueue&&t.action.type!==mC.Loading&&t.process===0&&!t.jobUnique}function Tq(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=>Cq(e.unique,t)).length(),availableUnassigned:X.of(t).filter(e=>wq(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 Eq(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=XT.empty(),r=new Map;for(let i of t.material)if(i.location.type===fC.InQueue&&i.location.currentQueue===e&&i.location.queuePosition!==void 0)if(i.serial&&i.serial!==``||i.action.type!==mC.Waiting)n.set(i.location.queuePosition,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.values()],groupedRawMat:a})}else i.push({label:e,free:!1,rawMaterialQueue:!1,inProcQueue:r.has(e),material:X.of(t.material).filter(t=>t.location.type===fC.InQueue&&t.location.currentQueue===e&&t.location.queuePosition!==void 0).toSortedArray(e=>e.location.queuePosition??0)});return i}async function Dq(e){let t=[];for(let n of X.of(e).chunk(15))t.push(...await jC.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&&iw(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 Oq(e){return e.toLocaleString(void 0,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`})}function kq(e){let t=e.job.completed?.[e.procIdx]?.[e.pathIdx];return t===void 0?null:(0,R.jsxs)(`div`,{children:[`Completed: `,t]})}function Aq(e){let t=Q(EO),n=e=>e.map(e=>Tk(e,t.loadStationNames)).join(`, `);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:[Oq(e.job.routeStartUTC),` to `,Oq(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,r)=>(0,R.jsx)(L.Fragment,{children:t.paths.map((i,a)=>(0,R.jsxs)(L.Fragment,{children:[(0,R.jsxs)(`dt`,{children:[`Process `,r+1,t.paths.length>1?`, Path `+(a+1).toString():void 0]}),(0,R.jsxs)(`dd`,{children:[(0,R.jsx)(kq,{job:e.job,procIdx:r,pathIdx:a}),(0,R.jsxs)(`div`,{children:[`Estimated Start: `,Oq(i.simulatedStartingUTC)]}),(0,R.jsxs)(`div`,{children:[`Pallets: `,(i.palletNums??[]).map(e=>e.toString()).join(`,`)]}),i.fixture?(0,R.jsxs)(`div`,{children:[`Fixture: `,i.fixture,` `,i.face===void 0?void 0:`, Face: `+i.face.toString()]}):void 0,i.inputQueue?(0,R.jsxs)(`div`,{children:[`Input Queue: `,i.inputQueue]}):void 0,i.casting?(0,R.jsxs)(`div`,{children:[`Raw Material: `,i.casting]}):void 0,t.basketLoadStations&&t.basketLoadStations.length>0&&t.expectedBasketLoadTime?(0,R.jsxs)(`div`,{children:[`Basket Load Stations: `,n(t.basketLoadStations),` |`,` `,nk(t.expectedBasketLoadTime).toFixed(1),` mins`,i.partsPerPallet>1?` per piece`:``]}):void 0,(0,R.jsxs)(`div`,{children:[`Load Stations: `,n(i.load),` |`,` `,nk(i.expectedLoadTime).toFixed(1),` mins`,i.partsPerPallet>1?` per piece`:``]}),i.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,` |`,` `,(nk(e.expectedCycleTime)/i.partsPerPallet).toFixed(1),` mins`,i.partsPerPallet>1?` per piece`:``]})},t)),(0,R.jsxs)(`div`,{children:[`Unload Stations: `,n(i.unload),` |`,` `,nk(i.expectedUnloadTime).toFixed(1),` mins`,i.partsPerPallet>1?` per piece`:``]}),t.basketUnloadStations&&t.basketUnloadStations.length>0&&t.expectedBasketUnloadTime?(0,R.jsxs)(`div`,{children:[`Basket Unload Stations: `,n(t.basketUnloadStations),` |`,` `,nk(t.expectedBasketUnloadTime).toFixed(1),` mins`,i.partsPerPallet>1?` per piece`:``]}):void 0,i.outputQueue?(0,R.jsxs)(`div`,{children:[`Output Queue: `,i.outputQueue]}):void 0,i.inspections&&i.inspections.length>0?(0,R.jsxs)(`div`,{children:[`Inspections: `,i.inspections.map(e=>e.inspectionType).join(`,`)]}):void 0]})]},a))},r))]})})}function jq(e){let t=Dk(Q(EO).basketName);return e.inProcMat!==null&&e.inProcMat.location.type===fC.OnPallet?(0,R.jsxs)(`span`,{children:[`On pallet `,e.inProcMat.location.palletNum??``]}):e.inProcMat!==null&&e.inProcMat.location.type===fC.InQueue?(0,R.jsxs)(`span`,{children:[`In queue `,e.inProcMat.location.currentQueue??``]}):e.inProcMat!==null&&e.inProcMat.location.type===fC.InBasket?(0,R.jsxs)(`span`,{children:[`In `,t,` `,e.inProcMat.location.basketId??``]}):e.matSummary?.completed_last_proc_machining?(0,R.jsx)(`span`,{children:`Completed`}):e.matSummary!==null&&!e.matSummary.startedProcess1?(0,R.jsx)(`span`,{children:`Not yet started`}):(0,R.jsx)(`span`,{})}function Mq(e){let t=Q(GO).material,n=qE(DI),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)(Yy,{size:`small`,style:{width:e.fullWidth?`100%`:`auto`},children:[(0,R.jsx)(vb,{children:(0,R.jsxs)(Ab,{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)(nb,{children:r.map(t=>(0,R.jsxs)(Ab,{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)(jq,{matSummary:e.matsFromEvents.get(t.materialID)??null,inProcMat:i.get(t.materialID)??null})}),(0,R.jsx)(J,{padding:`checkbox`,children:(0,R.jsx)(ru,{onClick:()=>n({type:`MatSummary`,summary:t}),size:`large`,children:(0,R.jsx)(lS,{fontSize:`inherit`})})})]},t.materialID))})]})})}function Nq(e){let t=Q(ER),n=Q(e.checkAnalysisMonth&&t.type===`SpecificMonth`?gL:mL);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)(Aq,{job:e.job}),(0,R.jsx)(Mq,{unique:e.job.unique,fullWidth:!1,matsFromEvents:n.matsById,matIdsForJob:n.matIdsForJob})]})})}function Pq(e){return typeof e==`object`&&!!e&&`mat`in e}function Fq(e){return typeof e==`number`?e:null}var Iq=(0,L.memo)(function(e){let[t,n]=(0,L.useState)(void 0),[r]=UI(),i=qE(QO),a=Q(UO),o=(0,L.useMemo)(()=>e.matIds.slice(),[e.matIds]);return(0,R.jsx)(gH,{sensors:mB(pB(yV),pB(mV,{coordinateGetter:lU})),collisionDetection:CB,onDragStart:({active:e})=>n(Pq(e.data.current)?e.data.current.mat:void 0),onDragCancel:()=>n(void 0),onDragEnd:({active:t,over:o})=>{let s=Fq(t.id),c=o?Fq(o.id):null;if(o&&t.id!==o.id&&s!==null&&c!==null){let t=e.matIds.indexOf(c);r({materialId:s,queue:e.queueName,queuePosition:t,operator:a}),i({queue:e.queueName,matId:s,newIdx:t})}n(void 0)},children:(0,R.jsxs)(ZH,{items:o,strategy:e.direction===`vertical`?qH:GH,children:[e.children,(0,R.jsx)(IH,{children:t===void 0?void 0:e.renderDragOverlay(t)})]})})}),Lq=`printWindow`;function Rq(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=Lq,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 zq({level:e=`error`,messages:t,suppressErrors:n=!1}){n||(e===`error`?console.error(t):e===`warning`?console.warn(t):console.debug(t))}function Bq(e,t){if(t||!e){let e=document.getElementById(Lq);e&&document.body.removeChild(e)}}function Vq(e){return e instanceof Error?e:Error(`Unknown Error`)}function Hq(e,t){let{documentTitle:n,onAfterPrint:r,onPrintError:i,preserveAfterPrint:a,print:o,suppressErrors:s}=t;setTimeout(()=>{if(e.contentWindow){let t=function(){r?.(),Bq(a)};if(e.contentWindow.focus(),o)o(e).then(t).catch(e=>{i?i(`print`,Vq(e)):zq({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 zq({messages:["Printing for this browser is not currently possible: the browser does not have a `print` method available for iframes."],suppressErrors:s});Uq()?setTimeout(t,500):t()}}else zq({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 Uq(){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 Wq(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 Gq(e,t,n){let r=Wq(e),i=Wq(t);if(r.length!==i.length){zq({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,Gq(o,e,n)}}}var Kq=`
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 qq(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)){zq({level:`debug`,messages:[`Tried to mark a resource that has already been handled`,t],suppressErrors:m});return}r?(zq({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&&Hq(e,n)}e.onload=null;let y=e.contentDocument??e.contentWindow?.document;if(y){let t=y.body.appendChild(i);h&&Gq(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:`,Vq(e)])})}):(u.forEach(e=>{v(e)}),zq({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??Kq,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){zq({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){zq({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: ${Vq(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`))zq({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 zq({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&&Hq(e,n)}function Jq(e,t,n){e.onload=()=>{qq(e,t,n)},document.body.appendChild(e)}function Yq({contentRef:e,optionalContent:t,suppressErrors:n}){if(t&&typeof t==`function`)return e&&zq({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;zq({messages:['"react-to-print" did not receive a `contentRef` option or a optional-content param pass to its callback.'],suppressErrors:n})}function Xq(e,t){let{contentRef:n,fonts:r,ignoreGlobalStyles:i,suppressErrors:a}=t,o=Yq({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 Zq({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=>{Bq(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=Rq(p),_=Xq(h,c);if(!_){zq({messages:[`There is nothing to print`],suppressErrors:m});return}Jq(g,_,c)}c?c().then(()=>{g()}).catch(e=>{l?.(`onBeforePrint`,Vq(e))}):g()},[e,t,n,r,i,a,o,s,c,l,u,d,p,f,m])}var 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`)}e.default=function e(n,r){t(this,e),this.data=n,this.text=r.text||n,this.options=r}})),$q=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(Qq());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})),eJ=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]})),tJ=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(Qq()),r=eJ();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)})),nJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=eJ(),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})}})),rJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=r(tJ()),n=r(nJ());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)})),iJ=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(tJ()),r=eJ();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)})),aJ=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(tJ()),r=eJ();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)})),oJ=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(tJ()),r=eJ();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)})),sJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CODE128C=e.CODE128B=e.CODE128A=e.CODE128=void 0;var t=a(rJ()),n=a(iJ()),r=a(aJ()),i=a(oJ());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})),cJ=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`]})),lJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=cJ();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(``)}})),uJ=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=cJ(),r=a(lJ()),i=a(Qq());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)})),dJ=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=cJ(),i=a(uJ());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)})),fJ=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(uJ());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)})),pJ=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=cJ(),r=a(lJ()),i=a(Qq());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)})),mJ=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=cJ(),r=a(lJ()),i=a(Qq());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)})),hJ=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(lJ()),r=i(Qq());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})),gJ=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(lJ()),r=a(Qq()),i=hJ();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})),_J=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(dJ()),n=s(fJ()),r=s(pJ()),i=s(mJ()),a=s(hJ()),o=s(gJ());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})),vJ=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`]})),yJ=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=vJ(),r=i(Qq());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)})),bJ=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(yJ());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)})),xJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ITF14=e.ITF=void 0;var t=r(yJ()),n=r(bJ());function r(e){return e&&e.__esModule?e:{default:e}}e.ITF=t.default,e.ITF14=n.default})),SJ=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(Qq());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})),CJ=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}})),wJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=r(SJ()),n=CJ();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)})),TJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=r(SJ()),n=CJ();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)})),EJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=r(SJ()),n=CJ();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)})),DJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=r(SJ()),n=CJ();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)})),OJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MSI1110=e.MSI1010=e.MSI11=e.MSI10=e.MSI=void 0;var t=o(SJ()),n=o(wJ()),r=o(TJ()),i=o(EJ()),a=o(DJ());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})),kJ=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(Qq());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)})),AJ=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(Qq());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)})),jJ=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`]}})),MJ=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=jJ(),r=i(Qq());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)})),NJ=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(MJ());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)})),PJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CODE93FullASCII=e.CODE93=void 0;var t=r(MJ()),n=r(NJ());function r(e){return e&&e.__esModule?e:{default:e}}e.CODE93=t.default,e.CODE93FullASCII=n.default})),FJ=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(Qq());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)})),IJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=$q(),n=sJ(),r=_J(),i=xJ(),a=OJ(),o=kJ(),s=AJ(),c=PJ(),l=FJ();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}})),LJ=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)}})),RJ=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}})),zJ=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}})),BJ=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}})),VJ=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(){}}})),HJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=r(BJ()),n=r(VJ());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})),UJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getTotalWidthOfEncodings=e.calculateEncodingAttributes=e.getBarcodePadding=e.getEncodingHeight=e.getMaximumHeightOfEncodings=void 0;var t=n(LJ());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})),WJ=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(LJ()),r=UJ();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}()})),GJ=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(LJ()),r=UJ();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}()})),KJ=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}()})),qJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=i(WJ()),n=i(GJ()),r=i(KJ());function i(e){return e&&e.__esModule?e:{default:e}}e.default={CanvasRenderer:t.default,SVGRenderer:n.default,ObjectRenderer:r.default}})),JJ=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})),YJ=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(HJ()),r=a(qJ()),i=JJ();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})),XJ=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}()})),ZJ=l(o(((e,t)=>{var n=d(IJ()),r=d(LJ()),i=d(RJ()),a=d(zJ()),o=d(YJ()),s=d(BJ()),c=d(XJ()),l=JJ(),u=d(VJ());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 QJ(e){let t=(0,L.useRef)(null),n=(0,L.useCallback)(n=>{n&&(0,ZJ.default)(n,e.text,{format:`CODE128`}),t.current=n},[e.text]);return(0,L.useEffect)(()=>{t.current&&(0,ZJ.default)(t.current,e.text,{format:`CODE128`,fontSize:30})},[e.text]),(0,R.jsx)(`svg`,{ref:n})}function $J(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)(QJ,{text:e.materialName??e.partName}),e.count>=2?(0,R.jsx)(QJ,{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)(QJ,{text:e.serial1}),e.serial2&&e.serial2!==``?(0,R.jsx)(QJ,{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)(QJ,{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 eY(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)($J,{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)($J,{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 tY(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)(QJ,{text:e.materialName??e.material[0].partName}),e.material.length>=2?(0,R.jsx)(QJ,{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)(QJ,{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)(QJ,{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)(QJ,{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 nY(e){return e.oneJobPerPage?(0,R.jsx)(eY,{...e}):(0,R.jsx)(tY,{...e})}function rY({mat:e,materialName:t,operator:n}){let r=(0,L.useRef)(null),i=Zq({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)(nY,{materialName:t,material:Array.isArray(e)?e:[e],oneJobPerPage:!1,operator:n})})})]})}function iY(){let e=Q(EO),t=Q(AI),n=Q(MI),[r,i,a]=HI();return!e.usingLabelPrinterForSerials||t===null||t.materialID<0?null:e.useClientPrinterForLabels?n===null?null:(0,R.jsx)(rY,{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 aY=Z(null),oY=Z(null);function sY(){let[e,t]=JE(oY),n=Q(GO),r=(0,L.useRef)(null),i=(0,L.useRef)(!1),a=Zq({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]),(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)($m,{open:e!==null,children:[(0,R.jsx)(oh,{children:`Waiting for Material Assignment`}),(0,R.jsx)(rh,{children:o===null?e===null?(0,R.jsx)(`div`,{}):(0,R.jsxs)(Zv,{direction:`column`,spacing:2,sx:{mt:`0.5em`,mb:`0.5em`},children:[(0,R.jsx)(Zl,{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)(eh,{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)(nY,{materialName:e?.selectedCasting,material:o,operator:e?.operator,oneJobPerPage:!0})})})]})}function cY({casting:e,queue:t}){let n=Q(GO),r=(0,L.useMemo)(()=>Tq(n.jobs,n.material,t).filter(t=>t.rawMatName===e),[n.jobs,n.material,e,t]);return r.length===0?null:(0,R.jsxs)(Yy,{size:`small`,children:[(0,R.jsx)(vb,{children:(0,R.jsxs)(Ab,{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)(nb,{children:[r.map((e,t)=>(0,R.jsxs)(Ab,{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)(Ab,{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 lY=(0,L.memo)(function(){let[e,t]=JE(aY),n=Q(UO),r=Q(EO),i=r.usingLabelPrinterForSerials&&r.useClientPrinterForLabels,[a]=WI(),o=qE(oY),[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(cie),_=(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)($m,{open:e!==null,onClose:()=>v(),maxWidth:`md`,children:[(0,R.jsx)(oh,{children:`Add Raw Material`}),(0,R.jsx)(rh,{children:(0,R.jsxs)(Zv,{direction:`column`,spacing:2,sx:{mt:`0.5em`},children:[(0,R.jsx)(sx,{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)(bU,{part:s,size:25})}),(0,R.jsx)(`div`,{children:s})]})}},children:_.map(([e,t],n)=>(0,R.jsxs)(P_,{value:e,children:[(0,R.jsx)(n_,{children:(0,R.jsx)(bU,{part:e})}),(0,R.jsx)(i_,{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)(sx,{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)(sx,{fullWidth:!0,label:`Operator`,value:d||``,onChange:e=>f(e.target.value)}):void 0,s!==null&&e!==null?(0,R.jsx)(cY,{casting:s,queue:e}):void 0]})}),(0,R.jsxs)(eh,{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)(Zl,{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)(sY,{})]})}),uY=(0,L.memo)(function(e){let t=Q(EO),n=Q(GO).jobs,[r,i]=HI(),[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),Dq(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),AC.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)($m,{open:e.material!==null,onClose:g,maxWidth:`md`,children:[(0,R.jsx)(oh,{children:v&&e.material&&e.material.length>0?(0,R.jsx)(zU,{partName:v.partName,subtitle:e.material.length.toString()+(v.jobUnique&&v.jobUnique!==``?` assigned to `+v.jobUnique:` unassigned`)}):`Material`}),(0,R.jsxs)(rh,{children:[a?(0,R.jsx)(Zl,{color:`secondary`}):(0,R.jsx)(TI,{entries:s,copyToClipboard:!0}),l&&e.material?(0,R.jsx)(`div`,{style:{marginTop:`1em`},children:(0,R.jsx)(sx,{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)(eh,{children:[e.material&&e.material.length>0&&t.usingLabelPrinterForSerials?t.useClientPrinterForLabels?(0,R.jsx)(rY,{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`})]})]})}),dY=(0,L.memo)(function(){let[e,t]=(0,L.useState)(null),[n,r]=(0,L.useState)(!1),i=qE(DI);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)(ru,{onClick:()=>r(!0),size:`large`,children:(0,R.jsx)(_S,{})})}),(0,R.jsxs)($m,{open:n,onClose:a,maxWidth:`md`,children:[(0,R.jsx)(oh,{children:`Enter a part's serial`}),(0,R.jsx)(rh,{children:(0,R.jsx)(`div`,{style:{minWidth:`20em`},children:(0,R.jsx)(sx,{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)(eh,{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`})]})]})]})}),fY=Z(null),pY=(0,L.memo)(function(){let[e,t]=JE(fY),n=qE(DI),[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)($m,{open:e!==null,onClose:o,maxWidth:`md`,children:[(0,R.jsxs)(oh,{children:[`Lookup Material To Add To `,e]}),(0,R.jsx)(rh,{children:(0,R.jsx)(sx,{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)(eh,{children:[(0,R.jsx)(K,{onClick:a,color:`secondary`,children:`Lookup Serial`}),(0,R.jsx)(K,{onClick:o,color:`primary`,children:`Cancel`})]})]})});function mY(e){let t=Q(AI),n=Q(MI),r=Q(kI);return!(n!==null&&n.location.type===fC.InQueue&&n.location.currentQueue&&e.includes(n.location.currentQueue)||n?.location.type===fC.OnPallet||n?.action.type===mC.Loading||t===null&&!r)}var hY=V(Gx,{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 gY({newMaterialTy:e,setNewMaterialTy:t,castings:n,indent:r}){return(0,R.jsx)(Vg,{sx:r?e=>({pl:e.spacing(4)}):void 0,children:n.map(n=>(0,R.jsx)(e_,{children:(0,R.jsxs)(Jg,{selected:e?.kind===`RawMat`&&e?.rawMatName===n.casting,onClick:()=>t({kind:`RawMat`,rawMatName:n.casting}),children:[(0,R.jsx)(n_,{children:(0,R.jsx)(bU,{part:n.casting})}),(0,R.jsx)(i_,{primary:n.casting,secondary:n.message??void 0,slotProps:{primary:{variant:`h4`}}})]})},n.casting))})}function _Y({newMaterialTy:e,setNewMaterialTy:t,curCollapse:n,setCurCollapse:r,indent:i,jobs:a}){return(0,R.jsx)(Vg,{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)(e_,{children:(0,R.jsxs)(Jg,{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)(bU,{part:a.job.partName})}):void 0,(0,R.jsx)(i_,{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)(e_,{children:(0,R.jsxs)(Jg,{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)(hY,{$expandedOpen:n!==null&&n.kind===`Job`&&n.unique===a.jobUnique})}),a.job?(0,R.jsx)(n_,{children:(0,R.jsx)(bU,{part:a.job.partName})}):void 0,(0,R.jsx)(i_,{primary:(a.job?.partName??``)+` (`+a.jobUnique+`)`,slotProps:{primary:{variant:`h4`}},secondary:a.job?.routeStartUTC.toLocaleDateString()})]})}),(0,R.jsx)(Gc,{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)(e_,{sx:e=>({pl:e.spacing(i?8:4)}),children:(0,R.jsx)(Jg,{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)(i_,{primary:n.lastProc===0?`Raw Material`:`Last machined process `+n.lastProc.toString(),secondary:n.details})})})},r))})]},o))})}function vY({newMaterialTy:e,options:t,setNewMaterialTy:n,curCollapse:r,setCurCollapse:i}){return(0,R.jsxs)(Vg,{children:[(0,R.jsx)(e_,{children:(0,R.jsxs)(Jg,{onClick:()=>{e&&n(null),i(r&&r.kind===`RawMat`?null:{kind:`RawMat`})},children:[(0,R.jsx)(n_,{children:(0,R.jsx)(hY,{$expandedOpen:r!==null&&r.kind===`RawMat`})}),(0,R.jsx)(i_,{primary:`Raw Material`})]})}),(0,R.jsx)(Gc,{in:r!==null&&r.kind===`RawMat`,timeout:`auto`,children:(0,R.jsx)(gY,{castings:t.castings,newMaterialTy:e,setNewMaterialTy:n,indent:!0})}),(0,R.jsx)(e_,{children:(0,R.jsxs)(Jg,{onClick:()=>{e&&n(null),i(r&&(r.kind===`AllJobs`||r.kind===`Job`)?null:{kind:`AllJobs`})},children:[(0,R.jsx)(n_,{children:(0,R.jsx)(hY,{$expandedOpen:r!==null&&(r.kind===`AllJobs`||r.kind===`Job`)})}),(0,R.jsx)(i_,{primary:`Specify Job`})]})}),(0,R.jsx)(Gc,{in:r!==null&&(r.kind===`AllJobs`||r.kind===`Job`),timeout:`auto`,children:(0,R.jsx)(_Y,{newMaterialTy:e,jobs:t.jobs,setNewMaterialTy:n,curCollapse:r,setCurCollapse:i,indent:!0})})]})}function yY({newMaterialTy:e,setNewMaterialTy:t,toQueue:n}){let r=Q(NI),i=Q(AI),[a,o]=(0,L.useState)(null),s=Sq(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)(gY,{newMaterialTy:e,setNewMaterialTy:t,castings:s.castings}):s.castings.length===0?(0,R.jsx)(_Y,{jobs:s.jobs,newMaterialTy:e,setNewMaterialTy:t,curCollapse:a,setCurCollapse:o}):(0,R.jsx)(vY,{options:s,newMaterialTy:e,setNewMaterialTy:t,curCollapse:a,setCurCollapse:o})}function bY({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)(Vg,{children:n.map((n,r)=>(0,R.jsx)(Jg,{selected:n===e,onClick:()=>t(n),children:n},r))})]})}function xY({enteredOperator:e,setEnteredOperator:t}){return Q(EO).requireOperatorNamePromptWhenAddingMaterial?(0,R.jsx)(`div`,{style:{marginLeft:`1em`},children:(0,R.jsx)(sx,{fullWidth:!0,label:`Operator`,value:e||``,required:!0,onChange:e=>t(e.target.value)})}):null}function SY({st:e,queueNames:t,setState:n}){return mY(t)?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(MU,{}),t.length>1?(0,R.jsx)(bY,{selectedQueue:e.toQueue,setSelectedQueue:t=>{n({toQueue:t,newMaterialTy:null,enteredOperator:e.enteredOperator})},queueNames:t}):void 0,(0,R.jsx)(yY,{newMaterialTy:e.newMaterialTy,toQueue:t.length>1?e.toQueue:t[0]??null,setNewMaterialTy:t=>n({...e,newMaterialTy:t})}),(0,R.jsx)(xY,{enteredOperator:e.enteredOperator,setEnteredOperator:t=>n({...e,enteredOperator:t})})]}):null}function CY({st:{enteredOperator:e,newMaterialTy:t,toQueue:n},queueNames:r,onClose:i}){let a=Q(EO),o=Q(UO),s=qE(DI),c=Q(NI),l=Q(PI),u=Q(AI),d=Q(MI),f=Q(LI),[p,m]=UI(),[h,g]=Pre(),[_,v]=WI();if(!mY(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||g||v||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 wY(e){let t=Q(EO),[n,r]=Mre(),[i,a]=Nre(),o=Q(MI),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===gC.RawMaterial||e.role===gC.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===fC.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 fC.OnPallet:if(t.allowQuarantineToCancelLoad){let e=o.location.palletNum&&f.get(o.location.palletNum)?.loc===lC.LoadUnload;p=o.action.type===mC.Loading||e?`CancelLoad`:`SignalForScrap`}else{if(o.action.type===mC.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 fC.InQueue:if(o.action.type===mC.Loading&&!t.allowQuarantineToCancelLoad)return null;p=o.action.type===mC.Loading?`CancelLoad`:`Scrap`;break;case fC.InBasket:if(o.action.type===mC.Loading&&!t.allowQuarantineToCancelLoad)return null;p=o.action.type===mC.Loading?`CancelLoad`:`Scrap`;break;case fC.Free:p=`Scrap`;break}return p?{type:p,quarantine:e=>i(o.materialID,c,e),removing:a,quarantineQueueDestination:l}:null}function TY({onClose:e,ignoreOperator:t}){let[n,r]=(0,L.useState)(!1),[i,a]=(0,L.useState)(``),o=wY(!!t),s=qE(DI);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)($m,{open:n,onClose:()=>r(!1),children:[(0,R.jsx)(oh,{children:`Quarantine Material`}),(0,R.jsxs)(rh,{children:[(0,R.jsx)(`p`,{children:c}),(0,R.jsx)(sx,{label:`Reason`,value:i,onChange:e=>a(e.target.value),fullWidth:!0,autoFocus:!0,multiline:!0})]}),(0,R.jsxs)(eh,{children:[(0,R.jsx)(K,{color:`primary`,onClick:u,children:l}),(0,R.jsx)(K,{color:`secondary`,onClick:()=>r(!1),children:`Cancel`})]})]})]})}function EY(e){let t=Q(LI),n=Q(kI),r=Q(GO),i=Q(ZE),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)(sx,{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)(zf,{children:`Invalidate Selected Process`},`procheader`)]:[],t?X.ofRange(1,t.process+1).map(e=>(0,R.jsxs)(P_,{value:`proc`+e.toString(),children:[`Invalidate Process `,e]},e)).toRArray():[],s&&c?[(0,R.jsx)(zf,{children:`Change Material Type`},`matheader`)]:[],c?[...a.map(e=>(0,R.jsxs)(P_,{value:`rawMat`+e,children:[`Invalidate Everything And Change to `,e]},`rawMat`+e)),...o.map(({jobUnique:e,job:t})=>(0,R.jsxs)(P_,{value:`job`+e,children:[t?(0,R.jsx)(n_,{children:(0,R.jsx)(bU,{part:t.partName})}):void 0,(0,R.jsx)(i_,{primary:`Invalidate Everything And Change To Job `+e,secondary:t?.partName})]},`job`+e))]:[]]})}function DY(e){let t=Q(AI),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)(Zv,{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)(EY,{st:e.st,setState:e.setState})]})}):(0,R.jsx)(`div`,{})}function OY(e){let t=Q(EO),n=Q(AI),r=Q(MI),i=Q(LI),a=Q(kI),o=qE(DI),s=Q(UO);if(e.loadStation&&!t.allowInvalidateMaterialAtLoadStation||!e.loadStation&&!t.allowInvalidateMaterialOnQueuesPage||n===null||r&&r.location.type===fC.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}),AC.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 kY(e){return e==null||e==``}function AY(e,t){return n=>{if(kY(n.serial)||n.location.type===fC.OnPallet||n.process!==e.process-1)return!1;if(kY(n.jobUnique)){if(kY(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 jY(e){let t=Q(GO),n=Q(MI);if(n===null||e.st===null)return(0,R.jsx)(`div`,{});let r=t.jobs[n.jobUnique],i=t.material.filter(AY(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)(sx,{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)(P_,{value:e.serial,children:e.serial},e.materialID))})]})}function MY(e){let t=Q(EO),n=Q(MI),r=qE(DI),i=Q(UO);if(!t.allowSwapSerialAtLoadStation||(e.ignoreOperator&&(i=null),!n||n.location.type!==fC.OnPallet||n.action.type===mC.Loading||n.action.type===mC.UnloadToCompletedMaterial||n.action.type===mC.UnloadToInProcess))return null;function a(){n&&e.st&&e.st.selectedMatToSwap&&n.location.type===fC.OnPallet&&(e.setState({selectedMatToSwap:e.st.selectedMatToSwap,updating:!0}),AC.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 NY=V(Ab,{shouldForwardProp:e=>e.toString()[0]!==`$`})(({$noBorderBottom:e,$highlightedRow:t,$noncompletedRow:n})=>({...e&&{"& > *":{borderBottom:`unset`}},backgroundColor:t?`#FF8A65`:n?`#E0E0E0`:void 0})),PY=[/\bhold\b/,/\bmissing\b/,/\bwait\b/,/\bwaiting\b/,/\bnone\b/];function FY(e){let t=e.comment;return!t||t===``?!1:X.of(PY).some(e=>e.test(t))}function IY(e){let t=(Q(EO).allowEditJobPlanQuantityFromQueuesPage??null)!=null,[n,r]=(0,L.useState)(!1),i=e.job,a=FY(i.job);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(NY,{$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)(bU,{part:i.job.partName,size:25})}),(0,R.jsx)(`div`,{children:(0,R.jsx)(W,{variant:`body2`,component:`span`,sx:{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)(bU,{part:i.rawMatName,size:25})}),(0,R.jsx)(W,{variant:`body2`,sx:{display:`block`},children:i.rawMatName})]})}),(0,R.jsxs)(J,{children:[i.job.comment,(0,R.jsx)(q,{title:`Edit`,children:(0,R.jsx)(ru,{size:`small`,onClick:()=>e.editNote(i.job),children:(0,R.jsx)(Vx,{})})})]}),(0,R.jsxs)(J,{align:`right`,children:[i.job.cycles??0,t?(0,R.jsx)(q,{title:`Edit`,children:(0,R.jsx)(ru,{size:`small`,onClick:()=>e.editQty(i),children:(0,R.jsx)(Vx,{})})}):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)(ru,{size:`small`,onClick:()=>r(!n),children:n?(0,R.jsx)(aS,{}):(0,R.jsx)(nS,{})})})})]}),(0,R.jsx)(NY,{$highlightedRow:a,$noncompletedRow:i.remainingToStart-i.assignedRaw>0,children:(0,R.jsx)(J,{sx:{pb:`0`,pt:`0`},colSpan:10,children:(0,R.jsx)(Gc,{in:n,timeout:`auto`,unmountOnExit:!0,children:(0,R.jsx)(Nq,{job:i.job,checkAnalysisMonth:!1})})})})]})}function LY(e){let t=Q(GO),n=(0,L.useMemo)(()=>Tq(t.jobs,t.material,e.queue),[t,e.queue]);return n.length===0?null:(0,R.jsxs)(Yy,{size:`small`,children:[(0,R.jsx)(vb,{children:(0,R.jsxs)(Ab,{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)(nb,{children:n.map((t,n)=>(0,R.jsx)(IY,{job:t,editNote:e.editNote,editQty:e.editQty},n))})]})}var RY=(0,L.memo)(function({workorder:e,inProc:t}){let n=qE(HY);return(0,R.jsxs)(Ab,{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)(bU,{part:e.part,size:25})}),(0,R.jsx)(W,{variant:`body2`,sx:{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)(ru,{size:`small`,onClick:()=>n(e),children:(0,R.jsx)(Vx,{})})})]}),(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)})]})}),zY=(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)(Yy,{size:`small`,children:[(0,R.jsx)(vb,{children:(0,R.jsxs)(Ab,{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)(nb,{children:t.map(e=>(0,R.jsx)(RY,{workorder:e,inProc:n.get(e.workorderId)?.get(e.part)??0},`${e.workorderId}-${e.part}`))})]})}),BY=(0,L.memo)(function(e){let[t,n]=(0,L.useState)(null),r=qE(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)($m,{open:e.job!==null,onClose:i,children:e.job===null?void 0:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(oh,{children:(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(`div`,{children:(0,R.jsx)(bU,{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)(rh,{children:(0,R.jsx)(sx,{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)(eh,{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`})]})]})})}),VY=(0,L.memo)(function(e){let[t,n]=(0,L.useState)(!1),[r,i]=(0,L.useState)(null),a=Q(EO).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)($m,{open:a!=null&&e.job!==null,onClose:o,children:e.job===null?void 0:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(oh,{children:(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(`div`,{children:(0,R.jsx)(bU,{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)(rh,{children:[(0,R.jsxs)(`p`,{children:[e.job.job.cycles,` currently planned, `,e.job.remainingToStart,` remaining to start`]}),(0,R.jsx)(sx,{variant:`outlined`,fullWidth:!0,autoFocus:!0,type:`number`,value:r===null?``:r,onChange:e=>i(parseInt(e.target.value)),slotProps:{htmlInput:{style:{textAlign:`right`},min:(e.job.job.cycles??0)-e.job.remainingToStart}}})]}),(0,R.jsxs)(eh,{children:[(0,R.jsxs)(K,{color:`primary`,disabled:t||r===null||isNaN(r),onClick:()=>void s(),children:[t?(0,R.jsx)(Zl,{size:10}):void 0,`Set Quantity`]}),(0,R.jsx)(K,{color:`primary`,disabled:t,onClick:o,children:`Cancel`})]})]})})}),HY=Z(null);function UY(){let[e,t]=JE(HY),[n,r]=(0,L.useState)(null),i=qE(JO);function a(){t(null),r(null)}function o(){e&&n&&n!==``&&i({workorder:e.workorderId,comment:n}),a()}return(0,R.jsx)($m,{open:e!==null,onClose:a,children:e===null?void 0:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(oh,{children:(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(`div`,{children:(0,R.jsx)(bU,{part:e.part,size:40})}),(0,R.jsxs)(`div`,{style:{marginLeft:`1em`,flexGrow:1},children:[`Add Comment For `,e.workorderId]})]})}),(0,R.jsxs)(rh,{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)(sx,{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)(eh,{children:[(0,R.jsx)(K,{color:`primary`,onClick:o,children:`Save Comment`}),(0,R.jsx)(K,{color:`primary`,onClick:a,children:`Cancel`})]})]})})}var WY=(0,L.memo)(function(e){let t=Q(EO),n=qE(aY),r=qE(fY),i=qE(fq);if(!t.addToQueueButton||t.addToQueueButton===FS.DoNotShow)return null;function a(){switch(t.addToQueueButton){case FS.DoNotShow:return;case FS.AddBulkUnassigned:e.rawMatQueue?n(e.label):r(e.label);break;case FS.LookupExistingSerial:r(e.label);return;case FS.ManualBarcodeScan:i(e.label);return}}return e.rawMatQueue?(0,R.jsx)(q,{title:`Add Raw Material`,children:(0,R.jsx)(_h,{color:`secondary`,onClick:a,size:`large`,style:{marginBottom:`-30px`,zIndex:1},children:(0,R.jsx)(yx,{})})}):e.inProcQueue?(0,R.jsx)(q,{title:`Add Material`,children:(0,R.jsx)(_h,{color:`secondary`,onClick:a,size:`medium`,style:{marginBottom:`-30px`,zIndex:1},children:(0,R.jsx)(xx,{fontSize:`inherit`})})}):null});function GY(e){let t=Q(DI);return t&&t.type===`AddMatWithEnteredSerial`||t&&t.type===`Barcode`&&t.toQueue?e.includes(t.toQueue)?[t.toQueue]:[]:e}var KY=(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=GY(e),(0,R.jsx)(JU,{allowNote:!0,onClose:a,highlightProcsGreaterOrEqualTo:r?.process??void 0,extraDialogElements:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(DY,{st:r,setState:i}),(0,R.jsx)(SY,{queueNames:e,st:t,setState:n})]}),buttons:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(iY,{}),(0,R.jsx)(TY,{onClose:a}),(0,R.jsx)(OY,{onClose:a,st:r,setState:i}),(0,R.jsx)(CY,{st:t,queueNames:e,onClose:a})]})})}),qY=e=>{let t=Q(UO),n=Q(GO),r=Q(bL),i=Q(sie),a=(0,L.useMemo)(()=>Eq(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)(Iq,{matIds:e.material.map(e=>e.materialID),direction:`rect`,queueName:e.label,renderDragOverlay:t=>(0,R.jsx)(LU,{mat:t,hideEmptySerial:!0,displayJob:o&&e.rawMaterialQueue,fsize:`normal`}),children:(0,R.jsxs)(G,{sx:{minHeight:`134px`},children:[(0,R.jsxs)(G,{sx:{display:`flex`,margin:`4px`},children:[(0,R.jsx)(W,{variant:`h4`,sx:{flexGrow:1},children:e.label}),e.free?void 0:(0,R.jsx)(WY,{label:e.label,rawMatQueue:e.rawMaterialQueue,inProcQueue:e.inProcQueue})]}),(0,R.jsxs)(G,{sx:{justifyContent:`flex-start`,display:`flex`,flexWrap:`wrap`},children:[e.material.map((t,n)=>(0,R.jsx)(IU,{mat:t,hideEmptySerial:!0,fsize:`normal`,displayJob:o&&e.rawMaterialQueue},n)),e.groupedRawMat&&e.groupedRawMat.length>0?e.groupedRawMat.map((n,r)=>n.material.length===1?(0,R.jsx)(FU,{mat:n.material[0],hideEmptySerial:!0,fsize:`normal`,displayJob:o&&e.rawMaterialQueue},r):(0,R.jsx)(RU,{partOrCasting:n.partOrCasting,assignedJobUnique:n.assignedJobUnique,material:n.material,fsize:`normal`,onOpen:()=>m(n.material)},t)):void 0,e.rawMaterialQueue?o?(0,R.jsx)(LY,{queue:e.label,editNote:c,editQty:d}):(0,R.jsx)(zY,{}):void 0]})]})})},t)),(0,R.jsx)(KY,{queueNames:e.queues}),(0,R.jsx)(pY,{}),(0,R.jsx)(pq,{}),(0,R.jsx)(lY,{}),(0,R.jsx)(BY,{job:s,closeDialog:l}),(0,R.jsx)(VY,{job:u,closeDialog:f}),(0,R.jsx)(UY,{}),(0,R.jsx)(uY,{material:p,closeDialog:h,operator:t})]})};function JY(e){return ZI(`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)(qY,{...e})})}var YY=V(Ab,{shouldForwardProp:e=>e.toString()[0]!==`$`})(e=>({"& > *":{borderBottom:`unset`},...e.$darkRow&&{backgroundColor:`#F5F5F5`}})),XY=V(Ab,{shouldForwardProp:e=>e.toString()[0]!==`$`})(e=>({...e.$darkRow&&{backgroundColor:`#F5F5F5`}}));function ZY(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)(YY,{$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)(bU,{part:i.partName,size:25})}),(0,R.jsx)(`div`,{children:(0,R.jsx)(W,{variant:`body2`,component:`span`,sx:{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)(bU,{part:i.casting,size:25})}),(0,R.jsx)(W,{variant:`body2`,sx:{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)(ru,{size:`small`,onClick:()=>e.setCurEditNoteJob(i),children:(0,R.jsx)(Vx,{})})})]}),(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)(ru,{size:`small`,onClick:()=>n(!t),children:t?(0,R.jsx)(aS,{}):(0,R.jsx)(nS,{})})})})]}),(0,R.jsx)(XY,{$darkRow:e.showDarkRow&&i.darkRow,children:(0,R.jsx)(J,{sx:{pb:`0`,pt:`0`},colSpan:r,children:(0,R.jsx)(Gc,{in:t,timeout:`auto`,unmountOnExit:!0,children:(0,R.jsx)(Nq,{job:i.inProcJob?i.inProcJob:i.historicJob,checkAnalysisMonth:!1})})})})]})}function QY(e,t,n,r){let i;switch(t){case 0:i=e=>e.routeStartTime.getTime();break;case 1:i=e=>e.partName;break;case 2:i=e=>e.casting;break;case 3:i=e=>e.comment??null;break;case 4:i=e=>e.scheduledQty;break;case 5:i=e=>e.decrementedQty;break;case 6:i=e=>e.completedQty;break;case 7:i=e=>e.inProcessQty;break;case 8: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 $Y(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)(Lb,{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 eX=(0,L.memo)(function(e){let t={sortBy:e.sortBy,setSortBy:e.setSortBy,order:e.order,setOrder:e.setOrder};return(0,R.jsx)(vb,{children:(0,R.jsxs)(Ab,{children:[(0,R.jsx)($Y,{align:`left`,col:0,...t,children:`Date`}),(0,R.jsx)($Y,{align:`left`,col:1,...t,children:`Part`}),e.showMaterial?(0,R.jsx)($Y,{align:`left`,col:2,...t,children:`Material`}):void 0,(0,R.jsx)($Y,{align:`left`,col:3,...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)(ru,{size:`small`,onClick:t=>{e.setShowArchived(e=>!e),t.stopPropagation()},children:e.showArchived?(0,R.jsx)(TS,{}):(0,R.jsx)(ES,{})})})]}),(0,R.jsx)($Y,{align:`right`,col:4,...t,children:`Scheduled`}),(0,R.jsx)($Y,{align:`right`,col:5,...t,children:`Removed`}),(0,R.jsx)($Y,{align:`right`,col:6,...t,children:`Completed`}),(0,R.jsx)($Y,{align:`right`,col:7,...t,children:`In Process`}),(0,R.jsx)($Y,{align:`right`,col:8,...t,children:`Remaining To Run`}),(0,R.jsx)(J,{children:(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(ru,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>gq(e.jobs,e.showMaterial),size:`large`,children:(0,R.jsx)($x,{})})})})]})})}),tX=(0,L.memo)(function(){let[e,t]=(0,L.useState)(null),[n,r]=(0,L.useState)(0),[i,a]=(0,L.useState)(`desc`),[o,s]=(0,L.useState)(!0),c=Q(mL),l=Q(ZE),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)(()=>mq({start:VC(ow(),-6),end:VC(ow(),1)},c.matsById,l,u),[c.matsById,l,u]),p=(0,L.useMemo)(()=>QY(f,n,i,o),[f,n,i,o]);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(Yy,{stickyHeader:!0,children:[(0,R.jsx)(eX,{jobs:f,showMaterial:d,sortBy:n,setSortBy:r,order:i,setOrder:a,showArchived:o,setShowArchived:s}),(0,R.jsx)(nb,{children:p.map((e,r)=>(0,R.jsx)(ZY,{job:e,showDarkRow:n===0,showMaterial:d,setCurEditNoteJob:t},e.inProcJob?.unique??e.historicJob?.unique??r))})]}),(0,R.jsx)(BY,{job:e?.historicJob??null,closeDialog:()=>t(null)})]})});function nX(){return ZI(`Scheduled Jobs`),(0,R.jsx)(`main`,{style:{padding:`24px`},children:(0,R.jsx)(tX,{})})}var rX=`__FMS_INSIGHT_LOAD_STATION_BIN__`,iX=`__FMS_INSIGHT_PALLETS_BIN__`,aX=`__FMS_INSIGHT_ACTIVE_QUEUE_BIN__`,oX=`__FMS_INSIGHT_BASKETS_BIN__`,sX=PO(`material-bins`,[]);function cX(e,t,n){let r=Array.from(e),[i]=r.splice(t,1);return r.splice(n,0,i),r}function lX(e,t,n){let r=e.get(t);r?r.push(n):e.set(t,[n])}var uX=function(e){return e.LoadStations=`Bin_LoadStations`,e.Pallets=`Bin_Pallets`,e.ActiveQueues=`Bin_ActiveQueues`,e.Baskets=`Bin_Baskets`,e.QuarantineQueues=`Bin_Quarantine`,e}({});function dX(e){let t;return t=e.locationTitle&&e.locationTitle.length>0?e.locationTitle:e.location+` `+e.locationNum.toString(),e.slot&&(t+=`-${e.slot}`),t}function fX(e,t){let n=new Map,r=new Map,i=new Map,a=new Map,o=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 fC.InQueue:if(t.action.type===mC.Loading){let r=e.pallets[t.action.loadOntoPalletNum??0];if(r&&r.currentPalletLocation.loc===lC.LoadUnload){let e=r.currentPalletLocation.num;lX(n,e,t)}else lX(i,t.location.currentQueue||`Queue`,t)}else lX(i,t.location.currentQueue||`Queue`,t);break;case fC.OnPallet:if(t.location.palletNum){let i=e.pallets[t.location.palletNum];i.currentPalletLocation.loc===lC.LoadUnload?lX(n,i.currentPalletLocation.num,t):lX(r,o.get(t.location.palletNum)??``,t)}else lX(r,`Pallet`,t);break;case fC.Free:switch(t.action.type){case mC.Loading:{let r=e.pallets[t.action.loadOntoPalletNum??0]?.currentPalletLocation.num;lX(n,r,t);break}default:lX(i,`Free Material`,t);break}break;case fC.InBasket:t.location.basketId!==void 0&&lX(a,t.location.basketId,t);break}let s=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===gC.RawMaterial||e.role===gC.InProcessTransfer).map(([e,t])=>e)).toRSet(e=>e),c=X.ofObject(e.queues).filter(([e,t])=>!s.has(e)).toRSet(([e,t])=>e),l=t.filter(e=>e===`__FMS_INSIGHT_LOAD_STATION_BIN__`||e===`__FMS_INSIGHT_PALLETS_BIN__`||e===`__FMS_INSIGHT_ACTIVE_QUEUE_BIN__`||e===`__FMS_INSIGHT_BASKETS_BIN__`||c.has(e));l.indexOf(`__FMS_INSIGHT_ACTIVE_QUEUE_BIN__`)<0&&l.unshift(aX),a.size>0&&l.indexOf(`__FMS_INSIGHT_BASKETS_BIN__`)<0&&l.unshift(oX),l.indexOf(`__FMS_INSIGHT_PALLETS_BIN__`)<0&&l.unshift(iX),l.indexOf(`__FMS_INSIGHT_LOAD_STATION_BIN__`)<0&&l.unshift(rX);for(let e of X.of(c).sortBy(e=>e))l.indexOf(e)<0&&l.push(e);return l.map(t=>{if(t===`__FMS_INSIGHT_LOAD_STATION_BIN__`)return{type:`Bin_LoadStations`,binId:rX,byLul:n};if(t===`__FMS_INSIGHT_PALLETS_BIN__`)return{type:`Bin_Pallets`,binId:iX,byPallet:r};if(t===`__FMS_INSIGHT_ACTIVE_QUEUE_BIN__`)return{type:`Bin_ActiveQueues`,binId:aX,byQueue:X.of(s).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))};if(t===`__FMS_INSIGHT_BASKETS_BIN__`)return{type:`Bin_Baskets`,binId:oX,byBasket:new Map(a),basketLocations:X.ofObject(e.baskets??{}).collect(([e,t])=>parseInt(e)>0?[parseInt(e),dX(t)]:null).toRMap(e=>e)};{let e=t,n=i.get(e)??[];return n.sort((e,t)=>(e.location.queuePosition??0)-(t.location.queuePosition??0)),{type:`Bin_Quarantine`,binId:e,queueName:e,material:n}}})}function pX(e,t,n,r){return e.map(e=>{switch(e.type){case`Bin_Quarantine`: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 mX(e,t){for(let n of t)switch(n.type){case`Bin_Quarantine`: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 hX(e,t){for(let n of t)if(n.type===`Bin_Quarantine`&&n.queueName===e)return{bin:n,idx:0};return null}var gX=(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 _X(e){let t={type:`container`,bin:e.bin},{active:n,isDragging:r,attributes:i,listeners:a,setNodeRef:o,setActivatorNodeRef:s,transform:c,transition:l}=aU({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)(gX,{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 vX=(0,L.memo)(function(e){return e.isDragOverlay?(0,R.jsx)(gX,{binId:e.binId,label:e.queue,isDragOverlay:!0,children:e.material.map(e=>(0,R.jsx)(FU,{mat:e,hideAvatar:!0,showHandle:!0},e.materialID))}):(0,R.jsx)(_X,{binId:e.binId,label:e.queue,bin:e.bin,children:(0,R.jsx)(ZH,{items:e.material.map(e=>e.materialID),strategy:qH,children:e.material.map(e=>(0,R.jsx)(IU,{mat:e,hideAvatar:!0},e.materialID))})})});function yX(e,t){return e-t}function bX(e){return`Pallet `+e}function xX(e,t){let n=parseInt(e),r=parseInt(t);return isNaN(n)||isNaN(r)?e.localeCompare(t):n-r}function SX(e){return e}function CX(e,t){return e.localeCompare(t)}function wX(e,t){return e-t}var TX=class extends L.PureComponent{render(){return(0,R.jsx)(this.props.isDragOverlay?gX:_X,{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)(FU,{mat:e,hideAvatar:!0},t))]},n))})}};function EX({matBin:e,isDragOverlay:t}){let n=Q(EO),r=Dk(n.basketName);switch(e.type){case uX.LoadStations:return(0,R.jsx)(TX,{name:`Load Stations`,binId:e.binId,renderLabel:e=>Tk(e,n.loadStationNames),compareLabel:yX,material:e.byLul,bin:e,isDragOverlay:t});case uX.Pallets:return(0,R.jsx)(TX,{name:`Pallets`,binId:e.binId,renderLabel:bX,compareLabel:xX,material:e.byPallet,bin:e,isDragOverlay:t});case uX.ActiveQueues:return(0,R.jsx)(TX,{name:`Queues`,binId:e.binId,renderLabel:SX,compareLabel:CX,material:e.byQueue,bin:e,isDragOverlay:t});case uX.Baskets:return(0,R.jsx)(TX,{name:r+`s`,binId:e.binId,renderLabel:t=>r+` `+t.toString()+(typeof t==`number`&&e.basketLocations.get(t)?` (${e.basketLocations.get(t)})`:``),compareLabel:wX,material:e.byBasket,bin:e,isDragOverlay:t});case uX.QuarantineQueues:return(0,R.jsx)(vX,{binId:e.binId,queue:e.queueName,material:e.material,bin:e,isDragOverlay:t})}}var DX=(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)(JU,{onClose:i,allowNote:!0,highlightProcsGreaterOrEqualTo:n?.process??void 0,extraDialogElements:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(jY,{st:e,setState:t}),n===null?null:(0,R.jsx)(DY,{st:n,setState:r})]}),buttons:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(TY,{onClose:i,ignoreOperator:!0}),(0,R.jsx)(MY,{st:e,setState:t,onClose:i,ignoreOperator:!0}),(0,R.jsx)(OY,{st:n,setState:r,onClose:i,ignoreOperator:!0})]})})});function OX(e){return(0,L.useCallback)(t=>{if(typeof t.active.id==`string`)return CB({...t,droppableContainers:t.droppableContainers.filter(e=>typeof e.id==`string`)});let n=OB(t),r=xB(n.length>0?n:EB(t),`id`);if(r!=null){if(typeof r==`string`){let n=hX(r,e);n&&n.bin.material.length>0&&(r=CB({...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 kX(e){ZI(`All Material`);let t=Q(GO),[n,r]=JE(sX),[i]=UI(),a=qE(QO),[o,s]=(0,L.useState)(null),c=(0,L.useMemo)(()=>{let e=fX(t,n);return o&&o.type===`material`&&o.curOverBinId!==null?pX(e,o.mat,o.curOverBinId,o.initialIdx):e},[t,n,o]),l=e.displaySystemBins?c:c.filter(e=>e.type===uX.QuarantineQueues);return(0,R.jsxs)(gH,{collisionDetection:OX(c),measuring:{droppable:{strategy:MV.Always}},onDragStart:({active:e})=>{typeof e.id==`string`&&typeof e.data.current==`object`&&e.data.current!==null&&`bin`in e.data.current?s({type:`column`,bin:e.data.current.bin}):typeof e.data.current==`object`&&e.data.current!==null&&`mat`in e.data.current&&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`?hX(e.id,c):mX(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(cX(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`?hX(e.id,c):mX(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)(ZH,{items:l.map(e=>e.binId),strategy:UH,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)(EX,{matBin:e},e.binId))})}),(0,R.jsx)(IH,{children:o?.type===`material`?(0,R.jsx)(LU,{mat:o.mat,hideAvatar:!0}):o?.type===`column`?(0,R.jsx)(EX,{matBin:o.bin,isDragOverlay:!0}):void 0}),(0,R.jsx)(DX,{})]})}function AX(e){let t=[];for(let n of e)for(let e of n.stops)t.push(`P${n.pallet},M${e.stationNum}`);return t.join(` -> `)}function jX(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:AX(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:X.of(e).toSortedArray(n,e=>e.time.getTime()),failedCnt:e.reduce((e,t)=>e+ +!!t.failed,0)}))}function MX(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 NX(e){for(let t of e)if(t.type===Y.Inspection){let e=JSON.parse((t.details||{}).ActualPath||`[]`);if(!Array.isArray(e))continue;let n=[];for(let t of e)typeof t==`object`&&t&&n.push(BS.fromJS(t));if(n.length>0)return n}return[]}function PX(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=jX(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 FX(e,t,n){oA(PX(e,t,n))}function IX(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 LX(e){oA(IX(e))}function RX(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 zX(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 BX(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 VX(e,t){return e.sourceLinks.length?e.depth:t-1}function HX(e){return function(){return e}}function UX(e,t){return GX(e.source,t.source)||e.index-t.index}function WX(e,t){return GX(e.target,t.target)||e.index-t.index}function GX(e,t){return e.y0-t.y0}function KX(e){return e.value}function qX(e){return e.index}function JX(e){return e.nodes}function YX(e){return e.links}function XX(e,t){let n=e.get(t);if(!n)throw Error(`missing: `+t);return n}function ZX({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 QX(){let e=0,t=0,n=1,r=1,i=24,a=8,o,s=qX,c=VX,l,u,d=JX,f=YX,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),ZX(e),e}m.update=function(e){return ZX(e),e},m.nodeId=function(e){return arguments.length?(s=typeof e==`function`?e:HX(e),m):s},m.nodeAlign=function(e){return arguments.length?(c=typeof e==`function`?e:HX(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:HX(e),m):d},m.links=function(e){return arguments.length?(f=typeof e==`function`?e:HX(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=XX(n,t)),typeof i!=`object`&&(i=r.target=XX(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(BX(t.sourceLinks,KX),BX(t.targetLinks,KX)):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=RX(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=zX(e,e=>(r-t-(e.length-1)*o)/BX(e,KX));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)/(RX(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+=ee(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(GX),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+=te(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(GX),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(WX);for(let{target:{targetLinks:t}}of e)t.sort(UX)}}function O(e){if(u===void 0)for(let{sourceLinks:t,targetLinks:n}of e)t.sort(WX),n.sort(UX)}function ee(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 te(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 $X=Math.PI,eZ=2*$X,tZ=1e-6,nZ=eZ-tZ;function rZ(){this._x0=this._y0=this._x1=this._y1=null,this._=``}function iZ(){return new rZ}rZ.prototype=iZ.prototype={constructor:rZ,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>tZ)if(!(Math.abs(u*s-c*l)>tZ)||!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(($X-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>tZ&&(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)>tZ||Math.abs(this._y1-l)>tZ)&&(this._+=`L`+c+`,`+l),n&&(d<0&&(d=d%eZ+eZ),d>nZ?this._+=`A`+n+`,`+n+`,0,1,`+u+`,`+(e-o)+`,`+(t-s)+`A`+n+`,`+n+`,0,1,`+u+`,`+(this._x1=c)+`,`+(this._y1=l):d>tZ&&(this._+=`A`+n+`,`+n+`,0,`+ +(d>=$X)+`,`+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 aZ(e){return function(){return e}}function oZ(e){return e[0]}function sZ(e){return e[1]}var cZ=Array.prototype.slice;function lZ(e){return e.source}function uZ(e){return e.target}function dZ(e){var t=lZ,n=uZ,r=oZ,i=sZ,a=null;function o(){var o,s=cZ.call(arguments),c=t.apply(this,s),l=n.apply(this,s);if(a||=o=iZ(),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:aZ(+e),o):r},o.y=function(e){return arguments.length?(i=typeof e==`function`?e:aZ(+e),o):i},o.context=function(e){return arguments.length?(a=e??null,o):a},o}function fZ(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function pZ(){return dZ(fZ)}function mZ(e){return[e.source.x1,e.y0]}function hZ(e){return[e.target.x0,e.y1]}function gZ(){return pZ().source(mZ).target(hZ)}var _Z=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 hT(this.unique,this.name)}toString(){return`{unique: ${this.unique}}, name: ${this.name}}`}},vZ=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 hT(this.from,this.to)}toString(){return`{from: ${this.from.toString()}}, to: ${this.to.toString()}}`}};function yZ(e,t,n){let r=``,i=new _Z(``,`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 _Z(r,n);a.push(new vZ(i,o)),i=o}return t&&n!==void 0?n?a.push(new vZ(i,new _Z(`@@success`,`success`))):a.push(new vZ(i,new _Z(`@@failed`,`failed`))):a.push(new vZ(i,new _Z(`@@uninspected`,`uninspected`))),a}function bZ(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?yZ(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 xZ=(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);!SZ(i,a)&&r||Object.defineProperty(e,n,a)},SZ=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)},CZ=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},wZ=(e,t)=>`/* Wrapped ${e}*/\n${t}`,TZ=Object.getOwnPropertyDescriptor(Function.prototype,`toString`),EZ=Object.getOwnPropertyDescriptor(Function.prototype.toString,`name`),DZ=(e,t,n)=>{let r=n===``?``:`with ${n.trim()}() `,i=wZ.bind(null,r,t.toString());Object.defineProperty(i,"name",EZ);let{writable:a,enumerable:o,configurable:s}=TZ;Object.defineProperty(e,"toString",{value:i,writable:a,enumerable:o,configurable:s})};function OZ(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:r}=e;for(let r of Reflect.ownKeys(t))xZ(e,t,r,n);return CZ(e,t),DZ(e,t,r),e}var kZ=2147483647,AZ=new WeakMap,jZ=new WeakMap,MZ=new WeakMap;function NZ(e,t){let n=e.get(t);if(n){if(n.maxAge<=Date.now()){e.delete(t);return}return n}}function PZ(e,{cacheKey:t,cache:n=new Map,maxAge:r}={}){if(r===0)return e;if(typeof r==`number`&&Number.isFinite(r)){if(r>kZ)throw TypeError(`The \`maxAge\` option cannot exceed ${kZ}.`);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=NZ(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>kZ)throw TypeError(`The \`maxAge\` function result cannot exceed ${kZ}.`)}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),jZ.get(i)?.delete(e)},l);e.unref?.();let t=jZ.get(i)??new Set;t.add(e),jZ.set(i,t)}return c};return OZ(i,e,{ignoreNonConfigurable:!0}),AZ.set(i,n),MZ.set(i,t??(e=>e[0])),i}function FZ(e){return typeof e==`string`}function IZ(e,t,n){return n.indexOf(e)===t}function LZ(e){return e.toLowerCase()===e}function RZ(e){return e.indexOf(`,`)===-1?e:e.split(`,`)}function zZ(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 zZ(n)}if(e.indexOf(`@`)!==-1){var r=e.split(`@`)[0],n=r===void 0?``:r;return zZ(n)}if(e.indexOf(`-`)===-1||!LZ(e))return e;var i=e.split(`-`),a=i[0],o=i[1];return`${a}-${(o===void 0?``:o).toUpperCase()}`}function BZ(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(RZ(d))}var f=navigator.language,p=f&&RZ(f);o=o.concat(c,p)}return r&&o.push(a),o.filter(FZ).map(zZ).filter(IZ)}var VZ=PZ(BZ,{cacheKey:JSON.stringify});function HZ(e){return VZ(e)[0]||null}var UZ=PZ(HZ,{cacheKey:JSON.stringify}),WZ=new Map;function GZ(e){return function(t,n){let r=t||UZ();WZ.has(r)||WZ.set(r,new Map);let i=WZ.get(r);if(!i.has(e)){let t=new Intl.DateTimeFormat(r||void 0,e);i.set(e,t.format.bind(t))}return i.get(e)(n)}}function KZ(e){let t=new Date(e);return new Date(t.setHours(12))}function qZ(e){return(t,n)=>GZ(e)(t,KZ(n))}var JZ={day:`numeric`},YZ={day:`numeric`,month:`long`,year:`numeric`},XZ={month:`long`},ZZ={month:`long`,year:`numeric`},QZ={weekday:`short`},$Z={weekday:`long`},eQ={year:`numeric`},tQ=qZ(JZ),nQ=qZ(YZ),rQ=qZ(XZ),iQ=qZ(ZZ),aQ=qZ(QZ),oQ=qZ($Z),sQ=qZ(eQ);function cQ(e,t,n){return function(r,i=n){return t(e(r)+i)}}function lQ(e){return function(t){return new Date(e(t).getTime()-1)}}function uQ(e,t){return function(n){return[e(n),t(n)]}}function dQ(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 fQ(e){if(e instanceof Date)return e.getMonth();throw Error(`Failed to get month from date: ${e}.`)}function pQ(e){if(e instanceof Date)return e.getDate();throw Error(`Failed to get year from date: ${e}.`)}function mQ(e){let t=dQ(e),n=t+(-t+1)%100,r=new Date;return r.setFullYear(n,0,1),r.setHours(0,0,0,0),r}var hQ=cQ(dQ,mQ,-100),gQ=cQ(dQ,mQ,100),_Q=lQ(gQ),vQ=cQ(dQ,_Q,-100),yQ=uQ(mQ,_Q);function bQ(e){let t=dQ(e),n=t+(-t+1)%10,r=new Date;return r.setFullYear(n,0,1),r.setHours(0,0,0,0),r}var xQ=cQ(dQ,bQ,-10),SQ=cQ(dQ,bQ,10),CQ=lQ(SQ),wQ=cQ(dQ,CQ,-10),TQ=uQ(bQ,CQ);function EQ(e){let t=dQ(e),n=new Date;return n.setFullYear(t,0,1),n.setHours(0,0,0,0),n}var DQ=cQ(dQ,EQ,-1),OQ=cQ(dQ,EQ,1),kQ=lQ(OQ),AQ=cQ(dQ,kQ,-1),jQ=uQ(EQ,kQ);function MQ(e,t){return function(n,r=t){let i=dQ(n),a=fQ(n)+r,o=new Date;return o.setFullYear(i,a,1),o.setHours(0,0,0,0),e(o)}}function NQ(e){let t=dQ(e),n=fQ(e),r=new Date;return r.setFullYear(t,n,1),r.setHours(0,0,0,0),r}var PQ=MQ(NQ,-1),FQ=MQ(NQ,1),IQ=lQ(FQ),LQ=MQ(IQ,-1),RQ=uQ(NQ,IQ);function zQ(e,t){return function(n,r=t){let i=dQ(n),a=fQ(n),o=pQ(n)+r,s=new Date;return s.setFullYear(i,a,o),s.setHours(0,0,0,0),e(s)}}function BQ(e){let t=dQ(e),n=fQ(e),r=pQ(e),i=new Date;return i.setFullYear(t,n,r),i.setHours(0,0,0,0),i}var VQ=lQ(zQ(BQ,1)),HQ=uQ(BQ,VQ);function UQ(e){return pQ(IQ(e))}var WQ={GREGORY:`gregory`,HEBREW:`hebrew`,ISLAMIC:`islamic`,ISO_8601:`iso8601`},GQ={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`]},KQ=[0,1,2,3,4,5,6],qQ=KQ[0],JQ=KQ[5],YQ=KQ[6];function XQ(e,t=WQ.ISO_8601){let n=e.getDay();switch(t){case WQ.ISO_8601:return(n+6)%7;case WQ.ISLAMIC:return(n+1)%7;case WQ.HEBREW:case WQ.GREGORY:return n;default:throw Error(`Unsupported calendar type.`)}}function ZQ(e){return dQ(mQ(e))}function QQ(e){return dQ(bQ(e))}function $Q(e,t=WQ.ISO_8601){let n=dQ(e),r=fQ(e),i=e.getDate()-XQ(e,t);return new Date(n,r,i)}function e$(e,t=WQ.ISO_8601){let n=t===WQ.GREGORY?WQ.GREGORY:WQ.ISO_8601,r=$Q(e,t),i=dQ(e)+1,a,o;do a=new Date(i,0,n===WQ.ISO_8601?4:1),o=$Q(a,t),--i;while(e<o);return Math.round((r.getTime()-o.getTime())/(864e5*7))+1}function t$(e,t){switch(e){case`century`:return mQ(t);case`decade`:return bQ(t);case`year`:return EQ(t);case`month`:return NQ(t);case`day`:return BQ(t);default:throw Error(`Invalid rangeType: ${e}`)}}function n$(e,t){switch(e){case`century`:return hQ(t);case`decade`:return xQ(t);case`year`:return DQ(t);case`month`:return PQ(t);default:throw Error(`Invalid rangeType: ${e}`)}}function r$(e,t){switch(e){case`century`:return gQ(t);case`decade`:return SQ(t);case`year`:return OQ(t);case`month`:return FQ(t);default:throw Error(`Invalid rangeType: ${e}`)}}function i$(e,t){switch(e){case`decade`:return xQ(t,-100);case`year`:return DQ(t,-10);case`month`:return PQ(t,-12);default:throw Error(`Invalid rangeType: ${e}`)}}function a$(e,t){switch(e){case`decade`:return SQ(t,100);case`year`:return OQ(t,10);case`month`:return FQ(t,12);default:throw Error(`Invalid rangeType: ${e}`)}}function o$(e,t){switch(e){case`century`:return _Q(t);case`decade`:return CQ(t);case`year`:return kQ(t);case`month`:return IQ(t);case`day`:return VQ(t);default:throw Error(`Invalid rangeType: ${e}`)}}function s$(e,t){switch(e){case`century`:return vQ(t);case`decade`:return wQ(t);case`year`:return AQ(t);case`month`:return LQ(t);default:throw Error(`Invalid rangeType: ${e}`)}}function c$(e,t){switch(e){case`decade`:return wQ(t,-100);case`year`:return AQ(t,-10);case`month`:return LQ(t,-12);default:throw Error(`Invalid rangeType: ${e}`)}}function l$(e,t){switch(e){case`century`:return yQ(t);case`decade`:return TQ(t);case`year`:return jQ(t);case`month`:return RQ(t);case`day`:return HQ(t);default:throw Error(`Invalid rangeType: ${e}`)}}function u$(e,t,n){let r=[t,n].sort((e,t)=>e.getTime()-t.getTime());return[t$(e,r[0]),o$(e,r[1])]}function d$(e,t,n){return n.map(n=>(t||sQ)(e,n)).join(` – `)}function f$(e,t,n){return d$(e,t,yQ(n))}function p$(e,t,n){return d$(e,t,TQ(n))}function m$(e){return e.getDay()===new Date().getDay()}function h$(e,t=WQ.ISO_8601){let n=e.getDay();switch(t){case WQ.ISLAMIC:case WQ.HEBREW:return n===JQ||n===YQ;case WQ.ISO_8601:case WQ.GREGORY:return n===YQ||n===qQ;default:throw Error(`Unsupported calendar type.`)}}var g$=`react-calendar__navigation`;function _$({activeStartDate:e,drillUp:t,formatMonthYear:n=iQ,formatYear:r=sQ,locale:i,maxDate:a,minDate:o,navigationAriaLabel:s=``,navigationAriaLive:c,navigationLabel:l,next2AriaLabel:u=``,next2Label:d=`»`,nextAriaLabel:f=``,nextLabel:p=`›`,prev2AriaLabel:m=``,prev2Label:h=`«`,prevAriaLabel:g=``,prevLabel:_=`‹`,setActiveStartDate:v,showDoubleView:y,view:b,views:x}){let S=x.indexOf(b)>0,C=b!==`century`,w=n$(b,e),T=C?i$(b,e):void 0,E=r$(b,e),D=C?a$(b,e):void 0,O=(()=>{if(w.getFullYear()<0)return!0;let t=s$(b,e);return o&&o>=t})(),ee=C&&(()=>{if(T.getFullYear()<0)return!0;let t=c$(b,e);return o&&o>=t})(),te=a&&a<E,k=C&&a&&a<D;function A(){v(w,`prev`)}function j(){v(T,`prev2`)}function ne(){v(E,`next`)}function re(){v(D,`next2`)}function M(e){let t=(()=>{switch(b){case`century`:return f$(i,r,e);case`decade`:return p$(i,r,e);case`year`:return r(i,e);case`month`:return n(i,e);default:throw Error(`Invalid view: ${b}.`)}})();return l?l({date:e,label:t,locale:i||UZ()||void 0,view:b}):t}function N(){let n=`${g$}__label`;return(0,R.jsxs)(`button`,{"aria-label":s,"aria-live":c,className:n,disabled:!S,onClick:t,style:{flexGrow:1},type:`button`,children:[(0,R.jsx)(`span`,{className:`${n}__labelText ${n}__labelText--from`,children:M(e)}),y?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{className:`${n}__divider`,children:` – `}),(0,R.jsx)(`span`,{className:`${n}__labelText ${n}__labelText--to`,children:M(E)})]}):null]})}return(0,R.jsxs)(`div`,{className:g$,children:[h!==null&&C?(0,R.jsx)(`button`,{"aria-label":m,className:`${g$}__arrow ${g$}__prev2-button`,disabled:ee,onClick:j,type:`button`,children:h}):null,_!==null&&(0,R.jsx)(`button`,{"aria-label":g,className:`${g$}__arrow ${g$}__prev-button`,disabled:O,onClick:A,type:`button`,children:_}),N(),p!==null&&(0,R.jsx)(`button`,{"aria-label":f,className:`${g$}__arrow ${g$}__next-button`,disabled:te,onClick:ne,type:`button`,children:p}),d!==null&&C?(0,R.jsx)(`button`,{"aria-label":u,className:`${g$}__arrow ${g$}__next2-button`,disabled:k,onClick:re,type:`button`,children:d}):null]})}function v$(e){return`${e}%`}function y$({children:e,className:t,count:n,direction:r,offset:i,style:a,wrap:o,...s}){return(0,R.jsx)(`div`,{className:t,style:{display:`flex`,flexDirection:r,flexWrap:o?`wrap`:`nowrap`,...a},...s,children:L.Children.map(e,(e,t)=>{let r=i&&t===0?v$(100*i/n):null;return(0,L.cloneElement)(e,{...e.props,style:{flexBasis:v$(100/n),flexShrink:0,flexGrow:0,overflow:`hidden`,marginLeft:r,marginInlineStart:r,marginInlineEnd:0}})})})}function b$(e,t,n){return t&&t>e?t:n&&n<e?n:e}function x$(e,t){return t[0]<=e&&t[1]>=e}function S$(e,t){return e[0]<=t[0]&&e[1]>=t[1]}function C$(e,t){return x$(e[0],t)||x$(e[1],t)}function w$(e,t,n){let r=C$(t,e),i=[];if(r){i.push(n);let r=x$(e[0],t),a=x$(e[1],t);r&&i.push(`${n}Start`),a&&i.push(`${n}End`),r&&a&&i.push(`${n}BothEnds`)}return i}function T$(e){return Array.isArray(e)?e[0]!==null&&e[1]!==null:e!==null}function E$(e){if(!e)throw Error(`args is required`);let{value:t,date:n,hover:r}=e,i=`react-calendar__tile`,a=[i];if(!n)return a;let o=new Date,s=(()=>{if(Array.isArray(n))return n;let{dateType:t}=e;if(!t)throw Error(`dateType is required when date is not an array of two dates`);return l$(t,n)})();if(x$(o,s)&&a.push(`${i}--now`),!t||!T$(t))return a;let c=(()=>{if(Array.isArray(t))return t;let{valueType:n}=e;if(!n)throw Error(`valueType is required when value is not an array of two dates`);return l$(n,t)})();S$(c,s)?a.push(`${i}--active`):C$(c,s)&&a.push(`${i}--hasActive`);let l=w$(c,s,`${i}--range`);if(a.push(...l),r&&(Array.isArray(t)?t:[t]).length===1){let e=w$(r>c[0]?[c[0],r]:[r,c[0]],s,`${i}--hover`);a.push(...e)}return a}function D$({className:e,count:t=3,dateTransform:n,dateType:r,end:i,hover:a,offset:o,renderTile:s,start:c,step:l=1,value:u,valueType:d}){let f=[];for(let e=c;e<=i;e+=l){let t=n(e);f.push(s({classes:E$({date:t,dateType:r,hover:a,value:u,valueType:d}),date:t}))}return(0,R.jsx)(y$,{className:e,count:t,offset:o,wrap:!0,children:f})}function O$(e){let{activeStartDate:t,children:n,classes:r,date:i,formatAbbr:a,locale:o,maxDate:s,maxDateTransform:c,minDate:l,minDateTransform:u,onClick:d,onMouseOver:f,style:p,tileClassName:m,tileContent:h,tileDisabled:g,view:_}=e,v=(0,L.useMemo)(()=>typeof m==`function`?m({activeStartDate:t,date:i,view:_}):m,[t,i,m,_]),y=(0,L.useMemo)(()=>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?e=>d(i,e):void 0,onFocus:f?()=>f(i):void 0,onMouseOver:f?()=>f(i):void 0,style:p,type:`button`,children:[a?(0,R.jsx)(`abbr`,{"aria-label":a(o,i),children:n}):n,y]})}var k$=`react-calendar__century-view__decades__decade`;function A$({classes:e=[],currentCentury:t,formatYear:n=sQ,...r}){let{date:i,locale:a}=r,o=[];return e&&o.push(...e),o.push(k$),mQ(i).getFullYear()!==t&&o.push(`${k$}--neighboringCentury`),(0,R.jsx)(O$,{...r,classes:o,maxDateTransform:CQ,minDateTransform:bQ,view:`century`,children:p$(a,n,i)})}function j$(e){let{activeStartDate:t,hover:n,showNeighboringCentury:r,value:i,valueType:a,...o}=e,s=ZQ(t);return(0,R.jsx)(D$,{className:`react-calendar__century-view__decades`,dateTransform:bQ,dateType:`decade`,end:s+(r?119:99),hover:n,renderTile:({date:e,...n})=>(0,R.jsx)(A$,{...o,...n,activeStartDate:t,currentCentury:s,date:e},e.getTime()),start:s,step:10,value:i,valueType:a})}function M$(e){function t(){return(0,R.jsx)(j$,{...e})}return(0,R.jsx)(`div`,{className:`react-calendar__century-view`,children:t()})}var N$=`react-calendar__decade-view__years__year`;function P$({classes:e=[],currentDecade:t,formatYear:n=sQ,...r}){let{date:i,locale:a}=r,o=[];return e&&o.push(...e),o.push(N$),bQ(i).getFullYear()!==t&&o.push(`${N$}--neighboringDecade`),(0,R.jsx)(O$,{...r,classes:o,maxDateTransform:kQ,minDateTransform:EQ,view:`decade`,children:n(a,i)})}function F$(e){let{activeStartDate:t,hover:n,showNeighboringDecade:r,value:i,valueType:a,...o}=e,s=QQ(t);return(0,R.jsx)(D$,{className:`react-calendar__decade-view__years`,dateTransform:EQ,dateType:`year`,end:s+(r?11:9),hover:n,renderTile:({date:e,...n})=>(0,R.jsx)(P$,{...o,...n,activeStartDate:t,currentDecade:s,date:e},e.getTime()),start:s,value:i,valueType:a})}function I$(e){function t(){return(0,R.jsx)(F$,{...e})}return(0,R.jsx)(`div`,{className:`react-calendar__decade-view`,children:t()})}var L$=`react-calendar__month-view__days__day`;function R$({calendarType:e,classes:t=[],currentMonthIndex:n,formatDay:r=tQ,formatLongDate:i=nQ,...a}){let{date:o,locale:s}=a,c=[];return t&&c.push(...t),c.push(L$),h$(o,e)&&c.push(`${L$}--weekend`),o.getMonth()!==n&&c.push(`${L$}--neighboringMonth`),(0,R.jsx)(O$,{...a,classes:c,formatAbbr:i,maxDateTransform:VQ,minDateTransform:BQ,view:`month`,children:r(s,o)})}function z$(e){let{activeStartDate:t,calendarType:n,hover:r,showFixedNumberOfWeeks:i,showNeighboringMonth:a,value:o,valueType:s,...c}=e,l=dQ(t),u=fQ(t),d=i||a,f=XQ(t,n),p=d?0:f,m=(d?-f:0)+1;return(0,R.jsx)(D$,{className:`react-calendar__month-view__days`,count:7,dateTransform:e=>{let t=new Date;return t.setFullYear(l,u,e),BQ(t)},dateType:`day`,hover:r,end:(()=>{if(i)return m+42-1;let e=UQ(t);if(a){let t=new Date;return t.setFullYear(l,u,e),t.setHours(0,0,0,0),e+(7-XQ(t,n)-1)}return e})(),renderTile:({date:e,...r})=>(0,R.jsx)(R$,{...c,...r,activeStartDate:t,calendarType:n,currentMonthIndex:u,date:e},e.getTime()),offset:p,start:m,value:o,valueType:s})}var B$=`react-calendar__month-view__weekdays`,V$=`${B$}__weekday`;function H$(e){let{calendarType:t,formatShortWeekday:n=aQ,formatWeekday:r=oQ,locale:i,onMouseLeave:a}=e,o=NQ(new Date),s=dQ(o),c=fQ(o),l=[];for(let e=1;e<=7;e+=1){let a=new Date(s,c,e-XQ(o,t)),u=r(i,a);l.push((0,R.jsx)(`div`,{className:z(V$,m$(a)&&`${V$}--current`,h$(a,t)&&`${V$}--weekend`),children:(0,R.jsx)(`abbr`,{"aria-label":u,title:u,children:n(i,a).replace(`.`,``)})},e))}return(0,R.jsx)(y$,{className:B$,count:7,onFocus:a,onMouseOver:a,children:l})}var U$=`react-calendar__tile`;function W$(e){let{onClickWeekNumber:t,weekNumber:n}=e,r=(0,R.jsx)(`span`,{children:n});if(t){let{date:t,onClickWeekNumber:n,weekNumber:i,...a}=e;return(0,R.jsx)(`button`,{...a,className:U$,onClick:e=>n(i,t,e),type:`button`,children:r})}else{let{date:t,onClickWeekNumber:n,weekNumber:i,...a}=e;return(0,R.jsx)(`div`,{...a,className:U$,children:r})}}function G$(e){let{activeStartDate:t,calendarType:n,onClickWeekNumber:r,onMouseLeave:i,showFixedNumberOfWeeks:a}=e,o=(()=>{if(a)return 6;let e=UQ(t)-(7-XQ(t,n));return 1+Math.ceil(e/7)})(),s=(()=>{let e=dQ(t),r=fQ(t),i=pQ(t),a=[];for(let t=0;t<o;t+=1)a.push($Q(new Date(e,r,i+t*7),n));return a})();return(0,R.jsx)(y$,{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(e=>e$(e,n)).map((e,t)=>{let n=s[t];if(!n)throw Error(`date is not defined`);return(0,R.jsx)(W$,{date:n,onClickWeekNumber:r,weekNumber:e},e)})})}function K$(e){if(e){for(let[t,n]of Object.entries(GQ))if(n.includes(e))return t}return WQ.ISO_8601}function q$(e){let{activeStartDate:t,locale:n,onMouseLeave:r,showFixedNumberOfWeeks:i}=e,{calendarType:a=K$(n),formatShortWeekday:o,formatWeekday:s,onClickWeekNumber:c,showWeekNumbers:l,...u}=e;function d(){return(0,R.jsx)(H$,{calendarType:a,formatShortWeekday:o,formatWeekday:s,locale:n,onMouseLeave:r})}function f(){return l?(0,R.jsx)(G$,{activeStartDate:t,calendarType:a,onClickWeekNumber:c,onMouseLeave:r,showFixedNumberOfWeeks:i}):null}function p(){return(0,R.jsx)(z$,{calendarType:a,...u})}let m=`react-calendar__month-view`;return(0,R.jsx)(`div`,{className:z(m,l?`${m}--weekNumbers`:``),children:(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-end`},children:[f(),(0,R.jsxs)(`div`,{style:{flexGrow:1,width:`100%`},children:[d(),p()]})]})})}var J$=`react-calendar__year-view__months__month`;function Y$({classes:e=[],formatMonth:t=rQ,formatMonthYear:n=iQ,...r}){let{date:i,locale:a}=r;return(0,R.jsx)(O$,{...r,classes:[...e,J$],formatAbbr:n,maxDateTransform:IQ,minDateTransform:NQ,view:`year`,children:t(a,i)})}function X$(e){let{activeStartDate:t,hover:n,value:r,valueType:i,...a}=e,o=dQ(t);return(0,R.jsx)(D$,{className:`react-calendar__year-view__months`,dateTransform:e=>{let t=new Date;return t.setFullYear(o,e,1),NQ(t)},dateType:`month`,end:11,hover:n,renderTile:({date:e,...n})=>(0,R.jsx)(Y$,{...a,...n,activeStartDate:t,date:e},e.getTime()),start:0,value:r,valueType:i})}function Z$(e){function t(){return(0,R.jsx)(X$,{...e})}return(0,R.jsx)(`div`,{className:`react-calendar__year-view`,children:t()})}var Q$=`react-calendar`,$$=[`century`,`decade`,`year`,`month`],e1=[`decade`,`year`,`month`,`day`],t1=new Date;t1.setFullYear(1,0,1),t1.setHours(0,0,0,0);var n1=new Date(864e13);function r1(e){return e instanceof Date?e:new Date(e)}function i1(e,t){return $$.slice($$.indexOf(e),$$.indexOf(t)+1)}function a1(e,t,n){return i1(t,n).indexOf(e)!==-1}function o1(e,t,n){return e&&a1(e,t,n)?e:n}function s1(e){return e1[$$.indexOf(e)]}function c1(e,t){let n=Array.isArray(e)?e[t]:e;if(!n)return null;let r=r1(n);if(Number.isNaN(r.getTime()))throw Error(`Invalid date: ${e}`);return r}function l1({value:e,minDate:t,maxDate:n,maxDetail:r},i){let a=c1(e,i);if(!a)return null;let o=s1(r);return b$((()=>{switch(i){case 0:return t$(o,a);case 1:return o$(o,a);default:throw Error(`Invalid index value: ${i}`)}})(),t,n)}var u1=e=>l1(e,0),d1=e=>l1(e,1),f1=e=>[u1,d1].map(t=>t(e));function p1({maxDate:e,maxDetail:t,minDate:n,minDetail:r,value:i,view:a}){return t$(o1(a,r,t),u1({value:i,minDate:n,maxDate:e,maxDetail:t})||new Date)}function m1({activeStartDate:e,defaultActiveStartDate:t,defaultValue:n,defaultView:r,maxDate:i,maxDetail:a,minDate:o,minDetail:s,value:c,view:l}){let u=o1(l,s,a),d=e||t;return d?t$(u,d):p1({maxDate:i,maxDetail:a,minDate:o,minDetail:s,value:c||n,view:l||r})}function h1(e){return e&&(!Array.isArray(e)||e.length===1)}function g1(e,t){return e instanceof Date&&t instanceof Date&&e.getTime()===t.getTime()}var _1=(0,L.forwardRef)(function(e,t){let{activeStartDate:n,allowPartialRange:r,calendarType:i,className:a,"data-testid":o,defaultActiveStartDate:s,defaultValue:c,defaultView:l,formatDay:u,formatLongDate:d,formatMonth:f,formatMonthYear:p,formatShortWeekday:m,formatWeekday:h,formatYear:g,goToRangeStartOnSelect:_=!0,inputRef:v,locale:y,maxDate:b=n1,maxDetail:x=`month`,minDate:S=t1,minDetail:C=`century`,navigationAriaLabel:w,navigationAriaLive:T,navigationLabel:E,next2AriaLabel:D,next2Label:O,nextAriaLabel:ee,nextLabel:te,onActiveStartDateChange:k,onChange:A,onClickDay:j,onClickDecade:ne,onClickMonth:re,onClickWeekNumber:M,onClickYear:N,onDrillDown:ie,onDrillUp:ae,onViewChange:P,prev2AriaLabel:oe,prev2Label:F,prevAriaLabel:se,prevLabel:ce,returnValue:le=`start`,selectRange:ue,showDoubleView:de,showFixedNumberOfWeeks:fe,showNavigation:I=!0,showNeighboringCentury:pe,showNeighboringDecade:me,showNeighboringMonth:he=!0,showWeekNumbers:ge,tileClassName:_e,tileContent:ve,tileDisabled:ye,value:be,view:xe}=e,[Se,Ce]=(0,L.useState)(s),[we,Te]=(0,L.useState)(null),[Ee,De]=(0,L.useState)(Array.isArray(c)?c.map(e=>e===null?null:r1(e)):c==null?null:r1(c)),[Oe,ke]=(0,L.useState)(l),Ae=n||Se||m1({activeStartDate:n,defaultActiveStartDate:s,defaultValue:c,defaultView:l,maxDate:b,maxDetail:x,minDate:S,minDetail:C,value:be,view:xe}),je=(()=>{let e=ue&&h1(Ee)||be===void 0?Ee:be;return e?Array.isArray(e)?e.map(e=>e===null?null:r1(e)):e===null?null:r1(e):null})(),Me=s1(x),Ne=o1(xe||Oe,C,x),Pe=i1(C,x),Fe=ue?we:null,Ie=Pe.indexOf(Ne)<Pe.length-1,Le=Pe.indexOf(Ne)>0,Re=(0,L.useCallback)(e=>(()=>{switch(le){case`start`:return u1;case`end`:return d1;case`range`:return f1;default:throw Error(`Invalid returnValue.`)}})()({maxDate:b,maxDetail:x,minDate:S,value:e}),[b,x,S,le]),ze=(0,L.useCallback)((e,t)=>{Ce(e);let n={action:t,activeStartDate:e,value:je,view:Ne};k&&!g1(Ae,e)&&k(n)},[Ae,k,je,Ne]),Be=(0,L.useCallback)((e,t)=>{let n=(()=>{switch(Ne){case`century`:return ne;case`decade`:return N;case`year`:return re;case`month`:return j;default:throw Error(`Invalid view: ${Ne}.`)}})();n&&n(e,t)},[j,ne,re,N,Ne]),Ve=(0,L.useCallback)((e,t)=>{if(!Ie)return;Be(e,t);let n=Pe[Pe.indexOf(Ne)+1];if(!n)throw Error(`Attempted to drill down from the lowest view.`);Ce(e),ke(n);let r={action:`drillDown`,activeStartDate:e,value:je,view:n};k&&!g1(Ae,e)&&k(r),P&&Ne!==n&&P(r),ie&&ie(r)},[Ae,Ie,k,Be,ie,P,je,Ne,Pe]),He=(0,L.useCallback)(()=>{if(!Le)return;let e=Pe[Pe.indexOf(Ne)-1];if(!e)throw Error(`Attempted to drill up from the highest view.`);let t=t$(e,Ae);Ce(t),ke(e);let n={action:`drillUp`,activeStartDate:t,value:je,view:e};k&&!g1(Ae,t)&&k(n),P&&Ne!==e&&P(n),ae&&ae(n)},[Ae,Le,k,ae,P,je,Ne,Pe]),Ue=(0,L.useCallback)((e,t)=>{let n=je;Be(e,t);let i=ue&&!h1(n),a;if(ue)if(i)a=t$(Me,e);else{if(!n)throw Error(`previousValue is required`);if(Array.isArray(n))throw Error(`previousValue must not be an array`);a=u$(Me,n,e)}else a=Re(e);let o=!ue||i||_?p1({maxDate:b,maxDetail:x,minDate:S,minDetail:C,value:a,view:Ne}):null;t.persist(),Ce(o),De(a);let s={action:`onChange`,activeStartDate:o,value:a,view:Ne};if(k&&!g1(Ae,o)&&k(s),A)if(ue){if(!h1(a))A(a||null,t);else if(r){if(Array.isArray(a))throw Error(`value must not be an array`);A([a||null,null],t)}}else A(a||null,t)},[Ae,r,Re,_,b,x,S,C,k,A,Be,ue,je,Me,Ne]);function We(e){Te(e)}function Ge(){Te(null)}(0,L.useImperativeHandle)(t,()=>({activeStartDate:Ae,drillDown:Ve,drillUp:He,onChange:Ue,setActiveStartDate:ze,value:je,view:Ne}),[Ae,Ve,He,Ue,ze,je,Ne]);function Ke(e){let t={activeStartDate:e?r$(Ne,Ae):t$(Ne,Ae),hover:Fe,locale:y,maxDate:b,minDate:S,onClick:Ie?Ve:Ue,onMouseOver:ue?We:void 0,tileClassName:_e,tileContent:ve,tileDisabled:ye,value:je,valueType:Me};switch(Ne){case`century`:return(0,R.jsx)(M$,{formatYear:g,showNeighboringCentury:pe,...t});case`decade`:return(0,R.jsx)(I$,{formatYear:g,showNeighboringDecade:me,...t});case`year`:return(0,R.jsx)(Z$,{formatMonth:f,formatMonthYear:p,...t});case`month`:return(0,R.jsx)(q$,{calendarType:i,formatDay:u,formatLongDate:d,formatShortWeekday:m,formatWeekday:h,onClickWeekNumber:M,onMouseLeave:ue?Ge:void 0,showFixedNumberOfWeeks:fe===void 0?de:fe,showNeighboringMonth:he,showWeekNumbers:ge,...t});default:throw Error(`Invalid view: ${Ne}.`)}}function qe(){return I?(0,R.jsx)(_$,{activeStartDate:Ae,drillUp:He,formatMonthYear:p,formatYear:g,locale:y,maxDate:b,minDate:S,navigationAriaLabel:w,navigationAriaLive:T,navigationLabel:E,next2AriaLabel:D,next2Label:O,nextAriaLabel:ee,nextLabel:te,prev2AriaLabel:oe,prev2Label:F,prevAriaLabel:se,prevLabel:ce,setActiveStartDate:ze,showDoubleView:de,view:Ne,views:Pe}):null}return(0,R.jsxs)(`div`,{className:z(Q$,ue&&(Array.isArray(je)?je:[je]).length===1&&`${Q$}--selectRange`,de&&`${Q$}--doubleView`,a),"data-testid":o,ref:v,children:[qe(),(0,R.jsxs)(`div`,{className:`${Q$}__viewContainer`,onBlur:ue?Ge:void 0,onMouseLeave:ue?Ge:void 0,children:[Ke(),de?Ke(!0):null]})]})}),v1=V(J,{shouldForwardProp:e=>e!==`expand`})(({expand:e})=>({width:e?`100%`:void 0}));function y1({open:e}){let t=qE(e);return(0,R.jsx)(q,{title:`Filter`,enterDelay:300,children:(0,R.jsx)(ru,{onClick:()=>t(!0),size:`small`,children:(0,R.jsx)(qx,{})})})}function b1(e){let t=e.copyToClipboardRows;return(0,R.jsx)(vb,{children:(0,R.jsxs)(Ab,{children:[e.columns.map(t=>(0,R.jsxs)(v1,{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)(Lb,{active:e.sort.orderBy===t.id,direction:e.sort.order,onClick:()=>e.sort.handleRequestSort(t.id),children:t.label})}),t.openFilterDialog?(0,R.jsx)(y1,{open:t.openFilterDialog}):void 0]},t.id)),e.showDetailsCol?(0,R.jsx)(v1,{padding:`checkbox`,children:t?(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(ru,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>j1(e.columns,t),size:`large`,children:(0,R.jsx)($x,{})})}):void 0}):void 0]})})}var x1=new Intl.DateTimeFormat([],{year:`numeric`,month:`short`,day:`numeric`}),S1=new Intl.DateTimeFormat([],{year:`numeric`,month:`long`}),C1=V(_1)(({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 w1(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)}return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(`span`,{children:[x1.format(e.zoom.current_date_zoom?.start??e.zoom.default_date_range[0]),` -`,` `,x1.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)(ru,{onClick:()=>n(!0),size:`large`,children:(0,R.jsx)(OS,{})})}),(0,R.jsx)(q,{title:`Reset Date Range`,children:(0,R.jsx)(ru,{onClick:()=>e.zoom.set_date_zoom_range(void 0),size:`large`,children:(0,R.jsx)(kS,{})})}),(0,R.jsxs)($m,{open:t,onClose:()=>n(!1),children:[(0,R.jsxs)(oh,{children:[`Select Date Range `,S1.format(e.zoom.default_date_range[0])]}),(0,R.jsx)(rh,{children:(0,R.jsx)(C1,{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:e=>{Array.isArray(e)&&e[0]instanceof Date&&e[1]instanceof Date&&a([e[0],e[1]])}})}),(0,R.jsx)(eh,{children:(0,R.jsx)(K,{onClick:()=>n(!1),children:`Close`})})]})]})}var T1=(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)(w1,{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)(ru,{onClick:()=>e.extend(-1),size:`large`,children:(0,R.jsx)(xS,{})})}),(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)(ru,{onClick:()=>e.extend(1),size:`large`,children:(0,R.jsx)(bS,{})})})]})),(0,R.jsxs)(Sb,{children:[(0,R.jsx)(W,{color:`textSecondary`,variant:`caption`,children:`Rows per page:`}),(0,R.jsx)(ov,{style:{marginLeft:8,marginRight:`1em`},value:t.rowsPerPage,SelectDisplayProps:{style:{color:`rgba(0, 0, 0, 0.54)`}},input:(0,R.jsx)(gp,{}),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)(P_,{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)(ru,{onClick:()=>t.setPage(0),disabled:t.page===0,"aria-label":`First Page`,size:`large`,children:(0,R.jsx)(Jx,{})}),(0,R.jsx)(ru,{onClick:()=>t.setPage(t.page-1),disabled:t.page===0,"aria-label":`Previous Page`,size:`large`,children:(0,R.jsx)(rS,{})}),(0,R.jsx)(ru,{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)(iS,{})}),(0,R.jsx)(ru,{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)(oS,{})}),e?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`div`,{style:{flexGrow:1}}),r]}):void 0]})}),E1=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)(nb,{children:[t.map((t,n)=>(0,R.jsxs)(Ab,{children:[this.props.columns.map(e=>(0,R.jsx)(v1,{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)(v1,{padding:`checkbox`,children:(0,R.jsx)(ru,{onClick:n=>e(n,t),size:`large`,children:(0,R.jsx)(lS,{})})}):void 0]},n)),n>0?(0,R.jsx)(Ab,{style:{height:53*n},children:(0,R.jsx)(J,{colSpan:this.props.columns.length+ +!!this.props.onClickDetails,style:{textAlign:`center`},children:t.length===0?this.props.emptyMessage:void 0})}):void 0]})}};function D1(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 O1(){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 k1(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 A1(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 j1(e,t){oA(A1(e,t))}var M1=[{id:0,numeric:!1,label:`Date`,getDisplay:e=>e.time.toLocaleString(),getForSort:e=>e.time.getTime()},{id:1,numeric:!1,label:`Serial`,getDisplay:e=>e.serial||``},{id:2,numeric:!1,label:`Workorder`,getDisplay:e=>e.workorder||``},{id:3,numeric:!1,label:`Inspected`,getDisplay:e=>e.toInspect?`inspected`:``},{id:4,numeric:!1,label:`Failed`,getDisplay:e=>e.failed?`failed`:``}];function N1(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 P1=(0,L.memo)(function(e){let t=qE(DI),n=k1(0,M1),[r,i]=(0,L.useState)(eE.empty()),[a,o]=(0,L.useState)(10),[s,c]=(0,L.useState)(void 0),l=N1(e.zoomType,e.extendDateRange,e.default_date_range),u=jX(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)(rl,{expanded:u===s,onChange:(e,t)=>c(t?u:void 0),children:[(0,R.jsxs)(Il,{expandIcon:(0,R.jsx)(Gx,{}),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)(sl,{children:(0,R.jsxs)(`div`,{style:{width:`100%`},children:[(0,R.jsxs)(Yy,{children:[(0,R.jsx)(b1,{columns:M1,sort:n,showDetailsCol:!0}),(0,R.jsx)(E1,{columns:M1,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)(T1,{tpage:{page:f,rowsPerPage:a,setPage:e=>i(r.set(u,e)),setRowsPerPage:o},count:d.material.length,zoom:l.zoom})]})})]},u)})})}),F1=20,I1=20,L1=120,R1=20;function z1({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=NA(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 B1({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 V1=(0,L.memo)(function({data:e,setTooltip:t,parentHeight:n,parentWidth:r}){let{nodes:i,links:a}=(0,L.useMemo)(()=>{let t=bZ(e);if(t.nodes.length===0)return{nodes:[],links:[]};let i=QX().nodeWidth(10).nodePadding(10).nodeAlign(VX).extent([[F1,I1],[r-L1,n-R1-I1]])({nodes:t.nodes,links:t.links});return{nodes:i.nodes,links:i.links.flatMap(e=>typeof e.source==`object`&&typeof e.target==`object`&&e.width!==void 0?[{...e,source:e.source,target:e.target,width:e.width}]:[])}},[e,r,n]),o=gZ();return(0,R.jsxs)(`svg`,{width:r,height:n,children:[(0,R.jsx)(`g`,{children:i.map((e,t)=>(0,R.jsx)(B1,{node:e},t))}),(0,R.jsx)(`g`,{children:a.map((e,n)=>(0,R.jsx)(z1,{link:e,path:o(e),strokeWidth:Math.max(e.width??1,1),setTooltip:t},n))})]})});function H1({tooltip:e}){return e===null?null:(0,R.jsxs)(`div`,{children:[e.data.source.name,` ➞ `,e.data.target.name,`: `,e.data.value,` parts`]})}var U1=(0,L.memo)(function({data:e}){let t=(0,L.useMemo)(()=>Z(null),[]),n=qE(t);return(0,R.jsx)(`div`,{style:{position:`relative`},children:(0,R.jsx)(KA,{sx:{height:{xs:`calc(100vh - 230px)`,md:`calc(100vh - 182px)`,xl:`calc(100vh - 130px)`},width:`100%`},chart:({height:t,width:r})=>(0,R.jsx)(V1,{data:e,setTooltip:n,parentHeight:t,parentWidth:r}),tooltipAtom:t,TooltipContent:H1})})}),W1=AO(e=>e(JI)?`aaa`:void 0),G1=AO(e=>e(JI)?`CMM`:void 0),K1=Z(!1);function q1(e){let[t,n]=JE(W1),[r,i]=JE(G1),[a,o]=JE(K1),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,{sx:{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,{sx:{flexGrow:1}}),e.onlyTable?void 0:(0,R.jsx)(Th,{size:`small`,children:(0,R.jsxs)(ov,{autoWidth:!0,value:a?`table`:`sankey`,onChange:e=>o(e.target.value===`table`),children:[(0,R.jsx)(P_,{value:`sankey`,children:`Sankey`},`sankey`),(0,R.jsx)(P_,{value:`table`,children:`Table`},`table`)]})}),(0,R.jsx)(Th,{size:`small`,children:(0,R.jsxs)(ov,{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)(P_,{value:``,children:(0,R.jsx)(`em`,{children:`Select Inspection Type`})},0),u.map(e=>(0,R.jsx)(P_,{value:e,children:e},e))]})}),e.restrictToPart===void 0?(0,R.jsx)(Th,{size:`small`,children:(0,R.jsxs)(ov,{name:`inspection-sankey-select-part`,autoWidth:!0,displayEmpty:!0,value:c||``,onChange:e=>n(e.target.value),children:[c?void 0:(0,R.jsx)(P_,{value:``,children:(0,R.jsx)(`em`,{children:`Select Part`})},0),l.map(e=>(0,R.jsx)(P_,{value:e,children:(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(bU,{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)(ru,{onClick:()=>s?FX(c||``,r||``,s):void 0,style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,R.jsx)($x,{})})}):void 0]}),(0,R.jsx)(`main`,{children:s?a||e.onlyTable?(0,R.jsx)(P1,{zoomType:e.zoomType,points:s,default_date_range:e.default_date_range,extendDateRange:e.extendDateRange,hideOpenDetailColumn:e.hideOpenDetailColumn}):(0,R.jsx)(U1,{data:s}):void 0})]})}var J1=Z(null),Y1=BO(Z(async(e,{signal:t})=>{let n=e(J1);if(n==null||jC===void 0)return eE.empty();let r=await jC.get(n.curStart,n.curEnd,t);return X.of(r).flatMap(fL).filter(e=>e.key.part===n.part).toLookupMap(e=>e.key,e=>e.entry.cntr,e=>e.entry)}),e=>e??eE.empty()),X1=BO(Z(async e=>{let t=e(J1);if(t==null)return eE.empty();let n=[];for(let e of PC)n.push(await e.get(t.curStart,t.curEnd));return X.of(n).flatMap(e=>e).flatMap(fL).filter(e=>e.key.part===t.part).toLookupMap(e=>e.key,e=>e.entry.cntr,e=>e.entry)}),e=>e??eE.empty()),Z1=Z(e=>eE.union((e,t)=>e.union(t),e(Y1),e(X1)));function Q1(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 $1=[{id:0,numeric:!1,label:`Date`,getDisplay:e=>e.time.toLocaleString(),getForSort:e=>e.time.getTime()},{id:1,numeric:!1,label:`Part`,getDisplay:e=>e.part},{id:2,numeric:!1,label:`Inspection`,getDisplay:e=>e.inspType},{id:3,numeric:!1,label:`Serial`,getDisplay:e=>e.serial||``},{id:4,numeric:!1,label:`Workorder`,getDisplay:e=>e.workorder||``}];function e0(e){let t=XI(),n=k1(0,$1),r=O1(),i=qE(DI),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)(Yy,{children:[(0,R.jsx)(b1,{columns:$1,sort:n,showDetailsCol:!t}),(0,R.jsx)(E1,{columns:$1,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)(T1,{tpage:{...r,page:a},count:e.failed.length})]})}function t0(){let e=Q(uL),t=(0,L.useMemo)(()=>{let t=ow();return MX(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,{sx:{flexGrow:1}}),(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(ru,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>LX(t),size:`large`,children:(0,R.jsx)($x,{})})})]}),(0,R.jsx)(e0,{failed:t})]})}function n0(){let e=XI(),t=qE(DI),[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),jC.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=>{DC.isApiException(e)?s(e.response):e instanceof Error?s(e.message):s(e)}).finally(()=>a(!1)))}return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(Zv,{direction:`row`,spacing:2,sx:{alignItems:`center`,marginLeft:`auto`,marginRight:`auto`},children:[(0,R.jsx)(`div`,{children:(0,R.jsx)(sx,{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)(Zv,{direction:`row`,spacing:2,children:[(0,R.jsx)(Zl,{}),` Searching`]}):(0,R.jsx)(R.Fragment,{children:`Lookup`})})})]}),o&&o!==``?(0,R.jsx)(`div`,{children:o}):void 0]})}function r0(e){let t=e[0];if(t===void 0)return ow();let n=t.endUTC;for(let t of e)t.type===Y.MachineCycle&&(n=t.endUTC);return n}function i0(){let e=Q(jI),t=Q(II);return e?(0,R.jsx)(zU,{partName:e.partName,serial:e.serial,subtitle:`Path `+AX(NX(t))+` at `+r0(t).toLocaleString()}):(0,R.jsx)(`div`,{children:`Serial Details`})}function a0({setStep:e}){let t=Q(jI),n=Q(II),r=qE(J1),i=qE(DI);return(0,R.jsxs)(Zv,{direction:`row`,spacing:2,sx:{mt:`2em`},children:[t?(0,R.jsx)(K,{variant:`contained`,color:`secondary`,onClick:()=>{let i=r0(n);r({part:t?.partName??``,curStart:JC(VC(i,-5)),curEnd:Nne(VC(i,5))}),e(2)},children:`Lookup Similar Paths`}):void 0,(0,R.jsx)(K,{variant:`contained`,style:{marginLeft:`2em`},onClick:()=>{i(null),r(null),e(0)},children:`Reset`})]})}function o0(e){let t=Q(AI),n=Q(II),[r,i]=JE(J1),a=Q(Z1),o=qE(DI);if(t===null)return null;function s(e){i(Q1(e))}return(0,R.jsxs)(`div`,{children:[(0,R.jsx)(q1,{inspectionlogs:a,restrictToPart:t.partName,subtitle:`Paths for `+t.partName+` around `+r0(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 s0(){let[e,t]=(0,L.useState)(0),n=Q(DI),r=e;return r===0&&n&&(r=1),(0,R.jsxs)(Zv,{direction:`column`,spacing:2,children:[(0,R.jsxs)(Ry,{activeStep:r,orientation:`horizontal`,children:[(0,R.jsx)(iy,{children:(0,R.jsx)(xy,{children:`Select Material`})}),(0,R.jsx)(iy,{children:(0,R.jsx)(xy,{children:(0,R.jsx)(i0,{})})}),(0,R.jsx)(iy,{children:(0,R.jsx)(xy,{children:`Lookup similar paths`})})]}),r===0?(0,R.jsxs)(Zv,{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)(n0,{}),(0,R.jsx)(t0,{})]}):r===1?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(yU,{fallback:(0,R.jsx)(KU,{}),children:(0,R.jsx)(WU,{})}),(0,R.jsx)(a0,{setStep:t})]}):r===2?(0,R.jsx)(yU,{children:(0,R.jsx)(o0,{setStep:t})}):void 0]})}function c0(){return ZI(`Quality Material`),(0,R.jsx)(`main`,{style:{padding:`24px`},children:(0,R.jsx)(s0,{})})}var l0=(0,L.memo)(function(){ZI(`Paths`);let e=Q(uL);return(0,R.jsx)(q1,{inspectionlogs:(0,L.useMemo)(()=>{let t=ow(),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(ow(),-6),VC(ow(),1)],subtitle:`Paths from the last 7 days`})}),u0=Z(!1);function d0(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 f0({work:e}){return e.plannedQuantity<=e.completedQuantity?(0,R.jsx)(Ax,{}):(0,R.jsx)(yS,{})}function p0(){let[e,t]=(0,L.useState)(null),n=Q(AI),[r]=VI(),i=qE(u0);return(0,R.jsx)(sx,{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 m0(){let e=Q(AI),t=Q(kre),n=qE(u0),[r]=VI();return(0,R.jsx)(Vg,{children:(t??[]).map(t=>(0,R.jsx)(e_,{children:(0,R.jsxs)(Jg,{onClick:()=>{e&&r(e,t.workorderId),n(!1)},children:[(0,R.jsx)(n_,{children:(0,R.jsx)(f0,{work:t})}),(0,R.jsx)(i_,{primary:t.workorderId,secondary:d0(t)})]})},t.workorderId))})}var h0=(0,L.memo)(function(){let[e,t]=JE(u0),n;return n=e?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(oh,{children:`Select Workorder`}),(0,R.jsx)(rh,{children:(0,R.jsxs)(yU,{children:[(0,R.jsx)(p0,{}),(0,R.jsx)(m0,{})]})}),(0,R.jsx)(eh,{children:(0,R.jsx)(K,{onClick:()=>t(!1),color:`primary`,children:`Cancel`})})]}):(0,R.jsx)(`p`,{children:`None`}),(0,R.jsx)($m,{open:e,onClose:()=>t(!1),maxWidth:`md`,children:n})}),g0=Z(!1);function _0(){let[e,t]=(0,L.useState)(null),n=Q(AI),[r]=zI(),i=qE(g0);return(0,R.jsx)(sx,{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 v0(){let e=Q(AI),[t]=zI(),n=Q(wL),r=X.of(n).sortBy(e=>e),i=qE(g0);return e===null?null:(0,R.jsx)(Vg,{children:r.map(n=>(0,R.jsx)(e_,{children:(0,R.jsxs)(Jg,{onClick:()=>{t({mat:e,inspType:n,inspect:!0}),i(!1)},children:[(0,R.jsx)(n_,{children:(0,R.jsx)(_S,{})}),(0,R.jsx)(i_,{primary:n})]})},n))})}function y0(){let e=qE(g0),t=Q(MI);return t===null||t.materialID<0?null:(0,R.jsx)(K,{color:`primary`,onClick:()=>e(!0),children:`Signal Inspection`})}var b0=(0,L.memo)(function(){let[e,t]=JE(g0),n;return n=e?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(oh,{children:`Select Inspection Type`}),(0,R.jsx)(rh,{children:(0,R.jsxs)(yU,{children:[(0,R.jsx)(_0,{}),(0,R.jsx)(v0,{})]})}),(0,R.jsx)(eh,{children:(0,R.jsx)(K,{onClick:()=>t(!1),color:`primary`,children:`Cancel`})})]}):(0,R.jsx)(`p`,{children:`None`}),(0,R.jsx)($m,{open:e,onClose:()=>t(!1),maxWidth:`md`,children:n})}),x0=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[e.BasketZone=6]=`BasketZone`,e}({});function S0(e){switch(e.type){case 0:return`Material-`+(e.material?.materialID??-1).toString();case 1:return`FreeMaterialZone`;case 2:return`CompletedCollapsedMaterialZone`;case 3:return`CompletedExpandedMaterialZone`;case 4:return`PalletFaceZone-`+e.face.toString();case 5:return`QueueZone-`+e.queue;case 6:return`BasketZone-`+e.basketId.toString()}}function C0(e){switch(e.type){case 0:return[e.type,e.material];case 1:case 2:case 3:return[e.type,null];case 4:return[e.type,e.face];case 5:return[e.type,e.queue];case 6:return[e.type,e.basketId]}}function w0(e){let t,n,r=new Map,i=new Map,a=new Map,o=[];for(let s of e.values())switch(s.type){case 1:t=s.elem;break;case 2:case 3:n=s.elem;break;case 4:r.set(s.face,s.elem);break;case 5:i.set(s.queue,s.elem);break;case 6:a.set(s.basketId,s.elem);break;case 0:s.material&&o.push([s.elem,s.material]);break}return{freeMaterial:t,completedMaterial:n,faces:r,queues:i,baskets:a,material:o}}function T0(e,t){if(!e)return[];let n=w0(t);if(!n.completedMaterial)return[];let r=[],i=new Map,a=new Map,o=new Map,s=0;for(let[t,c]of X.of(n.material).sortBy(([e])=>e.left,([e])=>e.top))switch(c.action.type){case mC.UnloadToCompletedMaterial:case mC.UnloadToInProcess:if(c.action.unloadToBasketId){let i=n.baskets.get(c.action.unloadToBasketId),a=o.get(c.action.unloadToBasketId)??0;o.set(c.action.unloadToBasketId,a+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*(a+1),curveDirection:1})}else if(c.action.type===mC.UnloadToCompletedMaterial&&(!c.action.unloadIntoQueue||c.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,o;c.action.unloadIntoQueue?(i=n.queues.get(c.action.unloadIntoQueue),o=a.get(c.action.unloadIntoQueue)??0,a.set(c.action.unloadIntoQueue,o+1)):(i=n.freeMaterial,o=s,s+=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*(o+1),curveDirection:1})}break;case mC.Loading:if(c.action.loadFromBasketId&&c.action.loadOntoFace){let e=n.faces.get(c.action.loadOntoFace);if(e!==void 0){let n=i.get(c.action.loadOntoFace)??0;i.set(c.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})}}else if(c.action.loadFromBasketId){let i=n.baskets.get(c.action.loadFromBasketId),a=o.get(c.action.loadFromBasketId)??0;o.set(c.action.loadFromBasketId,a+1),r.push({fromX:t.right,fromY:t.top+t.height/2,toX:i===void 0?e.right-10:i.left+20,toY:i===void 0?t.top+t.height/2:i.top+50+20*a,curveDirection:-1})}else if(c.action.loadOntoFace)if(c.location.type===fC.OnPallet)if(c.location.palletNum===c.action.loadOntoPalletNum&&c.location.face===c.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(c.action.loadOntoFace);e&&(c.action.loadOntoFace<(c.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(c.action.loadOntoFace);if(e!==void 0){let n=i.get(c.action.loadOntoFace)??0;i.set(c.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 E0(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 D0(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 O0=(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:T0(e.current?E0(e.current):null,t.collectValues(e=>e.elem.current?{...e,elem:E0(e.elem.current)}:null)).map((e,t)=>(0,R.jsx)(`path`,{style:{fill:`none`,stroke:`rgba(0,0,0,0.15)`,strokeWidth:2},d:D0(e),markerEnd:`url(#arrow)`},t))})}),k0=(0,L.createContext)(void 0),A0=(0,L.memo)(function({children:e,hideArrows:t,whiteBackground:n}){let r=(0,L.useRef)(null),[i,a]=(0,L.useState)(eE.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)(O0,{container:r,arrowsWithRefs:i})]}),(0,R.jsx)(`div`,{ref:r,children:(0,R.jsx)(k0.Provider,{value:o,children:e})})]})});function j0(e){let t=(0,L.useContext)(k0);if(!t)throw Error(`useMoveMaterialArrowRef must be used within a MoveMaterialArrowContainer`);let n=(0,L.useRef)(null);return(0,L.useEffect)(()=>{let r=S0(e);return t.registerNode(r,e,n),()=>{t.registerNode(r,null,null)}},[t,...C0(e)]),n}function M0({kind:e,children:t}){return(0,R.jsx)(`div`,{ref:j0(e),children:t})}var N0=45,P0=55;function F0(){let e=Q(GO),t=Q(ZE),n=Q(EO),r=X.of(e.material).filter(e=>e.location.type===fC.OnPallet||e.action.type===mC.Loading).toRLookup(e=>e.location.palletNum??e.action.loadOntoPalletNum??0),i=X.of(e.material).filter(e=>e.location.type===fC.InBasket&&e.location.basketId!==null&&e.location.basketId!==void 0).toRLookup(e=>e.location.basketId??0),a=X.ofObject(e.pallets).filter(([e,t])=>t.currentPalletLocation.loc===lC.LoadUnload).toOrderedMap(([e,t])=>[t.currentPalletLocation.num,{lulNum:t.currentPalletLocation.num,pal:{pallet:t,mats:r.get(t.palletNum)??[]},basket:null,staging:[],sources:[]}]),o=X.ofObject(e.pallets).filter(([,e])=>e.currentPalletLocation.loc===lC.Machine||e.currentPalletLocation.loc===lC.MachineQueue).map(([e,t])=>t).groupBy(e=>e.currentPalletLocation.group,e=>e.currentPalletLocation.num).toLookupOrderedMap(([[e,t],n])=>e,([[e,t],n])=>t,([[t,n],i])=>{let a=i.find(e=>e.currentPalletLocation.loc===lC.Machine),o=a?r.get(a.palletNum)??[]:null,s=i.find(e=>e.currentPalletLocation.loc===lC.MachineQueue),c=s?r.get(s.palletNum)??[]:null,l=!0,u=c?.[0];if(u&&u.lastCompletedMachiningRouteStopIndex!==null&&u.lastCompletedMachiningRouteStopIndex!==void 0){let r=e.jobs[u.jobUnique]?.procsAndPaths?.[u.process-1]?.paths?.[u.path-1]?.stops?.[u.lastCompletedMachiningRouteStopIndex];r.stationGroup===t&&r.stationNums.includes(n)&&(l=!1)}return l?{name:t+` `+n.toString(),inbound:s?{pallet:s,mats:c??[]}:null,worktable:a?{pallet:a,mats:o??[]}:null,outbound:null}:{name:t+` `+n.toString(),inbound:null,worktable:a?{pallet:a,mats:o??[]}:null,outbound:s?{pallet:s,mats:c??[]}:null}}),s=X.ofObject(e.pallets).filter(([e,t])=>t.currentPalletLocation.loc===lC.Buffer||t.currentPalletLocation.loc===lC.Cart).collect(([e,t])=>{let n=r.get(t.palletNum);return!n||n.length===0?null:{pallet:t,mats:n}}).toOrderedMap(e=>[e.pallet.palletNum,e]),c=1,l=1,u=VC(new Date,-7),d=t.valuesToLazySeq().filter(e=>e.routeEndUTC>u).concat(X.ofObject(e.jobs).map(([e,t])=>t)).flatMap(e=>e.procsAndPaths).toRArray();for(let e of d)for(let t of(e.basketLoadStations??[]).concat(e.basketUnloadStations??[]))c=Math.max(c,t);let f=X.of(d).flatMap(e=>e.paths);for(let e of f){for(let t of e.load.concat(e.unload))c=Math.max(c,t);e.face&&(l=Math.max(l,e.face));for(let t of e.stops)o=o.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<=c;e++)a=a.alter(e,t=>t||{lulNum:e,pal:null,basket:null,staging:[],sources:[]});for(let t of Object.values(e.pallets))l=Math.max(l,t.numFaces);for(let t of e.material)t.location.face!==null&&t.location.face!==void 0&&(l=Math.max(l,t.location.face));let p=XT.empty();if(e.machineLocations&&e.machineLocations.length>0)for(let t of e.machineLocations){o=o.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 r;a=a.alter(n,e=>{r=e});let i=X.of(r?.pal?.mats??[]).toLookup(n=>{if(n.action.type===mC.Machining)return`Machining`;if(n.action.type!==mC.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:i.get(`Ready`)??[],machiningMats:i.get(`Machining`)??[],loadingMats:i.get(`Loading`)??[]};p=p.set(n,o)}}let m=new Map,h=new Map,g=new Map,_=0,v=0;for(let t of X.ofObject(e.baskets??{}).map(([e,t])=>t).sortBy(e=>e.basketId)){let e={basket:t,mats:i.get(t.basketId)??[]};switch(t.location){case xC.Storage:e.mats.length>0?v+=1:_+=1;break;case xC.LoadUnload:case xC.LoadStationStaging:{let n=t.locationNum;if(n===null){g.set(t.basketId,e);break}let r=t.location===xC.LoadUnload?h:m,i=r.get(n)??[];i.push(e),r.set(n,i);break}case xC.InTransit:g.set(t.basketId,e);break}}let y=0,b=0;return a=a.mapValues(e=>{let t=new Map,r=X.of(e.pal?.mats??e.basket?.mats??[]).filter(e=>e.location.type!==fC.OnPallet).toRArray();for(let e of r){if(e.location.type===fC.Free){let n=`free`,r=t.get(n)??{label:`To Load`,mats:[]};r.mats.push(e),t.set(n,r);continue}if(e.action.loadFromBasketId!==null&&e.action.loadFromBasketId!==void 0){let r=`basket:${e.action.loadFromBasketId}`,i=t.get(r)??{label:`From ${Dk(n.basketName)} ${e.action.loadFromBasketId}`,mats:[]};i.mats.push(e),t.set(r,i);continue}if(e.location.type===fC.InQueue&&e.location.currentQueue){let n=`queue:${e.location.currentQueue}`,r=t.get(n)??{label:`From ${e.location.currentQueue}`,mats:[]};r.mats.push(e),t.set(n,r)}}let i=X.of(h.get(e.lulNum)??[]).sortBy(e=>e.basket.locationNum).toRArray();for(let e of i.slice(1))g.set(e.basket.basketId,e);let a=new Set(X.of(e.pal?.mats??[]).collect(e=>e.action.loadFromBasketId??null).toRArray()),o=X.of(m.get(e.lulNum)??[]).filter(e=>!a.has(e.basket.basketId)).sortBy(e=>e.basket.locationNum).toRArray();y=Math.max(y,o.length);let s=X.of(t).map(([e,t])=>({key:e,label:t.label,mats:t.mats})).sortBy(e=>e.label).toRArray();return b=Math.max(b,s.length),{...e,basket:i[0]??null,staging:o,sources:s}}),{machines:o.mapValues(e=>e.valuesToAscLazySeq().toRArray()),loads:a.valuesToAscLazySeq().toRArray(),stockerPals:s.valuesToAscLazySeq().toRArray(),floatingBaskets:X.of(g.values()).toRArray(),storageBaskets:_+v>0?{empty:_,filled:v}:null,machineAtLoad:p.valuesToAscLazySeq().toRArray(),maxNumFacesOnPallet:l,maxNumStagingRows:y,maxNumSourceRows:b}}function I0({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=qE(DI),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:N0,height:N0,overflow:`visible`},children:[(0,R.jsx)(Yc,{elevation:4,onPointerEnter:l,onPointerLeave:u,sx:{position:`relative`,zIndex:t?10:0,width:`max-content`,height:`max-content`},children:(0,R.jsx)(sm,{badgeContent:e.length>1?e.length:0,color:`secondary`,children:(0,R.jsx)(Ol,{focusRipple:!0,onClick:d,ref:i,children:(0,R.jsx)(Gc,{orientation:`horizontal`,in:t,collapsedSize:N0,children:(0,R.jsxs)(G,{sx:{display:`flex`},children:[(0,R.jsx)(bU,{part:e[0].partName,size:N0}),(0,R.jsx)(G,{sx:{marginLeft:`10px`,marginRight:`10px`,whiteSpace:`nowrap`,textAlign:`left`},children:(0,R.jsx)(Gc,{in:t,collapsedSize:N0,children:(0,R.jsxs)(Zv,{direction:`column`,sx:{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)(OU,{mat:e[0]})})]})})})]})})})})}),(0,R.jsx)(M_,{anchorEl:i.current,open:a,onClose:()=>o(!1),anchorOrigin:{vertical:`top`,horizontal:`left`},children:X.of(e).map((e,t)=>(0,R.jsx)(P_,{onClick:()=>{o(!1),s({type:`MatDetails`,details:e})},children:e.serial&&e.serial!==``?e.serial:(t+1).toString()},e.materialID))})]})}function L0({maxNumFaces:e,mats:t,loadingOntoPallet:n,noFilter:r,showExpanded:i}){if(i&&e===1)return(0,R.jsx)(G,{sx:{display:`flex`,flexDirection:`column`,flexWrap:`wrap`},children:t.map(e=>(0,R.jsx)(FU,{mat:e},e.materialID))});{let i=n?X.of(t).filter(e=>r||e.location.type!==fC.OnPallet).orderedGroupBy(e=>e.action.loadOntoFace??1):X.of(t).filter(e=>r||e.location.type===fC.OnPallet).orderedGroupBy(e=>e.action.type===mC.Loading?e.action.loadOntoFace??1:e.location.face??1);return(0,R.jsx)(G,{sx:{display:`grid`,gridTemplateRows:`${N0}px`,gridTemplateColumns:`repeat(${e}, ${N0}px)`,columnGap:`5px`,height:`100%`,alignContent:`center`,justifyContent:`center`},children:i.map(([e,t])=>(0,R.jsx)(G,{sx:{gridColumn:e,gridRow:1},children:(0,R.jsx)(I0,{mats:t})},e))})}}function R0({mats:e}){let t=X.of(e).orderedGroupBy(e=>(e.location.basketSubPosition??0)+1);return(0,R.jsx)(G,{sx:{display:`flex`,flexWrap:`wrap`,justifyContent:`flex-start`,alignItems:`flex-start`,gap:`5px`,minHeight:`${N0}px`,paddingLeft:`5px`,paddingRight:`5px`,height:`100%`,alignContent:`center`},children:t.map(([e,t])=>(0,R.jsx)(G,{children:(0,R.jsx)(I0,{mats:t})},e))})}function wie({mats:e,maxNumFaces:t}){return(0,R.jsx)(G,{sx:{minHeight:`${P0}px`,display:`flex`,alignItems:`center`,justifyContent:`flex-start`,paddingLeft:`5px`,gap:`5px`,paddingRight:`5px`},children:(0,R.jsx)(L0,{mats:e,maxNumFaces:t,loadingOntoPallet:!0})})}function z0(e,t){let n=N0*e+5*(e+1);return t?`60px ${Math.max(n,100)}px`:`${Math.max(n,100)}px`}function B0(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 V0(e){let t=e?.find(e=>e.action.type===mC.Machining),n=t?.action?.elapsedMachiningTime,r=t?.action.expectedRemainingMachiningTime,i=Q(GO).timeOfCurrentStatusUTC,a=Q(KO),o=null;r&&(o=tk(r)-(a-Math.floor(i.getTime()/1e3)));let s=null;return n&&(s=tk(n)+(a-Math.floor(i.getTime()/1e3))),o!==null&&s!==null?[!0,`${B0(s)} / ${B0(o)}`,o<0?-1:s/(s+o)*100]:o===null?s===null?[!!t,`Idle`,null]:[!0,B0(s),null]:[!0,` / `+B0(o),o<0?-1:null]}function H0({machine:e}){let[t,n,r]=V0(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)(kg,{}):r<0?(0,R.jsx)(kg,{color:`error`}):(0,R.jsx)(kg,{variant:`determinate`,value:r}):void 0]})}function U0({maxNumFaces:e,machine:t}){return(0,R.jsxs)(G,{sx:{display:`grid`,border:`1px solid black`,margin:`5px`,gridTemplateRows:`auto ${P0}px ${P0}px ${P0}px`,gridTemplateColumns:z0(e,!0),gridTemplateAreas:`"machname machname" "inboundpal inboundmat" "worktablepal worktablemat" "outboundpal outboundmat"`},children:[(0,R.jsx)(G,{sx:{gridArea:`machname`,padding:`0.2em`,borderBottom:`1px solid black`},children:(0,R.jsx)(H0,{machine:t})}),(0,R.jsx)(G,{sx:{gridArea:`inboundpal`,borderRight:`1px solid black`,borderBottom:`1px solid black`,padding:`2px`},children:(0,R.jsxs)(Zv,{children:[(0,R.jsx)(W,{variant:`body1`,sx:{textAlign:`center`},children:`In`}),t.inbound?(0,R.jsx)(W,{variant:`h6`,sx:{textAlign:`center`},children:t.inbound.pallet.palletNum}):void 0]})}),(0,R.jsx)(G,{sx:{gridArea:`inboundmat`,borderBottom:`1px solid black`},children:t.inbound?(0,R.jsx)(L0,{mats:t.inbound.mats,maxNumFaces:e}):void 0}),(0,R.jsx)(G,{sx:{gridArea:`worktablepal`,borderRight:`1px solid black`,borderBottom:`1px solid black`,padding:`2px`},children:(0,R.jsxs)(Zv,{children:[(0,R.jsx)(W,{variant:`body1`,sx:{textAlign:`center`},children:`Work`}),t.worktable?(0,R.jsx)(W,{variant:`h6`,sx:{textAlign:`center`},children:t.worktable.pallet.palletNum}):void 0]})}),(0,R.jsx)(G,{sx:{gridArea:`worktablemat`,borderBottom:`1px solid black`},children:t.worktable?(0,R.jsx)(L0,{mats:t.worktable.mats,maxNumFaces:e}):void 0}),(0,R.jsx)(G,{sx:{gridArea:`outboundpal`,borderRight:`1px solid black`,padding:`2px`},children:(0,R.jsxs)(Zv,{children:[(0,R.jsx)(W,{variant:`body1`,sx:{textAlign:`center`},children:`Out`}),t.outbound?(0,R.jsx)(W,{variant:`h6`,sx:{textAlign:`center`},children:t.outbound.pallet.palletNum}):void 0]})}),(0,R.jsx)(G,{sx:{gridArea:`outboundmat`},children:t.outbound?(0,R.jsx)(L0,{mats:t.outbound.mats,maxNumFaces:e}):void 0})]})}function W0(e){let t=(e?.find(e=>e.action.type===mC.Loading||e.action.type===mC.UnloadToCompletedMaterial||e.action.type===mC.UnloadToInProcess))?.action?.elapsedLoadUnloadTime,n=Q(GO).timeOfCurrentStatusUTC,r=Q(KO),i=null;return t&&(i=tk(t)+(r-Math.floor(n.getTime()/1e3))),i===null?`Idle`:B0(i)}function G0({load:e}){let t=W0(e.pal?.mats??e.basket?.mats),n=Q(EO);return(0,R.jsxs)(G,{sx:{display:`flex`,justifyContent:`space-between`,alignItems:`baseline`},children:[(0,R.jsx)(W,{variant:`h5`,children:Tk(e.lulNum,n.loadStationNames)}),(0,R.jsx)(W,{variant:`body1`,children:t})]})}function K0({maxNumFaces:e,maxNumStagingRows:t,maxNumSourceRows:n,load:r}){let i=Dk(Q(EO).basketName),a=r.pal?`Pallet`:r.basket?i:null,o=r.pal?r.pal.pallet.palletNum.toString():r.basket?r.basket.basket.basketId.toString():null,s=Math.max(1,n),c=Math.max(1,t),l=Array.from({length:s},(e,t)=>`"source${t} sourcemat${t}"`),u=Array.from({length:c},(e,t)=>`"stage${t} stagemat${t}"`),d=[`"lulname lulname"`,...l,`"current currentmat"`,...u].join(` `);return(0,R.jsxs)(G,{sx:{display:`grid`,border:`1px solid black`,margin:`5px`,gridTemplateRows:`auto repeat(${s+1+c}, ${P0}px)`,gridTemplateColumns:z0(e,!0),gridTemplateAreas:d},children:[(0,R.jsx)(G,{sx:{gridArea:`lulname`,padding:`0.2em`,borderBottom:`1px solid black`},children:(0,R.jsx)(G0,{load:r})}),Array.from({length:s},(t,n)=>{let i=r.sources[n]??null;return(0,R.jsxs)(L.Fragment,{children:[(0,R.jsx)(G,{sx:{gridArea:`source${n}`,borderRight:`1px solid black`,borderBottom:`1px solid black`,padding:`2px`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:i?(0,R.jsx)(W,{variant:`body2`,sx:{textAlign:`center`},children:i.label}):void 0}),(0,R.jsx)(G,{sx:{gridArea:`sourcemat${n}`,borderBottom:`1px solid black`,display:`flex`,flexDirection:`column`,justifyContent:`center`},children:i?(0,R.jsx)(wie,{mats:i.mats,maxNumFaces:e}):void 0})]},`source-${n}`)}),(0,R.jsx)(G,{sx:{gridArea:`current`,borderRight:`1px solid black`,borderBottom:`1px solid black`,padding:`2px`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,R.jsxs)(Zv,{children:[a?(0,R.jsx)(W,{variant:`body1`,sx:{textAlign:`center`},children:a}):void 0,o?(0,R.jsx)(W,{variant:`h6`,sx:{textAlign:`center`},children:o}):void 0]})}),(0,R.jsxs)(G,{sx:{gridArea:`currentmat`,display:`flex`,flexDirection:`column`,justifyContent:`center`,borderBottom:`1px solid black`},children:[r.pal?(0,R.jsx)(L0,{mats:r.pal.mats,maxNumFaces:e}):void 0,!r.pal&&r.basket?(0,R.jsx)(R0,{mats:r.basket.mats}):void 0]}),Array.from({length:c},(e,t)=>{let n=r.staging[t]??null,a=t===c-1;return(0,R.jsxs)(L.Fragment,{children:[(0,R.jsx)(G,{sx:{gridArea:`stage${t}`,borderRight:`1px solid black`,...a?{}:{borderBottom:`1px solid black`},padding:`2px`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:n?(0,R.jsxs)(W,{variant:`body2`,sx:{textAlign:`center`},children:[`Staging `,i,` `,n.basket.basketId]}):void 0}),(0,R.jsx)(G,{sx:{gridArea:`stagemat${t}`,...a?{}:{borderBottom:`1px solid black`},display:`flex`,flexDirection:`column`,justifyContent:`center`},children:n?(0,R.jsx)(R0,{mats:n.mats}):void 0})]},`stage-${t}`)})]})}function q0({status:e}){let t=W0(e.loadingMats),[n,r,i]=V0(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)(kg,{}):i<0?(0,R.jsx)(kg,{color:`error`}):(0,R.jsx)(kg,{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 J0({maxNumFaces:e,status:t}){return(0,R.jsxs)(G,{sx:{display:`grid`,border:`1px solid black`,margin:`5px`,gridTemplateRows:`minmax(104px, max-content) repeat(3, ${e>1?P0.toString()+`px`:`minmax(110px, max-content)`})`,gridTemplateColumns:e===1?`60px minmax(230px, max-content)`:z0(e,!0),gridTemplateAreas:`"name name" "ready readymat" "machining machiningmat" "loadstation loadstationmat"`},children:[(0,R.jsx)(G,{sx:{gridArea:`name`,padding:`0.2em`,borderBottom:`1px solid black`},children:(0,R.jsx)(q0,{status:t})}),(0,R.jsx)(G,{sx:{gridArea:`ready`,borderRight:`1px solid black`,borderBottom:`1px solid black`,padding:`2px`},children:(0,R.jsx)(W,{variant:`body1`,sx:{textAlign:`center`},children:`Ready`})}),(0,R.jsx)(G,{sx:{gridArea:`readymat`,borderBottom:`1px solid black`,display:`flex`,flexDirection:`column`,justifyContent:`center`},children:(0,R.jsx)(L0,{mats:t.readyMats,maxNumFaces:e,showExpanded:!0})}),(0,R.jsx)(G,{sx:{gridArea:`machining`,borderRight:`1px solid black`,borderBottom:`1px solid black`,padding:`2px`},children:(0,R.jsx)(W,{variant:`body1`,sx:{textAlign:`center`},children:`Work`})}),(0,R.jsx)(G,{sx:{gridArea:`machiningmat`,borderBottom:`1px solid black`,display:`flex`,flexDirection:`column`,justifyContent:`center`},children:(0,R.jsx)(L0,{mats:t.machiningMats,maxNumFaces:e,showExpanded:!0})}),(0,R.jsx)(G,{sx:{gridArea:`loadstation`,borderRight:`1px solid black`,padding:`2px`},children:(0,R.jsxs)(Zv,{children:[(0,R.jsx)(W,{variant:`body1`,sx:{textAlign:`center`},children:`Load`}),(0,R.jsx)(W,{variant:`body1`,sx:{textAlign:`center`},children:`Station`})]})}),(0,R.jsx)(G,{sx:{gridArea:`loadstationmat`,display:`flex`,flexDirection:`column`,justifyContent:`center`},children:(0,R.jsx)(L0,{mats:t.loadingMats,maxNumFaces:e,showExpanded:!0,noFilter:!0})})]})}function Y0({maxNumFaces:e,pallet:t}){return(0,R.jsxs)(G,{sx:{display:`grid`,border:`1px solid black`,margin:`5px`,gridTemplateRows:`auto ${P0}px`,gridTemplateColumns:z0(e,!1),gridTemplateAreas:`"palname" "palmat"`},children:[(0,R.jsxs)(W,{variant:`h5`,sx:{gridArea:`palname`,padding:`0.2em`,borderBottom:`1px solid black`},children:[`Pallet `,t.pallet.palletNum]}),(0,R.jsx)(G,{sx:{gridArea:`palmat`},children:(0,R.jsx)(L0,{mats:t.mats,maxNumFaces:e})})]})}function X0({basket:e}){let t=Dk(Q(EO).basketName);return(0,R.jsxs)(G,{sx:{display:`grid`,border:`1px solid black`,margin:`5px`,gridTemplateRows:`auto ${P0}px`,gridTemplateColumns:`minmax(120px, max-content)`,gridTemplateAreas:`"basketname" "basketmat"`},children:[(0,R.jsxs)(W,{variant:`h5`,sx:{gridArea:`basketname`,padding:`0.2em`,borderBottom:`1px solid black`},children:[t,` `,e.basket.basketId]}),(0,R.jsx)(G,{sx:{gridArea:`basketmat`},children:(0,R.jsx)(R0,{mats:e.mats})})]})}function Z0({empty:e,filled:t}){return(0,R.jsxs)(G,{sx:{display:`grid`,border:`1px solid black`,margin:`5px`,padding:`0.5em 1em`,alignContent:`center`,minWidth:`170px`},children:[(0,R.jsxs)(W,{variant:`h5`,children:[Dk(Q(EO).basketName),` Storage`]}),(0,R.jsxs)(W,{variant:`body1`,children:[`Empty: `,e]}),(0,R.jsxs)(W,{variant:`body1`,children:[`Filled: `,t]})]})}var Q0=(0,L.memo)(function({overview:e}){return(0,R.jsxs)(`div`,{children:[e.machines.toAscLazySeq().map(([t,n])=>(0,R.jsx)(G,{sx:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`},children:n.map(t=>(0,R.jsx)(U0,{machine:t,maxNumFaces:e.maxNumFacesOnPallet},t.name))},t)),e.loads.length>0?(0,R.jsx)(G,{sx:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`},children:e.loads.map(t=>(0,R.jsx)(K0,{load:t,maxNumFaces:e.maxNumFacesOnPallet,maxNumStagingRows:e.maxNumStagingRows,maxNumSourceRows:e.maxNumSourceRows},t.lulNum))}):void 0,e.machineAtLoad.length>0?(0,R.jsx)(G,{sx:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`},children:e.machineAtLoad.map(t=>(0,R.jsx)(J0,{status:t,maxNumFaces:e.maxNumFacesOnPallet},t.lulNum))}):void 0,e.stockerPals.length>0||e.floatingBaskets.length>0||e.storageBaskets?(0,R.jsxs)(G,{sx:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`},children:[e.stockerPals.map(t=>(0,R.jsx)(Y0,{pallet:t,maxNumFaces:e.maxNumFacesOnPallet},t.pallet.palletNum)),e.floatingBaskets.map(e=>(0,R.jsx)(X0,{basket:e},e.basket.basketId)),e.storageBaskets?(0,R.jsx)(Z0,{empty:e.storageBaskets.empty,filled:e.storageBaskets.filled}):void 0]}):void 0]})}),$0=(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)(JU,{onClose:a,allowNote:!0,highlightProcsGreaterOrEqualTo:r?.process??void 0,extraDialogElements:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(jY,{st:t,setState:n}),r===null?null:(0,R.jsx)(DY,{st:r,setState:i})]}),buttons:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(TY,{ignoreOperator:e}),(0,R.jsx)(y0,{}),(0,R.jsx)(MY,{st:t,setState:n,onClose:a,ignoreOperator:e}),(0,R.jsx)(OY,{st:r,setState:i,onClose:a,ignoreOperator:e})]})})});function e2({ignoreOperator:e,whiteBackground:t}){ZI(`System Overview`);let n=F0();return(0,R.jsxs)(`main`,{style:{padding:`10px`,minHeight:`calc(100vh - 64px)`,backgroundColor:t?`white`:`#F8F8F8`},children:[(0,R.jsx)(Q0,{overview:n}),(0,R.jsx)($0,{ignoreOperator:e}),(0,R.jsx)(b0,{})]})}var t2=30;function n2({machine:e}){let t=ms(),[,,n]=V0(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 r2({load:e}){let t=ms();return(0,R.jsx)(`polygon`,{points:`3,27 27,27 15,3`,fill:e.pal===null&&e.basket===null&&e.staging.length===0?`white`:t.palette.secondary.main,stroke:`black`})}function i2({status:e}){let t=ms(),[,,n]=V0(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 a2=(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)*t2} ${t2}`,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*t2})`,children:(0,R.jsx)(n2,{machine:e})},e.name))}),(0,R.jsx)(`g`,{transform:`translate(${t*t2})`,children:e.loads.map((e,t)=>(0,R.jsx)(`g`,{transform:`translate(${t*t2})`,children:(0,R.jsx)(r2,{load:e})},e.lulNum))}),(0,R.jsx)(`g`,{transform:`translate(${(t+e.loads.length)*t2})`,children:e.machineAtLoad.map((e,t)=>(0,R.jsx)(`g`,{transform:`translate(${t*t2})`,children:(0,R.jsx)(i2,{status:e})},e.lulNum))})]})})}),o2=(0,L.memo)(function({full:e}){let[t,n]=(0,L.useState)(!1),r=F0();return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(K,{onClick:()=>n(!0),children:(0,R.jsx)(a2,{overview:r})}),(0,R.jsxs)($m,{open:t,onClose:()=>n(!1),maxWidth:`xl`,fullScreen:e,children:[e?(0,R.jsx)(mu,{sx:{position:`relative`},children:(0,R.jsxs)(Sb,{children:[(0,R.jsx)(ru,{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)(rh,{children:(0,R.jsx)(G,{sx:{paddingBottom:`2em`,paddingLeft:`5em`,paddingRight:`5em`},children:(0,R.jsx)(Q0,{overview:r})})})]})]})});function s2(e){return encodeURIComponent(e.toString())}function c2(e){switch(e.kind){case`queue`:return`load-station-queue-${s2(e.label)}`;case`baskets`:return`load-station-baskets`;case`free`:return`load-station-material`}}function l2(e,t,n){return e.action.type===mC.Loading&&(t!==void 0&&e.action.loadOntoPalletNum===t.palletNum||n!==void 0&&e.action.loadFromBasketId===n.basketId)}function u2(e,t,n,r){let i,a,o=new Set;if(e>=0){for(let t of Object.values(n.pallets))if(t.currentPalletLocation.loc===lC.LoadUnload&&t.currentPalletLocation.num===e){i=t;break}for(let t of Object.values(n.baskets??{}))t.locationNum===e&&(t.location===xC.LoadUnload?a=t:t.location===xC.LoadStationStaging&&o.add(t.basketId))}let s=new Set(t);if(i!==void 0)for(let e of n.material)e.action.type===mC.Loading&&e.action.loadOntoPalletNum===i.palletNum&&e.location.type===fC.InQueue&&e.location.currentQueue&&s.add(e.location.currentQueue),e.action.type===mC.Loading&&e.action.loadOntoPalletNum===i.palletNum&&e.action.loadFromBasketId&&o.add(e.action.loadFromBasketId),(e.action.type===mC.UnloadToInProcess||e.action.type===mC.UnloadToCompletedMaterial)&&e.action.unloadToBasketId&&e.location.type===fC.OnPallet&&e.location.palletNum===i.palletNum&&o.add(e.action.unloadToBasketId),(e.action.type===mC.UnloadToInProcess||e.action.type===mC.UnloadToCompletedMaterial)&&e.action.unloadIntoQueue&&e.location.type===fC.OnPallet&&e.location.palletNum===i.palletNum&&s.add(e.action.unloadIntoQueue);else if(a!==void 0)for(let e of n.material)e.location.type===fC.InBasket&&e.location.basketId===a.basketId&&(e.action.type===mC.UnloadToInProcess||e.action.type===mC.UnloadToCompletedMaterial)&&e.action.unloadIntoQueue&&s.add(e.action.unloadIntoQueue),e.location.type===fC.InQueue&&e.location.currentQueue&&e.action.type===mC.Loading&&e.action.loadFromBasketId===a.basketId&&s.add(e.location.currentQueue);let c=new Map(X.of(s).map(e=>[e,{mats:[],hiddenCnt:0}])),l=new Map(X.of(o).map(e=>[e,{mats:[],hiddenCnt:0}])),u=[],d=XT.empty(),f=null;if(i)for(let e=1;e<=i.numFaces;e++)d=d.set(e,[]);else a&&(d=d.set(1,[]));for(let e of n.material){if(i?(e.action.type===mC.Loading&&e.action.loadOntoPalletNum===i.palletNum&&(e.action.elapsedLoadUnloadTime&&(f=e.action.elapsedLoadUnloadTime),e.action.loadOntoFace&&!d.has(e.action.loadOntoFace)&&(d=d.set(e.action.loadOntoFace,[])),e.location.type===fC.Free&&u.push(e)),e.location.type===fC.OnPallet&&e.location.palletNum===i.palletNum&&((e.action.type===mC.UnloadToCompletedMaterial||e.action.type===mC.UnloadToInProcess)&&e.action.elapsedLoadUnloadTime&&(f=e.action.elapsedLoadUnloadTime),d=d.alter(e.location.face??1,t=>t?(t.push(e),t):[e]))):a&&(l2(e,i,a)&&e.action.elapsedLoadUnloadTime&&(f=e.action.elapsedLoadUnloadTime),e.location.type===fC.InBasket&&e.location.basketId===a.basketId&&((e.action.type===mC.UnloadToCompletedMaterial||e.action.type===mC.UnloadToInProcess)&&e.action.elapsedLoadUnloadTime&&(f=e.action.elapsedLoadUnloadTime),d=d.alter(1,t=>t?(t.push(e),t):[e]))),e.location.type===fC.InQueue&&e.location.currentQueue&&c.has(e.location.currentQueue)){let t=c.get(e.location.currentQueue);r&&!l2(e,i,a)?t===void 0?c.set(e.location.currentQueue,{mats:[],hiddenCnt:1}):t.hiddenCnt+=1:t===void 0?c.set(e.location.currentQueue,{mats:[e],hiddenCnt:0}):t.mats.push(e)}if(e.location.type===fC.InBasket&&e.location.basketId&&l.has(e.location.basketId)){let t=l.get(e.location.basketId);r&&!l2(e,i,a)?t===void 0?l.set(e.location.basketId,{mats:[],hiddenCnt:1}):t.hiddenCnt+=1:t===void 0?l.set(e.location.basketId,{mats:[e],hiddenCnt:0}):t.mats.push(e)}}c.forEach(e=>e.mats.sort(Aw(e=>e.location.queuePosition??0))),l.forEach(e=>e.mats.sort(Aw(e=>e.location.basketSubPosition??0)));let p=u.length+d.valuesToAscLazySeq().sumBy(e=>e.length);return{pallet:i,activeBasket:a,face:d,freeLoadingMaterial:u,queues:c,baskets:l,elapsedLoadingTime:f,fsize:p<=2?`x-large`:p<=6?`large`:`normal`}}function d2({loadData:e}){let t=XI(),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===mC.Loading&&e.action.loadOntoPalletNum===t.palletNum&&e.location.type===fC.OnPallet&&e.location.palletNum===t.palletNum?FC(e.partName,`unload`,e.materialID,t.palletNum,e.process,n):e.action.type===mC.Loading&&e.action.loadOntoPalletNum===t.palletNum?FC(e.partName,`load`,e.materialID,t.palletNum,e.action.processAfterLoad??e.process,n):e.location.type===fC.OnPallet&&e.location.palletNum===t.palletNum&&(e.action.type===mC.UnloadToCompletedMaterial||e.action.type===mC.UnloadToInProcess)?FC(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)(_h,{onClick:i,color:`secondary`,children:(0,R.jsx)(Yx,{})})})})}function f2({elapsedLoadTime:e}){let t=Q(GO).timeOfCurrentStatusUTC,n=Q(KO);return e?(0,R.jsx)(`span`,{children:B0(tk(e)+(n-Math.floor(t.getTime()/1e3)))}):null}function p2({data:e,faceNum:t}){let n=e.face.get(t),r=Dk(Q(EO).basketName);return n?e.activeBasket&&!e.pallet?(0,R.jsxs)(`div`,{"data-testid":`load-station-active-basket`,children:[t===1?(0,R.jsxs)(G,{sx:{display:`grid`,gridTemplateColumns:`1fr auto`},children:[(0,R.jsxs)(W,{variant:`h4`,children:[r,` `,e.activeBasket.basketId]}),(0,R.jsx)(G,{sx:{justifySelf:`flex-end`},children:(0,R.jsx)(f2,{elapsedLoadTime:e.elapsedLoadingTime})})]}):null,(0,R.jsx)(G,{sx:{ml:`4em`,mr:`4em`},children:(0,R.jsx)(M0,{kind:{type:x0.BasketZone,basketId:e.activeBasket.basketId},children:(0,R.jsx)(G,{sx:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-around`},children:n.map((t,n)=>(0,R.jsx)(M0,{kind:{type:x0.Material,material:t},children:(0,R.jsx)(FU,{mat:t,fsize:e.fsize})},n))})})})]}):e.pallet?(0,R.jsxs)(`div`,{"data-testid":`load-station-pallet-face-${t}`,children:[t===1?(0,R.jsxs)(G,{sx:{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`,sx:{justifySelf:`center`},children:e.pallet.faceNames?.[t-1]??`Face 1`}):void 0,(0,R.jsx)(G,{sx:{justifySelf:`flex-end`},children:(0,R.jsx)(f2,{elapsedLoadTime:e.elapsedLoadingTime})})]}):e.pallet.numFaces>1?(0,R.jsx)(G,{sx:{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,{sx:{ml:`4em`,mr:`4em`},children:(0,R.jsx)(M0,{kind:{type:x0.PalletFaceZone,face:t},children:(0,R.jsx)(G,{sx:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-around`},children:n.map((t,n)=>(0,R.jsx)(M0,{kind:{type:x0.Material,material:t},children:(0,R.jsx)(FU,{mat:t,fsize:e.fsize})},n))})})})]}):null:null}function m2({data:e,mat:t}){return(0,R.jsxs)(`div`,{children:[t.label===``?null:(0,R.jsx)(W,{variant:`h4`,children:t.label}),t.material.mats.map((n,r)=>(0,R.jsx)(M0,{kind:{type:x0.Material,material:n},children:t.isFree||t.sortable===!1?(0,R.jsx)(FU,{mat:n,displayActionForSinglePallet:e.pallet?e.pallet.palletNum:0,fsize:e.fsize,showRawMaterial:!0,showJobComment:!0}):(0,R.jsx)(IU,{mat:n,displayActionForSinglePallet:e.pallet?e.pallet.palletNum:0,shake:n.action.type===mC.Loading&&n.action.loadOntoPalletNum===e.pallet?.palletNum,fsize:n.action.type===mC.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`,sx:{textAlign:`center`,mt:`0.5em`},children:[`+`,t.material.hiddenCnt,` hidden`]}):null]})}function h2({data:e,label:t,baskets:n}){return(0,R.jsxs)(`div`,{children:[(0,R.jsx)(W,{variant:`h4`,children:t}),n.map((t,n)=>(0,R.jsxs)(G,{"data-testid":`load-station-basket-${s2(t.basketId)}`,sx:{mt:n===0?`0.5em`:`1.5em`,pt:n===0?void 0:`1em`},children:[(0,R.jsx)(W,{variant:`h6`,sx:{mb:`0.5em`},children:t.label}),(0,R.jsx)(M0,{kind:{type:x0.BasketZone,basketId:t.basketId},children:(0,R.jsx)(m2,{data:e,mat:{label:``,material:t.material,isFree:!1,sortable:!1}})})]},t.basketId))]})}function g2({data:e,region:t}){switch(t.kind){case`free`:return(0,R.jsx)(M0,{kind:{type:x0.FreeMaterialZone},children:(0,R.jsx)(m2,{data:e,mat:{label:t.label,material:t.material,isFree:!0,sortable:!1}})});case`queue`:return(0,R.jsx)(M0,{kind:{type:x0.QueueZone,queue:t.label},children:(0,R.jsx)(Iq,{matIds:t.material.mats.map(e=>e.materialID),direction:`vertical`,queueName:t.label,renderDragOverlay:t=>(0,R.jsx)(LU,{mat:t,displayActionForSinglePallet:e.pallet?e.pallet.palletNum:0,fsize:t.action.type===mC.Loading&&t.action.loadOntoPalletNum===e.pallet?.palletNum?e.fsize:void 0}),children:(0,R.jsx)(m2,{data:e,mat:{label:t.label,material:t.material,isFree:!1,sortable:!0}})})});case`baskets`:return(0,R.jsx)(h2,{data:e,label:t.label,baskets:t.baskets})}}function _2(){let e=Q(mL);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)(PU,{mat:e},t))})}var v2=(0,L.memo)(function({fillViewPort:e,showMaterial:t}){let n=j0({type:t?x0.CompletedExpandedMaterialZone:x0.CompletedCollapsedMaterialZone});return t&&e?(0,R.jsxs)(G,{ref:n,sx:{padding:`8px`,display:`flex`,flexDirection:`column`,height:`100%`},children:[(0,R.jsx)(W,{variant:`h4`,children:`Completed`}),(0,R.jsx)(G,{sx:{position:`relative`,flexGrow:1},children:(0,R.jsx)(G,{sx:{position:`absolute`,top:`0`,left:`0`,right:`0`,bottom:`0`,overflow:`auto`},children:(0,R.jsx)(_2,{})})})]}):t?(0,R.jsxs)(G,{ref:n,sx:{padding:`8px`},children:[(0,R.jsx)(W,{variant:`h4`,children:`Completed`}),(0,R.jsx)(_2,{})]}):(0,R.jsx)(G,{ref:n,sx:{display:`flex`,justifyContent:e?`flex-end`:void 0,padding:`8px`},children:(0,R.jsx)(W,{variant:`h4`,sx:{margin:`4px`,...e?{textOrientation:`mixed`,writingMode:`vertical-rl`}:{}},children:`Completed`})})});function y2({pallet:e}){let t=Q(MI),n=Q(UO),r=XI();if(t===null)return null;let i;if(t.action.type===mC.Loading&&t.action.loadOntoPalletNum===e?i=`load`:(t.action.type===mC.UnloadToInProcess||t.action.type===mC.UnloadToCompletedMaterial)&&t.location.type===fC.OnPallet&&t.location.palletNum===e&&(i=`unload`),i===void 0)return null;let a=FC(t.partName,i,t.materialID,e,t.action.type===mC.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 b2({queues:e,onClose:t,toQueue:n,showAddToQueue:r,setShowAddToQueue:i}){let a=qE(DI),o=Q(LI),s=Q(AI),c=Q(MI),l=Q(UO),[u,d]=UI();return!s||c?.location.type===fC.OnPallet||c?.action.type===mC.Loading||e.length===0||c?.location.type===fC.InQueue&&c?.location.currentQueue&&e.includes(c?.location.currentQueue)?null:r?(0,R.jsxs)(K,{color:`primary`,disabled:n===null||d,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 x2(){let e=Q(EO),t=qE(u0),n=Q(AI);return!e.allowChangeWorkorderAtLoadStation||n===null||n.materialID<0?null:(0,R.jsx)(K,{color:`primary`,onClick:()=>t(!0),children:`Assign Workorder`})}var S2=(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)(JU,{onClose:l,allowNote:!0,highlightProcsGreaterOrEqualTo:r?.process??void 0,extraDialogElements:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(jY,{st:t,setState:n}),r===null?null:(0,R.jsx)(DY,{st:r,setState:i}),a?(0,R.jsx)(bY,{selectedQueue:s,setSelectedQueue:c,queueNames:e.queues}):void 0]}),buttons:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(y2,{pallet:e.pallet}),(0,R.jsx)(iY,{}),(0,R.jsx)(TY,{}),(0,R.jsx)(y0,{}),(0,R.jsx)(b2,{toQueue:s,queues:e.queues,onClose:l,showAddToQueue:a,setShowAddToQueue:o}),(0,R.jsx)(MY,{st:t,setState:n,onClose:l}),(0,R.jsx)(OY,{st:r,setState:i,onClose:l,loadStation:!0}),(0,R.jsx)(x2,{})]})})});function C2({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 w2(e){let t=Dk(Q(EO).basketName),n=t.endsWith(`s`)?t:`${t}s`,r=Q(GO),i=Q(_q),a=(0,L.useMemo)(()=>u2(e.loadNum,e.queues,r,i),[r,e.loadNum,e.queues,i]),o=[...X.of(a.queues).sortBy(([e,t])=>e).map(([e,t])=>({kind:`queue`,label:e,material:t})).toRArray()];if(a.baskets.size>0){let e=X.of(a.baskets).filter(([e,t])=>e!==a.activeBasket?.basketId).sortBy(([e,t])=>e).map(([e,n])=>({basketId:e,label:`${t} ${e}`,material:n})).toRArray();e.length>0&&o.push({kind:`baskets`,label:n,baskets:e})}(a.queues.size===0&&a.baskets.size===0||a.freeLoadingMaterial.length>0)&&o.push({kind:`free`,label:`Material`,material:{mats:a.freeLoadingMaterial,hiddenCnt:0}});let s=o.length+ +!!e.completed,c=gx(s<=1?`(min-width: 720px)`:s===2?`(min-width: 1030px)`:`(min-width: 1320px)`),l=C2({numMatCols:o.length,maxNumFaces:a.face.size,horizontal:c,showMatInCompleted:e.completed});return(0,R.jsx)(A0,{hideArrows:!c,whiteBackground:e.whiteBackground,children:(0,R.jsxs)(G,{component:`main`,sx:{width:`100%`,display:`grid`,gridTemplate:l,minHeight:{xs:`calc(100vh - 64px - 32px)`,sm:`calc(100vh - 64px - 40px)`,md:`calc(100vh - 64px)`},padding:c?void 0:`8px`},children:[o.map((e,t)=>(0,R.jsx)(G,{"data-testid":c2(e),sx:{gridArea:`mat${t}`,padding:`8px`,borderRight:c?`1px solid black`:void 0,borderBottom:c?void 0:`1px solid black`},children:(0,R.jsx)(g2,{data:a,region:e})},t)),a.face.keysToAscLazySeq().map((e,t)=>(0,R.jsx)(G,{sx:{marginLeft:`15px`,gridArea:`palface${t}`,padding:`8px`,borderTop:a.pallet&&t!==0?`1px solid black`:void 0},children:(0,R.jsx)(p2,{data:a,faceNum:e})},e)),(0,R.jsx)(G,{"data-testid":`load-station-completed`,sx:{borderLeft:c?`1px solid black`:void 0,borderTop:c?void 0:`1px solid black`,gridArea:`completed`},children:(0,R.jsx)(v2,{fillViewPort:c,showMaterial:e.completed})}),(0,R.jsx)(d2,{loadData:a}),(0,R.jsx)(h0,{}),(0,R.jsx)(b0,{}),(0,R.jsx)(S2,{pallet:a.pallet?.palletNum??null,queues:e.queues})]})})}function T2(e){let t=Q(EO);return ZI(Tk(e.loadNum,t.loadStationNames)),(0,R.jsx)(w2,{...e})}function E2(e){let t=XI(),n=Q(UO),r=Q(AI),i=Q(LI)?.process,[a,o]=Are(),s=qE(DI);if(r===null)return null;function c(t){r&&(a({mat:r,inspType:e.inspection_type,success:t,operator:n}),s(null))}let l=FC(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)(TY,{}),(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 D2({focusInspectionType:e}){let t=Q(RI);return t===null||e||t.signaledInspections.length===1?null:(0,R.jsx)(R.Fragment,{children:t.signaledInspections.map(e=>(0,R.jsx)(eh,{children:(0,R.jsx)(E2,{inspection_type:e})},e))})}function O2({focusInspectionType:e}){let t=Q(RI),n;if(e)n=e;else if(t&&t.signaledInspections.length===1)n=t.signaledInspections[0];else return null;return(0,R.jsx)(E2,{inspection_type:n})}var k2=(0,L.memo)(function(e){return(0,R.jsx)(JU,{allowNote:!0,extraDialogElements:(0,R.jsx)(D2,{focusInspectionType:e.focusInspectionType}),buttons:(0,R.jsx)(O2,{focusInspectionType:e.focusInspectionType})})});function A2({focusInspectionType:e,forceSingleColumn:t}){let n=Q(mL),r=(0,L.useMemo)(()=>M2(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,{sx:{padding:`8px`,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,{sx:{display:`flex`,justifyContent:`flex-start`,flexWrap:`wrap`},children:r.waiting_to_inspect.map((t,n)=>(0,R.jsx)(PU,{mat:t,focusInspectionType:e,hideWarningIcon:!0},n))})]}),(0,R.jsxs)(G,{sx:{padding:`8px`,width:t?`100%`:{md:`50vw`}},children:[(0,R.jsx)(W,{variant:`h4`,children:`Recently Inspected`}),(0,R.jsx)(G,{sx:{display:`flex`,justifyContent:`flex-start`,flexWrap:`wrap`},children:r.inspect_completed.map((t,n)=>(0,R.jsx)(PU,{mat:t,focusInspectionType:e,hideWarningIcon:!0},n))})]})]}),(0,R.jsx)(k2,{focusInspectionType:e})]})}function j2(e){let t=e.completedInspections;return t===void 0?e.signaledInspections.length===0:X.of(e.signaledInspections).every(e=>e in t)}function M2(e,t){let n=VC(new Date,-7),r=VC(new Date,-1),i=Array.from(t===null?e.valuesToLazySeq().filter(e=>e.last_unload_time!==void 0&&e.last_unload_time>=n&&e.signaledInspections.length>0&&!j2(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));i.sort((e,t)=>e.last_unload_time&&t.last_unload_time?t.last_unload_time.getTime()-e.last_unload_time.getTime():0);let a=Array.from(t===null?e.valuesToLazySeq().filter(e=>e.completed_inspect_time!==void 0&&e.completed_inspect_time>=r&&e.signaledInspections.length>0&&j2(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 a.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:i,inspect_completed:a}}function N2(e){return ZI(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)(A2,{...e})})}function P2(){let e=Q(EO),t=Q(AI),[n,r]=BI(),i=Q(UO),[a,o]=JE(DI);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 F2(){let e=XI(),t=Q(AI),n=Q(UO),r=Q(LI)?.process;if(t===null||t.partName===``)return null;let i=FC(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 I2(){let e=qE(u0);return Q(AI)===null?null:(0,R.jsx)(K,{color:`primary`,onClick:()=>e(!0),children:`Assign Workorder`})}var L2=(0,L.memo)(function(){return(0,R.jsx)(JU,{allowNote:!0,buttons:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(F2,{}),(0,R.jsx)(TY,{}),(0,R.jsx)(I2,{}),(0,R.jsx)(P2,{})]})})}),R2=Z(new Date);R2.onMount=e=>{e(new Date);let t=setInterval(()=>{e(new Date)},1e3*60);return()=>clearInterval(t)};function z2({forceSingleColumn:e}){let t=Q(mL),n=Q(R2),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,{sx:{padding:`8px`,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,{sx:{display:`flex`,justifyContent:`flex-start`,flexWrap:`wrap`},children:r.uncompleted.map((e,t)=>(0,R.jsx)(PU,{mat:e},t))})]}),(0,R.jsxs)(G,{sx:{padding:`8px`,width:e?`100%`:{md:`50vw`}},children:[(0,R.jsx)(W,{variant:`h4`,children:`Recently Closed Out`}),(0,R.jsx)(G,{sx:{display:`flex`,justifyContent:`flex-start`,flexWrap:`wrap`},children:r.closed.map((e,t)=>(0,R.jsx)(PU,{mat:e},t))})]})]}),(0,R.jsx)(h0,{}),(0,R.jsx)(L2,{})]})}function B2(){return ZI(`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)(z2,{})})}function V2(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 H2=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 hT(this.statGroup,this.operation)}toString(){return`{statGroup: ${this.statGroup}, operation: ${this.operation}}`}};function U2(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 W2(e,t,n){let r=eE.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=eE.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===mC.UnloadToCompletedMaterial||e.action.type===mC.UnloadToInProcess||e.lastCompletedMachiningRouteStopIndex!==void 0&&e.lastCompletedMachiningRouteStopIndex>n)).length();o.program!==void 0&&o.program!==``&&(s=s.modify(new H2(o.stationGroup,o.program),e=>(e??0)+c))}}for(let[e,t]of s)r=r.modify(new rk(n.partName,e.statGroup,e.operation),e=>(e??0)+i-o-t)}}let i=X.of(V2(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!==``?nk(t.currentUse):null,a=t.totalLifeTime!==null&&t.totalLifeTime!==void 0&&t.totalLifeTime!==``?nk(t.totalLifeTime):null,o=wk(t.machineGroupName,t.machineNum),s=t.currentUseCount??null,c=t.totalLifeCount??null;if(s===null&&c===null){let t=U2(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 G2=Z(null),K2=Z(e=>e(G2)?.time??null,async(e,t,n)=>{t(G2,{tools:await MC.getToolsInMachines(),time:n})}),q2=Z(e=>{let t=e(G2);return t===null?[]:X.of(t.tools).toOrderedSet(e=>wk(e.machineGroupName,e.machineNum)).toAscLazySeq().toRArray()}),J2=Z(e=>{let t=e(G2);if(t===null)return null;let n=e(GO),r=e(kL);return W2(n,t.tools,r)}),Y2=Z(e=>{let t=e(J2);return t?X.of(t).flatMap(e=>e.machines).some(e=>e.serial!=null&&e.serial!==``):!1}),X2=Z(e=>{let t=e(J2);return t?X.of(t).some(e=>e.estimatedToolCounts):!1});function Z2(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 Q2(){let e=BE();return(0,L.useCallback)(()=>{let t=e.get(J2);t&&oA(Z2(t))},[e])}function $2(e,t,n,r,i){let a=V2(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=nk(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 e4=Z(`AllPrograms`),t4=Z(null),n4=Z(e=>e(t4)?.time??null,async(e,t,n)=>{t(t4,{progs:await MC.getProgramsInCellController(),time:n})}),r4=Z(e=>{if(e(n4)===null)return null;let t=e(e4),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(t4);return r===null?null:$2(e(kL),e(ak),e(ZE),r.progs,n)}),i4=Z(null),a4=Z(async e=>{let t=e(i4);return t===null?``:t.revision===null?await MC.getLatestProgramRevisionContent(t.programName):await MC.getProgramRevisionContent(t.programName,t.revision)}),o4=Z(null),s4=new Intl.NumberFormat(`en-US`,{minimumFractionDigits:0,maximumFractionDigits:1}),c4=V(Ab,{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})),l4=V(Ab,{shouldForwardProp:e=>e.toString()[0]!==`$`})(({$borderBottom:e})=>({...e&&{"&:not(:last-child)":{borderBottom:`2px solid black`}}})),u4=V(`span`)({fontSize:`x-large`,fontWeight:`lighter`});function d4({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:[s4.format(t),` cnt`]})}):s4.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)(u4,{children:`|`}),` `,o]})}function f4({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)(Yy,{size:`small`,sx:{width:`auto`,ml:`10em`,mb:`1em`},children:[(0,R.jsx)(vb,{children:(0,R.jsxs)(Ab,{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)(nb,{children:n.isEmpty()?(0,R.jsx)(Ab,{children:(0,R.jsx)(J,{colSpan:5,children:`No programs use this machine`})}):n.map((e,n)=>(0,R.jsxs)(Ab,{children:[(0,R.jsx)(J,{children:(0,R.jsxs)(G,{sx:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(bU,{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?s4.format(e.scheduledUseCnt):``})]},n))})]})}function p4({machines:e}){let t=Q(Y2),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)(Yy,{size:`small`,sx:{width:`auto`,ml:`10em`,mb:`1em`},children:[(0,R.jsx)(vb,{children:(0,R.jsxs)(Ab,{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)(nb,{children:[n.toAscLazySeq().map(([e,i])=>(0,R.jsxs)(L.Fragment,{children:[i.valuesToAscLazySeq().map((e,n)=>(0,R.jsxs)(l4,{$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)(d4,{min:e.currentUseMinutes,cnt:e.currentUseCnt})}),(0,R.jsx)(J,{align:`right`,children:(0,R.jsx)(d4,{min:e.lifetimeMinutes,cnt:e.lifetimeCnt})}),(0,R.jsx)(J,{align:`right`,children:(0,R.jsx)(d4,{min:e.remainingMinutes,cnt:e.remainingCnt,showZero:!0})})]},n)),n.size>1&&i.size>1?(0,R.jsxs)(l4,{$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)(d4,{min:i.valuesToAscLazySeq().sumBy(e=>e.remainingMinutes??0),cnt:i.valuesToAscLazySeq().sumBy(e=>e.remainingCnt??0)})})]}):void 0]},e)),(0,R.jsxs)(Ab,{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)(d4,{min:X.of(e).sumBy(e=>e.remainingMinutes??0),cnt:X.of(e).sumBy(e=>e.remainingCnt??0)})})]})]})]})}function m4(){let e=Q(X2);return(0,R.jsxs)(c4,{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 h4({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)(c4,{$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)(ru,{size:`small`,onClick:()=>n(!t),children:t?(0,R.jsx)(aS,{}):(0,R.jsx)(nS,{})})}),(0,R.jsx)(J,{children:e.toolName}),(0,R.jsx)(J,{align:`right`,children:(0,R.jsx)(d4,{min:i,cnt:a})}),(0,R.jsx)(J,{align:`right`,children:(0,R.jsx)(d4,{min:o,cnt:s})}),(0,R.jsx)(J,{align:`right`,children:(0,R.jsx)(d4,{min:c?.remainMin,cnt:l?.remainCnt,showZero:!0,extraMin:c?.mach,extraCnt:l?.mach})}),(0,R.jsx)(J,{})]}),(0,R.jsx)(Ab,{children:(0,R.jsx)(J,{sx:{pb:`0`,pt:`0`},colSpan:6,children:(0,R.jsx)(Gc,{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)(p4,{machines:e.machines})}),e.parts.length===0?void 0:(0,R.jsx)(`div`,{children:(0,R.jsx)(f4,{tool:e})})]})})})})]})}function g4({machine:e}){let t=Q(X2),n=Q(Y2);return(0,R.jsxs)(c4,{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 _4({report:e,pocket:t}){let[n,r]=(0,L.useState)(!1),i=Q(Y2),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)(c4,{$noBorderBottom:!0,children:[(0,R.jsx)(J,{children:(0,R.jsx)(ru,{size:`small`,onClick:()=>r(!n),children:n?(0,R.jsx)(aS,{}):(0,R.jsx)(nS,{})})}),(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)(d4,{min:o,cnt:s})}),(0,R.jsx)(J,{align:`right`,children:(0,R.jsx)(d4,{min:t.currentUseMinutes,cnt:t.currentUseCnt})}),(0,R.jsx)(J,{align:`right`,children:(0,R.jsx)(d4,{min:t.lifetimeMinutes,cnt:t.lifetimeCnt})}),(0,R.jsx)(J,{align:`right`,children:(0,R.jsx)(d4,{min:t.remainingMinutes,cnt:t.remainingCnt})}),(0,R.jsx)(J,{})]}),(0,R.jsx)(Ab,{children:(0,R.jsx)(J,{sx:{pb:`0`,pt:`0`},colSpan:a,children:(0,R.jsx)(Gc,{in:n,timeout:`auto`,unmountOnExit:!0,children:(0,R.jsx)(f4,{tool:e,machine:t.machineName})})})})]})}var v4=`__Insight__FilterAnyMachine__`,y4=Z(null);function b4(){let e=Q(y4),t=Q(J2);return t===null?(0,R.jsx)(`div`,{}):(0,R.jsxs)(Yy,{stickyHeader:!0,children:[(0,R.jsx)(vb,{children:e===null?(0,R.jsx)(m4,{}):(0,R.jsx)(g4,{machine:e})}),(0,R.jsx)(nb,{children:t.map(t=>e===null?(0,R.jsx)(h4,{tool:t},t.toolName):(0,R.jsx)(L.Fragment,{children:t.machines.filter(t=>t.machineName===e).map(e=>(0,R.jsx)(_4,{report:t,pocket:e},e.pocket))},t.toolName))})]})}function x4(){let[e,t]=JE(y4),[n,r]=JE(K2),[i,a]=(0,L.useState)(!1),o=Q(q2),s=Q2(),c=XI();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)(_h,{color:`secondary`,size:`large`,variant:`extended`,style:{margin:`2em`},onClick:l,disabled:i,children:(0,R.jsxs)(R.Fragment,{children:[i?(0,R.jsx)(Zl,{size:10,style:{marginRight:`1em`}}):(0,R.jsx)(mS,{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)(ru,{onClick:l,disabled:i,size:`small`,children:i?(0,R.jsx)(Zl,{size:10}):(0,R.jsx)(mS,{fontSize:`inherit`})})})}),(0,R.jsxs)(`span`,{style:{marginLeft:`1em`},children:[`Tools from `,(0,R.jsx)(Ez,{date:n})]}),(0,R.jsx)(`div`,{style:{flexGrow:`1`}}),(0,R.jsx)(Th,{size:`small`,children:(0,R.jsxs)(ov,{autoWidth:!0,displayEmpty:!0,value:e??v4,style:{marginLeft:`1em`},onChange:e=>{e.target.value===v4?t(null):t(e.target.value)},children:[(0,R.jsx)(P_,{value:v4,children:(0,R.jsx)(`em`,{children:`All Machines`})}),o.map(e=>(0,R.jsx)(P_,{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)(ru,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:s,size:`large`,children:(0,R.jsx)($x,{})})})]})}function S4(){return ZI(`Tool Report`),(0,R.jsxs)(G,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,R.jsx)(x4,{}),(0,R.jsx)(`main`,{children:(0,R.jsx)(yU,{children:(0,R.jsx)(b4,{})})})]})}var C4=V(Ab)(()=>({"& > *":{borderBottom:`unset`}}));function w4(e){if(e.length===0)return``;let t=e.lastIndexOf(`\\`);return t>=0&&t<e.length-2?e.substr(t+1):e}var T4=new Intl.NumberFormat(`en-US`,{maximumFractionDigits:2});function E4(e){let[t,n]=(0,L.useState)(!1),r=qE(i4),i=qE(o4),a=8+ +!!e.showCellCtrlCol+ +!!e.showRevCol,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)(C4,{children:[(0,R.jsx)(J,{children:e.program.toolUse===null||e.program.toolUse.tools.length===0?void 0:(0,R.jsx)(ru,{size:`small`,onClick:()=>n(!t),children:t?(0,R.jsx)(aS,{}):(0,R.jsx)(nS,{})})}),(0,R.jsx)(J,{children:w4(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)(bU,{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?``:T4.format(e.program.plannedMins)}),(0,R.jsxs)(J,{children:[(0,R.jsx)(q,{title:`Load Program Content`,children:(0,R.jsx)(ru,{size:`small`,onClick:()=>r(e.program),children:(0,R.jsx)(Fx,{})})}),e.program.revision===null?void 0:(0,R.jsx)(q,{title:`Revision History`,children:(0,R.jsx)(ru,{size:`small`,onClick:()=>i(e.program),children:(0,R.jsx)(Zx,{})})})]})]}),(0,R.jsx)(Ab,{children:(0,R.jsx)(J,{sx:{pb:`0`,pt:`0`},colSpan:a,children:(0,R.jsx)(Gc,{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)(Yy,{size:`small`,sx:{width:`auto`,ml:`10em`,mr:`1em`},children:[(0,R.jsx)(vb,{children:(0,R.jsxs)(Ab,{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)(nb,{children:X.of(e.program.toolUse.tools).map((e,t)=>(0,R.jsxs)(Ab,{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 D4(){let e=Q(r4),[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=w4(e.programName).localeCompare(w4(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)(Yy,{stickyHeader:!0,children:[(0,R.jsx)(vb,{children:(0,R.jsxs)(Ab,{children:[(0,R.jsx)(J,{}),(0,R.jsx)(J,{sortDirection:t===`ProgramName`?r:!1,children:(0,R.jsx)(Lb,{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)(Lb,{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)(Lb,{active:t===`PartName`,direction:r,onClick:()=>o(`PartName`),children:`Part`})}),(0,R.jsx)(J,{sortDirection:t===`Comment`?r:!1,children:(0,R.jsx)(Lb,{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)(Lb,{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)(Lb,{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)(Lb,{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)(Lb,{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)(Lb,{active:t===`Planned`,direction:r,onClick:()=>o(`Planned`),children:`Planned Time (min)`})}),(0,R.jsx)(J,{})]})}),(0,R.jsx)(nb,{children:X.of(a).map((t,n)=>(0,R.jsx)(E4,{program:t,showCellCtrlCol:e.cellNameDifferentFromProgName,showRevCol:e.hasRevisions},n))})]})}function O4(){let e=Q(a4),[t,n]=(0,L.useState)(null),r=(0,L.useMemo)(()=>new Worker(new URL(`/assets/ProgramHighlight-DPTeZ8Si.js`,``+import.meta.url),{type:`module`}),[]);return(0,L.useEffect)(()=>{let e=e=>n(e),t=t=>e(t.data);return r.addEventListener(`message`,t),()=>{e=()=>null,r.removeEventListener(`message`,t),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 k4(){let[e,t]=JE(i4),n=Q(o4);return(0,R.jsxs)($m,{open:e!==null&&n===null,onClose:()=>t(null),maxWidth:`lg`,children:[(0,R.jsx)(oh,{children:e?.partName?(0,R.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,alignItems:`center`},children:[(0,R.jsx)(bU,{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)(rh,{children:e===null||n!==null?(0,R.jsx)(`div`,{}):(0,R.jsx)(yU,{children:(0,R.jsx)(O4,{})})}),(0,R.jsx)(eh,{children:(0,R.jsx)(K,{onClick:()=>t(null),children:`Close`})})]})}var A4=10;function j4(e){let t=Q(o4),n=qE(i4);return(0,R.jsxs)(Yy,{children:[(0,R.jsx)(vb,{children:(0,R.jsxs)(Ab,{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)(nb,{children:e.loading?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Ab,{children:(0,R.jsx)(J,{colSpan:4,children:(0,R.jsx)(Zl,{})})}),X.ofRange(0,A4-1).map(e=>(0,R.jsx)(Ab,{children:(0,R.jsx)(J,{colSpan:4})},e))]}):X.of(e.revisions).drop(e.page*A4).take(A4).map(e=>(0,R.jsxs)(Ab,{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)(ru,{size:`small`,onClick:()=>n({...e,partName:t?.partName??null}),children:(0,R.jsx)(Fx,{})})})})]},e.revision))})]})}function M4(){let[e,t]=JE(o4),[n,r]=JE(i4),[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),MC.getProgramRevisionsInDescendingOrderOfRevision(e.programName,A4,void 0).then(e=>{a(e),s({page:0,hasMore:e.length===A4})}).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];MC.getProgramRevisionsInDescendingOrderOfRevision(e.programName,A4,t?t.revision-1:void 0).then(e=>{a(t=>t===null?e:t.concat(e)),s({page:c+1,hasMore:e.length===A4}),l(c+1)}).catch(p).finally(()=>d(!1))}}return(0,R.jsxs)($m,{open:e!==null,onClose:()=>t(null),maxWidth:`lg`,children:[(0,R.jsx)(oh,{children:e?.partName?(0,R.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,alignItems:`center`},children:[(0,R.jsx)(bU,{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)(rh,{children:[f===null?void 0:(0,R.jsx)(mm,{children:(0,R.jsx)(vm,{children:typeof f==`string`?f:f.message})}),n===null?i===null?u?(0,R.jsx)(Zl,{}):void 0:(0,R.jsx)(j4,{page:c,revisions:i,loading:u}):(0,R.jsx)(yU,{children:(0,R.jsx)(O4,{})})]}),(0,R.jsx)(eh,{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)(ru,{onClick:()=>l(0),disabled:u||c===0,size:`large`,children:(0,R.jsx)(Jx,{})})})}),(0,R.jsx)(q,{title:`Previous Page`,children:(0,R.jsx)(`span`,{children:(0,R.jsx)(ru,{onClick:()=>l(c-1),disabled:u||c===0,size:`large`,children:(0,R.jsx)(rS,{})})})}),(0,R.jsx)(q,{title:`Next Page`,children:(0,R.jsx)(`span`,{children:(0,R.jsx)(ru,{onClick:()=>m(),disabled:u||c===o.page&&!o.hasMore,size:`large`,children:(0,R.jsx)(iS,{})})})})]}):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 N4(){let[e,t]=JE(n4),[n,r]=(0,L.useState)(!1),i=XI(),[a,o]=JE(e4);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)(_h,{color:`secondary`,size:`large`,variant:`extended`,style:{margin:`2em`},onClick:s,disabled:n,children:(0,R.jsxs)(R.Fragment,{children:[n?(0,R.jsx)(Zl,{size:10,style:{marginRight:`1em`}}):(0,R.jsx)(mS,{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)(ru,{onClick:s,disabled:n,size:`small`,children:n?(0,R.jsx)(Zl,{size:10}):(0,R.jsx)(mS,{fontSize:`inherit`})})})}),(0,R.jsxs)(`span`,{style:{marginLeft:`1em`},children:[`Programs from `,(0,R.jsx)(Ez,{date:e})]}),(0,R.jsx)(`div`,{style:{flexGrow:1}}),(0,R.jsx)(Th,{size:`small`,children:(0,R.jsxs)(ov,{autoWidth:!0,value:a,onChange:e=>o(e.target.value),children:[(0,R.jsx)(P_,{value:`AllPrograms`,children:`All Programs`},`AllPrograms`),(0,R.jsx)(P_,{value:`ActivePrograms`,children:`Active Programs`},`ActivePrograms`)]})})]})}function P4(){return ZI(`Programs`),(0,R.jsxs)(G,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,R.jsx)(N4,{}),(0,R.jsx)(`main`,{children:(0,R.jsx)(yU,{children:(0,R.jsx)(D4,{})})}),(0,R.jsx)(k4,{}),(0,R.jsx)(M4,{})]})}var F4=Z(!1),I4=F4,L4=Z(null),R4=L4;function z4(e){let t=new Date,n=VC(t,-30),r=AC.currentStatus().then(t=>e(bR,t)),i=AC.recent(n,[]).then(t=>e(vR,t)),a=jC.get(n,t).then(t=>e(yR,t));Promise.all([r,i,a]).catch(t=>e(L4,t.message??`Error`)).finally(()=>e(F4,!1))}function B4(e,t,n){let r=new Date,i=AC.currentStatus().then(e=>n(bR,e)),a=AC.recent(VC(r,-30),t?Array.from(t):[]).then(e=>n(vR,e)),o=jC.recent(e,void 0).then(e=>n(yR,e));Promise.all([i,a,o]).catch(e=>n(L4,e.message??`Error`)).finally(()=>n(F4,!1))}var V4=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.addEventListener(`open`,()=>{clearTimeout(t),this.reconnectAttempts=0,this.handleOpen?.()}),e.addEventListener(`close`,()=>{if(clearTimeout(t),this.ws=void 0,this.userCalledClose)return;this.handleReconnecting?.();let e=Math.min(1e3*1.5**this.reconnectAttempts,3e4);setTimeout(()=>{this.reconnectAttempts++,this.connect()},e)}),e.addEventListener(`message`,e=>{this.handleMessage?.(e)})}},H4=Z(null,(e,t)=>{let n=e(gR),r=e($E);t(F4,!0),t(L4,null),n==null?z4(t):B4(n,r,t)}),U4=Z(null,(e,t,n)=>{t(_R,{evt:IS.fromJS(JSON.parse(n.data)),now:new Date,expire:!0})});function W4(){let e=qE(H4),t=qE(F4),n=(0,L.useCallback)(()=>t(!0),[t]),r=qE(U4),i=Q(EO),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 V4(s);return c.handleOpen=e,c.handleReconnecting=n,c.handleMessage=r,a.current=c,()=>{a.current&&=(a.current.close(),null)}},[i,r,e,n]),null}var G4=[{id:0,label:`Date`,numeric:!1,getDisplay:e=>e.routeStartTime.toLocaleString(),getForSort:e=>e.routeStartTime.getTime(),getForExport:e=>e.routeStartTime.toISOString()},{id:1,label:`Part`,numeric:!1,getDisplay:e=>e.partName},{id:2,label:`Scheduled`,numeric:!0,getDisplay:e=>e.scheduledQty.toString(),getForSort:e=>e.scheduledQty},{id:3,label:`Removed`,numeric:!0,getDisplay:e=>e.decrementedQty.toString(),getForSort:e=>e.decrementedQty},{id:4,label:`Completed`,numeric:!0,getDisplay:e=>e.completedQty.toString()}];function K4({job:e}){let[t,n]=(0,L.useState)(!1);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(YY,{children:[G4.map(t=>(0,R.jsx)(J,{align:t.numeric?`right`:`left`,children:t.id===1?(0,R.jsxs)(G,{sx:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(G,{sx:{mr:`0.2em`},children:(0,R.jsx)(bU,{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)(ru,{size:`small`,onClick:()=>n(!t),children:t?(0,R.jsx)(aS,{}):(0,R.jsx)(nS,{})})})})]}),(0,R.jsx)(XY,{children:(0,R.jsx)(J,{sx:{pb:`0`,pt:`0`},colSpan:G4.length+1,children:(0,R.jsx)(Gc,{in:t,timeout:`auto`,unmountOnExit:!0,children:(0,R.jsx)(Nq,{job:e.inProcJob?e.inProcJob:e.historicJob,checkAnalysisMonth:!0})})})})]})}function q4(){let e=Q(ER),t=O1(),n=D1(e),r=k1(0,G4),i=Q(e.type===`Last30`?mL:gL),a=Q(e.type===`Last30`?ZE:tD),o=(0,L.useMemo)(()=>mq(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)(Yy,{stickyHeader:!0,children:[(0,R.jsx)(b1,{columns:G4,sort:r,showDetailsCol:!0,copyToClipboardRows:o}),(0,R.jsx)(nb,{children:s.map((e,t)=>(0,R.jsx)(K4,{job:e},e.historicJob?.unique??e.inProcJob?.unique??t))})]}),(0,R.jsx)(T1,{tpage:t,zoom:n.zoom,count:o.length})]})}function J4(){return ZI(`Scheduled Jobs`),(0,R.jsx)(R.Fragment,{children:(0,R.jsx)(`main`,{style:{padding:`24px`},children:(0,R.jsx)(q4,{})})})}function Y4(){ZI(`Quality`);let e=Q(ER);return(0,R.jsx)(q1,{subtitle:`Inspection decisions grouped by path`,inspectionlogs:Q(e.type===`Last30`?uL:Qre),zoomType:e.type===`Last30`?`Last30Days`:`ZoomIntoRange`,default_date_range:e.type===`Last30`?[VC(ow(),-29),VC(ow(),1)]:[e.month,HC(e.month,1)]})}var X4={display:`flex`,backgroundColor:`#E0E0E0`,paddingLeft:`24px`,paddingRight:`24px`,paddingBottom:`4px`,height:`2.5em`,alignItems:`flex-end`},Z4={display:`flex`,alignSelf:`center`,alignItems:`flex-end`},Q4=`@@all_inspection_display@@`,$4=`@@recent_completed_material@@`;function e3(e){return typeof e==`string`?e.split(`,`):e}function t3(){let[e,t]=JE(_q);return(0,R.jsx)(jh,{control:(0,R.jsx)(Pm,{size:`small`,checked:e,onChange:e=>t(e.target.checked)}),label:`Hide Non-Loading Material`,sx:{pl:2,pr:2}})}function n3(){let[e,t]=JE(YI),n=Q(wL),r=X.of(Object.keys(Q(GO).queues)).toSortedArray(e=>e),i=Q(EO),a=gx(ms().breakpoints.down(`md`));function o(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 s(e){t(e===Q4?{route:$.Station_InspectionMonitor}:{route:$.Station_InspectionMonitorWithType,inspType:e})}function c(n){let r=n.includes($4);n=n.filter(e=>e!==$4).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 l(e){t({route:$.Station_Queues,queues:e})}let u=`LoadUnload`,d=1,f=null,p=[];switch(e.route){case $.Station_LoadMonitor:u=`LoadUnload`,d=e.loadNum,p=e.queues,e.completed&&(p=p.concat($4));break;case $.Station_InspectionMonitor:u=`Inspection`,f=``;break;case $.Station_InspectionMonitorWithType:u=`Inspection`,f=e.inspType;break;case $.Station_Queues:u=`Queues`,p=e.queues;break;case $.Station_Closeout:u=`CloseOut`;break;default:u=`AllMaterial`;break}return(0,R.jsxs)(G,{component:`nav`,sx:a?X4:Z4,children:[u===`LoadUnload`?i.loadStationNames&&Object.keys(i.loadStationNames).length>0?(0,R.jsx)(ov,{value:d,onChange:e=>o(e.target.value.toString()),variant:`standard`,style:{marginLeft:`1em`,minWidth:`8em`},children:X.of(Object.entries(i.loadStationNames)).sortBy(([e])=>parseInt(e)).map(([e,t])=>(0,R.jsx)(P_,{value:parseInt(e),children:t},e))},`loadnumselect`):(0,R.jsx)(ig,{type:`number`,placeholder:`Load Station Number`,value:d,onChange:e=>o(e.target.value),style:{width:`3em`,marginLeft:`1em`}},`loadnumselect`):void 0,u===`Inspection`?(0,R.jsxs)(ov,{value:f||Q4,onChange:e=>s(e.target.value),variant:`standard`,style:{marginLeft:`1em`},children:[(0,R.jsx)(P_,{value:Q4,children:(0,R.jsx)(`em`,{children:`All`})},Q4),X.of(n).sortBy(e=>e).map(e=>(0,R.jsx)(P_,{value:e,children:e},e))]},`inspselect`):void 0,u===`LoadUnload`?(0,R.jsxs)(Th,{style:{marginLeft:`1em`},children:[p.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)(ov,{multiple:!0,displayEmpty:!0,variant:`standard`,value:p,inputProps:{id:`queueselect`},style:{minWidth:`10em`,marginTop:`0`},onChange:e=>c(e3(e.target.value)),children:[r.map((e,t)=>(0,R.jsx)(P_,{value:e,children:e},t)),(0,R.jsx)(P_,{value:$4,children:(0,R.jsx)(`i`,{children:`Completed`})}),(0,R.jsx)(fh,{}),(0,R.jsx)(t3,{})]})]}):void 0,u===`Queues`?(0,R.jsxs)(Th,{style:{marginLeft:`1em`,minWidth:`10em`},children:[p.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)(ov,{multiple:!0,displayEmpty:!0,variant:`standard`,value:p,inputProps:{id:`queueselect`},style:{marginTop:`0`},onChange:e=>l(e3(e.target.value)),children:r.map((e,t)=>(0,R.jsx)(P_,{value:e,children:e},t))})]}):void 0]})}function r3(){let e=gx(ms().breakpoints.down(`md`));return(0,R.jsx)(G,{sx:{display:`flex`,alignItems:`center`,height:`100%`,bgcolor:e?`#E0E0E0`:void 0},children:(0,R.jsx)(o2,{full:e})})}var i3=PO(`shift-starts`,[[1,360],[2,840],[3,1320]]),a3=Z(e=>new Map(e(i3)),(e,t,n)=>{let r=new Map(e(i3));n(r),t(i3,Array.from(r.entries()))});function o3(e){let t=Q(a3);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=YC(VC(e,1),n[0]),i=[];for(let t=0;t<n.length;t++)i.push({start:YC(e,n[t]),end:t===n.length-1?r:YC(e,n[t+1])});return i},[t,e])}function s3(e){let[t,n]=e.split(`:`);return parseInt(t,10)*60+parseInt(n,10)}function c3(e){let t=Math.floor(e/60),n=e%60;return`${t.toString().padStart(2,`0`)}:${n.toString().padStart(2,`0`)}`}function l3(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 u3({shiftNum:e}){let[t,n]=JE(a3),r=t.get(e);return(0,R.jsx)(sx,{type:`time`,label:`Shift ${e} Start`,error:l3(e,t),value:r===void 0?``:c3(r),onChange:t=>{let r=t.target.value;n(r===``?t=>t.delete(e):t=>t.set(e,s3(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)(Ol,{sx:{mb:`4px`},onClick:()=>n(t=>t.delete(e)),children:(0,R.jsx)(Nx,{fontSize:`small`})})})}}})}function d3(){return(0,R.jsxs)(Zv,{direction:`row`,spacing:2,children:[(0,R.jsx)(u3,{shiftNum:1}),(0,R.jsx)(u3,{shiftNum:2}),(0,R.jsx)(u3,{shiftNum:3})]})}function f3(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 p3(e,t){return X.of(e).filter(e=>e.finalProcess).collect(f3(e=>e.completeTime,t)).toLookupOrderedMap(e=>e.val.partName,e=>e.shift,e=>e.val.quantity,(e,t)=>e+t)}function m3(e,t){return e.valuesToLazySeq().filter(e=>vk(e)&&e.operation===`UNLOAD`&&X.of(e.material).some(e=>e.proc===e.numproc)).collect(f3(e=>e.endTime,t)).toLookupOrderedMap(e=>e.val.part,e=>e.shift,e=>X.of(e.val.material).sumBy(e=>+(e.proc===e.numproc)),(e,t)=>e+t)}function h3(e){let t=Q(Mk),n=Q(tL),r=o3(e);return(0,L.useMemo)(()=>{let e=p3(n,r),i=m3(t,r);return e.mapValues(e=>({planned:e})).adjust(i,(e,t)=>e?{...e,completed:t}:{completed:t}).toAscLazySeq().map(([e,{planned:t,completed:n}])=>({part:e,planned:t??XT.empty(),completed:n??XT.empty()})).toRArray()},[t,n,r])}var g3=new Intl.DateTimeFormat(void 0,{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`});function _3({row:e}){return(0,R.jsxs)(Zv,{direction:`row`,spacing:1,sx:{alignItems:`center`},children:[(0,R.jsx)(bU,{part:e.part,size:25}),(0,R.jsx)(`span`,{children:e.part})]})}function v3(e){let t=o3(e).length;return(0,L.useMemo)(()=>{let e=[{id:0,numeric:!1,label:`Part`,getDisplay:e=>e.part,getForTotal:()=>0,Cell:_3},{id:1,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:4,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:2,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:5,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:3,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:6,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 y3({columns:e,rows:t}){return(0,R.jsx)(Ab,{children:e.map(e=>(0,R.jsx)(J,{align:e.numeric?`right`:`left`,children:e.id===0?`Total`:X.of(t).sumBy(e.getForTotal)},e.id))})}var b3=(0,L.memo)(function({columns:e,rows:t}){let n=k1(0,e);return(0,R.jsx)(G,{sx:{overflowX:`auto`},children:(0,R.jsxs)(Yy,{stickyHeader:!0,children:[(0,R.jsx)(b1,{columns:e,sort:n,showDetailsCol:!1}),(0,R.jsx)(E1,{columns:e,pageData:X.of(t).toSortedArray(n.sortOn,e=>e.part)}),(0,R.jsx)(fb,{children:(0,R.jsx)(y3,{columns:e,rows:t})})]})})});function x3({day:e,setDay:t}){let n=ow();return(0,R.jsxs)(Zv,{direction:`row`,spacing:2,sx:{alignItems:`center`},children:[(0,R.jsx)(q,{title:`Previous Day`,children:(0,R.jsx)(`div`,{children:(0,R.jsx)(ru,{disabled:e<=VC(n,-28),onClick:()=>t(e=>VC(e,-1)),children:(0,R.jsx)(xS,{})})})}),(0,R.jsx)(W,{sx:{minWidth:`14em`,textAlign:`center`},children:g3.format(e)}),(0,R.jsx)(q,{title:`Next Day`,children:(0,R.jsx)(`div`,{children:(0,R.jsx)(ru,{disabled:e>=n,onClick:()=>t(e=>VC(e,1)),children:(0,R.jsx)(bS,{})})})})]})}var S3=`"shifts day export" auto / 1fr 1fr 1fr`,C3=`"shifts export" auto
331
+ "day day" auto / 1fr auto`,w3=function({day:e,setDay:t,columns:n,rows:r}){return(0,R.jsxs)(G,{component:`nav`,sx:{display:`grid`,gridTemplate:{md:S3,xs:C3},minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,R.jsx)(G,{sx:{gridArea:`shifts`,justifySelf:`flex-start`},children:(0,R.jsx)(d3,{})}),(0,R.jsx)(G,{sx:{gridArea:`day`,justifySelf:`center`},children:(0,R.jsx)(x3,{day:e,setDay:t})}),(0,R.jsx)(G,{sx:{gridArea:`export`,justifySelf:`flex-end`},children:(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(ru,{onClick:()=>j1(n,r),children:(0,R.jsx)($x,{})})})})]})};function T3(){ZI(`Recent Completed Parts`);let[e,t]=(0,L.useState)(ow),n=v3(e),r=h3(e);return(0,R.jsxs)(G,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,R.jsx)(w3,{day:e,setDay:t,rows:r,columns:n}),(0,R.jsx)(`main`,{children:(0,R.jsx)(b3,{rows:r,columns:n})})]})}function E3(){let[e,t]=(0,L.useState)(!1);function n(){t(!0),kC.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 D3(){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 O3=`__FMS_INSIGHT_NEW_OPERATOR__`,k3=(0,L.memo)(function(){let e=Q(EO),[t,n]=JE(UO),[r,i]=JE(HO),[a,o]=(0,L.useState)(!1),[s,c]=(0,L.useState)(``);function l(e){e.target.value===O3?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)(ov,{value:t||``,onChange:l,variant:`standard`,renderValue:e=>e,children:[X.of(r).sortBy(e=>e).map((e,t)=>(0,R.jsxs)(P_,{value:e,children:[(0,R.jsx)(i_,{primary:e}),(0,R.jsx)(Qg,{children:(0,R.jsx)(ru,{edge:`end`,onClick:()=>u(e),size:`large`,children:(0,R.jsx)(Ix,{})})})]},t)),(0,R.jsx)(P_,{value:O3,children:(0,R.jsx)(`em`,{children:`Create New Operator`})},`new`)]}),(0,R.jsxs)($m,{open:a,onClose:()=>{o(!1),c(``)},children:[(0,R.jsx)(oh,{children:`Create New Operator`}),(0,R.jsx)(rh,{children:(0,R.jsx)(sx,{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)(eh,{children:[(0,R.jsxs)(K,{disabled:s===``,onClick:d,children:[`Create `,s]}),(0,R.jsx)(K,{onClick:()=>{c(``),o(!1)},children:`Cancel`})]})]})]})}),A3=(0,L.memo)(function(){let e=Q(I4),t=Q(kR),n=Q(R4),r=Q(jR),[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)(ru,{onClick:()=>a(!0),size:`large`,children:(0,R.jsx)(Hx,{})})}):void 0,e||t?(0,R.jsx)(q,{title:`Loading`,children:(0,R.jsx)(Zl,{"data-testid":`loading-icon`,color:`secondary`})}):void 0,(0,R.jsxs)($m,{open:i,onClose:()=>a(!1),children:[(0,R.jsx)(oh,{children:`Error`}),(0,R.jsxs)(rh,{children:[n===null?void 0:(0,R.jsx)(`p`,{children:n}),r===null?void 0:(0,R.jsx)(`p`,{children:r})]}),(0,R.jsx)(eh,{children:(0,R.jsx)(K,{onClick:()=>a(!1),children:`Close`})})]})]})}),j3=(0,L.memo)(function(){let e=Q(EO)?.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)(ru,{onClick:()=>n(!0),size:`large`,children:(0,R.jsx)(vS,{})})}),(0,R.jsxs)($m,{open:t,onClose:()=>n(!1),fullWidth:!0,maxWidth:`md`,children:[(0,R.jsx)(oh,{children:i}),(0,R.jsx)(rh,{children:(0,R.jsx)(`iframe`,{width:`100%`,src:e,sandbox:`allow-scripts`,style:{border:0,height:`calc(100vh - 250px)`}})}),(0,R.jsx)(eh,{children:(0,R.jsx)(K,{color:`primary`,onClick:()=>n(!1),children:`Close`})})]})]})});function M3({d:e}){let t=$C(e,ow());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 N3(){let e=Q(EO),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)(D3,{})})}),(0,R.jsx)(W,{variant:`h6`,style:{marginLeft:`1em`,marginRight:`2em`},children:`Insight`}),e?.licenseExpires?(0,R.jsx)(M3,{d:e.licenseExpires}):void 0]})}function P3(){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)(sm,{badgeContent:t?e.length:0,children:(0,R.jsx)(uS,{color:t?`error`:void 0})})})}function F3(){return(0,R.jsx)(q,{title:`Help`,children:(0,R.jsx)(ru,{"aria-label":`Help`,href:Rre(Q(YI)),target:`_help`,size:`large`,children:(0,R.jsx)(Xx,{})})})}function I3(){return(0,R.jsx)(q,{title:`Logout`,children:(0,R.jsx)(ru,{"aria-label":`Logout`,onClick:OO,size:`large`,children:(0,R.jsx)(Wx,{})})})}function L3({showAlarms:e,showLogout:t,showSearch:n}){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(A3,{}),(0,R.jsx)(j3,{}),n?(0,R.jsx)(dq,{}):void 0,n?(0,R.jsx)(dY,{}):void 0,(0,R.jsx)(F3,{}),t?(0,R.jsx)(I3,{}):void 0,e?(0,R.jsx)(P3,{}):void 0]})}function R3({menuNavs:e}){let t=Q(EO),[n,r]=JE(YI),[i,a]=(0,L.useTransition)();return(0,R.jsx)(Th,{size:`small`,children:(0,R.jsx)(ov,{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,{sx:{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)(zf,{children:e.separator},e.separator):e.hidden?.(t)?void 0:(0,R.jsxs)(P_,{value:e.route.route,children:[(0,R.jsx)(n_,{children:e.icon}),(0,R.jsx)(i_,{primary:typeof e.name==`string`?e.name:e.name(t)})]},n))})})}function z3({showAlarms:e,showLogout:t,showSearch:n,showOperator:r,Nav1:i,Nav2:a,menuNavs:o}){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(mu,{position:`static`,sx:{display:{xs:`none`,md:`block`}},children:(0,R.jsx)(Sb,{children:(0,R.jsxs)(G,{sx:{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,{sx:{gridArea:`nav`,display:`flex`,alignItems:`center`},children:[(0,R.jsx)(N3,{}),i?(0,R.jsx)(i,{}):void 0]}),a?(0,R.jsx)(G,{sx:{gridArea:`navCenter`},children:(0,R.jsx)(a,{})}):void 0,(0,R.jsxs)(G,{sx:{gridArea:`tools`,display:`flex`,alignItems:`center`,justifyContent:`flex-end`},children:[r?(0,R.jsx)(k3,{}):void 0,(0,R.jsx)(L3,{showAlarms:e,showLogout:t,showSearch:n})]})]})})}),(0,R.jsxs)(mu,{position:`static`,sx:{display:{xs:`block`,md:`none`}},children:[(0,R.jsxs)(Sb,{children:[(0,R.jsx)(N3,{}),(0,R.jsx)(`div`,{style:{flexGrow:1}}),(0,R.jsx)(L3,{showAlarms:e,showLogout:t,showSearch:n})]}),(0,R.jsxs)(G,{sx:{display:`grid`,gridTemplateColumns:`minmax(200px, 1fr) auto`},children:[(0,R.jsx)(G,{sx:{gridColumn:`1`},children:i?(0,R.jsx)(i,{}):void 0}),(0,R.jsx)(G,{sx:{gridColumn:`2`},children:a?(0,R.jsx)(a,{}):void 0})]})]}),o&&o.length>0?(0,R.jsx)(Yc,{elevation:4,square:!0,component:`nav`,sx:{display:{xs:`block`,xl:`none`},padding:`2px`},children:(0,R.jsx)(R3,{menuNavs:o})}):void 0]})}function B3({menuItems:e}){let t=Q(EO),[n,r]=JE(YI),[i,a]=(0,L.useTransition)();return!e||e.length===0?null:(0,R.jsx)(Yc,{elevation:3,square:!0,sx:{flexShrink:0,display:{xs:`none`,xl:`block`},minHeight:`calc(100vh - 64px)`,zIndex:1},children:(0,R.jsx)(Vg,{dense:!0,children:e?.map((e,o)=>`separator`in e?(0,R.jsx)(zf,{children:e.separator},e.separator):e.hidden?.(t)?void 0:(0,R.jsx)(e_,{children:(0,R.jsxs)(Jg,{selected:n.route===e.route.route,onClick:()=>a(()=>r(e.route)),children:[(0,R.jsx)(n_,{children:e.icon}),(0,R.jsx)(i_,{primary:typeof e.name==`string`?e.name:e.name(t),sx:i?e=>({color:e.palette.grey[700]}):void 0})]})},o))})})}function V3(e,t,n){return[{id:0,numeric:!1,label:`Date`,getDisplay:e=>e.endTime.toLocaleString(),getForSort:e=>e.endTime.getTime()},{id:1,numeric:!1,label:`Part`,getDisplay:e=>e.part+`-`+X.of(e.material).map(e=>e.proc).distinctAndSortBy(e=>e).toRArray().join(`:`)},{id:2,numeric:!1,label:`Station`,getDisplay:e=>Ek(e.stationGroup,e.stationNumber,t)},{id:6,numeric:!1,label:`Operation`,getDisplay:e=>e.operation},{id:3,numeric:!1,label:`Carrier`,getDisplay:e=>Ok(e,n),getForSort:e=>kk(e)},{id:4,numeric:!1,label:`Serial`,getDisplay:e=>e.material.filter(e=>e.serial).map(e=>e.serial).join(`, `)},{id:5,numeric:!1,label:`Workorder`,getDisplay:e=>e.material.filter(e=>e.workorder).map(e=>e.workorder).join(`, `)},{id:7,numeric:!1,label:`Inspection`,getDisplay:t=>gA(t,e),getForSort:t=>X.of(t.material).collect(t=>e.get(t.id)).flatMap(e=>e.signaledInspections).distinct().toSortedArray(e=>e).join(`,`)},{id:8,numeric:!0,label:`Elapsed Min`,getDisplay:e=>(e.elapsedMinsPerMaterial*e.material.length).toFixed(1)},{id:9,numeric:!0,label:`Target Min`,getDisplay:e=>e.activeMinutes.toFixed(1)},{id:10,numeric:!0,label:`Median Elapsed Min`,getDisplay:e=>e.medianCycleMinutes.toFixed(1)},{id:11,numeric:!0,label:`Median Deviation`,getDisplay:e=>e.MAD_aboveMinutes.toFixed(1)}]}function H3(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):s).toSortedArray(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 W3=(0,L.memo)(function(e){let t=Q(EO),n=V3(e.matsById,t.loadStationNames,Dk(t.basketName)),r=k1(0,n),i=O1(),a=U3(e),[o,s]=(0,L.useState)(null),c=qE(DI),l=H3(e.points,n,e.current_date_zoom,r.orderBy,r.order),u=l.length,d=l.slice(i.page*i.rowsPerPage,(i.page+1)*i.rowsPerPage),f=n.filter(t=>!(!e.showWorkorderAndInspect&&t.id===5||!e.showWorkorderAndInspect&&t.id===7||e.hideMedian&&t.id===10||e.hideMedian&&t.id===11));return(0,R.jsxs)(`div`,{children:[(0,R.jsxs)(Yy,{children:[(0,R.jsx)(b1,{columns:f,sort:r,showDetailsCol:!0}),(0,R.jsx)(E1,{columns:f,pageData:d,rowsPerPage:i.rowsPerPage,onClickDetails:(e,t)=>{t.material.length!==0&&(t.material.length===1?c({type:`LogMat`,logMat:t.material[0]}):s({anchorEl:e.currentTarget,material:t.material}))},emptyMessage:e.emptyMessage})]}),(0,R.jsx)(T1,{zoom:a.zoom,tpage:i,count:u}),(0,R.jsx)(M_,{anchorEl:o?.anchorEl,keepMounted:!0,open:o!==null,onClose:()=>s(null),children:o?.material.map((e,t)=>(0,R.jsx)(P_,{onClick:()=>{c({type:`LogMat`,logMat:e}),s(null)},children:e.serial||`Material`},t))})]})});function G3({outlierTy:e}){ZI(e===`machine`?`Machine Outliers`:`L/U Outliers`);let t=Q(mL),n=Q(EO),r=ow(),i=Q(Mk),a=(0,L.useMemo)(()=>{let t=ow(),n=VC(t,-4),r=VC(t,1);return{seriesLabel:`Part`,data:i.valuesToLazySeq().filter(t=>t.isOutlier&&t.endTime>=n&&t.endTime<r&&vk(t)===(e===`labor`)).toRLookup(e=>e.part+`-`+e.material[0].proc.toString())}},[e,i]);return(0,R.jsxs)(G,{sx:{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,{sx:{flexGrow:1}}),(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(ru,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>vA(a,t.matsById,void 0,void 0,n.loadStationNames,n.basketName),size:`large`,children:(0,R.jsx)($x,{})})})]}),(0,R.jsx)(`main`,{children:(0,R.jsx)(W3,{points:a.data,matsById:t.matsById,current_date_zoom:{start:VC(r,-4),end:VC(r,1)},set_date_zoom_range:void 0,period:{type:`Last30`},showWorkorderAndInspect:!1,defaultSortDesc:!0})})]})}var K3=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 hT(this.day,this.station)}toString(){return`{day: ${this.day.toISOString()}}, station: ${this.station}}`}adjustDay(t){return new e(t(this.day),this.station)}};function q3(e,t,n){let r=JC(e),i=JC(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=QC([s,e]),i=(Mne([VC(s,1),t]).getTime()-r.getTime())/o;a.push({day:s,value:n*i})}return a}}function J3(e,t){return fk(X.of(e),e=>e.stationLabel,e=>e.endTime).flatMap(([e,n])=>n.flatMap(e=>{let n=X.of(e).sumBy(e=>e.elapsedMinsPerMaterial*e.material.length),r=XC(e[0].endTime,-n*60),i=X.of(e).sumBy(e=>t(e));return q3(r,e[0].endTime,i)}).map(t=>({...t,statNameAndNum:e}))).buildHashMap(e=>new K3(e.day,e.statNameAndNum),(e,t)=>t.value+(e??0))}function Y3(e){return J3(e,e=>e.activeMinutes)}function X3(e){return J3(e,e=>e.elapsedMinsPerMaterial*e.material.length)}function Z3(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:QC([e.end,n.end])}:t.push(n)}return t}function Q3(e){return X.of(e).filter(e=>e.plannedDown).toLookupOrderedMap(e=>e.stationLabel,e=>e.start).toAscLazySeq().flatMap(([e,t])=>Z3(t.valuesToAscLazySeq()).flatMap(t=>q3(t.start,t.end,rw(t.end,t.start)).map(t=>({...t,station:e})))).toHashMap(e=>[new K3(e.day,e.station),e.value],(e,t)=>e+t)}function $3(e){let t=X.of(e).filter(e=>e.plannedDown).toLookupOrderedMap(e=>e.stationLabel,e=>e.start).mapValues(e=>Z3(e.valuesToAscLazySeq()));return X.of(e).filter(e=>!e.plannedDown).toLookupOrderedMap(e=>e.stationLabel,e=>e.start).toAscLazySeq().flatMap(([e,n])=>{let r=Z3(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=>q3(t.start,t.end,rw(t.end,t.start)).map(t=>({...t,station:e})))}).toHashMap(e=>[new K3(e.day,e.station),e.value],(e,t)=>e+t)}function e6(e,t,n,r,i){let a=Y3(X.of(r).filter(r=>n===`labor`===vk(r)&&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=Q3(o),c=$3(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 K3(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 t6=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 hT(this.x,this.y)}toString(){return`{x: ${new Date(this.x).toISOString()}, y: ${this.y}}`}};function n6(e,t){let n=X.of(t).toHashMap(e=>[new t6(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 t6(t,e));r===void 0?a+=`<td></td>`:a+=`<td>`+r.label+`</td>`}a+=`</tr>
335
+ `}return a+=`</tbody>
336
+ </table>`,a}function r6(e,t){oA(n6(e,t))}function i6(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 a6(e){oA(i6(e))}var o6=[[`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`]],s6=`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 c6(e,t){return t<=o6.length?`#`+o6[t-1][e]:`#`+s6[e%s6.length]}var l6=c6(0,2),u6=c6(1,2),d6=50,f6=30,p6=10,m6=10;function h6({width:e,height:t,points:n,setTooltip:r}){let i=t-p6-f6,a=(0,L.useMemo)(()=>_N().domain([0,24]).range([i,0]),[i]),o=(0,L.useMemo)(()=>kj().domain(X.of(n).map(e=>e.x).distinct()).range([0,e-d6-m6]).padding(.1),[n,e]),s=(0,L.useMemo)(()=>kj().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(${d6},${p6})`,children:[(0,R.jsx)(rj,{scale:o,top:i}),(0,R.jsx)(ij,{scale:a,left:0,label:`Hours`}),(0,R.jsx)(QA,{scale:a,width:e-d6-m6}),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:l6,onMouseEnter:t=>{let n=NA(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:u6,onMouseEnter:t=>{let n=NA(t);r({left:n?.x??0,top:n?.y??0,datum:e})},onMouseLeave:()=>r(null)})]},t))]})})}function g6({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:l6}}),(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:u6}}),(0,R.jsxs)(`div`,{style:{marginLeft:`1em`},children:[e,` Planned`]})]})]})}function _6({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 v6({series:e}){let t=(0,L.useMemo)(()=>Z(null),[]),n=qE(t);return(0,R.jsxs)(Jh,{size:{xs:12,md:6},onMouseLeave:()=>n(null),children:[(0,R.jsx)(KA,{sx:{height:`calc(100vh / 2 - 200px)`},chart:({width:t,height:r})=>(0,R.jsx)(h6,{width:t,height:r,points:e.points,setTooltip:n}),tooltipAtom:t,TooltipContent:_6}),(0,R.jsx)(g6,{station:e.station})]})}function y6({points:e}){return(0,R.jsx)(Jh,{container:!0,children:e.map((e,t)=>(0,R.jsx)(v6,{series:e},t))})}var b6=[{id:0,numeric:!1,label:`Date`,getDisplay:e=>e.x,getForSort:e=>e.day.getTime()},{id:1,numeric:!1,label:`Station`,getDisplay:e=>e.station},{id:2,numeric:!0,label:`Actual Hours`,getDisplay:e=>e.y.toFixed(1),getForSort:e=>e.y},{id:3,numeric:!0,label:`Actual OEE`,getDisplay:e=>(e.actualOee*100).toFixed(0)+`%`,getForSort:e=>e.actualOee},{id:4,numeric:!0,label:`Planned Hours`,getDisplay:e=>e.plannedHours.toFixed(1),getForSort:e=>e.plannedHours},{id:5,numeric:!0,label:`Planned OEE`,getDisplay:e=>(e.plannedOee*100).toFixed(0)+`%`,getForSort:e=>e.plannedOee}];function x6(e,t){return X.of(e).flatMap(e=>e.points).toSortedArray(t)}var S6=(0,L.memo)(function({points:e}){let t=k1(0,b6);return(0,R.jsxs)(Yy,{children:[(0,R.jsx)(b1,{columns:b6,sort:t,showDetailsCol:!1}),(0,R.jsx)(E1,{columns:b6,pageData:x6(e,t.sortOn)})]})}),C6=Z(!0),w6=Z(!0);function T6({ty:e}){ZI(e===`labor`?`L/U OEE`:`Machine OEE`);let[t,n]=JE(e===`labor`?C6:w6),r=VC(ow(),-6),i=VC(ow(),1),a=Q(Mk),o=Q(EA),s=(0,L.useMemo)(()=>e6(r,i,e,a.valuesToLazySeq(),o),[r,i,e,a,o]);return(0,R.jsxs)(G,{sx:{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,{sx:{flexGrow:1}}),(0,R.jsx)(Th,{size:`small`,children:(0,R.jsxs)(ov,{autoWidth:!0,value:t?`chart`:`table`,onChange:e=>n(e.target.value===`chart`),children:[(0,R.jsx)(P_,{value:`chart`,children:`Chart`},`chart`),(0,R.jsx)(P_,{value:`table`,children:`Table`},`table`)]})}),(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(ru,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>a6(s),size:`large`,children:(0,R.jsx)($x,{})})})]}),(0,R.jsx)(`main`,{children:t?(0,R.jsx)(y6,{points:s}):(0,R.jsx)(S6,{points:s})})]})}var E6=H6(),D6=e=>R6(e,E6),O6=H6();D6.write=e=>R6(e,O6);var k6=H6();D6.onStart=e=>R6(e,k6);var A6=H6();D6.onFrame=e=>R6(e,A6);var j6=H6();D6.onFinish=e=>R6(e,j6);var M6=[];D6.setTimeout=(e,t)=>{let n=D6.now()+t,r=()=>{let e=M6.findIndex(e=>e.cancel==r);~e&&M6.splice(e,1),I6-=+!!~e},i={time:n,handler:e,cancel:r};return M6.splice(N6(n),0,i),I6+=1,z6(),i};var N6=e=>~(~M6.findIndex(t=>t.time>e)||~M6.length);D6.cancel=e=>{k6.delete(e),A6.delete(e),j6.delete(e),E6.delete(e),O6.delete(e)},D6.sync=e=>{L6=!0,D6.batchedUpdates(e),L6=!1},D6.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,D6.onStart(n)}return r.handler=e,r.cancel=()=>{k6.delete(n),t=null},r};var P6=typeof window<`u`?window.requestAnimationFrame:(()=>{});D6.use=e=>P6=e,D6.now=typeof performance<`u`?()=>performance.now():Date.now,D6.batchedUpdates=e=>e(),D6.catch=console.error,D6.frameLoop=`always`,D6.advance=()=>{D6.frameLoop===`demand`?V6():console.warn(`Cannot call the manual advancement of rafz whilst frameLoop is not set as demand`)};var F6=-1,I6=0,L6=!1;function R6(e,t){L6?(t.delete(e),e(0)):(t.add(e),z6())}function z6(){F6<0&&(F6=0,D6.frameLoop!==`demand`&&P6(B6))}function Tie(){F6=-1}function B6(){~F6&&(P6(B6),D6.batchedUpdates(V6))}function V6(){let e=F6;F6=D6.now();let t=N6(F6);if(t&&(U6(M6.splice(0,t),e=>e.handler()),I6-=t),!I6){Tie();return}k6.flush(),E6.flush(e?Math.min(64,F6-e):16.667),A6.flush(),O6.flush(),j6.flush()}function H6(){let e=new Set,t=e;return{add(n){I6+=+(t==e&&!e.has(n)),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,U6(t,t=>t(n)&&e.add(t)),I6+=e.size,t=e)}}}function U6(e,t){e.forEach(e=>{try{t(e)}catch(e){D6.catch(e)}})}var Eie=Object.defineProperty,Die=(e,t)=>{for(var n in t)Eie(e,n,{get:t[n],enumerable:!0})},W6={};Die(W6,{assign:()=>kie,colors:()=>n8,createStringInterpolator:()=>e8,skipAnimation:()=>r8,to:()=>t8,willAdvance:()=>i8});function G6(){}var Oie=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),K6={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 q6(e,t){if(K6.arr(e)){if(!K6.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 J6=(e,t)=>e.forEach(t);function Y6(e,t,n){if(K6.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 X6=e=>K6.und(e)?[]:K6.arr(e)?e:[e];function Z6(e,t){if(e.size){let n=Array.from(e);e.clear(),J6(n,t)}}var Q6=(e,...t)=>Z6(e,e=>e(...t)),$6=()=>typeof window>`u`||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),e8,t8,n8=null,r8=!1,i8=G6,kie=e=>{e.to&&(t8=e.to),e.now&&(D6.now=e.now),e.colors!==void 0&&(n8=e.colors),e.skipAnimation!=null&&(r8=e.skipAnimation),e.createStringInterpolator&&(e8=e.createStringInterpolator),e.requestAnimationFrame&&D6.use(e.requestAnimationFrame),e.batchedUpdates&&(D6.batchedUpdates=e.batchedUpdates),e.willAdvance&&(i8=e.willAdvance),e.frameLoop&&(D6.frameLoop=e.frameLoop)},a8=new Set,o8=[],s8=[],c8=0,l8={get idle(){return!a8.size&&!o8.length},start(e){c8>e.priority?(a8.add(e),D6.onStart(Aie)):(u8(e),D6(f8))},advance:f8,sort(e){if(c8)D6.onFrame(()=>l8.sort(e));else{let t=o8.indexOf(e);~t&&(o8.splice(t,1),d8(e))}},clear(){o8=[],a8.clear()}};function Aie(){a8.forEach(u8),a8.clear(),D6(f8)}function u8(e){o8.includes(e)||d8(e)}function d8(e){o8.splice(jie(o8,t=>t.priority>e.priority),0,e)}function f8(e){let t=s8;for(let n=0;n<o8.length;n++){let r=o8[n];c8=r.priority,r.idle||(i8(r),r.advance(e),r.idle||t.push(r))}return c8=0,s8=o8,s8.length=0,o8=t,o8.length>0}function jie(e,t){let n=e.findIndex(t);return n<0?e.length:n}var Mie=(e,t,n)=>Math.min(Math.max(n,e),t),Nie={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},p8=`[-+]?\\d*\\.?\\d+`,m8=p8+`%`;function h8(...e){return`\\(\\s*(`+e.join(`)\\s*,\\s*(`)+`)\\s*\\)`}var Pie=RegExp(`rgb`+h8(p8,p8,p8)),Fie=RegExp(`rgba`+h8(p8,p8,p8,p8)),Iie=RegExp(`hsl`+h8(p8,m8,m8)),Lie=RegExp(`hsla`+h8(p8,m8,m8,p8)),Rie=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,zie=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Bie=/^#([0-9a-fA-F]{6})$/,Vie=/^#([0-9a-fA-F]{8})$/;function Hie(e){let t;return typeof e==`number`?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Bie.exec(e))?parseInt(t[1]+`ff`,16)>>>0:n8&&n8[e]!==void 0?n8[e]:(t=Pie.exec(e))?(v8(t[1])<<24|v8(t[2])<<16|v8(t[3])<<8|255)>>>0:(t=Fie.exec(e))?(v8(t[1])<<24|v8(t[2])<<16|v8(t[3])<<8|b8(t[4]))>>>0:(t=Rie.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+`ff`,16)>>>0:(t=Vie.exec(e))?parseInt(t[1],16)>>>0:(t=zie.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Iie.exec(e))?(_8(y8(t[1]),x8(t[2]),x8(t[3]))|255)>>>0:(t=Lie.exec(e))?(_8(y8(t[1]),x8(t[2]),x8(t[3]))|b8(t[4]))>>>0:null}function g8(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 _8(e,t,n){let r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=g8(i,r,e+1/3),o=g8(i,r,e),s=g8(i,r,e-1/3);return Math.round(a*255)<<24|Math.round(o*255)<<16|Math.round(s*255)<<8}function v8(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function y8(e){return(parseFloat(e)%360+360)%360/360}function b8(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function x8(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function S8(e){let t=Hie(e);return t===null?e:(t||=0,`rgba(${(t&4278190080)>>>24}, ${(t&16711680)>>>16}, ${(t&65280)>>>8}, ${(t&255)/255})`)}var C8=(e,t,n)=>{if(K6.fun(e))return e;if(K6.arr(e))return C8({range:e,output:t,extrapolate:n});if(K6.str(e.output[0]))return e8(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=Wie(e,a);return Uie(e,a[t],a[t+1],i[t],i[t+1],c,o,s,r.map)}};function Uie(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 Wie(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var Gie=(e,t=`end`)=>n=>{n=t===`end`?Math.min(n,.999):Math.max(n,.001);let r=n*e;return Mie(0,1,(t===`end`?Math.floor(r):Math.ceil(r))/e)},w8=1.70158,T8=w8*1.525,E8=w8+1,D8=2*Math.PI/3,O8=2*Math.PI/4.5,k8=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},Kie={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=>E8*e*e*e-w8*e*e,easeOutBack:e=>1+E8*(e-1)**3+w8*(e-1)**2,easeInOutBack:e=>e<.5?(2*e)**2*((T8+1)*2*e-T8)/2:((2*e-2)**2*((T8+1)*(e*2-2)+T8)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-(2**(10*e-10))*Math.sin((e*10-10.75)*D8),easeOutElastic:e=>e===0?0:e===1?1:2**(-10*e)*Math.sin((e*10-.75)*D8)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(2**(20*e-10)*Math.sin((20*e-11.125)*O8))/2:2**(-20*e+10)*Math.sin((20*e-11.125)*O8)/2+1,easeInBounce:e=>1-k8(1-e),easeOutBounce:k8,easeInOutBounce:e=>e<.5?(1-k8(1-2*e))/2:(1+k8(2*e-1))/2,steps:Gie},A8=Symbol.for(`FluidValue.get`),j8=Symbol.for(`FluidValue.observers`),M8=e=>!!(e&&e[A8]),N8=e=>e&&e[A8]?e[A8]():e,P8=e=>e[j8]||null;function qie(e,t){e.eventObserved?e.eventObserved(t):e(t)}function F8(e,t){let n=e[j8];n&&n.forEach(e=>{qie(e,t)})}var I8=class{constructor(e){if(!e&&!(e=this.get))throw Error(`Unknown getter`);Jie(this,e)}},Jie=(e,t)=>z8(e,A8,t);function L8(e,t){if(e[A8]){let n=e[j8];n||z8(e,j8,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function R8(e,t){let n=e[j8];if(n&&n.has(t)){let r=n.size-1;r?n.delete(t):e[j8]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var z8=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),B8=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Yie=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,V8=RegExp(`(${B8.source})(%|[a-z]+)`,`i`),Xie=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,H8=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,U8=e=>{let[t,n]=Zie(e);if(!t||$6())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&&H8.test(n)?U8(n):n||e},Zie=e=>{let t=H8.exec(e);if(!t)return[,];let[,n,r]=t;return[n,r]},W8,Qie=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,G8=e=>{W8||=n8?RegExp(`(${Object.keys(n8).join(`|`)})(?!\\w)`,`g`):/^\b$/;let t=e.output.map(e=>N8(e).replace(H8,U8).replace(Yie,S8).replace(W8,S8)),n=t.map(e=>e.match(B8).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=>C8({...e,output:t}));return e=>{let n=!V8.test(t[0])&&t.find(e=>V8.test(e))?.replace(B8,``),i=0;return t[0].replace(B8,()=>`${r[i++](e)}${n||``}`).replace(Xie,Qie)}},K8=`react-spring: `,q8=e=>{let t=e,n=!1;if(typeof t!=`function`)throw TypeError(`${K8}once requires a function parameter`);return(...e)=>{n||=(t(...e),!0)}},$ie=q8(console.warn);function eae(){$ie(`${K8}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var tae=q8(console.warn);function nae(){tae(`${K8}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 J8(e){return K6.str(e)&&(e[0]==`#`||/\d/.test(e)||!$6()&&H8.test(e)||e in(n8||{}))}var Y8=$6()?L.useEffect:L.useLayoutEffect,rae=()=>{let e=(0,L.useRef)(!1);return Y8(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function X8(){let e=(0,L.useState)()[1],t=rae();return()=>{t.current&&e(Math.random())}}var Z8=e=>(0,L.useEffect)(e,iae),iae=[];function Q8(e){let t=(0,L.useRef)(void 0);return(0,L.useEffect)(()=>{t.current=e}),t.current}var $8=Symbol.for(`Animated:node`),aae=e=>!!e&&e[$8]===e,e5=e=>e&&e[$8],t5=(e,t)=>Oie(e,$8,t),n5=e=>e&&e[$8]&&e[$8].getPayload(),r5=class{constructor(){t5(this,this)}getPayload(){return this.payload||[]}},i5=class e extends r5{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,K6.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 K6.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,K6.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},a5=class e extends i5{constructor(e){super(0),this._string=null,this._toString=C8({output:[e,e]})}static create(t){return new e(t)}getValue(){return this._string??=this._toString(this._value)}setValue(e){if(K6.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=C8({output:[this.getValue(),e]})),this._value=0,super.reset()}},o5={dependencies:null},s5=class extends r5{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return Y6(this.source,(n,r)=>{aae(n)?t[r]=n.getValue(e):M8(n)?t[r]=N8(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&J6(this.payload,e=>e.reset())}_makePayload(e){if(e){let t=new Set;return Y6(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){o5.dependencies&&M8(e)&&o5.dependencies.add(e);let t=n5(e);t&&J6(t,e=>this.add(e))}},oae=class e extends s5{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(sae)),!0)}};function sae(e){return(J8(e)?a5:i5).create(e)}function c5(e){let t=e5(e);return t?t.constructor:K6.arr(e)?oae:J8(e)?a5:i5}var l5=(e,t)=>{let n=!K6.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=uae(i,e)},[i]),[s,c]=lae(r,t),l=X8(),u=()=>{let e=a.current;n&&!e||(e?t.applyAnimatedValues(e,s.getValue(!0)):!1)===!1&&l()},d=new cae(u,c),f=(0,L.useRef)(void 0);Y8(()=>(f.current=d,J6(c,e=>L8(e,d)),()=>{f.current&&(J6(f.current.deps,e=>R8(e,f.current)),D6.cancel(f.current.update))})),(0,L.useEffect)(u,[]),Z8(()=>()=>{let e=f.current;J6(e.deps,t=>R8(t,e))});let p=t.getComponentProps(s.getValue());return L.createElement(e,{...p,ref:o})})},cae=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type==`change`&&D6.write(this.update)}};function lae(e,t){let n=new Set;return o5.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new s5(e),o5.dependencies=null,[e,n]}function uae(e,t){return e&&(K6.fun(e)?e(t):e.current=t),t}var u5=Symbol.for(`AnimatedComponent`),dae=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new s5(e),getComponentProps:r=e=>e}={})=>{let i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},a=e=>{let t=d5(e)||`Anonymous`;return e=K6.str(e)?a[e]||(a[e]=l5(e,i)):e[u5]||(e[u5]=l5(e,i)),e.displayName=`Animated(${t})`,e};return Y6(e,(t,n)=>{K6.arr(e)&&(n=d5(t)),a[n]=a(t)}),{animated:a}},d5=e=>K6.str(e)?e:e&&K6.str(e.displayName)?e.displayName:K6.fun(e)&&e.name||null;function f5(e,...t){return K6.fun(e)?e(...t):e}var p5=(e,t)=>e===!0||!!(t&&e&&(K6.fun(e)?e(t):X6(e).includes(t))),m5=(e,t)=>K6.obj(e)?t&&e[t]:e,h5=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,fae=e=>e,g5=(e,t=fae)=>{let n=pae;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);K6.und(n)||(r[i]=n)}return r},pae=[`config`,`onProps`,`onStart`,`onChange`,`onPause`,`onResume`,`onRest`],mae={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 hae(e){let t={},n=0;if(Y6(e,(e,r)=>{mae[r]||(t[r]=e,n++)}),n)return t}function _5(e){let t=hae(e);if(t){let n={to:t};return Y6(e,(e,r)=>r in t||(n[r]=e)),n}return{...e}}function v5(e){return e=N8(e),K6.arr(e)?e.map(v5):J8(e)?W6.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function gae(e){for(let t in e)return!0;return!1}function y5(e){return K6.fun(e)||K6.arr(e)&&K6.obj(e[0])}function _ae(e,t){e.ref?.delete(e),t?.delete(e)}function vae(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var b5={...{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:Kie.linear,clamp:!1},yae=class{constructor(){this.velocity=0,Object.assign(this,b5)}};function bae(e,t,n){n&&(n={...n},x5(n,t),t={...n,...t}),x5(e,t),Object.assign(e,t);for(let t in b5)e[t]??(e[t]=b5[t]);let{frequency:r,damping:i}=e,{mass:a}=e;return K6.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 x5(e,t){if(!K6.und(t.decay))e.duration=void 0;else{let n=!K6.und(t.tension)||!K6.und(t.friction);(n||!K6.und(t.frequency)||!K6.und(t.damping)||!K6.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var S5=[],xae=class{constructor(){this.changed=!1,this.values=S5,this.toValues=null,this.fromValues=S5,this.config=new yae,this.immediate=!1}};function C5(e,{key:t,props:n,defaultProps:r,state:i,actions:a}){return new Promise((o,s)=>{let c,l,u=p5(n.cancel??r?.cancel,t);if(u)p();else{K6.und(n.pause)||(i.paused=p5(n.pause,t));let e=r?.pause;e!==!0&&(e=i.paused||p5(e,t)),c=f5(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-D6.now()}function f(){c>0&&!W6.skipAnimation?(i.delayed=!0,l=D6.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 w5=(e,t)=>t.length==1?t[0]:t.some(e=>e.cancelled)?D5(e.get()):t.every(e=>e.noop)?T5(e.get()):E5(e.get(),t.every(e=>e.finished)),T5=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),E5=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),D5=e=>({value:e,cancelled:!0,finished:!1});function O5(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=g5(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)&&D5(r)||i!==n.asyncId&&E5(r,!1);if(t)throw e.result=t,d(e),e},m=0,h=(e,t)=>{let a=new A5,o=new j5;return(async()=>{p(a);let s=K6.obj(e)?{...e}:{...t,to:e};if(s.parentId=i,Y6(l,(e,t)=>{K6.und(s[t])&&(s[t]=e)}),W6.skipAnimation){if(++m>1024)throw k5(n),o.result=E5(r,!1),d(o),o;return s.immediate=!0,await r.start(s)}let c=await r.start(s);return p(a),n.paused&&await new Promise(e=>{n.resumeQueue.add(e)}),c})()},g;try{let t;t=K6.arr(e)?(async e=>{for(let t of e)await h(t)})(e):Promise.resolve(e(h,r.stop.bind(r))),await Promise.all([t.then(u),f]),g=E5(r.get(),!0,!1)}catch(e){if(e instanceof A5)g=e.result;else if(e instanceof j5)g=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 K6.fun(o)&&D6.batchedUpdates(()=>{o(g,r,r.item)}),g})()}function k5(e,t){Z6(e.timeouts,e=>e.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var A5=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.")}},j5=class extends Error{constructor(){super(`SkipAnimationSignal`)}},M5=e=>e instanceof N5,Sae=1,N5=class extends I8{constructor(){super(...arguments),this.id=Sae++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=e5(this);return e&&e.getValue()}to(...e){return W6.to(this,e)}interpolate(...e){return eae(),W6.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){F8(this,{type:`change`,parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||l8.sort(this),F8(this,{type:`priority`,parent:this,priority:e})}},P5=Symbol.for(`SpringPhase`),F5=1,I5=2,L5=4,R5=e=>(e[P5]&F5)>0,z5=e=>(e[P5]&I5)>0,B5=e=>(e[P5]&L5)>0,V5=(e,t)=>t?e[P5]|=I5|F5:e[P5]&=~I5,H5=(e,t)=>t?e[P5]|=L5:e[P5]&=~L5,Cae=class extends N5{constructor(e,t){if(super(),this.animation=new xae,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,!K6.und(e)||!K6.und(t)){let n=K6.obj(e)?{...e}:{...t,from:e};K6.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(z5(this)||this._state.asyncTo)||B5(this)}get goal(){return N8(this.animation.to)}get velocity(){let e=e5(this);return e instanceof i5?e.lastVelocity||0:e.getPayload().map(e=>e.lastVelocity||0)}get hasAnimated(){return R5(this)}get isAnimating(){return z5(this)}get isPaused(){return B5(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,r=this.animation,{toValues:i}=r,{config:a}=r,o=n5(r.to);!o&&M8(r.to)&&(i=X6(N8(r.to))),r.values.forEach((s,c)=>{if(s.done)return;let l=s.constructor==a5?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=K6.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(!K6.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=!K6.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=e5(this),c=s.getValue();if(t){let e=N8(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 D6.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(z5(this)){let{to:e,config:t}=this.animation;D6.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 K6.und(e)?(n=this.queue||[],this.queue=[]):n=[K6.obj(e)?e:{...t,to:e}],Promise.all(n.map(e=>this._update(e))).then(e=>w5(this,e))}stop(e){let{to:t}=this.animation;return K6.und(t)||this._focus(this.get()),k5(this._state,e&&this._lastCallId),D6.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=K6.obj(n)?n[t]:n,(n==null||y5(n))&&(n=void 0),r=K6.obj(r)?r[t]:r,r??=void 0;let i={to:n,from:r};return R5(this)||(e.reverse&&([n,r]=[r,n]),r=N8(r),K6.und(r)?e5(this)||this._set(n):this._set(r)),i}_update({...e},t){let{key:n,defaultProps:r}=this;e.default&&Object.assign(r,g5(e,(e,t)=>/^on/.test(t)?m5(e,n):e)),q5(this,e,`onProps`),J5(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 C5(++this._lastCallId,{key:n,props:e,defaultProps:r,state:a,actions:{pause:()=>{B5(this)||(H5(this,!0),Q6(a.pauseQueue),J5(this,`onPause`,E5(this,U5(this,this.animation.to)),this))},resume:()=>{B5(this)&&(H5(this,!1),z5(this)&&this._resume(),Q6(a.resumeQueue),J5(this,`onResume`,E5(this,U5(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(n=>{if(e.loop&&n.finished&&!(t&&n.noop)){let t=W5(e);if(t)return this._update(t,!0)}return n})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(D5(this));let r=!K6.und(e.to),i=!K6.und(e.from);if(r||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(D5(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||K6.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);let f=!q6(d,l);f&&(s.from=d),d=N8(d);let p=!q6(u,c);p&&this._focus(u);let m=y5(t.to),{config:h}=s,{decay:g,velocity:_}=h;(r||i)&&(h.velocity=0),t.config&&!m&&bae(h,f5(t.config,a),t.config===o.config?void 0:f5(o.config,a));let v=e5(this);if(!v||K6.und(u))return n(E5(this,!0));let y=K6.und(t.reset)?i&&!t.default:!K6.und(d)&&p5(t.reset,a),b=y?d:this.get(),x=v5(u),S=K6.num(x)||K6.arr(x)||J8(x),C=!m&&(!S||p5(o.immediate||t.immediate,a));if(p){let e=c5(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=M8(u),E=!1;if(!T){let e=y||!R5(this)&&f;(p||e)&&(E=q6(v5(b),x),T=!E),(!q6(s.immediate,C)&&!C||!q6(h.decay,g)||!q6(h.velocity,_))&&(T=!0)}if(E&&z5(this)&&(s.changed&&!y?T=!0:T||this._stop(c)),!m&&((T||M8(c))&&(s.values=v.getPayload(),s.toValues=M8(u)?null:w==a5?[1]:X6(x)),s.immediate!=C&&(s.immediate=C,!C&&!y&&this._set(c)),T)){let{onRest:e}=s;J6(Tae,e=>q5(this,t,e));let r=E5(this,U5(this,c));Q6(this._pendingCalls,r),this._pendingCalls.add(n),s.changed&&D6.batchedUpdates(()=>{s.changed=!y,e?.(r,this),y?f5(o.onRest,r):s.onStart?.(r,this)})}y&&this._set(b),m?n(O5(t.to,t,this._state,this)):T?this._start():z5(this)&&!p?this._pendingCalls.add(n):n(T5(b))}_focus(e){let t=this.animation;e!==t.to&&(P8(this)&&this._detach(),t.to=e,P8(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;M8(t)&&(L8(t,this),M5(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;M8(e)&&R8(e,this)}_set(e,t=!0){let n=N8(e);if(!K6.und(n)){let e=e5(this);if(!e||!q6(n,e.getValue())){let r=c5(n);!e||e.constructor!=r?t5(this,r.create(n)):e.setValue(n),e&&D6.batchedUpdates(()=>{this._onChange(n,t)})}}return e5(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,J5(this,`onStart`,E5(this,U5(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),f5(this.animation.onChange,e,this)),f5(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){let e=this.animation;e5(this).reset(N8(e.to)),e.immediate||(e.fromValues=e.values.map(e=>e.lastPosition)),z5(this)||(V5(this,!0),B5(this)||this._resume())}_resume(){W6.skipAnimation?this.finish():l8.start(this)}_stop(e,t){if(z5(this)){V5(this,!1);let n=this.animation;J6(n.values,e=>{e.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),F8(this,{type:`idle`,parent:this});let r=t?D5(this.get()):E5(this.get(),U5(this,e??n.to));Q6(this._pendingCalls,r),n.changed&&(n.changed=!1,J5(this,`onRest`,r,this))}}};function U5(e,t){let n=v5(t);return q6(v5(e.get()),n)}function W5(e,t=e.loop,n=e.to){let r=f5(t);if(r){let i=r!==!0&&_5(r),a=(i||e).reverse,o=!i||i.reset;return G5({...e,loop:t,default:!1,pause:void 0,to:!a||y5(n)?n:void 0,from:o?e.from:void 0,reset:o,...i})}}function G5(e){let{to:t,from:n}=e=_5(e),r=new Set;return K6.obj(t)&&K5(t,r),K6.obj(n)&&K5(n,r),e.keys=r.size?Array.from(r):null,e}function wae(e){let t=G5(e);return K6.und(t.default)&&(t.default=g5(t)),t}function K5(e,t){Y6(e,(e,n)=>e!=null&&t.add(n))}var Tae=[`onStart`,`onRest`,`onChange`,`onPause`,`onResume`];function q5(e,t,n){e.animation[n]=t[n]===h5(t,n)?void 0:m5(t[n],e.key)}function J5(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var Eae=[`onStart`,`onChange`,`onRest`],Dae=1,Oae=class{constructor(e,t){this.id=Dae++,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];K6.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(G5(e)),this}start(e){let{queue:t}=this;return e?t=X6(e).map(G5):this.queue=[],this._flush?this._flush(this,t):(t7(this,t),Y5(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;J6(X6(t),t=>n[t].stop(!!e))}else k5(this._state,this._lastAsyncId),this.each(t=>t.stop(!!e));return this}pause(e){if(K6.und(e))this.start({pause:!0});else{let t=this.springs;J6(X6(e),e=>t[e].pause())}return this}resume(e){if(K6.und(e))this.start({pause:!1});else{let t=this.springs;J6(X6(e),e=>t[e].resume())}return this}each(e){Y6(this.springs,e)}onLoopReset(e){let t=this._onLoopReset??=new Set;return t.add(e),()=>{t.delete(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,Z6(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&&Z6(t,([e,t])=>{t.value=o,e(t,this,this._item)}),a&&(this._started=!1,Z6(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;D6.onFrame(this._onFrame)}};function Y5(e,t){return Promise.all(t.map(t=>X5(e,t))).then(t=>w5(e,t))}async function X5(e,t,n){let{keys:r,to:i,from:a,loop:o,onRest:s,onResolve:c}=t,l=K6.obj(t.default)&&t.default;o&&(t.loop=!1),i===!1&&(t.to=null),a===!1&&(t.from=null);let u=K6.arr(i)||K6.fun(i)?i:void 0;u?(t.to=void 0,t.onRest=void 0,l&&(l.onRest=void 0)):J6(Eae,n=>{let r=t[n];if(K6.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,Q6(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||h5(t,`cancel`)===!0;(u||p&&d.asyncId)&&f.push(C5(++e._lastAsyncId,{props:t,state:d,actions:{pause:G6,resume:G6,start(t,n){p?(k5(d,e._lastAsyncId),n(D5(e))):(t.onRest=s,n(O5(u,t,d,e)))}}})),d.paused&&await new Promise(e=>{d.resumeQueue.add(e)});let m=w5(e,await Promise.all(f));if(o&&m.finished&&!(n&&m.noop)){let n=W5(t,o,i);if(n)return e._onLoopReset?.forEach(e=>e()),t7(e,[n]),X5(e,n,!0)}return c&&D6.batchedUpdates(()=>c(m,e,e.item)),m}function Z5(e,t){let n={...e.springs};return t&&J6(X6(t),e=>{K6.und(e.keys)&&(e=G5(e)),K6.obj(e.to)||(e={...e,to:void 0}),e7(n,e,e=>$5(e))}),Q5(e,n),n}function Q5(e,t){Y6(t,(t,n)=>{e.springs[n]||(e.springs[n]=t,L8(t,e))})}function $5(e,t){let n=new Cae;return n.key=e,t&&L8(n,t),n}function e7(e,t,n){t.keys&&J6(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function t7(e,t){J6(t,t=>{e7(e.springs,t,t=>$5(t,e))})}var kae=L.createContext({pause:!1,immediate:!1}),Aae=()=>{let e=[],t=function(t){nae();let r=[];return J6(e,(e,i)=>{if(K6.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 J6(e,e=>e.pause(...arguments)),this},t.resume=function(){return J6(e,e=>e.resume(...arguments)),this},t.set=function(t){J6(e,(e,n)=>{let r=K6.fun(t)?t(n,e):t;r&&e.set(r)})},t.start=function(t){let n=[];return J6(e,(e,r)=>{if(K6.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 J6(e,e=>e.stop(...arguments)),this},t.update=function(t){return J6(e,(e,n)=>e.update(this._getProps(t,e,n))),this};let n=function(e,t,n){return K6.fun(e)?e(n,t):e};return t._getProps=n,t};function n7(e,t,n){let r=K6.fun(t)&&t;r&&!n&&(n=[]);let i=(0,L.useMemo)(()=>r||arguments.length==3?Aae():void 0,[]),a=(0,L.useRef)(0),o=X8(),s=(0,L.useMemo)(()=>({ctrls:[],queue:[],flush(e,t){let n=Z5(e,t);return a.current>0&&!s.queue.length&&!Object.keys(n).some(t=>!e.springs[t])?Y5(e,t):new Promise(r=>{Q5(e,n),s.queue.push(()=>{r(Y5(e,t))}),o()})}}),[]),c=(0,L.useRef)([...s.ctrls]),l=(0,L.useRef)([]),u=(0,L.useRef)([]);u.current=[];let d=Q8(e)||0;(0,L.useMemo)(()=>{J6(c.current.slice(e,d),e=>{_ae(e,i),e.stop(!0)}),c.current.length=e,f(d,e)},[e]),(0,L.useMemo)(()=>{f(0,Math.min(d,e))},n);function f(e,n){for(let i=e;i<n;i++){let e=c.current[i]||(c.current[i]=new Oae(null,s.flush)),n=r?r(i,e):t[i];n&&(l.current[i]=wae(n))}}let p=c.current.map((e,t)=>Z5(e,l.current[t])),m=(0,L.useContext)(kae),h=m!==Q8(m)&&gae(m);Y8(()=>{a.current++,s.ctrls=c.current;let{queue:e}=s;e.length&&(s.queue=[],J6(e,e=>e()));let t=l.current.length>0?l.current:u.current;J6(c.current,(e,n)=>{i?.add(e),h&&e.start({default:m});let r=t[n];r&&(vae(e,r.ref),e.ref?e.queue.push({...r,default:K6.obj(r.default)?{...r.default}:r.default}):e.start(r))}),l.current.length>0&&(u.current=l.current),l.current=[]}),Z8(()=>()=>{J6(s.ctrls,e=>e.stop(!0))});let g=p.map(e=>({...e}));return i?[g,i]:g}function r7(e,t){let n=K6.fun(e),[[r],i]=n7(1,n?e:[e],n?t||[]:t);return n||arguments.length==2?[r,i]:r}var jae=class extends N5{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=C8(...t);let n=this._get(),r=c5(n);t5(this,r.create(n))}advance(e){let t=this._get();q6(t,this.get())||(e5(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&i7(this._active)&&a7(this)}_get(){let e=K6.arr(this.source)?this.source.map(N8):X6(N8(this.source));return this.calc(...e)}_start(){this.idle&&!i7(this._active)&&(this.idle=!1,J6(n5(this),e=>{e.done=!1}),W6.skipAnimation?(D6.batchedUpdates(()=>this.advance()),a7(this)):l8.start(this))}_attach(){let e=1;J6(X6(this.source),t=>{M8(t)&&L8(t,this),M5(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){J6(X6(this.source),e=>{M8(e)&&R8(e,this)}),this._active.clear(),a7(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=X6(this.source).reduce((e,t)=>Math.max(e,(M5(t)?t.priority:0)+1),0))}};function Mae(e){return e.idle!==!1}function i7(e){return!e.size||Array.from(e).every(Mae)}function a7(e){e.idle||(e.idle=!0,J6(n5(e),e=>{e.done=!0}),F8(e,{type:`idle`,parent:e}))}W6.assign({createStringInterpolator:G8,to:(e,t)=>new jae(e,t)}),l8.advance;var o7=/^--/;function Nae(e,t){return t==null||typeof t==`boolean`||t===``?``:typeof t==`number`&&t!==0&&!o7.test(e)&&!(c7.hasOwnProperty(e)&&c7[e])?t+`px`:(``+t).trim()}var s7={};function Pae(e,t){if(!e.nodeType||!e.setAttribute||!e.removeAttribute)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:s7[t]||(s7[t]=t.replace(/([A-Z])/g,e=>`-`+e.toLowerCase())));t.hasOwnProperty(`children`)&&(e.textContent=a);for(let t in i)if(i.hasOwnProperty(t)){let n=Nae(t,i[t]);o7.test(t)?e.style.setProperty(t,n):e.style[t]=n}d.forEach((t,n)=>{let r=u[n];r===void 0?e.removeAttribute(t):e.setAttribute(t,r)}),t.hasOwnProperty(`className`)&&(r===void 0?e.removeAttribute(`class`):e.className=r),o!==void 0&&(e.scrollTop=o),s!==void 0&&(e.scrollLeft=s),t.hasOwnProperty(`viewBox`)&&(c===void 0?e.removeAttribute(`viewBox`):e.setAttribute(`viewBox`,c))}var c7={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},Fae=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),Iae=[`Webkit`,`Ms`,`Moz`,`O`];c7=Object.keys(c7).reduce((e,t)=>(Iae.forEach(n=>e[Fae(n,t)]=e[t]),e),c7);var Lae=/^(matrix|translate|scale|rotate|skew)/,Rae=/^(translate)/,zae=/^(rotate|skew)/,l7=(e,t)=>K6.num(e)&&e!==0?e+t:e,u7=(e,t)=>K6.arr(e)?e.every(e=>u7(e,t)):K6.num(e)?e===t:parseFloat(e)===t,Bae=class extends s5{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=>l7(e,`px`)).join(`,`)})`,u7(e,0)])),Y6(r,(e,t)=>{if(t===`transform`)i.push([e||``]),a.push(e=>[e,e===``]);else if(Lae.test(t)){if(delete r[t],K6.und(e))return;let n=Rae.test(t)?`px`:zae.test(t)?`deg`:``;i.push(X6(e)),a.push(t===`rotate3d`?([e,t,r,i])=>[`rotate3d(${e},${t},${r},${l7(i,n)})`,u7(i,0)]:e=>[`${t}(${e.map(e=>l7(e,n)).join(`,`)})`,u7(e,+!!t.startsWith(`scale`))])}}),i.length&&(r.transform=new Vae(i,a)),super(r)}},Vae=class extends I8{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 J6(this.inputs,(n,r)=>{let i=N8(n[0]),[a,o]=this.transforms[r](K6.arr(i)?i:n.map(N8));e+=` `+a,t&&=o}),t?`none`:e}observerAdded(e){e==1&&J6(this.inputs,e=>J6(e,e=>M8(e)&&L8(e,this)))}observerRemoved(e){e==0&&J6(this.inputs,e=>J6(e,e=>M8(e)&&R8(e,this)))}eventObserved(e){e.type==`change`&&(this._value=null),F8(this,e)}},Hae=`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(`.`);W6.assign({batchedUpdates:oc.unstable_batchedUpdates,createStringInterpolator:G8,colors:Nie});var d7=dae(Hae,{applyAnimatedValues:Pae,createAnimatedStyle:e=>new Bae(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}).animated;function Uae({points:e,stats:t,partCntPerPoint:n}){return{series:(0,L.useMemo)(()=>X.of(e).toSortedArray(([e])=>e).map(([t,n],r)=>({name:t,color:c6(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 f7=50,Wae=30,p7=10,Gae=2;function Kae({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-f7-Gae,l=s-p7-Wae,u=(0,L.useMemo)(()=>r?_F().domain([r.start,r.end]).range([0,c]):_F().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?_N().domain([t.y_low,t.y_high]).range([l,0]):_N().domain([0,d]).range([l,0]),[l,t,d])}}var qae=(0,L.memo)(function({xScale:e,yScale:t}){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(rj,{scale:e,top:t.range()[0]}),(0,R.jsx)(ij,{scale:t,left:e.range()[0],label:`Minutes`}),(0,R.jsx)(ej,{width:e.range()[1]-e.range()[0],height:t.range()[0]-t.range()[1],xScale:e,yScale:t})]})}),m7=(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)(ru,{size:`small`,onClick:()=>o(!0),children:(0,R.jsx)(OS,{fontSize:`inherit`})}),(0,R.jsxs)($m,{open:a,onClose:s,children:[(0,R.jsxs)(rh,{children:[(0,R.jsx)(`div`,{style:{marginBottom:`1em`},children:(0,R.jsx)(sx,{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)(sx,{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)(eh,{children:(0,R.jsx)(K,{onClick:s,children:`Close`})})]})]})}),Jae=(0,L.memo)(function({median:e,plannedMinutes:t,xScale:n,yScale:r}){let i=r7({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=r7({to:{y:t?r(t):r.range()[0]},from:{y:r.range()[0]}});return(0,R.jsxs)(`g`,{children:[e?(0,R.jsx)(d7.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)(d7.line,{stroke:`black`,x1:n.range()[0],x2:n.range()[1],y1:a.y,y2:a.y}):void 0]})}),Yae=(0,L.memo)(function({seriesName:e,points:t,color:n,xScale:r,yScale:i,showTooltip:a}){let o=(0,L.useCallback)(n=>{let r=NA(n);if(r===null)return;let i=n.currentTarget.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:n7(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)(d7.circle,{className:`bms-cycle-chart-pt`,fill:n,r:5,cx:e.x,cy:e.y,"data-idx":t,onClick:o},t))})}),Xae=(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)(Yae,{points:e.points,seriesName:e.name,color:e.color,xScale:t,yScale:n,showTooltip:r},e.name))})}),Zae=(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)(hx,{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))})}),Qae=V(`g`,{shouldForwardProp:e=>e.toString()[0]!==`$`})(({$noPtrEvents:e})=>e?{"& .bms-cycle-chart-pt":{pointerevents:`none`}}:void 0),$ae=(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=NA(e);t!==null&&(c(null),o({x:t.x-f7,y:t.y-p7,nowMS:Date.now()}),n(null))},[o,n]),u=(0,L.useCallback)(e=>{let t=NA(e);t!==null&&c({x:t.x-f7,y:t.y-p7})},[c]),d=(0,L.useCallback)(n=>{if(a!==null){if(Date.now()-a.nowMS>500){let o=NA(n);if(o!==null){let n=r.invert(a.x),s=r.invert(o.x-f7),c=i.invert(a.y),l=i.invert(o.y-p7);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]})}),eoe=(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)(m7,{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)(m7,{yZoom:n,setZoom:r})]}):void 0]})}),toe=(0,L.memo)(function({tooltip:e,extraTooltip:t,seriesLabel:n}){return e===null?null:(0,R.jsxs)(Zv,{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 noe(e){let{width:t,height:n,xScale:r,yScale:i}=Kae({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(${f7}, ${p7})`,children:[(0,R.jsx)(qae,{xScale:r,yScale:i}),(0,R.jsx)(Jae,{median:e.median,plannedMinutes:e.plannedTimeMinutes,xScale:r,yScale:i}),(0,R.jsx)($ae,{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)(Qae,{$noPtrEvents:e.highlightStart!==null,children:(0,R.jsx)(Xae,{series:e.series,disabledSeries:e.disabledSeries,xScale:r,yScale:i,showTooltip:e.showTooltip})})]})})}var h7=(0,L.memo)(function(e){let t=(0,L.useMemo)(()=>Z(null),[]),n=qE(t),[r,i]=(0,L.useState)(GT.empty()),[a,o]=(0,L.useState)(null),{series:s,median:c}=Uae({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)(KA,{sx:{height:{xs:`calc(100vh - 320px)`,md:`calc(100vh - 280px)`,xl:`calc(100vh - 220px)`}},tooltipAtom:t,TooltipContent:({tooltip:t})=>(0,R.jsx)(toe,{tooltip:t,seriesLabel:e.series_label,extraTooltip:e.extra_tooltip}),chart:({width:t,height:i})=>(0,R.jsx)(noe,{...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)(eoe,{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)(Zae,{series:s,disabledSeries:r,adjustDisabled:i})]})});function roe(e){return`operations`in e&&(e.operations===void 0||Array.isArray(e.operations))}var ioe=Z(!0),aoe=Z(!0),ooe=Z(void 0),soe=Z(void 0),coe=Z(void 0),loe=Z(`Any`),uoe=Z(void 0),doe=Z(void 0),foe=Z({}),poe=Z({}),moe=Z(null),hoe=Z(null);function g7({ty:e}){ZI(e===`labor`?`L/U Cycles`:`Machine Cycles`);let t=qE(DI),n=(0,L.useCallback)(function(e){if(!roe(e))return[];let n=[];if(e.operations)for(let r of e.operations)n.push({title:(r.mat.serial?r.mat.serial:`Material`)+` `+r.operation,value:`Open Card`,link:()=>t({type:`LogMat`,logMat:r.mat})});else if(`material`in e&&Array.isArray(e.material))for(let r of e.material)n.push({title:r.serial?r.serial:`Material`,value:`Open Card`,link:()=>t({type:`LogMat`,logMat:r})});return n},[t]),[r,i]=JE(e===`labor`?ioe:aoe),[a,o]=JE(e===`labor`?foe:poe),[s,c]=JE(e===`labor`?ooe:soe),[l,u]=JE(coe),[d,f]=JE(loe),[p,m]=JE(e===`labor`?uoe:doe),[h,g]=JE(e===`labor`?moe:hoe),_=Q(EO),v=Dk(_.basketName),y=Q(Nk),b=sA(d,e===`labor`?y:!0),x=Q(ak),S=[VC(ow(),-4),VC(ow(),1)],C=Q(Mk),w=Q(mL),T=(0,L.useMemo)(()=>{let t=ow();return l?fA(C.valuesToLazySeq(),{zoom:{start:VC(t,-4),end:VC(t,1)},partAndProc:s,pallet:p,operation:l,carrierKind:b}):e===`labor`&&r?pA(C.valuesToLazySeq(),{zoom:{start:VC(t,-4),end:VC(t,1)},partAndProc:s,pallet:p,carrierKind:b}):fA(C.valuesToLazySeq(),{zoom:{start:VC(t,-4),end:VC(t,1)},partAndProc:s,pallet:p,station:e===`labor`?uA:lA,carrierKind:b})},[C,e,s,p,l,r,b]),E=s?l??(T.allMachineOperations.length===1?T.allMachineOperations[0]:void 0):void 0,D=(0,L.useMemo)(()=>{if(E&&e===`machine`)return mA(T,!1)},[T,e,E]);return(0,R.jsxs)(G,{sx:{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,{sx:{flexGrow:1}}),(0,R.jsx)(Th,{size:`small`,children:(0,R.jsxs)(ov,{name:`Station-Cycles-chart-or-table-select`,autoWidth:!0,value:r?`graph`:`table`,onChange:e=>i(e.target.value===`graph`),children:[(0,R.jsx)(P_,{value:`graph`,children:`Graph`},`graph`),(0,R.jsx)(P_,{value:`table`,children:`Table`},`table`)]})}),(0,R.jsx)(Th,{size:`small`,children:(0,R.jsxs)(ov,{autoWidth:!0,displayEmpty:!0,value:s?T.allPartAndProcNames.findIndex(e=>s.part===e.part&&s.proc===e.proc):-1,style:{marginLeft:`1em`},onChange:e=>{c(e.target.value===-1?void 0:T.allPartAndProcNames[e.target.value]),u(void 0)},children:[(0,R.jsx)(P_,{value:-1,children:(0,R.jsx)(`em`,{children:`Any Part`})},0),T.allPartAndProcNames.map((e,t)=>(0,R.jsx)(P_,{value:t,children:(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(bU,{part:e.part,size:20}),(0,R.jsxs)(`span`,{style:{marginRight:`1em`},children:[e.part,`-`,e.proc]})]})},t))]})}),e===`machine`?(0,R.jsx)(Th,{size:`small`,children:(0,R.jsx)(ov,{name:`Station-Cycles-cycle-chart-station-select`,autoWidth:!0,displayEmpty:!0,value:E?T.allMachineOperations.findIndex(e=>E.compare(e)===0):-1,style:{marginLeft:`1em`},onChange:e=>u(T.allMachineOperations[e.target.value]),children:[...T.allMachineOperations.length===1?[]:[(0,R.jsx)(P_,{value:-1,children:(0,R.jsx)(`em`,{children:`Any Operation`})},-1)],...T.allMachineOperations.map((e,t)=>(0,R.jsxs)(P_,{value:t,children:[e.statGroup,` `,e.operation]},t))]})}):void 0,e===`labor`&&y?(0,R.jsx)(Th,{size:`small`,children:(0,R.jsxs)(ov,{autoWidth:!0,displayEmpty:!0,value:b,style:{marginLeft:`1em`},onChange:e=>{let t=e.target.value;f(t),t===`Basket`&&m(void 0)},children:[(0,R.jsx)(P_,{value:`Any`,children:(0,R.jsx)(`em`,{children:`Any Carrier`})}),(0,R.jsx)(P_,{value:`Pallet`,children:`Pallet`}),(0,R.jsx)(P_,{value:`Basket`,children:v})]})}):void 0,e!==`labor`||b!==`Basket`?(0,R.jsx)(Th,{size:`small`,children:(0,R.jsxs)(ov,{name:`Station-Cycles-cycle-chart-station-pallet`,autoWidth:!0,displayEmpty:!0,value:p||``,style:{marginLeft:`1em`},onChange:e=>m(e.target.value===``?void 0:e.target.value),children:[(0,R.jsx)(P_,{value:``,children:(0,R.jsx)(`em`,{children:`Any Pallet`})},0),T.allPalletNames.map(e=>(0,R.jsx)(P_,{value:e,children:(0,R.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,R.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}):void 0,(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(ru,{onClick:()=>vA(T,w.matsById,void 0,e===`labor`,_.loadStationNames,v),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,R.jsx)($x,{})})})]}),(0,R.jsx)(`main`,{children:r?(0,R.jsx)(h7,{points:T.data,series_label:T.seriesLabel,default_date_range:S,extra_tooltip:n,current_date_zoom:a.zoom,set_date_zoom_range:o,yZoom:h,setYZoom:g,stats:E&&e===`machine`?x.get(E):void 0,partCntPerPoint:E?X.of(T.data).head()?.[1]?.[0]?.material?.length:void 0,plannedTimeMinutes:D}):(0,R.jsx)(W3,{points:T.data,matsById:w.matsById,period:{type:`Last30`},current_date_zoom:void 0,set_date_zoom_range:void 0,showWorkorderAndInspect:!0,hideMedian:e===`labor`})})]})}var goe=X.ofRange(0,12,1).map(e=>new Date(2019,e,1)).chunk(3).toRArray(),_oe=(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)(ig,{type:`text`,value:(r||e.curMonth).toLocaleDateString(void 0,{month:`long`,year:`numeric`}),readOnly:!0,endAdornment:(0,R.jsx)(dg,{position:`end`,children:(0,R.jsx)(ru,{"aria-label":`Open month select`,"data-testid":`open-month-select`,onClick:()=>{i(aw(e.curMonth)),n(!0)},size:`large`,children:(0,R.jsx)(Ex,{})})})}),(0,R.jsx)($m,{open:t,onClose:()=>{n(!1),i(void 0)},children:(0,R.jsxs)(rh,{children:[(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(ru,{"data-testid":`select-month-dialog-previous-year`,onClick:()=>i(ZC(r||e.curMonth,-1)),size:`large`,children:(0,R.jsx)(rS,{})}),(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)(ru,{onClick:()=>i(ZC(r||e.curMonth,1)),size:`large`,children:(0,R.jsx)(iS,{})})]}),(0,R.jsx)(`div`,{"data-testid":`select-month-dialog-choose-month`,children:goe.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))})]})})]})}),_7=(0,L.memo)(function(){let e=Q(ER),[t,n]=JE(TR),r=PR(),i=NR();return(0,R.jsxs)(Zv,{component:`nav`,direction:`row`,spacing:3,sx:{paddingLeft:`24px`,paddingRight:`24px`,alignItems:`center`},children:[(0,R.jsx)(jh,{control:(0,R.jsx)(H_,{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)(jh,{control:(0,R.jsx)(H_,{checked:e.type===`SpecificMonth`,color:`secondary`,onChange:(e,r)=>r?n(t):null}),label:`Select Month`}),(0,R.jsx)(_oe,{curMonth:t,onSelectMonth:t=>{e.type===`SpecificMonth`?n(t):r(t)}})]})]})});function v7(e){return function(){return e}}var y7=Math.PI;y7/2,2*y7;var b7=Math.PI,x7=2*b7,S7=1e-6,voe=x7-S7;function C7(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function yoe(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return C7;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 w7=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?C7:yoe(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>S7)if(!(Math.abs(u*s-c*l)>S7)||!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((b7-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>S7&&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)>S7||Math.abs(this._y1-l)>S7)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%x7+x7),d>voe?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>S7&&this._append`A${n},${n},0,${+(d>=b7)},${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 boe(){return new w7}boe.prototype=w7.prototype;function xoe(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 w7(t)}Array.prototype.slice;function Soe(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function T7(e){this._context=e}T7.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 Coe(e){return new T7(e)}function woe(e){return e[0]}function Toe(e){return e[1]}function Eoe(e,t){var n=v7(!0),r=null,i=Coe,a=null,o=xoe(s);e=typeof e==`function`?e:e===void 0?woe:v7(e),t=typeof t==`function`?t:t===void 0?Toe:v7(t);function s(s){var c,l=(s=Soe(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:v7(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:v7(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:v7(!!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 E7(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 D7(e,t){this._context=e,this._k=(1-t)/6}D7.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:E7(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:E7(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 D7(e,t)}return n.tension=function(t){return e(+t)},n})(0);function Doe(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 O7(e,t){this._context=e,this._alpha=t}O7.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:Doe(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 Ooe=(function e(t){function n(e){return t?new O7(e,t):new D7(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function koe(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 k7=150;function Aoe(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 joe(e,t,n,r){let i=new Date(e.getTime()+n),a=new Date(t.getTime()-n),o=(a.getTime()-i.getTime())/(k7-1),s=[];for(let e=0;e<k7-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(k7-1,Math.floor((e.endTime.getTime()+n-i.getTime())/o));for(let i=t;i<=r;i++)Aoe(n,s[i],e)}return s}function Moe(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=>koe(e.buffer)).map(([n,r])=>({label:n,points:joe(e,t,a,r)})).toSortedArray(e=>e.label)}function A7(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 Noe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?A7(Object(n),!0).forEach(function(t){Poe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A7(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function j7(e){"@babel/helpers - typeof";return j7=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},j7(e)}function Poe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M7(){return M7=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},M7.apply(this,arguments)}function Foe(e,t){if(e){if(typeof e==`string`)return N7(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 N7(e,t)}}function N7(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 P7(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=Foe(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 Ioe(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 Loe(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 Roe(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=Ioe(r,o);n.push(s.left),r=s.right}return n.push(r),n}function zoe(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]),Roe(r,n).map(Loe)}var Boe=/[MLCSTQAHVZmlcstqahv]|-?[\d.e+-]+/g,F7={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(F7).forEach(function(e){F7[e.toLowerCase()]=F7[e]});function I7(e,t){for(var n=Array(e),r=0;r<e;r++)n[r]=t;return n}function Voe(e){return`${e.type}${F7[e.type].map(function(t){return e[t]}).join(`,`)}`}function Hoe(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 Uoe(e,t,n){var r=[];if(t.type===`L`||t.type===`Q`||t.type===`C`)r=r.concat(zoe(e,t,n));else{var i=M7({},e);i.type===`M`&&(i.type=`L`),r=r.concat(I7(n-1).map(function(){return i})),r.push(t)}return r}function L7(e,t,n){var r=e.length-1,i=t.length-1,a=r/i,o=I7(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=I7(n,M7({},e[e.length-1]));return i[0].type===`M`&&i.forEach(function(e){e.type=`L`}),t.concat(i)}return t.concat(Uoe(e[r],e[r+1],n))},[]);return o.unshift(e[0]),o}function R7(e){for(var t=(e||``).match(Boe)||[],n=[],r,i,a=0;a<t.length;++a)if(r=F7[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 Woe(e,t,n){var r=e==null?[]:e.slice(),i=t==null?[]:t.slice(),a=j7(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=L7(r,i,o):i.length<r.length&&(i=L7(i,r,o))),r=r.map(function(e,t){return Hoe(e,i[t])});var l=r.map(function(e){return Noe({},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=P7(F7[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 Goe(e,t,n){var r=R7(e),i=R7(t),a=j7(n)===`object`?n:{excludeSegment:n,snapEndsToInput:!0},o=a.excludeSegment,s=a.snapEndsToInput;if(!r.length&&!i.length)return function(){return``};var c=Woe(r,i,{excludeSegment:o,snapEndsToInput:s});return function(e){if(e===1&&s)return t??``;var n=c(e),r=``,i=P7(n),a;try{for(i.s();!(a=i.n()).done;){var o=a.value;r+=Voe(o)}}catch(e){i.e(e)}finally{i.f()}return r}}var Koe=(0,L.memo)(function({series:e,xScale:t,yScale:n,color:r}){let i=Eoe().curve(Ooe).x(e=>t(e.x)).y(e=>n(e.y))(e.points)??``,a=(0,L.useRef)(i),o=(0,L.useCallback)(Fs(e=>{a.current=e},50),[]),s=Goe(a.current,i);o(i);let{t:c}=r7({from:{t:0},to:{t:1},reset:!0,delay:0});return(0,R.jsx)(d7.path,{d:c.to(s),stroke:r,strokeWidth:2,strokeLinecap:`round`,fill:`transparent`})}),z7=60,qoe=50,B7=20,V7=20;function Joe({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)(()=>_F().range([0,e-z7-V7]).domain([i,a]),[e,i,a]),s=t-qoe-B7,c=(0,L.useMemo)(()=>_N().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(${z7},${B7})`,children:[(0,R.jsx)(rj,{scale:o,top:s}),(0,R.jsx)(ij,{scale:c,left:0,label:`Buffer Size`}),(0,R.jsx)(ej,{xScale:o,yScale:c,width:e-z7-V7,height:s}),n.map((e,t)=>r.has(e.label)?void 0:(0,R.jsx)(Koe,{series:e,xScale:o,yScale:c,color:c6(t,n.length)},e.label))]})})}var Yoe=(0,L.memo)(function(e){let t=Q(ER),n=t.type===`Last30`?[VC(ow(),-29),VC(ow(),1)]:[t.month,HC(t.month,1)],r=Q(t.type===`Last30`?qre:Jre),i=Q(bL),[a,o]=(0,L.useState)(GT.empty()),s=n[0],c=n[1],l=(0,L.useMemo)(()=>Moe(s,c,e.movingAverageDistanceInHours,i,r.valuesToLazySeq()),[s,c,r,e.movingAverageDistanceInHours,i]),{width:u,height:d,ref:f}=UA({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)(Joe,{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)(hx,{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:c6(t,l.length)}}),(0,R.jsx)(`div`,{style:{marginLeft:`1em`},children:e.label})]})},e.label))})]})}),Xoe=zv;function Zoe(){ZI(`Buffer Occupancy`);let[e,t]=(0,L.useState)(12);return(0,R.jsxs)(G,{sx:{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,{sx:{flexGrow:1}}),(0,R.jsx)(`span`,{style:{fontSize:`small`,marginRight:`1em`},children:`Moving Average Window: `}),(0,R.jsx)(Xoe,{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)(Yoe,{movingAverageDistanceInHours:e})})]})}function Qoe(e,t){return e.some(e=>e===t)}var $oe=20,H7=10,ese=2,U7=`#E8F5E9`,W7=`#1B5E20`;function tse({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(FA).maxBy(e=>e??0)??20,[r])+5,o=i-a-ese,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 kj().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+H7+$oe,a=kj().domain(X.of(t).toSortedArray(e=>e)).range([0,n]).align(0).padding(.05),o;if(e===`Station`)o=_N().domain([0,1]).range([U7,W7]);else{let e=X.of(r).maxBy(e=>e.color)?.color??1;o=_N().domain([0,e]).range([U7,W7])}return{yScale:a,height:i,colorScale:o}},[r,e]);return{height:d,width:i,xScale:l,yScale:u,colorScale:f,marginLeft:a}}var nse=(0,L.memo)(function({xScale:e,yScale:t}){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(rj,{scale:e,top:t.range()[1],tickFormat:e=>e.toLocaleDateString(void 0,{month:`short`,day:`numeric`})}),(0,R.jsx)(ij,{scale:t,left:e.range()[0]})]})}),rse=(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=NA(t);if(n===null)return;a.current!==null&&(clearTimeout(a.current),a.current=null);let r=t.currentTarget.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))})}),ise=(0,L.memo)(function({yType:e,seriesLabel:t,tooltip:n}){return n===null?null:(0,R.jsxs)(Zv,{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 ase(e){let{width:t,height:n,xScale:r,yScale:i,colorScale:a,marginLeft:o}=tse({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}, ${H7})`,children:[(0,R.jsx)(rse,{points:e.points,xScale:r,yScale:i,colorScale:a,setTooltip:e.setTooltip}),(0,R.jsx)(nse,{xScale:r,yScale:i,colorScale:a})]})})}function ose(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,{sx:{flexGrow:1}}),t?(0,R.jsx)(Th,{size:`small`,children:(0,R.jsx)(ov,{autoWidth:!0,displayEmpty:!0,value:e.cur_selected,onChange:n=>{Qoe(e.options,n.target.value)&&t(n.target.value)},children:e.options.map((e,t)=>(0,R.jsx)(P_,{value:e,children:e},t))})}):void 0,(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(ru,{onClick:e.onExport,style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,R.jsx)($x,{})})})]})}function G7(e){let t=(0,L.useMemo)(()=>Z(null),[]),n=qE(t),r=(0,L.useCallback)(()=>{n(null)},[n]);return(0,R.jsxs)(G,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,R.jsx)(ose,{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)(KA,{sx:{width:`100%`},tooltipAtom:t,autoHeight:!0,chart:({width:t})=>(0,R.jsx)(ase,{points:e.points,y_title:e.y_title,dateRange:e.dateRange,parentWidth:t,setTooltip:n}),TooltipContent:({tooltip:t})=>(0,R.jsx)(ise,{yType:e.y_title,seriesLabel:e.label_title,tooltip:t})})})]})}var K7=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 hT(this.day,this.part)}toString(){return`{day: ${this.day.toISOString()}}, part: ${this.part}}`}adjustDay(t){return new e(t(this.day),this.part)}},q7=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 hT(this.matId,this.proc)}toString(){return this.matId.toString()+`-`+this.proc.toString()}};function sse(e,t,n,r){let i=X.of(e).filter(e=>e.endTime>=n&&e.endTime<=r&&yk(e)&&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 q7(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:JC(r),part:t.partName+`-`+n,value:{count:1,activeMachineMins:i.get(new q7(e,parseInt(n)))??0}}))).toHashMap(e=>[new K7(e.day,e.part),e.value],(e,t)=>({count:e.count+t.count,activeMachineMins:e.activeMachineMins+t.activeMachineMins}))}function cse(e){return X.of(e).toHashMap(e=>[new K7(JC(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 J7=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 hT(this.x,this.y)}toString(){return`{x: ${new Date(this.x).toISOString()}, y: ${this.y}}`}};function lse(e){let t=X.of(e).toHashMap(e=>[new J7(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 J7(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 use(e){oA(lse(e))}function dse(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 fse=Z(`Standard OEE`);function pse(){ZI(`Station OEE`);let[e,t]=JE(fse),n=Q(ER),r=n.type===`Last30`?[VC(ow(),-29),VC(ow(),1)]:[n.month,HC(n.month,1)],i=Q(n.type===`Last30`?Mk:Fk),a=Q(n.type===`Last30`?EA:OA),o=(0,L.useMemo)(()=>{let t=Q3(a);return dse(e===`Standard OEE`?Y3(i.valuesToLazySeq()):e===`Occupied`?X3(i.valuesToLazySeq()):$3(a),t)},[e,i,a]);return(0,R.jsx)(G7,{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:()=>r6(`Station`,o)})}var mse=Z(`Completed`);function hse(e,t,n,r){let i=sse(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 gse(e){let t=cse(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 _se(){ZI(`Part Production`);let[e,t]=JE(mse),n=Q(ER),r=n.type===`Last30`?[VC(ow(),-29),VC(ow(),1)]:[n.month,HC(n.month,1)],i=Q(n.type===`Last30`?Mk:Fk),a=Q(n.type===`Last30`?tL:Ure),o=Q(n.type===`Last30`?mL:gL),s=(0,L.useMemo)(()=>{if(e===`Completed`){let e=ow(),t=n.type===`Last30`?VC(e,-30):n.month,r=n.type===`Last30`?VC(e,1):HC(n.month,1);return hse(i.valuesToLazySeq(),o.matsById,t,r)}else return gse(a)},[e,i,o,a,n]);return(0,R.jsx)(G7,{label:`Part Production Per Day`,y_title:`Part`,label_title:e,dateRange:r,cur_selected:e,options:[`Completed`,`Planned`],setSelected:t,points:s,onExport:()=>use(s)})}var Y7=new Intl.DateTimeFormat(void 0,{weekday:`short`,month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`});function vse(e){return`material`in e&&Array.isArray(e.material)}function yse(e){return`operations`in e&&(e.operations===void 0||Array.isArray(e.operations))}function X7({range:e}){let t=Q(ER);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():Y7.format(n)+` to `+Y7.format(r)}var bse=Z(!0),xse=AO(e=>e(JI)?{part:`aaa`,proc:2}:void 0),Sse=Z(lA),Cse=Z(void 0),wse=Z(void 0),Z7=Z(void 0),Q7=Z(XT.empty()),Tse=Z(e=>{let t=e(ER);return t.type===`Last30`?e(Z7):e(Q7).get(t.month)},(e,t,n)=>{let r=e(ER);r.type===`Last30`?t(Z7,n):t(Q7,e=>e.alter(r.month,()=>n))}),Ese=Z(null);function Dse(){ZI(`Machine Cycles`);let e=qE(DI),t=(0,L.useCallback)(function(t){if(!vse(t))return[];let n=[];for(let r of t.material)n.push({title:r.serial?r.serial:`Material`,value:`Open Card`,link:()=>e({type:`LogMat`,logMat:r})});return n},[e]),n=Q(ER),r=Q(n.type===`Last30`?ak:sk),i=Q(n.type===`Last30`?mL:gL),[a,o]=JE(bse),[s,c]=JE(xse),[l,u]=JE(Sse),[d,f]=JE(Cse),[p,m]=JE(wse),[h,g]=JE(Tse),[_,v]=JE(Ese),y=n.type===`Last30`?[VC(ow(),-29),VC(ow(),1)]:[n.month,HC(n.month,1)],b=Q(n.type===`Last30`?Mk:Fk),x=(0,L.useMemo)(()=>s?d?fA(b.valuesToLazySeq(),{partAndProc:s,pallet:p,operation:d}):fA(b.valuesToLazySeq(),{partAndProc:s,pallet:p,station:lA}):p||l!==`@@@_FMSInsight_FilterAnyMachineKey_@@@`?fA(b.valuesToLazySeq(),{pallet:p,station:l}):dA(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 mA(x,!1)},[x,S]);return(0,R.jsxs)(G,{sx:{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)(X7,{range:h??y})]}),(0,R.jsx)(G,{sx:{flexGrow:1}}),(0,R.jsx)(Th,{size:`small`,children:(0,R.jsxs)(ov,{autoWidth:!0,value:a?`graph`:`table`,onChange:e=>o(e.target.value===`graph`),children:[(0,R.jsx)(P_,{value:`graph`,children:`Graph`},`graph`),(0,R.jsx)(P_,{value:`table`,children:`Table`},`table`)]})}),(0,R.jsx)(Th,{size:`small`,children:(0,R.jsxs)(ov,{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)(P_,{value:-1,children:(0,R.jsx)(`em`,{children:`Any Part`})},0),x.allPartAndProcNames.map((e,t)=>(0,R.jsx)(P_,{value:t,children:(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(bU,{part:e.part,size:20}),(0,R.jsxs)(`span`,{style:{marginRight:`1em`},children:[e.part,`-`,e.proc]})]})},t))]})}),(0,R.jsx)(Th,{size:`small`,children:(0,R.jsx)(ov,{autoWidth:!0,displayEmpty:!0,value:s?S?x.allMachineOperations.findIndex(e=>S.compare(e)===0):-1:l,style:{marginLeft:`1em`},onChange:e=>{if(s){let t=typeof e.target.value==`number`?e.target.value:Number.parseInt(e.target.value,10);Number.isNaN(t)||f(t===-1?void 0:x.allMachineOperations[t])}else typeof e.target.value==`string`&&u(e.target.value)},children:s?[...x.allMachineOperations.length===1?[]:[(0,R.jsx)(P_,{value:-1,children:(0,R.jsx)(`em`,{children:`Any Operation`})},-1)],...x.allMachineOperations.map((e,t)=>(0,R.jsxs)(P_,{value:t,children:[e.statGroup,` `,e.operation]},t))]:[(0,R.jsx)(P_,{value:lA,children:(0,R.jsx)(`em`,{children:`Any Machine`})},-1),x.allMachineNames.map(e=>(0,R.jsx)(P_,{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)(Th,{size:`small`,children:(0,R.jsxs)(ov,{autoWidth:!0,displayEmpty:!0,value:p||``,style:{marginLeft:`1em`},onChange:e=>m(e.target.value===``?void 0:e.target.value),children:[(0,R.jsx)(P_,{value:``,children:(0,R.jsx)(`em`,{children:`Any Pallet`})},0),x.allPalletNames.map(e=>(0,R.jsx)(P_,{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)(ru,{onClick:()=>vA(x,i.matsById,h),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,R.jsx)($x,{})})}):void 0]}),(0,R.jsx)(`main`,{children:a?(0,R.jsx)(h7,{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)(W3,{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 Ose=Z(!0),kse=AO(e=>e(JI)?{part:`aaa`,proc:2}:void 0),Ase=AO(e=>e(JI)?`LoadOp`:`LULOccupancy`),jse=Z(uA),Mse=Z(`Any`),Nse=Z(void 0),$7=Z(void 0),e9=Z(XT.empty()),Pse=Z(e=>{let t=e(ER);return t.type===`Last30`?e($7):e(e9).get(t.month)},(e,t,n)=>{let r=e(ER);r.type===`Last30`?t($7,n):t(e9,e=>e.alter(r.month,()=>n))}),Fse=Z(null);function Ise(){ZI(`L/U Cycles`);let e=qE(DI),t=(0,L.useCallback)(function(t){if(!yse(t))return[];let n=[];if(t.operations)for(let r of t.operations)n.push({title:(r.mat.serial?r.mat.serial:`Material`)+` `+r.operation,value:`Open Card`,link:()=>e({type:`LogMat`,logMat:r.mat})});return n},[e]),n=Q(ER),[r,i]=JE(Ose),[a,o]=JE(kse),[s,c]=JE(Ase),[l,u]=JE(jse),[d,f]=JE(Mse),[p,m]=JE(Nse),[h,g]=JE(Pse),[_,v]=JE(Fse),y=Q(EO),b=Dk(y.basketName),x=Q(n.type===`Last30`?Nk:Ik),S=sA(d,x),C=(0,L.useMemo)(()=>a&&s===`LoadOp`?new rk(a.part,`L/U`,`LOAD-${a.proc}`):a&&s===`UnloadOp`?new rk(a.part,`L/U`,`UNLOAD-${a.proc}`):null,[a,s]),w=n.type===`Last30`?[VC(ow(),-29),VC(ow(),1)]:[n.month,HC(n.month,1)],T=Q(n.type===`Last30`?Mk:Fk),E=Q(n.type===`Last30`?mL:gL),D=Q(n.type===`Last30`?ak:sk),O=(0,L.useMemo)(()=>a||p||l!==`@@@_FMSInsigt_FilterAnyLoadKey_@@@`||S!==`Any`?C?fA(T.valuesToLazySeq(),{operation:C,pallet:p,station:l,carrierKind:S}):r?pA(T.valuesToLazySeq(),{partAndProc:a,pallet:p,station:l,carrierKind:S}):fA(T.valuesToLazySeq(),{partAndProc:a,pallet:p,station:l,carrierKind:S}):dA(T.valuesToLazySeq()),[a,p,C,l,T,r,S]),ee=(0,L.useMemo)(()=>{if(s===`LoadOp`||s===`UnloadOp`)return mA(O,!0)},[O,s]);return(0,R.jsxs)(G,{sx:{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)(X7,{range:h??w})]}),(0,R.jsx)(G,{sx:{flexGrow:1}}),(0,R.jsx)(Th,{size:`small`,children:(0,R.jsxs)(ov,{autoWidth:!0,value:r?`graph`:`table`,onChange:e=>i(e.target.value===`graph`),children:[(0,R.jsx)(P_,{value:`graph`,children:`Graph`},`graph`),(0,R.jsx)(P_,{value:`table`,children:`Table`},`table`)]})}),(0,R.jsx)(Th,{size:`small`,children:(0,R.jsxs)(ov,{autoWidth:!0,displayEmpty:!0,value:a?O.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:O.allPartAndProcNames[e.target.value])},children:[(0,R.jsx)(P_,{value:-1,children:(0,R.jsx)(`em`,{children:`Any Part`})},0),O.allPartAndProcNames.map((e,t)=>(0,R.jsx)(P_,{value:t,children:(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(bU,{part:e.part,size:20}),(0,R.jsxs)(`span`,{style:{marginRight:`1em`},children:[e.part,`-`,e.proc]})]})},t))]})}),(0,R.jsx)(Th,{size:`small`,children:(0,R.jsxs)(ov,{autoWidth:!0,displayEmpty:!0,value:s,style:{marginLeft:`1em`},onChange:e=>c(e.target.value),children:[(0,R.jsx)(P_,{value:`LULOccupancy`,children:`L/U Occupancy`}),a?(0,R.jsx)(P_,{value:`LoadOp`,children:`Load Operation (estimated)`}):void 0,a?(0,R.jsx)(P_,{value:`UnloadOp`,children:`Unload Operation (estimated)`}):void 0]})}),(0,R.jsx)(Th,{size:`small`,children:(0,R.jsxs)(ov,{autoWidth:!0,displayEmpty:!0,value:l,style:{marginLeft:`1em`},onChange:e=>{u(e.target.value)},children:[(0,R.jsx)(P_,{value:uA,children:(0,R.jsx)(`em`,{children:`Any Station`})},-1),O.allLoadStationNames.map(e=>(0,R.jsx)(P_,{value:e,children:(0,R.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,R.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),x?(0,R.jsx)(Th,{size:`small`,children:(0,R.jsxs)(ov,{autoWidth:!0,displayEmpty:!0,value:S,style:{marginLeft:`1em`},onChange:e=>{let t=e.target.value;f(t),t===`Basket`&&m(void 0)},children:[(0,R.jsx)(P_,{value:`Any`,children:(0,R.jsx)(`em`,{children:`Any Carrier`})}),(0,R.jsx)(P_,{value:`Pallet`,children:`Pallet`}),(0,R.jsx)(P_,{value:`Basket`,children:b})]})}):void 0,S===`Basket`?void 0:(0,R.jsx)(Th,{size:`small`,children:(0,R.jsxs)(ov,{autoWidth:!0,displayEmpty:!0,value:p||``,style:{marginLeft:`1em`},onChange:e=>m(e.target.value===``?void 0:e.target.value),children:[(0,R.jsx)(P_,{value:``,children:(0,R.jsx)(`em`,{children:`Any Pallet`})},0),O.allPalletNames.map(e=>(0,R.jsx)(P_,{value:e,children:(0,R.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,R.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),O.data.size>0?(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(ru,{onClick:()=>vA(O,E.matsById,h,s===`LULOccupancy`,y.loadStationNames,b),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,R.jsx)($x,{})})}):void 0]}),(0,R.jsx)(`main`,{children:r?(0,R.jsx)(h7,{points:O.data,series_label:O.seriesLabel,default_date_range:w,extra_tooltip:t,current_date_zoom:h,set_date_zoom_range:e=>g(e.zoom),yZoom:_,setYZoom:v,stats:C?D.get(C):void 0,plannedTimeMinutes:ee}):(0,R.jsx)(W3,{points:O.data,matsById:E.matsById,period:n,current_date_zoom:h,set_date_zoom_range:e=>g(e.zoom),showWorkorderAndInspect:!0,hideMedian:s===`LULOccupancy`,emptyMessage:a||p?`No Cycles`:`Select part, operation, or pallet to see cycles.`})})]})}var t9=AO(e=>e(JI)?3:void 0),n9=Z(void 0),Lse=Z(void 0),Rse=Z(null);function zse(e){return`mats`in e&&Array.isArray(e.mats)}var Bse=Z(e=>{let t=e(t9),n=e(n9);if(!t&&!n)return new Map;let r=e(e(ER).type===`Last30`?ML:PL);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}),Vse=Z(e=>{let t=e(e(ER).type===`Last30`?ML:PL);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 Hse(){ZI(`Pallet Cycles`);let[e,t]=JE(t9),[n,r]=JE(n9),[i,a]=JE(Lse),[o,s]=JE(Rse),c=Q(ER),l=c.type===`Last30`?[VC(ow(),-29),VC(ow(),1)]:[c.month,HC(c.month,1)],u=Q(c.type===`Last30`?ML:PL),d=Q(Bse),f=Q(Vse),p=qE(DI),m=(0,L.useCallback)(function(e){return zse(e)?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,{sx:{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,{sx:{flexGrow:1}}),(0,R.jsx)(Th,{size:`small`,children:(0,R.jsxs)(ov,{autoWidth:!0,displayEmpty:!0,value:e??-1,onChange:e=>t(e.target.value===-1?void 0:e.target.value),children:[(0,R.jsx)(P_,{value:-1,children:(0,R.jsx)(`em`,{children:`Any Pallet`})},0),u.keysToLazySeq().sortBy(e=>e).map(e=>(0,R.jsx)(P_,{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)(Th,{size:`small`,children:(0,R.jsxs)(ov,{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)(P_,{value:-1,children:(0,R.jsx)(`em`,{children:`Any Part`})},0),f.map((e,t)=>(0,R.jsx)(P_,{value:t,children:(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(bU,{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)(ru,{onClick:()=>bA(u),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,R.jsx)($x,{})})})]}),(0,R.jsx)(`main`,{children:(0,R.jsx)(h7,{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})})]})}var r9=Z(void 0),i9=Z(void 0),Use=Z(void 0);function Wse(e){return`mats`in e&&Array.isArray(e.mats)}var Gse=Z(null),Kse=Z(e=>{let t=e(r9),n=e(i9);if(!t&&!n)return new Map;let r=e(e(ER).type===`Last30`?LL:zL);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}),qse=Z(e=>{let t=e(e(ER).type===`Last30`?LL:zL);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 Jse(){let e=Dk(Q(EO).basketName);ZI(`${e} Cycles`);let[t,n]=JE(r9),[r,i]=JE(i9),[a,o]=JE(Use),[s,c]=JE(Gse),l=Q(ER),u=l.type===`Last30`?[VC(ow(),-29),VC(ow(),1)]:[l.month,HC(l.month,1)],d=Q(l.type===`Last30`?LL:zL),f=Q(Kse),p=Q(qse),m=qE(DI),h=(0,L.useCallback)(function(e){return Wse(e)?e.mats.map(e=>({title:e.part+`-`+e.proc,value:e.serial??``,link:e.serial?()=>m({type:`LogMat`,logMat:e}):void 0})):[]},[m]);return(0,R.jsxs)(G,{sx:{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,` Cycles`]}),(0,R.jsx)(G,{sx:{flexGrow:1}}),(0,R.jsx)(Th,{size:`small`,children:(0,R.jsxs)(ov,{autoWidth:!0,displayEmpty:!0,value:t??-1,onChange:e=>n(e.target.value===-1?void 0:e.target.value),children:[(0,R.jsx)(P_,{value:-1,children:(0,R.jsxs)(`em`,{children:[`Any `,e]})},0),d.keysToLazySeq().sortBy(e=>e).map(e=>(0,R.jsx)(P_,{value:e,children:(0,R.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,R.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),p.length>0?(0,R.jsx)(Th,{size:`small`,children:(0,R.jsxs)(ov,{autoWidth:!0,displayEmpty:!0,value:r?p.findIndex(e=>r.part===e.part&&r.proc===e.proc):-1,style:{marginLeft:`1em`},onChange:e=>{i(e.target.value===-1?void 0:p[e.target.value])},children:[(0,R.jsx)(P_,{value:-1,children:(0,R.jsx)(`em`,{children:`Any Part`})},0),p.map((e,t)=>(0,R.jsx)(P_,{value:t,children:(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(bU,{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)(ru,{onClick:()=>bA(d,e),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,R.jsx)($x,{})})})]}),(0,R.jsx)(`main`,{children:(0,R.jsx)(h7,{points:f,series_label:e,default_date_range:u,current_date_zoom:a,set_date_zoom_range:e=>o(e.zoom),yZoom:s,setYZoom:c,extra_tooltip:h})})]})}function a9(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 o9(e,t,n,r){return a9(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 Yse(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 s9=Intl.NumberFormat(void 0,{maximumFractionDigits:1}),c9=(0,L.createContext)({start:new Date,end:new Date});function Xse({tooltip:e}){return(0,R.jsxs)(Zv,{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: `,s9.format(e.r.useAtReplacement)]}),e.r.cntAtReplacement===null?void 0:(0,R.jsxs)(`div`,{children:[`Count at replacement: `,s9.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: `,s9.format(e.r.totalUseAtBeginningOfCycle)]}),e.r.totalUseAtEndOfCycle===null?void 0:(0,R.jsxs)(`div`,{children:[`Minutes at end of cycle: `,s9.format(e.r.totalUseAtEndOfCycle)]}),e.r.totalCntAtBeginningOfCycle===null?void 0:(0,R.jsxs)(`div`,{children:[`Count at beginning of cycle: `,s9.format(e.r.totalCntAtBeginningOfCycle)]}),e.r.totalCntAtEndOfCycle===null?void 0:(0,R.jsxs)(`div`,{children:[`Count at end of cycle: `,s9.format(e.r.totalCntAtEndOfCycle)]})]})]})}function Zse({row:e,tooltip:t,timeScale:n,yScale:r}){let[i,a]=JE(t);return(0,R.jsx)(`g`,{children:e.replacements.map((t,o)=>(0,R.jsx)(`circle`,{cx:n(t.time),cy:r(Yse(e,t)),r:t===i?.r?4:2,onMouseEnter:e=>a({top:0,left:NA(e)?.x??0,r:t}),fill:`black`},o))})}var l9=[{id:0,numeric:!1,label:`Tool`,getDisplay:e=>e.tool},{id:1,numeric:!0,label:`Num Replacements`,getDisplay:e=>e.numReplacements.toString(),getForSort:e=>e.numReplacements},{id:2,numeric:!0,label:`Avg Use (min) at Replacement`,getDisplay:e=>s9.format(e.totalUseOfAllReplacements/e.numReplacements),getForSort:e=>e.totalUseOfAllReplacements/e.numReplacements},{id:3,numeric:!0,label:`Avg Use (count) at Replacement`,getDisplay:e=>s9.format(e.totalCntOfAllReplacements/e.numReplacements),getForSort:e=>e.totalCntOfAllReplacements/e.numReplacements},{id:4,numeric:!1,ignoreDuringExport:!0,label:`All Replacements`,getDisplay:()=>``,expanded:!0,Cell:(0,L.memo)(function({row:e}){let t=(0,L.useContext)(c9),n=(0,L.useMemo)(()=>Z(null),[]),r=qE(n),{ref:i,width:a}=UA({refreshMode:`debounce`,refreshRate:100,handleHeight:!1}),o=_F().domain([t.start,t.end]).range([0,a??1e3]),s=_N().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)(Zse,{row:e,tooltip:n,timeScale:o,yScale:s})]}),(0,R.jsx)(GA,{atom:n,TooltipContent:Xse,chartHeight:35,chartWidth:a??1e3})]})})}],Qse=(0,L.memo)(function(e){let t=Q(ER),n=O1(),r=D1(t),i=k1(0,l9),a=Q(t.type===`Last30`?UL:GL),o=(0,L.useMemo)(()=>o9(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(ow(),-29),end:VC(ow(),1)}:{start:t.month,end:HC(t.month,1)});return(0,R.jsx)(`div`,{children:(0,R.jsxs)(c9.Provider,{value:c,children:[(0,R.jsxs)(Yy,{children:[(0,R.jsx)(b1,{columns:l9,sort:i,showDetailsCol:!1}),(0,R.jsx)(E1,{columns:l9,pageData:s,rowsPerPage:n.rowsPerPage})]}),(0,R.jsx)(T1,{tpage:n,zoom:r.zoom,count:o.length})]})})}),u9=[{id:0,numeric:!1,label:`Date`,getDisplay:e=>e.time.toLocaleString(),getForSort:e=>e.time.getTime(),getForExport:e=>e.time.toISOString()},{id:1,numeric:!1,label:`Machine`,getDisplay:e=>e.station.group+` #`+e.station.num.toString(),getForSort:e=>e.station},{id:2,numeric:!1,label:`Tool`,getDisplay:e=>e.tool},{id:3,numeric:!0,label:`Pocket`,getDisplay:e=>e.pocket===-1?``:e.pocket.toString(),getForSort:e=>e.pocket},{id:4,numeric:!1,label:`Type`,getDisplay:e=>e.type===`ReplaceBeforeCycleStart`?`Between Cycles`:`During Cycle`},{id:5,numeric:!0,label:`Use At Replacement / Start of Cycle (min)`,getDisplay:e=>{let t=e.type===`ReplaceBeforeCycleStart`?e.useAtReplacement:e.totalUseAtBeginningOfCycle;return t==null?``:s9.format(t)},getForSort:e=>e.type===`ReplaceBeforeCycleStart`?e.useAtReplacement:e.totalUseAtBeginningOfCycle},{id:6,numeric:!0,label:`Use At End of Cycle (min)`,getDisplay:e=>{if(e.type===`ReplaceBeforeCycleStart`)return``;let t=e.totalUseAtEndOfCycle;return t==null?``:s9.format(t)},getForSort:e=>e.type===`ReplaceBeforeCycleStart`?0:e.totalUseAtEndOfCycle},{id:7,numeric:!0,label:`Use At Replacement / Start of Cycle (count)`,getDisplay:e=>{let t=e.type===`ReplaceBeforeCycleStart`?e.cntAtReplacement:e.totalCntAtBeginningOfCycle;return t==null?``:s9.format(t)},getForSort:e=>e.type===`ReplaceBeforeCycleStart`?e.cntAtReplacement:e.totalCntAtBeginningOfCycle},{id:8,numeric:!0,label:`Use At End of Cycle (count)`,getDisplay:e=>{if(e.type===`ReplaceBeforeCycleStart`)return``;let t=e.totalCntAtEndOfCycle;return t==null?``:s9.format(t)},getForSort:e=>e.type===`ReplaceBeforeCycleStart`?0:e.totalCntAtEndOfCycle}],$se=(0,L.memo)(function(e){let t=Q(ER),n=O1(),r=D1(t),i=k1(0,u9),a=Q(t.type===`Last30`?UL:GL),o=(0,L.useMemo)(()=>a9(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)(Yy,{children:[(0,R.jsx)(b1,{columns:u9,sort:i,showDetailsCol:!1}),(0,R.jsx)(E1,{columns:u9,pageData:s})]}),(0,R.jsx)(T1,{tpage:n,zoom:r.zoom,count:o.length})]})});function ece(e,t){t===`summary`?j1(l9,o9(void 0,e,void 0,e=>e.tool)):j1(u9,a9(void 0,e,void 0).toSortedArray(e=>e.tool,e=>e.time))}var tce=(0,L.memo)(function(e){let t=Q(Q(ER).type===`Last30`?UL:GL),n=Array.from(t.keys());return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Th,{size:`small`,children:(0,R.jsxs)(ov,{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)(P_,{value:-1,children:(0,R.jsx)(`em`,{children:`Any Machine`})}),n.map((e,t)=>(0,R.jsx)(P_,{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)(ru,{onClick:()=>ece(t,e.displayType),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,R.jsx)($x,{})})})]})}),nce=Z(null),rce=Z(`summary`),ice=(0,L.memo)(function(){ZI(`Tool Replacements`);let[e,t]=JE(nce),[n,r]=JE(rce);return(0,R.jsxs)(G,{sx:{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,{sx:{flexGrow:1}}),(0,R.jsx)(Th,{size:`small`,children:(0,R.jsxs)(ov,{autoWidth:!0,value:n,style:{marginLeft:`1em`},onChange:e=>r(e.target.value),children:[(0,R.jsx)(P_,{value:`summary`,children:`Summary`}),(0,R.jsx)(P_,{value:`details`,children:`Details`})]})}),(0,R.jsx)(tce,{station:e,setSelectedStation:t,displayType:n})]}),(0,R.jsx)(`main`,{children:n===`summary`?(0,R.jsx)(Qse,{station:e}):(0,R.jsx)($se,{station:e})})]})}),d9=Z(null),ace=150,f9=40,p9=10,m9=20,h9=10,g9=80;function _9(e){return`${e.workorderId}-${e.part}`}function v9(e){return e?new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()):null}function oce(e){let t=e.map(_9),n=X.of(e).flatMap(e=>{let t=v9(e.simulatedFilled);return[v9(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($C(i,r)*50,30),o=Math.max(t.length*g9,g9);return{xScale:_F().domain([r,i]).range([0,a]),yScale:kj().domain(t).range([0,o])}}function sce({tooltip:e}){return(0,R.jsxs)(Zv,{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: `,v9(e.data.simulatedStart)?.toLocaleDateString()]}),(0,R.jsxs)(`div`,{children:[`Projected Filled: `,v9(e.data.simulatedFilled)?.toLocaleDateString()]})]})}function cce({workorders:e}){return(0,R.jsx)(`div`,{children:e.map(e=>(0,R.jsxs)(Zv,{direction:`column`,sx:{height:g9,alignItems:`flex-end`,paddingRight:`10px`,justifyContent:`center`},children:[(0,R.jsx)(G,{children:e.workorderId}),(0,R.jsxs)(G,{sx:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(bU,{part:e.part,size:18}),(0,R.jsx)(G,{sx:{ml:`3px`},children:e.part})]})]},_9(e)))})}function lce({xScale:e,yScale:t}){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(aj,{scale:e,top:0}),(0,R.jsx)($A,{scale:e,height:t.range()[1]-t.range()[0]})]})}function uce({workorders:e,xScale:t,yScale:n}){let r=qE(d9),i=(0,L.useRef)(null);function a(e){return t=>{let n=NA(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=_9(e);return(0,R.jsx)(`g`,{onMouseOver:a(e),onMouseLeave:o,children:e.simulatedStart&&e.simulatedFilled?(0,R.jsx)(`rect`,{x:t(v9(e.simulatedStart)),y:(n(r)??0)+20,width:t(VC(v9(e.simulatedFilled),1))-t(v9(e.simulatedStart)),height:g9-40,fill:C[600]}):void 0},r)})})}function dce(){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}=oce(t);return(0,R.jsxs)(G,{sx:{display:`flex`},children:[(0,R.jsx)(G,{sx:{height:r.range()[1]+f9+p9,width:ace,paddingTop:`${f9}px`},children:(0,R.jsx)(cce,{workorders:t})}),(0,R.jsxs)(G,{sx:{flexGrow:1,width:0,position:`relative`},children:[(0,R.jsx)(`div`,{style:{overflowX:`visible`},children:(0,R.jsx)(`svg`,{height:r.range()[1]+f9+p9,width:n.range()[1]+h9+m9,children:(0,R.jsxs)(`g`,{transform:`translate(${m9}, ${f9})`,children:[(0,R.jsx)(lce,{yScale:r,xScale:n}),(0,R.jsx)(uce,{workorders:t,xScale:n,yScale:r})]})})}),(0,R.jsx)(GA,{atom:d9,TooltipContent:sce,chartHeight:r.range()[1]+f9+p9,chartWidth:n.range()[1]+h9+m9})]})]})}var y9=Z(e=>{let t=e(YI);return t.route===$.Operations_CurrentWorkorders?t.workorder??null:null},(e,t,n)=>{e(YI).route===$.Operations_CurrentWorkorders&&(n===``&&(n=null),t(YI,{route:$.Operations_CurrentWorkorders,workorder:n??void 0}))}),fce=PO(`recentSearchedWorkorders`,[]),pce=Z(async(e,{signal:t})=>{let n=e(y9);return n===null?null:await jC.getActiveWorkorder(n,t)??[]}),mce=V(Ab)({"& > *":{borderBottom:`unset !important`}}),b9=new Intl.NumberFormat(void 0,{maximumFractionDigits:1}),hce=(0,L.memo)(function({workorder:e}){let t=qE(DI),n=qE(T9),r=X.ofObject(e.activeStationTime??{}).concat(X.ofObject(e.elapsedStationTime??{})).map(([e])=>e).distinctAndSortBy(e=>e);function i(n){t({type:`MatSummary`,summary:{materialID:n.materialID,partName:e.part,serial:n.serial,workorderId:e.workorderId}})}return(0,R.jsxs)(Zv,{direction:`row`,sx:{flexWrap:`wrap`,justifyContent:`space-around`,ml:`1em`,mr:`1em`},children:[(0,R.jsx)(`div`,{children:(0,R.jsxs)(Yy,{size:`small`,stickyHeader:!0,children:[(0,R.jsx)(vb,{children:(0,R.jsxs)(Ab,{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)(nb,{children:(e.material??[]).map(e=>(0,R.jsxs)(Ab,{children:[(0,R.jsx)(J,{children:e.serial??``}),(0,R.jsx)(J,{sx:{textAlign:`center`},padding:`checkbox`,children:e.quarantined?(0,R.jsx)(gS,{fontSize:`inherit`}):``}),(0,R.jsx)(J,{sx:{textAlign:`center`},padding:`checkbox`,children:e.inspectionFailed?(0,R.jsx)(Ux,{fontSize:`inherit`}):``}),(0,R.jsx)(J,{sx:{textAlign:`center`},padding:`checkbox`,children:e.closeout===yC.None?``:e.closeout===yC.ClosedOut?(0,R.jsx)(Ax,{fontSize:`inherit`}):(0,R.jsx)(Ux,{fontSize:`inherit`})}),(0,R.jsx)(J,{padding:`checkbox`,children:(0,R.jsx)(ru,{onClick:()=>i(e),size:`large`,children:(0,R.jsx)(lS,{fontSize:`inherit`})})})]},e.materialID))})]})}),(0,R.jsx)(`div`,{children:(0,R.jsxs)(Yy,{size:`small`,children:[(0,R.jsx)(vb,{children:(0,R.jsxs)(Ab,{children:[(0,R.jsx)(J,{children:`Station`}),(0,R.jsx)(J,{children:`Active Minutes`}),(0,R.jsx)(J,{children:`Elapsed Minutes`})]})}),(0,R.jsx)(nb,{children:r.map(t=>(0,R.jsxs)(Ab,{children:[(0,R.jsx)(J,{children:t}),(0,R.jsx)(J,{children:b9.format(nk(e.activeStationTime?.[t]??0))}),(0,R.jsx)(J,{children:b9.format(nk(e.elapsedStationTime?.[t]??0))})]},t))})]})}),(0,R.jsxs)(`div`,{children:[(0,R.jsxs)(Yy,{size:`small`,children:[(0,R.jsx)(vb,{children:(0,R.jsxs)(Ab,{children:[(0,R.jsx)(J,{children:`Time`}),(0,R.jsx)(J,{children:`Comment`})]})}),(0,R.jsx)(nb,{children:(e.comments??[]).map((e,t)=>(0,R.jsxs)(Ab,{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 x9(e){return e?new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())).toLocaleDateString():``}function S9(e){return e.closeout===yC.ClosedOut?!1:e.quarantined||e.inspectionFailed||e.closeout===yC.CloseOutFailed}function gce({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)(mce,{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)(bU,{part:e.part,size:25})}),(0,R.jsx)(`div`,{children:(0,R.jsx)(W,{variant:`body2`,component:`span`,sx:{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(S9).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:x9(e.simulatedStart)}),(0,R.jsx)(J,{align:`right`,children:x9(e.simulatedFilled)})]}):void 0,(0,R.jsx)(J,{children:(0,R.jsx)(q,{title:`Show Details`,children:(0,R.jsx)(ru,{size:`small`,onClick:()=>r(!n),children:n?(0,R.jsx)(aS,{}):(0,R.jsx)(nS,{})})})})]}),(0,R.jsx)(Ab,{children:(0,R.jsx)(J,{sx:{pb:`0`,pt:`0`},colSpan:i,children:(0,R.jsx)(Gc,{in:n,timeout:`auto`,unmountOnExit:!0,children:(0,R.jsx)(hce,{workorder:e})})})})]})}function _ce(e,t,n){let r;switch(t){case 0:r=e=>e.workorderId;break;case 1:r=e=>e.part;break;case 2:r=e=>e.plannedQuantity;break;case 3:r=e=>e.dueDate.getTime();break;case 4:r=e=>e.priority;break;case 5:r=e=>e.completedQuantity;break;case 7:r=e=>e.material?.filter(S9).length??0;break;case 6:r=e=>e.material?.length??0;break;case 8:r=e=>e.simulatedStart?.getTime()??null;break;case 9:r=e=>e.simulatedFilled?.getTime()??null;break}return X.of(e).toSortedArray(n===`asc`?{asc:r}:{desc:r})}function vce({sortBy:e,order:t,showSim:n}){let r=Q(GO),i=Q(pce),a=(0,L.useMemo)(()=>_ce(i??r.workorders??[],e,t),[r.workorders,e,t,i]);return i&&i.length===0?(0,R.jsx)(Ab,{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)(gce,{workorder:e,showSim:n},`${e.workorderId}-${e.part}`))})}function yce(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>${x9(r.simulatedStart)}</td>`,n+=`<td>${x9(r.simulatedFilled)}</td>`),n+=`<td>${(r.material??[]).map(e=>e.serial??``).join(`;`)}</td>`,n+=`<td>${X.ofObject(r.activeStationTime??{}).map(([e,t])=>`${e}: ${nk(t)}`).toRArray().join(`;`)}</td>`,n+=`<td>${X.ofObject(r.elapsedStationTime??{}).map(([e,t])=>`${e}: ${nk(t)}`).toRArray().join(`;`)}</td>`,n+=`</tr>
351
+ `;n+=`</tbody></table>
352
+ `,oA(n)}function C9(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)(Lb,{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 w9=Z(`table`),bce=(0,L.memo)(function({showSim:e}){let[t,n]=JE(w9);return(0,R.jsxs)(Zv,{direction:`row`,spacing:2,sx:{justifyContent:`flex-end`,alignItems:`center`},children:[e?(0,R.jsxs)(Zv,{direction:`row`,spacing:2,sx:{alignItems:`center`,flexGrow:1},children:[(0,R.jsx)(DS,{fontSize:`small`}),(0,R.jsx)(W,{variant:`caption`,children:`Projected dates are estimates`})]}):void 0,(0,R.jsx)(Th,{size:`small`,children:(0,R.jsxs)(ov,{variant:`outlined`,value:t,onChange:e=>n(e.target.value),children:[(0,R.jsx)(P_,{value:`table`,children:`Table`}),(0,R.jsx)(P_,{value:`gantt`,children:`Gantt`})]})})]})}),xce=Gt`
353
+ 0% {
354
+ transform: rotate(0deg);
355
+ }
356
+ 100% {
357
+ transform: rotate(360deg);
358
+ }
359
+ `,Sce=V(sS)(()=>({animation:`${xce} 1.5s linear infinite`}));function Cce(){let[e,t]=(0,L.useState)(!1),[n,r]=(0,L.useTransition)(),[i,a]=JE(y9),[o,s]=(0,L.useState)(null),[c,l]=JE(fce);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)(ru,{size:`small`,onClick:()=>a(null),children:(0,R.jsx)(Sce,{fontSize:`inherit`})})}):i?(0,R.jsx)(q,{title:`Clear Search`,children:(0,R.jsx)(ru,{size:`small`,onClick:()=>a(null),children:(0,R.jsx)(Nx,{fontSize:`inherit`})})}):(0,R.jsx)(q,{title:`Search`,children:(0,R.jsx)(ru,{size:`small`,onClick:e=>{t(!0),e.currentTarget.blur()},children:(0,R.jsx)(_S,{fontSize:`inherit`})})}),(0,R.jsxs)($m,{open:e,onClose:()=>t(!1),children:[(0,R.jsx)(oh,{children:`Search Workorder`}),(0,R.jsxs)(rh,{children:[(0,R.jsx)(sx,{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)(Vg,{dense:!0,sx:{mt:`1em`},subheader:(0,R.jsx)(zf,{children:`Previous Searches`}),children:c.map(e=>(0,R.jsx)(e_,{onClick:()=>u(e),children:(0,R.jsx)(Jg,{children:(0,R.jsx)(i_,{primary:e})})},e))})}):void 0]}),(0,R.jsxs)(eh,{children:[(0,R.jsx)(K,{color:`primary`,onClick:()=>u(o),children:`Search`}),(0,R.jsx)(K,{color:`secondary`,onClick:()=>t(!1),children:`Cancel`})]})]})]})}var wce=(0,L.memo)(function(e){let t={sortBy:e.sortBy,setSortBy:e.setSortBy,order:e.order,setOrder:e.setOrder};return(0,R.jsx)(vb,{children:(0,R.jsxs)(Ab,{children:[(0,R.jsx)(C9,{align:`left`,col:0,...t,extraIcon:e.disableSearch?void 0:(0,R.jsx)(Cce,{}),children:`Workorder`}),(0,R.jsx)(C9,{align:`left`,col:1,...t,children:`Part`}),(0,R.jsx)(C9,{align:`left`,col:3,...t,children:`Due Date`}),(0,R.jsx)(C9,{align:`right`,col:4,...t,children:`Priority`}),(0,R.jsx)(C9,{align:`right`,col:2,...t,children:`Planned Quantity`}),(0,R.jsx)(C9,{align:`right`,col:6,...t,children:`Started Quantity`}),(0,R.jsx)(C9,{align:`right`,col:7,...t,children:`Abnormal Quantity`}),(0,R.jsx)(C9,{align:`right`,col:5,...t,children:`Completed Quantity`}),e.showSim?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(C9,{align:`right`,col:8,...t,children:`Projected Start`}),(0,R.jsx)(C9,{align:`right`,col:9,...t,children:`Projected Filled`})]}):void 0,(0,R.jsx)(J,{children:(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(ru,{style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,onClick:()=>yce(e.workorders,e.showSim),children:(0,R.jsx)($x,{})})})})]})})}),T9=Z(null);function Tce(){let[e,t]=JE(T9),[n,r]=(0,L.useState)(null),i=qE(JO);function a(){t(null),r(null)}function o(){e&&n&&n!==``&&i({workorder:e.workorderId,comment:n}),a()}return(0,R.jsx)($m,{open:e!==null,onClose:a,children:e===null?void 0:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(oh,{children:(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,R.jsx)(`div`,{children:(0,R.jsx)(bU,{part:e.part,size:40})}),(0,R.jsxs)(`div`,{style:{marginLeft:`1em`,flexGrow:1},children:[`Add Comment For `,e.workorderId]})]})}),(0,R.jsx)(rh,{children:(0,R.jsx)(sx,{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)(eh,{children:[(0,R.jsx)(K,{color:`primary`,onClick:o,children:`Save Comment`}),(0,R.jsx)(K,{color:`primary`,onClick:a,children:`Cancel`})]})]})})}function Ece(){let[e,t]=JE(y9);return(0,R.jsx)(Ab,{children:(0,R.jsx)(J,{colSpan:10,children:(0,R.jsxs)(Zv,{direction:`column`,sx:{mt:`3em`,flex:`flex`,alignItems:`center`,width:`100%`},children:[(0,R.jsxs)(Zv,{direction:`row`,spacing:`3`,children:[(0,R.jsx)(Zl,{}),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 Dce({showSim:e,disableSearch:t}){let[n,r]=(0,L.useState)(0),[i,a]=(0,L.useState)(`asc`);return(0,R.jsxs)(Yy,{stickyHeader:!0,children:[(0,R.jsx)(wce,{workorders:Q(GO)?.workorders??[],sortBy:n,setSortBy:r,showSim:e,order:i,setOrder:a,disableSearch:t}),(0,R.jsx)(nb,{children:(0,R.jsx)(L.Suspense,{fallback:(0,R.jsx)(Ece,{}),children:(0,R.jsx)(vce,{sortBy:n,order:i,showSim:e})})})]})}function Oce(){let e=qE(u0),t=Q(AI),[n,r]=BI(),i=qE(DI);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 kce=(0,L.memo)(function(){return(0,R.jsx)(JU,{buttons:(0,R.jsx)(Oce,{})})}),E9=(0,L.memo)(function({disableSearch:e}){ZI(`Workorders`);let t=Q(GO),n=Q(w9),r=(0,L.useMemo)(()=>t.workorders?.some(e=>!!e.simulatedStart||!!e.simulatedFilled)??!1,[t.workorders]);return(0,R.jsxs)(G,{component:`main`,sx:{padding:`24px`},children:[r?(0,R.jsx)(bce,{showSim:r}):void 0,n===`table`?(0,R.jsx)(Dce,{showSim:r,disableSearch:e}):(0,R.jsx)(dce,{}),(0,R.jsx)(Tce,{}),(0,R.jsx)(kce,{}),(0,R.jsx)(h0,{})]})}),Ace=C[50],jce=C[600],Mce=E[100],D9=`3em`,Nce=`calc(${D9} * 7)`,Pce=Z(e=>{let t=e(ZL);return t===null?null:X.of(t.usage).toLookupOrderedMap(e=>e.machineGroup,e=>new Date(e.day.getUTCFullYear(),e.day.getUTCMonth(),e.day.getUTCDate()))}),Fce=Z(e=>{let t=e(ZL);return t===null?JT.empty():JT.build(t.usage,e=>e.machineGroup)}),Ice=Z(e=>{let t=e(ZL);return t===null?JT.empty():JT.build(t.usage,e=>new Date(e.day.getUTCFullYear(),e.day.getUTCMonth(),1))}),Lce=Z(e=>{let t=e(ZL);return t===null?0:X.of(t.usage).map(e=>Math.ceil(e.usage)).maxBy(e=>e)??1}),Rce=Z(e=>{let t=e(ZL);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 zce({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,{sx:{width:Nce},children:[(0,R.jsx)(W,{variant:`h6`,sx:{textAlign:`center`},children:e.toLocaleString(`default`,{month:`long`,year:`numeric`})}),(0,R.jsxs)(G,{sx:{display:`flex`,flexWrap:`wrap`},children:[X.ofRange(0,r).map((e,t)=>(0,R.jsx)(G,{sx:{height:D9,width:D9}},t)),X.ofRange(1,i+1).map((r,i)=>(0,R.jsx)(`div`,{style:{width:D9,height:D9,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,{sx:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100%`},children:r})})},i))]})]})}function Bce(){return(0,R.jsxs)(Zv,{direction:`row`,spacing:2,sx:{alignItems:`center`},children:[(0,R.jsx)(DS,{fontSize:`small`}),(0,R.jsx)(W,{variant:`caption`,children:`Projected dates are estimates`})]})}function Vce({group:e,month:t}){let n=Q(Pce),[r,i]=Q(Rce),a=Q(Lce),o=(0,L.useMemo)(()=>{let t=_N().domain([0,a]).range([Ace,jce]);return a=>{if(i&&a>i||r&&a<r)return`white`;let o=n?.get(e)?.get(a);return o?t(o.usage):Mce}},[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)(zce,{date:t,dayColor:o,tooltip:s})}function Hce(){ZI(`Projected Machine Usage`);let e=Q(Fce),t=Q(Ice);return(0,R.jsx)(G,{component:`main`,sx:{padding:`24px`},children:(0,R.jsxs)(Zv,{direction:`column`,spacing:5,children:[(0,R.jsx)(Bce,{}),e.toAscLazySeq().map(e=>(0,R.jsxs)(`div`,{children:[(0,R.jsx)(W,{variant:`h4`,children:e}),(0,R.jsx)(G,{sx:{display:`flex`,flexWrap:`wrap`,columnGap:`50px`},children:t.toAscLazySeq().map(t=>(0,R.jsx)(Vce,{group:e,month:t},t.getTime()))})]},e))]})})}function Uce(){let e=qE(u0),t=Q(AI),[n,r]=BI(),i=qE(DI);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 Wce=(0,L.memo)(function(){return(0,R.jsx)(JU,{buttons:(0,R.jsx)(Uce,{})})}),Gce=new Intl.DateTimeFormat(void 0,{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`});function Kce({day:e,setDay:t}){let n=ow();return(0,R.jsxs)(Zv,{direction:`row`,spacing:2,sx:{alignItems:`center`},children:[(0,R.jsx)(q,{title:`Previous Day`,children:(0,R.jsx)(`div`,{children:(0,R.jsx)(ru,{disabled:e<=VC(n,-28),onClick:()=>t(e=>VC(e,-1)),children:(0,R.jsx)(xS,{})})})}),(0,R.jsx)(W,{sx:{minWidth:`14em`,textAlign:`center`},children:Gce.format(e)}),(0,R.jsx)(q,{title:`Next Day`,children:(0,R.jsx)(`div`,{children:(0,R.jsx)(ru,{disabled:e>=n,onClick:()=>t(e=>VC(e,1)),children:(0,R.jsx)(bS,{})})})})]})}function qce(e,t,n){let r;switch(t){case 0:r=e=>e.last_unload_time??null;break;case 2:r=e=>e.partName;break;case 1:r=e=>e.serial??null;break;case 3:r=e=>e.workorderId??null;break;case 4:r=e=>e.closeout_failed??null;break;case 5: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 Jce({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)(Ab,{children:[(0,R.jsx)(J,{sortDirection:e===0?n:!1,children:(0,R.jsx)(Lb,{active:e===0,direction:n,onClick:()=>i(0),children:`Completed Time`})}),(0,R.jsx)(J,{sortDirection:e===1?n:!1,children:(0,R.jsx)(Lb,{active:e===1,direction:n,onClick:()=>i(1),children:`Serial`})}),(0,R.jsx)(J,{sortDirection:e===2?n:!1,children:(0,R.jsx)(Lb,{active:e===2,direction:n,onClick:()=>i(2),children:`Part`})}),(0,R.jsx)(J,{sortDirection:e===3?n:!1,children:(0,R.jsx)(Lb,{active:e===3,direction:n,onClick:()=>i(3),children:`Workorder`})}),(0,R.jsx)(J,{sortDirection:e===4?n:!1,children:(0,R.jsx)(Lb,{active:e===4,direction:n,onClick:()=>i(4),children:`Closeout`})}),(0,R.jsx)(J,{sortDirection:e===5?n:!1,children:(0,R.jsx)(Lb,{active:e===5,direction:n,onClick:()=>i(5),children:`Closeout Time`})}),(0,R.jsx)(J,{})]})}var Yce=new Intl.DateTimeFormat(void 0,{hour:`2-digit`,minute:`numeric`,second:`numeric`}),Xce=new Intl.DateTimeFormat(void 0,{year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`}),Zce=(0,L.memo)(function({mat:e}){let t=qE(DI);return(0,R.jsxs)(Ab,{children:[(0,R.jsx)(J,{children:e.last_unload_time?Yce.format(e.last_unload_time):``}),(0,R.jsx)(J,{children:e.serial}),(0,R.jsx)(J,{children:(0,R.jsxs)(Zv,{direction:`row`,spacing:`2`,sx:{alignItems:`center`},children:[(0,R.jsx)(bU,{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)(Ux,{fontSize:`inherit`}):(0,R.jsx)(Ax,{fontSize:`inherit`})}),(0,R.jsx)(J,{children:e.closeout_completed?Xce.format(e.closeout_completed):``}),(0,R.jsx)(J,{padding:`checkbox`,children:e.serial!==null&&e.serial!==``?(0,R.jsx)(ru,{onClick:()=>{e.serial&&t({type:`ManuallyEnteredSerial`,serial:e.serial})},size:`large`,children:(0,R.jsx)(lS,{fontSize:`inherit`})}):void 0})]})});function Qce({day:e}){let t=Q(mL),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)(0),[a,o]=(0,L.useState)(`asc`),s=(0,L.useMemo)(()=>qce(n,r,a),[n,r,a]);return(0,R.jsxs)(Yy,{stickyHeader:!0,children:[(0,R.jsx)(vb,{children:(0,R.jsx)(Jce,{sortBy:r,setSortBy:i,sortOrder:a,setSortOrder:o})}),(0,R.jsx)(nb,{children:s.map(e=>(0,R.jsx)(Zce,{mat:e},e.materialID))})]})}function $ce(){ZI(`Close Out`);let[e,t]=(0,L.useState)(ow());return(0,R.jsxs)(G,{sx:{padding:`24px`},children:[(0,R.jsx)(G,{component:`nav`,sx:{display:`flex`,justifyContent:`center`},children:(0,R.jsx)(Kce,{day:e,setDay:t})}),(0,R.jsx)(`main`,{children:(0,R.jsx)(Qce,{day:e})}),(0,R.jsx)(h0,{}),(0,R.jsx)(Wce,{})]})}var O9=Z(!1),k9=Z(!1),A9=Z(!1),j9=[{id:0,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:1,numeric:!1,label:`Part`,getDisplay:e=>e.partName,Cell:({row:e})=>(0,R.jsxs)(Zv,{direction:`row`,spacing:1,sx:{alignItems:`center`},children:[(0,R.jsx)(bU,{part:e.partName,size:25}),e.partName]})},{id:2,numeric:!0,label:`Quantity`,getDisplay:e=>e.quantity.toString(),getForSort:e=>e.quantity},{id:3,numeric:!1,label:`Request Time`,getDisplay:e=>e.timeUTC.toLocaleString(),getForSort:e=>e.timeUTC.getTime()},{id:4,numeric:!1,label:`Priority`,getDisplay:e=>e.priority?e.priority.toString():``,getForSort:e=>e.priority??0},{id:5,numeric:!1,label:`Workorder`,getDisplay:e=>e.workorder??``},{id:6,numeric:!1,label:`Canceled`,getDisplay:e=>e.canceled?.toLocaleString()??``,getForSort:e=>e.canceled?.getTime()??0,openFilterDialog:O9},{id:7,numeric:!1,label:`Scheduled Job`,getDisplay:e=>e.job??``,openFilterDialog:O9},{id:8,numeric:!1,label:`Scheduled Time`,getDisplay:e=>e.schTime?e.schTime.toLocaleString():``,getForSort:e=>e.schTime?e.schTime.getTime():0}],ele=(0,L.memo)(function({setRebookingToShow:e}){let t=k1(3,j9,`desc`),n=O1(),r=Q(rR),i=Q(aR),a=Q(sR),o=Q(k9),s=Q(A9),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)(Yy,{children:[(0,R.jsx)(b1,{columns:j9,sort:t,showDetailsCol:!0,copyToClipboardRows:c}),(0,R.jsx)(E1,{columns:j9,pageData:c,rowsPerPage:n.rowsPerPage,onClickDetails:(t,n)=>e(n)})]}),(0,R.jsx)(T1,{tpage:n,count:c.length})]})}),M9=new Intl.DateTimeFormat(void 0,{year:`numeric`,month:`short`,day:`numeric`,hour:`numeric`,minute:`numeric`}),tle=(0,L.memo)(function({rebooking:e,close:t}){let[n,r]=pR();function i(){e&&n(e.bookingId).then(()=>t(void 0)).catch(console.log)}return(0,R.jsxs)($m,{open:e!==void 0,onClose:()=>t(void 0),children:[(0,R.jsx)(oh,{children:e?.canceled?(0,R.jsx)(W,{sx:{textDecoration:`line-through`},children:e?.bookingId}):e?.bookingId}),(0,R.jsx)(rh,{children:(0,R.jsxs)(Zv,{direction:`column`,spacing:1,children:[e?.canceled&&(0,R.jsxs)(W,{variant:`h5`,children:[`Canceled at `,M9.format(e.canceled)]}),(0,R.jsxs)(Zv,{direction:`row`,spacing:1,children:[(0,R.jsx)(`span`,{children:`Part:`}),e?.partName&&(0,R.jsx)(bU,{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: `,M9.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)(fh,{}),(0,R.jsxs)(W,{children:[`Scheduled Job: `,e?.job]}),(0,R.jsxs)(W,{children:[`Scheduled Time: `,e?.schTime?.toLocaleString()]})]})]})}),(0,R.jsxs)(eh,{children:[!e?.canceled&&!e?.job&&(0,R.jsxs)(K,{onClick:i,color:`secondary`,disabled:r,children:[r?(0,R.jsx)(Zl,{size:24}):void 0,`Cancel Rebooking Request`]}),(0,R.jsx)(K,{onClick:()=>t(void 0),children:`Close`})]})]})}),nle=Z(e=>X.ofObject(e(GO).jobs).map(([e,t])=>t.partName).concat(e(ZE).valuesToLazySeq().map(e=>e.partName)).distinctAndSortBy(e=>e).toRArray()),rle=(0,L.memo)(function(){let[e,t]=(0,L.useState)(!1),[n,r]=(0,L.useState)({part:``}),i=Q(nle),[a,o]=mR(),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)($m,{open:e,onClose:c,children:[(0,R.jsx)(oh,{children:`Create New`}),(0,R.jsx)(rh,{children:(0,R.jsxs)(Zv,{direction:`column`,spacing:2,sx:{mt:`0.5em`,minWidth:`25em`},children:[(0,R.jsx)(Bp,{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)(sx,{...e,label:`Part Name`,slotProps:{input:{...e.slotProps.input,startAdornment:(0,R.jsxs)(R.Fragment,{children:[n.part===``?void 0:(0,R.jsx)(dg,{position:`start`,children:(0,R.jsx)(bU,{part:n.part,size:25})}),e.slotProps.input?.startAdornment]})}}}),renderOption:(e,t)=>(0,R.jsx)(`li`,{...e,children:(0,R.jsxs)(Zv,{direction:`row`,spacing:`1`,sx:{alignItems:`center`},children:[(0,R.jsx)(bU,{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)(sx,{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)(sx,{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)(sx,{label:`Workorder (optional)`,value:n.workorder??``,onChange:e=>r(t=>({...t,workorder:e.target.value}))}),(0,R.jsx)(sx,{label:`Notes (optional)`,multiline:!0,minRows:2,value:n.notes??``,onChange:e=>r(t=>({...t,notes:e.target.value}))})]})}),(0,R.jsxs)(eh,{children:[(0,R.jsxs)(K,{color:`secondary`,onClick:l,disabled:!s||o,children:[o?(0,R.jsx)(Zl,{size:24}):void 0,`Create`]}),(0,R.jsx)(K,{onClick:c,children:`Cancel`})]})]}),(0,R.jsx)(q,{title:`Add Rebooking`,children:(0,R.jsx)(_h,{onClick:()=>t(!0),sx:{position:`fixed`,bottom:`24px`,right:`24px`},color:`primary`,children:(0,R.jsx)(yx,{})})})]})}),ile=(0,L.memo)(function(){let[e,t]=JE(O9),[n,r]=JE(k9),[i,a]=JE(A9);return(0,R.jsxs)($m,{open:e,onClose:()=>t(!1),children:[(0,R.jsx)(oh,{children:`Filter`}),(0,R.jsx)(rh,{children:(0,R.jsxs)(Zv,{direction:`column`,spacing:2,children:[(0,R.jsx)(jh,{control:(0,R.jsx)(Pm,{checked:n,onChange:e=>r(e.target.checked)}),label:`Hide scheduled`}),(0,R.jsx)(jh,{control:(0,R.jsx)(Pm,{checked:i,onChange:e=>a(e.target.checked)}),label:`Hide canceled`})]})}),(0,R.jsx)(eh,{children:(0,R.jsx)(K,{onClick:()=>t(!1),children:`Close`})})]})});function ale(){ZI(Q(EO).supportsRebookings??`Rebookings`);let[e,t]=(0,L.useState)(void 0);return(0,R.jsxs)(G,{component:`main`,sx:{padding:`24px`},children:[(0,R.jsx)(ele,{setRebookingToShow:t}),(0,R.jsx)(tle,{rebooking:e,close:t}),(0,R.jsx)(rle,{}),(0,R.jsx)(ile,{})]})}var N9=Z(Math.floor(Date.now()/6e4));N9.onMount=e=>{let t=setInterval(()=>{e(Math.floor(Date.now()/6e4))},6e4);return()=>clearInterval(t)};var P9=PO(`charts_last30WeekdayStartIdx`,0),F9=PO(`charts_last30WeekdayStartMinuteOffset`,360),I9=YE(e=>Z(t=>{let n=t(P9),r=t(F9),i=new Date(t(N9)*6e4),a=YC(JC(i),r),o=YC(GC(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)}})),L9=YE(e=>Z(t=>{if(e===`Now`)return null;let n=t(P9),r=t(F9),i=new Date(t(N9)*6e4);switch(e){case`EndOfYesterday`:return YC(JC(i),r);case`EndOfLastWeek`:return YC(GC(i,{weekStartsOn:n}),r)}}));function ole(e){let t=PO(`charts_${e}_start`,`StartOfWeek`),n=PO(`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(I9(r)),endDate:i instanceof Date?i:e(L9(i))}},(e,r,i)=>{`start`in i&&r(t,i.start),`end`in i&&r(n,i.end)})}function sle(e){return e.closeout_completed===void 0?!!(X.ofObject(e.completedInspections??{}).some(([,e])=>!e.success)||e.currently_quarantined):e.closeout_failed!==!1}var R9=ole(`part-summary`),cle=Z(e=>{let t=e(mL),n=e(Mk),r=e(R9),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:vk(e),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=>+!!sle(e)),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 lle(e){return e===`CustomDate`||e===`StartOfToday`||e===`StartOfYesterday`||e===`StartOfWeek`||e===`StartOfLastWeek`||e===`Last30`}function ule(e){return e===`CustomDate`||e===`Now`||e===`EndOfYesterday`||e===`EndOfLastWeek`}function dle(e){switch(e){case`0`:return 0;case`1`:return 1;case`2`:return 2;case`3`:return 3;case`4`:return 4;case`5`:return 5;case`6`:return 6;default:return null}}function z9({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 B9({date:e,setDate:t,enabled:n}){let r=Q(I9(`Last30`));return(0,R.jsx)(sx,{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 fle({chartAtom:e}){let[t,n]=JE(e),r=Q(F9),[i,a]=(0,L.useState)(t.startType instanceof Date?t.startType:YC(ow(),r));function o(e){n(e===`CustomDate`?{start:i??new Date}:{start:e})}function s(e){a(e),n({start:e})}let c=Q(I9(`StartOfToday`)),l=Q(I9(`StartOfYesterday`)),u=Q(I9(`StartOfWeek`)),d=Q(I9(`StartOfLastWeek`)),f=Q(I9(`Last30`));return(0,R.jsxs)(G,{children:[(0,R.jsx)(W,{variant:`h6`,children:`Range Start`}),(0,R.jsx)(U_,{value:t.startType instanceof Date?`CustomDate`:t.startType,onChange:e=>{lle(e.target.value)&&o(e.target.value)},children:(0,R.jsxs)(Zv,{direction:`column`,spacing:2,children:[(0,R.jsxs)(Zv,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,R.jsx)(H_,{value:`StartOfToday`}),(0,R.jsx)(z9,{label:`Start of Today`,date:c})]}),(0,R.jsxs)(Zv,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,R.jsx)(H_,{value:`StartOfYesterday`}),(0,R.jsx)(z9,{label:`Start of Yesterday`,date:l})]}),(0,R.jsxs)(Zv,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,R.jsx)(H_,{value:`StartOfWeek`}),(0,R.jsx)(z9,{label:`Start of This Week`,date:u})]}),(0,R.jsxs)(Zv,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,R.jsx)(H_,{value:`StartOfLastWeek`}),(0,R.jsx)(z9,{label:`Start of Last Week`,date:d})]}),(0,R.jsxs)(Zv,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,R.jsx)(H_,{value:`Last30`}),(0,R.jsx)(z9,{label:`Last 30 Days`,date:f})]}),(0,R.jsxs)(Zv,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,R.jsx)(H_,{value:`CustomDate`}),(0,R.jsx)(B9,{enabled:t.startType instanceof Date,date:i,setDate:s})]})]})})]})}function ple({chartAtom:e}){let[t,n]=JE(e),r=Q(F9),[i,a]=(0,L.useState)(t.endType instanceof Date?t.endType:YC(ow(),r));function o(e){n(e===`CustomDate`?{end:i??new Date}:{end:e})}function s(e){a(e),n({end:e})}let c=Q(L9(`EndOfYesterday`)),l=Q(L9(`EndOfLastWeek`));return(0,R.jsxs)(G,{children:[(0,R.jsx)(W,{variant:`h6`,children:`Range End`}),(0,R.jsx)(U_,{value:t.endType instanceof Date?`CustomDate`:t.endType,onChange:e=>{ule(e.target.value)&&o(e.target.value)},children:(0,R.jsxs)(Zv,{direction:`column`,spacing:2,children:[(0,R.jsxs)(Zv,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,R.jsx)(H_,{value:`Now`}),(0,R.jsx)(W,{children:`Now`})]}),(0,R.jsxs)(Zv,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,R.jsx)(H_,{value:`EndOfYesterday`}),(0,R.jsx)(z9,{label:`End of Yesterday`,date:c})]}),(0,R.jsx)(G,{sx:{height:`3em`}}),(0,R.jsxs)(Zv,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,R.jsx)(H_,{value:`EndOfLastWeek`}),(0,R.jsx)(z9,{label:`End of Last Week`,date:l})]}),(0,R.jsx)(G,{sx:{height:`3em`}}),(0,R.jsxs)(Zv,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,R.jsx)(H_,{value:`CustomDate`}),(0,R.jsx)(B9,{enabled:t.endType instanceof Date,date:i,setDate:s})]})]})})]})}function mle(e){let t=Math.floor(e/60),n=e%60;return`${t.toString().padStart(2,`0`)}:${n.toString().padStart(2,`0`)}`}function hle({chartAtom:e,open:t,setOpen:n}){let[r,i]=JE(P9),[a,o]=JE(F9);return(0,R.jsxs)($m,{open:t,onClose:()=>n(!1),maxWidth:`md`,children:[(0,R.jsx)(rh,{children:(0,R.jsxs)(Zv,{direction:`column`,spacing:2,divider:(0,R.jsx)(fh,{orientation:`horizontal`,flexItem:!0}),children:[(0,R.jsxs)(Zv,{direction:`row`,spacing:2,divider:(0,R.jsx)(fh,{orientation:`vertical`,flexItem:!0}),children:[(0,R.jsx)(fle,{chartAtom:e}),(0,R.jsx)(ple,{chartAtom:e})]}),(0,R.jsxs)(Zv,{direction:`row`,sx:{justifyContent:`space-around`},children:[(0,R.jsxs)(sx,{select:!0,label:`First Day Of Week`,sx:{minWidth:`10em`},value:r,onChange:e=>{let t=dle(e.target.value);t!==null&&i(t)},children:[(0,R.jsx)(P_,{value:0,children:`Sunday`}),(0,R.jsx)(P_,{value:1,children:`Monday`}),(0,R.jsx)(P_,{value:2,children:`Tuesday`}),(0,R.jsx)(P_,{value:3,children:`Wednesday`}),(0,R.jsx)(P_,{value:4,children:`Thursday`}),(0,R.jsx)(P_,{value:5,children:`Friday`}),(0,R.jsx)(P_,{value:6,children:`Saturday`})]}),(0,R.jsx)(sx,{type:`time`,label:`Day Start Time`,sx:{minWidth:`10em`},value:mle(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)(eh,{children:(0,R.jsx)(K,{onClick:()=>n(!1),children:`Close`})})]})}function gle(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 _le(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 vle=(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)(Zv,{direction:`row`,spacing:2,sx:{alignItems:`center`},children:[(0,R.jsxs)(W,{variant:`body2`,color:`textSecondary`,children:[`Range: `,gle(t.startType,t.startDate),` -`,` `,_le(t.endType,t.endDate)]}),(0,R.jsx)(q,{title:`Edit Range`,children:(0,R.jsx)(ru,{onClick:()=>r(!0),children:(0,R.jsx)(Vx,{})})})]}),(0,R.jsx)(hle,{open:n,setOpen:r,chartAtom:e})]})}),V9=new Intl.NumberFormat(void 0,{maximumFractionDigits:1});function yle(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(Aw(n===`asc`?{asc:r}:{desc:r})),i}var ble=new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`});function xle(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:0;break;case`CloseOut`:r=e=>e.closeout_failed===void 0?1:e.closeout_failed?-1:0;break}let i=[...e];return i.sort(Aw(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)(Lb,{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)(Ire,{to:{route:$.Operations_CurrentWorkorders,workorder:e},children:e})});function Sle({material:e}){let t=qE(DI),[n,r]=(0,L.useState)(`Serial`),[i,a]=(0,L.useState)(`asc`),o=(0,L.useMemo)(()=>xle(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)(Yy,{size:`small`,children:[(0,R.jsx)(vb,{children:(0,R.jsxs)(Ab,{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)(nb,{children:[f.map(e=>(0,R.jsxs)(Ab,{children:[(0,R.jsx)(J,{children:e.serial??``}),(0,R.jsx)(J,{children:e.last_unload_time?ble.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)(gS,{fontSize:`inherit`}):``}),(0,R.jsx)(J,{sx:{textAlign:`center`},padding:`checkbox`,children:X.ofObject(e.completedInspections??{}).some(([,e])=>!e.success)?(0,R.jsx)(Ux,{fontSize:`inherit`}):``}),(0,R.jsx)(J,{sx:{textAlign:`center`},padding:`checkbox`,children:e.closeout_completed===void 0?``:e.closeout_failed===!1?(0,R.jsx)(Ax,{fontSize:`inherit`}):(0,R.jsx)(Ux,{fontSize:`inherit`})}),(0,R.jsx)(J,{padding:`checkbox`,children:(0,R.jsx)(ru,{onClick:()=>t({type:`MatSummary`,summary:e}),size:`large`,children:(0,R.jsx)(lS,{fontSize:`inherit`})})})]},e.materialID)),X.ofRange(0,c-f.length).map(e=>(0,R.jsx)(Ab,{children:(0,R.jsx)(J,{colSpan:7,children:`\xA0`})},e))]})]}),(0,R.jsxs)(Sb,{variant:`dense`,sx:{mb:`0.5em`},children:[(0,R.jsx)(W,{color:`textSecondary`,variant:`caption`,children:`Rows per page:`}),(0,R.jsx)(ov,{style:{marginLeft:8,marginRight:`1em`},value:c,SelectDisplayProps:{style:{color:`rgba(0, 0, 0, 0.54)`}},input:(0,R.jsx)(gp,{}),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)(P_,{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)(ru,{onClick:()=>d(0),disabled:u===0,"aria-label":`First Page`,size:`large`,children:(0,R.jsx)(Jx,{})}),(0,R.jsx)(ru,{onClick:()=>d(u-1),disabled:u===0,"aria-label":`Previous Page`,size:`large`,children:(0,R.jsx)(rS,{})}),(0,R.jsx)(ru,{onClick:()=>d(u+1),disabled:u>=Math.ceil(e.length/c)-1,"aria-label":`Next Page`,size:`large`,children:(0,R.jsx)(iS,{})}),(0,R.jsx)(ru,{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)(oS,{})})]})]})}var Cle=(0,L.memo)(function({part:e}){return(0,R.jsxs)(Zv,{direction:`row`,sx:{flexWrap:`wrap`,justifyContent:`space-around`,ml:`1em`,mr:`1em`},children:[(0,R.jsx)(G,{sx:{width:`60em`,overflow:`auto`},children:(0,R.jsx)(Sle,{material:e.mats})}),(0,R.jsx)(G,{sx:{width:`40em`,overflow:`auto`},children:(0,R.jsxs)(Yy,{size:`small`,children:[(0,R.jsx)(vb,{children:(0,R.jsxs)(Ab,{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)(nb,{children:e.stationMins.toAscLazySeq().map(([e,t])=>(0,R.jsxs)(Ab,{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))})]})})]})}),wle=V(Ab)({"& > *":{borderBottom:`unset !important`}}),Tle=(0,L.memo)(function({part:e}){let[t,n]=(0,L.useState)(!1);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(wle,{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)(bU,{part:e.part,size:25})}),(0,R.jsx)(`div`,{children:(0,R.jsx)(W,{variant:`body2`,component:`span`,sx:{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)(ru,{size:`small`,onClick:()=>n(!t),children:t?(0,R.jsx)(aS,{}):(0,R.jsx)(nS,{})})})})]}),(0,R.jsx)(Ab,{children:(0,R.jsx)(J,{sx:{pb:`0`,pt:`0`},colSpan:7,children:(0,R.jsx)(Gc,{in:t,timeout:`auto`,unmountOnExit:!0,children:(0,R.jsx)(Cle,{part:e})})})})]})});function Ele({partsAtom:e}){let t=Q(e);return(0,R.jsx)(q,{title:`Copy to Clipboard`,children:(0,R.jsx)(ru,{style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,onClick:()=>G9(t),children:(0,R.jsx)($x,{})})})}function Dle(){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)(Xx,{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)(Xx,{fontSize:`inherit`})})})}function Ole(){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)(Xx,{fontSize:`inherit`})})})}var kle=(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)(vb,{children:(0,R.jsxs)(Ab,{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)(Ole,{}),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)(Dle,{}),children:`Total Median Hours`}),(0,R.jsx)(H9,{align:`left`,col:`Workorders`,...a,children:`Workorders`}),(0,R.jsx)(J,{children:(0,R.jsx)(Ele,{partsAtom:e})})]})})}),Ale=(0,L.memo)(function({partsAtom:e}){let t=Q(e),[n,r]=(0,L.useState)(`PartName`),[i,a]=(0,L.useState)(`asc`),o=yle(t,n,i);return(0,R.jsxs)(Yy,{stickyHeader:!0,children:[(0,R.jsx)(kle,{partsAtom:e,sortBy:n,setSortBy:r,order:i,setOrder:a}),(0,R.jsx)(nb,{children:o.map(e=>(0,R.jsx)(Tle,{part:e},e.part))})]})});function jle(){let e=qE(u0),t=Q(AI),[n,r]=BI(),i=qE(DI);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 Mle=(0,L.memo)(function(){return(0,R.jsx)(JU,{buttons:(0,R.jsx)(jle,{})})});function Nle(){return ZI(`Completed Parts`),(0,R.jsxs)(G,{component:`main`,sx:{padding:`24px`},children:[(0,R.jsxs)(Zv,{direction:`row`,spacing:2,sx:{alignItems:`center`,justifyContent:`space-between`},children:[(0,R.jsx)(`span`,{children:`Completed Parts`}),(0,R.jsx)(vle,{chartAtom:R9})]}),(0,R.jsx)(Ale,{partsAtom:cle}),(0,R.jsx)(Mle,{}),(0,R.jsx)(h0,{})]})}function G9(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
+ `,oA(t,{format:`text/html`})}var K9=`bms-operations-reports-tab`,q9=[{separator:`Load/Unload`},{name:`L/U Outliers`,route:{route:$.Operations_LoadOutliers},icon:(0,R.jsx)(Cx,{})},{name:`L/U Hours`,route:{route:$.Operations_LoadHours},icon:(0,R.jsx)(Qx,{})},{name:`L/U Cycles`,route:{route:$.Operations_LoadCycles},icon:(0,R.jsx)(wS,{})},{separator:`Machines`},{name:`MC Outliers`,route:{route:$.Operations_MachineOutliers},icon:(0,R.jsx)(Cx,{})},{name:`MC Hours`,route:{route:$.Operations_MachineHours},icon:(0,R.jsx)(Qx,{})},{name:`MC Cycles`,route:{route:$.Operations_MachineCycles},icon:(0,R.jsx)(wS,{})},{name:`Tools`,route:{route:$.Operations_Tools},icon:(0,R.jsx)(Rx,{})},{name:`Programs`,route:{route:$.Operations_Programs},icon:(0,R.jsx)(pS,{})},{separator:`Material`},{name:`Quality`,route:{route:$.Operations_Quality},icon:(0,R.jsx)(wx,{})},{name:`Inspections`,route:{route:$.Operations_Inspections},icon:(0,R.jsx)(bx,{})},{name:`Close Out`,route:{route:$.Operations_CloseoutReport},icon:(0,R.jsx)(dS,{})},{separator:`Cell`},{name:`Schedules`,route:{route:$.Operations_RecentSchedules},icon:(0,R.jsx)(Tx,{})},{name:`Workorders`,route:{route:$.Operations_CurrentWorkorders},icon:(0,R.jsx)(Kx,{})},{name:`Production`,route:{route:$.Operations_Production},icon:(0,R.jsx)(jx,{})},{name:`Part Summary`,route:{route:$.Operations_Parts},icon:(0,R.jsx)(CS,{})},{name:e=>e.supportsRebookings??`Rebooking`,route:{route:$.Operations_Rebookings},icon:(0,R.jsx)(hS,{}),hidden:e=>e.supportsRebookings===null||e.supportsRebookings===``}];function Ple(e){return[{separator:`Efficiency`},{name:`Buffers`,route:{route:$.Analysis_Buffers},icon:(0,R.jsx)(zx,{})},{name:`Station OEE`,route:{route:$.Analysis_StationOEE},icon:(0,R.jsx)(Qx,{})},{name:`Completed Parts`,route:{route:$.Analysis_PartsCompleted},icon:(0,R.jsx)(Kx,{})},{separator:`Cycles`},{name:`Machine Cycles`,route:{route:$.Analysis_MachineCycles},icon:(0,R.jsx)(wS,{})},{name:`L/U Cycles`,route:{route:$.Analysis_LoadCycles},icon:(0,R.jsx)(vx,{})},{name:`Pallet Cycles`,route:{route:$.Analysis_PalletCycles},icon:(0,R.jsx)(yS,{})},{name:e=>Dk(e.basketName)+` Cycles`,route:{route:$.Analysis_BasketCycles},icon:(0,R.jsx)(yS,{}),hidden:()=>!e},{separator:`Cell`},{name:`Quality`,route:{route:$.Analysis_Quality},icon:(0,R.jsx)(wx,{})},{name:`Tool Replacements`,route:{route:$.Analysis_ToolReplacements},icon:(0,R.jsx)(Rx,{})},{name:`Schedules`,route:{route:$.Analysis_Schedules},icon:(0,R.jsx)(Tx,{})},{separator:`Costs`},{name:`Percentages`,route:{route:$.Analysis_CostPercents},icon:(0,R.jsx)(Ox,{})},{name:`Cost/Piece`,route:{route:$.Analysis_CostPerPiece},icon:(0,R.jsx)(Sx,{})}]}function Fle(e){return typeof e==`string`&&Object.values($).includes(e)}function Ile(e){return Fle(e)&&e!==$.Client_Custom&&e!==$.Operations_CurrentWorkorders&&e!==$.Station_InspectionMonitorWithType&&e!==$.Station_LoadMonitor&&e!==$.Station_Queues}function Lle(e){return{route:e}}function J9({children:e}){let[t,n]=JE(YI),r=gx(ms().breakpoints.down(`md`)),[,i]=(0,L.useTransition)(),a=q9.some(e=>`separator`in e?!1:e.route.route===t.route);return(0,R.jsx)(nx,{variant:r&&(!Array.isArray(e)||e.length<5)?`fullWidth`:`scrollable`,value:a?K9:t.route,onChange:(e,t)=>i(()=>{t===K9?n({route:$.Operations_MachineCycles}):Ile(t)&&n(Lle(t))}),textColor:`inherit`,scrollButtons:!0,allowScrollButtonsMobile:!0,indicatorColor:`secondary`,children:e})}function Y9(){return(0,R.jsxs)(J9,{children:[(0,R.jsx)(Uy,{label:`Operations`,value:$.Operations_Dashboard}),(0,R.jsx)(Uy,{label:`Cell`,value:$.Operations_SystemOverview}),(0,R.jsx)(Uy,{label:`Material`,value:$.Operations_AllMaterial}),(0,R.jsx)(Uy,{label:`Reports`,value:K9})]})}function X9(){return(0,R.jsxs)(J9,{children:[(0,R.jsx)(Uy,{label:`Material`,value:$.Quality_Dashboard}),(0,R.jsx)(Uy,{label:`Paths`,value:$.Quality_Paths}),(0,R.jsx)(Uy,{label:`Quarantine Material`,value:$.Quality_Quarantine})]})}function Z9(){return(0,R.jsxs)(J9,{children:[(0,R.jsx)(Uy,{label:`Tools`,value:$.Tools_Dashboard}),(0,R.jsx)(Uy,{label:`Programs`,value:$.Tools_Programs})]})}function Q9(){return(0,R.jsxs)(J9,{children:[(0,R.jsx)(Uy,{label:`Cycles`,value:$.Engineering_Cycles}),(0,R.jsx)(Uy,{label:`Hours`,value:$.Engineering_Hours}),(0,R.jsx)(Uy,{label:`Outliers`,value:$.Engineering_Outliers})]})}function $9(){return Q(ZL)===null?null:(0,R.jsxs)(J9,{children:[(0,R.jsx)(Uy,{label:`Workorders`,value:$.Sales_Dashboard}),(0,R.jsx)(Uy,{label:`Projections`,value:$.Sales_ProjectedUsage})]})}var Rle=(0,L.memo)(function(e){Lre();let t=Q(EO),n=Q(vie),r=Q(yie),[i,a]=JE(YI),o=Ple(n||r),s=t.user!==null&&t.user!==void 0,c,l,u,d,f=!0,p=!0,m=!1,h=!0;if(wO(t)&&!t.user)c=(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:()=>DO(t),children:`Login`})]}),f=!1,p=!1;else switch(i.route){case $.Station_LoadMonitor:c=(0,R.jsx)(T2,{loadNum:i.loadNum,queues:i.queues,completed:i.completed}),l=n3,u=r3,m=!0,h=!1;break;case $.Station_InspectionMonitor:c=(0,R.jsx)(N2,{focusInspectionType:null}),l=n3,u=r3,m=!0,h=!1;break;case $.Station_InspectionMonitorWithType:c=(0,R.jsx)(N2,{focusInspectionType:i.inspType}),l=n3,u=r3,m=!0,h=!1;break;case $.Station_Closeout:c=(0,R.jsx)(B2,{}),l=n3,u=r3,m=!0,h=!1;break;case $.Station_Queues:c=(0,R.jsx)(JY,{queues:i.queues}),l=n3,u=r3,m=!0,h=!1;break;case $.Station_Overview:c=(0,R.jsx)(e2,{}),h=!1;break;case $.Analysis_Quality:c=(0,R.jsx)(Y4,{}),l=_7,d=o,f=!1;break;case $.Analysis_ToolReplacements:c=(0,R.jsx)(ice,{}),l=_7,d=o,f=!1;break;case $.Analysis_Schedules:c=(0,R.jsx)(J4,{}),l=_7,d=o,f=!1;break;case $.Analysis_Buffers:c=(0,R.jsx)(Zoe,{}),l=_7,d=o,f=!1;break;case $.Analysis_StationOEE:c=(0,R.jsx)(pse,{}),l=_7,d=o,f=!1;break;case $.Analysis_PartsCompleted:c=(0,R.jsx)(_se,{}),l=_7,d=o,f=!1;break;case $.Analysis_MachineCycles:c=(0,R.jsx)(Dse,{}),l=_7,d=o,f=!1;break;case $.Analysis_LoadCycles:c=(0,R.jsx)(Ise,{}),l=_7,d=o,f=!1;break;case $.Analysis_PalletCycles:c=(0,R.jsx)(Hse,{}),l=_7,d=o,f=!1;break;case $.Analysis_BasketCycles:c=(0,R.jsx)(Jse,{}),l=_7,d=o,f=!1;break;case $.Analysis_CostPercents:c=(0,R.jsx)(cW,{}),l=_7,d=o,f=!1;break;case $.Analysis_CostPerPiece:c=(0,R.jsx)(uW,{}),l=_7,d=o,f=!1;break;case $.Operations_Dashboard:c=(0,R.jsx)(Hre,{}),l=Y9;break;case $.Operations_SystemOverview:c=(0,R.jsx)(e2,{ignoreOperator:!0}),l=Y9,h=!1;break;case $.Operations_AllMaterial:c=(0,R.jsx)(kX,{displaySystemBins:!0}),l=Y9,h=!1;break;case $.Operations_LoadOutliers:c=(0,R.jsx)(G3,{outlierTy:`labor`}),l=Y9,d=q9;break;case $.Operations_LoadHours:c=(0,R.jsx)(T6,{ty:`labor`}),l=Y9,d=q9;break;case $.Operations_LoadCycles:c=(0,R.jsx)(g7,{ty:`labor`}),l=Y9,d=q9;break;case $.Operations_MachineOutliers:c=(0,R.jsx)(G3,{outlierTy:`machine`}),l=Y9,d=q9;break;case $.Operations_MachineHours:c=(0,R.jsx)(T6,{ty:`machine`}),l=Y9,d=q9;break;case $.Operations_MachineCycles:c=(0,R.jsx)(g7,{ty:`machine`}),l=Y9,d=q9;break;case $.Operations_RecentSchedules:c=(0,R.jsx)(nX,{}),l=Y9,d=q9;break;case $.Operations_CurrentWorkorders:c=(0,R.jsx)(E9,{}),l=Y9,d=q9,h=!1;break;case $.Operations_Production:c=(0,R.jsx)(T3,{}),l=Y9,d=q9;break;case $.Operations_Quality:c=(0,R.jsx)(c0,{}),l=Y9,d=q9,h=!1;break;case $.Operations_Inspections:c=(0,R.jsx)(l0,{}),l=Y9,d=q9;break;case $.Operations_CloseoutReport:c=(0,R.jsx)($ce,{}),l=Y9,d=q9,h=!1;break;case $.Operations_Tools:c=(0,R.jsx)(S4,{}),l=Y9,d=q9;break;case $.Operations_Programs:c=(0,R.jsx)(P4,{}),l=Y9,d=q9;break;case $.Operations_Rebookings:c=(0,R.jsx)(ale,{}),l=Y9,d=q9;break;case $.Operations_Parts:c=(0,R.jsx)(Nle,{}),l=Y9,d=q9,h=!1;break;case $.Engineering_Cycles:c=(0,R.jsx)(g7,{ty:`machine`}),f=!1,l=Q9;break;case $.Engineering_Hours:c=(0,R.jsx)(T6,{ty:`machine`}),f=!1,l=Q9;break;case $.Engineering_Outliers:c=(0,R.jsx)(G3,{outlierTy:`machine`}),f=!1,l=Q9;break;case $.Quality_Dashboard:c=(0,R.jsx)(c0,{}),l=X9,f=!1,h=!1;break;case $.Quality_Paths:c=(0,R.jsx)(l0,{}),l=X9,f=!1;break;case $.Quality_Quarantine:c=(0,R.jsx)(kX,{displaySystemBins:!1}),l=X9,f=!1,h=!1;break;case $.Tools_Dashboard:c=(0,R.jsx)(S4,{}),l=Z9;break;case $.Tools_Programs:c=(0,R.jsx)(P4,{}),l=Z9;break;case $.Sales_Dashboard:c=(0,R.jsx)(E9,{disableSearch:!0}),l=$9,f=!1;break;case $.Sales_ProjectedUsage:c=(0,R.jsx)(Hce,{}),l=$9,f=!1;break;case $.VerboseLogging:c=(0,R.jsx)(E3,{}),p=!1,f=!1;break;case $.Client_Custom:{let n=e.renderCustomPage?.(i.custom);l=n?.nav,c=n?.page??(0,R.jsx)(fW,{setRoute:a,modes:e.chooseModes?.(t)}),f=!1;break}case $.ChooseMode:default:c=(0,R.jsx)(fW,{setRoute:a,modes:e.chooseModes?.(t)}),p=!1,f=!1}return(0,R.jsxs)(`div`,{id:`App`,children:[(0,R.jsx)(z3,{showAlarms:f,showSearch:p,showLogout:s,showOperator:m,Nav1:l,Nav2:u,menuNavs:d}),(0,R.jsxs)(`div`,{style:{display:`flex`},children:[(0,R.jsx)(B3,{menuItems:d}),(0,R.jsx)(`div`,{style:{flexGrow:1},children:c})]}),h?(0,R.jsx)(JU,{}):void 0,(0,R.jsx)(W4,{}),(0,R.jsx)(uq,{})]})});function zle(e,t,n){let r=fs({palette:{primary:C,secondary:T}});(0,_x.createRoot)(t).render((0,R.jsxs)(Cs,{theme:r,children:[(0,R.jsx)(pee,{}),(0,R.jsx)(L.StrictMode,{children:(0,R.jsx)(VE,{store:n,children:(0,R.jsx)(Rle,{...e})})})]}))}async function Ble(){Cne();let e=IE();e.set(EO,await TO()),zle(null,document.getElementById(`root`),e)}Ble().catch(e=>{console.log(e);let t=`Error loading Insight`;e instanceof DC&&(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()});