@seedtactics/insight-client 16.8.4-beta.0 → 16.8.4-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index-BLYS5tHD.js +388 -0
- package/dist/assets/index-DXfAwuj-.css +1 -0
- package/dist/assets/roboto-cyrillic-300-normal-D0x1uCa7.woff +0 -0
- package/dist/assets/roboto-cyrillic-400-normal-BepgbcUK.woff +0 -0
- package/dist/assets/roboto-cyrillic-500-normal-C8ZOEKN4.woff +0 -0
- package/dist/assets/roboto-cyrillic-700-normal-D8g9KsRf.woff +0 -0
- package/dist/assets/roboto-cyrillic-ext-300-normal-C0UYUNTV.woff +0 -0
- package/dist/assets/roboto-cyrillic-ext-400-normal-DhDk0Xwi.woff +0 -0
- package/dist/assets/roboto-cyrillic-ext-500-normal-SCgicl0l.woff +0 -0
- package/dist/assets/roboto-cyrillic-ext-700-normal-BWOtdzfy.woff +0 -0
- package/dist/assets/roboto-greek-300-normal-xS8CB6LN.woff +0 -0
- package/dist/assets/roboto-greek-400-normal-D904r64h.woff +0 -0
- package/dist/assets/roboto-greek-500-normal-XBIQOowA.woff +0 -0
- package/dist/assets/roboto-greek-700-normal-xQsEWSIA.woff +0 -0
- package/dist/assets/roboto-latin-300-normal-Dqn3NW0Y.woff +0 -0
- package/dist/assets/roboto-latin-400-normal-D27F5sTu.woff +0 -0
- package/dist/assets/roboto-latin-500-normal-fsTFPL3E.woff +0 -0
- package/dist/assets/roboto-latin-700-normal-YuyVweIx.woff +0 -0
- package/dist/assets/roboto-latin-ext-300-normal-B0-sTZUp.woff +0 -0
- package/dist/assets/roboto-latin-ext-400-normal-CIveymTr.woff +0 -0
- package/dist/assets/roboto-latin-ext-500-normal-C1cK9xmS.woff +0 -0
- package/dist/assets/roboto-latin-ext-700-normal-BDePAh3g.woff +0 -0
- package/dist/assets/roboto-math-300-normal-CkwMvXpj.woff +0 -0
- package/dist/assets/roboto-math-400-normal-D6sS4O5l.woff +0 -0
- package/dist/assets/roboto-math-500-normal-BNGXE_xU.woff +0 -0
- package/dist/assets/roboto-math-700-normal-DbhUef31.woff +0 -0
- package/dist/assets/roboto-symbols-300-normal-CBIeSvs3.woff +0 -0
- package/dist/assets/roboto-symbols-400-normal-C7tGlxgb.woff +0 -0
- package/dist/assets/roboto-symbols-500-normal-DFnofPUt.woff +0 -0
- package/dist/assets/roboto-symbols-700-normal-C59U6HqI.woff +0 -0
- package/dist/assets/roboto-vietnamese-300-normal-CYjuQheQ.woff +0 -0
- package/dist/assets/roboto-vietnamese-400-normal-Bf76hAzZ.woff +0 -0
- package/dist/assets/roboto-vietnamese-500-normal-BgoYVz-9.woff +0 -0
- package/dist/assets/roboto-vietnamese-700-normal-kpkdMgbf.woff +0 -0
- package/dist/bootstrap.d.ts +5 -0
- package/dist/bootstrap.js +56 -0
- package/dist/cell-status/custom-state.d.ts +9 -0
- package/dist/cell-status/custom-state.js +42 -0
- package/dist/cell-status/loading.js +5 -0
- package/dist/components/App.d.ts +2 -0
- package/dist/components/App.js +1 -1
- package/dist/components/operations/Programs.js +1 -1
- package/dist/components/station-monitor/BasketLoadStationWork.d.ts +15 -0
- package/dist/components/station-monitor/BasketLoadStationWork.js +147 -0
- package/dist/components/station-monitor/LoadStation.d.ts +2 -0
- package/dist/components/station-monitor/LoadStation.js +26 -17
- package/dist/components/station-monitor/Material.js +21 -4
- package/dist/components/station-monitor/MoveMaterialArrows.js +1 -1
- package/dist/components/station-monitor/QuarantineButton.js +5 -2
- package/dist/components/station-monitor/QueuesAddMaterial.js +2 -1
- package/dist/components/station-monitor/SystemOverview.js +8 -4
- package/dist/data/all-material-bins.js +10 -0
- package/dist/data/current-cycles.js +22 -20
- package/dist/data/move-arrows.d.ts +1 -0
- package/dist/data/move-arrows.js +18 -2
- package/dist/data/queue-material.js +2 -0
- package/dist/index.html +2 -2
- package/dist/index.js +7 -15
- package/dist/network/api.d.ts +10 -1
- package/dist/network/api.js +9 -0
- package/dist/network/backend.d.ts +2 -0
- package/dist/network/backend.js +14 -9
- package/package.json +8 -7
- package/dist/assets/index-4ivKxo2f.js +0 -388
- package/dist/assets/index-CbqW4-gR.css +0 -1
- package/dist/assets/roboto-cyrillic-300-normal-DEFNdjk5.woff +0 -0
- package/dist/assets/roboto-cyrillic-400-normal-Bjg-1-sg.woff +0 -0
- package/dist/assets/roboto-cyrillic-500-normal-CBKMylY4.woff +0 -0
- package/dist/assets/roboto-cyrillic-700-normal-DhZFXDSN.woff +0 -0
- package/dist/assets/roboto-cyrillic-ext-300-normal-D7ank4TF.woff +0 -0
- package/dist/assets/roboto-cyrillic-ext-400-normal-CaK1767H.woff +0 -0
- package/dist/assets/roboto-cyrillic-ext-500-normal-DqF2hftb.woff +0 -0
- package/dist/assets/roboto-cyrillic-ext-700-normal-CI7FH63F.woff +0 -0
- package/dist/assets/roboto-greek-300-normal-C_Dgaih9.woff +0 -0
- package/dist/assets/roboto-greek-400-normal-Bb5mj_fZ.woff +0 -0
- package/dist/assets/roboto-greek-500-normal-oCqhoyfc.woff +0 -0
- package/dist/assets/roboto-greek-700-normal-DjRqqLBV.woff +0 -0
- package/dist/assets/roboto-latin-300-normal-BARJ-h6h.woff +0 -0
- package/dist/assets/roboto-latin-400-normal-DyYNIH4P.woff +0 -0
- package/dist/assets/roboto-latin-500-normal-DQZyH_nt.woff +0 -0
- package/dist/assets/roboto-latin-700-normal-DLgJJpmK.woff +0 -0
- package/dist/assets/roboto-latin-ext-300-normal-CTCCHkZF.woff +0 -0
- package/dist/assets/roboto-latin-ext-400-normal-scX0fKtV.woff +0 -0
- package/dist/assets/roboto-latin-ext-500-normal-Cyc0AKLz.woff +0 -0
- package/dist/assets/roboto-latin-ext-700-normal-BUhwtWwy.woff +0 -0
- package/dist/assets/roboto-math-300-normal-Ds0YpBw2.woff +0 -0
- package/dist/assets/roboto-math-400-normal-C9RxBKAh.woff +0 -0
- package/dist/assets/roboto-math-500-normal-C-7mKPO3.woff +0 -0
- package/dist/assets/roboto-math-700-normal-DVoD5t2k.woff +0 -0
- package/dist/assets/roboto-symbols-300-normal-BCnjhQd_.woff +0 -0
- package/dist/assets/roboto-symbols-400-normal-DLYbZahX.woff +0 -0
- package/dist/assets/roboto-symbols-500-normal-F7c8nfcH.woff +0 -0
- package/dist/assets/roboto-symbols-700-normal-BoS6HWkc.woff +0 -0
- package/dist/assets/roboto-vietnamese-300-normal-INUupD3o.woff +0 -0
- package/dist/assets/roboto-vietnamese-400-normal-DnpnVwnf.woff +0 -0
- package/dist/assets/roboto-vietnamese-500-normal-D380IkQ8.woff +0 -0
- package/dist/assets/roboto-vietnamese-700-normal-DsFyXAL4.woff +0 -0
|
@@ -0,0 +1,388 @@
|
|
|
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)}})();function u(e){return`init`in e}function d(e){return typeof e.write==`function`}function f(e){return!!e.onMount}function p(e){return`v`in e||`e`in e}function m(e){if(`e`in e)throw e.e;return e.v}function h(e){return typeof e?.then==`function`}function g(e){if(!(e instanceof Error))return!1;let t=e.name,n=e.message.toLowerCase();return(t===`RangeError`||t===`InternalError`)&&(n.includes(`call stack`)||n.includes(`too much recursion`)||n.includes(`stack overflow`))}function _(e,t,n){if(!n.p.has(e)){n.p.add(e);let r=()=>n.p.delete(e);t.then(r,r)}}function v(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 y(e){return!!e.INTERNAL_onInit}var b=(e,t,n,...r)=>n.read(...r),x=(e,t,n,...r)=>n.write(...r),S=(e,t,n)=>n.INTERNAL_onInit(t),C=(e,t,n,r)=>n.onMount?.call(n,r),w=(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),y(n)&&s(e,t,n)}return a},T=(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)},E=(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 v(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)}},D=(e,t,n)=>{var r,i;let a=e[1],o=e[2],s=e[3],c=e[6],l=e[7],f=e[11],v=e[12],y=e[13],b=e[14],x=e[16],S=e[17],C=e[20],w=e[26],T=e[28],E=f(e,t,n),D=T[0];if(p(E)){if(a.has(n)&&o.get(n)!==E.n||E.m===D)return E.m=D,E;let r=!1;for(let[n,i]of E.d)if(b(e,t,n).n!==i){r=!0;break}if(!r)return E.m=D,E}let O=!0,ee=new Set(E.d.keys()),te=()=>{for(let e of ee)E.d.delete(e)},k=()=>{if(a.has(n)){let r=!s.size;S(e,t,n),r&&(y(e,t),v(e,t))}},A=r=>{var i;if(r===n){let n=f(e,t,r);if(!p(n))if(u(r))C(e,t,r,r.init);else throw Error(`no atom init`);return m(n)}let o=b(e,t,r);try{return m(o)}finally{ee.delete(r),E.d.set(r,o.n),h(E.v)&&_(n,E.v,o),a.has(n)&&((i=a.get(r))==null||i.t.add(n)),O||k()}},j,M,ne={get signal(){return j||=new AbortController,j.signal},get setSelf(){return!M&&d(n)&&(M=(...r)=>{if(!O)try{return x(e,t,n,r)}finally{y(e,t),v(e,t)}}),M}},re=E.n,ie=o.get(n)===re;try{let i=l(e,t,n,A,ne);if(C(e,t,n,i),h(i)){w(e,t,i,()=>j?.abort());let n=()=>{te(),k()};i.then(n,n)}else te();return(r=c.r)==null||r.call(c,n),E.m=D,E}catch(e){if(g(e))throw e;return delete E.v,E.e=e,++E.n,E.m=D,E}finally{O=!1,E.n!==re&&ie&&(o.set(n,E.n),s.add(n),(i=c.c)==null||i.call(c,n))}},O=(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 v(n,s,r)){let n=a(e,t,c);i.get(c)!==n.n&&(i.set(c,n.n),o.push(c))}}},ee=(e,t,n,r)=>{let i=e[3],a=e[6],o=e[8],s=e[11],c=e[12],l=e[13],d=e[14],f=e[15],p=e[16],h=e[17],g=e[20],_=e[28],v=!0,y=n=>m(d(e,t,n)),b=(r,...o)=>{var d;let m=s(e,t,r);try{if(r===n){if(!u(r))throw Error(`atom not writable`);let n=m.n,s=o[0];g(e,t,r,s),h(e,t,r),n!==m.n&&(++_[0],i.add(r),f(e,t,r),(d=a.c)==null||d.call(a,r));return}else return p(e,t,r,o)}finally{v||(l(e,t),c(e,t))}};try{return o(e,t,n,y,b,...r)}finally{v=!1}},te=(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))}},k=(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],p=e[14],m=e[16],h=e[18],g=c(e,t,n),_=i.get(n);if(!_){p(e,t,n);for(let r of g.d.keys())h(e,t,r).t.add(n);_={l:new Set,d:new Set(g.d.keys()),t:new Set},i.set(n,_),d(n)&&f(n)&&a.add(()=>{let r=!0,i=(...i)=>{try{return m(e,t,n,i)}finally{r||(u(e,t),l(e,t))}};try{let a=s(e,t,n,i);a&&(_.u=()=>{r=!0;try{a()}finally{r=!1}})}finally{r=!1}}),(r=o.m)==null||r.call(o,n)}return _},A=(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},j=(e,t,n,r)=>{let i=e[11],a=e[27],o=i(e,t,n),s=`v`in o,c=o.v;if(h(r))for(let a of o.d.keys())_(n,r,i(e,t,a));o.v=r,delete o.e,(!s||!Object.is(c,o.v))&&(++o.n,h(c)&&a(e,t,c))},M=(e,t,n)=>{let r=e[14];return m(r(e,t,n))},ne=(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))}},re=(e,t,n,r)=>{let i=e[12],a=e[13],o=e[18],s=e[19],c=o(e,t,n).l;return c.add(r),a(e,t),i(e,t),()=>{c.delete(r),s(e,t,n),a(e,t),i(e,t)}},ie=(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)},ae=(e,t,n)=>{e[25].get(n)?.forEach(e=>e())},oe=new WeakMap;function N(e){let t=oe.get(e),n=t[24];return n?n(t,e):t}function se(...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,{},b,x,S,C,w,T,E,D,O,ee,te,k,A,j,M,ne,re,void 0,new WeakMap,ie,ae,[0]].map((t,n)=>e[n]||t);oe.set(t,Object.freeze(n));let r=n[21],i=n[22],a=n[23];return t}var ce=0;function P(e,t){let n=`atom${++ce}`,r={toString(){return n}};return typeof e==`function`?r.read=e:(r.init=e,r.read=le,r.write=ue),t&&(r.write=t),r}function le(e){return e(this)}function ue(e,t,n){return t(this,typeof n==`function`?n(e(this)):n)}var de;function F(){return de?de():se()}var fe;function pe(){return fe||=F(),fe}var me=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 M(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 ne(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var re=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)},ie={map:M,forEach:function(e,t,n){M(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return M(e,function(){t++}),t},toArray:function(e){return M(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ie,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ne}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,re)}catch(e){re(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.7`})),he=o(((e,t)=>{t.exports=me()})),I=l(he(),1),ge=(0,I.createContext)(void 0);function _e(e){let t=(0,I.useContext)(ge);return e?.store||t||pe()}function ve({children:e,store:t}){let n=(0,I.useRef)(null);return t?(0,I.createElement)(ge.Provider,{value:t},e):(n.current===null&&(n.current=F()),(0,I.createElement)(ge.Provider,{value:n.current},e))}var ye=e=>typeof e?.then==`function`,be=e=>{e.status||(e.status=`pending`,e.then(t=>{e.status=`fulfilled`,e.value=t},t=>{e.status=`rejected`,e.reason=t}))},xe=I.use||(e=>{if(e.status===`pending`)throw e;if(e.status===`fulfilled`)return e.value;throw e.status===`rejected`?e.reason:(be(e),e)}),Se=new WeakMap,Ce=(e,t,n)=>{let r=N(e),i=r[26],a=Se.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();ye(t)?(Se.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)}),Se.set(t,a)),a};function L(e,t){let{delay:n,unstable_promiseStatus:r=!I.use}=t||{},i=_e(t),[[a,o,s],c]=(0,I.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,I.useEffect)(()=>{let t=i.sub(e,()=>{if(r)try{let t=i.get(e);ye(t)&&be(Ce(i,t,()=>i.get(e)))}catch{}if(typeof n==`number`){console.warn(`[DEPRECATED] delay option is deprecated and will be removed in v3.
|
|
2
|
+
|
|
3
|
+
Migration guide:
|
|
4
|
+
|
|
5
|
+
Create a custom hook like the following.
|
|
6
|
+
|
|
7
|
+
function useAtomValueWithDelay<Value>(
|
|
8
|
+
atom: Atom<Value>,
|
|
9
|
+
options: { delay: number },
|
|
10
|
+
): Value {
|
|
11
|
+
const { delay } = options
|
|
12
|
+
const store = useStore(options)
|
|
13
|
+
const [value, setValue] = useState(() => store.get(atom))
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
const unsub = store.sub(atom, () => {
|
|
16
|
+
setTimeout(() => setValue(store.get(atom)), delay)
|
|
17
|
+
})
|
|
18
|
+
return unsub
|
|
19
|
+
}, [store, atom, delay])
|
|
20
|
+
return value
|
|
21
|
+
}
|
|
22
|
+
`),setTimeout(c,n);return}c()});return c(),t},[i,e,n,r]),(0,I.useDebugValue)(l),ye(l)){let t=Ce(i,l,()=>i.get(e));return r&&be(t),xe(t)}return l}function R(e,t){let n=_e(t);return(0,I.useCallback)((...t)=>n.set(e,...t),[n,e])}function z(e,t){return[L(e,t),R(e,t)]}var we=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=Oe.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Bt(`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=>Bt(`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=bt.fromJS(i),Bt(`A server side error occurred.`,t,e,n,r)}):t!==200&&t!==204?e.text().then(e=>Bt(`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=bt.fromJS(i),Bt(`A server side error occurred.`,t,e,n,r)}):t!==200&&t!==204?e.text().then(e=>Bt(`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?xt.fromJS(n):null,t}):t!==200&&t!==204?e.text().then(e=>Bt(`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=>Bt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}},Te=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=Tt.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Bt(`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=Tt.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Bt(`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=Et.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Bt(`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=Dt.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Bt(`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=Ze.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Bt(`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(kt.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Bt(`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=>Bt(`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=>Bt(`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(it.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Bt(`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=Qe.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Bt(`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=it.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Bt(`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=>Bt(`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=>Bt(`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=>Bt(`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=>Bt(`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=St.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Bt(`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=>Bt(`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=>Bt(`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(jt.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Bt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}},Ee=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(je.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Bt(`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=>Bt(`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(je.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Bt(`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(je.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Bt(`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(je.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Bt(`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(je.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Bt(`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(je.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Bt(`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(je.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Bt(`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=St.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Bt(`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(St.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Bt(`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(St.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Bt(`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=je.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Bt(`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=je.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Bt(`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=je.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Bt(`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=je.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Bt(`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=je.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Bt(`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=je.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Bt(`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=je.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Bt(`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=je.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Bt(`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=je.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Bt(`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(dt.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Bt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}},De=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(Ft.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Bt(`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(It.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Bt(`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(Lt.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Bt(`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=>Bt(`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=>Bt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}},Oe=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}},ke=function(e){return e.DoNotShow=`DoNotShow`,e.AddBulkUnassigned=`AddBulkUnassigned`,e.LookupExistingSerial=`LookupExistingSerial`,e.ManualBarcodeScan=`ManualBarcodeScan`,e}({}),Ae=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?je.fromJS(e.LogEntry):void 0,this.newJobs=e.NewJobs?Ie.fromJS(e.NewJobs):void 0,this.newCurrentStatus=e.NewCurrentStatus?Ze.fromJS(e.NewCurrentStatus):void 0,this.editMaterialInLog=e.EditMaterialInLog?yt.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}},je=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(Me.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.containerId=e.containerId,Array.isArray(e.containerIds)){this.containerIds=[];for(let t of e.containerIds)this.containerIds.push(t)}if(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(Ne.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.containerId=this.containerId,Array.isArray(this.containerIds)){e.containerIds=[];for(let t of this.containerIds)e.containerIds.push(t)}if(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}},Me=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}},B=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.BasketIdentityHint=`BasketIdentityHint`,e.BasketContentSnapshot=`BasketContentSnapshot`,e}({}),Ne=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}},Pe=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(Fe.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}},Fe=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}},Ie=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(Le.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(We.fromJS(t))}if(Array.isArray(e.StationUseForCurrentStatus)){this.stationUseForCurrentStatus=[];for(let t of e.StationUseForCurrentStatus)this.stationUseForCurrentStatus.push(We.fromJS(t))}if(Array.isArray(e.SimDayUsage)){this.simDayUsage=[];for(let t of e.SimDayUsage)this.simDayUsage.push(Ke.fromJS(t))}if(Array.isArray(e.SimWorkordersFilled)){this.simWorkordersFilled=[];for(let t of e.SimWorkordersFilled)this.simWorkordersFilled.push(qe.fromJS(t))}if(Array.isArray(e.CurrentUnfilledWorkorders)){this.currentUnfilledWorkorders=[];for(let t of e.CurrentUnfilledWorkorders)this.currentUnfilledWorkorders.push(Je.fromJS(t))}if(Array.isArray(e.Programs)){this.programs=[];for(let t of e.Programs)this.programs.push(Xe.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}},Le=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.artifactRunDate=e.ArtifactRunDate?new Date(e.ArtifactRunDate.toString()):void 0,this.manuallyCreated=e.ManuallyCreated,this.holdEntireJob=e.HoldEntireJob?Re.fromJS(e.HoldEntireJob):void 0,this.cycles=e.Cycles,Array.isArray(e.ProcsAndPaths)){this.procsAndPaths=[];for(let t of e.ProcsAndPaths)this.procsAndPaths.push(ze.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.ArtifactRunDate=this.artifactRunDate?Rt(this.artifactRunDate):void 0,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}},Re=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}},ze=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(e.ExtraFields){this.extraFields={};for(let t in e.ExtraFields)e.ExtraFields.hasOwnProperty(t)&&(this.extraFields[t]=e.ExtraFields[t])}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(Be.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.extraFields){e.ExtraFields={};for(let t in this.extraFields)this.extraFields.hasOwnProperty(t)&&(e.ExtraFields[t]=this.extraFields[t])}if(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}},Be=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(Ve.fromJS(t))}if(Array.isArray(e.SimulatedProduction)){this.simulatedProduction=[];for(let t of e.SimulatedProduction)this.simulatedProduction.push(He.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?Re.fromJS(e.HoldMachining):void 0,this.holdLoadUnload=e.HoldLoadUnload?Re.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(Ue.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}},Ve=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}},He=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}},Ue=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}},We=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(Ge.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}},Ge=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}},Ke=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?Rt(this.day):void 0,e.MachineGroup=this.machineGroup,e.Usage=this.usage,e}},qe=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?Rt(this.started):void 0,e.Filled=this.filled?Rt(this.filled):void 0,e}},Je=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(Ye.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}},Ye=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}},Xe=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}},Ze=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]?$e.fromJS(e.Jobs[t]):new $e)}if(e.Pallets){this.pallets={};for(let t in e.Pallets)e.Pallets.hasOwnProperty(t)&&(this.pallets[t]=e.Pallets[t]?tt.fromJS(e.Pallets[t]):new tt)}if(Array.isArray(e.Material)){this.material=[];for(let t of e.Material)this.material.push(it.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]?ct.fromJS(e.Queues[t]):new ct)}if(Array.isArray(e.MachineLocations)){this.machineLocations=[];for(let t of e.MachineLocations)this.machineLocations.push(ut.fromJS(t))}if(Array.isArray(e.Workorders)){this.workorders=[];for(let t of e.Workorders)this.workorders.push(dt.fromJS(t))}if(e.Baskets){this.baskets={};for(let t in e.Baskets)e.Baskets.hasOwnProperty(t)&&(this.baskets[t]=e.Baskets[t]?ht.fromJS(e.Baskets[t]):new ht)}if(Array.isArray(e.BasketMoveInstructions)){this.basketMoveInstructions=[];for(let t of e.BasketMoveInstructions)this.basketMoveInstructions.push(vt.fromJS(t))}this.customState=e.CustomState}}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)}if(Array.isArray(this.basketMoveInstructions)){e.BasketMoveInstructions=[];for(let t of this.basketMoveInstructions)e.BasketMoveInstructions.push(t?t.toJSON():void 0)}return e.CustomState=this.customState,e}},Qe=class e extends Le{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(et.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}},$e=class e extends Qe{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}},et=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}},tt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.currentPalletLocation=new nt)}init(e){if(e){if(this.palletNum=e.PalletNum,this.fixtureOnPallet=e.FixtureOnPallet,this.onHold=e.OnHold,this.currentPalletLocation=e.CurrentPalletLocation?nt.fromJS(e.CurrentPalletLocation):new nt,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?nt.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}},nt=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}},rt=function(e){return e.LoadUnload=`LoadUnload`,e.Machine=`Machine`,e.MachineQueue=`MachineQueue`,e.Buffer=`Buffer`,e.Cart=`Cart`,e}({}),it=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.signaledInspections=[],this.location=new at,this.action=new st)}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?at.fromJS(e.Location):new at,this.action=e.Action?st.fromJS(e.Action):new st}}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}},at=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.basketSlot=e.BasketSlot)}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.BasketSlot=this.basketSlot,e}},ot=function(e){return e.Free=`Free`,e.OnPallet=`OnPallet`,e.InQueue=`InQueue`,e.InBasket=`InBasket`,e}({}),st=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.workId=e.WorkId,this.loadOntoPalletNum=e.LoadOntoPalletNum,this.loadOntoFace=e.LoadOntoFace,this.processAfterLoad=e.ProcessAfterLoad,this.pathAfterLoad=e.PathAfterLoad,this.loadFromBasketId=e.LoadFromBasketId,this.loadToBasketId=e.LoadToBasketId,this.loadToBasketSlot=e.LoadToBasketSlot,this.unloadIntoQueue=e.UnloadIntoQueue,this.unloadToBasketId=e.UnloadToBasketId,this.unloadToBasketSlot=e.UnloadToBasketSlot,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.WorkId=this.workId,e.LoadOntoPalletNum=this.loadOntoPalletNum,e.LoadOntoFace=this.loadOntoFace,e.ProcessAfterLoad=this.processAfterLoad,e.PathAfterLoad=this.pathAfterLoad,e.LoadFromBasketId=this.loadFromBasketId,e.LoadToBasketId=this.loadToBasketId,e.LoadToBasketSlot=this.loadToBasketSlot,e.UnloadIntoQueue=this.unloadIntoQueue,e.UnloadToBasketId=this.unloadToBasketId,e.UnloadToBasketSlot=this.unloadToBasketSlot,e.ElapsedLoadUnloadTime=this.elapsedLoadUnloadTime,e.Program=this.program,e.ElapsedMachiningTime=this.elapsedMachiningTime,e.ExpectedRemainingMachiningTime=this.expectedRemainingMachiningTime,e}},V=function(e){return e.Waiting=`Waiting`,e.Loading=`Loading`,e.UnloadToInProcess=`UnloadToInProcess`,e.UnloadToCompletedMaterial=`UnloadToCompletedMaterial`,e.Machining=`Machining`,e.LoadingToBasket=`LoadingToBasket`,e}({}),ct=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}},lt=function(e){return e.RawMaterial=`RawMaterial`,e.InProcessTransfer=`InProcessTransfer`,e.Quarantine=`Quarantine`,e.Other=`Other`,e}({}),ut=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}},dt=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(ft.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(pt.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?Rt(this.simulatedStart):void 0,e.SimulatedFilled=this.simulatedFilled?Rt(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}},ft=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}},pt=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}},mt=function(e){return e.None=`None`,e.ClosedOut=`ClosedOut`,e.CloseOutFailed=`CloseOutFailed`,e}({}),ht=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.position=new gt)}init(e){if(e){if(this.basketId=e.BasketId,this.position=e.Position?gt.fromJS(e.Position):new gt,Array.isArray(e.EmptySlots)){this.emptySlots=[];for(let t of e.EmptySlots)this.emptySlots.push(t)}if(Array.isArray(e.UnknownSlots)){this.unknownSlots=[];for(let t of e.UnknownSlots)this.unknownSlots.push(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.BasketId=this.basketId,e.Position=this.position?this.position.toJSON():void 0,Array.isArray(this.emptySlots)){e.EmptySlots=[];for(let t of this.emptySlots)e.EmptySlots.push(t)}if(Array.isArray(this.unknownSlots)){e.UnknownSlots=[];for(let t of this.unknownSlots)e.UnknownSlots.push(t)}return e}},gt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.location=e.Location,this.locationNum=e.LocationNum,this.locationTitle=e.LocationTitle,this.zone=e.Zone)}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.Location=this.location,e.LocationNum=this.locationNum,e.LocationTitle=this.locationTitle,e.Zone=this.zone,e}},_t=function(e){return e.LoadUnload=`LoadUnload`,e.LoadStationStaging=`LoadStationStaging`,e.Storage=`Storage`,e.InTransit=`InTransit`,e}({}),vt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.source=new gt,this.destination=new gt)}init(e){e&&(this.instructionId=e.InstructionId,this.basketId=e.BasketId,this.source=e.Source?gt.fromJS(e.Source):new gt,this.destination=e.Destination?gt.fromJS(e.Destination):new gt,this.reason=e.Reason,this.displayText=e.DisplayText,this.prerequisiteInstructionId=e.PrerequisiteInstructionId)}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.InstructionId=this.instructionId,e.BasketId=this.basketId,e.Source=this.source?this.source.toJSON():void 0,e.Destination=this.destination?this.destination.toJSON():void 0,e.Reason=this.reason,e.DisplayText=this.displayText,e.PrerequisiteInstructionId=this.prerequisiteInstructionId,e}},yt=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(je.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}},bt=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}},xt=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?St.fromJS(e.ExistingMaterial):void 0,this.potentialNewMaterial=e.PotentialNewMaterial?Ct.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}},St=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}},Ct=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=>wt.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}},wt=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}},Tt=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]?Qe.fromJS(e.Jobs[t]):new Qe)}if(Array.isArray(e.StationUse)){this.stationUse=[];for(let t of e.StationUse)this.stationUse.push(We.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}},Et=class e extends Tt{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(Ke.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}},Dt=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(Qe.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.RecentArtifactRuns)){this.recentArtifactRuns=[];for(let t of e.RecentArtifactRuns)this.recentArtifactRuns.push(Ot.fromJS(t))}if(Array.isArray(e.UnscheduledRebookings)){this.unscheduledRebookings=[];for(let t of e.UnscheduledRebookings)this.unscheduledRebookings.push(kt.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.recentArtifactRuns)){e.RecentArtifactRuns=[];for(let t of this.recentArtifactRuns)e.RecentArtifactRuns.push(t?t.toJSON():void 0)}if(Array.isArray(this.unscheduledRebookings)){e.UnscheduledRebookings=[];for(let t of this.unscheduledRebookings)e.UnscheduledRebookings.push(t?t.toJSON():void 0)}return e}},Ot=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.partName=e.PartName,this.artifactRunDate=e.ArtifactRunDate?new Date(e.ArtifactRunDate.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.JobUnique=this.jobUnique,e.PartName=this.partName,e.ArtifactRunDate=this.artifactRunDate?Rt(this.artifactRunDate):void 0,e}},kt=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}},At=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}},jt=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}},Mt=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}},Nt=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}},Pt=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}},Ft=class e extends Pt{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}},It=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}},Lt=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 Rt(e){return e.getUTCFullYear()+`-`+(e.getUTCMonth()<9?`0`+(e.getUTCMonth()+1):e.getUTCMonth()+1)+`-`+(e.getUTCDate()<10?`0`+e.getUTCDate():e.getUTCDate())}var zt=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 Bt(e,t,n,r,i){throw i??new zt(e,t,n,r,null)}var Vt,Ht,Ut,Wt,Gt=[],Kt=[],qt;function Jt(){Ut=new Ee,Wt=new De,Ht=new Te,Vt=new we}function Yt(e){Gt=e,Kt=e.map(e=>new Ee(e))}function Xt(e){qt=e.access_token;let t={fetch:Zt};Vt=new we(void 0,t),Ht=new Te(void 0,t),Ut=new Ee(void 0,t),Kt=Gt.map(e=>new Ee(e,t))}function Zt(e,t){let n=new Headers(t?.headers);return qt&&n.set(`Authorization`,`Bearer `+qt),window.fetch(e,t?{...t,headers:n}:{headers:n})}function Qt(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 $t=class extends Error{};$t.prototype.name=`InvalidTokenError`;function en(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 tn(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 en(t)}catch{return atob(t)}}function nn(e,t){if(typeof e!=`string`)throw new $t(`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 $t(`Invalid token specified: missing part #${n+1}`);let i;try{i=tn(r)}catch(e){throw new $t(`Invalid token specified: invalid base64 for part #${n+1} (${e.message})`)}try{return JSON.parse(i)}catch(e){throw new $t(`Invalid token specified: invalid json for part #${n+1} (${e.message})`)}}var rn={debug:()=>void 0,info:()=>void 0,warn:()=>void 0,error:()=>void 0},an,on,sn=(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))(sn||{});(e=>{function t(){an=3,on=rn}e.reset=t;function n(e){if(!(0<=e&&e<=4))throw Error(`Invalid log level`);an=e}e.setLevel=n;function r(e){on=e}e.setLogger=r})(sn||={});var cn=class e{constructor(e){this._name=e}debug(...t){an>=4&&on.debug(e._format(this._name,this._method),...t)}info(...t){an>=3&&on.info(e._format(this._name,this._method),...t)}warn(...t){an>=2&&on.warn(e._format(this._name,this._method),...t)}error(...t){an>=1&&on.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){an>=4&&on.debug(e._format(t),...n)}static info(t,...n){an>=3&&on.info(e._format(t),...n)}static warn(t,...n){an>=2&&on.warn(e._format(t),...n)}static error(t,...n){an>=1&&on.error(e._format(t),...n)}};sn.reset();var ln=class{static decode(e){try{return nn(e)}catch(e){throw cn.error(`JwtUtils.decode`,e),e}}static async generateSignedJwt(e,t,n){let r=`${pn.encodeBase64Url(new TextEncoder().encode(JSON.stringify(e)))}.${pn.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}.${pn.encodeBase64Url(new Uint8Array(i))}`}static async generateSignedJwtWithHmac(e,t,n){let r=`${pn.encodeBase64Url(new TextEncoder().encode(JSON.stringify(e)))}.${pn.encodeBase64Url(new TextEncoder().encode(JSON.stringify(t)))}`,i=await window.crypto.subtle.sign(`HMAC`,n,new TextEncoder().encode(r));return`${r}.${pn.encodeBase64Url(new Uint8Array(i))}`}},un=`10000000-1000-4000-8000-100000000000`,dn=e=>btoa([...new Uint8Array(e)].map(e=>String.fromCharCode(e)).join(``)),fn=class e{static _randomWord(){let e=new Uint32Array(1);return crypto.getRandomValues(e),e[0]}static generateUUIDv4(){return un.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 dn(await crypto.subtle.digest(`SHA-256`,t)).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}catch(e){throw cn.error(`CryptoUtils.generateCodeChallenge`,e),e}}static generateBasicAuth(e,t){return dn(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 ln.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 ln.generateSignedJwtWithHmac(o,s,u)}};fn.encodeBase64Url=e=>dn(e).replace(/=/g,``).replace(/\+/g,`-`).replace(/\//g,`_`);var pn=fn,mn=class{constructor(e){this._name=e,this._callbacks=[],this._logger=new cn(`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)}},hn=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(`,`)}},gn=class e extends mn{constructor(){super(...arguments),this._logger=new cn(`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)}},_n=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))}},vn=`;`,yn=class extends Error{constructor(e,t){if(super(e.error_description||e.error||``),this.form=t,this.name=`ErrorResponse`,!e.error)throw cn.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}},bn=class extends Error{constructor(e){super(e),this.name=`ErrorTimeout`}},xn=class{constructor(e){this._logger=new cn(`AccessTokenEvents`),this._expiringTimer=new gn(`Access token expiring`),this._expiredTimer=new gn(`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)}},Sn=class{constructor(e,t,n,r,i){this._callback=e,this._client_id=t,this._intervalInSeconds=r,this._stopOnError=i,this._logger=new cn(`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)}},Cn=class{constructor(){this._logger=new cn(`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]}},wn=class extends Error{constructor(e,t){super(t),this.name=`ErrorDPoPNonce`,this.nonce=e}},Tn=class{constructor(e=[],t=null,n={}){this._jwtHandler=t,this._extraHeaders=n,this._logger=new cn(`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 bn(`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 yn(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 wn(c.headers.get(`dpop-nonce`),`${JSON.stringify(d)}`):d.error?new yn(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)})}},En=class{constructor(e){this._settings=e,this._logger=new cn(`MetadataService`),this._signingKeys=null,this._metadata=null,this._metadataUrl=this._settings.metadataUrl,this._jsonService=new Tn([`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}},Dn=class{constructor({prefix:e=`oidc.`,store:t=localStorage}={}){this._logger=new cn(`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}},On=`code`,kn=`openid`,An=`client_secret_post`,jn=900,Mn=class{constructor({authority:e,metadataUrl:t,metadata:n,signingKeys:r,metadataSeed:i,client_id:a,client_secret:o,response_type:s=On,scope:c=kn,redirect_uri:l,post_logout_redirect_uri:u,client_authentication:d=An,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=jn,mergeClaimsStrategy:w={array:`replace`},disablePKCE:T=!1,stateStore:E,revokeTokenAdditionalContentTypes:D,fetchRequestCredentials:O,refreshTokenAllowedScope:ee,extraQueryParams:te={},extraTokenParams:k={},extraHeaders:A={},dpop:j,omitScopeWhenRequesting:M=!1}){if(this.authority=e,t?this.metadataUrl=t:(this.metadataUrl=e,e&&(this.metadataUrl.endsWith(`/`)||(this.metadataUrl+=`/`),this.metadataUrl+=`.well-known/openid-configuration`)),this.metadata=n,this.metadataSeed=i,this.signingKeys=r,this.client_id=a,this.client_secret=o,this.response_type=s,this.scope=c,this.redirect_uri=l,this.post_logout_redirect_uri=u,this.client_authentication=d,this.token_endpoint_auth_signing_alg=f,this.prompt=p,this.display=m,this.max_age=h,this.ui_locales=g,this.acr_values=_,this.resource=v,this.response_mode=y,this.filterProtocolClaims=b??!0,this.loadUserInfo=!!x,this.staleStateAgeInSeconds=C,this.mergeClaimsStrategy=w,this.omitScopeWhenRequesting=M,this.disablePKCE=!!T,this.revokeTokenAdditionalContentTypes=D,this.fetchRequestCredentials=O||`same-origin`,this.requestTimeoutInSeconds=S,E)this.stateStore=E;else{let e=typeof window<`u`?window.localStorage:new Cn;this.stateStore=new Dn({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`)}},Nn=class{constructor(e,t){this._settings=e,this._metadataService=t,this._logger=new cn(`UserInfoService`),this._getClaimsFromJwt=async e=>{let t=this._logger.create(`_getClaimsFromJwt`);try{let n=ln.decode(e);return t.debug(`JWT decoding successful`),n}catch(e){throw t.error(`Error parsing JWT response`),e}},this._jsonService=new Tn(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}},Pn=class{constructor(e,t){this._settings=e,this._metadataService=t,this._logger=new cn(`TokenClient`),this._jsonService=new Tn(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=pn.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 pn.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=pn.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 pn.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=pn.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 pn.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`)}},Fn=class{constructor(e,t,n){this._settings=e,this._metadataService=t,this._claimsService=n,this._logger=new cn(`ResponseValidator`),this._userInfoService=new Nn(this._settings,this._metadataService),this._tokenClient=new Pn(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 yn(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 yn(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=ln.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=ln.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}},In=class e{constructor(e){this.id=e.id||pn.generateUUIDv4(),this.data=e.data,e.created&&e.created>0?this.created=e.created:this.created=gn.getEpochTime(),this.request_type=e.request_type,this.url_state=e.url_state}toStorageString(){return new cn(`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 cn.createStatic(`State`,`fromStorageString`),Promise.resolve(new e(JSON.parse(t)))}static async clearStaleState(t,n){let r=cn.createStatic(`State`,`clearStaleState`),i=gn.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))}}},Ln=class e extends In{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?pn.generateCodeVerifier():t.code_verifier||void 0,r=n?await pn.generateCodeChallenge(n):void 0;return new e({...t,code_verifier:n,code_challenge:r})}toStorageString(){return new cn(`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){cn.createStatic(`SigninState`,`fromStorageString`);let n=JSON.parse(t);return e.create(n)}},Rn=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 Ln.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}${vn}${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})}};Rn._logger=new cn(`SigninRequest`);var zn=Rn,Bn=`openid`,Vn=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(vn);this.state=e[0],e.length>1&&(this.url_state=e.slice(1).join(vn))}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-gn.getEpochTime()}set expires_in(e){typeof e==`string`&&(e=Number(e)),e!==void 0&&e>=0&&(this.expires_at=Math.floor(e)+gn.getEpochTime())}get isOpenId(){return this.scope?.split(` `).includes(Bn)||!!this.id_token}},Hn=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 cn(`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 In({data:t,request_type:a,url_state:s});let e=this.state.id;s&&(e=`${e}${vn}${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}},Un=class{constructor(e){if(this.state=e.get(`state`),this.state){let e=decodeURIComponent(this.state).split(vn);this.state=e[0],e.length>1&&(this.url_state=e.slice(1).join(vn))}this.error=e.get(`error`),this.error_description=e.get(`error_description`),this.error_uri=e.get(`error_uri`)}},Wn=[`nbf`,`jti`,`auth_time`,`nonce`,`acr`,`amr`,`azp`,`at_hash`],Gn=[`sub`,`iss`,`aud`,`exp`,`iat`],Kn=class{constructor(e){this._settings=e,this._logger=new cn(`ClaimsService`)}filterProtocolClaims(e){let t={...e};if(this._settings.filterProtocolClaims){let e;e=Array.isArray(this._settings.filterProtocolClaims)?this._settings.filterProtocolClaims:Wn;for(let n of e)Gn.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}},qn=class{constructor(e,t){this.keys=e,this.nonce=t}},Jn=class{constructor(e,t){this._logger=new cn(`OidcClient`),this.settings=e instanceof Mn?e:new Mn(e),this.metadataService=t??new En(this.settings),this._claimsService=new Kn(this.settings),this._validator=new Fn(this.settings,this.metadataService,this._claimsService),this._tokenClient=new Pn(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 zn.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 Vn(_n.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 Ln.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 wn&&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 pn.generateDPoPKeys(),r=new qn(n,t),await e.set(this.settings.client_id,r)),await pn.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 Vn(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 wn&&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 Vn(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 Hn({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 Un(_n.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 yn(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 In.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`),In.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})}},Yn=class{constructor(e){this._userManager=e,this._logger=new cn(`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 Sn(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)}}}},Xn=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-gn.getEpochTime()}set expires_in(e){e!==void 0&&(this.expires_at=Math.floor(e)+gn.getEpochTime())}get expired(){let e=this.expires_in;if(e!==void 0)return e<=0}get scopes(){return this.scope?.split(` `)??[]}toStorageString(){return new cn(`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 cn.createStatic(`User`,`fromStorageString`),new e(JSON.parse(t))}},Zn=`oidc-client`,Qn=class{constructor(){this._abort=new mn(`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!==Zn)){try{let n=_n.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:Zn,url:t,keepOpen:n},a=new cn(`_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()}}},$n={location:!1,toolbar:!1,height:640,closePopupWindowAfterInSeconds:-1},er=`_blank`,tr=60,nr=2,rr=10,ir=class extends Mn{constructor(e){let{popup_redirect_uri:t=e.redirect_uri,popup_post_logout_redirect_uri:n=e.post_logout_redirect_uri,popupWindowFeatures:r=$n,popupWindowTarget:i=er,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:_=nr,query_status_response_type:v=`code`,stopCheckSessionOnError:y=!0,revokeTokenTypes:b=[`access_token`,`refresh_token`],revokeTokensOnSignout:x=!1,includeIdTokenInSilentSignout:S=!1,accessTokenExpiringNotificationTimeInSeconds:C=tr,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||rr,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 Cn;this.userStore=new Dn({store:e})}}},ar=class e extends Qn{constructor({silentRequestTimeoutInSeconds:t=rr}){super(),this._logger=new cn(`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 bn(`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)}},or=class{constructor(e){this._settings=e,this._logger=new cn(`IFrameNavigator`)}async prepare({silentRequestTimeoutInSeconds:e=this._settings.silentRequestTimeoutInSeconds}){return new ar({silentRequestTimeoutInSeconds:e})}async callback(e){this._logger.create(`callback`),ar.notifyParent(e,this._settings.iframeNotifyParentOrigin)}},sr=500,cr=1e3,lr=class extends Qn{constructor({popupWindowTarget:e=er,popupWindowFeatures:t={},popupSignal:n,popupAbortOnClose:r}){super(),this._logger=new cn(`PopupWindow`);let i=hn.center({...$n,...t});this._window=window.open(void 0,e,hn.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*cr)}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`)))},sr),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()}},ur=class{constructor(e){this._settings=e,this._logger=new cn(`PopupNavigator`)}async prepare({popupWindowFeatures:e=this._settings.popupWindowFeatures,popupWindowTarget:t=this._settings.popupWindowTarget,popupSignal:n,popupAbortOnClose:r}){return new lr({popupWindowFeatures:e,popupWindowTarget:t,popupSignal:n,popupAbortOnClose:r})}async callback(e,{keepOpen:t=!1}){this._logger.create(`callback`),lr.notifyOpener(e,t)}},dr=class{constructor(e){this._settings=e,this._logger=new cn(`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(){}},fr=class extends xn{constructor(e){super({expiringNotificationTimeInSeconds:e.accessTokenExpiringNotificationTimeInSeconds}),this._logger=new cn(`UserManagerEvents`),this._userLoaded=new mn(`User loaded`),this._userUnloaded=new mn(`User unloaded`),this._silentRenewError=new mn(`Silent renew error`),this._userSignedIn=new mn(`User signed in`),this._userSignedOut=new mn(`User signed out`),this._userSessionChanged=new mn(`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()}},pr=class{constructor(e){this._userManager=e,this._logger=new cn(`SilentRenewService`),this._isStarted=!1,this._retryTimer=new gn(`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 bn){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)}},mr=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}},hr=class{constructor(e,t,n,r){this._logger=new cn(`UserManager`),this.settings=new ir(e),this._client=new Jn(e),this._redirectNavigator=t??new dr(this.settings),this._popupNavigator=n??new ur(this.settings),this._iframeNavigator=r??new or(this.settings),this._events=new fr(this.settings),this._silentRenewService=new pr(this),this.settings.automaticSilentRenew&&this.startSilentRenew(),this._sessionMonitor=null,this.settings.monitorSession&&(this._sessionMonitor=new Yn(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 mr(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 Xn({...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 yn)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 Xn(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 yn({...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`),Xn.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 pn.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 qn(await pn.generateDPoPKeys()),await e.store.set(this.settings.client_id,t)),await pn.generateDPoPJkt(t.keys)}},gr;function _r(e){return e.openIDConnectClientId?location.hostname===`localhost`?!!e.localhostOpenIDConnectAuthority:!!e.openIDConnectAuthority:!1}async function vr(){let e=await Vt.fMSInformation();e.additionalLogServers&&e.additionalLogServers.length>0&&Yt(e.additionalLogServers);let t=null;if(_r(e)){if(gr=new hr({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 gr.getUser(),!t){try{t=await gr.signinRedirectCallback()}catch{t=null}window.history.replaceState({},``,`/`)}t&&(Xt(t),localStorage.setItem(`current-operator`,t.profile.name||t.profile.sub))}return{...e,user:t===null?void 0:t}}var yr=P({name:`FMS Insight`,version:``});function br(e){gr&&!e.user&&gr.signinRedirect().catch(e=>console.log(e))}function xr(){gr&&gr.signoutRedirect().catch(e=>console.log(e))}var Sr=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}}}})),Cr=o(((e,t)=>{t.exports=Sr()})),wr=o((e=>{var t=he();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.7`})),Tr=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=wr()})),Er=o((e=>{var t=Cr(),n=he(),r=Tr();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 d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),m=Symbol.for(`react.transitional.element`),h=Symbol.for(`react.portal`),g=Symbol.for(`react.fragment`),_=Symbol.for(`react.strict_mode`),v=Symbol.for(`react.profiler`),y=Symbol.for(`react.consumer`),b=Symbol.for(`react.context`),x=Symbol.for(`react.forward_ref`),S=Symbol.for(`react.suspense`),C=Symbol.for(`react.suspense_list`),w=Symbol.for(`react.memo`),T=Symbol.for(`react.lazy`),E=Symbol.for(`react.activity`),D=Symbol.for(`react.memo_cache_sentinel`),O=Symbol.iterator;function ee(e){return typeof e!=`object`||!e?null:(e=O&&e[O]||e[`@@iterator`],typeof e==`function`?e:null)}var te=Symbol.for(`react.client.reference`);function k(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case g:return`Fragment`;case v:return`Profiler`;case _:return`StrictMode`;case S:return`Suspense`;case C:return`SuspenseList`;case E:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case h:return`Portal`;case b:return e.displayName||`Context`;case y:return(e._context.displayName||`Context`)+`.Consumer`;case x:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case w:return t=e.displayName||null,t===null?k(e.type)||`Memo`:t;case T:t=e._payload,e=e._init;try{return k(e(t))}catch{}}return null}var A=Array.isArray,j=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},re=[],ie=-1;function ae(e){return{current:e}}function oe(e){0>ie||(e.current=re[ie],re[ie]=null,ie--)}function N(e,t){ie++,re[ie]=e.current,e.current=t}var se=ae(null),ce=ae(null),P=ae(null),le=ae(null);function ue(e,t){switch(N(P,t),N(ce,e),N(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Jd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Jd(t),e=Yd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}oe(se),N(se,e)}function de(){oe(se),oe(ce),oe(P)}function F(e){e.memoizedState!==null&&N(le,e);var t=se.current,n=Yd(t,e.type);t!==n&&(N(ce,e),N(se,n))}function fe(e){ce.current===e&&(oe(se),oe(ce)),le.current===e&&(oe(le),ap._currentValue=ne)}var pe,me;function I(e){if(pe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);pe=t&&t[1]||``,me=-1<e.stack.indexOf(`
|
|
23
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
24
|
+
`+pe+e+me}var ge=!1;function _e(e,t){if(!e||ge)return``;ge=!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(`
|
|
25
|
+
`),l=s.split(`
|
|
26
|
+
`);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=`
|
|
27
|
+
`+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{ge=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?I(n):``}function ve(e,t){switch(e.tag){case 26:case 27:case 5:return I(e.type);case 16:return I(`Lazy`);case 13:return e.child!==t&&t!==null?I(`Suspense Fallback`):I(`Suspense`);case 19:return I(`SuspenseList`);case 0:case 15:return _e(e.type,!1);case 11:return _e(e.type.render,!1);case 1:return _e(e.type,!0);case 31:return I(`Activity`);default:return``}}function ye(e){try{var t=``,n=null;do t+=ve(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
28
|
+
Error generating stack: `+e.message+`
|
|
29
|
+
`+e.stack}}var be=Object.prototype.hasOwnProperty,xe=t.unstable_scheduleCallback,Se=t.unstable_cancelCallback,Ce=t.unstable_shouldYield,L=t.unstable_requestPaint,R=t.unstable_now,z=t.unstable_getCurrentPriorityLevel,we=t.unstable_ImmediatePriority,Te=t.unstable_UserBlockingPriority,Ee=t.unstable_NormalPriority,De=t.unstable_LowPriority,Oe=t.unstable_IdlePriority,ke=t.log,Ae=t.unstable_setDisableYieldValue,je=null,Me=null;function B(e){if(typeof ke==`function`&&Ae(e),Me&&typeof Me.setStrictMode==`function`)try{Me.setStrictMode(je,e)}catch{}}var Ne=Math.clz32?Math.clz32:Ie,Pe=Math.log,Fe=Math.LN2;function Ie(e){return e>>>=0,e===0?32:31-(Pe(e)/Fe|0)|0}var Le=256,Re=262144,ze=4194304;function Be(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 Ve(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=Be(n))):i=Be(o):i=Be(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Be(n))):i=Be(o)):i=Be(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 He(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ue(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 We(){var e=ze;return ze<<=1,!(ze&62914560)&&(ze=4194304),e}function Ge(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ke(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function qe(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-Ne(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&&Je(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Je(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ne(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ye(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ne(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Xe(e,t){var n=t&-t;return n=n&42?1:Ze(n),(n&(e.suspendedLanes|t))===0?n:0}function Ze(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 Qe(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function $e(){var e=M.p;return e===0?(e=window.event,e===void 0?32:xp(e.type)):e}function et(e,t){var n=M.p;try{return M.p=e,t()}finally{M.p=n}}var tt=Math.random().toString(36).slice(2),nt=`__reactFiber$`+tt,rt=`__reactProps$`+tt,it=`__reactContainer$`+tt,at=`__reactEvents$`+tt,ot=`__reactListeners$`+tt,st=`__reactHandles$`+tt,V=`__reactResources$`+tt,ct=`__reactMarker$`+tt;function lt(e){delete e[nt],delete e[rt],delete e[at],delete e[ot],delete e[st]}function ut(e){var t=e[nt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[it]||n[nt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=vf(e);e!==null;){if(n=e[nt])return n;e=vf(e)}return t}e=n,n=e.parentNode}return null}function dt(e){if(e=e[nt]||e[it]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ft(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function pt(e){var t=e[V];return t||=e[V]={hoistableStyles:new Map,hoistableScripts:new Map},t}function mt(e){e[ct]=!0}var ht=new Set,gt={};function _t(e,t){vt(e,t),vt(e+`Capture`,t)}function vt(e,t){for(gt[e]=t,e=0;e<t.length;e++)ht.add(t[e])}var yt=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]*$`),bt={},xt={};function St(e){return be.call(xt,e)?!0:be.call(bt,e)?!1:yt.test(e)?xt[e]=!0:(bt[e]=!0,!1)}function Ct(e,t,n){if(St(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 wt(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 Tt(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 Et(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Dt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Ot(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 kt(e){if(!e._valueTracker){var t=Dt(e)?`checked`:`value`;e._valueTracker=Ot(e,t,``+e[t])}}function At(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Dt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function jt(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 Mt=/[\n"\\]/g;function Nt(e){return e.replace(Mt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Pt(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=``+Et(t)):e.value!==``+Et(t)&&(e.value=``+Et(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):It(e,o,Et(n)):It(e,o,Et(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=``+Et(s):e.removeAttribute(`name`)}function Ft(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)){kt(e);return}n=n==null?``:``+Et(n),t=t==null?n:``+Et(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),kt(e)}function It(e,t,n){t===`number`&&jt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Lt(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=``+Et(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 Rt(e,t,n){if(t!=null&&(t=``+Et(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Et(n)}function zt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(A(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Et(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),kt(e)}function Bt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Vt=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 Ht(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||Vt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Ut(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&&Ht(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Ht(e,o,t[o])}function Wt(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 Gt=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`]]),Kt=/^[\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 qt(e){return Kt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Jt(){}var Yt=null;function Xt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Zt=null,Qt=null;function $t(e){var t=dt(e);if(t&&(e=t.stateNode)){var n=e[rt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Pt(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="`+Nt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[rt]||null;if(!a)throw Error(i(90));Pt(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&&At(r)}break a;case`textarea`:Rt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Lt(e,!!n.multiple,t,!1)}}}var en=!1;function tn(e,t,n){if(en)return e(t,n);en=!0;try{return e(t)}finally{if(en=!1,(Zt!==null||Qt!==null)&&(Du(),Zt&&(t=Zt,e=Qt,Qt=Zt=null,$t(t),e)))for(t=0;t<e.length;t++)$t(e[t])}}function nn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[rt]||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 rn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),an=!1;if(rn)try{var on={};Object.defineProperty(on,"passive",{get:function(){an=!0}}),window.addEventListener(`test`,on,on),window.removeEventListener(`test`,on,on)}catch{an=!1}var sn=null,cn=null,ln=null;function un(){if(ln)return ln;var e,t=cn,n=t.length,r,i=`value`in sn?sn.value:sn.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 ln=i.slice(e,1<r?1-r:void 0)}function dn(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 fn(){return!0}function pn(){return!1}function mn(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)?fn:pn,this.isPropagationStopped=pn,this}return f(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=fn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=fn)},persist:function(){},isPersistent:fn}),t}var hn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gn=mn(hn),_n=f({},hn,{view:0,detail:0}),vn=mn(_n),yn,bn,xn,Sn=f({},_n,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Nn,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!==xn&&(xn&&e.type===`mousemove`?(yn=e.screenX-xn.screenX,bn=e.screenY-xn.screenY):bn=yn=0,xn=e),yn)},movementY:function(e){return`movementY`in e?e.movementY:bn}}),Cn=mn(Sn),wn=mn(f({},Sn,{dataTransfer:0})),Tn=mn(f({},_n,{relatedTarget:0})),En=mn(f({},hn,{animationName:0,elapsedTime:0,pseudoElement:0})),Dn=mn(f({},hn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),On=mn(f({},hn,{data:0})),kn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},An={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`},jn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Mn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=jn[e])?!!t[e]:!1}function Nn(){return Mn}var Pn=mn(f({},_n,{key:function(e){if(e.key){var t=kn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=dn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?An[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Nn,charCode:function(e){return e.type===`keypress`?dn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?dn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Fn=mn(f({},Sn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),In=mn(f({},_n,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Nn})),Ln=mn(f({},hn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Rn=mn(f({},Sn,{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})),zn=mn(f({},hn,{newState:0,oldState:0})),Bn=[9,13,27,32],Vn=rn&&`CompositionEvent`in window,Hn=null;rn&&`documentMode`in document&&(Hn=document.documentMode);var Un=rn&&`TextEvent`in window&&!Hn,Wn=rn&&(!Vn||Hn&&8<Hn&&11>=Hn),Gn=` `,Kn=!1;function qn(e,t){switch(e){case`keyup`:return Bn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Jn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Yn=!1;function Xn(e,t){switch(e){case`compositionend`:return Jn(t);case`keypress`:return t.which===32?(Kn=!0,Gn):null;case`textInput`:return e=t.data,e===Gn&&Kn?null:e;default:return null}}function Zn(e,t){if(Yn)return e===`compositionend`||!Vn&&qn(e,t)?(e=un(),ln=cn=sn=null,Yn=!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 Wn&&t.locale!==`ko`?null:t.data;default:return null}}var Qn={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 $n(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Qn[e.type]:t===`textarea`}function er(e,t,n,r){Zt?Qt?Qt.push(r):Qt=[r]:Zt=r,t=Nd(t,`onChange`),0<t.length&&(n=new gn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var tr=null,nr=null;function rr(e){Ed(e,0)}function ir(e){if(At(ft(e)))return e}function ar(e,t){if(e===`change`)return t}var or=!1;if(rn){var sr;if(rn){var cr=`oninput`in document;if(!cr){var lr=document.createElement(`div`);lr.setAttribute(`oninput`,`return;`),cr=typeof lr.oninput==`function`}sr=cr}else sr=!1;or=sr&&(!document.documentMode||9<document.documentMode)}function ur(){tr&&(tr.detachEvent(`onpropertychange`,dr),nr=tr=null)}function dr(e){if(e.propertyName===`value`&&ir(nr)){var t=[];er(t,nr,e,Xt(e)),tn(rr,t)}}function fr(e,t,n){e===`focusin`?(ur(),tr=t,nr=n,tr.attachEvent(`onpropertychange`,dr)):e===`focusout`&&ur()}function pr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return ir(nr)}function mr(e,t){if(e===`click`)return ir(t)}function hr(e,t){if(e===`input`||e===`change`)return ir(t)}function gr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var _r=typeof Object.is==`function`?Object.is:gr;function vr(e,t){if(_r(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(!be.call(t,i)||!_r(e[i],t[i]))return!1}return!0}function yr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function br(e,t){var n=yr(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=yr(n)}}function xr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?xr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Sr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=jt(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=jt(e.document)}return t}function wr(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 Er=rn&&`documentMode`in document&&11>=document.documentMode,Dr=null,Or=null,kr=null,Ar=!1;function jr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ar||Dr==null||Dr!==jt(r)||(r=Dr,`selectionStart`in r&&wr(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}),kr&&vr(kr,r)||(kr=r,r=Nd(Or,`onSelect`),0<r.length&&(t=new gn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Dr)))}function Mr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Nr={animationend:Mr(`Animation`,`AnimationEnd`),animationiteration:Mr(`Animation`,`AnimationIteration`),animationstart:Mr(`Animation`,`AnimationStart`),transitionrun:Mr(`Transition`,`TransitionRun`),transitionstart:Mr(`Transition`,`TransitionStart`),transitioncancel:Mr(`Transition`,`TransitionCancel`),transitionend:Mr(`Transition`,`TransitionEnd`)},Pr={},Fr={};rn&&(Fr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Nr.animationend.animation,delete Nr.animationiteration.animation,delete Nr.animationstart.animation),`TransitionEvent`in window||delete Nr.transitionend.transition);function Ir(e){if(Pr[e])return Pr[e];if(!Nr[e])return e;var t=Nr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Fr)return Pr[e]=t[n];return e}var Lr=Ir(`animationend`),Rr=Ir(`animationiteration`),zr=Ir(`animationstart`),Br=Ir(`transitionrun`),Vr=Ir(`transitionstart`),Hr=Ir(`transitioncancel`),Ur=Ir(`transitionend`),Wr=new Map,Gr=`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(` `);Gr.push(`scrollEnd`);function Kr(e,t){Wr.set(e,t),_t(t,[e])}var qr=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)},Jr=[],Yr=0,Xr=0;function Zr(){for(var e=Yr,t=Xr=Yr=0;t<e;){var n=Jr[t];Jr[t++]=null;var r=Jr[t];Jr[t++]=null;var i=Jr[t];Jr[t++]=null;var a=Jr[t];if(Jr[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&&ti(n,i,a)}}function Qr(e,t,n,r){Jr[Yr++]=e,Jr[Yr++]=t,Jr[Yr++]=n,Jr[Yr++]=r,Xr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function $r(e,t,n,r){return Qr(e,t,n,r),ni(e)}function ei(e,t){return Qr(e,null,null,t),ni(e)}function ti(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-Ne(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ni(e){if(50<vu)throw vu=0,yu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ri={};function ii(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 ai(e,t,n,r){return new ii(e,t,n,r)}function oi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function si(e,t){var n=e.alternate;return n===null?(n=ai(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 ci(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 li(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)oi(e)&&(s=1);else if(typeof e==`string`)s=Xf(e,n,se.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case E:return e=ai(31,n,t,a),e.elementType=E,e.lanes=o,e;case g:return ui(n.children,a,o,t);case _:s=8,a|=24;break;case v:return e=ai(12,n,t,a|2),e.elementType=v,e.lanes=o,e;case S:return e=ai(13,n,t,a),e.elementType=S,e.lanes=o,e;case C:return e=ai(19,n,t,a),e.elementType=C,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case b:s=10;break a;case y:s=9;break a;case x:s=11;break a;case w:s=14;break a;case T:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ai(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function ui(e,t,n,r){return e=ai(7,e,r,t),e.lanes=n,e}function di(e,t,n){return e=ai(6,e,null,t),e.lanes=n,e}function fi(e){var t=ai(18,null,null,0);return t.stateNode=e,t}function pi(e,t,n){return t=ai(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var mi=new WeakMap;function hi(e,t){if(typeof e==`object`&&e){var n=mi.get(e);return n===void 0?(t={value:e,source:t,stack:ye(t)},mi.set(e,t),t):n}return{value:e,source:t,stack:ye(t)}}var gi=[],_i=0,vi=null,yi=0,bi=[],xi=0,Si=null,Ci=1,wi=``;function Ti(e,t){gi[_i++]=yi,gi[_i++]=vi,vi=e,yi=t}function Ei(e,t,n){bi[xi++]=Ci,bi[xi++]=wi,bi[xi++]=Si,Si=e;var r=Ci;e=wi;var i=32-Ne(r)-1;r&=~(1<<i),n+=1;var a=32-Ne(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ci=1<<32-Ne(t)+i|n<<i|r,wi=a+e}else Ci=1<<a|n<<i|r,wi=e}function Di(e){e.return!==null&&(Ti(e,1),Ei(e,1,0))}function Oi(e){for(;e===vi;)vi=gi[--_i],gi[_i]=null,yi=gi[--_i],gi[_i]=null;for(;e===Si;)Si=bi[--xi],bi[xi]=null,wi=bi[--xi],bi[xi]=null,Ci=bi[--xi],bi[xi]=null}function ki(e,t){bi[xi++]=Ci,bi[xi++]=wi,bi[xi++]=Si,Ci=t.id,wi=t.overflow,Si=e}var Ai=null,ji=null,Mi=!1,Ni=null,Pi=!1,Fi=Error(i(519));function Ii(e){throw Hi(hi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Fi}function Li(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[nt]=e,t[rt]=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),Ft(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),zt(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||Rd(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=Jt),t=!0):t=!1,t||Ii(e,!0)}function Ri(e){for(Ai=e.return;Ai;)switch(Ai.tag){case 5:case 31:case 13:Pi=!1;return;case 27:case 3:Pi=!0;return;default:Ai=Ai.return}}function zi(e){if(e!==Ai)return!1;if(!Mi)return Ri(e),Mi=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Xd(e.type,e.memoizedProps)),n=!n),n&&ji&&Ii(e),Ri(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ji=_f(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ji=_f(e)}else t===27?(t=ji,af(e.type)?(e=gf,gf=null,ji=e):ji=t):ji=Ai?hf(e.stateNode.nextSibling):null;return!0}function Bi(){ji=Ai=null,Mi=!1}function Vi(){var e=Ni;return e!==null&&(iu===null?iu=e:iu.push.apply(iu,e),Ni=null),e}function Hi(e){Ni===null?Ni=[e]:Ni.push(e)}var Ui=ae(null),Wi=null,Gi=null;function Ki(e,t,n){N(Ui,t._currentValue),t._currentValue=n}function qi(e){e._currentValue=Ui.current,oe(Ui)}function Ji(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 Yi(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),Ji(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),Ji(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 Xi(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;_r(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===le.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[ap]:e.push(ap))}a=a.return}e!==null&&Yi(t,e,n,r),t.flags|=262144}function Zi(e){for(e=e.firstContext;e!==null;){if(!_r(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Qi(e){Wi=e,Gi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function $i(e){return ta(Wi,e)}function ea(e,t){return Wi===null&&Qi(e),ta(e,t)}function ta(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Gi===null){if(e===null)throw Error(i(308));Gi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Gi=Gi.next=t;return n}var na=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()})}},ra=t.unstable_scheduleCallback,ia=t.unstable_NormalPriority,aa={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function oa(){return{controller:new na,data:new Map,refCount:0}}function sa(e){e.refCount--,e.refCount===0&&ra(ia,function(){e.controller.abort()})}var ca=null,la=0,ua=0,da=null;function fa(e,t){if(ca===null){var n=ca=[];la=0,ua=vd(),da={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return la++,t.then(pa,pa),t}function pa(){if(--la===0&&ca!==null){da!==null&&(da.status=`fulfilled`);var e=ca;ca=null,ua=0,da=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ma(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 ha=j.S;j.S=function(e,t){su=R(),typeof t==`object`&&t&&typeof t.then==`function`&&fa(e,t),ha!==null&&ha(e,t)};var ga=ae(null);function _a(){var e=ga.current;return e===null?Hl.pooledCache:e}function va(e,t){t===null?N(ga,ga.current):N(ga,t.pool)}function ya(){var e=_a();return e===null?null:{parent:aa._currentValue,pool:e}}var ba=Error(i(460)),xa=Error(i(474)),Sa=Error(i(542)),Ca={then:function(){}};function wa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ta(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Jt,Jt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ka(e),e;default:if(typeof t.status==`string`)t.then(Jt,Jt);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,ka(e),e}throw Da=t,ba}}function Ea(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Da=e,ba):e}}var Da=null;function Oa(){if(Da===null)throw Error(i(459));var e=Da;return Da=null,e}function ka(e){if(e===ba||e===Sa)throw Error(i(483))}var Aa=null,ja=0;function Ma(e){var t=ja;return ja+=1,Aa===null&&(Aa=[]),Ta(Aa,e,t)}function Na(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Pa(e,t){throw t.$$typeof===p?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Fa(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=si(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=di(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===g?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===T&&Ea(i)===t.type)?(t=a(t,n.props),Na(t,n),t.return=e,t):(t=li(n.type,n.key,n.props,null,e.mode,r),Na(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=pi(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=ui(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=di(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case m:return n=li(t.type,t.key,t.props,null,e.mode,n),Na(n,t),n.return=e,n;case h:return t=pi(t,e.mode,n),t.return=e,t;case T:return t=Ea(t),f(e,t,n)}if(A(t)||ee(t))return t=ui(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ma(t),n);if(t.$$typeof===b)return f(e,ea(e,t),n);Pa(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 m:return n.key===i?l(e,t,n,r):null;case h:return n.key===i?u(e,t,n,r):null;case T:return n=Ea(n),p(e,t,n,r)}if(A(n)||ee(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ma(n),r);if(n.$$typeof===b)return p(e,t,ea(e,n),r);Pa(e,n)}return null}function _(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 m:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case h:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case T:return r=Ea(r),_(e,t,n,r,i)}if(A(r)||ee(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return _(e,t,n,Ma(r),i);if(r.$$typeof===b)return _(e,t,n,ea(t,r),i);Pa(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,m=a=0,h=null;d!==null&&m<s.length;m++){d.index>m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),Mi&&Ti(i,m),l;if(d===null){for(;m<s.length;m++)d=f(i,s[m],c),d!==null&&(a=o(d,a,m),u===null?l=d:u.sibling=d,u=d);return Mi&&Ti(i,m),l}for(d=r(d);m<s.length;m++)h=_(d,i,m,s[m],c),h!==null&&(e&&h.alternate!==null&&d.delete(h.key===null?m:h.key),a=o(h,a,m),u===null?l=h:u.sibling=h,u=h);return e&&d.forEach(function(e){return t(i,e)}),Mi&&Ti(i,m),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,m=s,h=s=0,g=null,v=c.next();m!==null&&!v.done;h++,v=c.next()){m.index>h?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),Mi&&Ti(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return Mi&&Ti(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),Mi&&Ti(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){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===T&&Ea(l)===r.type){n(e,r.sibling),c=a(r,o.props),Na(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===g?(c=ui(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=li(o.type,o.key,o.props,null,e.mode,c),Na(c,o),c.return=e,e=c)}return s(e);case h: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=pi(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=Ea(o),x(e,r,o,c)}if(A(o))return v(e,r,o,c);if(ee(o)){if(l=ee(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,Ma(o),c);if(o.$$typeof===b)return x(e,r,ea(e,o),c);Pa(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=di(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{ja=0;var i=x(e,t,n,r);return Aa=null,i}catch(t){if(t===ba||t===Sa)throw t;var a=ai(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ia=Fa(!0),La=Fa(!1),Ra=!1;function za(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ba(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 Va(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ha(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=ni(e),ti(e,null,n),t}return Qr(e,r,t,n),ni(e)}function Ua(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,Ye(e,n)}}function Wa(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 H=!1;function Ga(){if(H){var e=da;if(e!==null)throw e}}function Ka(e,t,n,r){H=!1;var i=e.updateQueue;Ra=!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 p=s.lane&-536870913,m=p!==s.lane;if(m?(Wl&p)===p:(r&p)===p){p!==0&&p===ua&&(H=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Ra=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,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 qa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ja(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)qa(n[e],t)}var Ya=ae(null),Xa=ae(0);function Za(e,t){e=Xl,N(Xa,e),N(Ya,t),Xl=e|t.baseLanes}function Qa(){N(Xa,Xl),N(Ya,Ya.current)}function $a(){Xl=Xa.current,oe(Ya),oe(Xa)}var eo=ae(null),to=null;function no(e){var t=e.alternate;N(so,so.current&1),N(eo,e),to===null&&(t===null||Ya.current!==null||t.memoizedState!==null)&&(to=e)}function ro(e){N(so,so.current),N(eo,e),to===null&&(to=e)}function io(e){e.tag===22?(N(so,so.current),N(eo,e),to===null&&(to=e)):ao(e)}function ao(){N(so,so.current),N(eo,eo.current)}function oo(e){oe(eo),to===e&&(to=null),oe(so)}var so=ae(0);function co(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||ff(n)||pf(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 lo=0,uo=null,fo=null,po=null,mo=!1,ho=!1,go=!1,_o=0,vo=0,yo=null,bo=0;function xo(){throw Error(i(321))}function So(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!_r(e[n],t[n]))return!1;return!0}function Co(e,t,n,r,i,a){return lo=a,uo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,j.H=e===null||e.memoizedState===null?Bs:Vs,go=!1,a=n(r,i),go=!1,ho&&(a=To(t,n,r,i)),wo(e),a}function wo(e){j.H=zs;var t=fo!==null&&fo.next!==null;if(lo=0,po=fo=uo=null,mo=!1,vo=0,yo=null,t)throw Error(i(300));e===null||rc||(e=e.dependencies,e!==null&&Zi(e)&&(rc=!0))}function To(e,t,n,r){uo=e;var a=0;do{if(ho&&(yo=null),vo=0,ho=!1,25<=a)throw Error(i(301));if(a+=1,po=fo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}j.H=Hs,o=t(n,r)}while(ho);return o}function Eo(){var e=j.H,t=e.useState()[0];return t=typeof t.then==`function`?No(t):t,e=e.useState()[0],(fo===null?null:fo.memoizedState)!==e&&(uo.flags|=1024),t}function Do(){var e=_o!==0;return _o=0,e}function Oo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ko(e){if(mo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}mo=!1}lo=0,po=fo=uo=null,ho=!1,vo=_o=0,yo=null}function Ao(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return po===null?uo.memoizedState=po=e:po=po.next=e,po}function jo(){if(fo===null){var e=uo.alternate;e=e===null?null:e.memoizedState}else e=fo.next;var t=po===null?uo.memoizedState:po.next;if(t!==null)po=t,fo=e;else{if(e===null)throw uo.alternate===null?Error(i(467)):Error(i(310));fo=e,e={memoizedState:fo.memoizedState,baseState:fo.baseState,baseQueue:fo.baseQueue,queue:fo.queue,next:null},po===null?uo.memoizedState=po=e:po=po.next=e}return po}function Mo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function No(e){var t=vo;return vo+=1,yo===null&&(yo=[]),e=Ta(yo,e,t),t=uo,(po===null?t.memoizedState:po.next)===null&&(t=t.alternate,j.H=t===null||t.memoizedState===null?Bs:Vs),e}function Po(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return No(e);if(e.$$typeof===b)return $i(e)}throw Error(i(438,String(e)))}function Fo(e){var t=null,n=uo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=uo.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=Mo(),uo.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]=D;return t.index++,n}function Io(e,t){return typeof t==`function`?t(e):t}function Lo(e){return Ro(jo(),fo,e)}function Ro(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?(lo&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===ua&&(d=!0);else if((lo&p)===p){u=u.next,p===ua&&(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,uo.lanes|=p,Ql|=p;f=u.action,go&&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,uo.lanes|=f,Ql|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!_r(o,e.memoizedState)&&(rc=!0,d&&(n=da,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 zo(e){var t=jo(),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);_r(o,t.memoizedState)||(rc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Bo(e,t,n){var r=uo,a=jo(),o=Mi;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!_r((fo||a).memoizedState,n);if(s&&(a.memoizedState=n,rc=!0),a=a.queue,ds(Uo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||po!==null&&po.memoizedState.tag&1){if(r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,a,n,t),null),Hl===null)throw Error(i(349));o||lo&127||Vo(r,t,n)}return n}function Vo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=uo.updateQueue,t===null?(t=Mo(),uo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ho(e,t,n,r){t.value=n,t.getSnapshot=r,Wo(t)&&Go(e)}function Uo(e,t,n){return n(function(){Wo(t)&&Go(e)})}function Wo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!_r(e,n)}catch{return!0}}function Go(e){var t=ei(e,2);t!==null&&Su(t,e,2)}function Ko(e){var t=Ao();if(typeof e==`function`){var n=e;if(e=n(),go){B(!0);try{n()}finally{B(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:e},t}function qo(e,t,n,r){return e.baseState=n,Ro(e,fo,typeof r==`function`?r:Io)}function Jo(e,t,n,r,a){if(Is(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)}};j.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Yo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Yo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=j.T,o={};j.T=o;try{var s=n(i,r),c=j.S;c!==null&&c(o,s),Xo(e,t,s)}catch(n){Qo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),j.T=a}}else try{a=n(i,r),Xo(e,t,a)}catch(n){Qo(e,t,n)}}function Xo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Zo(e,t,n)},function(n){return Qo(e,t,n)}):Zo(e,t,n)}function Zo(e,t,n){t.status=`fulfilled`,t.value=n,$o(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Yo(e,n)))}function Qo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,$o(t),t=t.next;while(t!==r)}e.action=null}function $o(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function es(e,t){return t}function ts(e,t){if(Mi){var n=Hl.formState;if(n!==null){a:{var r=uo;if(Mi){if(ji){b:{for(var i=ji,a=Pi;i.nodeType!==8;){if(!a){i=null;break b}if(i=hf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){ji=hf(i.nextSibling),r=i.data===`F!`;break a}}Ii(r)}r=!1}r&&(t=n[0])}}return n=Ao(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:es,lastRenderedState:t},n.queue=r,n=Ns.bind(null,uo,r),r.dispatch=n,r=Ko(!1),a=Fs.bind(null,uo,!1,r.queue),r=Ao(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Jo.bind(null,uo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ns(e){return rs(jo(),fo,e)}function rs(e,t,n){if(t=Ro(e,t,es)[0],e=Lo(Io)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=No(t)}catch(e){throw e===ba?Sa:e}else r=t;t=jo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(uo.flags|=2048,os(9,{destroy:void 0},is.bind(null,i,n),null)),[r,a,e]}function is(e,t){e.action=t}function as(e){var t=jo(),n=fo;if(n!==null)return rs(t,n,e);jo(),t=t.memoizedState,n=jo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function os(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=uo.updateQueue,t===null&&(t=Mo(),uo.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ss(){return jo().memoizedState}function cs(e,t,n,r){var i=Ao();uo.flags|=e,i.memoizedState=os(1|t,{destroy:void 0},n,r===void 0?null:r)}function ls(e,t,n,r){var i=jo();r=r===void 0?null:r;var a=i.memoizedState.inst;fo!==null&&r!==null&&So(r,fo.memoizedState.deps)?i.memoizedState=os(t,a,n,r):(uo.flags|=e,i.memoizedState=os(1|t,a,n,r))}function us(e,t){cs(8390656,8,e,t)}function ds(e,t){ls(2048,8,e,t)}function fs(e){uo.flags|=4;var t=uo.updateQueue;if(t===null)t=Mo(),uo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ps(e){var t=jo().memoizedState;return fs({ref:t,nextImpl:e}),function(){if(Vl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ms(e,t){return ls(4,2,e,t)}function hs(e,t){return ls(4,4,e,t)}function gs(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 _s(e,t,n){n=n==null?null:n.concat([e]),ls(4,4,gs.bind(null,t,e),n)}function vs(){}function ys(e,t){var n=jo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&So(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function bs(e,t){var n=jo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&So(t,r[1]))return r[0];if(r=e(),go){B(!0);try{e()}finally{B(!1)}}return n.memoizedState=[r,t],r}function xs(e,t,n){return n===void 0||lo&1073741824&&!(Wl&261930)?e.memoizedState=t:(e.memoizedState=n,e=xu(),uo.lanes|=e,Ql|=e,n)}function Ss(e,t,n,r){return _r(n,t)?n:Ya.current===null?!(lo&42)||lo&1073741824&&!(Wl&261930)?(rc=!0,e.memoizedState=n):(e=xu(),uo.lanes|=e,Ql|=e,t):(e=xs(e,n,r),_r(e,t)||(rc=!0),e)}function Cs(e,t,n,r,i){var a=M.p;M.p=a!==0&&8>a?a:8;var o=j.T,s={};j.T=s,Fs(e,!1,t,n);try{var c=i(),l=j.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ps(e,t,ma(c,r),bu(e)):Ps(e,t,r,bu(e))}catch(n){Ps(e,t,{then:function(){},status:`rejected`,reason:n},bu())}finally{M.p=a,o!==null&&s.types!==null&&(o.types=s.types),j.T=o}}function ws(){}function Ts(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Es(e).queue;Cs(e,a,t,ne,n===null?ws:function(){return Ds(e),n(r)})}function Es(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:ne},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,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),Ps(e,t.next.queue,{},bu())}function Os(){return $i(ap)}function ks(){return jo().memoizedState}function As(){return jo().memoizedState}function js(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=bu();e=Va(n);var r=Ha(t,e,n);r!==null&&(Su(r,t,n),Ua(r,t,n)),t={cache:oa()},e.payload=t;return}t=t.return}}function Ms(e,t,n){var r=bu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Is(e)?Ls(t,n):(n=$r(e,t,n,r),n!==null&&(Su(n,e,r),Rs(n,t,r)))}function Ns(e,t,n){Ps(e,t,n,bu())}function Ps(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Is(e))Ls(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,_r(s,o))return Qr(e,t,i,0),Hl===null&&Zr(),!1}catch{}if(n=$r(e,t,i,r),n!==null)return Su(n,e,r),Rs(n,t,r),!0}return!1}function Fs(e,t,n,r){if(r={lane:2,revertLane:vd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Is(e)){if(t)throw Error(i(479))}else t=$r(e,n,r,2),t!==null&&Su(t,e,2)}function Is(e){var t=e.alternate;return e===uo||t!==null&&t===uo}function Ls(e,t){ho=mo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Rs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ye(e,n)}}var zs={readContext:$i,use:Po,useCallback:xo,useContext:xo,useEffect:xo,useImperativeHandle:xo,useLayoutEffect:xo,useInsertionEffect:xo,useMemo:xo,useReducer:xo,useRef:xo,useState:xo,useDebugValue:xo,useDeferredValue:xo,useTransition:xo,useSyncExternalStore:xo,useId:xo,useHostTransitionStatus:xo,useFormState:xo,useActionState:xo,useOptimistic:xo,useMemoCache:xo,useCacheRefresh:xo};zs.useEffectEvent=xo;var Bs={readContext:$i,use:Po,useCallback:function(e,t){return Ao().memoizedState=[e,t===void 0?null:t],e},useContext:$i,useEffect:us,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),cs(4194308,4,gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cs(4194308,4,e,t)},useInsertionEffect:function(e,t){cs(4,2,e,t)},useMemo:function(e,t){var n=Ao();t=t===void 0?null:t;var r=e();if(go){B(!0);try{e()}finally{B(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Ao();if(n!==void 0){var i=n(t);if(go){B(!0);try{n(t)}finally{B(!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=Ms.bind(null,uo,e),[r.memoizedState,e]},useRef:function(e){var t=Ao();return e={current:e},t.memoizedState=e},useState:function(e){e=Ko(e);var t=e.queue,n=Ns.bind(null,uo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:vs,useDeferredValue:function(e,t){return xs(Ao(),e,t)},useTransition:function(){var e=Ko(!1);return e=Cs.bind(null,uo,e.queue,!0,!1),Ao().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=uo,a=Ao();if(Mi){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Hl===null)throw Error(i(349));Wl&127||Vo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,us(Uo.bind(null,r,o,e),[e]),r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,o,n,t),null),n},useId:function(){var e=Ao(),t=Hl.identifierPrefix;if(Mi){var n=wi,r=Ci;n=(r&~(1<<32-Ne(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=_o++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=bo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Os,useFormState:ts,useActionState:ts,useOptimistic:function(e){var t=Ao();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Fs.bind(null,uo,!0,n),n.dispatch=t,[e,t]},useMemoCache:Fo,useCacheRefresh:function(){return Ao().memoizedState=js.bind(null,uo)},useEffectEvent:function(e){var t=Ao(),n={impl:e};return t.memoizedState=n,function(){if(Vl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Vs={readContext:$i,use:Po,useCallback:ys,useContext:$i,useEffect:ds,useImperativeHandle:_s,useInsertionEffect:ms,useLayoutEffect:hs,useMemo:bs,useReducer:Lo,useRef:ss,useState:function(){return Lo(Io)},useDebugValue:vs,useDeferredValue:function(e,t){return Ss(jo(),fo.memoizedState,e,t)},useTransition:function(){var e=Lo(Io)[0],t=jo().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:Bo,useId:ks,useHostTransitionStatus:Os,useFormState:ns,useActionState:ns,useOptimistic:function(e,t){return qo(jo(),fo,e,t)},useMemoCache:Fo,useCacheRefresh:As};Vs.useEffectEvent=ps;var Hs={readContext:$i,use:Po,useCallback:ys,useContext:$i,useEffect:ds,useImperativeHandle:_s,useInsertionEffect:ms,useLayoutEffect:hs,useMemo:bs,useReducer:zo,useRef:ss,useState:function(){return zo(Io)},useDebugValue:vs,useDeferredValue:function(e,t){var n=jo();return fo===null?xs(n,e,t):Ss(n,fo.memoizedState,e,t)},useTransition:function(){var e=zo(Io)[0],t=jo().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:Bo,useId:ks,useHostTransitionStatus:Os,useFormState:as,useActionState:as,useOptimistic:function(e,t){var n=jo();return fo===null?(n.baseState=e,[e,n.queue.dispatch]):qo(n,fo,e,t)},useMemoCache:Fo,useCacheRefresh:As};Hs.useEffectEvent=ps;function Us(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ws={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=bu(),i=Va(r);i.payload=t,n!=null&&(i.callback=n),t=Ha(e,i,r),t!==null&&(Su(t,e,r),Ua(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=bu(),i=Va(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ha(e,i,r),t!==null&&(Su(t,e,r),Ua(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=bu(),r=Va(n);r.tag=2,t!=null&&(r.callback=t),t=Ha(e,r,n),t!==null&&(Su(t,e,n),Ua(t,e,n))}};function Gs(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?!vr(n,r)||!vr(i,a):!0}function Ks(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&&Ws.enqueueReplaceState(t,t.state,null)}function qs(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=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Js(e){qr(e)}function Ys(e){console.error(e)}function U(e){qr(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=Va(n),n.tag=3,n.payload={element:null},n.callback=function(){Xs(e,t)},n}function $s(e){return e=Va(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`&&(uu===null?uu=new Set([this]):uu.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&&Xi(t,n,a,!0),n=eo.current,n!==null){switch(n.tag){case 31:case 13:return to===null?Pu():n.alternate===null&&Zl===0&&(Zl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ca?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===Ca?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),Pu(),!1}if(Mi)return t=eo.current,t===null?(r!==Fi&&(t=Error(i(423),{cause:r}),Hi(hi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=hi(r,n),a=Qs(e.stateNode,r,a),Wa(e,a),Zl!==4&&(Zl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Fi&&(e=Error(i(422),{cause:r}),Hi(hi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=hi(o,n),ru===null?ru=[o]:ru.push(o),Zl!==4&&(Zl=2),t===null)return!0;r=hi(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),Wa(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`&&(uu===null||!uu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=$s(a),ec(a,e,n,r),Wa(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?La(t,null,n,r):Ia(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 Qi(t),r=Co(e,t,n,o,a,i),s=Do(),e!==null&&!rc?(Oo(e,t,i),kc(e,t,i)):(Mi&&s&&Di(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`&&!oi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,sc(e,t,a,r,i)):(e=li(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?vr:n,n(o,r)&&e.ref===t.ref)return kc(e,t,i)}return t.flags|=1,e=si(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(vr(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&&va(t,a===null?null:a.cachePool),a===null?Qa():Za(t,a),io(t);else return r=t.lanes=536870912,uc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&va(t,null),Qa(),ao(t)):(va(t,a.cachePool),Za(t,a),ao(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=_a();return a=a===null?null:{parent:aa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&va(t,null),Qa(),io(t),e!==null&&Xi(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 Ia(t,e.child,null,n),e=dc(t,t.pendingProps),e.flags|=2,oo(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(Mi){if(r.mode===`hidden`)return e=dc(t,r),t.lanes=536870912,lc(null,e);if(ro(t),(e=ji)?(e=df(e,Pi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Si===null?null:{id:Ci,overflow:wi},retryLane:536870912,hydrationErrors:null},n=fi(e),n.return=t,t.child=n,Ai=t,ji=null)):e=null,e===null)throw Ii(t);return t.lanes=536870912,null}return dc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(ro(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||Xi(e,t,n,!1),a=(n&e.childLanes)!==0,rc||a){if(r=Hl,r!==null&&(s=Xe(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ei(e,s),Su(r,e,s),nc;Pu(),t=fc(e,t,n)}else e=o.treeContext,ji=hf(s.nextSibling),Ai=t,Mi=!0,Ni=null,Pi=!1,e!==null&&ki(t,e),t=dc(t,r),t.flags|=4096;return t}return e=si(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 Qi(t),n=Co(e,t,n,r,void 0,i),r=Do(),e!==null&&!rc?(Oo(e,t,i),kc(e,t,i)):(Mi&&r&&Di(t),t.flags|=1,ic(e,t,n,i),t.child)}function gc(e,t,n,r,i,a){return Qi(t),t.updateQueue=null,n=To(t,r,n,i),wo(e),r=Do(),e!==null&&!rc?(Oo(e,t,a),kc(e,t,a)):(Mi&&r&&Di(t),t.flags|=1,ic(e,t,n,a),t.child)}function _c(e,t,n,r,i){if(Qi(t),t.stateNode===null){var a=ri,o=n.contextType;typeof o==`object`&&o&&(a=$i(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ws,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},za(t),o=n.contextType,a.context=typeof o==`object`&&o?$i(o):ri,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Us(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&&Ws.enqueueReplaceState(a,a.state,null),Ka(t,r,a,i),Ga(),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=qs(n,s);a.props=c;var l=a.context,u=n.contextType;o=ri,typeof u==`object`&&u&&(o=$i(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)&&Ks(t,a,r,o),Ra=!1;var f=t.memoizedState;a.state=f,Ka(t,r,a,i),Ga(),l=t.memoizedState,s||f!==l||Ra?(typeof d==`function`&&(Us(t,n,d,r),l=t.memoizedState),(c=Ra||Gs(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,Ba(e,t),o=t.memoizedProps,u=qs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ri,typeof l==`object`&&l&&(c=$i(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)&&Ks(t,a,r,c),Ra=!1,f=t.memoizedState,a.state=f,Ka(t,r,a,i),Ga();var p=t.memoizedState;o!==d||f!==p||Ra||e!==null&&e.dependencies!==null&&Zi(e.dependencies)?(typeof s==`function`&&(Us(t,n,s,r),p=t.memoizedState),(u=Ra||Gs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Zi(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=Ia(t,e.child,null,i),t.child=Ia(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 Bi(),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:ya()}}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:(so.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Mi){if(a?no(t):ao(t),(e=ji)?(e=df(e,Pi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Si===null?null:{id:Ci,overflow:wi},retryLane:536870912,hydrationErrors:null},n=fi(e),n.return=t,t.child=n,Ai=t,ji=null)):e=null,e===null)throw Ii(t);return pf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(ao(t),a=t.mode,c=wc({mode:`hidden`,children:c},a),r=ui(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)):(no(t),Cc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(no(t),t.flags&=-257,t=Tc(e,t,n)):t.memoizedState===null?(ao(t),c=r.fallback,a=t.mode,r=wc({mode:`visible`,children:r.children},a),c=ui(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ia(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)):(ao(t),t.child=e.child,t.flags|=128,t=null);else if(no(t),pf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Hi({value:r,source:null,stack:null}),t=Tc(e,t,n)}else if(rc||Xi(e,t,n,!1),s=(n&e.childLanes)!==0,rc||s){if(s=Hl,s!==null&&(r=Xe(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ei(e,r),Su(s,e,r),nc;ff(c)||Pu(),t=Tc(e,t,n)}else ff(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,ji=hf(c.nextSibling),Ai=t,Mi=!0,Ni=null,Pi=!1,e!==null&&ki(t,e),t=Cc(t,r.children),t.flags|=4096);return t}return a?(ao(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=si(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ui(c,a,n,null),c.flags|=2):c=si(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=ya():(l=aa._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)):(no(t),n=e.child,e=n.sibling,n=si(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=ai(22,e,null,t),e.lanes=0,e}function Tc(e,t,n){return Ia(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),Ji(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=so.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,N(so,o),ic(e,t,r,n),r=Mi?yi: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&&co(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&&co(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(Xi(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=si(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=si(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&&Zi(e))):!0}function jc(e,t,n){switch(t.tag){case 3:ue(t,t.stateNode.containerInfo),Ki(t,aa,e.memoizedState.cache),Bi();break;case 27:case 5:F(t);break;case 4:ue(t,t.stateNode.containerInfo);break;case 10:Ki(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ro(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(no(t),e=kc(e,t,n),e===null?null:e.sibling):Sc(e,t,n):(no(t),t.flags|=128,null);no(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Xi(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),N(so,so.current),r)break;return null;case 22:return t.lanes=0,cc(e,t,n,t.pendingProps);case 24:Ki(t,aa,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,Mi&&t.flags&1048576&&Ei(t,yi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ea(t.elementType),t.type=e,typeof e==`function`)oi(e)?(r=qs(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===x){t.tag=11,t=ac(null,t,e,r,n);break a}else if(a===w){t.tag=14,t=oc(null,t,e,r,n);break a}}throw t=k(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=qs(r,t.pendingProps),_c(e,t,r,a,n);case 3:a:{if(ue(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ba(e,t),Ka(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ki(t,aa,r),r!==o.cache&&Yi(t,[aa],n,!0),Ga(),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=hi(Error(i(424)),t),Hi(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(ji=hf(e.firstChild),Ai=t,Mi=!0,Ni=null,Pi=!0,n=La(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Bi(),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=If(t.type,null,t.pendingProps,null))?t.memoizedState=n:Mi||(n=t.type,e=t.pendingProps,r=qd(P.current).createElement(n),r[nt]=t,r[rt]=e,Vd(r,n,e),mt(r),t.stateNode=r):t.memoizedState=If(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return F(t),e===null&&Mi&&(r=t.stateNode=yf(t.type,t.pendingProps,P.current),Ai=t,Pi=!0,a=ji,af(t.type)?(gf=a,ji=hf(r.firstChild)):ji=a),ic(e,t,t.pendingProps.children,n),mc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Mi&&((a=r=ji)&&(r=lf(r,t.type,t.pendingProps,Pi),r===null?a=!1:(t.stateNode=r,Ai=t,ji=hf(r.firstChild),Pi=!1,a=!0)),a||Ii(t)),F(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Xd(a,o)?r=null:s!==null&&Xd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Co(e,t,Eo,null,null,n),ap._currentValue=a),mc(e,t),ic(e,t,r,n),t.child;case 6:return e===null&&Mi&&((e=n=ji)&&(n=uf(n,t.pendingProps,Pi),n===null?e=!1:(t.stateNode=n,Ai=t,ji=null,e=!0)),e||Ii(t)),null;case 13:return Sc(e,t,n);case 4:return ue(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ia(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,Ki(t,t.type,r.value),ic(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Qi(t),a=$i(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 Qi(t),r=$i(aa),e===null?(a=_a(),a===null&&(a=Hl,o=oa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},za(t),Ki(t,aa,a)):((e.lanes&n)!==0&&(Ba(e,t),Ka(t,null,null,n),Ga()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Ki(t,aa,r),r!==a.cache&&Yi(t,[aa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ki(t,aa,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(ju())e.flags|=8192;else throw Da=Ca,xa}else e.flags&=-16777217}function Fc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Zf(t))if(ju())e.flags|=8192;else throw Da=Ca,xa}function Ic(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:We(),e.lanes|=t,nu|=t)}function Lc(e,t){if(!Mi)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(Oi(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),qi(aa),de(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(zi(t)?Nc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Vi())),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(fe(t),n=P.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=se.current,zi(t)?Li(t,e):(e=yf(a,r,n),t.stateNode=e,Nc(t))}return Rc(t),null;case 5:if(fe(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=se.current,zi(t))Li(t,o);else{var s=qd(P.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[nt]=t,o[rt]=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(Vd(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=P.current,zi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ai,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[nt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Rd(e.nodeValue,n)),e||Ii(t,!0)}else e=qd(e).createTextNode(r),e[nt]=t,t.stateNode=e}return Rc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=zi(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[nt]=t}else Bi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Rc(t),e=!1}else n=Vi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(oo(t),t):(oo(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=zi(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[nt]=t}else Bi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Rc(t),a=!1}else a=Vi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(oo(t),t):(oo(t),null)}return oo(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 de(),e===null&&Ad(t.stateNode.containerInfo),Rc(t),null;case 10:return qi(t.type),Rc(t),null;case 19:if(oe(so),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=co(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;)ci(n,e),n=n.sibling;return N(so,so.current&1|2),Mi&&Ti(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&R()>cu&&(t.flags|=128,a=!0,Lc(r,!1),t.lanes=4194304)}else{if(!a)if(e=co(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&&!Mi)return Rc(t),null}else 2*R()-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=R(),e.sibling=null,n=so.current,N(so,a?n&1|2:n&1),Mi&&Ti(t,r.treeForkCount),e);case 22:case 23:return oo(t),$a(),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&&oe(ga),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),qi(aa),Rc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Bc(e,t){switch(Oi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return qi(aa),de(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return fe(t),null;case 31:if(t.memoizedState!==null){if(oo(t),t.alternate===null)throw Error(i(340));Bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(oo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return oe(so),null;case 4:return de(),null;case 10:return qi(t.type),null;case 22:case 23:return oo(t),$a(),e!==null&&oe(ga),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return qi(aa),null;case 25:return null;default:return null}}function Vc(e,t){switch(Oi(t),t.tag){case 3:qi(aa),de();break;case 26:case 27:case 5:fe(t);break;case 4:de();break;case 31:t.memoizedState!==null&&oo(t);break;case 13:oo(t);break;case 19:oe(so);break;case 10:qi(t.type);break;case 22:case 23:oo(t),$a(),e!==null&&oe(ga);break;case 24:qi(aa)}}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{Ja(t,n)}catch(t){Zu(e,e.return,t)}}}function Gc(e,t,n){n.props=qs(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;Hd(r,e.type,n,t),r[rt]=t}catch(t){Zu(e,e.return,t)}}function Xc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&af(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&&af(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=Jt));else if(r!==4&&(r===27&&af(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&&af(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]);Vd(t,r,n),t[nt]=e,t[rt]=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,Gd=mp,e=Sr(e),wr(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(Kd={focusedElem:e,selectionRange:n},mp=!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=qs(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)cf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:cf(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=qs(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{Ja(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),mf(e,n))));break;case 22:if(r=n.memoizedState!==null||tl,!r){t=t!==null&&t.memoizedState!==null||nl,i=tl;var a=nl;tl=r,(nl=t)&&!a?wl(e,n,(n.subtreeFlags&8772)!=0):Sl(e,n),tl=i,nl=a}break;case 30:break;default:Sl(e,n)}}function cl(e){var t=e.alternate;t!==null&&(e.alternate=null,cl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&<(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ll=null,ul=!1;function dl(e,t,n){for(n=n.child;n!==null;)fl(e,t,n),n=n.sibling}function fl(e,t,n){if(Me&&typeof Me.onCommitFiberUnmount==`function`)try{Me.onCommitFiberUnmount(je,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;af(n.type)&&(ll=n.stateNode,ul=!1),dl(e,t,n),bf(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,of(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Bp(e)):of(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{Bp(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{Bp(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(af(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[ct]||o[nt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Vd(o,r,n),o[nt]=e,mt(o),r=o;break a;case`link`:var s=Jf(`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),Vd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Jf(`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),Vd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[nt]=e,mt(o),r=o}e.stateNode=r}else Yf(a,e.type,e.stateNode);else e.stateNode=Uf(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?Yf(a,e.type,e.stateNode):Uf(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{Bt(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(qf=null,a=vl,vl=Cf(t.containerInfo),_l(t,e),vl=a,bl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Bp(t.containerInfo)}catch(t){Zu(e,e.return,t)}rl&&(rl=!1,xl(e));break;case 4:r=vl,vl=Cf(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=R()),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?sf(m,!0):sf(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&&(Bt(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:bf(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++)qa(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&&sa(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&&sa(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&&sa(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&&Qf(n,vl,e.memoizedState,e.memoizedProps);break;case 5:Ml(e,t,n);break;case 3:case 4:var r=vl;vl=Cf(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:sa(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=$i(aa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return $i(aa).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,uu=null,du=0,fu=null,pu=null,mu=0,hu=0,gu=null,_u=null,vu=0,yu=null;function bu(){return Vl&2&&Wl!==0?Wl&-Wl:j.T===null?$e():vd()}function xu(){if(tu===0)if(!(Wl&536870912)||Mi){var e=Re;Re<<=1,!(Re&3932160)&&(Re=262144),tu=e}else tu=536870912;return e=eo.current,e!==null&&(e.flags|=32),tu}function Su(e,t,n){(e===Hl&&(Gl===2||Gl===9)||e.cancelPendingCommit!==null)&&(ku(e,0),Eu(e,Wl,tu,!1)),Ke(e,n),(!(Vl&2)||e!==Hl)&&(e===Hl&&(!(Vl&2)&&($l|=n),Zl===4&&Eu(e,Wl,tu,!1)),ud(e))}function Cu(e,t,n){if(Vl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||He(e,t),a=r?Lu(e,t):Fu(e,t,!0),o=r;do{if(a===0){Jl&&!r&&Eu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!Tu(n)){a=Fu(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&&(ku(c,s).flags|=256),s=Fu(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){ku(e,0),Eu(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:Eu(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-R(),10<a)){if(Eu(r,t,tu,!ql),Ve(r,0,!0)!==0)break a;mu=t,r.timeoutHandle=$d(wu.bind(null,r,n,iu,lu,au,t,tu,$l,nu,ql,o,`Throttled`,-0,0),a);break a}wu(r,n,iu,lu,au,t,tu,$l,nu,ql,o,null,-0,0)}}break}while(1);ud(e)}function wu(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:Jt},Nl(t,a,d);var m=(a&62914560)===a?ou-R():(a&4194048)===a?su-R():0;if(m=ep(d,m),m!==null){mu=a,e.cancelPendingCommit=m(Wu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Eu(e,a,o,!l);return}}Wu(e,t,a,n,r,i,o,s,c)}function Tu(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(!_r(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 Eu(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-Ne(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Je(e,n,t)}function Du(){return Vl&6?!0:(dd(0,!1),!1)}function Ou(){if(Ul!==null){if(Gl===0)var e=Ul.return;else e=Ul,Gi=Wi=null,ko(e),Aa=null,ja=0,e=Ul;for(;e!==null;)Vc(e.alternate,e),e=e.return;Ul=null}}function ku(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,ef(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),mu=0,Ou(),Hl=e,Ul=n=si(e.current,null),Wl=t,Gl=0,Kl=null,ql=!1,Jl=He(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-Ne(r),a=1<<i;t|=e[i],r&=~a}return Xl=t,Zr(),n}function Au(e,t){uo=null,j.H=zs,t===ba||t===Sa?(t=Oa(),Gl=3):t===xa?(t=Oa(),Gl=4):Gl=t===nc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Kl=t,Ul===null&&(Zl=1,Xs(e,hi(t,e.current)))}function ju(){var e=eo.current;return e===null?!0:(Wl&4194048)===Wl?to===null:(Wl&62914560)===Wl||Wl&536870912?e===to:!1}function Mu(){var e=j.H;return j.H=zs,e===null?zs:e}function Nu(){var e=j.A;return j.A=zl,e}function Pu(){Zl=4,ql||(Wl&4194048)!==Wl&&eo.current!==null||(Jl=!0),!(Ql&134217727)&&!($l&134217727)||Hl===null||Eu(Hl,Wl,tu,!1)}function Fu(e,t,n){var r=Vl;Vl|=2;var i=Mu(),a=Nu();(Hl!==e||Wl!==t)&&(lu=null,ku(e,t)),t=!1;var o=Zl;a:do try{if(Gl!==0&&Ul!==null){var s=Ul,c=Kl;switch(Gl){case 8:Ou(),o=6;break a;case 3:case 2:case 9:case 6:eo.current===null&&(t=!0);var l=Gl;if(Gl=0,Kl=null,Vu(e,s,c,l),n&&Jl){o=0;break a}break;default:l=Gl,Gl=0,Kl=null,Vu(e,s,c,l)}}Iu(),o=Zl;break}catch(t){Au(e,t)}while(1);return t&&e.shellSuspendCounter++,Gi=Wi=null,Vl=r,j.H=i,j.A=a,Ul===null&&(Hl=null,Wl=0,Zr()),o}function Iu(){for(;Ul!==null;)zu(Ul)}function Lu(e,t){var n=Vl;Vl|=2;var r=Mu(),a=Nu();Hl!==e||Wl!==t?(lu=null,cu=R()+500,ku(e,t)):Jl=He(e,t);a:do try{if(Gl!==0&&Ul!==null){t=Ul;var o=Kl;b:switch(Gl){case 1:Gl=0,Kl=null,Vu(e,t,o,1);break;case 2:case 9:if(wa(o)){Gl=0,Kl=null,Bu(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:wa(o)?(Gl=0,Kl=null,Bu(t)):(Gl=0,Kl=null,Vu(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?Zf(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,Hu(u))}break b}}Gl=0,Kl=null,Vu(e,t,o,5);break;case 6:Gl=0,Kl=null,Vu(e,t,o,6);break;case 8:Ou(),Zl=6;break a;default:throw Error(i(462))}}Ru();break}catch(t){Au(e,t)}while(1);return Gi=Wi=null,j.H=r,j.A=a,Vl=n,Ul===null?(Hl=null,Wl=0,Zr(),Zl):0}function Ru(){for(;Ul!==null&&!Ce();)zu(Ul)}function zu(e){var t=Mc(e.alternate,e,Xl);e.memoizedProps=e.pendingProps,t===null?Hu(e):Ul=t}function Bu(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:ko(t);default:Vc(n,t),t=Ul=ci(t,Xl),t=Mc(n,t,Xl)}e.memoizedProps=e.pendingProps,t===null?Hu(e):Ul=t}function Vu(e,t,n,r){Gi=Wi=null,ko(t),Aa=null,ja=0;var i=t.return;try{if(tc(e,i,t,n,Wl)){Zl=1,Xs(e,hi(n,e.current)),Ul=null;return}}catch(t){if(i!==null)throw Ul=i,t;Zl=1,Xs(e,hi(n,e.current)),Ul=null;return}t.flags&32768?(Mi||r===1?e=!0:Jl||Wl&536870912?e=!1:(ql=e=!0,(r===2||r===9||r===3||r===6)&&(r=eo.current,r!==null&&r.tag===13&&(r.flags|=16384))),Uu(t,e)):Hu(t)}function Hu(e){var t=e;do{if(t.flags&32768){Uu(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 Uu(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 Wu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Yu();while(du!==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|=Xr,qe(e,n,o,s,c,l),e===Hl&&(Ul=Hl=null,Wl=0),pu=t,fu=e,mu=n,hu=o,gu=a,_u=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,rd(Ee,function(){return Xu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=j.T,j.T=null,a=M.p,M.p=2,s=Vl,Vl|=4;try{ol(e,t,n)}finally{Vl=s,M.p=a,j.T=r}}du=1,Gu(),Ku(),qu()}}function Gu(){if(du===1){du=0;var e=fu,t=pu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=j.T,j.T=null;var r=M.p;M.p=2;var i=Vl;Vl|=4;try{yl(t,e);var a=Kd,o=Sr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&xr(s.ownerDocument.documentElement,s)){if(c!==null&&wr(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 _=br(s,h),v=br(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}}mp=!!Gd,Kd=Gd=null}finally{Vl=i,M.p=r,j.T=n}}e.current=t,du=2}}function Ku(){if(du===2){du=0;var e=fu,t=pu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=j.T,j.T=null;var r=M.p;M.p=2;var i=Vl;Vl|=4;try{sl(e,t.alternate,t)}finally{Vl=i,M.p=r,j.T=n}}du=3}}function qu(){if(du===4||du===3){du=0,L();var e=fu,t=pu,n=mu,r=_u;t.subtreeFlags&10256||t.flags&10256?du=5:(du=0,pu=fu=null,Ju(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(uu=null),Qe(n),t=t.stateNode,Me&&typeof Me.onCommitFiberRoot==`function`)try{Me.onCommitFiberRoot(je,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=j.T,i=M.p,M.p=2,j.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{j.T=t,M.p=i}}mu&3&&Yu(),ud(e),i=e.pendingLanes,n&261930&&i&42?e===yu?vu++:(vu=0,yu=e):vu=0,dd(0,!1)}}function Ju(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,sa(t)))}function Yu(){return Gu(),Ku(),qu(),Xu()}function Xu(){if(du!==5)return!1;var e=fu,t=hu;hu=0;var n=Qe(mu),r=j.T,a=M.p;try{M.p=32>n?32:n,j.T=null,n=gu,gu=null;var o=fu,s=mu;if(du=0,pu=fu=null,mu=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),Me&&typeof Me.onPostCommitFiberRoot==`function`)try{Me.onPostCommitFiberRoot(je,o)}catch{}return!0}finally{M.p=a,j.T=r,Ju(e,t)}}function W(e,t,n){t=hi(n,t),t=Qs(e.stateNode,t,2),e=Ha(e,t,2),e!==null&&(Ke(e,2),ud(e))}function Zu(e,t,n){if(e.tag===3)W(e,e,n);else for(;t!==null;){if(t.tag===3){W(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(uu===null||!uu.has(r))){e=hi(n,e),n=$s(2),r=Ha(t,n,2),r!==null&&(ec(n,r,t,e),Ke(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>R()-ou?!(Vl&2)&&ku(e,0):eu|=n,nu===Wl&&(nu=0)),ud(e)}function ed(e,t){t===0&&(t=We()),e=ei(e,t),e!==null&&(Ke(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 xe(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-Ne(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=Ve(r,r===Hl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||He(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&&Qd()&&(e=ld);for(var t=R(),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}du!==0&&du!==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-Ne(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ue(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Hl,n=Wl,n=Ve(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&&Se(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||He(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Se(r),Qe(n)){case 2:case 8:n=Te;break;case 32:n=Ee;break;case 268435456:n=Oe;break;default:n=Ee}return r=hd.bind(null,e),n=xe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Se(r),e.callbackPriority=2,e.callbackNode=null,2}function hd(e,t){if(du!==0&&du!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Yu()&&e.callbackNode!==n)return null;var r=Wl;return r=Ve(e,e===Hl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Cu(e,r,t),md(e,R()),e.callbackNode!=null&&e.callbackNode===n?hd.bind(null,e):null)}function gd(e,t){if(Yu())return null;Cu(e,t,!0)}function _d(){nf(function(){Vl&6?xe(we,fd):pd()})}function vd(){if(ld===0){var e=ua;e===0&&(e=Le,Le<<=1,!(Le&261888)&&(Le=256)),ld=e}return ld}function yd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:qt(``+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[rt]||null).action),o=r.submitter;o&&(t=(t=o[rt]||null)?yd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new gn(`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<Gr.length;Sd++){var Cd=Gr[Sd];Kr(Cd.toLowerCase(),`on`+(Cd[0].toUpperCase()+Cd.slice(1)))}Kr(Lr,`onAnimationEnd`),Kr(Rr,`onAnimationIteration`),Kr(zr,`onAnimationStart`),Kr(`dblclick`,`onDoubleClick`),Kr(`focusin`,`onFocus`),Kr(`focusout`,`onBlur`),Kr(Br,`onTransitionRun`),Kr(Vr,`onTransitionStart`),Kr(Hr,`onTransitionCancel`),Kr(Ur,`onTransitionEnd`),vt(`onMouseEnter`,[`mouseout`,`mouseover`]),vt(`onMouseLeave`,[`mouseout`,`mouseover`]),vt(`onPointerEnter`,[`pointerout`,`pointerover`]),vt(`onPointerLeave`,[`pointerout`,`pointerover`]),_t(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),_t(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),_t(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),_t(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),_t(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),_t(`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){qr(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){qr(e)}i.currentTarget=null,a=c}}}}function Dd(e,t){var n=t[at];n===void 0&&(n=t[at]=new Set);var r=e+`__bubble`;n.has(r)||(G(t,e,2,!1),n.add(r))}function Od(e,t,n){var r=0;t&&(r|=4),G(n,e,r,t)}var kd=`_reactListening`+Math.random().toString(36).slice(2);function Ad(e){if(!e[kd]){e[kd]=!0,ht.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 G(e,t,n,r){switch(xp(t)){case 2:var i=hp;break;case 8:i=gp;break;default:i=_p}n=i.bind(null,t,n,e),i=void 0,!an||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 jd(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=ut(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}tn(function(){var r=a,i=Xt(n),s=[];a:{var c=Wr.get(e);if(c!==void 0){var l=gn,u=e;switch(e){case`keypress`:if(dn(n)===0)break a;case`keydown`:case`keyup`:l=Pn;break;case`focusin`:u=`focus`,l=Tn;break;case`focusout`:u=`blur`,l=Tn;break;case`beforeblur`:case`afterblur`:l=Tn;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=Cn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=wn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=In;break;case Lr:case Rr:case zr:l=En;break;case Ur:l=Ln;break;case`scroll`:case`scrollend`:l=vn;break;case`wheel`:l=Rn;break;case`copy`:case`cut`:case`paste`:l=Dn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Fn;break;case`toggle`:case`beforetoggle`:l=zn}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=nn(m,p),g!=null&&d.push(Md(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!==Yt&&(u=n.relatedTarget||n.fromElement)&&(ut(u)||u[it]))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?ut(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=Cn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Fn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:ft(l),h=u==null?c:ft(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,ut(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=K,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&&Pd(s,c,l,d,!1),u!==null&&f!==null&&Pd(s,f,u,d,!0)}}a:{if(c=r?ft(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=ar;else if($n(c))if(or)v=hr;else{v=pr;var y=fr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Wt(r.elementType)&&(v=ar):v=mr;if(v&&=v(e,r)){er(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&It(c,`number`,c.value)}switch(y=r?ft(r):window,e){case`focusin`:($n(y)||y.contentEditable===`true`)&&(Dr=y,Or=r,kr=null);break;case`focusout`:kr=Or=Dr=null;break;case`mousedown`:Ar=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Ar=!1,jr(s,n,i);break;case`selectionchange`:if(Er)break;case`keydown`:case`keyup`:jr(s,n,i)}var b;if(Vn)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 Yn?qn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Wn&&n.locale!==`ko`&&(Yn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Yn&&(b=un()):(sn=i,cn=`value`in sn?sn.value:sn.textContent,Yn=!0)),y=Nd(r,x),0<y.length&&(x=new On(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Jn(n),b!==null&&(x.data=b)))),(b=Un?Xn(e,n):Zn(e,n))&&(x=Nd(r,`onBeforeInput`),0<x.length&&(y=new On(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),xd(s,e,r,n,i)}Ed(s,t)})}function Md(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Nd(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=nn(e,n),i!=null&&r.unshift(Md(e,i,a)),i=nn(e,t),i!=null&&r.push(Md(e,i,a))),e.tag===3)return r;e=e.return}return[]}function K(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Pd(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=nn(n,a),l!=null&&o.unshift(Md(n,l,c))):i||(l=nn(n,a),l!=null&&o.push(Md(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Fd=/\r\n?/g,Id=/\u0000|\uFFFD/g;function Ld(e){return(typeof e==`string`?e:``+e).replace(Fd,`
|
|
30
|
+
`).replace(Id,``)}function Rd(e,t){return t=Ld(t),Ld(e)===t}function zd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Bt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Bt(e,``+r);break;case`className`:wt(e,`class`,r);break;case`tabIndex`:wt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:wt(e,n,r);break;case`style`:Ut(e,r,o);break;case`data`:if(t!==`object`){wt(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=qt(``+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`&&zd(e,t,`name`,a.name,a,null),zd(e,t,`formEncType`,a.formEncType,a,null),zd(e,t,`formMethod`,a.formMethod,a,null),zd(e,t,`formTarget`,a.formTarget,a,null)):(zd(e,t,`encType`,a.encType,a,null),zd(e,t,`method`,a.method,a,null),zd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=qt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Jt);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=qt(``+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),Ct(e,`popover`,r);break;case`xlinkActuate`:Tt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Tt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Tt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Tt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Tt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Tt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Tt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Tt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Tt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Ct(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=Gt.get(n)||n,Ct(e,n,r))}}function Bd(e,t,n,r,a,o){switch(n){case`style`:Ut(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`?Bt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Bt(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=Jt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!gt.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[rt]||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,``):Ct(e,n,r)}}}function Vd(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:zd(e,t,o,s,n,null)}}a&&zd(e,t,`srcSet`,n.srcSet,n,null),r&&zd(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:zd(e,t,r,d,n,null)}}Ft(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:zd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Lt(e,!!r,n,!0):Lt(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:zd(e,t,s,c,n,null)}zt(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:zd(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:zd(e,t,u,r,n,null)}return;default:if(Wt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Bd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&zd(e,t,c,r,n,null))}function Hd(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)||zd(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&&zd(e,t,p,m,r,f)}}Pt(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)||zd(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&&zd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Lt(e,!!n,n?[]:``,!1):Lt(e,!!n,t,!0)):Lt(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:zd(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&&zd(e,t,s,a,r,o)}Rt(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:zd(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:zd(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)&&zd(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:zd(e,t,u,p,r,m)}return;default:if(Wt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Bd(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||Bd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&zd(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||zd(e,t,f,p,r,m)}function Ud(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Wd(){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&&Ud(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&&Ud(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 Gd=null,Kd=null;function qd(e){return e.nodeType===9?e:e.ownerDocument}function Jd(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 Yd(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 Xd(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 Zd=null;function Qd(){var e=window.event;return e&&e.type===`popstate`?e===Zd?!1:(Zd=e,!0):(Zd=null,!1)}var $d=typeof setTimeout==`function`?setTimeout:void 0,ef=typeof clearTimeout==`function`?clearTimeout:void 0,tf=typeof Promise==`function`?Promise:void 0,nf=typeof queueMicrotask==`function`?queueMicrotask:tf===void 0?$d:function(e){return tf.resolve(null).then(e).catch(rf)};function rf(e){setTimeout(function(){throw e})}function af(e){return e===`head`}function of(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),Bp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)bf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,bf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ct]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&bf(e.ownerDocument.body);n=i}while(n);Bp(t)}function sf(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 cf(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`:cf(n),lt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function lf(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[ct])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=hf(e.nextSibling),e===null)break}return null}function uf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=hf(e.nextSibling),e===null))return null;return e}function df(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=hf(e.nextSibling),e===null))return null;return e}function ff(e){return e.data===`$?`||e.data===`$~`}function pf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function mf(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 hf(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 gf=null;function _f(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return hf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function vf(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 yf(e,t,n){switch(t=qd(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 bf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);lt(e)}var xf=new Map,Sf=new Set;function Cf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var wf=M.d;M.d={f:Tf,r:Ef,D:kf,C:Af,L:jf,m:Mf,X:Pf,S:Nf,M:Ff};function Tf(){var e=wf.f(),t=Du();return e||t}function Ef(e){var t=dt(e);t!==null&&t.tag===5&&t.type===`form`?Ds(t):wf.r(e)}var Df=typeof document>`u`?null:document;function Of(e,t,n){var r=Df;if(r&&typeof t==`string`&&t){var i=Nt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Sf.has(i)||(Sf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Vd(t,`link`,e),mt(t),r.head.appendChild(t)))}}function kf(e){wf.D(e),Of(`dns-prefetch`,e,null)}function Af(e,t){wf.C(e,t),Of(`preconnect`,e,t)}function jf(e,t,n){wf.L(e,t,n);var r=Df;if(r&&e&&t){var i=`link[rel="preload"][as="`+Nt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Nt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Nt(n.imageSizes)+`"]`)):i+=`[href="`+Nt(e)+`"]`;var a=i;switch(t){case`style`:a=Lf(e);break;case`script`:a=Vf(e)}xf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),xf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Rf(a))||t===`script`&&r.querySelector(Hf(a))||(t=r.createElement(`link`),Vd(t,`link`,e),mt(t),r.head.appendChild(t)))}}function Mf(e,t){wf.m(e,t);var n=Df;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Nt(r)+`"][href="`+Nt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Vf(e)}if(!xf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),xf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Hf(a)))return}r=n.createElement(`link`),Vd(r,`link`,e),mt(r),n.head.appendChild(r)}}}function Nf(e,t,n){wf.S(e,t,n);var r=Df;if(r&&e){var i=pt(r).hoistableStyles,a=Lf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Rf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=xf.get(a))&&Gf(e,n);var c=o=r.createElement(`link`);mt(c),Vd(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,Wf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Pf(e,t){wf.X(e,t);var n=Df;if(n&&e){var r=pt(n).hoistableScripts,i=Vf(e),a=r.get(i);a||(a=n.querySelector(Hf(i)),a||(e=f({src:e,async:!0},t),(t=xf.get(i))&&Kf(e,t),a=n.createElement(`script`),mt(a),Vd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Ff(e,t){wf.M(e,t);var n=Df;if(n&&e){var r=pt(n).hoistableScripts,i=Vf(e),a=r.get(i);a||(a=n.querySelector(Hf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=xf.get(i))&&Kf(e,t),a=n.createElement(`script`),mt(a),Vd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function If(e,t,n,r){var a=(a=P.current)?Cf(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=Lf(n.href),n=pt(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=Lf(n.href);var o=pt(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(Rf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),xf.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},xf.set(e,n),o||Bf(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=Vf(n),n=pt(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 Lf(e){return`href="`+Nt(e)+`"`}function Rf(e){return`link[rel="stylesheet"][`+e+`]`}function zf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Bf(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}),Vd(t,`link`,n),mt(t),e.head.appendChild(t))}function Vf(e){return`[src="`+Nt(e)+`"]`}function Hf(e){return`script[async]`+e}function Uf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Nt(n.href)+`"]`);if(r)return t.instance=r,mt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),mt(r),Vd(r,`style`,a),Wf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Lf(n.href);var o=e.querySelector(Rf(a));if(o)return t.state.loading|=4,t.instance=o,mt(o),o;r=zf(n),(a=xf.get(a))&&Gf(r,a),o=(e.ownerDocument||e).createElement(`link`),mt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Vd(o,`link`,r),t.state.loading|=4,Wf(o,n.precedence,e),t.instance=o;case`script`:return o=Vf(n.src),(a=e.querySelector(Hf(o)))?(t.instance=a,mt(a),a):(r=n,(a=xf.get(o))&&(r=f({},n),Kf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),mt(a),Vd(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,Wf(r,n.precedence,e));return t.instance}function Wf(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 Gf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Kf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var qf=null;function Jf(e,t,n){if(qf===null){var r=new Map,i=qf=new Map;i.set(n,r)}else i=qf,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[ct]||a[nt]||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 Yf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Xf(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 Zf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Qf(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=Lf(r.href),a=t.querySelector(Rf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=tp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,mt(a);return}a=t.ownerDocument||t,r=zf(r),(i=xf.get(i))&&Gf(r,i),a=a.createElement(`link`),mt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Vd(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=tp.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $f=0;function ep(e,t){return e.stylesheets&&e.count===0&&rp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&rp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&$f===0&&($f=62500*Wd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&rp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>$f?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function tp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)rp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var np=null;function rp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,np=new Map,t.forEach(ip,e),np=null,tp.call(e))}function ip(e,t){if(!(t.state.loading&4)){var n=np.get(e);if(n)var r=n.get(null);else{n=new Map,np.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=tp.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 ap={$$typeof:b,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function op(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=Ge(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ge(0),this.hiddenUpdates=Ge(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 sp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new op(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ai(3,null,null,t),e.current=a,a.stateNode=e,t=oa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},za(a),e}function cp(e){return e?(e=ri,e):ri}function lp(e,t,n,r,i,a){i=cp(i),r.context===null?r.context=i:r.pendingContext=i,r=Va(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ha(e,r,t),n!==null&&(Su(n,e,t),Ua(n,e,t))}function up(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function dp(e,t){up(e,t),(e=e.alternate)&&up(e,t)}function fp(e){if(e.tag===13||e.tag===31){var t=ei(e,67108864);t!==null&&Su(t,e,67108864),dp(e,67108864)}}function pp(e){if(e.tag===13||e.tag===31){var t=bu();t=Ze(t);var n=ei(e,t);n!==null&&Su(n,e,t),dp(e,t)}}var mp=!0;function hp(e,t,n,r){var i=j.T;j.T=null;var a=M.p;try{M.p=2,_p(e,t,n,r)}finally{M.p=a,j.T=i}}function gp(e,t,n,r){var i=j.T;j.T=null;var a=M.p;try{M.p=8,_p(e,t,n,r)}finally{M.p=a,j.T=i}}function _p(e,t,n,r){if(mp){var i=vp(r);if(i===null)jd(e,t,r,yp,n),Ap(e,r);else if(Mp(i,e,t,n,r))r.stopPropagation();else if(Ap(e,r),t&4&&-1<kp.indexOf(e)){for(;i!==null;){var a=dt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Be(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ne(o);s.entanglements[1]|=c,o&=~c}ud(a),!(Vl&6)&&(cu=R()+500,dd(0,!1))}}break;case 31:case 13:s=ei(a,2),s!==null&&Su(s,a,2),Du(),dp(a,2)}if(a=vp(r),a===null&&jd(e,t,r,yp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else jd(e,t,r,null,n)}}function vp(e){return e=Xt(e),bp(e)}var yp=null;function bp(e){if(yp=null,e=ut(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 yp=e,null}function xp(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(z()){case we:return 2;case Te:return 8;case Ee:case De:return 32;case Oe:return 268435456;default:return 32}default:return 32}}var Sp=!1,Cp=null,wp=null,Tp=null,Ep=new Map,Dp=new Map,Op=[],kp=`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 Ap(e,t){switch(e){case`focusin`:case`focusout`:Cp=null;break;case`dragenter`:case`dragleave`:wp=null;break;case`mouseover`:case`mouseout`:Tp=null;break;case`pointerover`:case`pointerout`:Ep.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Dp.delete(t.pointerId)}}function jp(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=dt(t),t!==null&&fp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Mp(e,t,n,r,i){switch(t){case`focusin`:return Cp=jp(Cp,e,t,n,r,i),!0;case`dragenter`:return wp=jp(wp,e,t,n,r,i),!0;case`mouseover`:return Tp=jp(Tp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Ep.set(a,jp(Ep.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Dp.set(a,jp(Dp.get(a)||null,e,t,n,r,i)),!0}return!1}function Np(e){var t=ut(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,et(e.priority,function(){pp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,et(e.priority,function(){pp(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 Pp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=vp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Yt=r,n.target.dispatchEvent(r),Yt=null}else return t=dt(n),t!==null&&fp(t),e.blockedOn=n,!1;t.shift()}return!0}function Fp(e,t,n){Pp(e)&&n.delete(t)}function Ip(){Sp=!1,Cp!==null&&Pp(Cp)&&(Cp=null),wp!==null&&Pp(wp)&&(wp=null),Tp!==null&&Pp(Tp)&&(Tp=null),Ep.forEach(Fp),Dp.forEach(Fp)}function Lp(e,n){e.blockedOn===n&&(e.blockedOn=null,Sp||(Sp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Ip)))}var Rp=null;function zp(e){Rp!==e&&(Rp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Rp===e&&(Rp=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(bp(r||n)===null)continue;break}var a=dt(n);a!==null&&(e.splice(t,3),t-=3,Ts(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Bp(e){function t(t){return Lp(t,e)}Cp!==null&&Lp(Cp,e),wp!==null&&Lp(wp,e),Tp!==null&&Lp(Tp,e),Ep.forEach(t),Dp.forEach(t);for(var n=0;n<Op.length;n++){var r=Op[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Op.length&&(n=Op[0],n.blockedOn===null);)Np(n),n.blockedOn===null&&Op.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[rt]||null;if(typeof a==`function`)o||zp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[rt]||null)s=o.formAction;else if(bp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),zp(n)}}}function Vp(){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 Hp(e){this._internalRoot=e}Up.prototype.render=Hp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;lp(n,bu(),e,t,null,null)},Up.prototype.unmount=Hp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;lp(e.current,2,null,e,null,null),Du(),t[it]=null}};function Up(e){this._internalRoot=e}Up.prototype.unstable_scheduleHydration=function(e){if(e){var t=$e();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Op.length&&t!==0&&t<Op[n].priority;n++);Op.splice(n,0,e),n===0&&Np(e)}};var Wp=n.version;if(Wp!==`19.2.7`)throw Error(i(527,Wp,`19.2.7`));M.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:d(e),e=e===null?null:e.stateNode,e};var Gp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:j,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Kp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Kp.isDisabled&&Kp.supportsFiber)try{je=Kp.inject(Gp),Me=Kp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Js,s=Ys,c=U;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=sp(e,1,!1,null,null,n,r,null,o,s,c,Vp),e[it]=t.current,Ad(e),new Hp(t)}})),Dr=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=Er()})),Or={black:`#000`,white:`#fff`},kr={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`},Ar={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`},jr={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`},Mr={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`},Nr={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`},Pr={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`},Fr={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`},Ir={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 Lr(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 Rr=`$$material`;function zr(){return zr=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},zr.apply(null,arguments)}function Br(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 Vr(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 Hr=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||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(Vr(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=Br(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}(),Ur=`-ms-`,Wr=`-moz-`,Gr=`-webkit-`,Kr=`comm`,qr=`rule`,Jr=`decl`,Yr=`@import`,Xr=`@keyframes`,Zr=`@layer`,Qr=Math.abs,$r=String.fromCharCode,ei=Object.assign;function ti(e,t){return oi(e,0)^45?(((t<<2^oi(e,0))<<2^oi(e,1))<<2^oi(e,2))<<2^oi(e,3):0}function ni(e){return e.trim()}function ri(e,t){return(e=t.exec(e))?e[0]:e}function ii(e,t,n){return e.replace(t,n)}function ai(e,t){return e.indexOf(t)}function oi(e,t){return e.charCodeAt(t)|0}function si(e,t,n){return e.slice(t,n)}function ci(e){return e.length}function li(e){return e.length}function ui(e,t){return t.push(e),e}function di(e,t){return e.map(t).join(``)}var fi=1,pi=1,mi=0,hi=0,gi=0,_i=``;function vi(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:fi,column:pi,length:o,return:``}}function yi(e,t){return ei(vi(``,null,null,``,null,null,0),e,{length:-e.length},t)}function bi(){return gi}function xi(){return gi=hi>0?oi(_i,--hi):0,pi--,gi===10&&(pi=1,fi--),gi}function Si(){return gi=hi<mi?oi(_i,hi++):0,pi++,gi===10&&(pi=1,fi++),gi}function Ci(){return oi(_i,hi)}function wi(){return hi}function Ti(e,t){return si(_i,e,t)}function Ei(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 Di(e){return fi=pi=1,mi=ci(_i=e),hi=0,[]}function Oi(e){return _i=``,e}function ki(e){return ni(Ti(hi-1,Mi(e===91?e+2:e===40?e+1:e)))}function Ai(e){for(;(gi=Ci())&&gi<33;)Si();return Ei(e)>2||Ei(gi)>3?``:` `}function ji(e,t){for(;--t&&Si()&&!(gi<48||gi>102||gi>57&&gi<65||gi>70&&gi<97););return Ti(e,wi()+(t<6&&Ci()==32&&Si()==32))}function Mi(e){for(;Si();)switch(gi){case e:return hi;case 34:case 39:e!==34&&e!==39&&Mi(gi);break;case 40:e===41&&Mi(e);break;case 92:Si();break}return hi}function Ni(e,t){for(;Si()&&e+gi!==57&&!(e+gi===84&&Ci()===47););return`/*`+Ti(t,hi-1)+`*`+$r(e===47?e:Si())}function Pi(e){for(;!Ei(Ci());)Si();return Ti(e,hi)}function Fi(e){return Oi(Ii(``,null,null,null,[``],e=Di(e),0,[0],e))}function Ii(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=Si()){case 40:if(m!=108&&oi(C,d-1)==58){ai(C+=ii(ki(v),`&`,`&\f`),`&\f`)!=-1&&(_=-1);break}case 34:case 39:case 91:C+=ki(v);break;case 9:case 10:case 13:case 32:C+=Ai(m);break;case 92:C+=ji(wi()-1,7);continue;case 47:switch(Ci()){case 42:case 47:ui(Ri(Ni(Si(),wi()),t,n),c);break;default:C+=`/`}break;case 123*h:s[l++]=ci(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=ii(C,/\f/g,``)),p>0&&ci(C)-d&&ui(p>32?zi(C+`;`,r,n,d-1):zi(ii(C,` `,``)+`;`,r,n,d-2),c);break;case 59:C+=`;`;default:if(ui(S=Li(C,t,n,l,u,i,s,y,b=[],x=[],d),a),v===123)if(u===0)Ii(C,t,S,S,b,a,d,s,x);else switch(f===99&&oi(C,3)===110?100:f){case 100:case 108:case 109:case 115:Ii(e,S,S,r&&ui(Li(e,S,S,0,0,i,s,y,i,b=[],d),x),i,x,d,s,r?b:x);break;default:Ii(C,S,S,S,[``],x,0,s,x)}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+ci(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&xi()==125)continue}switch(C+=$r(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(ci(C)-1)*_,_=1;break;case 64:Ci()===45&&(C+=ki(Si())),f=Ci(),u=d=ci(y=C+=Pi(wi())),v++;break;case 45:m===45&&ci(C)==2&&(h=0)}}return a}function Li(e,t,n,r,i,a,o,s,c,l,u){for(var d=i-1,f=i===0?a:[``],p=li(f),m=0,h=0,g=0;m<r;++m)for(var _=0,v=si(e,d+1,d=Qr(h=o[m])),y=e;_<p;++_)(y=ni(h>0?f[_]+` `+v:ii(v,/&\f/g,f[_])))&&(c[g++]=y);return vi(e,t,n,i===0?qr:s,c,l,u)}function Ri(e,t,n){return vi(e,t,n,Kr,$r(bi()),si(e,2,-2),0)}function zi(e,t,n,r){return vi(e,t,n,Jr,si(e,0,r),si(e,r+1,-1),r)}function Bi(e,t){for(var n=``,r=li(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||``;return n}function Vi(e,t,n,r){switch(e.type){case Zr:if(e.children.length)break;case Yr:case Jr:return e.return=e.return||e.value;case Kr:return``;case Xr:return e.return=e.value+`{`+Bi(e.children,r)+`}`;case qr:e.value=e.props.join(`,`)}return ci(n=Bi(e.children,r))?e.return=e.value+`{`+n+`}`:``}function Hi(e){var t=li(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 Ui(e){return function(t){t.root||(t=t.return)&&e(t)}}function Wi(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Gi=function(e,t,n){for(var r=0,i=0;r=i,i=Ci(),r===38&&i===12&&(t[n]=1),!Ei(i);)Si();return Ti(e,hi)},Ki=function(e,t){var n=-1,r=44;do switch(Ei(r)){case 0:r===38&&Ci()===12&&(t[n]=1),e[n]+=Gi(hi-1,t,n);break;case 2:e[n]+=ki(r);break;case 4:if(r===44){e[++n]=Ci()===58?`&\f`:``,t[n]=e[n].length;break}default:e[n]+=$r(r)}while(r=Si());return e},qi=function(e,t){return Oi(Ki(Di(e),t))},Ji=new WeakMap,Yi=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&&!Ji.get(n))&&!r){Ji.set(e,!0);for(var i=[],a=qi(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]}}},Xi=function(e){if(e.type===`decl`){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return=``,e.value=``)}};function Zi(e,t){switch(ti(e,t)){case 5103:return Gr+`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 Gr+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Gr+e+Wr+e+Ur+e+e;case 6828:case 4268:return Gr+e+Ur+e+e;case 6165:return Gr+e+Ur+`flex-`+e+e;case 5187:return Gr+e+ii(e,/(\w+).+(:[^]+)/,Gr+`box-$1$2`+Ur+`flex-$1$2`)+e;case 5443:return Gr+e+Ur+`flex-item-`+ii(e,/flex-|-self/,``)+e;case 4675:return Gr+e+Ur+`flex-line-pack`+ii(e,/align-content|flex-|-self/,``)+e;case 5548:return Gr+e+Ur+ii(e,`shrink`,`negative`)+e;case 5292:return Gr+e+Ur+ii(e,`basis`,`preferred-size`)+e;case 6060:return Gr+`box-`+ii(e,`-grow`,``)+Gr+e+Ur+ii(e,`grow`,`positive`)+e;case 4554:return Gr+ii(e,/([^-])(transform)/g,`$1`+Gr+`$2`)+e;case 6187:return ii(ii(ii(e,/(zoom-|grab)/,Gr+`$1`),/(image-set)/,Gr+`$1`),e,``)+e;case 5495:case 3959:return ii(e,/(image-set\([^]*)/,Gr+"$1$`$1");case 4968:return ii(ii(e,/(.+:)(flex-)?(.*)/,Gr+`box-pack:$3`+Ur+`flex-pack:$3`),/s.+-b[^;]+/,`justify`)+Gr+e+e;case 4095:case 3583:case 4068:case 2532:return ii(e,/(.+)-inline(.+)/,Gr+`$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(ci(e)-1-t>6)switch(oi(e,t+1)){case 109:if(oi(e,t+4)!==45)break;case 102:return ii(e,/(.+:)(.+)-([^]+)/,`$1`+Gr+`$2-$3$1`+Wr+(oi(e,t+3)==108?`$3`:`$2-$3`))+e;case 115:return~ai(e,`stretch`)?Zi(ii(e,`stretch`,`fill-available`),t)+e:e}break;case 4949:if(oi(e,t+1)!==115)break;case 6444:switch(oi(e,ci(e)-3-(~ai(e,`!important`)&&10))){case 107:return ii(e,`:`,`:`+Gr)+e;case 101:return ii(e,/(.+:)([^;!]+)(;|!.+)?/,`$1`+Gr+(oi(e,14)===45?`inline-`:``)+`box$3$1`+Gr+`$2$3$1`+Ur+`$2box$3`)+e}break;case 5936:switch(oi(e,t+11)){case 114:return Gr+e+Ur+ii(e,/[svh]\w+-[tblr]{2}/,`tb`)+e;case 108:return Gr+e+Ur+ii(e,/[svh]\w+-[tblr]{2}/,`tb-rl`)+e;case 45:return Gr+e+Ur+ii(e,/[svh]\w+-[tblr]{2}/,`lr`)+e}return Gr+e+Ur+e+e}return e}var Qi=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Jr:e.return=Zi(e.value,e.length);break;case Xr:return Bi([yi(e,{value:ii(e.value,`@`,`@`+Gr)})],r);case qr:if(e.length)return di(e.props,function(t){switch(ri(t,/(::plac\w+|:read-\w+)/)){case`:read-only`:case`:read-write`:return Bi([yi(e,{props:[ii(t,/:(read-\w+)/,`:`+Wr+`$1`)]})],r);case`::placeholder`:return Bi([yi(e,{props:[ii(t,/:(plac\w+)/,`:`+Gr+`input-$1`)]}),yi(e,{props:[ii(t,/:(plac\w+)/,`:`+Wr+`$1`)]}),yi(e,{props:[ii(t,/:(plac\w+)/,Ur+`input-$1`)]})],r)}return``})}}],$i=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||Qi,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=[Yi,Xi],l,u=[Vi,Ui(function(e){l.insert(e)})],d=Hi(c.concat(r,u)),f=function(e){return Bi(Fi(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 Hr({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},ea=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})),ta=o(((e,t)=>{t.exports=ea()})),na=o(((e,t)=>{var n=ta(),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}));function ra(e,t,n){var r=``;return n.split(` `).forEach(function(n){e[n]===void 0?n&&(r+=n+` `):t.push(e[n]+`;`)}),r}var ia=function(e,t,n){var r=e.key+`-`+t.name;n===!1&&e.registered[r]===void 0&&(e.registered[r]=t.styles)},aa=function(e,t,n){ia(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 oa(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 sa={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},ca=/[A-Z]|^ms/g,la=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ua=function(e){return e.charCodeAt(1)===45},da=function(e){return e!=null&&typeof e!=`boolean`},fa=Wi(function(e){return ua(e)?e:e.replace(ca,`-$&`).toLowerCase()}),pa=function(e,t){switch(e){case`animation`:case`animationName`:if(typeof t==`string`)return t.replace(la,function(e,t,n){return _a={name:t,styles:n,next:_a},t})}return sa[e]!==1&&!ua(e)&&typeof t==`number`&&t!==0?t+`px`:t};function ma(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 _a={name:i.name,styles:i.styles,next:_a},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)_a={name:o.name,styles:o.styles,next:_a},o=o.next;return a.styles+`;`}return ha(e,t,n);case`function`:if(e!==void 0){var s=_a,c=n(e);return _a=s,ma(e,t,c)}break}var l=n;if(t==null)return l;var u=t[l];return u===void 0?l:u}function ha(e,t,n){var r=``;if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=ma(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]+`}`:da(s)&&(r+=fa(a)+`:`+pa(a,s)+`;`)}else if(Array.isArray(o)&&typeof o[0]==`string`&&(t==null||t[o[0]]===void 0))for(var c=0;c<o.length;c++)da(o[c])&&(r+=fa(a)+`:`+pa(a,o[c])+`;`);else{var l=ma(e,t,o);switch(a){case`animation`:case`animationName`:r+=fa(a)+`:`+l+`;`;break;default:r+=a+`{`+l+`}`}}}return r}var ga=/label:\s*([^\s;{]+)\s*(;|$)/g,_a;function va(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=``;_a=void 0;var a=e[0];a==null||a.raw===void 0?(r=!1,i+=ma(n,t,a)):i+=a[0];for(var o=1;o<e.length;o++)i+=ma(n,t,e[o]),r&&(i+=a[o]);ga.lastIndex=0;for(var s=``,c;(c=ga.exec(i))!==null;)s+=`-`+c[1];return{name:oa(i)+s,styles:i,next:_a}}var ya=function(e){return e()},ba=I.useInsertionEffect?I.useInsertionEffect:!1,xa=ba||ya,Sa=ba||I.useLayoutEffect,Ca=I.createContext(typeof HTMLElement<`u`?$i({key:`css`}):null);Ca.Provider;var wa=function(e){return(0,I.forwardRef)(function(t,n){return e(t,(0,I.useContext)(Ca),n)})},Ta=I.createContext({}),Ea={}.hasOwnProperty,Da=`__EMOTION_TYPE_PLEASE_DO_NOT_USE__`,Oa=function(e,t){var n={};for(var r in t)Ea.call(t,r)&&(n[r]=t[r]);return n[Da]=e,n},ka=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return ia(t,n,r),xa(function(){return aa(t,n,r)}),null},Aa=wa(function(e,t,n){var r=e.css;typeof r==`string`&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[Da],a=[r],o=``;typeof e.className==`string`?o=ra(t.registered,a,e.className):e.className!=null&&(o=e.className+` `);var s=va(a,void 0,I.useContext(Ta));o+=t.key+`-`+s.name;var c={};for(var l in e)Ea.call(e,l)&&l!==`css`&&l!==Da&&(c[l]=e[l]);return c.className=o,n&&(c.ref=n),I.createElement(I.Fragment,null,I.createElement(ka,{cache:t,serialized:s,isStringTag:typeof i==`string`}),I.createElement(i,c))});na();var ja=function(e,t){var n=arguments;if(t==null||!Ea.call(t,`css`))return I.createElement.apply(void 0,n);var r=n.length,i=Array(r);i[0]=Aa,i[1]=Oa(e,t);for(var a=2;a<r;a++)i[a]=n[a];return I.createElement.apply(null,i)};(function(e){var t;t||=e.JSX||={}})(ja||={});var Ma=wa(function(e,t){var n=e.styles,r=va([n],void 0,I.useContext(Ta)),i=I.useRef();return Sa(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]),Sa(function(){var e=i.current,n=e[0];if(e[1]){e[1]=!1;return}r.next!==void 0&&aa(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 Na(){return va([...arguments])}function Pa(){var e=Na.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 Fa=/^((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)-.*))$/,Ia=Wi(function(e){return Fa.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),La=function(e){return e!==`theme`},Ra=function(e){return typeof e==`string`&&e.charCodeAt(0)>96?Ia:La},za=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},Ba=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return ia(t,n,r),xa(function(){return aa(t,n,r)}),null},Va=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=za(t,n,r),c=s||Ra(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=wa(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=I.useContext(Ta)}typeof e.className==`string`?a=ra(t.registered,u,e.className):e.className!=null&&(a=e.className+` `);var m=va(d.concat(u),t.registered,f);a+=t.key+`-`+m.name,o!==void 0&&(a+=` `+o);var h=l&&s===void 0?Ra(r):c,g={};for(var _ in e)l&&_===`as`||h(_)&&(g[_]=e[_]);return g.className=a,n&&(g.ref=n),I.createElement(I.Fragment,null,I.createElement(Ba,{cache:t,serialized:m,isStringTag:typeof r==`string`}),I.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}}),h.withComponent=function(t,r){return e(t,zr({},n,r,{shouldForwardProp:za(h,r,!0)})).apply(void 0,d)},h}},Ha=`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(`.`),Ua=Va.bind(null);Ha.forEach(function(e){Ua[e]=Ua(e)});var Wa=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})),H=o(((e,t)=>{t.exports=Wa()}))();function Ga(e){return e==null||Object.keys(e).length===0}function Ka(e){let{styles:t,defaultTheme:n={}}=e;return(0,H.jsx)(Ma,{styles:typeof t==`function`?e=>t(Ga(e)?n:e):t})}function qa(e,t){return Ua(e,t)}function Ja(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}var Ya=[];function Xa(e){return Ya[0]=e,va(Ya)}var Za=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))}})),Qa=o(((e,t)=>{t.exports=Za()}))();function $a(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 eo(e){if(I.isValidElement(e)||(0,Qa.isValidElementType)(e)||!$a(e))return e;let t={};return Object.keys(e).forEach(n=>{t[n]=eo(e[n])}),t}function to(e,t,n={clone:!0}){let r=n.clone?{...e}:e;return $a(e)&&$a(t)&&Object.keys(t).forEach(i=>{I.isValidElement(t[i])||(0,Qa.isValidElementType)(t[i])?r[i]=t[i]:$a(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&$a(e[i])?r[i]=to(e[i],t[i],n):n.clone?r[i]=$a(t[i])?eo(t[i]):t[i]:r[i]=t[i]}),r}var no=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 ro(e){let{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n=`px`,step:r=5,...i}=e,a=no(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 io=/min-width:\s*([0-9.]+)/;function ao(e,t){if(!e.containerQueries||!oo(t))return t;let n=[];for(let e in t)e.startsWith(`@container`)&&n.push(e);n.sort((e,t)=>(e.match(io)?.[1]||0)-+(t.match(io)?.[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 oo(e){for(let t in e)if(t.startsWith(`@container`))return!0;return!1}function so(e,t){return t===`@`||t.startsWith(`@`)&&(e.some(e=>t.startsWith(`@${e}`))||!!t.match(/^@\d/))}function co(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 lo(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 uo={borderRadius:4};function fo(e){if(e==null)return!0;for(let t in e)return!1;return!0}function po(e,t){let n=Array.isArray(t),r=Array.isArray(e);return vo(t)?t:yo(e)?bo(t):n&&r?go(e,t):n===r?xo(e,t):bo(t)}function mo(e){let t=0,n=e.length,r=Array(n);for(t=0;t<n;t+=1)r[t]=bo(e[t]);return r}function ho(e){let t={};for(let n in e)n===`__proto__`||n===`constructor`||n===`prototype`||(t[n]=bo(e[n]));return t}function go(e,t){let n=e.length;for(let r=0;r<t.length;r+=1)e[n+r]=bo(t[r]);return e}function _o(e){return typeof e==`object`&&!!e&&!(e instanceof RegExp)&&!(e instanceof Date)}function vo(e){return typeof e!=`object`||!e}function yo(e){return typeof e!=`object`||!e||e instanceof RegExp||e instanceof Date}function bo(e){return _o(e)?Array.isArray(e)?mo(e):ho(e):e}function xo(e,t){for(let n in t)n===`__proto__`||n===`constructor`||n===`prototype`||(n in e?e[n]=po(e[n],t[n]):e[n]=bo(t[n]));return e}var So={},Co={xs:0,sm:600,md:900,lg:1200,xl:1536},wo=ro({values:Co}),To={containerQueries:e=>({up:t=>{let n=typeof t==`number`?t:Co[t]||t;return typeof n==`number`&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Eo(e,t,n){let r={};return Do(r,e.theme,t,(e,t,i)=>{let a=n(t,i);e?r[e]=a:po(r,a)})}function Do(e,t,n,r){if(t??=So,Array.isArray(n)){let i=t.breakpoints??wo;for(let t=0;t<n.length;t+=1)Oo(e,i.up(i.keys[t]),n[t],void 0,r);return e}if(typeof n==`object`){let i=t.breakpoints??wo,a=i.values??Co;for(let o in n)if(so(i.keys,o)){let i=co(t.containerQueries?t:To,o);i&&Oo(e,i,n[o],o,r)}else if(o in a)Oo(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 Oo(e,t,n,r,i){e[t]??={},i(t,n,r)}function ko(e=wo){let{internal_mediaKeys:t}=e,n={};for(let e=0;e<t.length;e+=1)n[t[e]]={};return n}function Ao(e,t){let n=e.internal_mediaKeys;for(let e=0;e<n.length;e+=1){let r=n[e];fo(t[r])&&delete t[r]}return t}function jo(e,...t){return Ao(e,[ko(e),...t].reduce((e,t)=>to(e,t),{}))}function Mo(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 No(e){let{values:t,breakpoints:n,base:r}=e,i=r||Mo(t,n),a=Object.keys(i);if(a.length===0)return t;let o;return a.reduce((e,n,r)=>{if(Array.isArray(t))e[n]=t[r]==null?t[o]:t[r],o=r;else if(typeof t==`object`&&t){let r=t;e[n]=r[n]==null?r[o]:r[n],o=n}else e[n]=t;return e},{})}function Po(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(so(e.keys,n[t]))return!0}return!1}function Fo(e){if(typeof e!=`string`)throw Error(Lr(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Io(e,t,n,r){let i;return i=typeof e==`function`?e(n):Array.isArray(e)?e[n]||n:typeof n==`string`&&Lo(e,n,!0,r)||n,t&&(i=t(i,n,e)),i}function Lo(e,t,n=!0,r=void 0){if(!e||!t)return null;let i=t.split(`.`);if(e.vars&&n){let t=Ro(e.vars,i,r);if(t!=null)return t}return Ro(e,i,r)}function Ro(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"?``:Fo(e)}`;return r?.[i]}return i}function zo(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=Lo(o,r)||{};return Eo(e,a,e=>{let r=Io(s,i,e,t);return n===!1?r:{[n]:r}})};return a.propTypes={},a.filterProps=[t],a}var Bo={internal_cache:{}},Vo={m:`margin`,p:`padding`},Ho={t:`Top`,r:`Right`,b:`Bottom`,l:`Left`,x:[`Left`,`Right`],y:[`Top`,`Bottom`]},Uo={marginX:`mx`,marginY:`my`,paddingX:`px`,paddingY:`py`},Wo={};for(let e in Vo)Wo[e]=[Vo[e]];for(let e in Vo)for(let t in Ho){let n=Vo[e],r=Ho[t],i=Array.isArray(r)?r.map(e=>n+e):[n+r];Wo[e+t]=i}for(let e in Uo)Wo[e]=Wo[Uo[e]];var Go=new Set([`m`,`mt`,`mr`,`mb`,`ml`,`mx`,`my`,`margin`,`marginTop`,`marginRight`,`marginBottom`,`marginLeft`,`marginX`,`marginY`,`marginInline`,`marginInlineStart`,`marginInlineEnd`,`marginBlock`,`marginBlockStart`,`marginBlockEnd`]),Ko=new Set([`p`,`pt`,`pr`,`pb`,`pl`,`px`,`py`,`padding`,`paddingTop`,`paddingRight`,`paddingBottom`,`paddingLeft`,`paddingX`,`paddingY`,`paddingInline`,`paddingInlineStart`,`paddingInlineEnd`,`paddingBlock`,`paddingBlockStart`,`paddingBlockEnd`]),qo=new Set([...Go,...Ko]);function Jo(e,t,n,r){let i=Lo(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 Yo(e){return Jo(e,`spacing`,8,`spacing`)}function Xo(e,t){return typeof t==`string`||t==null?t:e(t)}var Zo=[``];function Qo(e,t){let n=e.theme??Bo,r=n?.internal_cache?.unarySpacing??Yo(n),i={};for(let n in e){if(!t.has(n))continue;let a=Wo[n]??(Zo[0]=n,Zo),o=e[n];Do(i,e.theme,o,(e,t)=>{let n=e?i[e]:i;for(let e=0;e<a.length;e+=1)n[a[e]]=Xo(r,t)})}return i}function $o(e){return Qo(e,Go)}$o.propTypes={},$o.filterProps=Go;var es=$o;function ts(e){return Qo(e,Ko)}ts.propTypes={},ts.filterProps=Ko;var ns=ts;function rs(e){return Qo(e,qo)}rs.propTypes={},rs.filterProps=qo;function is(e=8,t=Yo({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 as(...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]&&po(n,t[r](e));return n};return n.propTypes={},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n}function os(e){return typeof e==`number`?`${e}px solid`:e}function ss(e,t){return zo({prop:e,themeKey:`borders`,transform:t})}var cs=ss(`border`,os),ls=ss(`borderTop`,os),us=ss(`borderRight`,os),ds=ss(`borderBottom`,os),fs=ss(`borderLeft`,os),ps=ss(`borderColor`),ms=ss(`borderTopColor`),hs=ss(`borderRightColor`),gs=ss(`borderBottomColor`),_s=ss(`borderLeftColor`),vs=ss(`outline`,os),ys=ss(`outlineColor`),bs=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){let t=Jo(e.theme,`shape.borderRadius`,4,`borderRadius`);return Eo(e,e.borderRadius,e=>({borderRadius:Xo(t,e)}))}return null};bs.propTypes={},bs.filterProps=[`borderRadius`],as(cs,ls,us,ds,fs,ps,ms,hs,gs,_s,bs,vs,ys);var xs=e=>{if(e.gap!==void 0&&e.gap!==null){let t=Jo(e.theme,`spacing`,8,`gap`);return Eo(e,e.gap,e=>({gap:Xo(t,e)}))}return null};xs.propTypes={},xs.filterProps=[`gap`];var Ss=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){let t=Jo(e.theme,`spacing`,8,`columnGap`);return Eo(e,e.columnGap,e=>({columnGap:Xo(t,e)}))}return null};Ss.propTypes={},Ss.filterProps=[`columnGap`];var Cs=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){let t=Jo(e.theme,`spacing`,8,`rowGap`);return Eo(e,e.rowGap,e=>({rowGap:Xo(t,e)}))}return null};Cs.propTypes={},Cs.filterProps=[`rowGap`],as(xs,Ss,Cs,zo({prop:`gridColumn`}),zo({prop:`gridRow`}),zo({prop:`gridAutoFlow`}),zo({prop:`gridAutoColumns`}),zo({prop:`gridAutoRows`}),zo({prop:`gridTemplateColumns`}),zo({prop:`gridTemplateRows`}),zo({prop:`gridTemplateAreas`}),zo({prop:`gridArea`}));function ws(e,t){return t===`grey`?t:e}as(zo({prop:`color`,themeKey:`palette`,transform:ws}),zo({prop:`bgcolor`,cssProperty:`backgroundColor`,themeKey:`palette`,transform:ws}),zo({prop:`backgroundColor`,themeKey:`palette`,transform:ws}));var Ts=Co;function Es(e){return e<=1&&e!==0?`${e*100}%`:e}var Ds=zo({prop:`width`,transform:Es}),Os=e=>e.maxWidth!==void 0&&e.maxWidth!==null?Eo(e,e.maxWidth,t=>{let n=e.theme?.breakpoints?.values?.[t]||Ts[t];return n?e.theme?.breakpoints?.unit===`px`?{maxWidth:n}:{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:Es(t)}}):null;Os.filterProps=[`maxWidth`];var ks=zo({prop:`minWidth`,transform:Es}),As=zo({prop:`height`,transform:Es}),js=zo({prop:`maxHeight`,transform:Es}),Ms=zo({prop:`minHeight`,transform:Es});zo({prop:`size`,cssProperty:`width`,transform:Es}),zo({prop:`size`,cssProperty:`height`,transform:Es}),as(Ds,Os,ks,As,js,Ms,zo({prop:`boxSizing`}));var Ns={border:{themeKey:`borders`,transform:os},borderTop:{themeKey:`borders`,transform:os},borderRight:{themeKey:`borders`,transform:os},borderBottom:{themeKey:`borders`,transform:os},borderLeft:{themeKey:`borders`,transform:os},borderColor:{themeKey:`palette`},borderTopColor:{themeKey:`palette`},borderRightColor:{themeKey:`palette`},borderBottomColor:{themeKey:`palette`},borderLeftColor:{themeKey:`palette`},outline:{themeKey:`borders`,transform:os},outlineColor:{themeKey:`palette`},borderRadius:{themeKey:`shape.borderRadius`,style:bs},color:{themeKey:`palette`,transform:ws},bgcolor:{themeKey:`palette`,cssProperty:`backgroundColor`,transform:ws},backgroundColor:{themeKey:`palette`,transform:ws},p:{style:ns},pt:{style:ns},pr:{style:ns},pb:{style:ns},pl:{style:ns},px:{style:ns},py:{style:ns},padding:{style:ns},paddingTop:{style:ns},paddingRight:{style:ns},paddingBottom:{style:ns},paddingLeft:{style:ns},paddingX:{style:ns},paddingY:{style:ns},paddingInline:{style:ns},paddingInlineStart:{style:ns},paddingInlineEnd:{style:ns},paddingBlock:{style:ns},paddingBlockStart:{style:ns},paddingBlockEnd:{style:ns},m:{style:es},mt:{style:es},mr:{style:es},mb:{style:es},ml:{style:es},mx:{style:es},my:{style:es},margin:{style:es},marginTop:{style:es},marginRight:{style:es},marginBottom:{style:es},marginLeft:{style:es},marginX:{style:es},marginY:{style:es},marginInline:{style:es},marginInlineStart:{style:es},marginInlineEnd:{style:es},marginBlock:{style:es},marginBlockStart:{style:es},marginBlockEnd:{style:es},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:xs},rowGap:{style:Cs},columnGap:{style:Ss},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:`zIndex`},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:`shadows`},width:{transform:Es},maxWidth:{style:Os},minWidth:{transform:Es},height:{transform:Es},maxHeight:{transform:Es},minHeight:{transform:Es},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`}},Ps={};function Fs(){function e(t){if(!t.sx)return null;let{sx:n,theme:r=Ps,nested:i}=t,a=r.unstable_sxConfig??Ns,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??wo,l=ko(c);for(let n in s){let i=Rs(s[n],r);if(i!=null){if(typeof i!=`object`){Ls(l,n,i,r,a);continue}if(a[n]){Ls(l,n,i,r,a);continue}Po(c,i)?Do(l,t.theme,i,(e,t)=>{l[e][n]=t}):(o.sx=i,l[n]=e(o))}}return!i&&r.modularCssLayers?{"@layer sx":ao(r,Ao(c,l))}:ao(r,Ao(c,l))}return Array.isArray(n)?n.map(s):s(n)}return e.filterProps=[`sx`],e}var Is=Fs();function Ls(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){po(e,s({[t]:n,theme:r}));return}let{cssProperty:c=t,transform:l}=a,u=Lo(r,o);Do(e,r,n,(n,r)=>{let i=Io(u,l,r,t);c===!1?po(n?e[n]:e,i):n?e[n][c]=i:e[c]=i})}function Rs(e,t){return typeof e==`function`?e(t):e}function zs(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 Bs(e={},...t){let{breakpoints:n={},palette:r={},spacing:i,shape:a={},...o}=e,s=ro(n),c=is(i),l=to({breakpoints:s,direction:`ltr`,components:{},palette:{mode:`light`,...r},spacing:c,shape:{...uo,...a}},o);return l=lo(l),l.applyStyles=zs,l=t.reduce((e,t)=>to(e,t),l),l.unstable_sxConfig={...Ns,...o?.unstable_sxConfig},l.unstable_sx=function(e){return Is({sx:e,theme:this})},l.internal_cache={},l}function Vs(e){return Object.keys(e).length===0}function Hs(e=null){let t=I.useContext(Ta);return!t||Vs(t)?e:t}var Us=Bs();function Ws(e=Us){return Hs(e)}function Gs(e){let t=Xa(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function Ks({styles:e,themeId:t,defaultTheme:n={}}){let r=Ws(n),i=t&&r[t]||r,a=typeof e==`function`?e(i):e;return i.modularCssLayers&&(a=Array.isArray(a)?a.map(e=>Gs(typeof e==`function`?e(i):e)):Gs(a)),(0,H.jsx)(Ka,{styles:a})}var qs=e=>e,Js=(()=>{let e=qs;return{configure(t){e=t},generate(t){return e(t)},reset(){e=qs}}})();function Ys(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=Ys(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function U(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ys(e))&&(r&&(r+=` `),r+=t);return r}function Xs(e={}){let{themeId:t,defaultTheme:n,defaultClassName:r=`MuiBox-root`,generateClassName:i}=e,a=qa(`div`,{shouldForwardProp:e=>e!==`theme`&&e!==`sx`&&e!==`as`})(Is);return I.forwardRef(function(e,o){let s=Ws(n),{className:c,component:l=`div`,...u}=e;return(0,H.jsx)(a,{as:l,ref:o,className:U(c,i?i(r):r),theme:t&&s[t]||s,...u})})}var Zs={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 Qs(e,t,n=`Mui`){let r=Zs[t];return r?`${n}-${r}`:`${Js.generate(e)}-${t}`}function $s(e,t,n=`Mui`){let r={};return t.forEach(t=>{r[t]=Qs(e,t,n)}),r}function ec(e){let{variants:t,...n}=e,r={variants:t,style:Xa(n),isProcessed:!0};return r.style===n||t&&t.forEach(e=>{typeof e.style!=`function`&&(e.style=Xa(e.style))}),r}var tc=Bs();function nc(e){return e!==`ownerState`&&e!==`theme`&&e!==`sx`&&e!==`as`}function rc(e,t){return t&&e&&typeof e==`object`&&e.styles&&!e.styles.startsWith(`@layer`)&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function ic(e){return e?(t,n)=>n[e]:null}function ac(e,t,n){e.theme=fo(e.theme)?n:e.theme[t]||e.theme}function oc(e,t,n){let r=typeof t==`function`?t(e):t;if(Array.isArray(r))return r.flatMap(t=>oc(e,t,n));if(Array.isArray(r?.variants)){let t;if(r.isProcessed)t=n?rc(r.style,n):r.style;else{let{variants:e,...i}=r;t=n?rc(Xa(i),n):i}return sc(e,r.variants,[t],n)}return r?.isProcessed?n?rc(Xa(r.style),n):r.style:n?rc(Xa(r),n):r}function sc(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?rc(Xa(o.style(i)),r):o.style(i))):n.push(r?rc(Xa(o.style),r):o.style)}return n}function cc(e={}){let{themeId:t,defaultTheme:n=tc,rootShouldForwardProp:r=nc,slotShouldForwardProp:i=nc}=e;function a(e){ac(e,t,n)}return(e,t={})=>{Ja(e,e=>e.filter(e=>e!==Is));let{name:n,slot:o,skipVariantsResolver:s,skipSx:c,overridesResolver:l=ic(uc(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=nc;o===`Root`||o===`root`?m=r:o?m=i:lc(e)&&(m=void 0);let h=qa(e,{shouldForwardProp:m,label:void 0,...u}),g=e=>{if(e.__emotion_real===e)return e;if(typeof e==`function`)return function(t){return oc(t,e,t.theme.modularCssLayers?d:void 0)};if($a(e)){let t=ec(e);return function(e){return t.variants?oc(e,t,e.theme.modularCssLayers?d:void 0):e.theme.modularCssLayers?rc(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]=oc(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?sc(e,t,[],e.theme.modularCssLayers?`theme`:void 0):null}),p||o.push(Is),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=[...r,...i,...o],c=h(...s);return e.muiName&&(c.muiName=e.muiName),c};return h.withConfig&&(_.withConfig=h.withConfig),_}}function lc(e){return typeof e==`string`&&e.charCodeAt(0)>96}function uc(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}var dc=cc();function fc(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]=fc(i[t],o[t],n)}}}else a===`className`&&n&&t.className!==void 0?r.className=U(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 pc(e){let{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:fc(t.components[n].defaultProps,r)}function mc(e){let{props:t,name:n,defaultTheme:r,themeId:i}=e,a=Ws(r);return i&&(a=a[i]||a),pc({theme:a,name:n,props:t})}var hc=typeof window<`u`?I.useLayoutEffect:I.useEffect;function gc(e,t,n,r,i){let[a,o]=I.useState(()=>i&&n?n(e).matches:r?r(e).matches:t);return hc(()=>{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 _c={...I}.useSyncExternalStore;function vc(e,t,n,r,i){let a=I.useCallback(()=>t,[t]),o=I.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]=I.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 _c(c,s,o)}function yc(e={}){let{themeId:t}=e;return function(e,n={}){let r=Hs();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}=pc({name:`MuiUseMediaQuery`,props:n,theme:r}),l=I.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(`
|
|
31
|
+
`)),(_c===void 0?gc:vc)(u,a,l,s,c)}}yc();function bc(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}function xc(e,t=0,n=1){return bc(e,t,n)}function Sc(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 Cc(e){if(e.type)return e;if(e.charAt(0)===`#`)return Cc(Sc(e));let t=e.indexOf(`(`),n=e.substring(0,t);if(![`rgb`,`rgba`,`hsl`,`hsla`,`color`].includes(n))throw Error(Lr(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(Lr(10,i))}else r=r.split(`,`);return r=r.map(e=>parseFloat(e)),{type:n,values:r,colorSpace:i}}var wc=e=>{let t=Cc(e);return t.values.slice(0,3).map((e,n)=>t.type.includes(`hsl`)&&n!==0?`${e}%`:e).join(` `)},Tc=(e,t)=>{try{return wc(e)}catch{return e}};function Ec(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 Dc(e){e=Cc(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])),Ec({type:s,values:c})}function Oc(e){e=Cc(e);let t=e.type===`hsl`||e.type===`hsla`?Cc(Dc(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 kc(e,t){let n=Oc(e),r=Oc(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Ac(e,t){return e=Cc(e),t=xc(t),(e.type===`rgb`||e.type===`hsl`)&&(e.type+=`a`),e.type===`color`?e.values[3]=`/${t}`:e.values[3]=t,Ec(e)}function jc(e,t,n){try{return Ac(e,t)}catch{return e}}function Mc(e,t){if(e=Cc(e),t=xc(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 Ec(e)}function Nc(e,t,n){try{return Mc(e,t)}catch{return e}}function Pc(e,t){if(e=Cc(e),t=xc(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 Ec(e)}function Fc(e,t,n){try{return Pc(e,t)}catch{return e}}function Ic(e,t=.15){return Oc(e)>.5?Mc(e,t):Pc(e,t)}function Lc(e,t,n){try{return Ic(e,t)}catch{return e}}var Rc=I.createContext(null);function zc(){return I.useContext(Rc)}var Bc=typeof Symbol==`function`&&Symbol.for?Symbol.for(`mui.nested`):`__THEME_NESTED__`;function Vc(e,t){return typeof t==`function`?t(e):{...e,...t}}function Hc(e){let{children:t,theme:n}=e,r=zc(),i=I.useMemo(()=>{let e=r===null?{...n}:Vc(r,n);return e!=null&&(e[Bc]=r!==null),e},[n,r]);return(0,H.jsx)(Rc.Provider,{value:i,children:t})}var Uc=I.createContext();function Wc({value:e,...t}){return(0,H.jsx)(Uc.Provider,{value:e??!0,...t})}var Gc=()=>I.useContext(Uc)??!1,Kc=I.createContext(void 0);function qc({value:e,children:t}){return(0,H.jsx)(Kc.Provider,{value:e,children:t})}function Jc(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?fc(i.defaultProps,r,t.components.mergeClassNameAndStyle):!i.styleOverrides&&!i.variants?fc(i,r,t.components.mergeClassNameAndStyle):r}function Yc({props:e,name:t}){return Jc({props:e,name:t,theme:{components:I.useContext(Kc)}})}var Xc=0;function Zc(e){let[t,n]=I.useState(e),r=e||t;return I.useEffect(()=>{t??(Xc+=1,n(`mui-${Xc}`))},[t]),r}var Qc={...I}.useId;function $c(e){if(Qc!==void 0){let t=Qc();return e??t}return Zc(e)}function el(e){let t=Hs(),n=$c()||``,{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};`,hc(()=>{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,H.jsx)(Ks,{styles:i}):null}var tl={};function nl(e,t,n,r=!1){return I.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 rl(e){let{children:t,theme:n,themeId:r}=e,i=Hs(tl),a=zc()||tl,o=nl(r,i,n),s=nl(r,a,n,!0),c=(r?o[r]:o).direction===`rtl`,l=el(o);return(0,H.jsx)(Hc,{theme:s,children:(0,H.jsx)(Ta.Provider,{value:o,children:(0,H.jsx)(Wc,{value:c,children:(0,H.jsxs)(qc,{value:r?o[r].components:o.components,children:[l,t]})})})})}var il={theme:void 0};function al(e){let t,n;return function(r){let i=t;return(i===void 0||r.theme!==n)&&(il.theme=r.theme,i=ec(e(il)),t=i,n=r.theme),i}}var ol=`mode`,sl=`color-scheme`,cl=`data-color-scheme`;({...I}).useSyncExternalStore;function ll(e){let{defaultMode:t=`system`,defaultLightColorScheme:n=`light`,defaultDarkColorScheme:r=`dark`,modeStorageKey:i=ol,colorSchemeStorageKey:a=sl,attribute:o=cl,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));
|
|
32
|
+
${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));
|
|
33
|
+
${s}.removeAttribute('${e}'.replace('%s', dark));`),l+=`
|
|
34
|
+
${s}.setAttribute('${e}'.replace('%s', colorScheme), ${t?`${t}.replace('%s', colorScheme)`:`""`});`}else u!==`.%s`&&(l+=`${s}.setAttribute('${u}', colorScheme);`);return(0,H.jsx)(`script`,{suppressHydrationWarning:!0,nonce:typeof window>`u`?c:``,dangerouslySetInnerHTML:{__html:`(function() {
|
|
35
|
+
try {
|
|
36
|
+
let colorScheme = '';
|
|
37
|
+
const mode = localStorage.getItem('${i}') || '${t}';
|
|
38
|
+
const dark = localStorage.getItem('${a}-dark') || '${r}';
|
|
39
|
+
const light = localStorage.getItem('${a}-light') || '${n}';
|
|
40
|
+
if (mode === 'system') {
|
|
41
|
+
// handle system mode
|
|
42
|
+
const mql = window.matchMedia('(prefers-color-scheme: dark)');
|
|
43
|
+
if (mql.matches) {
|
|
44
|
+
colorScheme = dark
|
|
45
|
+
} else {
|
|
46
|
+
colorScheme = light
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (mode === 'light') {
|
|
50
|
+
colorScheme = light;
|
|
51
|
+
}
|
|
52
|
+
if (mode === 'dark') {
|
|
53
|
+
colorScheme = dark;
|
|
54
|
+
}
|
|
55
|
+
if (colorScheme) {
|
|
56
|
+
${l}
|
|
57
|
+
}
|
|
58
|
+
} catch(e){}})();`}},`mui-color-scheme-init`)}function ul(){}var dl=({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 ul;let r=t=>{let r=t.newValue;t.key===e&&n(r)};return t.addEventListener(`storage`,r),()=>{t.removeEventListener(`storage`,r)}}});function fl(){}function pl(e){if(typeof window<`u`&&typeof window.matchMedia==`function`&&e===`system`)return window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}function ml(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 hl(e){return ml(e,t=>{if(t===`light`)return e.lightColorScheme;if(t===`dark`)return e.darkColorScheme})}function gl(e){let{defaultMode:t=`light`,defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:i=[],modeStorageKey:a=ol,colorSchemeStorageKey:o=sl,storageWindow:s=typeof window>`u`?void 0:window,storageManager:c=dl,noSsr:l=!1}=e,u=i.join(`,`),d=i.length>1,f=I.useMemo(()=>c?.({key:a,storageWindow:s}),[c,a,s]),p=I.useMemo(()=>c?.({key:`${o}-light`,storageWindow:s}),[c,o,s]),m=I.useMemo(()=>c?.({key:`${o}-dark`,storageWindow:s}),[c,o,s]),[h,g]=I.useState(()=>{let e=f?.get(t)||t,i=p?.get(n)||n,a=m?.get(r)||r;return{mode:e,systemMode:pl(e),lightColorScheme:i,darkColorScheme:a}}),[_,v]=I.useState(l||!d);I.useEffect(()=>{v(!0)},[]);let y=hl(h),b=I.useCallback(e=>{g(n=>{if(e===n.mode)return n;let r=e??t;return f?.set(r),{...n,mode:r,systemMode:pl(r)}})},[f,t]),x=I.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 ml(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=I.useCallback(e=>{h.mode===`system`&&g(t=>{let n=e?.matches?`dark`:`light`;return t.systemMode===n?t:{...t,systemMode:n}})},[h.mode]),C=I.useRef(S);return C.current=S,I.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]),I.useEffect(()=>{if(d){let e=f?.subscribe(e=>{(!e||[`light`,`dark`,`system`].includes(e))&&b(e||t)})||fl,n=p?.subscribe(e=>{(!e||u.match(e))&&x({light:e})})||fl,r=m?.subscribe(e=>{(!e||u.match(e))&&x({dark:e})})||fl;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 _l=`*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`;function vl(e){let{themeId:t,theme:n={},modeStorageKey:r=ol,colorSchemeStorageKey:i=sl,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=I.createContext(void 0),u=()=>I.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=I.useRef(!1),E=zc(),D=I.useContext(l),O=!!D&&!b,ee=I.useMemo(()=>u||(typeof n==`function`?n():n),[u]),te=ee[t],k=te||ee,{colorSchemes:A=d,components:j=f,cssVarPrefix:M}=k,ne=Object.keys(A).filter(e=>!!A[e]).join(`,`),re=I.useMemo(()=>ne.split(`,`),[ne]),ie=typeof o==`string`?o:o.light,ae=typeof o==`string`?o:o.dark,{mode:oe,setMode:N,systemMode:se,lightColorScheme:ce,darkColorScheme:P,colorScheme:le,setColorScheme:ue}=gl({supportedColorSchemes:re,defaultLightColorScheme:ie,defaultDarkColorScheme:ae,modeStorageKey:p,colorSchemeStorageKey:m,defaultMode:A[ie]&&A[ae]?S:A[k.defaultColorScheme]?.palette?.mode||k.palette?.mode,storageManager:g,storageWindow:_,noSsr:w}),de=oe,F=le;O&&(de=D.mode,F=D.colorScheme);let fe=F||k.defaultColorScheme;k.vars&&!C&&(fe=k.defaultColorScheme);let pe=I.useMemo(()=>{let e=k.generateThemeVars?.()||k.vars,t={...k,components:j,colorSchemes:A,cssVarPrefix:M,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,M]),me=k.colorSchemeSelector;hc(()=>{if(F&&y&&me&&me!==`media`){let e=me,t=me;if(e===`class`&&(t=`.%s`),e===`data`&&(t=`[data-%s]`),e?.startsWith(`data-`)&&!e.includes(`%s`)&&(t=`[${e}="%s"]`),t.startsWith(`.`))y.classList.remove(...re.map(e=>t.substring(1).replace(`%s`,e))),y.classList.add(t.substring(1).replace(`%s`,F));else{let e=t.replace(`%s`,F).match(/\[([^\]]+)\]/);if(e){let[t,n]=e[1].split(`=`);n||re.forEach(e=>{y.removeAttribute(t.replace(F,e))}),y.setAttribute(t,n?n.replace(/"|'/g,``):``)}else y.setAttribute(t,F)}}},[F,me,y,re]),I.useEffect(()=>{let e;if(h&&T.current&&v){let t=v.createElement(`style`);t.appendChild(v.createTextNode(_l)),v.head.appendChild(t),window.getComputedStyle(v.body),e=setTimeout(()=>{v.head.removeChild(t)},1)}return()=>{clearTimeout(e)}},[F,h,v]),I.useEffect(()=>(T.current=!0,()=>{T.current=!1}),[]);let he=I.useMemo(()=>({allColorSchemes:re,colorScheme:F,darkColorScheme:P,lightColorScheme:ce,mode:de,setColorScheme:ue,setMode:N,systemMode:se}),[re,F,P,ce,de,ue,N,se,pe.colorSchemeSelector]),ge=!0;(x||k.cssVariables===!1||O&&E?.cssVarPrefix===M)&&(ge=!1);let _e=(0,H.jsxs)(I.Fragment,{children:[(0,H.jsx)(rl,{themeId:te?t:void 0,theme:pe,children:c}),ge&&(0,H.jsx)(Ka,{styles:pe.generateStyleSheets?.()||[]})]});return O?_e:(0,H.jsx)(l.Provider,{value:he,children:_e})}let m=typeof o==`string`?o:o.light,h=typeof o==`string`?o:o.dark;return{CssVarsProvider:p,useColorScheme:u,getInitColorSchemeScript:e=>ll({colorSchemeStorageKey:i,defaultLightColorScheme:m,defaultDarkColorScheme:h,modeStorageKey:r,...e})}}function yl(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 bl=(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])})},xl=(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)},Sl=(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 Cl(e,t){let{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},a={},o={};return xl(e,(e,t,s)=>{if((typeof t==`string`||typeof t==`number`)&&(!r||!r(e,t))){let r=`--${n?`${n}-`:``}${e.join(`-`)}`,c=Sl(e,t);Object.assign(i,{[r]:c}),bl(a,e,`var(${r})`,s),bl(o,e,`var(${r}, ${c})`,s)}},e=>e[0]===`vars`),{css:i,vars:a,varsWithDefaults:o}}function wl(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}=Cl(l,t),p=f,m={},{[c]:h,...g}=o;if(Object.entries(g||{}).forEach(([e,n])=>{let{vars:r,css:i,varsWithDefaults:a}=Cl(n,t);p=to(p,a),m[e]={css:i,vars:r}}),h){let{css:e,vars:n,varsWithDefaults:r}=Cl(h,t);p=to(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=to(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 Tl(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 El(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 Dl(e,t){return I.isValidElement(e)&&t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}var Ol=(e,t)=>e.filter(e=>t.includes(e)),kl=(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:Ol(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 Al(e){return`--Grid-${e}Spacing`}function jl(e){return`--Grid-parent-${e}Spacing`}var Ml=`--Grid-columns`,Nl=`--Grid-parent-columns`,Pl=({theme:e,ownerState:t})=>{let n={};return kl(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(${Nl}) - (var(${Nl}) - ${t}) * (var(${jl(`column`)}) / var(${Nl})))`}),e(n,r)}),n},Fl=({theme:e,ownerState:t})=>{let n={};return kl(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(${Nl}) + var(${jl(`column`)}) * ${t} / var(${Nl}))`}),e(n,r)}),n},Il=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={[Ml]:12};return kl(e.breakpoints,t.columns,(e,t)=>{let r=t??12;e(n,{[Ml]:r,"> *":{[Nl]:r}})}),n},Ll=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={};return kl(e.breakpoints,t.rowSpacing,(t,r)=>{let i=typeof r==`string`?r:e.spacing?.(r);t(n,{[Al(`row`)]:i,"> *":{[jl(`row`)]:i}})}),n},Rl=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={};return kl(e.breakpoints,t.columnSpacing,(t,r)=>{let i=typeof r==`string`?r:e.spacing?.(r);t(n,{[Al(`column`)]:i,"> *":{[jl(`column`)]:i}})}),n},zl=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={};return kl(e.breakpoints,t.direction,(e,t)=>{e(n,{flexDirection:t})}),n},Bl=({ownerState:e})=>({minWidth:0,boxSizing:`border-box`,...e.container&&{display:`flex`,flexWrap:`wrap`,...e.wrap&&e.wrap!==`wrap`&&{flexWrap:e.wrap},gap:`var(${Al(`row`)}) var(${Al(`column`)})`}}),Vl=e=>{let t=[];return Object.entries(e).forEach(([e,n])=>{n!==!1&&n!==void 0&&t.push(`grid-${e}-${String(n)}`)}),t},Hl=(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[]},Ul=e=>e===void 0?[]:typeof e==`object`?Object.entries(e).map(([e,t])=>`direction-${e}-${t}`):[`direction-xs-${String(e)}`],Wl=Bs(),Gl=dc(`div`,{name:`MuiGrid`,slot:`Root`});function Kl(e){return mc({props:e,name:`MuiGrid`,defaultTheme:Wl})}function ql(e={}){let{createStyledComponent:t=Gl,useThemeProps:n=Kl,useTheme:r=Ws,componentName:i=`MuiGrid`}=e,a=(e,t)=>{let{container:n,direction:r,spacing:a,wrap:o,size:s}=e;return El({root:[`root`,n&&`container`,o!==`wrap`&&`wrap-xs-${String(o)}`,...Ul(r),...Vl(s),...n?Hl(a,t.breakpoints.keys[0]):[]]},e=>Qs(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(Il,Rl,Ll,Pl,zl,Bl,Fl),c=I.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},te=a(ee,i);return(0,H.jsx)(s,{ref:t,as:p,ownerState:ee,className:U(te.root,l),...S,children:I.Children.map(u,e=>I.isValidElement(e)&&Dl(e,[`Grid`])&&f&&e.props.container?I.cloneElement(e,{unstable_level:e.props?.unstable_level??x+1}):e)})});return c.muiName=`Grid`,c}var Jl=Bs(),Yl=dc(`div`,{name:`MuiStack`,slot:`Root`});function Xl(e){return mc({props:e,name:`MuiStack`,defaultTheme:Jl})}function Zl(e,t){let n=I.Children.toArray(e).filter(Boolean);return n.reduce((e,r,i)=>(e.push(r),i<n.length-1&&e.push(I.cloneElement(t,{key:`separator-${i}`})),e),[])}var Ql=e=>({row:`Left`,"row-reverse":`Right`,column:`Top`,"column-reverse":`Bottom`})[e],$l=({ownerState:e,theme:t})=>{let n={display:`flex`,flexDirection:`column`,...Eo({theme:t},No({values:e.direction,breakpoints:t.breakpoints.values}),e=>({flexDirection:e}))};if(e.spacing){let r=Yo(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=No({values:e.direction,base:i}),o=No({values:e.spacing,base:i});typeof a==`object`&&Object.keys(a).forEach((e,t,n)=>{if(!a[e]){let r=t>0?a[n[t-1]]:`column`;a[e]=r}}),n=to(n,Eo({theme:t},o,(t,n)=>e.useFlexGap?{gap:Xo(r,t)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Ql(n?a[n]:e.direction)}`]:Xo(r,t)}}))}return n=jo(t.breakpoints,n),n};function eu(e={}){let{createStyledComponent:t=Yl,useThemeProps:n=Xl,componentName:r=`MuiStack`}=e,i=()=>El({root:[`root`]},e=>Qs(r,e),{}),a=t($l);return I.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),p={direction:o,spacing:s,useFlexGap:d},m=i();return(0,H.jsx)(a,{as:r,ownerState:p,ref:t,className:U(m.root,u),...f,children:c?Zl(l,c):l})})}function tu(){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:Or.white,default:Or.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 nu=tu();function ru(){return{text:{primary:Or.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:Or.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 iu=ru();function au(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=Pc(e.main,i):t===`dark`&&(e.dark=Mc(e.main,a)))}function ou(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 su(e=`light`){return e===`dark`?{main:jr[200],light:jr[50],dark:jr[400]}:{main:jr[700],light:jr[400],dark:jr[800]}}function cu(e=`light`){return e===`dark`?{main:Ar[200],light:Ar[50],dark:Ar[400]}:{main:Ar[500],light:Ar[300],dark:Ar[700]}}function lu(e=`light`){return e===`dark`?{main:kr[500],light:kr[300],dark:kr[700]}:{main:kr[700],light:kr[400],dark:kr[800]}}function uu(e=`light`){return e===`dark`?{main:Mr[400],light:Mr[300],dark:Mr[700]}:{main:Mr[700],light:Mr[500],dark:Mr[900]}}function du(e=`light`){return e===`dark`?{main:Nr[400],light:Nr[300],dark:Nr[700]}:{main:Nr[800],light:Nr[500],dark:Nr[900]}}function fu(e=`light`){return e===`dark`?{main:Pr[400],light:Pr[300],dark:Pr[700]}:{main:`#ed6c02`,light:Pr[500],dark:Pr[900]}}function pu(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function mu(e){let{mode:t=`light`,contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:i,...a}=e,o=e.primary||su(t),s=e.secondary||cu(t),c=e.error||lu(t),l=e.info||uu(t),u=e.success||du(t),d=e.warning||fu(t);function f(e){return i?pu(e):kc(e,iu.text.primary)>=n?iu.text.primary:nu.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(Lr(11,t?` (${t})`:``,n));if(typeof e.main!=`string`)throw Error(Lr(12,t?` (${t})`:``,JSON.stringify(e.main)));return i?(ou(i,e,`light`,a,r),ou(i,e,`dark`,o,r)):(au(e,`light`,a,r),au(e,`dark`,o,r)),e.contrastText||=f(e.main),e},m;return t===`light`?m=tu():t===`dark`&&(m=ru()),to({common:{...Or},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:Ir,contrastThreshold:n,getContrastText:f,augmentColor:p,tonalOffset:r,...m},a)}function hu(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 gu(e,t){return{toolbar:{minHeight:56,[e.up(`xs`)]:{"@media (orientation: landscape)":{minHeight:48}},[e.up(`sm`)]:{minHeight:64}},...t}}function _u(e){return Math.round(e*1e5)/1e5}var vu={textTransform:`uppercase`},yu=`"Roboto", "Helvetica", "Arial", sans-serif`;function bu(e,t){let{fontFamily:n=yu,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===yu?{letterSpacing:`${_u(i/t)}em`}:{},...a,...l});return to({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,vu),caption:m(a,12,1.66,.4),overline:m(a,12,2.66,1,vu),inherit:{fontFamily:`inherit`,fontWeight:`inherit`,fontSize:`inherit`,lineHeight:`inherit`,letterSpacing:`inherit`}},d,{clone:!1})}var xu=.2,Su=.14,Cu=.12;function wu(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${xu})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Su})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Cu})`].join(`,`)}var Tu=[`none`,wu(0,2,1,-1,0,1,1,0,0,1,3,0),wu(0,3,1,-2,0,2,2,0,0,1,5,0),wu(0,3,3,-2,0,3,4,0,0,1,8,0),wu(0,2,4,-1,0,4,5,0,0,1,10,0),wu(0,3,5,-1,0,5,8,0,0,1,14,0),wu(0,3,5,-1,0,6,10,0,0,1,18,0),wu(0,4,5,-2,0,7,10,1,0,2,16,1),wu(0,5,5,-3,0,8,10,1,0,3,14,2),wu(0,5,6,-3,0,9,12,1,0,3,16,2),wu(0,6,6,-3,0,10,14,1,0,4,18,3),wu(0,6,7,-4,0,11,15,1,0,4,20,3),wu(0,7,8,-4,0,12,17,2,0,5,22,4),wu(0,7,8,-4,0,13,19,2,0,5,24,4),wu(0,7,9,-4,0,14,21,2,0,5,26,4),wu(0,8,9,-5,0,15,22,2,0,6,28,5),wu(0,8,10,-5,0,16,24,2,0,6,30,5),wu(0,8,11,-5,0,17,26,2,0,6,32,5),wu(0,9,11,-5,0,18,28,2,0,7,34,6),wu(0,9,12,-6,0,19,29,2,0,7,36,6),wu(0,10,13,-6,0,20,31,3,0,8,38,7),wu(0,10,13,-6,0,21,33,3,0,8,40,7),wu(0,10,14,-6,0,22,35,3,0,8,42,7),wu(0,11,14,-7,0,23,36,3,0,9,44,8),wu(0,11,15,-7,0,24,38,3,0,9,46,8)],Eu=[`all`],Du={},Ou={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)`},ku={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Au(e){return`${Math.round(e)}ms`}function ju(e){if(!e)return 0;let t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function Mu(e){let t={...e};delete t.reducedMotion;let n={...Ou,...t.easing},r={...ku,...t.duration};return{getAutoHeightDuration:ju,create:t.create??((e=Eu,t=Du)=>{let{duration:i=r.standard,easing:a=n.easeInOut,delay:o=0,...s}=t;return(Array.isArray(e)?e:[e]).map(e=>`${e} ${typeof i==`string`?i:Au(i)} ${a} ${typeof o==`string`?o:Au(o)}`).join(`,`)}),...t,easing:n,duration:r}}var Nu={};function Pu(e=Nu){return{reducedMotion:`never`,...e}}var Fu={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Iu(e){return $a(e)||e===void 0||typeof e==`string`||typeof e==`boolean`||typeof e==`number`||Array.isArray(e)}function Lu(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];!Iu(a)||i.startsWith(`unstable_`)||i.startsWith(`internal_`)?delete e[i]:$a(a)&&(e[i]={...a},n(e[i]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
59
|
+
|
|
60
|
+
const theme = ${JSON.stringify(t,null,2)};
|
|
61
|
+
|
|
62
|
+
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
63
|
+
theme.motion = { reducedMotion: 'never', ...theme.motion };
|
|
64
|
+
theme.transitions = createTransitions(theme.transitions || {});
|
|
65
|
+
|
|
66
|
+
export default theme;`}function Ru(e){return typeof e==`number`?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}var zu=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 Bu(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})`:Ac(t,zu(n))},lighten(t,n){let r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #fff ${Ru(n)})`:Pc(t,n)},darken(t,n){let r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #000 ${Ru(n)})`:Mc(t,n)}})}function Vu(e={},...t){let{breakpoints:n,mixins:r={},spacing:i,palette:a={},motion:o={},transitions:s={},typography:c={},shape:l,colorSpace:u,...d}=e;if(e.vars&&e.generateThemeVars===void 0)throw Error(Lr(22));let f=mu({...a,colorSpace:u}),p=Bs(e),m=to(p,{mixins:gu(p.breakpoints,r),palette:f,shadows:Tu.slice(),typography:bu(f,c),motion:Pu(o),transitions:Mu(s),zIndex:{...Fu}});return m=to(m,d),m=t.reduce((e,t)=>to(e,t),m),delete m.transitions.reducedMotion,m.unstable_sxConfig={...Ns,...d?.unstable_sxConfig},m.unstable_sx=function(e){return Is({sx:e,theme:this})},m.toRuntimeSource=Lu,Bu(m),m}function Hu(e){let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}var Uu=[...Array(25)].map((e,t)=>{if(t===0)return`none`;let n=Hu(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Wu(e){return{inputPlaceholder:e===`dark`?.5:.42,inputUnderline:e===`dark`?.7:.42,switchTrackDisabled:e===`dark`?.2:.12,switchTrack:e===`dark`?.3:.38}}function Gu(e){return e===`dark`?Uu:[]}function Ku(e){let{palette:t={mode:`light`},opacity:n,overlays:r,colorSpace:i,...a}=e,o=mu({...t,colorSpace:i});return{palette:o,opacity:{...Wu(o.mode),...n},overlays:r||Gu(o.mode),...a}}function qu(e){return e[0]===`motion`||!!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 Ju=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:``}overlays-${n}`),`--${e?`${e}-`:``}palette-AppBar-darkBg`,`--${e?`${e}-`:``}palette-AppBar-darkColor`],Yu=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 Ju(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 Xu(e,t){t.forEach(t=>{e[t]||(e[t]={})})}function W(e,t,n){!e[t]&&n&&(e[t]=n)}function Zu(e){return typeof e!=`string`||!e.startsWith(`hsl`)?e:Dc(e)}function Qu(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Tc(Zu(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().
|
|
67
|
+
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 $u(e){return typeof e==`number`?`${e}px`:typeof e==`string`||typeof e==`function`||Array.isArray(e)?e:`8px`}var ed=e=>{try{return e()}catch{}},td=(e=`mui`)=>yl(e);function nd(e,t,n,r,i){if(!n)return;n=n===!0?{}:n;let a=i===`dark`?`dark`:`light`;if(!r){t[i]=Ku({...n,palette:{mode:a,...n?.palette},colorSpace:e});return}let{palette:o,...s}=Vu({...r,palette:{mode:a,...n?.palette},colorSpace:e});return t[i]={...n,palette:o,opacity:{...Wu(a),...n?.opacity},overlays:n?.overlays||Gu(a)},s}function rd(e={},...t){let{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:a=`mui`,nativeColor:o=!1,shouldSkipGeneratingVar:s=qu,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=td(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(Lr(21,f));let b;o&&(b=`oklch`);let x=nd(b,v,y,u,f);h&&!v.light&&nd(b,v,h,void 0,`light`),g&&!v.dark&&nd(b,v,g,void 0,`dark`);let S={defaultColorScheme:f,...x,cssVarPrefix:a,colorSchemeSelector:c,rootSelector:l,getCssVar:p,colorSchemes:v,font:{...hu(x.typography),...x.font},spacing:$u(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`&&(W(t.common,`background`,`#fff`),W(t.common,`onBackground`,`#000`)),t.mode===`dark`&&(W(t.common,`background`,`#000`),W(t.common,`onBackground`,`#fff`));function r(e,t,n){if(b){let r;return e===jc&&(r=`transparent ${((1-n)*100).toFixed(0)}%`),e===Nc&&(r=`#000 ${(n*100).toFixed(0)}%`),e===Fc&&(r=`#fff ${(n*100).toFixed(0)}%`),`color-mix(in ${b}, ${t}, ${r})`}return e(t,n)}if(Xu(t,[`Alert`,`AppBar`,`Avatar`,`Button`,`Chip`,`FilledInput`,`LinearProgress`,`Skeleton`,`Slider`,`SnackbarContent`,`SpeedDialAction`,`StepConnector`,`StepContent`,`Switch`,`TableCell`,`Tooltip`]),t.mode===`light`){W(t.Alert,`errorColor`,r(Nc,o?p(`palette-error-light`):t.error.light,.6)),W(t.Alert,`infoColor`,r(Nc,o?p(`palette-info-light`):t.info.light,.6)),W(t.Alert,`successColor`,r(Nc,o?p(`palette-success-light`):t.success.light,.6)),W(t.Alert,`warningColor`,r(Nc,o?p(`palette-warning-light`):t.warning.light,.6)),W(t.Alert,`errorFilledBg`,n(`palette-error-main`)),W(t.Alert,`infoFilledBg`,n(`palette-info-main`)),W(t.Alert,`successFilledBg`,n(`palette-success-main`)),W(t.Alert,`warningFilledBg`,n(`palette-warning-main`)),W(t.Alert,`errorFilledColor`,ed(()=>t.getContrastText(t.error.main))),W(t.Alert,`infoFilledColor`,ed(()=>t.getContrastText(t.info.main))),W(t.Alert,`successFilledColor`,ed(()=>t.getContrastText(t.success.main))),W(t.Alert,`warningFilledColor`,ed(()=>t.getContrastText(t.warning.main))),W(t.Alert,`errorStandardBg`,r(Fc,o?p(`palette-error-light`):t.error.light,.9)),W(t.Alert,`infoStandardBg`,r(Fc,o?p(`palette-info-light`):t.info.light,.9)),W(t.Alert,`successStandardBg`,r(Fc,o?p(`palette-success-light`):t.success.light,.9)),W(t.Alert,`warningStandardBg`,r(Fc,o?p(`palette-warning-light`):t.warning.light,.9)),W(t.Alert,`errorIconColor`,n(`palette-error-main`)),W(t.Alert,`infoIconColor`,n(`palette-info-main`)),W(t.Alert,`successIconColor`,n(`palette-success-main`)),W(t.Alert,`warningIconColor`,n(`palette-warning-main`)),W(t.AppBar,`defaultBg`,n(`palette-grey-100`)),W(t.Avatar,`defaultBg`,n(`palette-grey-400`)),W(t.Button,`inheritContainedBg`,n(`palette-grey-300`)),W(t.Button,`inheritContainedHoverBg`,n(`palette-grey-A100`)),W(t.Chip,`defaultBorder`,n(`palette-grey-400`)),W(t.Chip,`defaultAvatarColor`,n(`palette-grey-700`)),W(t.Chip,`defaultIconColor`,n(`palette-grey-700`)),W(t.FilledInput,`bg`,`rgba(0, 0, 0, 0.06)`),W(t.FilledInput,`hoverBg`,`rgba(0, 0, 0, 0.09)`),W(t.FilledInput,`disabledBg`,`rgba(0, 0, 0, 0.12)`),W(t.LinearProgress,`primaryBg`,r(Fc,o?p(`palette-primary-main`):t.primary.main,.62)),W(t.LinearProgress,`secondaryBg`,r(Fc,o?p(`palette-secondary-main`):t.secondary.main,.62)),W(t.LinearProgress,`errorBg`,r(Fc,o?p(`palette-error-main`):t.error.main,.62)),W(t.LinearProgress,`infoBg`,r(Fc,o?p(`palette-info-main`):t.info.main,.62)),W(t.LinearProgress,`successBg`,r(Fc,o?p(`palette-success-main`):t.success.main,.62)),W(t.LinearProgress,`warningBg`,r(Fc,o?p(`palette-warning-light`):t.warning.main,.62)),W(t.Skeleton,`bg`,b?r(jc,o?p(`palette-text-primary`):t.text.primary,.11):`rgba(${n(`palette-text-primaryChannel`)} / 0.11)`),W(t.Slider,`primaryTrack`,r(Fc,o?p(`palette-primary-main`):t.primary.main,.62)),W(t.Slider,`secondaryTrack`,r(Fc,o?p(`palette-secondary-main`):t.secondary.main,.62)),W(t.Slider,`errorTrack`,r(Fc,o?p(`palette-error-main`):t.error.main,.62)),W(t.Slider,`infoTrack`,r(Fc,o?p(`palette-info-main`):t.info.main,.62)),W(t.Slider,`successTrack`,r(Fc,o?p(`palette-success-main`):t.success.main,.62)),W(t.Slider,`warningTrack`,r(Fc,o?p(`palette-warning-main`):t.warning.main,.62));let e=b?r(Nc,o?p(`palette-background-default`):t.background.default,.6825):Lc(t.background.default,.8);W(t.SnackbarContent,`bg`,e),W(t.SnackbarContent,`color`,ed(()=>b?iu.text.primary:t.getContrastText(e))),W(t.SpeedDialAction,`fabHoverBg`,Lc(t.background.paper,.15)),W(t.StepConnector,`border`,n(`palette-grey-400`)),W(t.StepContent,`border`,n(`palette-grey-400`)),W(t.Switch,`defaultColor`,n(`palette-common-white`)),W(t.Switch,`defaultDisabledColor`,n(`palette-grey-100`)),W(t.Switch,`primaryDisabledColor`,r(Fc,o?p(`palette-primary-main`):t.primary.main,.62)),W(t.Switch,`secondaryDisabledColor`,r(Fc,o?p(`palette-secondary-main`):t.secondary.main,.62)),W(t.Switch,`errorDisabledColor`,r(Fc,o?p(`palette-error-main`):t.error.main,.62)),W(t.Switch,`infoDisabledColor`,r(Fc,o?p(`palette-info-main`):t.info.main,.62)),W(t.Switch,`successDisabledColor`,r(Fc,o?p(`palette-success-main`):t.success.main,.62)),W(t.Switch,`warningDisabledColor`,r(Fc,o?p(`palette-warning-main`):t.warning.main,.62)),W(t.TableCell,`border`,r(Fc,jc(o?p(`palette-divider`):t.divider,1),.88)),W(t.Tooltip,`bg`,r(jc,o?p(`palette-grey-700`):t.grey[700],.92))}if(t.mode===`dark`){W(t.Alert,`errorColor`,r(Fc,o?p(`palette-error-light`):t.error.light,.6)),W(t.Alert,`infoColor`,r(Fc,o?p(`palette-info-light`):t.info.light,.6)),W(t.Alert,`successColor`,r(Fc,o?p(`palette-success-light`):t.success.light,.6)),W(t.Alert,`warningColor`,r(Fc,o?p(`palette-warning-light`):t.warning.light,.6)),W(t.Alert,`errorFilledBg`,n(`palette-error-dark`)),W(t.Alert,`infoFilledBg`,n(`palette-info-dark`)),W(t.Alert,`successFilledBg`,n(`palette-success-dark`)),W(t.Alert,`warningFilledBg`,n(`palette-warning-dark`)),W(t.Alert,`errorFilledColor`,ed(()=>t.getContrastText(t.error.dark))),W(t.Alert,`infoFilledColor`,ed(()=>t.getContrastText(t.info.dark))),W(t.Alert,`successFilledColor`,ed(()=>t.getContrastText(t.success.dark))),W(t.Alert,`warningFilledColor`,ed(()=>t.getContrastText(t.warning.dark))),W(t.Alert,`errorStandardBg`,r(Nc,o?p(`palette-error-light`):t.error.light,.9)),W(t.Alert,`infoStandardBg`,r(Nc,o?p(`palette-info-light`):t.info.light,.9)),W(t.Alert,`successStandardBg`,r(Nc,o?p(`palette-success-light`):t.success.light,.9)),W(t.Alert,`warningStandardBg`,r(Nc,o?p(`palette-warning-light`):t.warning.light,.9)),W(t.Alert,`errorIconColor`,n(`palette-error-main`)),W(t.Alert,`infoIconColor`,n(`palette-info-main`)),W(t.Alert,`successIconColor`,n(`palette-success-main`)),W(t.Alert,`warningIconColor`,n(`palette-warning-main`)),W(t.AppBar,`defaultBg`,n(`palette-grey-900`)),W(t.AppBar,`darkBg`,n(`palette-background-paper`)),W(t.AppBar,`darkColor`,n(`palette-text-primary`)),W(t.Avatar,`defaultBg`,n(`palette-grey-600`)),W(t.Button,`inheritContainedBg`,n(`palette-grey-800`)),W(t.Button,`inheritContainedHoverBg`,n(`palette-grey-700`)),W(t.Chip,`defaultBorder`,n(`palette-grey-700`)),W(t.Chip,`defaultAvatarColor`,n(`palette-grey-300`)),W(t.Chip,`defaultIconColor`,n(`palette-grey-300`)),W(t.FilledInput,`bg`,`rgba(255, 255, 255, 0.09)`),W(t.FilledInput,`hoverBg`,`rgba(255, 255, 255, 0.13)`),W(t.FilledInput,`disabledBg`,`rgba(255, 255, 255, 0.12)`),W(t.LinearProgress,`primaryBg`,r(Nc,o?p(`palette-primary-main`):t.primary.main,.5)),W(t.LinearProgress,`secondaryBg`,r(Nc,o?p(`palette-secondary-main`):t.secondary.main,.5)),W(t.LinearProgress,`errorBg`,r(Nc,o?p(`palette-error-main`):t.error.main,.5)),W(t.LinearProgress,`infoBg`,r(Nc,o?p(`palette-info-main`):t.info.main,.5)),W(t.LinearProgress,`successBg`,r(Nc,o?p(`palette-success-main`):t.success.main,.5)),W(t.LinearProgress,`warningBg`,r(Nc,o?p(`palette-warning-main`):t.warning.main,.5)),W(t.Skeleton,`bg`,b?r(jc,o?p(`palette-text-primary`):t.text.primary,.13):`rgba(${n(`palette-text-primaryChannel`)} / 0.13)`),W(t.Slider,`primaryTrack`,r(Nc,o?p(`palette-primary-main`):t.primary.main,.5)),W(t.Slider,`secondaryTrack`,r(Nc,o?p(`palette-secondary-main`):t.secondary.main,.5)),W(t.Slider,`errorTrack`,r(Nc,o?p(`palette-error-main`):t.error.main,.5)),W(t.Slider,`infoTrack`,r(Nc,o?p(`palette-info-main`):t.info.main,.5)),W(t.Slider,`successTrack`,r(Nc,o?p(`palette-success-main`):t.success.main,.5)),W(t.Slider,`warningTrack`,r(Nc,o?p(`palette-warning-light`):t.warning.main,.5));let e=b?r(Fc,o?p(`palette-background-default`):t.background.default,.985):Lc(t.background.default,.98);W(t.SnackbarContent,`bg`,e),W(t.SnackbarContent,`color`,ed(()=>b?nu.text.primary:t.getContrastText(e))),W(t.SpeedDialAction,`fabHoverBg`,Lc(t.background.paper,.15)),W(t.StepConnector,`border`,n(`palette-grey-600`)),W(t.StepContent,`border`,n(`palette-grey-600`)),W(t.Switch,`defaultColor`,n(`palette-grey-300`)),W(t.Switch,`defaultDisabledColor`,n(`palette-grey-600`)),W(t.Switch,`primaryDisabledColor`,r(Nc,o?p(`palette-primary-main`):t.primary.main,.55)),W(t.Switch,`secondaryDisabledColor`,r(Nc,o?p(`palette-secondary-main`):t.secondary.main,.55)),W(t.Switch,`errorDisabledColor`,r(Nc,o?p(`palette-error-main`):t.error.main,.55)),W(t.Switch,`infoDisabledColor`,r(Nc,o?p(`palette-info-main`):t.info.main,.55)),W(t.Switch,`successDisabledColor`,r(Nc,o?p(`palette-success-main`):t.success.main,.55)),W(t.Switch,`warningDisabledColor`,r(Nc,o?p(`palette-warning-light`):t.warning.main,.55)),W(t.TableCell,`border`,r(Nc,jc(o?p(`palette-divider`):t.divider,1),.68)),W(t.Tooltip,`bg`,r(jc,o?p(`palette-grey-700`):t.grey[700],.92))}o||(Qu(t.background,`default`),Qu(t.background,`paper`),Qu(t.common,`background`),Qu(t.common,`onBackground`),Qu(t,`divider`)),Object.keys(t).forEach(e=>{let n=t[e];e!==`tonalOffset`&&!o&&n&&typeof n==`object`&&(n.main&&W(t[e],`mainChannel`,Tc(Zu(n.main))),n.light&&W(t[e],`lightChannel`,Tc(Zu(n.light))),n.dark&&W(t[e],`darkChannel`,Tc(Zu(n.dark))),n.contrastText&&W(t[e],`contrastTextChannel`,Tc(Zu(n.contrastText))),e===`text`&&(Qu(t[e],`primary`),Qu(t[e],`secondary`)),e===`action`&&(n.active&&Qu(t[e],`active`),n.selected&&Qu(t[e],`selected`)))})}),S=t.reduce((e,t)=>to(e,t),S);let C={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:Yu(S),enableContrastVars:o},{vars:w,generateThemeVars:T,generateStyleSheets:E}=wl(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 is(u.spacing,Yo(this))},S.getColorSchemeSelector=Tl(c),S.spacing=S.generateSpacing(),S.shouldSkipGeneratingVar=s,S.unstable_sxConfig={...Ns,...u?.unstable_sxConfig},S.unstable_sx=function(e){return Is({sx:e,theme:this})},S.internal_cache={},S.toRuntimeSource=Lu,S}function id(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:mu({...n===!0?{}:n.palette,mode:t})})}function ad(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 Vu(e,...t);let r=n;`palette`in e||l[s]&&(l[s]===!0?s===`dark`&&(r={mode:`dark`}):r=l[s].palette);let i=Vu({...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},id(i,`dark`,l.dark)),i.palette.mode===`dark`&&(i.colorSchemes.dark={...l.dark!==!0&&l.dark,palette:i.palette},id(i,`light`,l.light)),i}return!n&&!(`light`in l)&&s===`light`&&(l.light=!0),rd({...o,colorSchemes:l,defaultColorScheme:s,...typeof r!=`boolean`&&r},...t)}function od(e){return Qs(`MuiAccordionSummary`,e)}var sd=$s(`MuiAccordionSummary`,[`root`,`expanded`,`focusVisible`,`disabled`,`gutters`,`content`,`expandIconWrapper`]);function cd(e){return Qs(`MuiAutocomplete`,e)}var ld=$s(`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(`.`));function ud(e){return Qs(`MuiCheckbox`,e)}var dd=$s(`MuiCheckbox`,[`root`,`checked`,`disabled`,`indeterminate`,`colorPrimary`,`colorSecondary`,`sizeSmall`,`sizeMedium`]);function fd(e){return typeof e==`string`}function pd(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}return r.clear=()=>{clearTimeout(n)},r}function md(...e){let t=I.useRef(void 0),n=I.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 I.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}function hd(e){let t=I.useRef(e);return hc(()=>{t.current=e}),I.useRef((...e)=>(0,t.current)(...e)).current}function gd(e){return e&&e.ownerDocument||document}function _d(e){return gd(e).defaultView||window}function vd(e){return parseInt(e,10)||0}var yd={shadow:{visibility:`hidden`,position:`absolute`,overflow:`hidden`,height:0,top:0,left:0,transform:`translateZ(0)`}};function bd(e){for(let t in e)return!1;return!0}function xd(e){return bd(e)||e.outerHeightStyle===0&&!e.overflowing}var Sd=I.forwardRef(function(e,t){let{onChange:n,maxRows:r,minRows:i=1,style:a,value:o,...s}=e,{current:c}=I.useRef(o!=null),l=I.useRef(null),u=md(t,l),d=I.useRef(null),f=I.useRef(null),p=I.useCallback(()=>{let t=l.current,n=f.current;if(!t||!n)return;let a=_d(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)===`
|
|
68
|
+
`&&(n.value+=` `);let o=a.boxSizing,s=vd(a.paddingBottom)+vd(a.paddingTop),c=vd(a.borderBottomWidth)+vd(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=hd(()=>{let e=l.current,t=p();if(!e||!t||xd(t))return!1;let n=t.outerHeightStyle;return d.current!=null&&d.current!==n}),h=I.useCallback(()=>{let e=l.current,t=p();if(!e||!t||xd(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=I.useRef(-1);return hc(()=>{let e=pd(h),t=l?.current;if(!t)return;let n=_d(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]),hc(()=>{h()}),(0,H.jsxs)(I.Fragment,{children:[(0,H.jsx)(`textarea`,{value:o,onChange:e=>{c||h();let t=e.target,r=t.value.length,i=t.value.endsWith(`
|
|
69
|
+
`),a=t.selectionStart===r;i&&a&&t.setSelectionRange(r,r),n&&n(e)},ref:u,rows:i,style:a,...s}),(0,H.jsx)(`textarea`,{"aria-hidden":!0,className:e.className,readOnly:!0,ref:f,tabIndex:-1,style:{...yd.shadow,...a,paddingTop:0,paddingBottom:0}})]})}),Cd=I.createContext(void 0);function wd(){return I.useContext(Cd)}function Td({props:e,states:t}){let n=I.useContext(Cd),r={};return t.forEach(t=>{let i=e[t];r[t]=i===void 0&&n?n[t]:i}),[r,n]}var Ed=ad();function Dd(){let e=Ws(Ed);return e.$$material||e}function Od(e){return(0,H.jsx)(Ks,{...e,defaultTheme:Ed,themeId:Rr})}function kd(e){return e!==`ownerState`&&e!==`theme`&&e!==`sx`&&e!==`as`}var Ad=e=>kd(e)&&e!==`classes`,G=cc({themeId:Rr,defaultTheme:Ed,rootShouldForwardProp:Ad});function jd(e){return function(t){return(0,H.jsx)(Od,{styles:typeof e==`function`?n=>e({theme:n,...t}):e})}}var Md=al;function Nd(e){return Yc(e)}var K=Fo,Pd=md,Fd=hc,Id=gd;function Ld(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}var Rd=Ld;function zd(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function Bd(e,t=!1){return e&&(zd(e.value)&&e.value!==``||t&&zd(e.defaultValue)&&e.defaultValue!==``)}function Vd(e){return e.startAdornment}function Hd(e){return Qs(`MuiInputBase`,e)}var Ud=$s(`MuiInputBase`,[`root`,`formControl`,`focused`,`disabled`,`adornedStart`,`adornedEnd`,`error`,`sizeSmall`,`multiline`,`colorSecondary`,`fullWidth`,`hiddenLabel`,`readOnly`,`input`,`inputTypeSearch`]),Wd={transition:`none`};function Gd(e,t){return e===`always`?t:e===`system`?{"@media (prefers-reduced-motion: reduce)":t}:null}var Kd=e=>e.scrollTop,qd={},Jd=[`all`],Yd={};function Xd(e,t){return n=>{if(t){let r=e.current;n===void 0?t(r):t(r,n)}}}function Zd(e,t,n,r,i,a){let o=e===`exited`&&!t?r:n[e]||n.exited;return i||a?{...o,...i,...a}:o}function Qd(e,t){let{timeout:n,easing:r,style:i=qd}=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 $d(e,t){let n=t??Wd;return Gd(e.motion?.reducedMotion,n)}function ef(e,t=Jd,n=Yd){let r=e.transitions?.create?.(t,n),i=$d(e);if(r===void 0)return i??qd;let a={transition:r};return i?{...a,...i}:a}var tf,nf=`mui-auto-fill`,rf=`mui-auto-fill-cancel`,af=(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${K(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},of=(e,t)=>{let{ownerState:n}=e;return[t.input,n.type===`search`&&t.inputTypeSearch]},sf=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 El({root:[`root`,`color${K(n)}`,r&&`disabled`,i&&`error`,c&&`fullWidth`,o&&`focused`,s&&`formControl`,f&&f!==`medium`&&`size${K(f)}`,u&&`multiline`,p&&`adornedStart`,a&&`adornedEnd`,l&&`hiddenLabel`,d&&`readOnly`],input:[`input`,r&&`disabled`,m===`search`&&`inputTypeSearch`,d&&`readOnly`]},Hd,t)},cf=G(`div`,{name:`MuiInputBase`,slot:`Root`,overridesResolver:af})(Md(({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`,[`&.${Ud.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%`}}]}))),lf=G(`input`,{name:`MuiInputBase`,slot:`Input`,overridesResolver:of})(Md(({theme:e})=>{let t=e.palette.mode===`light`,n={color:`currentColor`,...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},...ef(e,`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] + .${Ud.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},[`&.${Ud.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:e})=>!e.disableInjectingGlobalStyles,style:{animationName:rf,animationDuration:`10ms`,"&:-webkit-autofill":{animationDuration:`5000s`,animationName:nf}}},{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`}}]}})),uf=jd({[`@keyframes ${nf}`]:{from:{animationName:nf}},[`@keyframes ${rf}`]:{from:{animationName:rf}}}),df=I.forwardRef(function(e,t){let n=Nd({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:D,onKeyDown:O,onKeyUp:ee,placeholder:te,readOnly:k,renderSuffix:A,rows:j,size:M,slotProps:ne={},slots:re={},startAdornment:ie,type:ae=`text`,value:oe,...N}=n,se=_.value==null?oe:_.value,{current:ce}=I.useRef(se!=null),P=I.useRef(),le=I.useCallback(e=>{},[]),ue=Pd(P,v,_.ref,le),[de,F]=I.useState(!1),[fe,pe]=Td({props:n,states:[`color`,`disabled`,`error`,`hiddenLabel`,`size`,`required`,`filled`]});fe.focused=pe?pe.focused:de,I.useEffect(()=>{!pe&&u&&de&&(F(!1),w&&w())},[pe,u,de,w]);let me=pe&&pe.onFilled,he=pe&&pe.onEmpty,ge=I.useCallback(e=>{Bd(e)?me&&me():he&&he()},[me,he]);Fd(()=>{ce&&ge({value:se})},[se,ge,ce]),Fd(()=>{if(!o)return;let e=P.current;if(!e)return;let t=Id(e),n=Rd(t),r=n==null||n===t.body||n===t.documentElement;e===n?pe&&pe.onFocus?pe.onFocus():F(!0):r&&e.focus()},[o]);let _e=e=>{D&&D(e),_.onFocus&&_.onFocus(e),pe&&pe.onFocus?pe.onFocus(e):F(!0)},ve=e=>{w&&w(e),_.onBlur&&_.onBlur(e),pe&&pe.onBlur?pe.onBlur(e):F(!1)},ye=(e,...t)=>{if(!ce){let t=e.target||P.current;if(t==null)throw Error(Lr(1));ge({value:t.value})}_.onChange&&_.onChange(e,...t),T&&T(e,...t)};I.useEffect(()=>{ge(P.current)},[]);let be=e=>{P.current&&e.currentTarget===e.target&&P.current.focus(),E&&E(e)},xe=g,Se=_;S&&xe===`input`&&(Se=j?{type:void 0,minRows:j,maxRows:j,...Se}:{type:void 0,maxRows:b,minRows:x,...Se},xe=Sd);let Ce=e=>{ge(e.animationName===rf?P.current:{value:`x`})};I.useEffect(()=>{pe&&pe.setAdornedStart(!!ie)},[pe,ie]);let L={...n,color:fe.color||`primary`,disabled:fe.disabled,endAdornment:f,error:fe.error,focused:fe.focused,formControl:pe,fullWidth:m,hiddenLabel:fe.hiddenLabel,multiline:S,size:fe.size,startAdornment:ie,type:ae},R=sf(L),z=re.root||cf,we=ne.root||{},Te=re.input||lf;return Se={...Se,...ne.input},(0,H.jsxs)(I.Fragment,{children:[!d&&typeof uf==`function`&&(tf||=(0,H.jsx)(uf,{})),(0,H.jsxs)(z,{...we,ref:t,onClick:be,...N,...!fd(z)&&{ownerState:{...L,...we.ownerState}},className:U(R.root,we.className,s,k&&`MuiInputBase-readOnly`),children:[ie,(0,H.jsx)(Cd.Provider,{value:null,children:(0,H.jsx)(Te,{"aria-invalid":fe.error,"aria-describedby":r,"aria-label":i,autoComplete:a,autoFocus:o,defaultValue:l,disabled:fe.disabled,id:h,onAnimationStart:Ce,name:C,placeholder:te,readOnly:k,required:fe.required,rows:j,value:se,onKeyDown:O,onKeyUp:ee,type:ae,...Se,...!fd(Te)&&{as:xe,ownerState:{...L,...Se.ownerState}},ref:ue,className:U(R.input,Se.className,k&&`MuiInputBase-readOnly`),onBlur:ve,onChange:ye,onFocus:_e})}),f,A?A({...fe,startAdornment:ie}):null]})]})});function ff(e){return Qs(`MuiFilledInput`,e)}var pf={...Ud,...$s(`MuiFilledInput`,[`root`,`underline`,`input`,`adornedStart`,`adornedEnd`,`sizeSmall`,`multiline`,`hiddenLabel`])};function mf(e){return Qs(`MuiFormControlLabel`,e)}var hf=$s(`MuiFormControlLabel`,[`root`,`labelPlacementStart`,`labelPlacementTop`,`labelPlacementBottom`,`disabled`,`label`,`error`,`required`,`asterisk`]);function gf(e){return Qs(`MuiFormHelperText`,e)}var _f=$s(`MuiFormHelperText`,[`root`,`error`,`disabled`,`sizeSmall`,`sizeMedium`,`contained`,`focused`,`filled`,`required`]);function vf(e){return Qs(`MuiFormLabel`,e)}var yf=$s(`MuiFormLabel`,[`root`,`colorSecondary`,`focused`,`disabled`,`error`,`filled`,`required`,`asterisk`]);function bf(e){return Qs(`MuiInput`,e)}var xf={...Ud,...$s(`MuiInput`,[`root`,`underline`,`input`])};function Sf(e){return Qs(`MuiListItemButton`,e)}var Cf=$s(`MuiListItemButton`,[`root`,`focusVisible`,`dense`,`alignItemsFlexStart`,`disabled`,`divider`,`gutters`,`selected`]);function wf(e){return Qs(`MuiMenuItem`,e)}var Tf=$s(`MuiMenuItem`,[`root`,`focusVisible`,`dense`,`disabled`,`divider`,`gutters`,`selected`]);function Ef(e){return Qs(`MuiNativeSelect`,e)}var Df=$s(`MuiNativeSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`icon`,`iconOpen`,`iconFilled`,`iconOutlined`,`iconStandard`,`nativeInput`,`error`]);function Of(e){return Qs(`MuiOutlinedInput`,e)}var kf={...Ud,...$s(`MuiOutlinedInput`,[`root`,`notchedOutline`,`input`])};function Af(e){return Qs(`MuiRadio`,e)}var jf=$s(`MuiRadio`,[`root`,`checked`,`disabled`,`colorPrimary`,`colorSecondary`,`sizeSmall`]);function Mf(e){return Qs(`MuiSlider`,e)}var Nf=$s(`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(`.`));function Pf(e){return Qs(`MuiToggleButton`,e)}var Ff=$s(`MuiToggleButton`,[`root`,`disabled`,`selected`,`standard`,`primary`,`secondary`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`fullWidth`]);function If({theme:e,...t}){let n=`$$material`in e?e[Rr]:void 0;return(0,H.jsx)(rl,{...t,themeId:n?Rr:void 0,theme:n||e})}var Lf={attribute:`data-mui-color-scheme`,colorSchemeStorageKey:`mui-color-scheme`,defaultLightColorScheme:`light`,defaultDarkColorScheme:`dark`,modeStorageKey:`mui-mode`},{CssVarsProvider:Rf,useColorScheme:zf,getInitColorSchemeScript:Bf}=vl({themeId:Rr,theme:()=>ad({cssVariables:!0}),colorSchemeStorageKey:Lf.colorSchemeStorageKey,modeStorageKey:Lf.modeStorageKey,defaultColorScheme:{light:Lf.defaultLightColorScheme,dark:Lf.defaultDarkColorScheme},resolveTheme:e=>{let t={...e,typography:bu(e.palette,e.typography)};return t.unstable_sx=function(e){return Is({sx:e,theme:this})},t}}),Vf=Rf;function Hf({theme:e,...t}){let n=I.useMemo(()=>{if(typeof e==`function`)return e;let t=`$$material`in e?e[Rr]:e;return`colorSchemes`in t?null:`vars`in t?e:{...e,vars:null}},[e]);return n?(0,H.jsx)(If,{theme:n,...t}):(0,H.jsx)(Vf,{theme:e,...t})}function Uf(...e){return e.reduce((e,t)=>t==null?e:function(...n){e.apply(this,n),t.apply(this,n)},()=>{})}var Wf=Uf;function Gf(e){return Qs(`MuiSvgIcon`,e)}$s(`MuiSvgIcon`,[`root`,`colorPrimary`,`colorSecondary`,`colorAction`,`colorError`,`colorDisabled`,`fontSizeInherit`,`fontSizeSmall`,`fontSizeMedium`,`fontSizeLarge`]);var Kf=e=>{let{color:t,fontSize:n,classes:r}=e;return El({root:[`root`,t!==`inherit`&&`color${K(t)}`,`fontSize${K(n)}`]},Gf,r)},qf=G(`svg`,{name:`MuiSvgIcon`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color!==`inherit`&&t[`color${K(n.color)}`],t[`fontSize${K(n.fontSize)}`]]}})(Md(({theme:e})=>({userSelect:`none`,width:`1em`,height:`1em`,display:`inline-block`,flexShrink:0,...ef(e,`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}}]}))),Jf=I.forwardRef(function(e,t){let n=Nd({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=I.isValidElement(r)&&r.type===`svg`,m={...n,color:a,component:o,fontSize:s,instanceFontSize:e.fontSize,inheritViewBox:l,viewBox:d,hasSvgAsChild:p},h={};l||(h.viewBox=d);let g=Kf(m);return(0,H.jsxs)(qf,{as:o,className:U(g.root,i),focusable:`false`,color:c,"aria-hidden":!u||void 0,role:u?`img`:void 0,ref:t,...h,...f,...p&&r.props,ownerState:m,children:[p?r.props.children:r,u?(0,H.jsx)(`title`,{children:u}):null]})});Jf.muiName=`SvgIcon`;function Yf(e,t){function n(t,n){return(0,H.jsx)(Jf,{"data-testid":void 0,ref:n,...t,children:e})}return n.muiName=Jf.muiName,I.memo(I.forwardRef(n))}var Xf=pd,Zf=Dl,Qf=_d;function $f(e,t){typeof e==`function`?e(t):e&&(e.current=t)}var ep=$c;function tp(e){let{controlled:t,default:n,name:r,state:i=`value`}=e,{current:a}=I.useRef(t!==void 0),[o,s]=I.useState(n);return[a?t:o,I.useCallback(e=>{a||s(e)},[])]}var np=tp,rp=hd;function ip(e,t){let n=e.charCodeAt(2);return e[0]===`o`&&e[1]===`n`&&n>=65&&n<=90&&typeof t==`function`}function ap(e,t){if(!e)return t;function n(e,t){let n={};return Object.keys(t).forEach(r=>{ip(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=U(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=U(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]]}}}var op={};function sp(e,t){let n=I.useRef(op);return n.current===op&&(n.current=e(t)),n}function cp(e){let t=sp(()=>lp(e)).current;return t.next=e,hc(t.effect),t}function lp(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var up=I.createContext(null);function dp(e){if(e==null)return{appear:void 0,enter:void 0,exit:void 0};if(typeof e==`number`)return{appear:e,enter:e,exit:e};let t=e.enter,n=e.exit;return{appear:e.appear===void 0?t:e.appear,enter:t,exit:n}}function fp(e){if(e.autoTimeout!=null)return e.autoTimeout;let t=dp(e.timeout);return e.currentStatus===`entering`?e.isAppearing?t.appear??t.enter??null:t.enter??null:t.exit??null}function pp(e){let{in:t=!1,appear:n=!1,enter:r=!0,exit:i=!0,mountOnEnter:a=!1,unmountOnExit:o=!1,timeout:s,addEndListener:c,reduceMotion:l=!1,getAutoTimeout:u,nodeRef:d,onEnter:f,onEntering:p,onEntered:m,onExit:h,onExiting:g,onExited:_,children:v,...y}=e,b=I.useContext(up),x=b&&!b.isMounting?r:n,[S,C]=I.useState(()=>t?x?`exited`:`entered`:a||o?`unmounted`:`exited`),w=I.useRef(S);w.current=S,t&&S===`unmounted`&&(w.current=`exited`,C(`exited`));let T=I.useRef(t&&x),E=I.useRef(!1),D=I.useRef(null),O=I.useRef(S),ee=I.useRef(!1),te=I.useRef(l),k=cp({timeout:s,addEndListener:c,reduceMotion:l,getAutoTimeout:u,onEnter:f,onEntering:p,onEntered:m,onExit:h,onExiting:g,onExited:_,enter:r,exit:i,mountOnEnter:a,unmountOnExit:o,nodeRef:d,parentGroup:b}),A=I.useCallback(()=>{D.current!==null&&(D.current.cancel(),D.current=null)},[]),j=I.useCallback(e=>{let t=!0,n=()=>{t&&(t=!1,D.current=null,e())};return n.cancel=()=>{t=!1},D.current=n,n},[]),M=I.useCallback((e,t)=>{let n,r=()=>{n!==void 0&&(clearTimeout(n),n=void 0)},i=j(()=>{r(),w.current=e,C(e)}),a=i.cancel;i.cancel=()=>{r(),a()};let o=k.current.nodeRef.current,s=k.current.addEndListener,c=k.current.getAutoTimeout!==void 0,l=k.current.getAutoTimeout?.(),u=fp({currentStatus:t,isAppearing:ee.current,timeout:k.current.timeout,autoTimeout:l}),d=te.current,f=u??(d&&c?0:null),p=e=>{n=setTimeout(i,e)};if(!o){p(0);return}if(s){f!=null&&p(d?0:f),s.length>=2?s(o,i):s(i);return}p(d?0:u??0)},[j,k]),ne=I.useCallback(e=>{let t=k.current,n=t.parentGroup?t.parentGroup.isMounting:e;if(ee.current=n,!e&&!t.enter){w.current=`entered`,C(`entered`);return}te.current=t.reduceMotion,t.onEnter?.(n),w.current=`entering`,C(`entering`)},[k]),re=I.useCallback(()=>{let e=k.current;if(!e.exit){w.current=`exited`,C(`exited`);return}te.current=e.reduceMotion,e.onExit?.(),w.current=`exiting`,C(`exiting`)},[k]),ie=I.useCallback((e,t)=>{if(A(),t===`entering`){let t=k.current;if(t.mountOnEnter||t.unmountOnExit){let e=t.nodeRef.current;e&&Kd(e)}ne(e)}else re()},[A,ne,re,k]);return hc(()=>(E.current=!0,T.current&&(T.current=!1,ie(!0,`entering`)),()=>{E.current=!1,A()}),[A,ie]),hc(()=>{if(!E.current)return;let e=w.current;t?e!==`entering`&&e!==`entered`&&ie(!1,`entering`):e===`entering`||e===`entered`?ie(!1,`exiting`):e===`exited`&&o&&(w.current=`unmounted`,C(`unmounted`))},[t,S,o,ie]),hc(()=>{if(S===`unmounted`||O.current===`unmounted`){O.current=S;return}if(O.current===S)return;O.current=S;let e=k.current;S===`entering`?(e.onEntering?.(ee.current),M(`entered`,`entering`)):S===`exiting`?(e.onExiting?.(),M(`exited`,`exiting`)):S===`entered`?e.onEntered?.(ee.current):S===`exited`&&e.onExited?.()},[k,M,S]),S===`unmounted`?null:(0,H.jsx)(up.Provider,{value:null,children:v(S,y)})}var mp=`(prefers-reduced-motion: reduce)`,hp=0,gp=`0ms`,_p=()=>{},vp=()=>!1,yp=()=>!0,bp=()=>_p;function xp(e){let[t,n]=I.useState(()=>({enabled:e,matches:e?null:!1})),r=t.matches;return t.enabled!==e&&(r=null,e||(r=!1)),hc(()=>{let r=t=>{n(n=>n.enabled===e&&n.matches===t?n:{enabled:e,matches:t})};if(!e){t.enabled&&r(!1);return}if(typeof window>`u`||typeof window.matchMedia!=`function`){r(!1);return}let i=window.matchMedia(mp),a=()=>{r(i.matches)};return a(),i.addEventListener(`change`,a),()=>{i.removeEventListener(`change`,a)}},[e,t.enabled]),r}var Sp={...I}.useSyncExternalStore;function Cp(e){let t=e?yp:vp,[n,r]=I.useMemo(()=>{if(!e||typeof window>`u`||typeof window.matchMedia!=`function`)return[vp,bp];let t=window.matchMedia(mp);return[()=>t.matches,e=>(t.addEventListener(`change`,e),()=>{t.removeEventListener(`change`,e)})]},[e]);return Sp(r,n,t)}var wp=Sp===void 0?xp:Cp;function Tp(e,t){let n=wp(!t&&e===`system`),r=!t&&(e===`always`||e===`system`&&n!==!1);return I.useMemo(()=>({shouldReduceMotion:r,getTransitionTiming(e){return r?{duration:hp,delay:gp}:e}}),[r])}function Ep(e,t,n){return e===void 0||fd(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function Dp(e,t,n){return typeof e==`function`?e(t,n):e}function Op(e){if(e===void 0)return{};let t={};for(let n of Object.keys(e))ip(n,e[n])&&(t[n]=e[n]);return t}function kp(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 Ap(e){let{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:a}=e;if(!t){let e=U(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=Op({...i,...r}),s=kp(r),c=kp(i),l=t(o),u=U(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 jp(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=Dp(d[e],i),{props:{component:h,...g},internalRef:_}=Ap({className:n,...c,externalForwardedProps:e===`root`?f:void 0,externalSlotProps:m}),v=md(_,m?.ref,t.ref),y=e===`root`?h||l:h;return[p,Ep(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 Mp(e){return Qs(`MuiCollapse`,e)}$s(`MuiCollapse`,[`root`,`horizontal`,`vertical`,`entered`,`hidden`,`wrapper`,`wrapperInner`]);var Np={},Pp=e=>{let{orientation:t,classes:n}=e;return El({root:[`root`,t],entered:[`entered`],hidden:[`hidden`],wrapper:[`wrapper`,t],wrapperInner:[`wrapperInner`,t]},Mp,n)},Fp=G(`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]}})(Md(({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`}}]}))),Ip=G(`div`,{name:`MuiCollapse`,slot:`Wrapper`})({display:`flex`,width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),Lp=G(`div`,{name:`MuiCollapse`,slot:`WrapperInner`})({width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),Rp=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiCollapse`}),{addEndListener:r,children:i,className:a,collapsedSize:o=`0px`,component:s,disablePrefersReducedMotion:c=!1,easing:l,in:u,onEnter:d,onEntered:f,onEntering:p,onExit:m,onExited:h,onExiting:g,orientation:_=`vertical`,slots:v=Np,slotProps:y=Np,style:b,timeout:x=ku.standard,TransitionComponent:S=pp,...C}=n,w={...n,orientation:_,collapsedSize:o},T=Pp(w),E=Dd(),D=I.useRef(null),O=I.useRef(null),ee=typeof o==`number`?`${o}px`:o,te=_===`horizontal`,k=te?`width`:`height`,A=Tp(E.motion.reducedMotion,c),j=I.useRef(null),M=Pd(t,j),ne=()=>D.current?D.current[te?`clientWidth`:`clientHeight`]:0,re=Xd(j,(e,t)=>{D.current&&te&&(D.current.style.position=`absolute`),e.style[k]=ee,d&&d(e,t)}),ie=Xd(j,(e,t)=>{let n=ne();D.current&&te&&(D.current.style.position=``);let{duration:r,easing:i}=Qd({style:b,timeout:x,easing:l},{mode:`enter`});if(x===`auto`&&!A.shouldReduceMotion){let e=E.transitions.getAutoHeightDuration(n);O.current=e}else O.current=null;let a=A.getTransitionTiming({duration:O.current??r,delay:void 0});e.style.transitionDuration=typeof a.duration==`string`?a.duration:`${a.duration}ms`,e.style[k]=`${n}px`,e.style.transitionTimingFunction=i,p&&p(e,t)}),ae=Xd(j,(e,t)=>{e.style[k]=`auto`,f&&f(e,t)}),oe=Xd(j,e=>{e.style[k]=`${ne()}px`,m&&m(e)}),N=Xd(j,h),se=Xd(j,e=>{let t=ne(),{duration:n,easing:r}=Qd({style:b,timeout:x,easing:l},{mode:`exit`});if(x===`auto`&&!A.shouldReduceMotion){let e=E.transitions.getAutoHeightDuration(t);O.current=e}else O.current=null;let i=A.getTransitionTiming({duration:O.current??n,delay:void 0});e.style.transitionDuration=typeof i.duration==`string`?i.duration:`${i.duration}ms`,e.style[k]=ee,e.style.transitionTimingFunction=r,g&&g(e)}),ce=r?e=>{r(j.current,e)}:void 0,P={slots:v,slotProps:y,component:s},[le,ue]=jp(`root`,{ref:M,className:U(T.root,a),elementType:Fp,externalForwardedProps:P,ownerState:w,additionalProps:{style:{[te?`minWidth`:`minHeight`]:ee,...b}}}),[de,F]=jp(`wrapper`,{ref:D,className:T.wrapper,elementType:Ip,externalForwardedProps:P,ownerState:w}),[fe,pe]=jp(`wrapperInner`,{className:T.wrapperInner,elementType:Lp,externalForwardedProps:P,ownerState:w});return(0,H.jsx)(S,{in:u,onEnter:re,onEntered:ae,onEntering:ie,onExit:oe,onExited:N,onExiting:se,addEndListener:ce,getAutoTimeout:x===`auto`?()=>O.current:void 0,reduceMotion:A.shouldReduceMotion,nodeRef:j,timeout:x===`auto`?null:x,...C,children:(e,{ownerState:t,...n})=>{let r={...w,state:e};return(0,H.jsx)(le,{...ue,className:U(ue.className,{entered:T.entered,exited:!u&&ee===`0px`&&T.hidden}[e]),ownerState:r,...n,children:(0,H.jsx)(de,{...F,ownerState:r,children:(0,H.jsx)(fe,{...pe,ownerState:r,children:i})})})}})});Rp&&(Rp.muiSupportAuto=!0);function zp(e){return Qs(`MuiPaper`,e)}$s(`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 Bp=e=>{let{square:t,elevation:n,variant:r,classes:i}=e;return El({root:[`root`,r,!t&&`rounded`,r===`elevation`&&`elevation${n}`]},zp,i)},Vp=G(`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}`]]}})(Md(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,...ef(e,`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)`}}]}))),Hp=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiPaper`}),r=Dd(),{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},d=Bp(u);return(0,H.jsx)(Vp,{as:a,ownerState:u,className:U(d.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(${Ac(`#fff`,Hu(o))}, ${Ac(`#fff`,Hu(o))})`}},...l.style}})}),Up=I.createContext({});function Wp(e){return Qs(`MuiAccordion`,e)}var Gp=$s(`MuiAccordion`,[`root`,`heading`,`rounded`,`expanded`,`disabled`,`gutters`,`region`]),Kp=e=>{let{classes:t,square:n,expanded:r,disabled:i,disableGutters:a}=e;return El({root:[`root`,!n&&`rounded`,r&&`expanded`,i&&`disabled`,!a&&`gutters`],heading:[`heading`],region:[`region`]},Wp,t)},eee=G(Hp,{name:`MuiAccordion`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${Gp.region}`]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})(Md(({theme:e})=>{let t={duration:e.transitions.duration.shortest};return{position:`relative`,...ef(e,[`margin`],t),overflowAnchor:`none`,"&::before":{position:`absolute`,left:0,top:-1,right:0,height:1,content:`""`,opacity:1,backgroundColor:(e.vars||e).palette.divider,...ef(e,[`opacity`,`background-color`],t)},"&:first-of-type":{"&::before":{display:`none`}},[`&.${Gp.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:`none`}}},[`&.${Gp.disabled}`]:{backgroundColor:(e.vars||e).palette.action.disabledBackground}}}),Md(({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:{[`&.${Gp.expanded}`]:{margin:`16px 0`}}}]}))),tee=G(`h3`,{name:`MuiAccordion`,slot:`Heading`})({all:`unset`}),nee=G(`div`,{name:`MuiAccordion`,slot:`Region`})({}),ree=I.forwardRef(function(e,t){let n=Nd({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]=np({controlled:c,default:a,name:`Accordion`,state:`expanded`}),h=I.useCallback(e=>{m(!p),l&&l(e,!p)},[p,l,m]),[g,..._]=I.Children.toArray(r),v=I.useMemo(()=>({expanded:p,disabled:o,disableGutters:s,toggle:h}),[p,o,s,h]),y={...n,disabled:o,disableGutters:s,expanded:p},b=Kp(y),x={slots:u,slotProps:d},[S,C]=jp(`root`,{elementType:eee,externalForwardedProps:{...x,...f},className:U(b.root,i),shouldForwardComponentProp:!0,ownerState:y,ref:t}),[w,T]=jp(`heading`,{elementType:tee,externalForwardedProps:x,className:b.heading,ownerState:y}),[E,D]=jp(`transition`,{elementType:Rp,externalForwardedProps:x,ownerState:y}),[O,ee]=jp(`region`,{elementType:nee,externalForwardedProps:x,ownerState:y,className:b.region,additionalProps:{"aria-labelledby":g.props.id,id:g.props[`aria-controls`],role:`region`}});return(0,H.jsxs)(S,{...C,children:[(0,H.jsx)(w,{...T,children:(0,H.jsx)(Up.Provider,{value:v,children:g})}),(0,H.jsx)(E,{in:p,timeout:`auto`,...D,children:(0,H.jsx)(O,{...ee,children:_})})]})});function iee(e){return Qs(`MuiAccordionDetails`,e)}$s(`MuiAccordionDetails`,[`root`]);var aee=e=>{let{classes:t}=e;return El({root:[`root`]},iee,t)},oee=G(`div`,{name:`MuiAccordionDetails`,slot:`Root`})(Md(({theme:e})=>({padding:e.spacing(1,2,2)}))),see=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiAccordionDetails`}),{className:r,...i}=n,a=n,o=aee(a);return(0,H.jsx)(oee,{className:U(o.root,r),ref:t,ownerState:a,...i})});function qp(e){try{return e.matches(`:focus-visible`)}catch{}return!1}function cee(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return I.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 lee={};function uee(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=I.useRef(null),m=l===!0,h=cee({focusableWhenDisabled:m,disabled:a,isNativeButton:t,tabIndex:c}),g=I.useCallback(()=>{let e=p.current;return e==null?t:e.tagName===`BUTTON`||!!(e.tagName===`A`&&e.href)},[t]),_=I.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:I.useCallback((e=lee)=>{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 dee=class e{static create(){return new e}static use(){let t=sp(e.create).current,[n,r]=I.useState(!1);return t.shouldMount=n,t.setShouldMount=r,I.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=pee(),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 fee(){return dee.use()}function pee(){let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n}var mee=[];function Jp(e){I.useEffect(e,mee)}var Yp=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 Xp(){let e=sp(Yp.create).current;return Jp(e.disposeEffect),e}function Zp(e){let{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:a,rippleSize:o,in:s,onExited:c,timeout:l}=e,[u,d]=I.useState(!1),f=Xp(),p=I.useRef(!1),m=I.useRef(c);m.current=c;let h=c!=null,g=U(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),_={width:o,height:o,top:-(o/2)+a,left:-(o/2)+i},v=U(n.child,u&&n.childLeaving,r&&n.childPulsate);return!s&&!u&&d(!0),I.useEffect(()=>{!s&&h?p.current||(p.current=!0,f.start(l,()=>{p.current=!1,m.current?.()})):(p.current=!1,f.clear())},[f,h,s,l]),(0,H.jsx)(`span`,{className:g,style:_,children:(0,H.jsx)(`span`,{className:v})})}var Qp=$s(`MuiTouchRipple`,[`root`,`ripple`,`rippleVisible`,`ripplePulsate`,`child`,`childLeaving`,`childPulsate`]),$p=550,em={},tm=[],nm=()=>{};function rm(e,t){let n=new Set(t),r=new Map,i=[];for(let t of e)n.has(t)?i.length>0&&(r.set(t,i),i=[]):i.push(t);let a=[];for(let e of t){let t=r.get(e);t&&a.push(...t),a.push(e)}return a.push(...i),a}function im({event:e,element:t,center:n}){let r=t?t.getBoundingClientRect():{width:0,height:0,left:0,top:0},i,a;if(n||e===void 0||e.clientX===0&&e.clientY===0||!e.clientX&&!e.touches)i=Math.round(r.width/2),a=Math.round(r.height/2);else{let{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;i=Math.round(t-r.left),a=Math.round(n-r.top)}let o;if(n)o=Math.sqrt((2*r.width**2+r.height**2)/3),o%2==0&&(o+=1);else{let e=Math.max(Math.abs((t?t.clientWidth:0)-i),i)*2+2,n=Math.max(Math.abs((t?t.clientHeight:0)-a),a)*2+2;o=Math.sqrt(e**2+n**2)}return{rippleX:i,rippleY:a,rippleSize:o}}var am=Pa`
|
|
70
|
+
0% {
|
|
71
|
+
transform: scale(0);
|
|
72
|
+
opacity: 0.1;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
100% {
|
|
76
|
+
transform: scale(1);
|
|
77
|
+
opacity: 0.3;
|
|
78
|
+
}
|
|
79
|
+
`,om=Pa`
|
|
80
|
+
0% {
|
|
81
|
+
opacity: 1;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
100% {
|
|
85
|
+
opacity: 0;
|
|
86
|
+
}
|
|
87
|
+
`,sm=Pa`
|
|
88
|
+
0% {
|
|
89
|
+
transform: scale(1);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
50% {
|
|
93
|
+
transform: scale(0.92);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
100% {
|
|
97
|
+
transform: scale(1);
|
|
98
|
+
}
|
|
99
|
+
`;function cm(e){if(e.motion.reducedMotion===`always`)return null;let t=Na`
|
|
100
|
+
&.${Qp.rippleVisible} {
|
|
101
|
+
animation-name: ${am};
|
|
102
|
+
animation-duration: ${$p}ms;
|
|
103
|
+
animation-timing-function: ${e.transitions.easing.easeInOut};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&.${Qp.ripplePulsate} {
|
|
107
|
+
animation-duration: ${e.transitions.duration.shorter}ms;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
& .${Qp.childLeaving} {
|
|
111
|
+
animation-name: ${om};
|
|
112
|
+
animation-duration: ${$p}ms;
|
|
113
|
+
animation-timing-function: ${e.transitions.easing.easeInOut};
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
& .${Qp.childPulsate} {
|
|
117
|
+
animation-name: ${sm};
|
|
118
|
+
animation-duration: 2500ms;
|
|
119
|
+
animation-timing-function: ${e.transitions.easing.easeInOut};
|
|
120
|
+
animation-iteration-count: infinite;
|
|
121
|
+
animation-delay: 200ms;
|
|
122
|
+
}
|
|
123
|
+
`;return e.motion.reducedMotion===`system`?Na`
|
|
124
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
125
|
+
${t}
|
|
126
|
+
}
|
|
127
|
+
`:t}var lm=G(`span`,{name:`MuiTouchRipple`,slot:`Root`})({overflow:`hidden`,pointerEvents:`none`,position:`absolute`,zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:`inherit`}),um=G(Zp,{name:`MuiTouchRipple`,slot:`Ripple`})`
|
|
128
|
+
opacity: 0;
|
|
129
|
+
position: absolute;
|
|
130
|
+
|
|
131
|
+
&.${Qp.rippleVisible} {
|
|
132
|
+
opacity: 0.3;
|
|
133
|
+
transform: scale(1);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/*
|
|
137
|
+
* Order matters: 'child', 'childLeaving' and 'childPulsate' apply to the same
|
|
138
|
+
* element with equal specificity, so the later rule wins. 'child' must come
|
|
139
|
+
* before 'childLeaving' so the leaving 'opacity: 0' takes precedence. A focus
|
|
140
|
+
* (pulsate) ripple keeps 'pulsateKeyframe' (no opacity animation) on exit, so
|
|
141
|
+
* it relies on this static 'opacity: 0' to disappear on blur instead of
|
|
142
|
+
* lingering until removal.
|
|
143
|
+
*/
|
|
144
|
+
& .${Qp.child} {
|
|
145
|
+
opacity: 1;
|
|
146
|
+
display: block;
|
|
147
|
+
width: 100%;
|
|
148
|
+
height: 100%;
|
|
149
|
+
border-radius: 50%;
|
|
150
|
+
background-color: currentColor;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
& .${Qp.childLeaving} {
|
|
154
|
+
opacity: 0;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
& .${Qp.childPulsate} {
|
|
158
|
+
position: absolute;
|
|
159
|
+
/* @noflip */
|
|
160
|
+
left: 0px;
|
|
161
|
+
top: 0;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
${({theme:e})=>cm(e)}
|
|
165
|
+
`,dm=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiTouchRipple`}),r=Tp(Dd().motion.reducedMotion,!1),{center:i=!1,classes:a=em,className:o,...s}=n,[c,l]=I.useState({items:tm,order:tm}),u=c.items,d=I.useRef(0),f=I.useRef(null),p=I.useRef(!1);Jp(()=>(p.current=!0,()=>{p.current=!1})),I.useEffect(()=>{f.current&&=(f.current(),null)},[u]);let m=I.useRef(!1),h=Xp(),g=I.useRef(null),_=I.useRef(null),v=rp(e=>{p.current&&l(t=>{let n=t.items.filter(t=>t.key!==e);return{items:n,order:rm(t.order.filter(t=>t!==e),n.filter(e=>!e.exiting).map(e=>e.key))}})}),y=rp(e=>{let{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e,o=d.current;d.current+=1,l(e=>{let a=[...e.items,{key:o,pulsate:t,rippleX:n,rippleY:r,rippleSize:i,exiting:!1}];return{items:a,order:rm(e.order,a.filter(e=>!e.exiting).map(e=>e.key))}}),f.current=a}),b=rp((e=em,t=em,n=nm)=>{let{pulsate:r=!1,center:a=i||t.pulsate,fakeElement:o=!1}=t;if(e?.type===`mousedown`&&m.current){m.current=!1;return}e?.type===`touchstart`&&(m.current=!0);let{rippleX:s,rippleY:c,rippleSize:l}=im({event:e,element:o?null:_.current,center:a});e?.touches?g.current===null&&(g.current=()=>{y({pulsate:r,rippleX:s,rippleY:c,rippleSize:l,cb:n})},h.start(80,()=>{g.current&&=(g.current(),null)})):y({pulsate:r,rippleX:s,rippleY:c,rippleSize:l,cb:n})}),x=rp(()=>{b(em,{pulsate:!0})}),S=rp((e,t)=>{if(h.clear(),e?.type===`touchend`&&g.current){g.current(),g.current=null,h.start(0,()=>{S(e,t)});return}g.current=null,l(e=>{let t=e.items.findIndex(e=>!e.exiting);if(t===-1)return e;let n=e.items.slice();return n[t]={...n[t],exiting:!0},{items:n,order:rm(e.order,n.filter(e=>!e.exiting).map(e=>e.key))}}),f.current=t});I.useImperativeHandle(t,()=>({pulsate:x,start:b,stop:S}),[x,b,S]);let C=new Map(u.map(e=>[e.key,e])),w=c.order.map(e=>C.get(e)).filter(Boolean);return(0,H.jsx)(lm,{className:U(Qp.root,a.root,o),ref:_,...s,children:w.map(e=>(0,H.jsx)(um,{classes:{ripple:U(a.ripple,Qp.ripple),rippleVisible:U(a.rippleVisible,Qp.rippleVisible),ripplePulsate:U(a.ripplePulsate,Qp.ripplePulsate),child:U(a.child,Qp.child),childLeaving:U(a.childLeaving,Qp.childLeaving),childPulsate:U(a.childPulsate,Qp.childPulsate)},timeout:r.shouldReduceMotion?0:$p,pulsate:e.pulsate,rippleX:e.rippleX,rippleY:e.rippleY,rippleSize:e.rippleSize,in:!e.exiting,onExited:()=>v(e.key)},e.key))})});function fm(e){return Qs(`MuiButtonBase`,e)}var pm=$s(`MuiButtonBase`,[`root`,`disabled`,`focusVisible`]),mm=e=>{let{disabled:t,focusVisible:n,focusVisibleClassName:r,suppressFocusVisible:i,classes:a}=e,o=El({root:[`root`,t&&`disabled`,n&&!i&&`focusVisible`]},fm,a);return n&&!i&&r&&(o.root+=` ${r}`),o},hm=G(`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`},[`&.${pm.disabled}`]:{pointerEvents:`none`,cursor:`default`},"@media print":{colorAdjust:`exact`}}),gm=I.forwardRef(function(e,t){let n=Nd({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:M,type:ne,...re}=n,ie=!!(re.href||re.to),ae=!!re.formAction,oe=s;oe===`button`&&ie&&(oe=g);let N=typeof oe==`string`?oe===`button`:h??!1,se=_??N,ce=fee(),P=Pd(ce.ref,M),[le,ue]=I.useState(!1);(c||m)&&le&&ue(!1);let de=rp(e=>{d&&!e.repeat&&le&&e.key===` `&&ce.stop(e,()=>{ce.start(e)})}),F=rp(e=>{d&&e.key===` `&&le&&!e.defaultPrevented&&ce.stop(e,()=>{ce.pulsate(e)})}),{getButtonProps:fe,rootRef:pe}=uee({nativeButton:se,nativeButtonProp:_,internalNativeButton:N,allowInferredHostMismatch:ie||typeof oe==`string`,disabled:c,type:ne,hasFormAction:ae,tabIndex:A,onBeforeKeyDown:de,onBeforeKeyUp:F}),{onClick:me,onKeyDown:he,onKeyUp:ge,..._e}=fe({onClick:y,onKeyDown:w,onKeyUp:T});I.useImperativeHandle(r,()=>({focusVisible:()=>{ue(!0),pe.current.focus()}}),[pe]);let ve=ce.shouldMount&&!l&&!c;I.useEffect(()=>{le&&d&&!l&&ce.pulsate()},[l,d,le,ce]);let ye=_m(ce,`start`,E,u),be=_m(ce,`stop`,b,u),xe=_m(ce,`stop`,x,u),Se=_m(ce,`stop`,O,u),Ce=_m(ce,`stop`,e=>{le&&e.preventDefault(),D&&D(e)},u),L=_m(ce,`start`,k,u),R=_m(ce,`stop`,ee,u),z=_m(ce,`stop`,te,u),we=_m(ce,`stop`,e=>{qp(e.target)||ue(!1),v&&v(e)},!1),Te=rp(e=>{pe.current||=e.currentTarget,!m&&qp(e.target)&&(ue(!0),C&&C(e)),S&&S(e)}),Ee={};ie&&(Ee.tabIndex=c?-1:A,c&&(Ee[`aria-disabled`]=c),Ee.type=ne);let De=Pd(t,pe),Oe={...n,centerRipple:i,component:s,disabled:c,disableRipple:l,disableTouchRipple:u,focusRipple:d,suppressFocusVisible:m,tabIndex:A,focusVisible:le},ke=mm(Oe);return(0,H.jsxs)(hm,{as:oe,className:U(ke.root,o),ownerState:Oe,onBlur:we,onClick:me,onContextMenu:be,onFocus:Te,onKeyDown:he,onKeyUp:ge,onMouseDown:ye,onMouseLeave:Ce,onMouseUp:Se,onDragLeave:xe,onTouchEnd:R,onTouchMove:z,onTouchStart:L,ref:De,...ie?Ee:_e,...re,children:[a,ve?(0,H.jsx)(dm,{ref:P,center:i,...j}):null]})});function _m(e,t,n,r=!1){return rp(i=>(n&&n(i),r||e[t](i),!0))}var vm=e=>{let{classes:t,expanded:n,disabled:r,disableGutters:i}=e;return El({root:[`root`,n&&`expanded`,r&&`disabled`,!i&&`gutters`],focusVisible:[`focusVisible`],content:[`content`,n&&`expanded`],expandIconWrapper:[`expandIconWrapper`,n&&`expanded`]},od,t)},ym=G(gm,{name:`MuiAccordionSummary`,slot:`Root`})(Md(({theme:e})=>({display:`flex`,width:`100%`,minHeight:48,padding:e.spacing(0,2),...ef(e,[`min-height`,`background-color`],{duration:e.transitions.duration.shortest}),[`&.${sd.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${sd.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${sd.disabled})`]:{cursor:`pointer`},variants:[{props:e=>!e.disableGutters,style:{[`&.${sd.expanded}`]:{minHeight:64}}}]}))),bm=G(`span`,{name:`MuiAccordionSummary`,slot:`Content`})(Md(({theme:e})=>({display:`flex`,textAlign:`start`,flexGrow:1,margin:`12px 0`,variants:[{props:e=>!e.disableGutters,style:{...ef(e,[`margin`],{duration:e.transitions.duration.shortest}),[`&.${sd.expanded}`]:{margin:`20px 0`}}}]}))),xm=G(`span`,{name:`MuiAccordionSummary`,slot:`ExpandIconWrapper`})(Md(({theme:e})=>({display:`flex`,color:(e.vars||e).palette.action.active,transform:`rotate(0deg)`,...ef(e,`transform`,{duration:e.transitions.duration.shortest}),[`&.${sd.expanded}`]:{transform:`rotate(180deg)`}}))),Sm=I.forwardRef(function(e,t){let n=Nd({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}=I.useContext(Up),h=e=>{m&&m(e),s&&s(e)},g={...n,expanded:p,disabled:d,disableGutters:f},_=vm(g),v={slots:c,slotProps:l},[y,b]=jp(`root`,{ref:t,shouldForwardComponentProp:!0,className:U(_.root,i),elementType:ym,externalForwardedProps:{...v,...u},ownerState:g,additionalProps:{focusRipple:!1,disableRipple:!0,internalNativeButton:!0,disabled:d,"aria-expanded":p,focusVisibleClassName:U(_.focusVisible,o)},getSlotProps:e=>({...e,onClick:t=>{e.onClick?.(t),h(t)}})}),[x,S]=jp(`content`,{className:_.content,elementType:bm,externalForwardedProps:v,ownerState:g}),[C,w]=jp(`expandIconWrapper`,{className:_.expandIconWrapper,elementType:xm,externalForwardedProps:v,ownerState:g});return(0,H.jsxs)(y,{...b,children:[(0,H.jsx)(x,{...S,children:r}),a&&(0,H.jsx)(C,{...w,children:a})]})});function Cm(e){return typeof e.main==`string`}function wm(e,t=[]){if(!Cm(e))return!1;for(let n of t)if(!e.hasOwnProperty(n)||typeof e[n]!=`string`)return!1;return!0}function Tm(e=[]){return([,t])=>t&&wm(t,e)}function Em(e){return Qs(`MuiAlert`,e)}var Dm=$s(`MuiAlert`,[`root`,`action`,`icon`,`message`,`filled`,`colorSuccess`,`colorInfo`,`colorWarning`,`colorError`,`outlined`,`standard`]);function Om(e){return Qs(`MuiCircularProgress`,e)}$s(`MuiCircularProgress`,[`root`,`determinate`,`indeterminate`,`colorPrimary`,`colorSecondary`,`svg`,`track`,`circle`,`circleDisableShrink`]);var km=44,Am=Pa`
|
|
166
|
+
0% {
|
|
167
|
+
transform: rotate(0deg);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
100% {
|
|
171
|
+
transform: rotate(360deg);
|
|
172
|
+
}
|
|
173
|
+
`,jm=Pa`
|
|
174
|
+
0% {
|
|
175
|
+
stroke-dasharray: 1px, 200px;
|
|
176
|
+
stroke-dashoffset: 0;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
50% {
|
|
180
|
+
stroke-dasharray: 100px, 200px;
|
|
181
|
+
stroke-dashoffset: -15px;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
100% {
|
|
185
|
+
stroke-dasharray: 1px, 200px;
|
|
186
|
+
stroke-dashoffset: -126px;
|
|
187
|
+
}
|
|
188
|
+
`,Mm=typeof Am==`string`?null:Na`
|
|
189
|
+
animation: ${Am} 1.4s linear infinite;
|
|
190
|
+
`,Nm=typeof jm==`string`?null:Na`
|
|
191
|
+
animation: ${jm} 1.4s ease-in-out infinite;
|
|
192
|
+
`,Pm=e=>{let{classes:t,variant:n,color:r,disableShrink:i}=e;return El({root:[`root`,n,`color${K(r)}`],svg:[`svg`],track:[`track`],circle:[`circle`,i&&`circleDisableShrink`]},Om,t)},Fm=G(`span`,{name:`MuiCircularProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`color${K(n.color)}`]]}})(Md(({theme:e})=>{let t=$d(e,{animation:`none`});return{display:`inline-block`,variants:[{props:{variant:`determinate`},style:{...ef(e,`transform`)}},{props:{variant:`indeterminate`},style:Mm||{animation:`${Am} 1.4s linear infinite`}},...t?[{props:{variant:`indeterminate`},style:t}]:[],...Object.entries(e.palette).filter(Tm()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}})),Im=G(`svg`,{name:`MuiCircularProgress`,slot:`Svg`})({display:`block`}),Lm=G(`circle`,{name:`MuiCircularProgress`,slot:`Circle`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.circle,n.disableShrink&&t.circleDisableShrink]}})(Md(({theme:e})=>{let t=$d(e,{animation:`none`});return{stroke:`currentColor`,variants:[{props:{variant:`determinate`},style:{...ef(e,`stroke-dashoffset`)}},{props:{variant:`indeterminate`},style:{strokeDasharray:`80px, 200px`,strokeDashoffset:0}},{props:({ownerState:e})=>e.variant===`indeterminate`&&!e.disableShrink,style:Nm||{animation:`${jm} 1.4s ease-in-out infinite`}},...t?[{props:({ownerState:e})=>e.variant===`indeterminate`&&!e.disableShrink,style:t}]:[]]}})),Rm=G(`circle`,{name:`MuiCircularProgress`,slot:`Track`})(Md(({theme:e})=>({stroke:`currentColor`,opacity:(e.vars||e).palette.action.activatedOpacity}))),zm=I.forwardRef(function(e,t){let n=Nd({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=Pm(_),y={},b={},x={};if(p===`determinate`){let e=2*Math.PI*((km-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,H.jsx)(Fm,{className:U(v.root,r),style:{width:l,height:l,...b,...u},ownerState:_,ref:t,role:`progressbar`,...x,...m,children:(0,H.jsxs)(Im,{className:v.svg,ownerState:_,viewBox:`${km/2} ${km/2} ${km} ${km}`,children:[o?(0,H.jsx)(Rm,{className:v.track,ownerState:_,cx:km,cy:km,r:(km-d)/2,fill:`none`,strokeWidth:d,"aria-hidden":`true`}):null,(0,H.jsx)(Lm,{className:v.circle,style:y,ownerState:_,cx:km,cy:km,r:(km-d)/2,fill:`none`,strokeWidth:d})]})})});function Bm(e){return Qs(`MuiIconButton`,e)}var Vm=$s(`MuiIconButton`,[`root`,`disabled`,`colorInherit`,`colorPrimary`,`colorSecondary`,`colorError`,`colorInfo`,`colorSuccess`,`colorWarning`,`edgeStart`,`edgeEnd`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`loading`,`loadingIndicator`,`loadingWrapper`]),Hm=e=>{let{classes:t,disabled:n,color:r,edge:i,size:a,loading:o}=e;return El({root:[`root`,o&&`loading`,n&&`disabled`,r!=="default"&&`color${K(r)}`,i&&`edge${K(i)}`,`size${K(a)}`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},Bm,t)},Um=G(gm,{name:`MuiIconButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${K(n.color)}`],n.edge&&t[`edge${K(n.edge)}`],t[`size${K(n.size)}`]]}})(Md(({theme:e})=>({textAlign:`center`,flex:`0 0 auto`,fontSize:e.typography.pxToRem(24),padding:8,borderRadius:`50%`,color:(e.vars||e).palette.action.active,...ef(e,`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}}]})),Md(({theme:e})=>({variants:[{props:{color:`inherit`},style:{color:`inherit`}},...Object.entries(e.palette).filter(Tm()).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)}}],[`&.${Vm.disabled}`]:{backgroundColor:`transparent`,color:(e.vars||e).palette.action.disabled},[`&.${Vm.loading}`]:{color:`transparent`}}))),Wm=G(`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`}}]})),Gm=I.forwardRef(function(e,t){let n=Nd({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=ep(u),h=f??(0,H.jsx)(zm,{"aria-labelledby":m,color:`inherit`,size:16}),g={...n,edge:r,color:o,disabled:s,disableFocusRipple:c,loading:d,loadingIndicator:h,size:l},_=Hm(g);return(0,H.jsxs)(Um,{id:d?m:u,className:U(_.root,a),centerRipple:!0,internalNativeButton:!0,focusRipple:!c,disabled:s||d,ref:t,...p,ownerState:g,children:[typeof d==`boolean`&&(0,H.jsx)(`span`,{className:_.loadingWrapper,style:{display:`contents`},children:(0,H.jsx)(Wm,{className:_.loadingIndicator,ownerState:g,children:d&&h})}),i]})}),Km=Yf((0,H.jsx)(`path`,{d:`M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z`}),`SuccessOutlined`),qm=Yf((0,H.jsx)(`path`,{d:`M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z`}),`ReportProblemOutlined`),Jm=Yf((0,H.jsx)(`path`,{d:`M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z`}),`ErrorOutline`),Ym=Yf((0,H.jsx)(`path`,{d:`M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z`}),`InfoOutlined`),Xm=Yf((0,H.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`),Zm=e=>{let{variant:t,color:n,severity:r,classes:i}=e;return El({root:[`root`,`color${K(n||r)}`,`${t}`],icon:[`icon`],message:[`message`],action:[`action`]},Em,i)},Qm=G(Hp,{name:`MuiAlert`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant]]}})(Md(({theme:e})=>{let t=e.palette.mode===`light`?e.darken:e.lighten,n=e.palette.mode===`light`?e.lighten:e.darken;return{...e.typography.body2,backgroundColor:`transparent`,display:`flex`,padding:`6px 16px`,variants:[...Object.entries(e.palette).filter(Tm([`light`])).map(([r])=>({props:{colorSeverity:r,variant:`standard`},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${Dm.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(Tm([`light`])).map(([n])=>({props:{colorSeverity:n,variant:`outlined`},style:{color:e.vars?e.vars.palette.Alert[`${n}Color`]:t(e.palette[n].light,.6),border:`1px solid ${(e.vars||e).palette[n].light}`,[`& .${Dm.icon}`]:e.vars?{color:e.vars.palette.Alert[`${n}IconColor`]}:{color:e.palette[n].main}}})),...Object.entries(e.palette).filter(Tm([`dark`])).map(([t])=>({props:{colorSeverity:t,variant:`filled`},style:{fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${t}FilledColor`],backgroundColor:e.vars.palette.Alert[`${t}FilledBg`]}:{backgroundColor:e.palette.mode===`dark`?e.palette[t].dark:e.palette[t].main,color:e.palette.getContrastText(e.palette[t].main)}}}))]}})),$m=G(`div`,{name:`MuiAlert`,slot:`Icon`})({marginRight:12,padding:`7px 0`,display:`flex`,fontSize:22,opacity:.9}),eh=G(`div`,{name:`MuiAlert`,slot:`Message`})({padding:`8px 0`,minWidth:0,overflow:`auto`}),th=G(`div`,{name:`MuiAlert`,slot:`Action`})({display:`flex`,alignItems:`flex-start`,padding:`4px 0 0 16px`,marginLeft:`auto`,marginRight:-8}),nh={success:(0,H.jsx)(Km,{fontSize:`inherit`}),warning:(0,H.jsx)(qm,{fontSize:`inherit`}),error:(0,H.jsx)(Jm,{fontSize:`inherit`}),info:(0,H.jsx)(Ym,{fontSize:`inherit`})},rh=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiAlert`}),{action:r,children:i,className:a,closeText:o=`Close`,color:s,icon:c,iconMapping:l=nh,onClose:u,role:d=`alert`,severity:f=`success`,slotProps:p={},slots:m={},variant:h=`standard`,...g}=n,_={...n,color:s,severity:f,variant:h,colorSeverity:s||f},v=Zm(_),y={slots:m,slotProps:p},[b,x]=jp(`root`,{ref:t,shouldForwardComponentProp:!0,className:U(v.root,a),elementType:Qm,externalForwardedProps:{...y,...g},ownerState:_,additionalProps:{role:d,elevation:0}}),[S,C]=jp(`icon`,{className:v.icon,elementType:$m,externalForwardedProps:y,ownerState:_}),[w,T]=jp(`message`,{className:v.message,elementType:eh,externalForwardedProps:y,ownerState:_}),[E,D]=jp(`action`,{className:v.action,elementType:th,externalForwardedProps:y,ownerState:_}),[O,ee]=jp(`closeButton`,{elementType:Gm,externalForwardedProps:y,ownerState:_}),[te,k]=jp(`closeIcon`,{elementType:Xm,externalForwardedProps:y,ownerState:_});return(0,H.jsxs)(b,{...x,children:[c===!1?null:(0,H.jsx)(S,{...C,children:c||l[f]||nh[f]}),(0,H.jsx)(w,{...T,children:i}),r==null?null:(0,H.jsx)(E,{...D,children:r}),r==null&&u?(0,H.jsx)(E,{...D,children:(0,H.jsx)(O,{size:`small`,"aria-label":o,title:o,color:`inherit`,onClick:u,...ee,children:(0,H.jsx)(te,{fontSize:`small`,...k})})}):null]})});function ih(e){return Qs(`MuiTypography`,e)}var ah=$s(`MuiTypography`,[`root`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`subtitle1`,`subtitle2`,`body1`,`body2`,`inherit`,`button`,`caption`,`overline`,`alignLeft`,`alignRight`,`alignCenter`,`alignJustify`,`noWrap`,`gutterBottom`]),oh=e=>{let{align:t,gutterBottom:n,noWrap:r,variant:i,classes:a}=e;return El({root:[`root`,i,e.align!==`inherit`&&`align${K(t)}`,n&&`gutterBottom`,r&&`noWrap`]},ih,a)},sh=G(`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${K(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom]}})(Md(({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(Tm()).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${K(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`}}]}))),ch={h1:`h1`,h2:`h2`,h3:`h3`,h4:`h4`,h5:`h5`,h6:`h6`,subtitle1:`h6`,subtitle2:`h6`,body1:`p`,body2:`p`,inherit:`p`},q=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiTypography`}),{color:r,align:i=`inherit`,className:a,component:o,gutterBottom:s=!1,noWrap:c=!1,variant:l=`body1`,variantMapping:u=ch,...d}=n,f={...n,align:i,color:r,className:a,component:o,gutterBottom:s,noWrap:c,variant:l,variantMapping:u},p=o||u[l]||ch[l]||`span`,m=oh(f);return(0,H.jsx)(sh,{as:p,ref:t,className:U(m.root,a),...d,ownerState:f,style:{...i!==`inherit`&&{"--Typography-textAlign":i},...d.style}})});function lh(e){return Qs(`MuiAppBar`,e)}$s(`MuiAppBar`,[`root`,`positionFixed`,`positionAbsolute`,`positionSticky`,`positionStatic`,`positionRelative`,`colorDefault`,`colorPrimary`,`colorSecondary`,`colorInherit`,`colorTransparent`,`colorError`,`colorInfo`,`colorSuccess`,`colorWarning`]);var uh=e=>{let{color:t,position:n,classes:r}=e;return El({root:[`root`,`color${K(t)}`,`position${K(n)}`]},lh,r)},dh=(e,t)=>e?`${e.replace(`)`,``)}, ${t})`:t,fh=G(Hp,{name:`MuiAppBar`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`position${K(n.position)}`],t[`color${K(n.color)}`]]}})(Md(({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(Tm([`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?dh(e.vars.palette.AppBar.darkBg,`var(--AppBar-background)`):null,color:e.vars?dh(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`})}}]}))),ph=I.forwardRef(function(e,t){let n=Nd({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},l=uh(c);return(0,H.jsx)(fh,{square:!0,component:`header`,ownerState:c,elevation:4,className:U(l.root,r,o===`fixed`&&`mui-fixed`),ref:t,...s})});function mh(){let[,e]=I.useState({});return I.useCallback(()=>{e({})},[])}function hh(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 gh(e){let t=I.useRef({});return I.useEffect(()=>{t.current=e}),t.current}function _h({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 vh(e){return e.normalize(`NFD`).replace(/[\u0300-\u036f]/g,``)}function yh(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=vh(l));let u=l?e.filter(e=>{let r=(a||c)(e);return n&&(r=r.toLowerCase()),t&&(r=vh(r)),i===`start`?r.startsWith(l):r.includes(l)}):e;return typeof r==`number`?u.slice(0,r):u}}var bh=yh(),xh=5,Sh=e=>e.current!==null&&hh(e.current.parentElement,document.activeElement),Ch=(e,t)=>e===t,wh=[];function Th(e,t,n,r){if(t||e==null||r)return``;let i=n(e);return typeof i==`string`?i:``}function Eh(e){let{unstable_isActiveElementInListbox:t=Sh,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?wh:null,disableClearable:d=!1,disableCloseOnSelect:f=!1,disabled:p,disabledItemsFocusable:m=!1,disableListWrap:h=!1,filterOptions:g=bh,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=Ch,multiple:O=!1,onChange:ee,onClose:te,onHighlightChange:k,onInputChange:A,onOpen:j,open:M,openOnFocus:ne=!1,options:re,readOnly:ie=!1,renderValue:ae,resetHighlightOnMouseLeave:oe=!1,selectOnFocus:N=!e.freeSolo,value:se}=e,ce=$c(w),P=x;P=e=>{let t=x(e);return typeof t==`string`?t:String(t)};let le=I.useRef(!1),ue=I.useRef(!0),de=I.useRef(null),F=I.useRef(null),fe=I.useRef(!1),pe=I.useRef(!1),[me,he]=I.useState(null),[ge,_e]=I.useState(-1),ve=i?0:-1,ye=I.useRef(ve),be=I.useRef(null),xe=I.useRef(!1),Se=I.useRef(!1),Ce=I.useRef(Th(u??se,O,P)).current,[L,R]=tp({controlled:se,default:u,name:l}),[z,we]=tp({controlled:E,default:Ce,name:l,state:`inputValue`}),[Te,Ee]=I.useState(!1),De=I.useCallback((e,t,n)=>{if(!(O?L.length<t.length:t!==null)&&!s&&!(n===`reset`&&v&&!O&&t===null))return;let r=Th(t,O,P,ae);z!==r&&(we(r),A&&A(e,r,n))},[P,z,O,A,we,s,v,L,ae]),[Oe,ke]=tp({controlled:M,default:!1,name:l,state:`open`}),[Ae,je]=I.useState(!0),Me=!O&&L!=null&&z===P(L),B=Oe&&!ie,Ne=I.useMemo(()=>O?L:L==null?[]:[L],[O,L]),Pe=I.useMemo(()=>D!==Ch||Ne.length===0?null:new Set(Ne),[D,Ne]),Fe=I.useCallback(e=>Pe?Pe.has(e):Ne.some(t=>t!=null&&D(e,t)),[D,Ne,Pe]),Ie=B?g(re.filter(e=>!(_&&Fe(e))),{inputValue:Me&&Ae?``:z,getOptionLabel:P}):[],Le=gh({filteredOptions:Ie,value:L,inputValue:z});I.useEffect(()=>{let e=L!==Le.value;Te&&!e||v&&(!e||L==null&&Le.value===void 0)||De(null,L,`reset`)},[L,De,Te,Le.value,v]);let Re=Oe&&Ie.length>0&&!ie,ze=hd(e=>{e===-1?de.current.focus():me.querySelector(`[data-item-index="${e}"]`).focus()});I.useEffect(()=>{O&&ge>L.length-1&&(_e(-1),ze(-1))},[L,O,ge,ze]);function Be(e,t){if(!F.current||e<0||e>=Ie.length)return-1;let n=e;for(;;){let r=F.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)%Ie.length:(n-1+Ie.length)%Ie.length,n===e)return-1}}let Ve=hd(({index:e,reason:t,preserveScroll:r=!1})=>{if(de.current==null&&F.current==null||(e===-1?de.current.removeAttribute(`aria-activedescendant`):de.current.setAttribute(`aria-activedescendant`,`${ce}-option-${e}`),!F.current))return;let i=F.current.querySelector(`[role="option"].${n}-focused`);i&&(i.classList.remove(`${n}-focused`),i.classList.remove(`${n}-focusVisible`));let a=F.current;if(F.current.getAttribute(`role`)!==`listbox`&&(a=F.current.parentElement.querySelector(`[role="listbox"]`)),!a)return;if(e===-1){r||(a.scrollTop=0);return}let o=F.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))}}),He=hd(({event:e,index:t,reason:n,preserveScroll:r=!1})=>{ye.current=t,be.current=n??null,k&&[`mouse`,`keyboard`,`touch`].includes(n)&&k(e,t===-1?null:Ie[t],n),Ve({index:t,reason:n,preserveScroll:r})}),Ue=hd(({index:e})=>{ye.current=e,Ve({index:e,reason:be.current})}),We=hd(({event:e,diff:t,direction:n=`next`,reason:i,preserveScroll:a})=>{if(!B)return;i===`keyboard`&&(xe.current=!1,Se.current=!1);let o=Be((()=>{let e=Ie.length-1;if(t===`reset`)return ve;if(t===`start`)return 0;if(t===`end`)return e;let n=ye.current+t;return n<0?n===-1&&T?-1:h&&ye.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(He({index:o,reason:i,event:e,preserveScroll:a}),r&&t!==`reset`)if(o===-1)de.current.value=z;else{let e=P(Ie[o]);de.current.value=e,e.toLowerCase().indexOf(z.toLowerCase())===0&&z.length>0&&de.current.setSelectionRange(z.length,e.length)}}),Ge=!_h({array1:Le.filteredOptions,array2:Ie,parser:P}),Ke=()=>{if(ye.current!==-1&&!_h({array1:Le.filteredOptions,array2:Ie,parser:P})&&Le.inputValue===z&&(O?L.length===Le.value.length&&Le.value.every((e,t)=>P(L[t])===P(e)):((e,t)=>(e?P(e):``)===(t?P(t):``))(Le.value,L))){let e=Le.filteredOptions[ye.current];if(e)return Ie.findIndex(t=>P(t)===P(e))}return-1},qe=I.useCallback(()=>{if(!B)return;let e=Ke();if(e!==-1){Ue({index:e});return}let t=O?L[0]:L;if(Ie.length===0||t==null){let e=Ge&&Le.inputValue===z&&Le.filteredOptions?.length>0&&Ie.length>Le.filteredOptions.length&&Le.filteredOptions.every((e,t)=>P(e)===P(Ie[t]));We({diff:`reset`,preserveScroll:e});return}if(F.current){if(t!=null){let e=Ie[ye.current];if(O&&e&&L.findIndex(t=>D(e,t))!==-1&&Le.filteredOptions?.length>0){Ue({index:ye.current});return}let n=Ie.findIndex(e=>D(e,t));n===-1?We({diff:`reset`}):He({index:n});return}if(ye.current>=Ie.length-1){He({index:Ie.length-1});return}He({index:ye.current})}},[Ie.length,!O&&L,We,He,Ue,B,z,O]),Je=hd(e=>{$f(F,e),e&&qe()});I.useEffect(()=>{(Ge||B&&!f)&&qe()},[qe,Ge,B,f]),I.useEffect(()=>{if(typeof window>`u`)return;let e=()=>{pe.current=!0};return window.addEventListener(`blur`,e),()=>{window.removeEventListener(`blur`,e)}},[]);let Ye=e=>{Oe||(ke(!0),je(!0),Se.current=!1,j&&j(e))},Xe=(e,t)=>{Oe&&(ke(!1),xe.current=!1,be.current=null,te&&te(e,t))},Ze=(e,t,n,r)=>{if(O){if(L.length===t.length&&L.every((e,n)=>e===t[n]))return}else if(L===t)return;ee&&ee(e,t,n,r),R(t)},Qe=(e,t,n=`selectOption`,r=`options`)=>{let i=n,a=t;if(O){a=Array.isArray(L)?L.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),Ze(e,a,i,{option:t}),!f&&(!e||!e.ctrlKey&&!e.metaKey)&&Xe(e,i),(o===!0||o===`touch`&&Se.current||o===`mouse`&&!Se.current)&&de.current.blur()};function $e(e,t){if(e===-1)return-1;let n=e;for(;;){if(t===`next`&&n===L.length||t===`previous`&&n===-1)return-1;let e=me.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 et=(e,t)=>{if(!O)return;z===``&&Xe(e,`toggleInput`);let n=ge;ge===-1&&t===`previous`?(n=L.length-1,v&&z!==``&&(we(``),A&&A(e,``,`reset`))):(n+=t===`next`?1:-1,n<0&&(n=0),n===L.length&&(n=-1)),n=$e(n,t),_e(n),ze(n)},tt=e=>{we(``),A&&A(e,``,`clear`),Ze(e,O?[]:null,`clear`)},nt=e=>t=>{if(e.onKeyDown&&e.onKeyDown(t),!t.defaultMuiPrevented&&(ge!==-1&&![`ArrowLeft`,`ArrowRight`].includes(t.key)&&(_e(-1),ze(-1)),t.which!==229))switch(t.key){case`Home`:B&&C&&(t.preventDefault(),We({diff:`start`,direction:`next`,reason:`keyboard`,event:t}));break;case`End`:B&&C&&(t.preventDefault(),We({diff:`end`,direction:`previous`,reason:`keyboard`,event:t}));break;case`PageUp`:t.preventDefault(),We({diff:-5,direction:`previous`,reason:`keyboard`,event:t}),Ye(t);break;case`PageDown`:t.preventDefault(),We({diff:xh,direction:`next`,reason:`keyboard`,event:t}),Ye(t);break;case`ArrowDown`:t.preventDefault(),We({diff:1,direction:`next`,reason:`keyboard`,event:t}),Ye(t);break;case`ArrowUp`:t.preventDefault(),We({diff:-1,direction:`previous`,reason:`keyboard`,event:t}),Ye(t);break;case`ArrowLeft`:{let e=de.current;if(!(e&&e.selectionStart===0&&e.selectionEnd===0))return;!O&&ae&&L!=null?(v&&z!==``&&(we(``),A&&A(t,``,`reset`)),_e(0),ze(0)):et(t,`previous`);break}case`ArrowRight`:!O&&ae?(_e(-1),ze(-1)):et(t,`next`);break;case`Enter`:{let e=B&&ye.current!==-1&&be.current===null,n=v&&!Ae&&e,i=!v||Ae||!e,a=n&&!xe.current;if(ye.current!==-1&&B&&i&&!xe.current){let e=Ie[ye.current],n=y?y(e):!1;if(t.preventDefault(),n)return;Qe(t,e,`selectOption`),r&&de.current.setSelectionRange(de.current.value.length,de.current.value.length)}else v&&z!==``&&Me===!1?((O||a)&&t.preventDefault(),Qe(t,z,`createOption`,`freeSolo`)):B&&xe.current&&(t.preventDefault(),Xe(t,`escape`));break}case`Escape`:B?(t.preventDefault(),t.stopPropagation(),Xe(t,`escape`)):c&&(z!==``||O&&L.length>0||ae)&&(t.preventDefault(),t.stopPropagation(),tt(t));break;case`Backspace`:if(fe.current){fe.current=!1;break}if(O&&!ie&&z===``&&L.length>0){let e=ge===-1?L.length-1:ge,n=L.slice();n.splice(e,1),Ze(t,n,`removeOption`,{option:L[e]}),ge!==-1&&(fe.current=!0,setTimeout(()=>{fe.current&&=!1},0))}!O&&ae&&!ie&&z===``&&Ze(t,null,`removeOption`,{option:L});break;case`Delete`:if(O&&!ie&&z===``&&L.length>0&&ge!==-1){let e=ge,n=L.slice();n.splice(e,1),Ze(t,n,`removeOption`,{option:L[e]})}!O&&ae&&!ie&&z===``&&Ze(t,null,`removeOption`,{option:L});break;default:}},rt=e=>{if(Ee(!0),ge!==-1&&(_e(-1),ze(-1)),pe.current){pe.current=!1;return}ne&&!le.current&&Ye(e)},it=e=>{if(t(F)){de.current.focus();return}Ee(!1),ue.current=!0,le.current=!1,a&&ye.current!==-1&&B&&be.current!==`mouse`&&be.current!==`touch`?Qe(e,Ie[ye.current],`blur`):a&&v&&z!==``?Qe(e,z,`blur`,`freeSolo`):s&&De(e,L,`blur`),Xe(e,`blur`)},at=e=>{let t=e.target.value,n=z!==t;n&&(we(t),xe.current=!1,A&&A(e,t,`input`)),t===``?!d&&!O&&!ae&&Ze(e,null,`clear`):Ye(e),n&&je(!1)},ot=e=>{let t=Number(e.currentTarget.getAttribute(`data-option-index`));ye.current===t?be.current=`mouse`:He({event:e,index:t,reason:`mouse`}),Se.current||(xe.current=!1)},st=e=>{!oe||ye.current===-1||be.current!==`mouse`||Se.current||He({event:e,index:-1,reason:`mouse`,preserveScroll:!0})},V=e=>{xe.current=!1,He({event:e,index:Number(e.currentTarget.getAttribute(`data-option-index`)),reason:`touch`}),Se.current=!0},ct=e=>{let t=Number(e.currentTarget.getAttribute(`data-option-index`));Qe(e,Ie[t],`selectOption`),Se.current=!1},lt=e=>t=>{let n=L.slice();n.splice(e,1),Ze(t,n,`removeOption`,{option:L[e]})},ut=e=>{Ze(e,null,`removeOption`,{option:L})},dt=e=>{Oe?Xe(e,`toggleInput`):Ye(e)},ft=e=>{hh(e.currentTarget,e.target)&&(me&&!hh(me,e.target)||e.target.getAttribute(`id`)!==ce&&e.preventDefault())},pt=e=>{hh(e.currentTarget,e.target)&&(me&&!hh(me,e.target)||(de.current.focus(),N&&ue.current&&de.current.selectionEnd-de.current.selectionStart===0&&de.current.select(),ue.current=!1))},mt=e=>{!p&&(z===``||!Oe)&&e.button===0&&dt(e)},ht=v&&z.length>0;ht||=O?L.length>0:L!==null;let gt=Ie;return S&&(gt=Ie.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&&it(),{getRootProps:(e={})=>({...e,onKeyDown:nt(e),onMouseDown:ft,onClick:pt}),getInputLabelProps:()=>({id:`${ce}-label`,htmlFor:ce}),getInputProps:()=>({id:ce,value:z,onBlur:it,onFocus:rt,onChange:at,onMouseDown:mt,"aria-activedescendant":B?``:null,"aria-autocomplete":r?`both`:`list`,"aria-controls":Re?`${ce}-listbox`:void 0,"aria-expanded":Re,autoComplete:`off`,ref:de,autoCapitalize:`none`,spellCheck:`false`,role:`combobox`,disabled:p}),getClearProps:()=>({tabIndex:-1,type:`button`,onClick:e=>{le.current=!0,tt(e)}}),getItemProps:({index:e=0}={})=>({...O&&{key:e},"data-item-index":e,tabIndex:-1,onFocus:()=>{ge!==e&&_e(e)},...!ie&&{onDelete:O?lt(e):ut}}),getPopupIndicatorProps:()=>({tabIndex:-1,type:`button`,onClick:dt}),getListboxProps:(e={})=>({...e,role:`listbox`,id:`${ce}-listbox`,"aria-labelledby":`${ce}-label`,"aria-multiselectable":O||void 0,ref:Je,onMouseDown:t=>{e.onMouseDown?.(t),!t.defaultMuiPrevented&&t.preventDefault()},onScroll:t=>{e.onScroll?.(t),!t.defaultMuiPrevented&&Se.current&&(xe.current=!0)},onMouseLeave:t=>{e.onMouseLeave?.(t),!t.defaultMuiPrevented&&st(t)}}),getOptionProps:({index:e,option:t})=>{let n=Fe(t),r=y?y(t):!1;return{key:b?.(t)??P(t),tabIndex:-1,role:`option`,id:`${ce}-option-${e}`,onMouseMove:ot,onClick:ct,onTouchStart:V,"data-option-index":e,"aria-disabled":r,"aria-selected":n}},id:ce,inputValue:z,value:L,dirty:ht,expanded:B&&me,popupOpen:B,focused:Te||ge!==-1,anchorEl:me,setAnchorEl:he,focusedItem:ge,groupedOptions:gt}}var Dh=`bottom`,Oh=`right`,kh=`left`,Ah=`auto`,jh=[`top`,Dh,Oh,kh],Mh=`start`,Nh=`clippingParents`,Ph=`viewport`,Fh=`popper`,Ih=`reference`,Lh=jh.reduce(function(e,t){return e.concat([t+`-`+Mh,t+`-end`])},[]),Rh=[].concat(jh,[Ah]).reduce(function(e,t){return e.concat([t,t+`-`+Mh,t+`-end`])},[]),zh=[`beforeRead`,`read`,`afterRead`,`beforeMain`,`main`,`afterMain`,`beforeWrite`,`write`,`afterWrite`];function Bh(e){return e?(e.nodeName||``).toLowerCase():null}function Vh(e){if(e==null)return window;if(e.toString()!==`[object Window]`){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Hh(e){return e instanceof Vh(e).Element||e instanceof Element}function Uh(e){return e instanceof Vh(e).HTMLElement||e instanceof HTMLElement}function Wh(e){return typeof ShadowRoot>`u`?!1:e instanceof Vh(e).ShadowRoot||e instanceof ShadowRoot}function Gh(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];!Uh(i)||!Bh(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 Kh(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},{});!Uh(r)||!Bh(r)||(Object.assign(r.style,a),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}}var qh={name:`applyStyles`,enabled:!0,phase:`write`,fn:Gh,effect:Kh,requires:[`computeStyles`]};function Jh(e){return e.split(`-`)[0]}var Yh=Math.max,Xh=Math.min,Zh=Math.round;function Qh(){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 $h(){return!/^((?!chrome|android).)*safari/i.test(Qh())}function eg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&Uh(e)&&(i=e.offsetWidth>0&&Zh(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&Zh(r.height)/e.offsetHeight||1);var o=(Hh(e)?Vh(e):window).visualViewport,s=!$h()&&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 tg(e){var t=eg(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 ng(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Wh(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function rg(e){return Vh(e).getComputedStyle(e)}function ig(e){return[`table`,`td`,`th`].indexOf(Bh(e))>=0}function ag(e){return((Hh(e)?e.ownerDocument:e.document)||window.document).documentElement}function og(e){return Bh(e)===`html`?e:e.assignedSlot||e.parentNode||(Wh(e)?e.host:null)||ag(e)}function sg(e){return!Uh(e)||rg(e).position===`fixed`?null:e.offsetParent}function hee(e){var t=/firefox/i.test(Qh());if(/Trident/i.test(Qh())&&Uh(e)&&rg(e).position===`fixed`)return null;var n=og(e);for(Wh(n)&&(n=n.host);Uh(n)&&[`html`,`body`].indexOf(Bh(n))<0;){var r=rg(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 cg(e){for(var t=Vh(e),n=sg(e);n&&ig(n)&&rg(n).position===`static`;)n=sg(n);return n&&(Bh(n)===`html`||Bh(n)===`body`&&rg(n).position===`static`)?t:n||hee(e)||t}function lg(e){return[`top`,`bottom`].indexOf(e)>=0?`x`:`y`}function ug(e,t,n){return Yh(e,Xh(t,n))}function gee(e,t,n){var r=ug(e,t,n);return r>n?n:r}function dg(){return{top:0,right:0,bottom:0,left:0}}function fg(e){return Object.assign({},dg(),e)}function pg(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var _ee=function(e,t){return e=typeof e==`function`?e(Object.assign({},t.rects,{placement:t.placement})):e,fg(typeof e==`number`?pg(e,jh):e)};function vee(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=Jh(n.placement),c=lg(s),l=[`left`,`right`].indexOf(s)>=0?`height`:`width`;if(!(!a||!o)){var u=_ee(i.padding,n),d=tg(a),f=c===`y`?`top`:kh,p=c===`y`?Dh:Oh,m=n.rects.reference[l]+n.rects.reference[c]-o[c]-n.rects.popper[l],h=o[c]-n.rects.reference[c],g=cg(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=ug(y,x,b),C=c;n.modifiersData[r]=(t={},t[C]=S,t.centerOffset=S-x,t)}}function yee(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)||ng(t.elements.popper,r)&&(t.elements.arrow=r))}var bee={name:`arrow`,enabled:!0,phase:`main`,fn:vee,effect:yee,requires:[`popperOffsets`],requiresIfExists:[`preventOverflow`]};function mg(e){return e.split(`-`)[1]}var xee={top:`auto`,right:`auto`,bottom:`auto`,left:`auto`};function See(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Zh(n*i)/i||0,y:Zh(r*i)/i||0}}function hg(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=kh,b=`top`,x=window;if(l){var S=cg(n),C=`clientHeight`,w=`clientWidth`;if(S===Vh(n)&&(S=ag(n),rg(S).position!==`static`&&s===`absolute`&&(C=`scrollHeight`,w=`scrollWidth`)),S=S,i===`top`||(i===`left`||i===`right`)&&a===`end`){b=Dh;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=Oh;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&&xee),O=u===!0?See({x:p,y:h},Vh(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 Cee(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0||r,a=n.adaptive,o=a===void 0||a,s=n.roundOffsets,c=s===void 0||s,l={placement:Jh(t.placement),variation:mg(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,hg(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,hg(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 wee={name:`computeStyles`,enabled:!0,phase:`beforeWrite`,fn:Cee,data:{}},gg={passive:!0};function Tee(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0||i,o=r.resize,s=o===void 0||o,c=Vh(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach(function(e){e.addEventListener(`scroll`,n.update,gg)}),s&&c.addEventListener(`resize`,n.update,gg),function(){a&&l.forEach(function(e){e.removeEventListener(`scroll`,n.update,gg)}),s&&c.removeEventListener(`resize`,n.update,gg)}}var Eee={name:`eventListeners`,enabled:!0,phase:`write`,fn:function(){},effect:Tee,data:{}},Dee={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function _g(e){return e.replace(/left|right|bottom|top/g,function(e){return Dee[e]})}var Oee={start:`end`,end:`start`};function vg(e){return e.replace(/start|end/g,function(e){return Oee[e]})}function yg(e){var t=Vh(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function bg(e){return eg(ag(e)).left+yg(e).scrollLeft}function kee(e,t){var n=Vh(e),r=ag(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var l=$h();(l||!l&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+bg(e),y:c}}function Aee(e){var t=ag(e),n=yg(e),r=e.ownerDocument?.body,i=Yh(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=Yh(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),o=-n.scrollLeft+bg(e),s=-n.scrollTop;return rg(r||t).direction===`rtl`&&(o+=Yh(t.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:o,y:s}}function xg(e){var t=rg(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Sg(e){return[`html`,`body`,`#document`].indexOf(Bh(e))>=0?e.ownerDocument.body:Uh(e)&&xg(e)?e:Sg(og(e))}function Cg(e,t){t===void 0&&(t=[]);var n=Sg(e),r=n===e.ownerDocument?.body,i=Vh(n),a=r?[i].concat(i.visualViewport||[],xg(n)?n:[]):n,o=t.concat(a);return r?o:o.concat(Cg(og(a)))}function wg(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function jee(e,t){var n=eg(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 Tg(e,t,n){return t===`viewport`?wg(kee(e,n)):Hh(t)?jee(t,n):wg(Aee(ag(e)))}function Mee(e){var t=Cg(og(e)),n=[`absolute`,`fixed`].indexOf(rg(e).position)>=0&&Uh(e)?cg(e):e;return Hh(n)?t.filter(function(e){return Hh(e)&&ng(e,n)&&Bh(e)!==`body`}):[]}function Nee(e,t,n,r){var i=t===`clippingParents`?Mee(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(t,n){var i=Tg(e,n,r);return t.top=Yh(i.top,t.top),t.right=Xh(i.right,t.right),t.bottom=Xh(i.bottom,t.bottom),t.left=Yh(i.left,t.left),t},Tg(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 Eg(e){var t=e.reference,n=e.element,r=e.placement,i=r?Jh(r):null,a=r?mg(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 Dh:c={x:o,y:t.y+t.height};break;case Oh:c={x:t.x+t.width,y:s};break;case kh:c={x:t.x-n.width,y:s};break;default:c={x:t.x,y:t.y}}var l=i?lg(i):null;if(l!=null){var u=l===`y`?`height`:`width`;switch(a){case Mh: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 Dg(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?Nh:s,l=n.rootBoundary,u=l===void 0?Ph:l,d=n.elementContext,f=d===void 0?Fh:d,p=n.altBoundary,m=p!==void 0&&p,h=n.padding,g=h===void 0?0:h,_=fg(typeof g==`number`?pg(g,jh):g),v=f===`popper`?Ih:Fh,y=e.rects.popper,b=e.elements[m?v:f],x=Nee(Hh(b)?b:b.contextElement||ag(e.elements.popper),c,u,o),S=eg(e.elements.reference),C=Eg({reference:S,element:y,strategy:`absolute`,placement:i}),w=wg(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 Og(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?Rh:c,u=mg(r),d=u?s?Lh:Lh.filter(function(e){return mg(e)===u}):jh,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]=Dg(e,{placement:n,boundary:i,rootBoundary:a,padding:o})[Jh(n)],t},{});return Object.keys(p).sort(function(e,t){return p[e]-p[t]})}function kg(e){if(Jh(e)===`auto`)return[];var t=_g(e);return[vg(e),t,vg(t)]}function Ag(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||i,o=n.altAxis,s=o===void 0||o,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0||p,h=n.allowedAutoPlacements,g=t.options.placement,_=Jh(g)===g,v=c||(_||!m?[_g(g)]:kg(g)),y=[g].concat(v).reduce(function(e,n){return e.concat(Jh(n)===`auto`?Og(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=Jh(E),O=mg(E)===Mh,ee=[`top`,Dh].indexOf(D)>=0,te=ee?`width`:`height`,k=Dg(t,{placement:E,boundary:u,rootBoundary:d,altBoundary:f,padding:l}),A=ee?O?Oh:kh:O?Dh:`top`;b[te]>x[te]&&(A=_g(A));var j=_g(A),M=[];if(a&&M.push(k[D]<=0),s&&M.push(k[A]<=0,k[j]<=0),M.every(function(e){return e})){w=E,C=!1;break}S.set(E,M)}if(C)for(var ne=m?3:1,re=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`},ie=ne;ie>0&&re(ie)!==`break`;ie--);t.placement!==w&&(t.modifiersData[r]._skip=!0,t.placement=w,t.reset=!0)}}var jg={name:`flip`,enabled:!0,phase:`main`,fn:Ag,requiresIfExists:[`offset`],data:{_skip:!1}};function Mg(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 Ng(e){return[`top`,Oh,Dh,kh].some(function(t){return e[t]>=0})}function Pg(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=Dg(t,{elementContext:`reference`}),s=Dg(t,{altBoundary:!0}),c=Mg(o,r),l=Mg(s,i,a),u=Ng(c),d=Ng(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 Fg={name:`hide`,enabled:!0,phase:`main`,requiresIfExists:[`preventOverflow`],fn:Pg};function Ig(e,t,n){var r=Jh(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 Lg(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=Rh.reduce(function(e,n){return e[n]=Ig(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 Rg={name:`offset`,enabled:!0,phase:`main`,requires:[`popperOffsets`],fn:Lg};function zg(e){var t=e.state,n=e.name;t.modifiersData[n]=Eg({reference:t.rects.reference,element:t.rects.popper,strategy:`absolute`,placement:t.placement})}var Bg={name:`popperOffsets`,enabled:!0,phase:`read`,fn:zg,data:{}};function Vg(e){return e===`x`?`y`:`x`}function Hg(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0||i,o=n.altAxis,s=o!==void 0&&o,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0||f,m=n.tetherOffset,h=m===void 0?0:m,g=Dg(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),_=Jh(t.placement),v=mg(t.placement),y=!v,b=lg(_),x=Vg(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`:kh,te=b===`y`?Dh:Oh,k=b===`y`?`height`:`width`,A=S[b],j=A+g[ee],M=A-g[te],ne=p?-w[k]/2:0,re=v===`start`?C[k]:w[k],ie=v===`start`?-w[k]:-C[k],ae=t.elements.arrow,oe=p&&ae?tg(ae):{width:0,height:0},N=t.modifiersData[`arrow#persistent`]?t.modifiersData[`arrow#persistent`].padding:dg(),se=N[ee],ce=N[te],P=ug(0,C[k],oe[k]),le=y?C[k]/2-ne-P-se-E.mainAxis:re-P-se-E.mainAxis,ue=y?-C[k]/2+ne+P+ce+E.mainAxis:ie+P+ce+E.mainAxis,de=t.elements.arrow&&cg(t.elements.arrow),F=de?b===`y`?de.clientTop||0:de.clientLeft||0:0,fe=D?.[b]??0,pe=A+le-fe-F,me=A+ue-fe,he=ug(p?Xh(j,pe):j,A,p?Yh(M,me):M);S[b]=he,O[b]=he-A}if(s){var I=b===`x`?`top`:kh,ge=b===`x`?Dh:Oh,_e=S[x],ve=x===`y`?`height`:`width`,ye=_e+g[I],be=_e-g[ge],xe=[`top`,kh].indexOf(_)!==-1,Se=D?.[x]??0,Ce=xe?ye:_e-C[ve]-w[ve]-Se+E.altAxis,L=xe?_e+C[ve]+w[ve]-Se-E.altAxis:be,R=p&&xe?gee(Ce,_e,L):ug(p?Ce:ye,_e,p?L:be);S[x]=R,O[x]=R-_e}t.modifiersData[r]=O}}var Ug={name:`preventOverflow`,enabled:!0,phase:`main`,fn:Hg,requiresIfExists:[`offset`]};function Wg(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Gg(e){return e===Vh(e)||!Uh(e)?yg(e):Wg(e)}function Kg(e){var t=e.getBoundingClientRect(),n=Zh(t.width)/e.offsetWidth||1,r=Zh(t.height)/e.offsetHeight||1;return n!==1||r!==1}function qg(e,t,n){n===void 0&&(n=!1);var r=Uh(t),i=Uh(t)&&Kg(t),a=ag(t),o=eg(e,i,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((Bh(t)!==`body`||xg(a))&&(s=Gg(t)),Uh(t)?(c=eg(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=bg(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function Jg(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 Yg(e){var t=Jg(e);return zh.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}function Xg(e){var t;return function(){return t||=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})}),t}}function Zg(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 Qg={placement:`bottom`,modifiers:[],strategy:`absolute`};function $g(){return![...arguments].some(function(e){return!(e&&typeof e.getBoundingClientRect==`function`)})}function e_(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?Qg:i;return function(e,t,n){n===void 0&&(n=a);var i={placement:`bottom`,orderedModifiers:[],options:Object.assign({},Qg,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:Hh(e)?Cg(e):e.contextElement?Cg(e.contextElement):[],popper:Cg(t)};var s=Yg(Zg([].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($g(t,n)){i.rects={reference:qg(t,cg(n),i.options.strategy===`fixed`),popper:tg(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:Xg(function(){return new Promise(function(e){c.forceUpdate(),e(i)})}),destroy:function(){u(),s=!0}};if(!$g(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 t_=e_({defaultModifiers:[Eee,Bg,wee,qh,Rg,jg,Ug,bee,Fg]});function n_(e){let{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...a}=e,o=i?{}:Dp(n,r),{props:s,internalRef:c}=Ap({...a,externalSlotProps:o}),l=md(c,o?.ref,e.additionalProps?.ref);return Ep(t,{...s,ref:l},r)}function r_(e){return e?.props?.ref||null}var i_=l(Tr(),1);function a_(e){return typeof e==`function`?e():e}var o_=I.forwardRef(function(e,t){let{children:n,container:r,disablePortal:i=!1}=e,[a,o]=I.useState(null),s=md(I.isValidElement(n)?r_(n):null,t);if(hc(()=>{i||o(a_(r)||document.body)},[r,i]),hc(()=>{if(a&&!i)return $f(t,a),()=>{$f(t,null)}},[t,a,i]),i){if(I.isValidElement(n)){let e={ref:s};return I.cloneElement(n,e)}return n}return a&&i_.createPortal(n,a)});function s_(e){return Qs(`MuiPopper`,e)}$s(`MuiPopper`,[`root`]);function c_(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 l_(e){return typeof e==`function`?e():e}function u_(e){return e.nodeType!==void 0}var d_=e=>{let{classes:t}=e;return El({root:[`root`]},s_,t)},f_={},p_=I.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=I.useRef(null),_=md(g,t),v=I.useRef(null),y=md(v,u),b=I.useRef(y);hc(()=>{b.current=y},[y]),I.useImperativeHandle(u,()=>v.current,[]);let x=c_(c,i),[S,C]=I.useState(x),w=I.useMemo(()=>l_(n),[n]);I.useEffect(()=>{v.current&&v.current.forceUpdate()}),hc(()=>{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=t_(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 T={placement:S};p!==null&&(T.TransitionProps=p);let E=d_(e),D=f.root??`div`;return(0,H.jsx)(D,{...n_({elementType:D,externalSlotProps:d.root,externalForwardedProps:h,additionalProps:{role:`tooltip`,ref:_},ownerState:e,className:E.root}),children:typeof r==`function`?r(T):r})}),m_=G(I.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=f_,popperRef:f,style:p,transition:m=!1,slotProps:h={},slots:g={},..._}=e,[v,y]=I.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=l_(n);S=e&&u_(e)?gd(e).body:gd(null).body}let C=!l&&s&&(!m||v)?`none`:void 0,w=m?{in:l,onEnter:b,onExited:x}:void 0;return(0,H.jsx)(o_,{disablePortal:o,container:S,children:(0,H.jsx)(p_,{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`})({}),h_=I.forwardRef(function(e,t){let n=Gc(),{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}=Nd({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,H.jsx)(m_,{as:i,direction:n?`rtl`:`ltr`,slots:m,slotProps:h,..._,ref:t})});function g_(e){return Qs(`MuiListSubheader`,e)}$s(`MuiListSubheader`,[`root`,`colorPrimary`,`colorInherit`,`gutters`,`inset`,`sticky`]);var __=e=>{let{classes:t,color:n,disableGutters:r,inset:i,disableSticky:a}=e;return El({root:[`root`,n!=="default"&&`color${K(n)}`,!r&&`gutters`,i&&`inset`,!a&&`sticky`]},g_,t)},v_=G(`li`,{name:`MuiListSubheader`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${K(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(Md(({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}}]}))),y_=I.forwardRef(function(e,t){let n=Nd({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},d=__(u);return(0,H.jsx)(v_,{as:a,className:U(d.root,r),ref:t,ownerState:u,...l})}),b_=Yf((0,H.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 x_(e){return Qs(`MuiChip`,e)}var S_=$s(`MuiChip`,[`root`,`sizeSmall`,`sizeMedium`,`colorDefault`,`colorError`,`colorInfo`,`colorPrimary`,`colorSecondary`,`colorSuccess`,`colorWarning`,`disabled`,`clickable`,`deletable`,`outlined`,`filled`,`avatar`,`icon`,`label`,`deleteIcon`,`focusVisible`]),C_=e=>{let{classes:t,disabled:n,size:r,color:i,onDelete:a,clickable:o,variant:s}=e;return El({root:[`root`,s,n&&`disabled`,`size${K(r)}`,`color${K(i)}`,o&&`clickable`,a&&`deletable`],label:[`label`],avatar:[`avatar`],icon:[`icon`],deleteIcon:[`deleteIcon`]},x_,t)},w_=G(`div`,{name:`MuiChip`,slot:`Root`,shouldForwardProp:e=>Ad(e)&&e!==`focusableWhenDisabled`&&e!==`skipFocusWhenDisabled`,overridesResolver:(e,t)=>{let{ownerState:n}=e,{color:r,clickable:i,onDelete:a,size:o,variant:s}=n;return[{[`& .${S_.avatar}`]:t.avatar},{[`& .${S_.icon}`]:t.icon},{[`& .${S_.deleteIcon}`]:t.deleteIcon},t.root,t[`size${K(o)}`],t[`color${K(r)}`],i&&t.clickable,a&&t.deletable,t[s]]}})(Md(({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`,...ef(e,[`background-color`,`box-shadow`]),cursor:`unset`,outline:0,textDecoration:`none`,border:0,padding:0,verticalAlign:`middle`,boxSizing:`border-box`,[`&.${S_.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:`none`},[`& .${S_.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${S_.icon}`]:{marginLeft:5,marginRight:-6},[`& .${S_.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:{[`& .${S_.avatar}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark}}},{props:{color:`secondary`},style:{[`& .${S_.avatar}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark}}},{props:{size:`small`},style:{height:24,[`& .${S_.avatar}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${S_.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${S_.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(Tm([`contrastText`])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText,[`& .${S_.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:{[`& .${S_.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:e=>e.iconColor===e.color&&e.color!=="default",style:{[`& .${S_.icon}`]:{color:`inherit`}}},{props:{onDelete:!0},style:{[`&.${S_.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(Tm([`dark`])).map(([t])=>({props:{color:t,onDelete:!0},style:{[`&.${S_.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}`)},[`&.${S_.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(Tm([`dark`])).map(([t])=>({props:{color:t,clickable:!0},style:{[`&:hover, &.${S_.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]}`,[`&.${S_.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${S_.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${S_.avatar}`]:{marginLeft:4},[`& .${S_.icon}`]:{marginLeft:4},[`& .${S_.deleteIcon}`]:{marginRight:5}}},{props:{size:`small`,variant:`outlined`},style:{[`& .${S_.avatar}`]:{marginLeft:2},[`& .${S_.icon}`]:{marginLeft:2},[`& .${S_.deleteIcon}`]:{marginRight:3}}},...Object.entries(e.palette).filter(Tm()).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)}`,[`&.${S_.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)},[`&.${S_.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.focusOpacity)},[`& .${S_.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[t].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].main}}}}))]}})),T_=G(`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 E_(e){return e.key===`Backspace`||e.key===`Delete`}var D_=I.forwardRef(function(e,t){let n=Nd({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=Pd(I.useRef(null),t),E=e=>{e.stopPropagation(),p(e)},D=e=>{e.currentTarget===e.target&&E_(e)&&e.preventDefault(),m&&m(e)},O=e=>{e.currentTarget===e.target&&p&&E_(e)&&p(e),h&&h(e)},ee=a!==!1&&f?!0:a,te=ee||p?gm:s||`div`,k={...n,component:te,disabled:l,size:g,color:o,iconColor:I.isValidElement(u)&&u.props.color||o,onDelete:!!p,clickable:ee,variant:_},A=C_(k),j=te===gm?{component:s||`div`,internalNativeButton:!1,focusVisibleClassName:A.focusVisible,...p&&{disableRipple:!0},...C!==void 0&&{nativeButton:C}}:{},M=null;p&&(M=c&&I.isValidElement(c)?I.cloneElement(c,{className:U(c.props.className,A.deleteIcon),onClick:E}):(0,H.jsx)(b_,{className:A.deleteIcon,onClick:E}));let ne=null;r&&I.isValidElement(r)&&(ne=I.cloneElement(r,{className:U(A.avatar,r.props.className)}));let re=null;u&&I.isValidElement(u)&&(re=I.cloneElement(u,{className:U(A.icon,u.props.className)}));let ie={slots:b,slotProps:x},[ae,oe]=jp(`root`,{elementType:w_,externalForwardedProps:{...ie,...w},ownerState:k,shouldForwardComponentProp:!0,ref:T,className:U(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)}})}),[N,se]=jp(`label`,{elementType:T_,externalForwardedProps:ie,ownerState:k,className:A.label});return(0,H.jsxs)(ae,{as:te,...oe,children:[ne||re,(0,H.jsx)(N,{...se,children:d}),M]})}),O_=Yf((0,H.jsx)(`path`,{d:`M7 10l5 5 5-5z`}),`ArrowDropDown`),k_,A_,j_=e=>{let{classes:t,disablePortal:n,expanded:r,focused:i,fullWidth:a,hasClearIcon:o,hasPopupIcon:s,inputFocused:c,popupOpen:l,size:u}=e;return El({root:[`root`,r&&`expanded`,i&&`focused`,a&&`fullWidth`,o&&`hasClearIcon`,s&&`hasPopupIcon`],inputRoot:[`inputRoot`],input:[`input`,c&&`inputFocused`],tag:[`tag`,`tagSize${K(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`]},cd,t)},M_=G(`div`,{name:`MuiAutocomplete`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e,{fullWidth:r,hasClearIcon:i,hasPopupIcon:a,inputFocused:o,size:s}=n;return[{[`& .${ld.tag}`]:t.tag},{[`& .${ld.tag}`]:t[`tagSize${K(s)}`]},{[`& .${ld.inputRoot}`]:t.inputRoot},{[`& .${ld.input}`]:t.input},{[`& .${ld.input}`]:o&&t.inputFocused},t.root,r&&t.fullWidth,a&&t.hasPopupIcon,i&&t.hasClearIcon]}})({[`&.${ld.focused} .${ld.clearIndicator}`]:{visibility:`visible`},"@media (pointer: fine)":{[`&:hover .${ld.clearIndicator}`]:{visibility:`visible`}},[`& .${ld.tag}`]:{margin:3,maxWidth:`calc(100% - 6px)`},[`& .${ld.inputRoot}`]:{[`.${ld.hasPopupIcon}&, .${ld.hasClearIcon}&`]:{paddingRight:30},[`.${ld.hasPopupIcon}.${ld.hasClearIcon}&`]:{paddingRight:56},[`& .${ld.input}`]:{width:0,minWidth:30}},[`& .${xf.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:`4px 4px 4px 0px`}},[`& .${xf.root}.${Ud.sizeSmall}`]:{[`& .${xf.input}`]:{padding:`2px 4px 3px 0`}},[`& .${kf.root}`]:{padding:9,[`.${ld.hasPopupIcon}&, .${ld.hasClearIcon}&`]:{paddingRight:39},[`.${ld.hasPopupIcon}.${ld.hasClearIcon}&`]:{paddingRight:65},[`& .${ld.input}`]:{padding:`7.5px 4px 7.5px 5px`},[`& .${ld.endAdornment}`]:{right:9}},[`& .${kf.root}.${Ud.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${ld.input}`]:{padding:`2.5px 4px 2.5px 8px`}},[`& .${pf.root}`]:{paddingTop:19,paddingLeft:8,[`.${ld.hasPopupIcon}&, .${ld.hasClearIcon}&`]:{paddingRight:39},[`.${ld.hasPopupIcon}.${ld.hasClearIcon}&`]:{paddingRight:65},[`& .${pf.input}`]:{padding:`7px 4px`},[`& .${ld.endAdornment}`]:{right:9}},[`& .${pf.root}.${Ud.sizeSmall}`]:{paddingBottom:1,[`& .${pf.input}`]:{padding:`2.5px 4px`}},[`& .${Ud.hiddenLabel}`]:{paddingTop:8},[`& .${pf.root}.${Ud.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${ld.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${pf.root}.${Ud.hiddenLabel}.${Ud.sizeSmall}`]:{[`& .${ld.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${ld.input}`]:{flexGrow:1,textOverflow:`ellipsis`,opacity:0},variants:[{props:{fullWidth:!0},style:{width:`100%`}},{props:{size:`small`},style:{[`& .${ld.tag}`]:{margin:2,maxWidth:`calc(100% - 4px)`}}},{props:{inputFocused:!0},style:{[`& .${ld.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${ld.inputRoot}`]:{flexWrap:`wrap`}}}]}),N_=G(`div`,{name:`MuiAutocomplete`,slot:`EndAdornment`})({position:`absolute`,right:0,top:`50%`,transform:`translate(0, -50%)`}),P_=G(Gm,{name:`MuiAutocomplete`,slot:`ClearIndicator`})({marginRight:-2,padding:4,visibility:`hidden`}),F_=G(Gm,{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)`}}]}),I_=G(h_,{name:`MuiAutocomplete`,slot:`Popper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${ld.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(Md(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:`absolute`}}]}))),L_=G(Hp,{name:`MuiAutocomplete`,slot:`Paper`})(Md(({theme:e})=>({...e.typography.body1,overflow:`auto`}))),R_=G(`div`,{name:`MuiAutocomplete`,slot:`Loading`})(Md(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:`14px 16px`}))),z_=G(`div`,{name:`MuiAutocomplete`,slot:`NoOptions`})(Md(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:`14px 16px`}))),B_=G(`ul`,{name:`MuiAutocomplete`,slot:`Listbox`})(Md(({theme:e})=>({listStyle:`none`,margin:0,padding:`8px 0`,maxHeight:`40vh`,overflow:`auto`,isolation:`isolate`,position:`relative`,[`& .${ld.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`},[`&.${ld.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`},[`&.${ld.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),[`&.${ld.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}},[`&.${ld.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}}}))),V_=G(y_,{name:`MuiAutocomplete`,slot:`GroupLabel`})(Md(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),H_=G(`ul`,{name:`MuiAutocomplete`,slot:`GroupUl`})({padding:0,[`& .${ld.option}`]:{paddingLeft:24}}),U_=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiAutocomplete`}),{autoComplete:r=!1,autoHighlight:i=!1,autoSelect:a=!1,blurOnSelect:o=!1,className:s,clearIcon:c=k_||=(0,H.jsx)(Xm,{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:M,limitTags:ne=-1,loading:re=!1,loadingText:ie=`Loading…`,multiple:ae=!1,noOptionsText:oe=`No options`,onChange:N,onClose:se,onHighlightChange:ce,onInputChange:P,onOpen:le,open:ue,openOnFocus:de=!1,openText:F=`Open`,options:fe,popupIcon:pe=A_||=(0,H.jsx)(O_,{}),readOnly:me=!1,renderGroup:he,renderInput:ge,renderOption:_e,renderValue:ve,resetHighlightOnMouseLeave:ye=!1,selectOnFocus:be=!n.freeSolo,size:xe=`medium`,slots:Se={},slotProps:Ce={},value:L,...R}=n,{getRootProps:z,getInputProps:we,getInputLabelProps:Te,getPopupIndicatorProps:Ee,getClearProps:De,getItemProps:Oe,getListboxProps:ke,getOptionProps:Ae,value:je,dirty:Me,expanded:B,id:Ne,popupOpen:Pe,focused:Fe,focusedItem:Ie,anchorEl:Le,setAnchorEl:Re,inputValue:ze,groupedOptions:Be}=Eh({...n,componentName:`Autocomplete`}),Ve=mh();I.useEffect(()=>{if(!Pe||!Le||typeof ResizeObserver>`u`)return;let e=Le.clientWidth,t=new ResizeObserver(()=>{let t=Le.clientWidth;e!==t&&(e=t,Ve())});return t.observe(Le),()=>{t.disconnect()}},[Pe,Le,Ve]);let He=I.useRef([]),Ue=I.useRef(!1),We=Pe?Be:He.current;hc(()=>{Pe&&!Ue.current&&(He.current=[]),Ue.current=Pe,Pe&&Be.length>0&&(He.current=Be)},[Pe,Be]);let Ge=!m&&!g&&Me&&!me,Ke=(!C||S===!0)&&S!==!1,{onMouseDown:qe}=we(),Je=O||(e=>e.label??e),Ye={...n,disablePortal:y,expanded:B,focused:Fe,fullWidth:w,getOptionLabel:Je,hasClearIcon:Ge,hasPopupIcon:Ke,inputFocused:Ie===-1,popupOpen:Pe,size:xe},Xe=j_(Ye),Ze={slots:Se,slotProps:Ce},[Qe,$e]=jp(`root`,{ref:t,className:[Xe.root,s],elementType:M_,externalForwardedProps:{...Ze,...R},getSlotProps:z,ownerState:Ye}),[et,tt]=jp(`listbox`,{elementType:B_,externalForwardedProps:Ze,ownerState:Ye,className:Xe.listbox,getSlotProps:ke}),[nt,rt]=jp(`paper`,{elementType:Hp,externalForwardedProps:Ze,ownerState:Ye,className:Xe.paper}),[it,at]=jp(`popper`,{elementType:h_,externalForwardedProps:Ze,ownerState:Ye,className:Xe.popper,additionalProps:{disablePortal:y,style:{width:Le?Le.clientWidth:null,pointerEvents:Pe?void 0:`none`},role:`presentation`,anchorEl:Le,open:Pe}}),ot=We.length>0||re||!C||at.keepMounted===!0,[st,V]=jp(`clearIndicator`,{elementType:P_,externalForwardedProps:Ze,ownerState:Ye,className:Xe.clearIndicator,shouldForwardComponentProp:!0,additionalProps:{...De(),"aria-label":d,title:d}}),[ct,lt]=jp(`popupIndicator`,{elementType:F_,externalForwardedProps:Ze,ownerState:Ye,className:Xe.popupIndicator,shouldForwardComponentProp:!0,additionalProps:{...Ee(),disabled:g,"aria-label":Pe?f:F,title:Pe?f:F}}),ut,dt=e=>({className:Xe.tag,disabled:g,...Oe(e)});if(ae?je.length>0&&(ut=ve?ve(je,dt,Ye):je.map((e,t)=>{let{key:n,...r}=dt({index:t});return(0,H.jsx)(D_,{label:Je(e),size:xe,...r,...Ze.slotProps.chip},n)})):ve&&je!=null&&(ut=ve(je,dt,Ye)),ne>-1&&Array.isArray(ut)){let e=ut.length-ne;!Fe&&e>0&&(ut=ut.splice(0,ne),ut.push((0,H.jsx)(`span`,{className:Xe.tag,children:T(e)},ut.length)))}let ft=he||(e=>(0,H.jsxs)(`li`,{children:[(0,H.jsx)(V_,{className:Xe.groupLabel,ownerState:Ye,component:`div`,children:e.group}),(0,H.jsx)(H_,{className:Xe.groupUl,ownerState:Ye,children:e.children})]},e.key)),pt=_e||((e,t)=>{let{key:n,...r}=e;return(0,H.jsx)(`li`,{...r,children:Je(t)},n)}),mt=(e,t)=>{let n=Ae({option:e,index:t});return pt({...n,className:Xe.option},e,{selected:n[`aria-selected`],index:t,inputValue:ze},Ye)};return(0,H.jsxs)(I.Fragment,{children:[(0,H.jsx)(Qe,{...$e,children:ge({id:Ne,disabled:g,fullWidth:n.fullWidth??!0,size:xe===`small`?`small`:void 0,slotProps:{inputLabel:Te(),input:{ref:Re,className:Xe.inputRoot,startAdornment:ut,onMouseDown:e=>{e.target===e.currentTarget&&qe(e)},...(Ge||Ke)&&{endAdornment:(0,H.jsxs)(N_,{className:Xe.endAdornment,ownerState:Ye,children:[Ge?(0,H.jsx)(st,{...V,children:c}):null,Ke?(0,H.jsx)(ct,{...lt,children:pe}):null]})}},htmlInput:{className:Xe.input,disabled:g,readOnly:me,...we()}}})}),Le&&ot?(0,H.jsx)(I_,{as:it,...at,children:(0,H.jsxs)(L_,{as:nt,...rt,children:[re&&We.length===0?(0,H.jsx)(R_,{className:Xe.loading,ownerState:Ye,children:ie}):null,We.length===0&&!C&&!re?(0,H.jsx)(z_,{className:Xe.noOptions,ownerState:Ye,role:`presentation`,onMouseDown:e=>{e.preventDefault()},children:oe}):null,We.length>0?(0,H.jsx)(et,{...tt,children:We.map((e,t)=>te?ft({key:e.key,group:e.group,children:e.options.map((t,n)=>mt(t,e.index+n))}):mt(e,t))}):null]})}):null]})}),W_=Yf((0,H.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 G_(e){return Qs(`MuiAvatar`,e)}$s(`MuiAvatar`,[`root`,`colorDefault`,`circular`,`rounded`,`square`,`img`,`fallback`]);var K_=e=>{let{classes:t,variant:n,colorDefault:r}=e;return El({root:[`root`,n,r&&`colorDefault`],img:[`img`],fallback:[`fallback`]},G_,t)},q_=G(`div`,{name:`MuiAvatar`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(Md(({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]})}}}]}))),J_=G(`img`,{name:`MuiAvatar`,slot:`Img`})({width:`100%`,height:`100%`,textAlign:`center`,objectFit:`cover`,color:`transparent`,textIndent:1e4}),Y_=G(W_,{name:`MuiAvatar`,slot:`Fallback`})({width:`75%`,height:`75%`});function X_(e,t,n,r){let[i,a]=I.useState(!1);return I.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 Z_=I.forwardRef(function(e,t){let n=Nd({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=X_(u,d,g,_),y=u||d,b=y&&v!==`error`;h.colorDefault=!b,delete h.ownerState;let x=K_(h),S={slots:s,slotProps:c},[C,w]=jp(`root`,{ref:t,className:U(x.root,a),elementType:q_,externalForwardedProps:{...S,component:o,...p},ownerState:h}),[T,E]=jp(`img`,{className:x.img,elementType:J_,externalForwardedProps:S,additionalProps:{alt:r,src:u,srcSet:d,sizes:l},ownerState:h}),[D,O]=jp(`fallback`,{className:x.fallback,elementType:Y_,externalForwardedProps:S,shouldForwardComponentProp:!0,ownerState:h});return m=b?(0,H.jsx)(T,{...E}):i||i===0?i:y&&r?r[0]:(0,H.jsx)(D,{...O}),(0,H.jsx)(C,{...w,children:m})}),Q_={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}},$_={opacity:0,visibility:`hidden`},ev=I.forwardRef(function(e,t){let n=Dd(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:o,disablePrefersReducedMotion:s=!1,easing:c,in:l,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:m,onExiting:h,style:g,timeout:_=r,...v}=e,y=Tp(n.motion.reducedMotion,s),b=I.useRef(null),x=Pd(b,r_(o),t),S=Xd(b,f),C=Xd(b,(e,t)=>{y.shouldReduceMotion||Kd(e);let r=Qd({style:g,timeout:_,easing:c},{mode:`enter`}),i=y.getTransitionTiming({duration:r.duration,delay:r.delay});e.style.transition=n.transitions.create(`opacity`,{duration:i.duration,easing:r.easing,delay:i.delay}),u&&u(e,t)}),w=Xd(b,d),T=Xd(b,h);return(0,H.jsx)(pp,{appear:a,in:l,nodeRef:b,onEnter:C,onEntered:w,onEntering:S,onExit:Xd(b,e=>{let t=Qd({style:g,timeout:_,easing:c},{mode:`exit`}),r=y.getTransitionTiming({duration:t.duration,delay:t.delay});e.style.transition=n.transitions.create(`opacity`,{duration:r.duration,easing:t.easing,delay:r.delay}),p&&p(e)}),onExited:Xd(b,e=>{e.style.transition=``,m&&m(e)}),onExiting:T,addEndListener:i?e=>{i(b.current,e)}:void 0,reduceMotion:y.shouldReduceMotion,timeout:_,...v,children:(e,{ownerState:t,...n})=>{let r=Zd(e,l,Q_,$_,g,o.props.style);return I.cloneElement(o,{style:r,ref:x,...n})}})});function tv(e){return Qs(`MuiBackdrop`,e)}$s(`MuiBackdrop`,[`root`,`invisible`]);var nv=e=>{let{classes:t,invisible:n}=e;return El({root:[`root`,n&&`invisible`]},tv,t)},rv=G(`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`}}]}),iv=I.forwardRef(function(e,t){let n=Nd({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=nv(f),m={component:a,slots:l,slotProps:c},[h,g]=jp(`root`,{elementType:rv,externalForwardedProps:m,className:U(p.root,i),ownerState:f}),[_,v]=jp(`transition`,{elementType:ev,externalForwardedProps:m,ownerState:f});return(0,H.jsx)(_,{in:s,timeout:u,...d,...v,children:(0,H.jsx)(h,{...g,ref:t,children:r})})});function av(e){let{badgeContent:t,invisible:n=!1,max:r=99,showZero:i=!1}=e,a=gh({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 ov(e){return Qs(`MuiBadge`,e)}var sv=$s(`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`]),cv=10,lv=4,uv=e=>{let{color:t,anchorOrigin:n,invisible:r,overlap:i,variant:a,classes:o={}}=e;return El({root:[`root`],badge:[`badge`,a,r&&`invisible`,`anchorOrigin${K(n.vertical)}${K(n.horizontal)}`,`anchorOrigin${K(n.vertical)}${K(n.horizontal)}${K(i)}`,`overlap${K(i)}`,t!=="default"&&`color${K(t)}`]},ov,o)},dv=G(`span`,{name:`MuiBadge`,slot:`Root`})({position:`relative`,display:`inline-flex`,verticalAlign:`middle`,flexShrink:0}),fv=G(`span`,{name:`MuiBadge`,slot:`Badge`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${K(n.anchorOrigin.vertical)}${K(n.anchorOrigin.horizontal)}${K(n.overlap)}`],n.color!=="default"&&t[`color${K(n.color)}`],n.invisible&&t.invisible]}})(Md(({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:cv*2,lineHeight:1,padding:`0 6px`,height:cv*2,borderRadius:cv,zIndex:1,"@media (forced-colors: active)":{border:`1px solid ButtonBorder`},...ef(e,`transform`,{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.entries(e.palette).filter(Tm([`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:lv,height:lv*2,minWidth:lv*2,padding:0}},{props:{invisible:!0},style:{...ef(e,`transform`,{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}},{style:{inset:`var(--Badge-inset)`,transform:`scale(1) translate(var(--Badge-translate))`,transformOrigin:`var(--Badge-origin)`,[`&.${sv.invisible}`]:{transform:`scale(0) translate(var(--Badge-translate))`}}}]})));function pv(e){return{vertical:e?.vertical??`top`,horizontal:e?.horizontal??`right`}}var mv=I.forwardRef(function(e,t){let n=Nd({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}=av({max:d,invisible:u,badgeContent:f,showZero:h}),S=gh({anchorOrigin:pv(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=pv(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=uv(te),A={slots:p,slotProps:m},[j,M]=jp(`root`,{elementType:dv,externalForwardedProps:{...A,..._},ownerState:te,className:U(k.root,i),ref:t,additionalProps:{as:o}}),{vertical:ne,horizontal:re}=O,ie=T===`circular`?`14%`:`0`,ae=ne===`top`?ie:`auto`,oe=ne===`bottom`?ie:`auto`,N=re===`right`?ie:`auto`,se=re===`left`?ie:`auto`,[ce,P]=jp(`badge`,{elementType:fv,externalForwardedProps:A,ownerState:te,className:k.badge,additionalProps:{"aria-hidden":!0,style:{"--Badge-translate":`${re===`right`?`50%`:`-50%`}, ${ne===`top`?`-50%`:`50%`}`,"--Badge-inset":`${ae} ${N} ${oe} ${se}`,"--Badge-origin":`${re===`right`?`100%`:`0%`} ${ne===`top`?`0%`:`100%`}`}}});return(0,H.jsxs)(j,{...M,children:[s,(0,H.jsx)(ce,{...P,children:ee})]})}),hv=$s(`MuiBox`,[`root`]),J=Xs({themeId:Rr,defaultTheme:ad(),defaultClassName:hv.root,generateClassName:Js.generate});function gv(e){return Qs(`MuiButton`,e)}var _v=$s(`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(`.`)),vv=I.createContext({}),yv=I.createContext(void 0),bv=e=>{let{color:t,disableElevation:n,fullWidth:r,size:i,variant:a,loading:o,loadingPosition:s,classes:c}=e,l=El({root:[`root`,o&&`loading`,a,`size${K(i)}`,`color${K(t)}`,n&&`disableElevation`,r&&`fullWidth`,o&&`loadingPosition${K(s)}`],startIcon:[`icon`,`startIcon`],endIcon:[`icon`,`endIcon`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},gv,c);return{...c,...l}},xv=[{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}}}],Sv=G(gm,{shouldForwardProp:e=>Ad(e)||e===`classes`,name:`MuiButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`size${K(n.size)}`],n.color===`inherit`&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(Md(({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,...ef(e,[`background-color`,`box-shadow`,`border-color`,`color`],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:`none`},[`&.${_v.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:`contained`},style:{color:`var(--variant-containedColor)`,backgroundColor:`var(--variant-containedBg)`,boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${_v.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${_v.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)`,[`&.${_v.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(Tm()).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`},[`&.${_v.focusVisible}`]:{boxShadow:`none`},"&:active":{boxShadow:`none`},[`&.${_v.disabled}`]:{boxShadow:`none`}}},{props:{fullWidth:!0},style:{width:`100%`}},{props:{loadingPosition:`center`},style:{...ef(e,[`background-color`,`box-shadow`,`border-color`],{duration:e.transitions.duration.short}),[`&.${_v.loading}`]:{color:`transparent`}}}]}})),Cv=G(`span`,{name:`MuiButton`,slot:`StartIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart]}})(({theme:e})=>({display:`inherit`,alignItems:`center`,marginRight:8,marginLeft:-4,"&::before":{content:`"\\200b"`,width:0,overflow:`hidden`},variants:[{props:{size:`small`},style:{marginLeft:-2}},{props:{loadingPosition:`start`,loading:!0},style:{...ef(e,[`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`start`,loading:!0,fullWidth:!0},style:{marginRight:-8}},...xv]})),wv=G(`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:{...ef(e,[`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`end`,loading:!0,fullWidth:!0},style:{marginLeft:-8}},...xv]})),Tv=G(`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}}]})),Ev=G(`span`,{name:`MuiButton`,slot:`LoadingIconPlaceholder`})({display:`inline-block`,width:`1em`,height:`1em`}),Y=I.forwardRef(function(e,t){let n=I.useContext(vv),r=I.useContext(yv),i=Nd({props:fc(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=ep(h),T=_??(0,H.jsx)(zm,{"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=bv(E),O=(b||g&&v===`start`)&&(0,H.jsx)(Cv,{className:D.startIcon,ownerState:E,children:b||(0,H.jsx)(Ev,{className:D.loadingIconPlaceholder,ownerState:E})}),ee=(f||g&&v===`end`)&&(0,H.jsx)(wv,{className:D.endIcon,ownerState:E,children:f||(0,H.jsx)(Ev,{className:D.loadingIconPlaceholder,ownerState:E})}),te=r||``,k=typeof g==`boolean`?(0,H.jsx)(`span`,{className:D.loadingWrapper,style:{display:`contents`},children:g&&(0,H.jsx)(Tv,{className:D.loadingIndicator,ownerState:E,children:T})}):null,{root:A,...j}=D;return(0,H.jsxs)(Sv,{ownerState:E,className:U(n.className,D.root,c,te),component:s,disabled:l||g,focusRipple:!d,focusVisibleClassName:U(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 Dv(e){return Qs(`MuiCard`,e)}$s(`MuiCard`,[`root`]);var Ov=e=>{let{classes:t}=e;return El({root:[`root`]},Dv,t)},kv=G(Hp,{name:`MuiCard`,slot:`Root`})({overflow:`hidden`}),Av=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiCard`}),{className:r,raised:i=!1,...a}=n,o={...n,raised:i},s=Ov(o);return(0,H.jsx)(kv,{className:U(s.root,r),elevation:i?8:void 0,ref:t,ownerState:o,...a})});function jv(e){return Qs(`MuiCardContent`,e)}$s(`MuiCardContent`,[`root`]);var Mv=e=>{let{classes:t}=e;return El({root:[`root`]},jv,t)},Nv=G(`div`,{name:`MuiCardContent`,slot:`Root`})({padding:16,"&:last-child":{paddingBottom:24}}),Pv=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiCardContent`}),{className:r,component:i=`div`,...a}=n,o={...n,component:i},s=Mv(o);return(0,H.jsx)(Nv,{as:i,className:U(s.root,r),ownerState:o,ref:t,...a})});function Fv(e){return Qs(`PrivateSwitchBase`,e)}$s(`PrivateSwitchBase`,[`root`,`checked`,`disabled`,`input`,`edgeStart`,`edgeEnd`]);var Iv=e=>{let{classes:t,checked:n,disabled:r,edge:i}=e;return El({root:[`root`,n&&`checked`,r&&`disabled`,i&&`edge${K(i)}`],input:[`input`]},Fv,t)},Lv=G(gm,{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}}]}),Rv=G(`input`,{name:`MuiSwitchBase`,shouldForwardProp:Ad})({cursor:`inherit`,position:`absolute`,opacity:0,width:`100%`,height:`100%`,top:0,left:0,margin:0,padding:0,zIndex:1}),zv=I.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]=np({controlled:r,default:!!a,name:`SwitchBase`,state:`checked`}),D=wd(),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},M=Iv(j),ne={slots:b,slotProps:x},[re,ie]=jp(`root`,{ref:t,elementType:Lv,className:M.root,shouldForwardComponentProp:!0,externalForwardedProps:{...ne,component:`span`,...w},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),O(t)},onBlur:t=>{e.onBlur?.(t),ee(t)}}),ownerState:j,additionalProps:{centerRipple:!0,focusRipple:!s,role:void 0,tabIndex:null}}),[ae,oe]=jp(`input`,{elementType:Rv,className:M.input,externalForwardedProps:ne,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,H.jsxs)(re,{...ie,children:[(0,H.jsx)(ae,{...oe}),T?i:l]})}),Bv=Yf((0,H.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`),Vv=Yf((0,H.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`),Hv=Yf((0,H.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`),Uv=e=>{let{classes:t,indeterminate:n,color:r,size:i}=e,a=El({root:[`root`,n&&`indeterminate`,`color${K(r)}`,`size${K(i)}`]},ud,t);return{...t,...a}},Wv=G(zv,{shouldForwardProp:e=>Ad(e)||e===`classes`,name:`MuiCheckbox`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${K(n.size)}`],n.color!=="default"&&t[`color${K(n.color)}`]]}})(Md(({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(Tm()).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(Tm()).map(([t])=>({props:{color:t},style:{[`&.${dd.checked}, &.${dd.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${dd.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:`transparent`}}}}]}))),Gv=(0,H.jsx)(Vv,{}),Kv=(0,H.jsx)(Bv,{}),qv=(0,H.jsx)(Hv,{}),Jv=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiCheckbox`}),{checkedIcon:r=Gv,color:i=`primary`,icon:a=Kv,indeterminate:o=!1,indeterminateIcon:s=qv,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},_=Uv(g),v=f.input,[y,b]=jp(`root`,{ref:t,elementType:Wv,className:U(_.root,u),shouldForwardComponentProp:!0,externalForwardedProps:{slots:d,slotProps:f,...p},ownerState:g,additionalProps:{type:`checkbox`,icon:I.cloneElement(m,{fontSize:m.props.fontSize??c}),checkedIcon:I.cloneElement(h,{fontSize:h.props.fontSize??c}),disableRipple:l,slots:d,slotProps:{input:ap(typeof v==`function`?v(g):v,{"data-indeterminate":o,"aria-checked":o?`mixed`:void 0})}}});return(0,H.jsx)(y,{...b,classes:_})}),Yv=typeof jd({})==`function`,Xv=(e,t)=>({WebkitFontSmoothing:`antialiased`,MozOsxFontSmoothing:`grayscale`,boxSizing:`border-box`,WebkitTextSizeAdjust:`100%`,...t&&!e.vars&&{colorScheme:e.palette.mode}}),Zv=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}}),Qv=(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:Xv(e,t),"*, *::before, *::after":{boxSizing:`inherit`},"strong, b":{fontWeight:e.typography.fontWeightBold},body:{margin:0,...Zv(e),"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}},...n},i=e.components?.MuiCssBaseline?.styleOverrides;return i&&(r=[r,i]),r},$v=`mui-ecs`,ey=e=>{let t=Qv(e,!1),n=Array.isArray(t)?t[0]:t;return!e.vars&&n&&(n.html[`:root:has(${$v})`]={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(.${$v}))`]:{colorScheme:r.palette?.mode}}:n[i.replace(/\s*&/,``)]={[`&:not(:has(.${$v}))`]:{colorScheme:r.palette?.mode}}}),t},ty=jd(Yv?({theme:e,enableColorScheme:t})=>Qv(e,t):({theme:e})=>ey(e));function ny(e){let{children:t,enableColorScheme:n=!1}=Nd({props:e,name:`MuiCssBaseline`});return(0,H.jsxs)(I.Fragment,{children:[Yv&&(0,H.jsx)(ty,{enableColorScheme:n}),!Yv&&!n&&(0,H.jsx)(`span`,{className:$v,style:{display:`none`}}),t]})}function ry(e=window){let t=e.document.documentElement.clientWidth;return e.innerWidth-t}function iy(e){let t=gd(e);return t.body===e?_d(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function ay(e,t){t?e.setAttribute(`aria-hidden`,`true`):e.removeAttribute(`aria-hidden`)}function oy(e){return parseFloat(_d(e).getComputedStyle(e).paddingRight)||0}function sy(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 cy(e,t,n,r,i){let a=[t,n,...r];[].forEach.call(e.children,e=>{let t=!a.includes(e),n=!sy(e);t&&n&&ay(e,i)})}function ly(e,t){let n=-1;return e.some((e,r)=>t(e)?(n=r,!0):!1),n}function uy(e,t){let n=[],r=e.container;if(!t.disableScrollLock){if(iy(r)){let e=ry(_d(r));n.push({value:r.style.paddingRight,property:`padding-right`,el:r}),r.style.paddingRight=`${oy(r)+e}px`;let t=gd(r).querySelectorAll(`.mui-fixed`);[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:`padding-right`,el:t}),t.style.paddingRight=`${oy(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=gd(r).body;else{let t=r.parentElement,n=_d(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 dy(e){let t=[];return[].forEach.call(e.children,e=>{e.getAttribute(`aria-hidden`)===`true`&&t.push(e)}),t}var fy=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&&ay(e.modalRef,!1);let r=dy(t);cy(t,e.mount,e.modalRef,r,!0);let i=ly(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=ly(this.containers,t=>t.modals.includes(e)),r=this.containers[n];r.restore||=uy(r,t)}remove(e,t=!0){let n=this.modals.indexOf(e);if(n===-1)return n;let r=ly(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&&ay(e.modalRef,t),cy(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&&ay(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}},py=hh,my=`data-mui-focusable`;function hy(e){return e?e.hasAttribute(`data-mui-focusable`)?e:e.querySelector(`[${my}]`):null}var gy=[`input`,`select`,`textarea`,`a[href]`,`button`,`[tabindex]`,`audio[controls]`,`video[controls]`,`[contenteditable]:not([contenteditable="false"])`].join(`,`);function _y(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 vy(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 yy(e){return!(e.disabled||e.tagName===`INPUT`&&e.type===`hidden`||vy(e))}function by(e){let t=[],n=[];return Array.from(e.querySelectorAll(gy)).forEach((e,r)=>{let i=_y(e);i===-1||!yy(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 xy(){return!0}function Sy(e){let{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:a=by,isEnabled:o=xy,open:s}=e,c=I.useRef(!1),l=I.useRef(null),u=I.useRef(null),d=I.useRef(null),f=I.useRef(null),p=I.useRef(!1),m=I.useRef(null),h=md(r_(t),m),g=I.useRef(null);I.useEffect(()=>{!s||!m.current||(p.current=!n)},[n,s]),I.useEffect(()=>{if(c.current=!1,!s||!m.current)return;let e=Rd(gd(m.current)),t=hy(m.current)??m.current;return py(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]),I.useEffect(()=>{if(!s||!m.current)return;let e=gd(m.current),t=t=>{if(g.current=t,r||!o()||t.key!==`Tab`)return;let n=m.current,i=Rd(e);if(n===null)return;let s=hy(n);if(i===n||i===s){let e=a(n);if(e.length===0)return;t.preventDefault(),t.shiftKey?e[e.length-1].focus():e[0].focus();return}if(py(n,i)){let e=a(n),r=e.indexOf(i);if(r===-1||!e.some(e=>_y(e)>0))return;t.preventDefault();let o=0;o=t.shiftKey?r<=0?e.length-1:r-1:r===e.length-1?0:r+1,e[o].focus()}},n=()=>{let t=m.current;if(t===null)return;let n=Rd(e);if(!e.hasFocus()||!o()||c.current){c.current=!1;return}if(py(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=Rd(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,H.jsxs)(I.Fragment,{children:[(0,H.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:l,"data-testid":`sentinelStart`}),I.cloneElement(t,{ref:h,onFocus:_}),(0,H.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:u,"data-testid":`sentinelEnd`})]})}function Cy(e){return typeof e==`function`?e():e}function wy(e){return e?e.props.hasOwnProperty(`in`):!1}var Ty=()=>{},Ey=new fy;function Pee(e){let{container:t,disableScrollLock:n=!1,closeAfterTransition:r=!1,onTransitionEnter:i,onTransitionExited:a,children:o,onClose:s,open:c,rootRef:l}=e,u=I.useRef({}),d=I.useRef(null),f=I.useRef(null),p=md(f,l),[m,h]=I.useState(!c),g=wy(o),_=!0;(e[`aria-hidden`]===`false`||e[`aria-hidden`]===!1)&&(_=!1);let v=()=>gd(d.current),y=()=>(u.current.modalRef=f.current,u.current.mount=d.current,u.current),b=()=>{Ey.mount(y(),{disableScrollLock:n}),f.current&&(f.current.scrollTop=0)},x=hd(()=>{let e=Cy(t)||v().body;Ey.add(y(),e),f.current&&b()}),S=()=>Ey.isTopModal(y()),C=hd(e=>{d.current=e,e&&(c&&S()?b():f.current&&ay(f.current,_))}),w=I.useCallback(()=>{Ey.remove(y(),_)},[_]);I.useEffect(()=>()=>{w()},[w]),I.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=Op(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:Uf(()=>{h(!1),i&&i()},o?.props.onEnter??Ty),onExited:Uf(()=>{h(!0),a&&a(),r&&w()},o?.props.onExited??Ty)}),rootRef:p,portalRef:C,isTopModal:S,exited:m,hasTransition:g}}function Fee(e){return Qs(`MuiModal`,e)}$s(`MuiModal`,[`root`,`hidden`,`backdrop`]);var Iee=e=>{let{open:t,exited:n,classes:r}=e;return El({root:[`root`,!t&&n&&`hidden`],backdrop:[`backdrop`]},Fee,r)},Lee=G(`div`,{name:`MuiModal`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(Md(({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`}}]}))),Ree=G(iv,{name:`MuiModal`,slot:`Backdrop`})({zIndex:-1}),Dy=I.forwardRef(function(e,t){let n=Nd({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}=Pee({...w,rootRef:t}),A={...w,exited:te},j=Iee(A),M={};if(o.props.tabIndex===void 0&&(M.tabIndex=`-1`),k){let{onEnter:e,onExited:t}=D();M.onEnter=e,M.onExited=t}let ne={slots:x,slotProps:b},[re,ie]=jp(`root`,{ref:t,elementType:Lee,externalForwardedProps:{...ne,...C,component:c},getSlotProps:T,ownerState:A,className:U(i,j?.root,!A.open&&A.exited&&j?.hidden)}),[ae,oe]=jp(`backdrop`,{elementType:Ree,externalForwardedProps:ne,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,H.jsx)(o_,{ref:O,container:s,disablePortal:d,children:(0,H.jsxs)(re,{...ie,children:[m?null:(0,H.jsx)(ae,{...oe}),(0,H.jsx)(Sy,{disableEnforceFocus:u,disableAutoFocus:l,disableRestoreFocus:f,isEnabled:ee,open:y,children:I.cloneElement(o,M)})]})})});function zee(e){return Qs(`MuiDialog`,e)}$s(`MuiDialog`,[`root`,`backdrop`,`scrollPaper`,`scrollBody`,`container`,`paper`,`paperWidthFalse`,`paperWidthXs`,`paperWidthSm`,`paperWidthMd`,`paperWidthLg`,`paperWidthXl`,`paperFullWidth`,`paperFullScreen`]);var Oy=I.createContext({}),Bee=G(iv,{name:`MuiDialog`,slot:`Backdrop`})({zIndex:-1}),Vee=e=>{let{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:a}=e;return El({root:[`root`],backdrop:[`backdrop`],container:[`container`,`scroll${K(n)}`],paper:[`paper`,`paperWidth${K(String(r))}`,i&&`paperFullWidth`,a&&`paperFullScreen`]},zee,t)},Hee=G(Dy,{name:`MuiDialog`,slot:`Root`})({"@media print":{position:`absolute !important`}}),Uee=G(`div`,{name:`MuiDialog`,slot:`Container`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.container,t[`scroll${K(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`}}}]}),Wee=G(Hp,{name:`MuiDialog`,slot:`Paper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.paper,t[`paperWidth${K(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(Md(({theme:e})=>({margin:32,position:`relative`,overflowY:`auto`,outline:0,"@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%`}}]}))),ky=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiDialog`}),r=Dd(),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=Hp,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=Vee(C),T=I.useRef(),E=e=>{T.current=e.target===e.currentTarget},D=e=>{p&&p(e),T.current&&(T.current=null,m&&m(e,`backdropClick`))},O=$c(o),ee=I.useMemo(()=>({titleId:O}),[O]),te={slots:y,slotProps:b},[k,A]=jp(`root`,{elementType:Hee,shouldForwardComponentProp:!0,externalForwardedProps:te,ownerState:C,className:U(w.root,l),ref:t}),[j,M]=jp(`backdrop`,{elementType:Bee,shouldForwardComponentProp:!0,externalForwardedProps:te,ownerState:C,className:w.backdrop}),[ne,re]=jp(`paper`,{elementType:Wee,shouldForwardComponentProp:!0,externalForwardedProps:te,ownerState:C,className:w.paper,additionalProps:{elevation:24,role:_,"aria-describedby":a,"aria-labelledby":O,"aria-modal":s,tabIndex:-1,[my]:``}}),[ie,ae]=jp(`container`,{elementType:Uee,externalForwardedProps:te,ownerState:C,className:w.container}),[oe,N]=jp(`transition`,{elementType:ev,externalForwardedProps:te,ownerState:C,additionalProps:{appear:!0,in:h,timeout:x,role:`presentation`}});return(0,H.jsx)(k,{closeAfterTransition:!0,slots:{backdrop:j},slotProps:{backdrop:{transitionDuration:x,...M}},onClose:m,open:h,onClick:D,...A,...S,children:(0,H.jsx)(oe,{...N,children:(0,H.jsx)(ie,{onMouseDown:E,...ae,children:(0,H.jsx)(ne,{as:g,...re,children:(0,H.jsx)(Oy.Provider,{value:ee,children:c})})})})})});function Gee(e){return Qs(`MuiDialogActions`,e)}$s(`MuiDialogActions`,[`root`,`spacing`]);var Kee=e=>{let{classes:t,disableSpacing:n}=e;return El({root:[`root`,!n&&`spacing`]},Gee,t)},qee=G(`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}}}]}),Ay=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiDialogActions`}),{className:r,disableSpacing:i=!1,...a}=n,o={...n,disableSpacing:i},s=Kee(o);return(0,H.jsx)(qee,{className:U(s.root,r),ownerState:o,ref:t,...a})});function Jee(e){return Qs(`MuiDialogContent`,e)}$s(`MuiDialogContent`,[`root`,`dividers`]);function Yee(e){return Qs(`MuiDialogTitle`,e)}var Xee=$s(`MuiDialogTitle`,[`root`]),Zee=e=>{let{classes:t,dividers:n}=e;return El({root:[`root`,n&&`dividers`]},Jee,t)},Qee=G(`div`,{name:`MuiDialogContent`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(Md(({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:{[`.${Xee.root} + &`]:{paddingTop:0}}}]}))),jy=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiDialogContent`}),{className:r,dividers:i=!1,...a}=n,o={...n,dividers:i},s=Zee(o);return(0,H.jsx)(Qee,{className:U(s.root,r),ownerState:o,ref:t,...a})}),$ee=e=>{let{classes:t}=e;return El({root:[`root`]},Yee,t)},ete=G(q,{name:`MuiDialogTitle`,slot:`Root`})({padding:`16px 24px`,flex:`0 0 auto`}),My=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiDialogTitle`}),{className:r,id:i,...a}=n,o=n,s=$ee(o),{titleId:c=i}=I.useContext(Oy);return(0,H.jsx)(ete,{component:`h2`,className:U(s.root,r),ownerState:o,ref:t,variant:`h6`,id:i??c,...a})});function tte(e){return Qs(`MuiDivider`,e)}var Ny=$s(`MuiDivider`,[`root`,`absolute`,`fullWidth`,`inset`,`middle`,`flexItem`,`vertical`,`withChildren`,`textAlignRight`,`textAlignLeft`,`wrapper`,`wrapperVertical`]),nte=e=>{let{absolute:t,children:n,classes:r,flexItem:i,orientation:a,textAlign:o,variant:s}=e;return El({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`]},tte,r)},rte=G(`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]}})(Md(({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%`}}}]}))),ite=G(`span`,{name:`MuiDivider`,slot:`Wrapper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.wrapper,n.orientation===`vertical`&&t.wrapperVertical]}})(Md(({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)`}}]}))),Py=I.forwardRef(function(e,t){let n=Nd({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=nte(p);return(0,H.jsx)(rte,{as:s,className:U(m.root,a),role:l,ref:t,ownerState:p,"aria-orientation":l===`separator`&&(s!==`hr`||o===`vertical`)?o:void 0,...f,children:i?(0,H.jsx)(ite,{className:m.wrapper,ownerState:p,children:i}):null})});function ate(e){return Qs(`MuiFab`,e)}var Fy=$s(`MuiFab`,[`root`,`primary`,`secondary`,`extended`,`circular`,`focusVisible`,`disabled`,`colorInherit`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`info`,`error`,`warning`,`success`]),ote=e=>{let{color:t,variant:n,classes:r,size:i}=e,a=El({root:[`root`,n,`size${K(i)}`,t===`inherit`?`colorInherit`:t]},ate,r);return{...r,...a}},ste=G(gm,{name:`MuiFab`,slot:`Root`,shouldForwardProp:e=>Ad(e)||e===`classes`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`size${K(n.size)}`],n.color===`inherit`&&t.colorInherit,t[K(n.size)],t[n.color]]}})(Md(({theme:e})=>({...e.typography.button,minHeight:36,...ef(e,[`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`},[`&.${Fy.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`}}]})),Md(({theme:e})=>({variants:[...Object.entries(e.palette).filter(Tm([`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}}}}))]})),Md(({theme:e})=>({[`&.${Fy.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}))),Iy=I.forwardRef(function(e,t){let n=Nd({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=ote(p),{root:h,...g}=m;return(0,H.jsx)(ste,{className:U(m.root,i),component:o,internalNativeButton:!0,disabled:s,focusRipple:!c,focusVisibleClassName:U(m.focusVisible,l),ownerState:p,ref:t,...f,classes:g,children:r})}),cte=e=>{let{classes:t,disableUnderline:n,startAdornment:r,endAdornment:i,size:a,hiddenLabel:o,multiline:s}=e,c=El({root:[`root`,!n&&`underline`,r&&`adornedStart`,i&&`adornedEnd`,a===`small`&&`size${K(a)}`,o&&`hiddenLabel`,s&&`multiline`],input:[`input`]},ff,t);return{...t,...c}},lte=G(cf,{shouldForwardProp:e=>Ad(e)||e===`classes`,name:`MuiFilledInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...af(e,t),!n.disableUnderline&&t.underline]}})(Md(({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,...ef(e,`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}},[`&.${pf.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${pf.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)`,...ef(e,`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${pf.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${pf.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,...ef(e,`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${pf.disabled}, .${pf.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${pf.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(Tm()).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}}]}})),ute=G(lf,{name:`MuiFilledInput`,slot:`Input`,overridesResolver:of})(Md(({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}}]}))),Ly=I.forwardRef(function(e,t){let n=Nd({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=cte(n),h={root:{ownerState:p},input:{ownerState:p}},g=l?to(h,l):h;return(0,H.jsx)(df,{slots:{root:u.root??lte,input:u.input??ute},slotProps:g,fullWidth:i,inputComponent:o,multiline:s,ref:t,type:d,...f,classes:m})});Ly.muiName=`Input`;function dte(e){return Qs(`MuiFormControl`,e)}$s(`MuiFormControl`,[`root`,`marginNone`,`marginNormal`,`marginDense`,`fullWidth`,`disabled`]);var fte=e=>{let{classes:t,margin:n,fullWidth:r}=e;return El({root:[`root`,n!==`none`&&`margin${K(n)}`,r&&`fullWidth`]},dte,t)},pte=G(`div`,{name:`MuiFormControl`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`margin${K(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%`}}]}),Ry=I.forwardRef(function(e,t){let n=Nd({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=fte(_),[y,b]=I.useState(()=>{let e=!1;return r&&I.Children.forEach(r,t=>{if(!Zf(t,[`Input`,`Select`]))return;let n=Zf(t,[`Select`])?t.props.input:t;n&&Vd(n.props)&&(e=!0)}),e}),[x,S]=I.useState(()=>{let e=!1;return r&&I.Children.forEach(r,t=>{Zf(t,[`Input`,`Select`])&&(Bd(t.props,!0)||Bd(t.props.inputProps,!0))&&(e=!0)}),e}),[C,w]=I.useState(!1);s&&C&&w(!1);let T=l!==void 0&&!s?l:C;I.useRef(!1);let E=I.useCallback(()=>{S(!0)},[]),D=I.useCallback(()=>{S(!1)},[]),O=I.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,H.jsx)(Cd.Provider,{value:O,children:(0,H.jsx)(pte,{as:o,ownerState:_,className:U(v.root,i),ref:t,...g,children:r})})}),mte=e=>{let{classes:t,disabled:n,labelPlacement:r,error:i,required:a}=e;return El({root:[`root`,n&&`disabled`,`labelPlacement${K(r)}`,i&&`error`,a&&`required`],label:[`label`,n&&`disabled`],asterisk:[`asterisk`,i&&`error`]},mf,t)},hte=G(`label`,{name:`MuiFormControlLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${hf.label}`]:t.label},t.root,t[`labelPlacement${K(n.labelPlacement)}`]]}})(Md(({theme:e})=>({display:`inline-flex`,alignItems:`center`,cursor:`pointer`,verticalAlign:`middle`,WebkitTapHighlightColor:`transparent`,marginLeft:-11,marginRight:16,[`&.${hf.disabled}`]:{cursor:`default`},[`& .${hf.label}`]:{[`&.${hf.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}}]}))),gte=G(`span`,{name:`MuiFormControlLabel`,slot:`Asterisk`})(Md(({theme:e})=>({[`&.${hf.error}`]:{color:(e.vars||e).palette.error.main}}))),zy=I.forwardRef(function(e,t){let n=Nd({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]=Td({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=mte(C),[T,E]=jp(`typography`,{elementType:q,externalForwardedProps:{slots:m,slotProps:h},ownerState:C}),D=l;return D!=null&&D.type!==q&&!s&&(D=(0,H.jsx)(T,{component:`span`,...E,className:U(w.label,E?.className),children:D})),(0,H.jsxs)(hte,{className:U(w.root,i),ownerState:C,ref:t,..._,children:[I.cloneElement(a,S),x?(0,H.jsxs)(`div`,{children:[D,(0,H.jsxs)(gte,{ownerState:C,"aria-hidden":!0,className:w.asterisk,children:[` `,`*`]})]}):D]})});function _te(e){return Qs(`MuiFormGroup`,e)}$s(`MuiFormGroup`,[`root`,`row`,`error`]);var vte=e=>{let{classes:t,row:n,error:r}=e;return El({root:[`root`,n&&`row`,r&&`error`]},_te,t)},yte=G(`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`}}]}),bte=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiFormGroup`}),{className:r,row:i=!1,...a}=n,[o]=Td({props:n,states:[`error`]}),s={...n,row:i,error:o.error},c=vte(s);return(0,H.jsx)(yte,{className:U(c.root,r),ownerState:s,ref:t,...a})}),xte,Ste=e=>{let{classes:t,contained:n,size:r,disabled:i,error:a,filled:o,focused:s,required:c}=e;return El({root:[`root`,i&&`disabled`,a&&`error`,r&&`size${K(r)}`,n&&`contained`,s&&`focused`,o&&`filled`,c&&`required`]},gf,t)},Cte=G(`p`,{name:`MuiFormHelperText`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.size&&t[`size${K(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(Md(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:`left`,marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${_f.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${_f.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}}]}))),wte=I.forwardRef(function(e,t){let n=Nd({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]=Td({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};delete h.ownerState;let g=Ste(h);return(0,H.jsx)(Cte,{as:a,className:U(g.root,i),ref:t,...p,ownerState:h,children:r===` `?xte||=(0,H.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``}):r})}),Tte=e=>{let{classes:t,color:n,focused:r,disabled:i,error:a,filled:o,required:s}=e;return El({root:[`root`,`color${K(n)}`,i&&`disabled`,a&&`error`,o&&`filled`,r&&`focused`,s&&`required`],asterisk:[`asterisk`,a&&`error`]},vf,t)},Ete=G(`label`,{name:`MuiFormLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color===`secondary`&&t.colorSecondary,n.filled&&t.filled]}})(Md(({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(Tm()).map(([t])=>({props:{color:t},style:{[`&.${yf.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${yf.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${yf.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),Dte=G(`span`,{name:`MuiFormLabel`,slot:`Asterisk`})(Md(({theme:e})=>({[`&.${yf.error}`]:{color:(e.vars||e).palette.error.main}}))),Ote=I.forwardRef(function(e,t){let n=Nd({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]=Td({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=Tte(m);return(0,H.jsxs)(Ete,{as:o,ownerState:m,className:U(h.root,i),ref:t,...f,children:[r,p.required&&(0,H.jsxs)(Dte,{ownerState:m,"aria-hidden":!0,className:h.asterisk,children:[` `,`*`]})]})}),By=ql({createStyledComponent:G(`div`,{name:`MuiGrid`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.container&&t.container]}}),componentName:`MuiGrid`,useThemeProps:e=>Nd({props:e,name:`MuiGrid`}),useTheme:Dd});function Vy(e){return`scale(${e}, ${e**2})`}var kte={entering:{opacity:1,transform:Vy(1)},entered:{opacity:1,transform:`none`},exiting:{opacity:0,transform:Vy(.75)},exited:{opacity:0,transform:Vy(.75)}},Ate={opacity:0,transform:Vy(.75),visibility:`hidden`},Hy=I.forwardRef(function(e,t){let{addEndListener:n,appear:r=!0,children:i,disablePrefersReducedMotion:a=!1,easing:o,in:s,onEnter:c,onEntered:l,onEntering:u,onExit:d,onExited:f,onExiting:p,style:m,timeout:h=`auto`,...g}=e,_=I.useRef(null),v=Dd(),y=Tp(v.motion.reducedMotion,a),b=I.useRef(null),x=Pd(b,r_(i),t),S=Xd(b,u),C=Xd(b,(e,t)=>{y.shouldReduceMotion||Kd(e);let{duration:n,delay:r,easing:i}=Qd({style:m,timeout:h,easing:o},{mode:`enter`}),a;h===`auto`&&!y.shouldReduceMotion?(a=v.transitions.getAutoHeightDuration(e.clientHeight),_.current=a):(a=n,_.current=null);let s=y.getTransitionTiming({duration:a,delay:r});e.style.transition=[v.transitions.create(`opacity`,{duration:s.duration,delay:s.delay}),v.transitions.create(`transform`,{duration:typeof s.duration==`string`?s.duration:s.duration*.666,delay:s.delay,easing:i})].join(`,`),c&&c(e,t)}),w=Xd(b,l),T=Xd(b,p);return(0,H.jsx)(pp,{appear:r,in:s,nodeRef:b,onEnter:C,onEntered:w,onEntering:S,onExit:Xd(b,e=>{let{duration:t,delay:n,easing:r}=Qd({style:m,timeout:h,easing:o},{mode:`exit`}),i;h===`auto`&&!y.shouldReduceMotion?(i=v.transitions.getAutoHeightDuration(e.clientHeight),_.current=i):(i=t,_.current=null);let a=y.getTransitionTiming({duration:i,delay:n});e.style.transition=[v.transitions.create(`opacity`,{duration:a.duration,delay:a.delay}),v.transitions.create(`transform`,{duration:typeof a.duration==`string`?a.duration:a.duration*.666,delay:a.delay||(typeof a.duration==`string`?a.duration:a.duration*.333),easing:r})].join(`,`),e.style.opacity=0,e.style.transform=Vy(.75),d&&d(e)}),onExited:Xd(b,e=>{e.style.transition=``,f&&f(e)}),onExiting:T,addEndListener:n?e=>{n(b.current,e)}:void 0,getAutoTimeout:h===`auto`?()=>_.current:void 0,reduceMotion:y.shouldReduceMotion,timeout:h===`auto`?null:h,...g,children:(e,{ownerState:t,...n})=>{let r=Zd(e,s,kte,Ate,m,i.props.style);return I.cloneElement(i,{style:r,ref:x,...n})}})});Hy&&(Hy.muiSupportAuto=!0);function jte(e){return Qs(`MuiInputLabel`,e)}var Mte=$s(`MuiInputLabel`,[`root`,`focused`,`disabled`,`error`,`required`,`asterisk`,`formControl`,`sizeSmall`,`shrink`,`animated`,`standard`,`filled`,`outlined`]),Nte=e=>{let{classes:t,disableUnderline:n}=e,r=El({root:[`root`,!n&&`underline`],input:[`input`]},bf,t);return{...t,...r}},Pte=G(cf,{shouldForwardProp:e=>Ad(e)||e===`classes`,name:`MuiInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...af(e,t),!n.disableUnderline&&t.underline]}})(Md(({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 + &, .${Mte.root} + &`]:{marginTop:16}}},{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,...ef(e,`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${xf.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${xf.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,...ef(e,`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${xf.disabled}, .${xf.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${xf.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(Tm()).map(([t])=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}}))]}})),Fte=G(lf,{name:`MuiInput`,slot:`Input`,overridesResolver:of})({}),Uy=I.forwardRef(function(e,t){let n=Nd({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=Nte(n),p={root:{ownerState:{disableUnderline:r}}},m=c?to(c,p):p;return(0,H.jsx)(df,{slots:{root:l.root??Pte,input:l.input??Fte},slotProps:m,fullWidth:i,inputComponent:a,multiline:o,ref:t,type:u,...d,classes:f})});Uy.muiName=`Input`;function Ite(e){return Qs(`MuiInputAdornment`,e)}var Wy=$s(`MuiInputAdornment`,[`root`,`filled`,`standard`,`outlined`,`positionStart`,`positionEnd`,`disablePointerEvents`,`hiddenLabel`,`sizeSmall`]),Lte,Rte=(e,t)=>{let{ownerState:n}=e;return[t.root,t[`position${K(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},zte=e=>{let{classes:t,disablePointerEvents:n,hiddenLabel:r,position:i,size:a,variant:o}=e;return El({root:[`root`,n&&`disablePointerEvents`,i&&`position${K(i)}`,o,r&&`hiddenLabel`,a&&`size${K(a)}`]},Ite,t)},Bte=G(`div`,{name:`MuiInputAdornment`,slot:`Root`,overridesResolver:Rte})(Md(({theme:e})=>({display:`flex`,maxHeight:`2em`,alignItems:`center`,whiteSpace:`nowrap`,color:(e.vars||e).palette.action.active,variants:[{props:{variant:`filled`},style:{[`&.${Wy.positionStart}&:not(.${Wy.hiddenLabel})`]:{marginTop:16}}},{props:{position:`start`},style:{marginRight:8}},{props:{position:`end`},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:`none`}}]}))),Gy=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiInputAdornment`}),{children:r,className:i,component:a=`div`,disablePointerEvents:o=!1,disableTypography:s=!1,position:c,variant:l,...u}=n,d=wd()||{},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=zte(p);return(0,H.jsx)(Cd.Provider,{value:null,children:(0,H.jsx)(Bte,{as:a,ownerState:p,className:U(m.root,i),ref:t,...u,children:typeof r==`string`&&!s?(0,H.jsx)(q,{color:`textSecondary`,children:r}):(0,H.jsxs)(I.Fragment,{children:[c===`start`?Lte||=(0,H.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``}):null,r]})})})}),Vte=e=>{let{classes:t,formControl:n,size:r,shrink:i,disableAnimation:a,variant:o,required:s}=e,c=El({root:[`root`,n&&`formControl`,!a&&`animated`,i&&`shrink`,r&&r!==`medium`&&`size${K(r)}`,o],asterisk:[s&&`asterisk`]},jte,t);return{...t,...c}},Hte=G(Ote,{shouldForwardProp:e=>Ad(e)||e===`classes`,name:`MuiInputLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${yf.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]]}})(Md(({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:{...ef(e,[`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)`}}]}))),Ute=I.forwardRef(function(e,t){let n=Nd({name:`MuiInputLabel`,props:e}),{disableAnimation:r=!1,margin:i,shrink:a,variant:o,className:s,...c}=n,[l,u]=Td({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=Vte(f);return(0,H.jsx)(Hte,{"data-shrink":d,ref:t,className:U(p.root,s),...c,ownerState:f,classes:p})});function Wte(e){return Qs(`MuiLinearProgress`,e)}$s(`MuiLinearProgress`,[`root`,`colorPrimary`,`colorSecondary`,`determinate`,`indeterminate`,`buffer`,`query`,`dashed`,`bar`,`bar1`,`bar2`]);var Ky=4,Gte={},qy=Pa`
|
|
193
|
+
0% {
|
|
194
|
+
left: -35%;
|
|
195
|
+
right: 100%;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
60% {
|
|
199
|
+
left: 100%;
|
|
200
|
+
right: -90%;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
100% {
|
|
204
|
+
left: 100%;
|
|
205
|
+
right: -90%;
|
|
206
|
+
}
|
|
207
|
+
`,Kte=typeof qy==`string`?null:Na`
|
|
208
|
+
animation: ${qy} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
|
|
209
|
+
`,Jy=Pa`
|
|
210
|
+
0% {
|
|
211
|
+
left: -200%;
|
|
212
|
+
right: 100%;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
60% {
|
|
216
|
+
left: 107%;
|
|
217
|
+
right: -8%;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
100% {
|
|
221
|
+
left: 107%;
|
|
222
|
+
right: -8%;
|
|
223
|
+
}
|
|
224
|
+
`,Yy=typeof Jy==`string`?null:Na`
|
|
225
|
+
animation: ${Jy} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
|
|
226
|
+
`,Xy=Pa`
|
|
227
|
+
0% {
|
|
228
|
+
opacity: 1;
|
|
229
|
+
background-position: 0 -23px;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
60% {
|
|
233
|
+
opacity: 0;
|
|
234
|
+
background-position: 0 -23px;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
100% {
|
|
238
|
+
opacity: 1;
|
|
239
|
+
background-position: -200px -23px;
|
|
240
|
+
}
|
|
241
|
+
`,Zy=typeof Xy==`string`?null:Na`
|
|
242
|
+
animation: ${Xy} 3s infinite linear;
|
|
243
|
+
`,Qy=e=>{let{classes:t,variant:n,color:r}=e;return El({root:[`root`,`color${K(r)}`,n],dashed:[`dashed`],bar1:[`bar`,`bar1`],bar2:[`bar`,`bar2`,n===`buffer`&&`color${K(r)}`]},Wte,t)},$y=(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),qte=G(`span`,{name:`MuiLinearProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`color${K(n.color)}`],t[n.variant]]}})(Md(({theme:e})=>({position:`relative`,overflow:`hidden`,display:`block`,height:4,zIndex:0,"@media print":{colorAdjust:`exact`},variants:[...Object.entries(e.palette).filter(Tm()).map(([t])=>({props:{color:t},style:{backgroundColor:$y(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)`}}]}))),Jte=G(`span`,{name:`MuiLinearProgress`,slot:`Dashed`})(Md(({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(Tm()).map(([t])=>{let n=$y(e,t);return{props:{color:t},style:{backgroundImage:`radial-gradient(${n} 0%, ${n} 16%, transparent 42%)`}}})]})),Zy||{animation:`${Xy} 3s infinite linear`},Md(({theme:e})=>$d(e,{animation:`none`})||Gte)),Yte=G(`span`,{name:`MuiLinearProgress`,slot:`Bar1`,overridesResolver:(e,t)=>[t.bar,t.bar1]})(Md(({theme:e})=>{let t=$d(e,{animation:`none`,left:`30%`,right:`auto`,width:`40%`});return{width:`100%`,position:`absolute`,left:0,bottom:0,top:0,...ef(e,`transform`,{duration:`0.2s`,easing:`linear`}),transformOrigin:`left`,variants:[{props:{color:`inherit`},style:{backgroundColor:`currentColor`}},...Object.entries(e.palette).filter(Tm()).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main}})),{props:{variant:`determinate`},style:{...ef(e,`transform`,{duration:`.${Ky}s`,easing:`linear`})}},{props:{variant:`buffer`},style:{zIndex:1,...ef(e,`transform`,{duration:`.${Ky}s`,easing:`linear`})}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:{width:`auto`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:Kte||{animation:`${qy} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}},...t?[{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:t}]:[]]}})),eb=G(`span`,{name:`MuiLinearProgress`,slot:`Bar2`,overridesResolver:(e,t)=>[t.bar,t.bar2]})(Md(({theme:e})=>{let t=$d(e,{animation:`none`,display:`none`});return{width:`100%`,position:`absolute`,left:0,bottom:0,top:0,...ef(e,`transform`,{duration:`0.2s`,easing:`linear`}),transformOrigin:`left`,variants:[...Object.entries(e.palette).filter(Tm()).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(Tm()).map(([t])=>({props:{color:t,variant:`buffer`},style:{backgroundColor:$y(e,t),...ef(e,`transform`,{duration:`.${Ky}s`,easing:`linear`})}})),{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:{width:`auto`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:Yy||{animation:`${Jy} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}},...t?[{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:t}]:[]]}})),tb=I.forwardRef(function(e,t){let n=Nd({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=Qy(d),h=Gc(),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,H.jsxs)(qte,{className:U(m.root,r),ownerState:d,role:`progressbar`,...g,ref:t,...u,children:[l===`buffer`?(0,H.jsx)(Jte,{className:m.dashed,ownerState:d}):null,(0,H.jsx)(Yte,{className:m.bar1,ownerState:d,style:_.bar1}),l===`determinate`?null:(0,H.jsx)(eb,{className:m.bar2,ownerState:d,style:_.bar2})]})});function nb(e){return Qs(`MuiLink`,e)}var rb=$s(`MuiLink`,[`root`,`underlineNone`,`underlineHover`,`underlineAlways`,`button`,`focusVisible`]),ib=({theme:e,ownerState:t})=>{let n=t.color;if(`colorSpace`in e&&e.colorSpace){let r=Lo(e,`palette.${n}.main`)||Lo(e,`palette.${n}`)||t.color;return e.alpha(r,.4)}let r=Lo(e,`palette.${n}.main`,!1)||Lo(e,`palette.${n}`,!1)||t.color,i=Lo(e,`palette.${n}.mainChannel`)||Lo(e,`palette.${n}Channel`);return`vars`in e&&i?`rgba(${i} / 0.4)`:Ac(r,.4)},ab={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Xte=e=>{let{classes:t,component:n,focusVisible:r,underline:i}=e;return El({root:[`root`,`underline${K(i)}`,n===`button`&&`button`,r&&`focusVisible`]},nb,t)},Zte=G(q,{name:`MuiLink`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`underline${K(n.underline)}`],n.component===`button`&&t.button]}})(Md(({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(Tm()).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`},[`&.${rb.focusVisible}`]:{outline:`auto`}}}]}))),Qte=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiLink`}),r=Dd(),{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]=I.useState(!1),g=e=>{qp(e.target)||h(!1),s&&s(e)},_=e=>{qp(e.target)&&h(!0),c&&c(e)},v={...n,color:a,component:o,focusVisible:m,underline:u,variant:d},y=Xte(v);return(0,H.jsx)(Zte,{color:a,className:U(y.root,i),classes:l,component:o,onBlur:g,onFocus:_,ref:t,ownerState:v,variant:d,...p,sx:[...ab[a]===void 0?[{color:a}]:[],...Array.isArray(f)?f:[f]],style:{...p.style,...u===`always`&&a!==`inherit`&&!ab[a]&&{"--Link-underlineColor":ib({theme:r,ownerState:v})}}})}),ob=I.createContext({});function $te(e){return Qs(`MuiList`,e)}$s(`MuiList`,[`root`,`padding`,`dense`,`subheader`]);var ene=e=>{let{classes:t,disablePadding:n,dense:r,subheader:i}=e;return El({root:[`root`,!n&&`padding`,r&&`dense`,i&&`subheader`]},$te,t)},tne=G(`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`}}]}),sb=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiList`}),{children:r,className:i,component:a=`ul`,dense:o=!1,disablePadding:s=!1,subheader:c,...l}=n,u=I.useMemo(()=>({dense:o}),[o]),d={...n,component:a,dense:o,disablePadding:s},f=ene(d);return(0,H.jsx)(ob.Provider,{value:u,children:(0,H.jsxs)(tne,{as:a,className:U(f.root,i),ref:t,ownerState:d,...l,children:[c,r]})})});function nne(e){return Qs(`MuiListItem`,e)}$s(`MuiListItem`,[`root`,`dense`,`alignItemsFlexStart`,`divider`,`gutters`,`padding`,`secondaryAction`]);var rne=(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]},ine=e=>{let{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:a,divider:o,selected:s}=e,c=El({root:[`root`,r&&`dense`,!a&&`gutters`,o&&`divider`,i&&`disabled`,t===`flex-start`&&`alignItemsFlexStart`,s&&`selected`]},Sf,n);return{...n,...c}},ane=G(gm,{shouldForwardProp:e=>Ad(e)||e===`classes`,name:`MuiListItemButton`,slot:`Root`,overridesResolver:rne})(Md(({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,...ef(e,`background-color`,{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:`none`,backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}},[`&.${Cf.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${Cf.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${Cf.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)}},[`&.${Cf.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Cf.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}}]}))),cb=I.forwardRef(function(e,t){let n=Nd({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=I.useContext(ob),h=I.useMemo(()=>({dense:s||m.dense||!1,alignItems:r,disableGutters:c}),[r,m.dense,s,c]),g=I.useRef(null);Fd(()=>{i&&g.current&&g.current.focus()},[i]);let _={...n,alignItems:r,dense:h.dense,disableGutters:c,divider:l,selected:d},v=ine(_),{root:y,...b}=v,x=Pd(g,t);return(0,H.jsx)(ob.Provider,{value:h,children:(0,H.jsx)(ane,{ref:x,href:p.href||p.to,component:(p.href||p.to)&&a===`div`?`button`:a,internalNativeButton:!1,focusVisibleClassName:U(v.focusVisible,u),ownerState:_,className:U(v.root,f),...p,classes:b,children:o})})});function one(e){return Qs(`MuiListItemSecondaryAction`,e)}$s(`MuiListItemSecondaryAction`,[`root`,`disableGutters`]);var sne=e=>{let{disableGutters:t,classes:n}=e;return El({root:[`root`,t&&`disableGutters`]},one,n)},lb=G(`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}}]}),ub=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiListItemSecondaryAction`}),{className:r,component:i,...a}=n,o=I.useContext(ob),s={...n,disableGutters:o.disableGutters},c=sne(s);return(0,H.jsx)(lb,{as:i,className:U(c.root,r),ownerState:s,ref:t,...a})});ub.muiName=`ListItemSecondaryAction`;var db=(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]},fb=e=>{let{alignItems:t,classes:n,dense:r,disableGutters:i,disablePadding:a,divider:o}=e;return El({root:[`root`,r&&`dense`,!i&&`gutters`,!a&&`padding`,o&&`divider`,t===`flex-start`&&`alignItemsFlexStart`],secondaryAction:[`secondaryAction`]},nne,n)},pb=G(`div`,{name:`MuiListItem`,slot:`Root`,overridesResolver:db})(Md(({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:{[`& > .${Cf.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:{...ef(e,`background-color`,{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:`none`,backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}}}}]}))),mb=G(ub,{name:`MuiListItem`,slot:`secondaryAction`})({}),hb=I.forwardRef(function(e,t){let n=Nd({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=I.useContext(ob),g=I.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=fb(_),y={slots:p,slotProps:f},[b,x]=jp(`root`,{ref:t,elementType:pb,externalForwardedProps:{component:o,...y,...m},ownerState:_,className:U(v.root,a)}),[S,C]=jp(`secondaryAction`,{elementType:mb,shouldForwardComponentProp:!0,externalForwardedProps:y,ownerState:_,className:v.secondaryAction});return(0,H.jsx)(ob.Provider,{value:g,children:(0,H.jsxs)(b,{...x,children:[i,d&&(0,H.jsx)(S,{...C,children:d})]})})});function gb(e){return Qs(`MuiListItemIcon`,e)}var _b=$s(`MuiListItemIcon`,[`root`,`alignItemsFlexStart`]),vb=e=>{let{alignItems:t,classes:n}=e;return El({root:[`root`,t===`flex-start`&&`alignItemsFlexStart`]},gb,n)},yb=G(`div`,{name:`MuiListItemIcon`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.alignItems===`flex-start`&&t.alignItemsFlexStart]}})(Md(({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}}]}))),bb=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiListItemIcon`}),{className:r,...i}=n,a=I.useContext(ob),o={...n,alignItems:a.alignItems},s=vb(o);return(0,H.jsx)(yb,{className:U(s.root,r),ownerState:o,ref:t,...i})});function xb(e){return Qs(`MuiListItemText`,e)}var Sb=$s(`MuiListItemText`,[`root`,`multiline`,`dense`,`inset`,`primary`,`secondary`]),Cb=e=>{let{classes:t,inset:n,primary:r,secondary:i,dense:a}=e;return El({root:[`root`,n&&`inset`,a&&`dense`,r&&i&&`multiline`],primary:[`primary`],secondary:[`secondary`]},xb,t)},wb=G(`div`,{name:`MuiListItemText`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${Sb.primary}`]:t.primary},{[`& .${Sb.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,[`.${ah.root}:where(& .${Sb.primary})`]:{display:`block`},[`.${ah.root}:where(& .${Sb.secondary})`]:{display:`block`},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),Tb=I.forwardRef(function(e,t){let n=Nd({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}=I.useContext(ob),p=s??r,m=c,h={...n,disableTypography:a,inset:o,primary:!!p,secondary:!!m,dense:f},g=Cb(h),_={slots:l,slotProps:u},[v,y]=jp(`root`,{className:U(g.root,i),elementType:wb,externalForwardedProps:{..._,...d},ownerState:h,ref:t}),[b,x]=jp(`primary`,{className:g.primary,elementType:q,externalForwardedProps:_,ownerState:h}),[S,C]=jp(`secondary`,{className:g.secondary,elementType:q,externalForwardedProps:_,ownerState:h});return p!=null&&p.type!==q&&!a&&(p=(0,H.jsx)(b,{variant:f?`body2`:`body1`,component:x?.variant?void 0:`span`,...x,children:p})),m!=null&&m.type!==q&&!a&&(m=(0,H.jsx)(S,{variant:`body2`,color:`textSecondary`,...C,children:m})),(0,H.jsxs)(v,{...y,children:[p,m]})}),Eb=I.createContext(void 0);function Db(){let e=I.useContext(Eb);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 cne=Object.is;function lne(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,!cne(e[r],t[r])||!(r in t))return!1;for(let e in t)r+=1;return n===r}var une=[`ArrowRight`,`ArrowLeft`,`ArrowUp`,`ArrowDown`,`Home`,`End`];function Ob(e){let{activeItemId:t,getDefaultActiveItemId:n,orientation:r,isRtl:i=!1,isItemFocusable:a=Bb,wrap:o=!0}=e,[s,c]=I.useState(t),[l,u]=I.useState(t),d=s;t!==l&&(u(t),t!==void 0&&t!==s&&(d=t,c(t)));let f=I.useRef(null),p=I.useRef(new Map),[m,h]=I.useState(0),g=I.useMemo(()=>Lb(p.current),[m]),_=Ab(d,g,a,n),v=I.useRef(_);v.current=_;let y=I.useCallback(()=>{let e=Lb(p.current);return Pb(e,Ab(v.current,e,a,n))},[n,a]),b=I.useCallback(()=>p.current,[]),x=hd(e=>{lne(p.current.get(e.id)??null,e)||(p.current.set(e.id,e),h(e=>e+1))}),S=hd(e=>{p.current.delete(e)&&h(e=>e+1)}),C=hd(e=>{c(e)}),w=I.useCallback(e=>v.current===e,[]),T=I.useCallback((e,t,n,r)=>{let i=Mb(Rb(p.current),e,t,n,r??a);return i?(i.element?.focus(),c(i.id),i):null},[a]),E=I.useCallback(e=>({onFocus:e=>{let t=Rb(p.current),n=Ib(t,e.target);n!==-1&&c(t[n].id)},onKeyDown:e=>{if(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey||!une.includes(e.key))return;let t=r===`horizontal`?`ArrowLeft`:`ArrowUp`,n=r===`horizontal`?`ArrowRight`:`ArrowDown`;r===`horizontal`&&i&&(t=`ArrowRight`,n=`ArrowLeft`);let a=Rb(p.current),s=Ld(gd(f.current)),c=s===f.current,l=jb(a,s,v.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}T(l,u,o)},ref:Hb(e,e=>{f.current=e})}),[T,i,r,o]),D=I.useCallback(e=>{let t=Rb(p.current),n=Ld(gd(f.current)),r=n===f.current?-1:jb(t,n,v.current);return T(r,`next`,!0,e)?.id??null},[T]);return I.useMemo(()=>({activeItemId:_,focusNext:D,getActiveItem:y,getContainerProps:E,getItemMap:b,isItemActive:w,registerItem:x,setActiveItemId:C,unregisterItem:S}),[_,D,y,E,b,w,x,C,S])}function kb(e){let{activeItemId:t,registerItem:n,unregisterItem:r}=Db(),i=I.useRef(null),a=I.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=I.useRef(a);o.current=a;let s=I.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=md(e.ref,s);return hc(()=>{i.current&&n({...a,element:i.current})},[a,n]),hc(()=>{let t=e.id;return()=>{r(t)}},[e.id,r]),{ref:c,tabIndex:t===e.id?0:-1}}function Ab(e,t,n,r){return e==null?fne(t,n,r):dne(e,t,n)}function dne(e,t,n){let r=Fb(t,e);return r===-1?Nb(t,n):n(t[r])?t[r].id:Mb(t,r,`next`,!1,n)?.id??null}function fne(e,t,n){let r=n?.(e);if(r!=null){let n=Pb(e,r);if(n&&t(n))return n.id}return Nb(e,t)}function jb(e,t,n){if(t){let n=Ib(e,t);if(n!==-1)return n}return Fb(e,n)}function Mb(e,t,n,r,i){let a=e.length-1;if(a===-1)return null;let o=!1,s=zb(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=zb(s,a,n,r);else return t}return null}function Nb(e,t){return e.find(e=>t(e))?.id??null}function Pb(e,t){return t==null?null:e.find(e=>e.id===t)??null}function Fb(e,t){return t==null?-1:e.findIndex(e=>e.id===t)}function Ib(e,t){return t?e.findIndex(e=>e.element===t||e.element?.contains(t)):-1}function Lb(e){let t=Array.from(e.values());if(t.every(e=>e.element==null))return t;let n=t.filter(Vb).sort((e,t)=>pne(e.element,t.element)),r=t.filter(e=>!Vb(e));return[...n,...r]}function Rb(e){return Lb(e).filter(Vb)}function zb(e,t,n,r=!0){return n===`next`?e===t?r?0:-1:e+1:e===0?r?t:-1:e-1}function Bb(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 Vb(e){return e.element!=null&&e.element.isConnected}function pne(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 Hb(...e){return t=>{e.forEach(e=>{$f(e??null,t)})}}var Ub=ry;function Wb(e,t){if(t==null){e.focus();return}try{e.focus({focusVisible:t===`keyboard`})}catch{e.focus()}}function Gb(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 Kb(e){return e==null||typeof e==`string`&&!e.trim()}function qb(e,t){return typeof t==`object`&&t?e===t:String(e)===String(t)}var Jb=I.createContext(null);function Yb(){return I.useContext(Jb)}var Xb=Jb.Provider,Zb=I.createContext(void 0);function Qb(){let e=I.useContext(Zb);if(e===void 0)throw Error(`MUI: MenuListContext is missing. MenuItems must be placed within Menu or MenuList.`);return e}function $b(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 ex(e,t){if(t===void 0)return!0;let n=$b(e);return n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(``))}function tx(e,t){return ex(e,t)?Bb(e):!1}function nx(e,t){Wb(e,t)}var rx=I.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=I.useRef(null),p=I.useRef(!1),[m,h]=I.useState(!1),g=Yb(),_=I.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null}),v=Ob({activeItemId:void 0,getDefaultActiveItemId:I.useCallback(e=>u===`selectedMenu`?e.find(e=>e.selected&&Bb(e))?.id??e.find(e=>Bb(e))?.id??null:e.find(e=>Bb(e))?.id??null,[u]),orientation:`vertical`,wrap:!c}),{activeItemId:y,focusNext:b,getActiveItem:x,getContainerProps:S,getItemMap:C}=v,w=rp((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),n=u===`menu`&&t&&!e.selected&&g==null;return h(n),nx(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)});Fd(()=>{if(!r&&!i){p.current=!1,h(!1);return}w()},[y,i,r,w]),I.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{let n=!f.current.style.width;if(e.clientHeight<f.current.clientHeight&&n){let n=`${Ub(Qf(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=Rd(Id(f.current));return e&&py(f.current,e)?e:w(!0)}}),[w]);let T=S(),E=Pd(f,T.ref,t),D=I.useMemo(()=>({itemsFocusableWhenDisabled:s,suppressInitialFocusVisible:m,variant:u}),[s,m,u]);return(0,H.jsx)(sb,{role:`menu`,ref:E,className:o,onKeyDown:rp(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=Rd(Id(f.current)),a=i&&!t.repeating&&ex(i,t);t.previousKeyMatched&&(a||b(e=>tx(e,t))!=null)?e.preventDefault():t.previousKeyMatched=!1}l&&l(e)}),onFocus:T.onFocus,tabIndex:-1,...d,children:(0,H.jsx)(Zb.Provider,{value:D,children:(0,H.jsx)(Eb.Provider,{value:v,children:a})})})});function ix(e){return Qs(`MuiPopover`,e)}$s(`MuiPopover`,[`root`,`paper`]);function ax(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.height/2:t===`bottom`&&(n=e.height),n}function ox(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.width/2:t===`right`&&(n=e.width),n}function sx(e){return[e.horizontal,e.vertical].map(e=>typeof e==`number`?`${e}px`:e).join(` `)}function cx(e){return typeof e==`function`?e():e}var lx=e=>{let{classes:t}=e;return El({root:[`root`],paper:[`paper`]},ix,t)},ux=G(Dy,{name:`MuiPopover`,slot:`Root`})({}),dx=G(Hp,{name:`MuiPopover`,slot:`Paper`})({position:`absolute`,overflowY:`auto`,overflowX:`hidden`,minWidth:16,minHeight:16,maxWidth:`calc(100% - 32px)`,maxHeight:`calc(100% - 32px)`,outline:0}),fx=I.forwardRef(function(e,t){let n=Nd({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=I.useRef(),S={...n,anchorOrigin:a,anchorReference:s,elevation:f,marginThreshold:p,transformOrigin:_,transitionDuration:v},C=lx(S),w=I.useCallback(()=>{if(s===`anchorPosition`)return o;let e=cx(i),t=(e&&e.nodeType===1?e:Id(x.current).body).getBoundingClientRect();return{top:t.top+ax(t,a.vertical),left:t.left+ox(t,a.horizontal)}},[i,a.horizontal,a.vertical,o,s]),T=I.useCallback(e=>({vertical:ax(e,_.vertical),horizontal:ox(e,_.horizontal)}),[_.horizontal,_.vertical]),E=I.useCallback(e=>{let t={width:e.offsetWidth,height:e.offsetHeight},n=T(t);if(s===`none`)return{top:null,left:null,transformOrigin:sx(n)};let r=w(),a=r.top-n.vertical,o=r.left-n.horizontal,c=a+t.height,l=o+t.width,u=Qf(cx(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:sx(n)}},[i,s,w,T,p]),[D,O]=I.useState(m),ee=I.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]);I.useEffect(()=>(y&&window.addEventListener(`scroll`,ee),()=>window.removeEventListener(`scroll`,ee)),[i,y,ee]);let te=()=>{ee()},k=()=>{O(!1)};I.useEffect(()=>{m&&ee()}),I.useImperativeHandle(r,()=>m?{updatePosition:()=>{ee()}}:null,[m,ee]),I.useEffect(()=>{if(!m)return;let e=Xf(()=>{ee()}),t=Qf(cx(i));return t.addEventListener(`resize`,e),()=>{e.clear(),t.removeEventListener(`resize`,e)}},[i,m,ee]);let A=v,j={slots:h,slotProps:g},[M,ne]=jp(`transition`,{elementType:Hy,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`&&!M.muiSupportAuto&&(A=void 0);let re=u||(i?Id(cx(i)).body:void 0),[ie,{slots:ae,slotProps:oe,...N}]=jp(`root`,{ref:t,elementType:ux,externalForwardedProps:{...j,...b},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:h.backdrop},slotProps:{backdrop:ap(typeof g.backdrop==`function`?g.backdrop(S):g.backdrop,{invisible:!0})},container:re,open:m},ownerState:S,className:U(C.root,l)}),[se,ce]=jp(`paper`,{ref:x,className:C.paper,elementType:dx,externalForwardedProps:j,shouldForwardComponentProp:!0,additionalProps:{elevation:f,style:D?void 0:{opacity:0}},ownerState:S});return(0,H.jsx)(ie,{...N,...!fd(ie)&&{slots:ae,slotProps:oe,disableAutoFocus:d,disableScrollLock:y},children:(0,H.jsx)(M,{...ne,timeout:A,children:(0,H.jsx)(se,{...ce,children:c})})})});function px(e){return Qs(`MuiMenu`,e)}$s(`MuiMenu`,[`root`,`paper`,`list`]);var mx={vertical:`top`,horizontal:`right`},hx={vertical:`top`,horizontal:`left`},gx=e=>{let{classes:t}=e;return El({root:[`root`],paper:[`paper`],list:[`list`]},px,t)},_x=G(fx,{shouldForwardProp:e=>Ad(e)||e===`classes`,name:`MuiMenu`,slot:`Root`})({}),vx=G(dx,{name:`MuiMenu`,slot:`Paper`})({maxHeight:`calc(100% - 96px)`,WebkitOverflowScrolling:`touch`}),yx=G(rx,{name:`MuiMenu`,slot:`List`})({outline:0}),bx=I.forwardRef(function(e,t){let n=Nd({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=Gc(),g={...n,autoFocus:r,disableAutoFocusItem:o,transitionDuration:u,variant:d},_=gx(g),v=r&&c,y=v&&!o,b=I.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=n_({elementType:f.root,externalSlotProps:p.root,ownerState:g,className:[_.root,a]}),[T,E]=jp(`paper`,{className:_.paper,elementType:vx,externalForwardedProps:C,shouldForwardComponentProp:!0,ownerState:g}),[D,O]=jp(`list`,{className:_.list,elementType:yx,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,H.jsx)(_x,{disableAutoFocus:r,onClose:s,anchorOrigin:{vertical:`bottom`,horizontal:h?`right`:`left`},transformOrigin:h?mx:hx,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,H.jsx)(D,{actions:b,autoFocus:v,autoFocusItem:y,variant:d,...O,children:i})})}),xx=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Sx=e=>{let{disabled:t,dense:n,divider:r,disableGutters:i,selected:a,classes:o}=e,s=El({root:[`root`,n&&`dense`,t&&`disabled`,!i&&`gutters`,r&&`divider`,a&&`selected`]},wf,o);return{...o,...s}},Cx=G(gm,{shouldForwardProp:e=>Ad(e)||e===`classes`,name:`MuiMenuItem`,slot:`Root`,overridesResolver:xx})(Md(({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`}},[`&.${Tf.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${Tf.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${Tf.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)}},[`&.${Tf.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Tf.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${Ny.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${Ny.inset}`]:{marginLeft:52},[`& .${Sb.root}`]:{marginTop:0,marginBottom:0},[`& .${Sb.inset}`]:{paddingLeft:36},[`& .${_b.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,[`& .${_b.root} svg`]:{fontSize:`1.25rem`}}}]}))),wx=I.forwardRef(function(e,t){let n=Nd({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=Yb(),m=I.useContext(ob),h=I.useMemo(()=>({dense:a||m.dense||!1,disableGutters:s}),[m.dense,a,s]),g=Qb(),_=ep(),v=g.suppressInitialFocusVisible,y=g.itemsFocusableWhenDisabled,b=I.useRef(null);Fd(()=>{r&&b.current&&Wb(b.current,p)},[r]);let x={...n,dense:h.dense,divider:o,disableGutters:s},S=Sx(n),{root:C,...w}=S,T=kb({id:_,ref:t,disabled:n.disabled,focusableWhenDisabled:y,selected:n.selected}),E=Pd(b,T.ref),D;return u===void 0?g.variant===`selectedMenu`?D=T.tabIndex:(!n.disabled||y)&&(D=-1):D=u,(0,H.jsx)(ob.Provider,{value:h,children:(0,H.jsx)(Cx,{ref:E,role:l,tabIndex:D,component:i,internalNativeButton:!1,focusableWhenDisabled:y,suppressFocusVisible:v,focusVisibleClassName:U(S.focusVisible,c),className:U(S.root,d),...f,ownerState:x,classes:w})})}),Tx=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return El({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,`icon${K(n)}`,a&&`iconOpen`,r&&`disabled`]},Ef,t)},Ex=G(`select`,{name:`MuiNativeSelect`})(({theme:e})=>({MozAppearance:`none`,WebkitAppearance:`none`,userSelect:`none`,borderRadius:0,cursor:`pointer`,"&:focus":{borderRadius:0},[`&.${Df.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}}}]})),Dx=G(Ex,{name:`MuiNativeSelect`,slot:`Select`,shouldForwardProp:Ad,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Df.multiple}`]:t.multiple}]}})({}),Ox=G(`svg`,{name:`MuiNativeSelect`})(({theme:e})=>({position:`absolute`,right:0,top:`calc(50% - .5em)`,pointerEvents:`none`,color:(e.vars||e).palette.action.active,[`&.${Df.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}}]})),kx=G(Ox,{name:`MuiNativeSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${K(n.variant)}`],n.open&&t.iconOpen]}})({}),Ax=I.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=Tx(l);return(0,H.jsxs)(I.Fragment,{children:[(0,H.jsx)(Dx,{ownerState:l,className:U(u.select,n),disabled:r,ref:o||t,...c}),e.multiple?null:(0,H.jsx)(kx,{as:a,ownerState:l,className:u.icon})]})}),jx,Mx=G(`fieldset`,{name:`MuiNotchedOutlined`,shouldForwardProp:Ad})({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%`}),Nx=G(`legend`,{name:`MuiNotchedOutlined`,shouldForwardProp:Ad})(Md(({theme:e})=>({float:`unset`,width:`auto`,overflow:`hidden`,variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:`11px`,...ef(e,`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,...ef(e,`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%`,...ef(e,`max-width`,{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function Px(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,H.jsx)(Mx,{"aria-hidden":!0,className:r,ownerState:c,...o,children:(0,H.jsx)(Nx,{ownerState:c,children:s?(0,H.jsx)(`span`,{children:i}):jx||=(0,H.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``})})})}var Fx=e=>{let{classes:t}=e,n=El({root:[`root`],notchedOutline:[`notchedOutline`],input:[`input`]},Of,t);return{...t,...n}},Ix=G(cf,{shouldForwardProp:e=>Ad(e)||e===`classes`,name:`MuiOutlinedInput`,slot:`Root`,overridesResolver:af})(Md(({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 .${kf.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${kf.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${kf.focused} .${kf.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(Tm()).map(([t])=>({props:{color:t},style:{[`&.${kf.focused} .${kf.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${kf.error} .${kf.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${kf.disabled} .${kf.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`}}]}})),Lx=G(Px,{name:`MuiOutlinedInput`,slot:`NotchedOutline`})(Md(({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}})),Rx=G(lf,{name:`MuiOutlinedInput`,slot:`Input`,overridesResolver:of})(Md(({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}}]}))),zx=I.forwardRef(function(e,t){let n=Nd({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=Fx(n),[p,m]=Td({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??Ix,_=c.input??Rx,[v,y]=jp(`notchedOutline`,{elementType:Lx,className:f.notchedOutline,shouldForwardComponentProp:!0,ownerState:h,externalForwardedProps:{slots:c,slotProps:l},additionalProps:{label:a!=null&&a!==``&&p.required?(0,H.jsxs)(I.Fragment,{children:[a,` `,`*`]}):a}});return(0,H.jsx)(df,{slots:{root:g,input:_},slotProps:l,renderSuffix:e=>(0,H.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}})});zx.muiName=`Input`;var Bx=Yf((0,H.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`),Vx=Yf((0,H.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`),Hx=G(`span`,{name:`MuiRadioButtonIcon`,shouldForwardProp:Ad})({position:`relative`,display:`flex`}),Ux=G(Bx,{name:`MuiRadioButtonIcon`})({transform:`scale(1)`}),Wx=G(Vx,{name:`MuiRadioButtonIcon`})(Md(({theme:e})=>({left:0,position:`absolute`,transform:`scale(0)`,...ef(e,`transform`,{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest}),variants:[{props:{checked:!0},style:{transform:`scale(1)`,...ef(e,`transform`,{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}}]})));function Gx(e){let{checked:t=!1,classes:n={},fontSize:r}=e,i={...e,checked:t};return(0,H.jsxs)(Hx,{className:n.root,ownerState:i,children:[(0,H.jsx)(Ux,{fontSize:r,className:n.background,ownerState:i}),(0,H.jsx)(Wx,{fontSize:r,className:n.dot,ownerState:i})]})}var Kx=I.createContext(void 0);function qx(){return I.useContext(Kx)}var Jx=e=>{let{classes:t,color:n,size:r}=e,i={root:[`root`,`color${K(n)}`,r!==`medium`&&`size${K(r)}`]};return{...t,...El(i,Af,t)}},Yx=G(zv,{shouldForwardProp:e=>Ad(e)||e===`classes`,name:`MuiRadio`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.size!==`medium`&&t[`size${K(n.size)}`],t[`color${K(n.color)}`]]}})(Md(({theme:e})=>({color:(e.vars||e).palette.text.secondary,[`&.${jf.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(Tm()).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(Tm()).map(([t])=>({props:{color:t,disabled:!1},style:{[`&.${jf.checked}`]:{color:(e.vars||e).palette[t].main}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:`transparent`}}}}]})));function mne(e,t){return typeof t==`object`&&t?e===t:String(e)===String(t)}var hne=(0,H.jsx)(Gx,{checked:!0}),gne=(0,H.jsx)(Gx,{}),Xx=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiRadio`}),{checked:r,checkedIcon:i=hne,color:a=`primary`,icon:o=gne,name:s,onChange:c,size:l=`medium`,className:u,disabled:d,disableRipple:f=!1,slots:p={},slotProps:m={},...h}=n,g=wd(),_=d;g&&_===void 0&&(_=g.disabled),_??=!1;let v={...n,disabled:_,disableRipple:f,color:a,size:l},y=Jx(v),b=qx(),x=r,S=Wf(c,b&&b.onChange),C=s;b&&(x===void 0&&(x=mne(b.value,n.value)),C===void 0&&(C=b.name));let w=m.input,[T,E]=jp(`root`,{ref:t,elementType:Yx,className:U(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:I.cloneElement(o,{fontSize:o.props.fontSize??l}),checkedIcon:I.cloneElement(i,{fontSize:i.props.fontSize??l}),disabled:_,name:C,checked:x,slots:p,slotProps:{input:typeof w==`function`?w(v):w}}});return(0,H.jsx)(T,{...E,classes:y})});function _ne(e){return Qs(`MuiRadioGroup`,e)}$s(`MuiRadioGroup`,[`root`,`row`,`error`]);var vne=e=>{let{classes:t,row:n,error:r}=e;return El({root:[`root`,n&&`row`,r&&`error`]},_ne,t)},Zx=I.forwardRef(function(e,t){let{actions:n,children:r,className:i,defaultValue:a,name:o,onChange:s,value:c,...l}=e,u=I.useRef(null),d=vne(e),[f,p]=np({controlled:c,default:a,name:`RadioGroup`});I.useImperativeHandle(n,()=>({focus:()=>{let e=u.current.querySelector(`input:not(:disabled):checked`);e||=u.current.querySelector(`input:not(:disabled)`),e&&e.focus()}}),[]);let m=Pd(t,u),h=ep(o),g=I.useMemo(()=>({name:h,onChange(e){p(e.target.value),s&&s(e,e.target.value)},value:f}),[h,s,p,f]);return(0,H.jsx)(Kx.Provider,{value:g,children:(0,H.jsx)(bte,{role:`radiogroup`,ref:m,className:U(d.root,i),...l,children:r})})}),yne={border:0,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,whiteSpace:`nowrap`,width:`1px`};function Qx(e){return Qs(`MuiSelect`,e)}var $x=$s(`MuiSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`focused`,`icon`,`iconOpen`,`nativeInput`,`error`]);function bne(e){return Object.prototype.hasOwnProperty.call(e.props,`value`)}function eS(e){if(typeof e==`string`||typeof e==`number`)return String(e);let t=``;return I.Children.forEach(e,e=>{typeof e==`string`||typeof e==`number`?t+=String(e):I.isValidElement(e)&&(t+=eS(e.props.children))}),t}function xne(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length;for(let n=0;n<e.length;n+=1){let i=(r+n)%e.length;if(e[i].label.startsWith(t))return i}return-1}function Sne(e,t){return!e.some(e=>e.label[0]===t&&e.label[1]===t)}function Cne(e,t){let n=[],r=-1;for(let i=0;i<e.length;i+=1){let a=e[i];if(!I.isValidElement(a)||!bne(a)||a.props.disabled)continue;let o=eS(a.props.children).trim().toLowerCase();o!==``&&(r===-1&&qb(t,a.props.value)&&(r=n.length),n.push({child:a,label:o,value:a.props.value}))}return{options:n,selectedIndex:r}}var wne,tS=2,Tne=400,nS=200,Ene=750,rS=` `,Dne=`ArrowUp`,One=`ArrowDown`,kne=`Enter`;function iS(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-tS&&e.clientX<=n.right+tS&&e.clientY>=n.top-tS&&e.clientY<=n.bottom+tS}var Ane=G(Ex,{name:`MuiSelect`,slot:`Select`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`&.${$x.select}`]:t.select},{[`&.${$x.select}`]:t[n.variant]},{[`&.${$x.error}`]:t.error},{[`&.${$x.multiple}`]:t.multiple}]}})({[`&.${$x.select}`]:{height:`auto`,minHeight:`1.4375em`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,overflow:`hidden`}}),jne=G(Ox,{name:`MuiSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.open&&t.iconOpen]}})({}),Mne=G(`input`,{shouldForwardProp:e=>kd(e)&&e!==`classes`,name:`MuiSelect`,slot:`NativeInput`})({bottom:0,left:0,position:`absolute`,opacity:0,pointerEvents:`none`,width:`100%`,boxSizing:`border-box`}),Nne=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return El({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,a&&`iconOpen`,r&&`disabled`],nativeInput:[`nativeInput`]},Qx,t)},Pne=I.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:D,renderValue:O,required:ee,SelectDisplayProps:te={},tabIndex:k,type:A,value:j,variant:M=`standard`,...ne}=e,[re,ie]=np({controlled:j,default:l,name:`Select`}),[ae,oe]=np({controlled:E,default:c,name:`Select`}),N=I.useRef(null),se=I.useRef(null),ce=I.useRef(null),P=I.useRef(!1),le=I.useRef(!1),ue=I.useRef(null),de=I.useRef(!1),F=I.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),fe=I.useRef({buffer:``,previousSearchIndex:null,matchedIndex:null}),pe=Xp(),me=Xp(),he=Xp(),[ge,_e]=I.useState(null),{current:ve}=I.useRef(E!=null),[ye,be]=I.useState(),[xe,Se]=I.useState(null),Ce=Pd(t,m),L=I.useCallback(e=>{se.current=e,e&&_e(e)},[]),R=ge?.parentNode;I.useImperativeHandle(Ce,()=>({focus:()=>{se.current.focus()},node:N.current,value:re}),[re]);let z=ge!==null&&ae,we=I.useCallback(()=>{he.clear(),fe.current.buffer=``,fe.current.previousSearchIndex=null,fe.current.matchedIndex=null},[he]);Fd(()=>{P.current=z,z&&we()},[z,we]);let Te=I.useCallback(()=>{pe.clear(),me.clear()},[pe,me]),Ee=I.useCallback(()=>{Te(),de.current=!1,F.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},[Te]),De=I.useCallback(()=>{ue.current&&=(ue.current(),null)},[]);I.useEffect(()=>{z||(Ee(),De())},[z,Ee,De]),I.useEffect(()=>()=>{Ee(),De(),we()},[Ee,De,we]),I.useEffect(()=>{if(!z||!R||a||typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{be(R.clientWidth)});return e.observe(R),()=>{e.disconnect()}},[z,R,a]),I.useEffect(()=>{c&&ae&&ge&&!ve&&(be(a?null:R.clientWidth),se.current.focus())},[ge,a]),I.useEffect(()=>{i&&se.current.focus()},[i]),I.useEffect(()=>{if(!h)return;let e=Id(se.current).getElementById(h);if(e){let t=()=>{getSelection().isCollapsed&&se.current.focus()};return e.addEventListener(`click`,t),()=>{e.removeEventListener(`click`,t)}}},[h]);let Oe=rp((e,t)=>{e||(Ee(),De()),e?(we(),Se(Gb(t)),T&&T(t)):(Se(null),x&&x(t)),ve||(P.current=e,be(a?null:R.clientWidth),oe(e))}),ke=()=>{Ee(),le.current?me.start(nS,()=>{F.current.allowUnselectedMouseUp=!0,pe.start(nS,()=>{F.current.allowSelectedMouseUp=!0})}):pe.start(Tne,()=>{F.current.allowSelectedMouseUp=!0,F.current.allowUnselectedMouseUp=!0})},Ae=e=>{if(w?.(e),e.button!==0||(e.preventDefault(),!se.current))return;se.current.focus();let t=Id(e.currentTarget);ke(),De();let n=e=>{ue.current=null,se.current&&(iS(e,se.current)||iS(e,ce.current)||!P.current&&ve||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=I.Children.toArray(o),B=e=>{let t=Me.find(t=>t.props.value===e.target.value);t!==void 0&&(ie(t.props.value),b&&b(e,t))},Ne=(e,t,n)=>{if(ie(n),b){let r=e.nativeEvent||e,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:n,name:v}}),b(i,t)}},Pe=e=>t=>{de.current=!1;let n;if(t.currentTarget.hasAttribute(`tabindex`)){if(_){n=Array.isArray(re)?re.slice():[];let t=re.indexOf(e.props.value);t===-1?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;e.props.onClick&&e.props.onClick(t),re!==n&&Ne(t,e,n),_||Oe(!1,t)}},Fe=(e,t)=>n=>{if(e.props.onMouseUp?.(n),de.current){de.current=!1;return}let r=!F.current.allowSelectedMouseUp&&t,i=!F.current.allowUnselectedMouseUp&&!t;r||i||n.currentTarget.click()},Ie=e=>{let t=fe.current,n=t.buffer!==``;if(z||_||u||e.defaultPrevented||e.nativeEvent?.isComposing||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey||e.key===rS&&!n)return!1;e.key===rS&&e.preventDefault();let r=t.buffer===``,{options:i,selectedIndex:a}=Cne(Me,re);if(i.length===0)return e.key!==rS&&we(),!0;r&&(t.previousSearchIndex=a);let o=e.key.toLowerCase();t.buffer===o&&Sne(i,o)&&(t.buffer=``,t.previousSearchIndex=t.matchedIndex),t.buffer+=o,he.start(Ene,we);let s=xne(i,t.buffer,(t.previousSearchIndex??-1)+1);if(s!==-1){let n=i[s];return t.matchedIndex=s,qb(re,n.value)||Ne(e,n.child,n.value),!0}return e.key!==rS&&we(),!0},Le=e=>{if(!D){let t=Ie(e),n=e.key===rS||e.key===Dne||e.key===One||e.key===kne;!t&&n&&(e.preventDefault(),Oe(!0,e)),C?.(e)}},Re=e=>{we(),!z&&y&&(Object.defineProperty(e,"target",{writable:!0,value:{value:re,name:v}}),y(e))},ze=e=>t=>{e?.props?.onKeyDown?.(t),t.key===rS&&t.target===t.currentTarget&&!t.defaultPrevented&&(t.preventDefault(),t.repeat||t.currentTarget.click())};delete ne[`aria-invalid`];let Be,Ve,He=[],Ue=!1,We=!1;(Bd({value:re})||d)&&(O?Be=O(re):Ue=!0);let Ge=Me.map(e=>{if(!I.isValidElement(e))return null;let t;if(_){if(!Array.isArray(re))throw Error(Lr(2));t=re.some(t=>qb(t,e.props.value)),t&&Ue&&He.push(e.props.children)}else t=qb(re,e.props.value),t&&Ue&&(Ve=e.props.children);return t&&(We=!0),I.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===rS&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},onKeyDown:ze(e),role:`option`,selected:t,value:void 0,"data-value":e.props.value})});Fd(()=>{le.current=We,!z&&!_&&!We&&we()},[We,_,z,we]),Ue&&(Be=_?He.length===0?null:He.reduce((e,t,n)=>(e.push(t),n<He.length-1&&e.push(`, `),e),[]):Ve);let Ke=ye;!a&&ve&&ge&&(Ke=R.clientWidth);let qe;qe=k===void 0?u?null:0:k;let Je=te.id||(v?`mui-component-select-${v}`:void 0),Ye={...e,variant:M,value:re,open:z,error:f},Xe=Nne(Ye),Ze=typeof g.slotProps?.paper==`function`?g.slotProps.paper(Ye):g.slotProps?.paper,Qe=Pd(Ze?.ref,ce),$e=typeof g.slotProps?.list==`function`?g.slotProps.list(Ye):g.slotProps?.list,et=$c(),tt=$c();return(0,H.jsxs)(I.Fragment,{children:[(0,H.jsx)(Ane,{as:`div`,ref:L,tabIndex:qe,role:`combobox`,"aria-controls":z?et:void 0,"aria-disabled":u?`true`:void 0,"aria-expanded":z?`true`:`false`,"aria-haspopup":`listbox`,"aria-readonly":D?`true`:void 0,"aria-label":r,"aria-labelledby":h,"aria-describedby":n,"aria-required":ee?`true`:void 0,"aria-invalid":f?`true`:void 0,onKeyDown:Le,onMouseDown:u||D?null:Ae,onBlur:Re,onFocus:S,...te,ownerState:Ye,className:U(te.className,Xe.select,s),id:Je,children:Kb(Be)?wne||=(0,H.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``}):Be}),(0,H.jsx)(Mne,{"aria-invalid":f,value:Array.isArray(re)?re.join(`,`):re,name:v,ref:N,"aria-hidden":!0,onChange:B,tabIndex:-1,disabled:u,readOnly:D,className:Xe.nativeInput,autoFocus:i,required:ee,...ne,id:ne.id??tt,ownerState:Ye}),(0,H.jsx)(jne,{as:p,className:Xe.icon,ownerState:Ye}),(0,H.jsx)(Xb,{value:xe,children:(0,H.jsx)(bx,{id:`menu-${v||``}`,anchorEl:R,open:z,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:et,...$e},paper:{...Ze,ref:Qe,style:{minWidth:Ke,...Ze?.style}}},children:Ge})})]})}),Fne=e=>{let{classes:t}=e,n=El({root:[`root`]},Qx,t);return{...t,...n}},aS={name:`MuiSelect`,slot:`Root`,shouldForwardProp:e=>Ad(e)&&e!==`variant`},Ine=G(Uy,aS)(``),Lne=G(zx,aS)(``),Rne=G(Ly,aS)(``),oS=I.forwardRef(function(e,t){let n=Nd({name:`MuiSelect`,props:e}),{autoWidth:r=!1,children:i,classes:a={},className:o,defaultOpen:s=!1,displayEmpty:c=!1,IconComponent:l=O_,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=_?Ax:Pne,[E]=Td({props:n,states:[`variant`,`error`]}),D=E.variant||C,O={...n,variant:D,classes:a},ee=Fne(O),{root:te,...k}=ee,A=d||{standard:(0,H.jsx)(Ine,{ownerState:O}),outlined:(0,H.jsx)(Lne,{label:p,ownerState:O}),filled:(0,H.jsx)(Rne,{ownerState:O})}[D],j=Pd(t,r_(A));return(0,H.jsx)(I.Fragment,{children:I.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?to(k,f.classes):k,...d?d.props.inputProps:{}},...(g&&_||c)&&D===`outlined`?{notched:!0}:{},ref:j,className:U(A.props.className,o,ee.root),...!d&&{variant:D},...w})})});oS.muiName=`Select`;function zne(e,t,n=(e,t)=>e===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}var Bne=2,Vne=[],sS={};function cS(e,t,n,r,i){return n===1?Math.min(e+t,i):Math.max(e-t,r)}function lS(e,t){return e-t}function uS(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)??sS;return r==null?r:n>=0&&e[n]===e[r]?n:r}function dS(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 fS(e,t,n){return(e-t)*100/(n-t)}function Hne(e,t,n){return(n-t)*e+t}function Une(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 Wne(e,t,n){let r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(Une(t)))}function pS(e,t,n){let r=e.slice();return r[n]=t,r.sort(lS)}function mS(e,t,n,r){let i=Rd(gd(e.current));if(!py(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 hS(e,t){return typeof e==`number`&&typeof t==`number`?e===t:typeof e==`object`&&typeof t==`object`&&zne(e,t)}var Gne={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}%`})}},Kne=e=>e;function qne(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=Kne,step:h=1,shiftStep:g=10,tabIndex:_,value:v}=e,y=I.useRef(void 0),b=I.useRef(null),[x,S]=I.useState(-1),[C,w]=I.useState(-1),[T,E]=I.useState(!1),D=I.useRef(0),O=I.useRef(-1),ee=I.useRef(!1),te=I.useRef(-1),k=hd(()=>{b.current!=null&&(cancelAnimationFrame(b.current),b.current=null)}),A=I.useRef(null),[j,M]=tp({controlled:v,default:n??c,name:`Slider`}),ne=hd((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)}),re=Array.isArray(j),ie=I.useMemo(()=>{if(typeof j==`number`)return[bc(j,c,s)];if(j==null)return[c];let e=j.slice().sort(lS);for(let t=0;t<e.length;t+=1){let n=e[t];e[t]=n==null?c:bc(n,c,s)}return e},[j,c,s]),ae=I.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:Vne},[o,h,c,s]),oe=I.useMemo(()=>{let e=Array(ae.length);for(let t=0;t<ae.length;t+=1)e[t]=ae[t].value;return e},[ae]),[N,se]=I.useState(-1),ce=I.useRef(null),P=md(p,ce),le=e=>t=>{let n=Number(t.currentTarget.getAttribute(`data-index`));qp(t.target)&&se(n),w(n),e?.onFocus?.(t)},ue=e=>t=>{qp(t.target)||se(-1),w(-1),e?.onBlur?.(t)},de=(e,t)=>{let n=Number(e.currentTarget.getAttribute(`data-index`)),r=ie[n],a=oe.indexOf(r),o=t;if(ae&&h==null){let e=oe[oe.length-1];o=o>=e?e:o<=oe[0]?oe[0]:o<r?oe[a-1]:oe[a+1]}if(o=bc(o,c,s),re){i&&(o=bc(o,ie[n-1]||-1/0,ie[n+1]||1/0));let e=o;o=pS(ie,o,n);let t=n;i||(t=o.indexOf(e)),mS(ce,t)}M(o),se(n),u&&!hS(o,j)&&ne(e,o,n),d&&d(e,A.current??o)},F=e=>t=>{if([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`PageUp`,`PageDown`,`Home`,`End`].includes(t.key)){t.preventDefault();let e=Number(t.currentTarget.getAttribute(`data-index`)),n=ie[e],r=null;if(h!=null){let e=t.shiftKey?g:h;switch(t.key){case`ArrowUp`:r=cS(n,e,1,c,s);break;case`ArrowRight`:r=cS(n,e,a?-1:1,c,s);break;case`ArrowDown`:r=cS(n,e,-1,c,s);break;case`ArrowLeft`:r=cS(n,e,a?1:-1,c,s);break;case`PageUp`:r=cS(n,g,1,c,s);break;case`PageDown`:r=cS(n,g,-1,c,s);break;case`Home`:r=c;break;case`End`:r=s;break;default:break}}else if(ae){let e=oe[oe.length-1],i=oe.indexOf(n),o=[a?`ArrowRight`:`ArrowLeft`,`ArrowDown`,`PageDown`,`Home`],s=[a?`ArrowLeft`:`ArrowRight`,`ArrowUp`,`PageUp`,`End`];o.includes(t.key)?r=i===0?oe[0]:oe[i-1]:s.includes(t.key)&&(r=i===oe.length-1?e:oe[i+1])}r!=null&&de(t,r)}e?.onKeyDown?.(t)};hc(()=>{let e=Rd(gd(ce.current));r&&py(ce.current,e)&&e!=null&&`blur`in e&&e.blur()},[r]),r&&x!==-1&&S(-1),r&&N!==-1&&se(-1);let fe=e=>t=>{e.onChange?.(t),de(t,t.currentTarget.valueAsNumber)},pe=I.useRef(void 0),me=f;a&&f===`horizontal`&&(me+=`-reverse`);let he=e=>{let{current:t}=ce;if(!t)return null;let{width:n,height:r,bottom:a,left:o}=t.getBoundingClientRect(),l;l=me.startsWith(`vertical`)?(a-e.y)/r:(e.x-o)/n,me.includes(`-reverse`)&&(l=1-l);let u;if(u=Hne(l,c,s),h)u=Wne(u,h,c);else{let e=uS(oe,u);u=oe[e]}u=bc(u,c,s);let d=0;if(re){let e=pe.current!==-1;d=e?pe.current:uS(ie,u,O.current),i&&(u=bc(u,ie[d-1]||-1/0,ie[d+1]||1/0));let t=u;u=pS(ie,u,d),i&&e||(d=u.indexOf(t),pe.current=d)}return{newValue:u,activeIndex:d}},ge=hd(e=>{if(`pointerId`in e&&e.pointerId!==te.current)return;let t=dS(e,y);if(!t)return;if(D.current+=1,e.type===`pointermove`&&e.buttons===0){_e(e);return}let n=he(t);n&&(mS(ce,n.activeIndex,S,!1),O.current=n.activeIndex,M(n.newValue),!T&&D.current>Bne&&E(!0),u&&!hS(n.newValue,j)&&ne(e,n.newValue,n.activeIndex))}),_e=hd(e=>{if(`pointerId`in e&&e.pointerId!==te.current)return;let t=dS(e,y);if(E(!1),!t)return;let n=he(t);S(-1),e.type===`touchend`&&w(-1),n&&d&&d(e,A.current??n.newValue),`pointerType`in e&&ce.current?.hasPointerCapture(e.pointerId)&&ce.current.releasePointerCapture(e.pointerId),y.current=void 0,te.current=-1,ye()}),ve=hd(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=dS(e,y);if(n!==!1){pe.current=-1;let t=he(n);t&&(mS(ce,t.activeIndex,S,!1),O.current=t.activeIndex,M(t.newValue),u&&!hS(t.newValue,j)&&ne(e,t.newValue,t.activeIndex))}D.current=0;let i=gd(ce.current);i.addEventListener(`touchmove`,ge,{passive:!0}),i.addEventListener(`touchend`,_e,{passive:!0})}),ye=I.useCallback(()=>{let e=gd(ce.current);e.removeEventListener(`pointermove`,ge),e.removeEventListener(`pointerup`,_e),e.removeEventListener(`touchmove`,ge),e.removeEventListener(`touchend`,_e)},[_e,ge]);I.useEffect(()=>{let e=ce.current;if(e)return e.addEventListener(`touchstart`,ve,{passive:!0}),()=>{e.removeEventListener(`touchstart`,ve),k(),ye()}},[ye,ve,k]),I.useEffect(()=>{r&&(ye(),k())},[r,ye,k]);let be=e=>t=>{if(e.onPointerDown?.(t),t.pointerType===`touch`&&(ee.current=!0),r||t.defaultPrevented||t.button!==0)return;let n=dS(t,y);if(n!==!1){pe.current=-1;let e=he(n);if(e){let n=ce.current?.querySelector(`input[type="range"][data-index="${e.activeIndex}"]`),r=gd(ce.current),i=n!=null&&n===Rd(r);S(e.activeIndex),O.current=e.activeIndex,i?t.preventDefault():(k(),b.current=requestAnimationFrame(()=>{b.current=null,mS(ce,e.activeIndex,void 0,!1)})),M(e.newValue),u&&!hS(e.newValue,j)&&ne(t,e.newValue,e.activeIndex)}}D.current=0,te.current=t.pointerId;let i=gd(ce.current);try{t.currentTarget.setPointerCapture(t.pointerId)}catch{}i.addEventListener(`pointermove`,ge,{passive:!0}),i.addEventListener(`pointerup`,_e)},xe=fS(re?ie[0]:c,c,s),Se=fS(ie[ie.length-1],c,s)-xe,Ce=(e=sS)=>{let t=Op(e),n={onPointerDown:be(t)},r={...t,...n};return{...e,ref:P,...r}},L=e=>t=>{e.onMouseOver?.(t);let n=Number(t.currentTarget.getAttribute(`data-index`));w(n)},R=e=>t=>{e.onMouseLeave?.(t),w(-1)},z=(e=sS)=>{let t=Op(e),n={onMouseOver:L(t),onMouseLeave:R(t)};return{...e,...t,...n}},we=e=>{let t;return re?x===e?t=2:O.current===e&&(t=1):x===e&&(t=1),{pointerEvents:x!==-1&&x!==e?`none`:void 0,zIndex:t}},Te;return f===`vertical`&&(Te=a?`vertical-rl`:`vertical-lr`),{active:x,axis:me,axisProps:Gne,dragging:T,focusedThumbIndex:N,getHiddenInputProps:(n=sS)=>{let i=Op(n),o={onChange:fe(i),onFocus:le(i),onBlur:ue(i),onKeyDown:F(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:{...yne,direction:a?`rtl`:`ltr`,width:`100%`,height:`100%`,writingMode:Te}}},getRootProps:Ce,getThumbProps:z,marks:ae,open:C,range:re,rootRef:P,trackLeap:Se,trackOffset:xe,values:ie,getThumbStyle:we}}var Jne=e=>{let{open:t}=e;return{offset:U(t&&Nf.valueLabelOpen),circle:Nf.valueLabelCircle,label:Nf.valueLabelLabel}};function Yne(e){let{children:t,className:n,value:r}=e,i=Jne(e);return t?I.cloneElement(t,{className:t.props.className},(0,H.jsxs)(I.Fragment,{children:[t.props.children,(0,H.jsx)(`span`,{className:U(i.offset,n),"aria-hidden":!0,children:(0,H.jsx)(`span`,{className:i.circle,children:(0,H.jsx)(`span`,{className:i.label,children:r})})})]})):null}function gS(e){return e}var Xne=G(`span`,{name:`MuiSlider`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`color${K(n.color)}`],n.size!==`medium`&&t[`size${K(n.size)}`],n.marked&&t.marked,n.orientation===`vertical`&&t.vertical,n.track===`inverted`&&t.trackInverted,n.track===!1&&t.trackFalse]}})(Md(({theme:e})=>({borderRadius:12,boxSizing:`content-box`,display:`inline-block`,position:`relative`,cursor:`pointer`,touchAction:`none`,WebkitTapHighlightColor:`transparent`,"@media print":{colorAdjust:`exact`},[`&.${Nf.disabled}`]:{pointerEvents:`none`,cursor:`default`,color:(e.vars||e).palette.grey[400]},[`&.${Nf.dragging}`]:{[`& .${Nf.thumb}, & .${Nf.track}`]:{transition:`none`}},variants:[...Object.entries(e.palette).filter(Tm()).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}}]}))),Zne=G(`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}}]}),Qne=G(`span`,{name:`MuiSlider`,slot:`Track`})(Md(({theme:e})=>({display:`block`,position:`absolute`,borderRadius:`inherit`,border:`1px solid currentColor`,backgroundColor:`currentColor`,...ef(e,[`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(Tm()).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)})}}}))]}))),$ne=G(`span`,{name:`MuiSlider`,slot:`Thumb`})(Md(({theme:e})=>({position:`absolute`,width:20,height:20,boxSizing:`border-box`,borderRadius:`50%`,outline:0,backgroundColor:`currentColor`,display:`flex`,alignItems:`center`,justifyContent:`center`,...ef(e,[`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%)`},[`&.${Nf.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(Tm()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${Nf.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.alpha((e.vars||e).palette[t].main,.16)}`,"@media (hover: none)":{boxShadow:`none`}},[`&.${Nf.active}`]:{boxShadow:`0px 0px 0px 14px ${e.alpha((e.vars||e).palette[t].main,.16)}`}}}))]}))),ere=G(Yne,{name:`MuiSlider`,slot:`ValueLabel`})(Md(({theme:e})=>({zIndex:1,whiteSpace:`nowrap`,...e.typography.body2,fontWeight:500,...ef(e,[`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%`},[`&.${Nf.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%`},[`&.${Nf.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`}}]}))),tre=G(`span`,{name:`MuiSlider`,slot:`Mark`,shouldForwardProp:e=>kd(e)&&e!==`markActive`,overridesResolver:(e,t)=>{let{markActive:n}=e;return[t.mark,n&&t.markActive]}})(Md(({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}}]}))),_S=G(`span`,{name:`MuiSlider`,slot:`MarkLabel`,shouldForwardProp:e=>kd(e)&&e!==`markLabelActive`})(Md(({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}}]}))),vS=e=>{let{disabled:t,dragging:n,marked:r,orientation:i,track:a,classes:o,color:s,size:c}=e;return El({root:[`root`,t&&`disabled`,n&&`dragging`,r&&`marked`,i===`vertical`&&`vertical`,a===`inverted`&&`trackInverted`,a===!1&&`trackFalse`,s&&`color${K(s)}`,c&&`size${K(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`]},Mf,o)},yS=({children:e})=>e,bS=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiSlider`}),r=Gc(),{"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=gS,slotProps:T={},slots:E={},tabIndex:D,track:O=`normal`,value:ee,valueLabelDisplay:te=`off`,valueLabelFormat:k=gS,...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:M,getRootProps:ne,getHiddenInputProps:re,getThumbProps:ie,open:ae,active:oe,axis:N,focusedThumbIndex:se,range:ce,dragging:P,marks:le,values:ue,trackOffset:de,trackLeap:F,getThumbStyle:fe}=qne({...j,rootRef:t});j.marked=le.length>0&&le.some(e=>e.label),j.dragging=P,j.focusedThumbIndex=se;let pe=vS(j),me={slots:E,slotProps:T},[he,ge]=jp(`root`,{elementType:Xne,getSlotProps:ne,externalForwardedProps:{...me,...A},ownerState:j,className:[pe.root,l]}),[_e,ve]=jp(`rail`,{elementType:Zne,externalForwardedProps:me,ownerState:j,className:pe.rail}),[ye,be]=jp(`track`,{elementType:Qne,externalForwardedProps:me,additionalProps:{style:{...M[N].offset(de),...M[N].leap(F)}},ownerState:j,className:pe.track}),[xe,Se]=jp(`thumb`,{elementType:$ne,getSlotProps:ie,externalForwardedProps:me,ownerState:j,className:pe.thumb}),[Ce,L]=jp(`valueLabel`,{elementType:ere,externalForwardedProps:me,ownerState:j,className:pe.valueLabel}),[R,z]=jp(`mark`,{elementType:tre,externalForwardedProps:me,ownerState:j,className:pe.mark}),[we,Te]=jp(`markLabel`,{elementType:_S,externalForwardedProps:me,ownerState:j,className:pe.markLabel}),[Ee,De]=jp(`input`,{elementType:`input`,getSlotProps:re,externalForwardedProps:me,ownerState:j});return(0,H.jsxs)(he,{...ge,children:[(0,H.jsx)(_e,{...ve}),(0,H.jsx)(ye,{...be}),le.filter(e=>e.value>=g&&e.value<=h).map((e,t)=>{let n=fS(e.value,g,h),r=M[N].offset(n),i;return i=O===!1?ue.includes(e.value):O===`normal`&&(ce?e.value>=ue[0]&&e.value<=ue[ue.length-1]:e.value<=ue[0])||O===`inverted`&&(ce?e.value<=ue[0]||e.value>=ue[ue.length-1]:e.value>=ue[0]),(0,H.jsxs)(I.Fragment,{children:[(0,H.jsx)(R,{"data-index":t,...z,...!fd(R)&&{markActive:i},style:{...r,...z.style},className:U(z.className,i&&pe.markActive)}),e.label==null?null:(0,H.jsx)(we,{"aria-hidden":!0,"data-index":t,...Te,...!fd(we)&&{markLabelActive:i},style:{...r,...Te.style},className:U(pe.markLabel,Te.className,i&&pe.markLabelActive),children:e.label})]},t)}),ue.map((e,t)=>{let n=fS(e,g,h),r=M[N].offset(n),s=te===`off`?yS:Ce;return(0,H.jsx)(s,{...!fd(s)&&{valueLabelFormat:k,valueLabelDisplay:te,value:typeof k==`function`?k(w(e),t):k,index:t,open:ae===t||oe===t||te===`on`,disabled:d},...L,children:(0,H.jsx)(xe,{"data-index":t,...Se,className:U(pe.thumb,Se.className,oe===t&&pe.active,se===t&&pe.focusVisible),style:{...r,...fe(t),...Se.style},children:(0,H.jsx)(Ee,{"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:ue[t],...De})})},t)})]})});function xS(e){return Qs(`MuiTooltip`,e)}var SS=$s(`MuiTooltip`,[`popper`,`popperInteractive`,`popperArrow`,`popperClose`,`tooltip`,`tooltipArrow`,`touch`,`tooltipPlacementLeft`,`tooltipPlacementRight`,`tooltipPlacementTop`,`tooltipPlacementBottom`,`arrow`]);function CS(e){return Math.round(e*1e5)/1e5}var wS=e=>{let{classes:t,disableInteractive:n,arrow:r,touch:i,placement:a}=e;return El({popper:[`popper`,!n&&`popperInteractive`,r&&`popperArrow`],tooltip:[`tooltip`,r&&`tooltipArrow`,i&&`touch`,`tooltipPlacement${K(a.split(`-`)[0])}`],arrow:[`arrow`]},xS,t)},TS=G(h_,{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]}})(Md(({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"] .${SS.arrow}`]:{top:0,marginTop:`-0.71em`,"&::before":{transformOrigin:`0 100%`}},[`&[data-popper-placement*="top"] .${SS.arrow}`]:{bottom:0,marginBottom:`-0.71em`,"&::before":{transformOrigin:`100% 0`}},[`&[data-popper-placement*="right"] .${SS.arrow}`]:{height:`1em`,width:`0.71em`,insetInlineStart:0,marginInlineStart:`-0.71em`,"&::before":{transformOrigin:`100% 100%`}},[`&[data-popper-placement*="left"] .${SS.arrow}`]:{height:`1em`,width:`0.71em`,insetInlineEnd:0,marginInlineEnd:`-0.71em`,"&::before":{transformOrigin:`0 0`}}}}]}))),ES=G(`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${K(n.placement.split(`-`)[0])}`]]}})(Md(({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,[`.${SS.popper}[data-popper-placement*="left"] &`]:{transformOrigin:`right center`,marginInlineEnd:`14px`},[`.${SS.popper}[data-popper-placement*="right"] &`]:{transformOrigin:`left center`,marginInlineStart:`14px`},[`.${SS.popper}[data-popper-placement*="top"] &`]:{transformOrigin:`center bottom`,marginBottom:`14px`},[`.${SS.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:`${CS(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:e})=>e.touch,style:{[`.${SS.popper}[data-popper-placement*="left"] &`]:{marginInlineEnd:`24px`},[`.${SS.popper}[data-popper-placement*="right"] &`]:{marginInlineStart:`24px`},[`.${SS.popper}[data-popper-placement*="top"] &`]:{marginBottom:`24px`},[`.${SS.popper}[data-popper-placement*="bottom"] &`]:{marginTop:`24px`}}}]}))),DS=G(`span`,{name:`MuiTooltip`,slot:`Arrow`})(Md(({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)`}}))),OS=!1,kS=new Yp,AS={x:0,y:0};function jS(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}var X=I.forwardRef(function(e,t){let n=Nd({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=I.isValidElement(i)?i:(0,H.jsx)(`span`,{children:i}),D=Dd(),[O,ee]=I.useState(),[te,k]=I.useState(null),A=I.useRef(!1),j=l||m,M=Xp(),ne=Xp(),re=Xp(),ie=Xp(),[ae,oe]=np({controlled:b,default:!1,name:`Tooltip`,state:`open`}),N=ae,se=ep(h),ce=I.useRef(),P=rp(()=>{ce.current!==void 0&&(document.body.style.WebkitUserSelect=ce.current,ce.current=void 0),ie.clear()});I.useEffect(()=>P,[P]);let le=e=>{kS.clear(),OS=!0,oe(!0),y&&!N&&y(e)},ue=rp(e=>{kS.start(800+g,()=>{OS=!1}),oe(!1),v&&N&&v(e),M.start(D.transitions.duration.shortest,()=>{A.current=!1})}),de=e=>{O?.disabled||A.current&&e.type!==`touchstart`||(O&&O.removeAttribute(`title`),ne.clear(),re.clear(),d||OS&&f?ne.start(OS?f:d,()=>{le(e)}):le(e))},F=e=>{ne.clear(),re.start(g,()=>{ue(e)})},[,fe]=I.useState(!1),pe=e=>{let t=e?.target??O;if(!t||t.disabled||!qp(t)){fe(!1);let n=e??new Event(`blur`);!e&&t&&(Object.defineProperty(n,"target",{value:t}),Object.defineProperty(n,"currentTarget",{value:t})),F(n)}},me=e=>{if(O||ee(e.currentTarget),qp(e.target)){let t=e=>{e.target.disabled&&pe(e),e.target.removeEventListener(`blur`,t)};e.target.addEventListener(`blur`,t),fe(!0),de(e)}},he=e=>{A.current=!0;let t=E.props;t.onTouchStart&&t.onTouchStart(e)},ge=e=>{he(e),re.clear(),M.clear(),P(),ce.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect=`none`,ie.start(p,()=>{document.body.style.WebkitUserSelect=ce.current,de(e)})},_e=e=>{E.props.onTouchEnd&&E.props.onTouchEnd(e),P(),re.start(_,()=>{ue(e)})};I.useEffect(()=>{if(!N)return;function e(e){e.key===`Escape`&&ue(e)}return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[ue,N]);let ve=Pd(r_(E),ee,t);!w&&w!==0&&(N=!1);let ye=I.useRef(),be=e=>{let t=E.props;t.onMouseMove&&t.onMouseMove(e),AS={x:e.clientX,y:e.clientY},ye.current&&ye.current.update()},xe={},Se=typeof w==`string`;o?(xe.title=!N&&Se&&!c?w:null,xe[`aria-describedby`]=N?se:null):(xe[`aria-label`]=Se?w:null,xe[`aria-labelledby`]=N&&!Se?se:null);let Ce={...xe,...T,...E.props,className:U(T.className,E.props.className),onTouchStart:he,ref:ve,...m?{onMouseMove:be}:{}},L={};u||(Ce.onTouchStart=ge,Ce.onTouchEnd=_e),c||(Ce.onMouseOver=jS(de,Ce.onMouseOver),Ce.onMouseLeave=jS(F,Ce.onMouseLeave),j||(L.onMouseOver=de,L.onMouseLeave=F)),s||(Ce.onFocus=jS(me,Ce.onFocus),Ce.onBlur=jS(pe,Ce.onBlur),j||(L.onFocus=me,L.onBlur=pe));let R={...n,arrow:r,disableInteractive:j,placement:x,touch:A.current},z=typeof S.popper==`function`?S.popper(R):S.popper,we=I.useMemo(()=>{let e=[{name:`arrow`,enabled:!!te,options:{element:te,padding:4}}];return z?.popperOptions?.modifiers&&(e=e.concat(z.popperOptions.modifiers)),{...z?.popperOptions,modifiers:e}},[te,z?.popperOptions]),Te=wS(R),Ee={slots:C,slotProps:{arrow:S.arrow,popper:z,tooltip:S.tooltip,transition:S.transition}},[De,Oe]=jp(`popper`,{elementType:TS,externalForwardedProps:Ee,ownerState:R,className:Te.popper}),[ke,Ae]=jp(`transition`,{elementType:Hy,externalForwardedProps:Ee,ownerState:R}),[je,Me]=jp(`tooltip`,{elementType:ES,className:Te.tooltip,externalForwardedProps:Ee,ownerState:R}),[B,Ne]=jp(`arrow`,{elementType:DS,className:Te.arrow,externalForwardedProps:Ee,ownerState:R,ref:k});return(0,H.jsxs)(I.Fragment,{children:[I.cloneElement(E,Ce),(0,H.jsx)(De,{as:h_,placement:x,anchorEl:m?{getBoundingClientRect:()=>({top:AS.y,left:AS.x,right:AS.x,bottom:AS.y,width:0,height:0})}:O,popperRef:ye,open:O?N:!1,id:se,transition:!0,...L,...Oe,popperOptions:we,children:({TransitionProps:e})=>(0,H.jsx)(ke,{timeout:D.transitions.duration.shorter,...e,...Ae,children:(0,H.jsxs)(je,{...Me,children:[w,r?(0,H.jsx)(B,{...Ne}):null]})})})]})}),MS=eu({createStyledComponent:G(`div`,{name:`MuiStack`,slot:`Root`}),useThemeProps:e=>Nd({props:e,name:`MuiStack`})}),NS=I.createContext({});function PS(){return I.useContext(NS)}var FS=I.createContext({});function IS(e){return Qs(`MuiStep`,e)}$s(`MuiStep`,[`root`,`horizontal`,`vertical`,`alternativeLabel`,`completed`]);var LS=e=>{let{classes:t,orientation:n,alternativeLabel:r,completed:i}=e;return El({root:[`root`,n,r&&`alternativeLabel`,i&&`completed`]},IS,t)},RS=G(`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`,alternativeLabel:!1,hasConnector:!1},style:{paddingLeft:8}},{props:{orientation:`horizontal`,alternativeLabel:!1,last:!0},style:{paddingRight:8}},{props:{orientation:`horizontal`,alternativeLabel:!1,hasConnector:!0},style:{flex:`1 1 auto`,display:`grid`,gridTemplateColumns:`1fr auto`,alignItems:`center`,gap:8}},{props:{orientation:`vertical`,alternativeLabel:!0},style:{display:`flex`,flexDirection:`column`}},{props:{orientation:`horizontal`,alternativeLabel:!0},style:{flex:1,position:`relative`}}]}),zS=I.forwardRef(function(e,t){let n=Nd({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}=PS(),[y=!1,b=!1,x=!1]=[r,s,c];p===u?y=r===void 0||r:!_&&p>u?b=s===void 0||s:!_&&p<u&&(x=c===void 0||c);let S=I.useMemo(()=>({index:u,last:d,expanded:l,icon:u+1,active:y,completed:b,disabled:x}),[u,d,l,y,b,x]),C=!!m&&u!==0,w={...n,active:y,orientation:g,alternativeLabel:h,completed:b,disabled:x,expanded:l,component:o,hasConnector:C},T=LS(w);return(0,H.jsx)(FS.Provider,{value:S,children:(0,H.jsxs)(RS,{as:o,className:U(T.root,a),ref:t,ownerState:w,role:v?`presentation`:void 0,...f,children:[C?m:null,i]})})}),BS=Yf((0,H.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`),VS=Yf((0,H.jsx)(`path`,{d:`M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z`}),`Warning`);function HS(e){return Qs(`MuiStepIcon`,e)}var US=$s(`MuiStepIcon`,[`root`,`active`,`completed`,`error`,`text`]),WS,GS=e=>{let{classes:t,active:n,completed:r,error:i}=e;return El({root:[`root`,n&&`active`,r&&`completed`,i&&`error`],text:[`text`]},HS,t)},KS=G(Jf,{name:`MuiStepIcon`,slot:`Root`})(Md(({theme:e})=>({display:`block`,...ef(e,`color`,{duration:e.transitions.duration.shortest}),color:(e.vars||e).palette.text.disabled,[`&.${US.completed}, &.${US.active}`]:{color:(e.vars||e).palette.primary.main},[`&.${US.error}`]:{color:(e.vars||e).palette.error.main}}))),qS=G(`text`,{name:`MuiStepIcon`,slot:`Text`})(Md(({theme:e})=>({fill:(e.vars||e).palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily}))),JS=I.forwardRef(function(e,t){let n=Nd({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=GS(l);if(typeof s==`number`||typeof s==`string`){let e=U(i,u.root);return o?(0,H.jsx)(KS,{as:VS,className:e,ref:t,ownerState:l,...c}):a?(0,H.jsx)(KS,{as:BS,className:e,ref:t,ownerState:l,...c}):(0,H.jsxs)(KS,{className:e,ref:t,ownerState:l,...c,children:[WS||=(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`12`}),(0,H.jsx)(qS,{className:u.text,x:`12`,y:`12`,textAnchor:`middle`,dominantBaseline:`central`,ownerState:l,children:s})]})}return s});function YS(e){return Qs(`MuiStepLabel`,e)}var XS=$s(`MuiStepLabel`,[`root`,`horizontal`,`vertical`,`label`,`active`,`completed`,`error`,`disabled`,`iconContainer`,`alternativeLabel`,`labelContainer`]),ZS=e=>{let{classes:t,orientation:n,active:r,completed:i,error:a,disabled:o,alternativeLabel:s}=e;return El({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`]},YS,t)},QS=G(`span`,{name:`MuiStepLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation]]}})({display:`flex`,alignItems:`center`,[`&.${XS.disabled}`]:{cursor:`default`},variants:[{props:{orientation:`vertical`},style:{textAlign:`left`,padding:`8px 0`}},{props:{alternativeLabel:!0},style:{flexDirection:`column`}},{props:{orientation:`vertical`,alternativeLabel:!0},style:{flexDirection:`row-reverse`}}]}),$S=G(`span`,{name:`MuiStepLabel`,slot:`Label`})(Md(({theme:e})=>({...e.typography.body2,display:`block`,...ef(e,`color`,{duration:e.transitions.duration.shortest}),[`&.${XS.active}, &.${XS.completed}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${XS.alternativeLabel}`]:{marginTop:16},[`&.${XS.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{orientation:`vertical`,alternativeLabel:!0},style:{[`&.${XS.alternativeLabel}`]:{marginTop:0}}}]}))),eC=G(`span`,{name:`MuiStepLabel`,slot:`IconContainer`})({flexShrink:0,display:`flex`,paddingRight:8,[`&.${XS.alternativeLabel}`]:{paddingRight:0},variants:[{props:{orientation:`vertical`,alternativeLabel:!0},style:{paddingRight:0,paddingLeft:8}}]}),tC=G(`span`,{name:`MuiStepLabel`,slot:`LabelContainer`})(Md(({theme:e})=>({width:`100%`,color:(e.vars||e).palette.text.secondary,[`&.${XS.alternativeLabel}`]:{textAlign:`center`},variants:[{props:{orientation:`vertical`,alternativeLabel:!0},style:{[`&.${XS.alternativeLabel}`]:{textAlign:`right`}}}]}))),nC=I.forwardRef(function(e,t){let n=Nd({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}=PS(),{active:p,disabled:m,completed:h,icon:g}=I.useContext(FS),_=o||g,v={...n,active:p,alternativeLabel:d,completed:h,disabled:m,error:a,orientation:f},y=ZS(v),b={slots:c,slotProps:l},[x,S]=jp(`root`,{elementType:QS,externalForwardedProps:{...b,...u},ownerState:v,ref:t,className:U(y.root,i)}),[C,w]=jp(`label`,{elementType:$S,externalForwardedProps:b,ownerState:v}),[T,E]=jp(`stepIcon`,{elementType:_?JS:void 0,externalForwardedProps:b,ownerState:v});return(0,H.jsxs)(x,{...S,children:[_||T?(0,H.jsx)(eC,{className:y.iconContainer,ownerState:v,children:(0,H.jsx)(T,{completed:h,active:p,error:a,icon:_,...E})}):null,(0,H.jsxs)(tC,{className:y.labelContainer,ownerState:v,children:[r?(0,H.jsx)(C,{...w,className:U(y.label,w?.className),children:r}):null,s]})]})});nC.muiName=`StepLabel`;function rC(e){return Qs(`MuiStepButton`,e)}var iC=$s(`MuiStepButton`,[`root`,`horizontal`,`vertical`,`touchRipple`]),aC=e=>{let{classes:t,orientation:n}=e;return El({root:[`root`,n],touchRipple:[`touchRipple`]},rC,t)},oC=G(gm,{name:`MuiStepButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${iC.touchRipple}`]:t.touchRipple},t.root,t[n.orientation]]}})(Md(({theme:e})=>({width:`100%`,padding:`24px 16px`,margin:`-24px -16px`,boxSizing:`content-box`,[`& .${iC.touchRipple}`]:{color:`rgba(0, 0, 0, 0.3)`,...e.applyStyles(`dark`,{color:`rgba(255, 255, 255, 0.3)`})},variants:[{props:{orientation:`vertical`},style:{justifyContent:`flex-start`,padding:`8px`,margin:`-8px`}}]}))),sC=I.forwardRef(function(e,t){let{children:n,disabled:r,index:i,...a}=e,o=kb({id:i,ref:t,disabled:r});return(0,H.jsx)(oC,{disabled:r,...o,...a,children:n})}),cC=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiStepButton`}),{children:r,className:i,icon:a,optional:o,...s}=n,{disabled:c,active:l,index:u}=I.useContext(FS),{orientation:d,totalSteps:f,isTabList:p}=PS(),m={...n,orientation:d},h=aC(m),g={icon:a,optional:o},_=Zf(r,[`StepLabel`])?I.cloneElement(r,g):(0,H.jsx)(nC,{...g,children:r}),v={internalNativeButton:!0,focusRipple:!0,disabled:c,TouchRippleProps:{className:h.touchRipple},className:U(h.root,i),ownerState:m,"aria-selected":l,"aria-posinset":u+1,"aria-setsize":f,role:`tab`,...s};return p?(0,H.jsx)(sC,{...v,index:u,ref:t,children:_}):(0,H.jsx)(oC,{ref:t,tabIndex:l?0:-1,...v,children:_})});function lC(e){return Qs(`MuiStepConnector`,e)}$s(`MuiStepConnector`,[`root`,`horizontal`,`vertical`,`alternativeLabel`,`active`,`completed`,`disabled`,`line`]);var uC=e=>{let{classes:t,orientation:n,alternativeLabel:r,active:i,completed:a,disabled:o}=e;return El({root:[`root`,n,r&&`alternativeLabel`,i&&`active`,a&&`completed`,o&&`disabled`],line:[`line`]},lC,t)},dC=G(`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:{orientation:`vertical`,alternativeLabel:!0},style:{marginLeft:`auto`,marginRight:12}},{props:{orientation:`horizontal`,alternativeLabel:!0},style:{position:`absolute`,top:12,left:`calc(-50% + 20px)`,right:`calc(50% + 20px)`}}]}),fC=G(`span`,{name:`MuiStepConnector`,slot:`Line`})(Md(({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}}]}})),pC=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiStepConnector`}),{className:r,...i}=n,{alternativeLabel:a,orientation:o=`horizontal`}=PS(),{active:s,disabled:c,completed:l}=I.useContext(FS),u={...n,alternativeLabel:a,orientation:o,active:s,completed:l,disabled:c},d=uC(u);return(0,H.jsx)(dC,{className:U(d.root,r),ref:t,ownerState:u,...i,children:(0,H.jsx)(fC,{className:d.line,ownerState:u})})});function mC(e){return Qs(`MuiStepper`,e)}$s(`MuiStepper`,[`root`,`horizontal`,`vertical`,`nonLinear`,`alternativeLabel`]);var hC=e=>{let{orientation:t,nonLinear:n,alternativeLabel:r,classes:i}=e;return El({root:[`root`,t,n&&`nonLinear`,r&&`alternativeLabel`]},mC,i)},gC=G(`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:`horizontal`,alternativeLabel:!1},style:{gap:8}},{props:{orientation:`vertical`},style:{flexDirection:`column`}},{props:{alternativeLabel:!0},style:{alignItems:`flex-start`}},{props:{orientation:`vertical`,alternativeLabel:!0},style:{alignItems:`flex-end`}}]}),_C=(0,H.jsx)(pC,{});function vC(e){let{children:t,className:n,component:r,forwardedRef:i,isRtl:a,orientation:o,ownerState:s,...c}=e,l=Ob({orientation:o,isRtl:a}),u=l.getContainerProps(i);return(0,H.jsx)(Eb.Provider,{value:l,children:(0,H.jsx)(gC,{as:r,ownerState:s,className:n,role:`tablist`,"aria-orientation":o,...u,...c,children:t})})}var yC=I.forwardRef(function(e,t){let n=Gc(),r=Nd({props:e,name:`MuiStepper`}),{activeStep:i=0,alternativeLabel:a=!1,children:o,className:s,component:c=`ol`,connector:l=_C,nonLinear:u=!1,orientation:d=`horizontal`,...f}=r,p={...r,nonLinear:u,alternativeLabel:a,orientation:d,component:c},m=hC(p),h=I.Children.toArray(o).filter(Boolean),g=h.length,_=h.some(e=>{if(!I.isValidElement(e))return!1;if(e.type===cC)return!0;let t=e.props.children;return t?I.Children.toArray(t).some(e=>I.isValidElement(e)&&e.type===cC):!1}),v=h.map((e,t)=>I.cloneElement(e,{index:t,last:t+1===g,...e.props})),y=I.useMemo(()=>({activeStep:i,alternativeLabel:a,connector:l,nonLinear:u,orientation:d,totalSteps:g,isTabList:_}),[i,a,l,u,d,g,_]);return _?(0,H.jsx)(NS.Provider,{value:y,children:(0,H.jsx)(vC,{forwardedRef:t,isRtl:n,className:U(m.root,s),component:c,orientation:d,ownerState:p,...f,children:v})}):(0,H.jsx)(NS.Provider,{value:y,children:(0,H.jsx)(gC,{as:c,ownerState:p,className:U(m.root,s),ref:t,...f,children:v})})});function bC(e){return Qs(`MuiTab`,e)}var xC=$s(`MuiTab`,[`root`,`labelIcon`,`textColorInherit`,`textColorPrimary`,`textColorSecondary`,`selected`,`disabled`,`fullWidth`,`wrapped`,`icon`]),SC=e=>{let{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:a,label:o,selected:s,disabled:c}=e;return El({root:[`root`,a&&o&&`labelIcon`,`textColor${K(n)}`,r&&`fullWidth`,i&&`wrapped`,s&&`selected`,c&&`disabled`],icon:[`icon`]},bC,t)},CC=G(gm,{name:`MuiTab`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${K(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${xC.icon}`]:t.icon}]}})(Md(({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:{[`& > .${xC.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`bottom`,style:{[`& > .${xC.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`start`,style:{[`& > .${xC.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`end`,style:{[`& > .${xC.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:`inherit`},style:{color:`inherit`,opacity:.6,[`&.${xC.selected}`]:{opacity:1},[`&.${xC.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:`primary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${xC.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${xC.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:`secondary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${xC.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${xC.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)}}]}))),wC=I.forwardRef(function(e,t){let n=Nd({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=Db(),x=kb({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=SC(C),T=s&&u&&I.isValidElement(s)?I.cloneElement(s,{className:U(w.icon,s.props.className)}):s;return(0,H.jsxs)(CC,{internalNativeButton:!0,focusRipple:!a,className:U(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,H.jsxs)(I.Fragment,{children:[T,u]}):(0,H.jsxs)(I.Fragment,{children:[u,T]}),l]})}),TC=I.createContext();function EC(e){return Qs(`MuiTable`,e)}$s(`MuiTable`,[`root`,`stickyHeader`]);var DC=e=>{let{classes:t,stickyHeader:n}=e;return El({root:[`root`,n&&`stickyHeader`]},EC,t)},OC=G(`table`,{name:`MuiTable`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})(Md(({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`}}]}))),kC=`table`,AC=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiTable`}),{className:r,component:i=kC,padding:a=`normal`,size:o=`medium`,stickyHeader:s=!1,...c}=n,l={...n,component:i,padding:a,size:o,stickyHeader:s},u=DC(l),d=I.useMemo(()=>({padding:a,size:o,stickyHeader:s}),[a,o,s]);return(0,H.jsx)(TC.Provider,{value:d,children:(0,H.jsx)(OC,{as:i,role:i===kC?null:`table`,ref:t,className:U(u.root,r),ownerState:l,...c})})}),jC=I.createContext();function MC(e){return Qs(`MuiTableBody`,e)}$s(`MuiTableBody`,[`root`]);var NC=e=>{let{classes:t}=e;return El({root:[`root`]},MC,t)},PC=G(`tbody`,{name:`MuiTableBody`,slot:`Root`})({display:`table-row-group`}),FC={variant:`body`},IC=`tbody`,LC=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiTableBody`}),{className:r,component:i=IC,...a}=n,o={...n,component:i},s=NC(o);return(0,H.jsx)(jC.Provider,{value:FC,children:(0,H.jsx)(PC,{className:U(s.root,r),as:i,ref:t,role:i===IC?null:`rowgroup`,ownerState:o,...a})})});function RC(e){return Qs(`MuiTableCell`,e)}var zC=$s(`MuiTableCell`,[`root`,`head`,`body`,`footer`,`sizeSmall`,`sizeMedium`,`paddingCheckbox`,`paddingNone`,`alignLeft`,`alignCenter`,`alignRight`,`alignJustify`,`stickyHeader`]),BC=e=>{let{classes:t,variant:n,align:r,padding:i,size:a,stickyHeader:o}=e;return El({root:[`root`,n,o&&`stickyHeader`,r!==`inherit`&&`align${K(r)}`,i!==`normal`&&`padding${K(i)}`,`size${K(a)}`]},RC,t)},VC=G(`td`,{name:`MuiTableCell`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`size${K(n.size)}`],n.padding!==`normal`&&t[`padding${K(n.padding)}`],n.align!==`inherit`&&t[`align${K(n.align)}`],n.stickyHeader&&t.stickyHeader]}})(Md(({theme:e})=>({...e.typography.body2,display:`table-cell`,verticalAlign:`inherit`,borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid
|
|
244
|
+
${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`,[`&.${zC.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}}]}))),Z=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiTableCell`}),{align:r=`inherit`,className:i,component:a,padding:o,scope:s,size:c,sortDirection:l,variant:u,...d}=n,f=I.useContext(TC),p=I.useContext(jC),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=BC(v),b=null;return l&&(b=l===`asc`?`ascending`:`descending`),(0,H.jsx)(VC,{as:h,ref:t,className:U(y.root,i),"aria-sort":b,scope:g,ownerState:v,...d})});function HC(e){return Qs(`MuiTableFooter`,e)}$s(`MuiTableFooter`,[`root`]);var UC=e=>{let{classes:t}=e;return El({root:[`root`]},HC,t)},WC=G(`tfoot`,{name:`MuiTableFooter`,slot:`Root`})({display:`table-footer-group`}),GC={variant:`footer`},KC=`tfoot`,qC=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiTableFooter`}),{className:r,component:i=KC,...a}=n,o={...n,component:i},s=UC(o);return(0,H.jsx)(jC.Provider,{value:GC,children:(0,H.jsx)(WC,{as:i,className:U(s.root,r),ref:t,role:i===KC?null:`rowgroup`,ownerState:o,...a})})});function JC(e){return Qs(`MuiTableHead`,e)}$s(`MuiTableHead`,[`root`]);var YC=e=>{let{classes:t}=e;return El({root:[`root`]},JC,t)},XC=G(`thead`,{name:`MuiTableHead`,slot:`Root`})({display:`table-header-group`}),ZC={variant:`head`},QC=`thead`,$C=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiTableHead`}),{className:r,component:i=QC,...a}=n,o={...n,component:i},s=YC(o);return(0,H.jsx)(jC.Provider,{value:ZC,children:(0,H.jsx)(XC,{as:i,className:U(s.root,r),ref:t,role:i===QC?null:`rowgroup`,ownerState:o,...a})})});function ew(e){return Qs(`MuiToolbar`,e)}$s(`MuiToolbar`,[`root`,`gutters`,`regular`,`dense`]);var tw=e=>{let{classes:t,disableGutters:n,variant:r}=e;return El({root:[`root`,!n&&`gutters`,r]},ew,t)},nw=G(`div`,{name:`MuiToolbar`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(Md(({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}]}))),rw=I.forwardRef(function(e,t){let n=Nd({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},l=tw(c);return(0,H.jsx)(nw,{as:i,className:U(l.root,r),ref:t,ownerState:c,...s})}),iw=Yf((0,H.jsx)(`path`,{d:`M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z`}),`KeyboardArrowLeft`),aw=Yf((0,H.jsx)(`path`,{d:`M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z`}),`KeyboardArrowRight`);function ow(e){return Qs(`MuiTableRow`,e)}var sw=$s(`MuiTableRow`,[`root`,`selected`,`hover`,`head`,`footer`]),cw=e=>{let{classes:t,selected:n,hover:r,head:i,footer:a}=e;return El({root:[`root`,n&&`selected`,r&&`hover`,i&&`head`,a&&`footer`]},ow,t)},lw=G(`tr`,{name:`MuiTableRow`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})(Md(({theme:e})=>({color:`inherit`,display:`table-row`,verticalAlign:`middle`,outline:0,[`&.${sw.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${sw.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}`)}}}))),uw=`tr`,dw=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiTableRow`}),{className:r,component:i=uw,hover:a=!1,selected:o=!1,...s}=n,c=I.useContext(jC),l={...n,component:i,hover:a,selected:o,head:c&&c.variant===`head`,footer:c&&c.variant===`footer`},u=cw(l);return(0,H.jsx)(lw,{as:i,ref:t,className:U(u.root,r),role:i===uw?null:`row`,ownerState:l,...s})}),fw=Yf((0,H.jsx)(`path`,{d:`M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z`}),`ArrowDownward`);function pw(e){return Qs(`MuiTableSortLabel`,e)}var mw=$s(`MuiTableSortLabel`,[`root`,`active`,`icon`,`directionDesc`,`directionAsc`]),hw=e=>{let{classes:t,direction:n,active:r}=e;return El({root:[`root`,r&&`active`,`direction${K(n)}`],icon:[`icon`]},pw,t)},gw=G(gm,{name:`MuiTableSortLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.active&&t.active]}})(Md(({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,[`& .${mw.icon}`]:{opacity:.5}},[`&.${mw.active}`]:{color:(e.vars||e).palette.text.primary,[`& .${mw.icon}`]:{opacity:1,color:(e.vars||e).palette.text.secondary}}}))),_w=G(`span`,{name:`MuiTableSortLabel`,slot:`Icon`})(Md(({theme:e})=>({fontSize:18,marginRight:4,marginLeft:4,opacity:0,...ef(e,[`opacity`,`transform`],{duration:e.transitions.duration.shorter}),userSelect:`none`,variants:[{props:{direction:`desc`},style:{transform:`rotate(0deg)`}},{props:{direction:`asc`},style:{transform:`rotate(180deg)`}}]}))),vw=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiTableSortLabel`}),{active:r=!1,children:i,className:a,direction:o=`asc`,hideSortIcon:s=!1,IconComponent:c=fw,slots:l={},slotProps:u={},...d}=n,f={...n,active:r,direction:o,hideSortIcon:s,IconComponent:c},p=hw(f),m={slots:l,slotProps:u},[h,g]=jp(`root`,{elementType:gw,externalForwardedProps:m,ownerState:f,className:U(p.root,a),ref:t,additionalProps:{internalNativeButton:!1}}),[_,v]=jp(`icon`,{elementType:_w,externalForwardedProps:m,ownerState:f,className:p.icon});return(0,H.jsxs)(h,{disableRipple:!0,component:`span`,...g,...d,children:[i,s&&!r?null:(0,H.jsx)(_,{as:c,...v})]})});function yw(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function bw(e,t,n,r={},i=()=>{}){let{ease:a=yw,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 xw={width:99,height:99,position:`absolute`,top:-9999,overflow:`scroll`,pointerEvents:`none`};function Sw(e){let{onChange:t,...n}=e,r=I.useRef(),i=I.useRef(null),a=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return Fd(()=>{let e=Xf(()=>{let e=r.current;a(),e!==r.current&&t(r.current)}),n=Qf(i.current);return n.addEventListener(`resize`,e),()=>{e.clear(),n.removeEventListener(`resize`,e)}},[t]),I.useEffect(()=>{a(),t(r.current)},[t]),(0,H.jsx)(`div`,{style:xw,...n,ref:i})}function Cw(e){return Qs(`MuiTabScrollButton`,e)}var ww=$s(`MuiTabScrollButton`,[`root`,`vertical`,`horizontal`,`disabled`]),Tw=e=>{let{classes:t,orientation:n,disabled:r}=e;return El({root:[`root`,n,r&&`disabled`]},Cw,t)},Ew=G(gm,{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,[`&.${ww.disabled}`]:{opacity:0},variants:[{props:{orientation:`vertical`},style:{width:`100%`,height:40,"& svg":{transform:`var(--TabScrollButton-svgRotate)`}}}]}),Dw=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiTabScrollButton`}),{className:r,slots:i={},slotProps:a={},direction:o,orientation:s,disabled:c,...l}=n,{nativeButton:u,...d}=l,f=Gc(),p={isRtl:f,...n},m=Tw(p),h=i.StartScrollButtonIcon??iw,g=i.EndScrollButtonIcon??aw,_=n_({elementType:h,externalSlotProps:a.startScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:p}),v=n_({elementType:g,externalSlotProps:a.endScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:p});return(0,H.jsx)(Ew,{component:`div`,className:U(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,H.jsx)(h,{..._}):(0,H.jsx)(g,{...v})})});function Ow(e){return Qs(`MuiTabs`,e)}var kw=$s(`MuiTabs`,[`root`,`vertical`,`list`,`centered`,`scroller`,`fixed`,`scrollableX`,`scrollableY`,`hideScrollbar`,`scrollButtons`,`scrollButtonsHideMobile`,`indicator`]),Aw=e=>{let{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:a,centered:o,scrollButtonsHideMobile:s,classes:c}=e;return El({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`]},Ow,c)},jw=G(`div`,{name:`MuiTabs`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${kw.scrollButtons}`]:t.scrollButtons},{[`& .${kw.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(Md(({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:{[`& .${kw.scrollButtons}`]:{[e.breakpoints.down(`sm`)]:{display:`none`}}}}]}))),Mw=G(`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`}}]}),Nw=G(`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`}}]}),Pw=G(`span`,{name:`MuiTabs`,slot:`Indicator`})(Md(({theme:e})=>({position:`absolute`,height:2,bottom:0,width:`100%`,...ef(e),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}}]}))),Fw=G(Sw)({overflowX:`auto`,overflowY:`hidden`,scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`}}),Iw={},Lw=I.forwardRef(function(e,t){let n=Nd({props:e,name:`MuiTabs`}),r=Dd(),i=Gc(),a=Tp(r.motion.reducedMotion,!1),{"aria-label":o,"aria-labelledby":s,action:c,centered:l=!1,children:u,className:d,component:f=`div`,allowScrollButtonsMobile:p=!1,indicatorColor:m=`primary`,onChange:h,orientation:g=`horizontal`,scrollButtons:_=`auto`,selectionFollowsFocus:v,slots:y={},slotProps:b={},textColor:x=`primary`,value:S,variant:C=`standard`,visibleScrollbar:w=!1,...T}=n,E=C===`scrollable`,D=g===`vertical`,O=D?`scrollTop`:`scrollLeft`,ee=D?`top`:`left`,te=D?`bottom`:`right`,k=D?`clientHeight`:`clientWidth`,A=D?`height`:`width`,j={...n,component:f,allowScrollButtonsMobile:p,indicatorColor:m,orientation:g,vertical:D,scrollButtons:_,textColor:x,variant:C,visibleScrollbar:w,fixed:!E,hideScrollbar:E&&!w,scrollableX:E&&!D,scrollableY:E&&D,centered:l&&!E,scrollButtonsHideMobile:!p},M=Aw(j),ne=n_({elementType:y.startScrollButtonIcon,externalSlotProps:b.startScrollButtonIcon,ownerState:j}),re=n_({elementType:y.endScrollButtonIcon,externalSlotProps:b.endScrollButtonIcon,ownerState:j}),[ie,ae]=I.useState(!1),[oe,N]=I.useState(Iw),[se,ce]=I.useState(!1),[P,le]=I.useState(!1),[ue,de]=I.useState(!1),F=S===!1?null:S,[fe,pe]=I.useState(!1),[me,he]=I.useState({overflow:`hidden`,scrollbarWidth:0}),ge=new Map,_e=I.useRef(null),ve=I.useRef(null),ye={slots:y,slotProps:b},be=()=>{let e=_e.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&&S!==!1){let e=ve.current.children;if(e.length>0){let t=e[ge.get(S)];n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},xe=rp(()=>{let{tabsMeta:e,tabMeta:t}=be(),n=0,r;D?(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,[A]:t?t[A]:0};if(typeof oe[r]!=`number`||typeof oe[A]!=`number`)N(a);else{let e=Math.abs(oe[r]-a[r]),t=Math.abs(oe[A]-a[A]);(e>=1||t>=1)&&N(a)}}),Se=(e,{animation:t=!0}={})=>{t&&!a.shouldReduceMotion?bw(O,_e.current,e,{duration:r.transitions.duration.standard}):_e.current[O]=e},Ce=e=>{let t=_e.current[O];D?t+=e:t+=e*(i?-1:1),Se(t)},L=()=>{let e=_e.current[k],t=0,n=Array.from(ve.current.children);for(let r=0;r<n.length;r+=1){let i=n[r];if(t+i[k]>e){r===0&&(t=e);break}t+=i[k]}return t},R=()=>{Ce(-1*L())},z=()=>{Ce(L())},[we,{onChange:Te,...Ee}]=jp(`scrollbar`,{className:U(M.scrollableX,M.hideScrollbar),elementType:Fw,shouldForwardComponentProp:!0,externalForwardedProps:ye,ownerState:j}),De=I.useCallback(e=>{Te?.(e),he({overflow:null,scrollbarWidth:e})},[Te]),[Oe,ke]=jp(`scrollButtons`,{className:M.scrollButtons,elementType:Dw,externalForwardedProps:ye,ownerState:j,additionalProps:{orientation:g,slots:{StartScrollButtonIcon:y.startScrollButtonIcon,EndScrollButtonIcon:y.endScrollButtonIcon},slotProps:{startScrollButtonIcon:ne,endScrollButtonIcon:re}}}),Ae=()=>{let e={};e.scrollbarSizeListener=E?(0,H.jsx)(we,{...Ee,onChange:De}):null;let t=E&&(_===`auto`&&(se||P)||_===!0);return e.scrollButtonStart=t?(0,H.jsx)(Oe,{direction:i?`right`:`left`,onClick:R,disabled:!se,...ke}):null,e.scrollButtonEnd=t?(0,H.jsx)(Oe,{direction:i?`left`:`right`,onClick:z,disabled:!P,...ke}):null,e},je=rp(e=>{let{tabsMeta:t,tabMeta:n}=be();if(!(!n||!t)){if(n[ee]<t[ee]){let r=t[O]+(n[ee]-t[ee]);Se(r,{animation:e})}else if(n[te]>t[te]){let r=t[O]+(n[te]-t[te]);Se(r,{animation:e})}}}),Me=rp(()=>{E&&_!==!1&&de(!ue)});I.useEffect(()=>{let e=Xf(()=>{_e.current&&xe()}),t,n=n=>{n.forEach(e=>{e.removedNodes.forEach(e=>{t?.unobserve(e)}),e.addedNodes.forEach(e=>{t?.observe(e)})}),e(),Me()},r=Qf(_e.current);r.addEventListener(`resize`,e);let i;return typeof ResizeObserver<`u`&&(t=new ResizeObserver(e),Array.from(ve.current.children).forEach(e=>{t.observe(e)})),typeof MutationObserver<`u`&&(i=new MutationObserver(n),i.observe(ve.current,{childList:!0})),()=>{e.clear(),r.removeEventListener(`resize`,e),i?.disconnect(),t?.disconnect()}},[xe,Me]),I.useEffect(()=>{let e=Array.from(ve.current.children),t=e.length;if(typeof IntersectionObserver<`u`&&t>0&&E&&_!==!1){let n=e[0],r=e[t-1],i={root:_e.current,threshold:.99},a=new IntersectionObserver(e=>{ce(!e[0].isIntersecting)},i);a.observe(n);let o=new IntersectionObserver(e=>{le(!e[0].isIntersecting)},i);return o.observe(r),()=>{a.disconnect(),o.disconnect()}}},[E,_,ue,u?.length]),I.useEffect(()=>{ae(!0)},[]),I.useEffect(()=>{xe()}),I.useEffect(()=>{je(Iw!==oe)},[je,oe]),I.useImperativeHandle(c,()=>({updateIndicator:xe,updateScrollButtons:Me}),[xe,Me]);let[B,Ne]=jp(`indicator`,{className:M.indicator,elementType:Pw,externalForwardedProps:ye,ownerState:j,additionalProps:{style:oe}}),Pe=(0,H.jsx)(B,{...Ne}),Fe=Ob({activeItemId:fe?void 0:F,orientation:g,isRtl:i}),Ie=Fe.getContainerProps(),Le=I.Children.toArray(u).filter(I.isValidElement).map((e,t)=>{let n=e.props.value===void 0?t:e.props.value;return ge.set(n,t),{child:e,index:t,childValue:n}}).map(({child:e,childValue:t})=>{let n=t===S;return I.cloneElement(e,{fullWidth:C===`fullWidth`,indicator:n&&!ie&&Pe,selected:n,selectionFollowsFocus:v,onChange:h,textColor:x,value:t})}),Re=Ae(),[ze,Be]=jp(`root`,{ref:t,className:U(M.root,d),elementType:jw,externalForwardedProps:{...ye,...T,component:f},ownerState:j}),[Ve,He]=jp(`scroller`,{ref:_e,className:M.scroller,elementType:Mw,externalForwardedProps:ye,ownerState:j,additionalProps:{style:{overflow:me.overflow,[D?`margin${i?`Left`:`Right`}`:`marginBottom`]:w?void 0:-me.scrollbarWidth}}}),Ue=Pd(Ie.ref,ve),We=e=>{let t=ve.current;Rd(Id(t))?.getAttribute(`role`)===`tab`&&Ie.onKeyDown(e)},[Ge,Ke]=jp(`list`,{ref:Ue,className:M.list,elementType:Nw,externalForwardedProps:ye,ownerState:j,getSlotProps:e=>({...e,onBlur:t=>{py(t.currentTarget,t.relatedTarget)||pe(!1),e.onBlur?.(t)},onKeyDown:t=>{We(t),e.onKeyDown?.(t)},onFocus:t=>{pe(!0),Ie.onFocus(t),e.onFocus?.(t)}})});return(0,H.jsxs)(ze,{...Be,children:[Re.scrollButtonStart,Re.scrollbarSizeListener,(0,H.jsxs)(Ve,{...He,children:[(0,H.jsx)(Ge,{"aria-label":o,"aria-labelledby":s,"aria-orientation":g===`vertical`?`vertical`:null,role:`tablist`,...Ke,children:(0,H.jsx)(Eb.Provider,{value:Fe,children:Le})}),ie&&Pe]}),Re.scrollButtonEnd]})});function Rw(e){return Qs(`MuiTextField`,e)}$s(`MuiTextField`,[`root`]);var zw={standard:Uy,filled:Ly,outlined:zx},Bw=e=>{let{classes:t}=e;return El({root:[`root`]},Rw,t)},Vw=G(Ry,{name:`MuiTextField`,slot:`Root`})({}),Hw=I.forwardRef(function(e,t){let n=Nd({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},M=Bw(j),ne=$c(p),re=f&&ne?`${ne}-helper-text`:void 0,ie=h&&ne?`${ne}-label`:void 0,ae=zw[k],oe={slots:D,slotProps:O},[N,se]=jp(`select`,{elementType:oS,externalForwardedProps:oe,ownerState:j}),ce=E&&se.native,P={},le=oe.slotProps.inputLabel;k===`outlined`&&(le&&le.shrink!==void 0&&(P.notched=le.shrink),P.label=h),E&&(ce||(P.id=void 0),P[`aria-describedby`]=void 0);let[ue,de]=jp(`root`,{elementType:Vw,shouldForwardComponentProp:!0,externalForwardedProps:{...oe,...A},ownerState:j,className:U(M.root,o),ref:t,additionalProps:{disabled:l,error:u,fullWidth:d,required:w,color:s,variant:k}}),[F,fe]=jp(`input`,{elementType:ae,externalForwardedProps:oe,additionalProps:P,ownerState:j}),[pe,me]=jp(`inputLabel`,{elementType:Ute,externalForwardedProps:oe,ownerState:j}),[he,I]=jp(`htmlInput`,{elementType:`input`,externalForwardedProps:oe,ownerState:j}),[ge,_e]=jp(`formHelperText`,{elementType:wte,externalForwardedProps:oe,ownerState:j}),ve=(0,H.jsx)(F,{"aria-describedby":re,autoComplete:r,autoFocus:i,defaultValue:c,fullWidth:d,multiline:v,name:y,rows:T,maxRows:g,minRows:_,type:ee,value:te,id:ne,inputRef:m,onBlur:b,onChange:x,onFocus:S,placeholder:C,inputProps:I,slots:{input:D.htmlInput?he:void 0},...fe});return(0,H.jsxs)(ue,{...de,children:[h!=null&&h!==``&&(0,H.jsx)(pe,{htmlFor:E&&!ce?void 0:ne,id:ie,...E&&!ce&&{component:`div`},...me,children:h}),E?(0,H.jsx)(N,{"aria-describedby":re,id:ne,labelId:ie,value:te,input:ve,...se,children:a}):ve,f&&(0,H.jsx)(ge,{id:re,..._e,children:f})]})}),Uw=I.createContext({}),Ww=I.createContext(void 0);function Gw(e,t){return t===void 0||e===void 0?!1:Array.isArray(t)?t.includes(e):e===t}var Kw=e=>{let{classes:t,fullWidth:n,selected:r,disabled:i,size:a,color:o}=e;return El({root:[`root`,r&&`selected`,i&&`disabled`,n&&`fullWidth`,`size${K(a)}`,o]},Pf,t)},qw=G(gm,{name:`MuiToggleButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`size${K(n.size)}`]]}})(Md(({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,[`&.${Ff.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:{[`&.${Ff.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(Tm()).map(([t])=>({props:{color:t},style:{[`&.${Ff.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)}}]}))),Jw=I.forwardRef(function(e,t){let{value:n,...r}=I.useContext(Uw),i=I.useContext(Ww),a=Nd({props:fc({...r,selected:Gw(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=Kw(v),b=e=>{p&&(p(e,g),e.defaultPrevented)||f&&f(e,g)},x=i||``;return(0,H.jsx)(qw,{className:U(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})}),Yw=yc({themeId:Rr}),Xw=Dr(),Zw=Yf((0,H.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`),Qw=Yf((0,H.jsx)(`path`,{d:`M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z`}),`Add`),$w=Yf((0,H.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`),eT=Yf((0,H.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`),tT=Yf((0,H.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`),nT=Yf((0,H.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`),rT=Yf((0,H.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`),iT=Yf((0,H.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`),aT=Yf((0,H.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`),oT=Yf((0,H.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`),sT=Yf((0,H.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`),cT=Yf([(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3.2`},`0`),(0,H.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`),lT=Yf((0,H.jsx)(`path`,{d:`M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z`}),`Check`),uT=Yf((0,H.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`),dT=Yf((0,H.jsx)(`path`,{d:`M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z`}),`ChevronRight`),fT=Yf((0,H.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`),pT=Yf((0,H.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`),mT=Yf((0,H.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`),hT=Yf((0,H.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`),gT=Yf((0,H.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`),_T=Yf((0,H.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`),vT=Yf((0,H.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`),yT=Yf((0,H.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`),bT=Yf((0,H.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`),xT=Yf((0,H.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`),ST=Yf((0,H.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`),nre=Yf((0,H.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`),CT=Yf((0,H.jsx)(`path`,{d:`M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z`}),`ExpandMore`),wT=Yf((0,H.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`),TT=Yf((0,H.jsx)(`path`,{d:`M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z`}),`FilterList`),ET=Yf((0,H.jsx)(`path`,{d:`M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z`}),`FirstPage`),DT=Yf((0,H.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`),OT=Yf((0,H.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`),kT=Yf((0,H.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`),AT=Yf((0,H.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`),jT=Yf((0,H.jsx)(`path`,{d:`M9 3 5 6.99h3V14h2V6.99h3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99z`}),`ImportExport`),MT=Yf((0,H.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`),NT=Yf((0,H.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`),PT=Yf((0,H.jsx)(`path`,{d:`M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z`}),`KeyboardArrowDown`),FT=Yf((0,H.jsx)(`path`,{d:`M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6z`}),`KeyboardArrowLeft`),IT=Yf((0,H.jsx)(`path`,{d:`M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z`}),`KeyboardArrowRight`),LT=Yf((0,H.jsx)(`path`,{d:`M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z`}),`KeyboardArrowUp`),RT=Yf((0,H.jsx)(`path`,{d:`M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z`}),`LastPage`),rre=Yf((0,H.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`),ire=Yf((0,H.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`),zT=Yf((0,H.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`),are=Yf((0,H.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`),BT=Yf((0,H.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`),ore=Yf((0,H.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`),sre=Yf((0,H.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`),VT=Yf((0,H.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`),cre=Yf((0,H.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`),HT=Yf((0,H.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`),UT=Yf((0,H.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`),lre=Yf((0,H.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`),WT=Yf((0,H.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`),GT=Yf((0,H.jsx)(`path`,{d:`m6 18 8.5-6L6 6zM16 6v12h2V6z`}),`SkipNext`),KT=Yf((0,H.jsx)(`path`,{d:`M6 6h2v12H6zm3.5 6 8.5 6V6z`}),`SkipPrevious`),ure=Yf((0,H.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`),dre=Yf((0,H.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`),qT=Yf((0,H.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`),fre=Yf((0,H.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`),pre=Yf((0,H.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`),JT=Yf((0,H.jsx)(`path`,{d:`M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z`}),`Warning`),YT=Yf([(0,H.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,H.jsx)(`path`,{d:`M12 10h-2v2H9v-2H7V9h2V7h1v2h2z`},`1`)],`ZoomIn`),mre=Yf((0,H.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`),hre=365.2425,gre=864e5,XT=6e4,_re=36e5,ZT=3600*24;ZT*7,ZT*hre/12*3;var QT=Symbol.for(`constructDateFrom`);function $T(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&QT in e?e[QT](t):e instanceof Date?new e.constructor(t):new Date(t)}function eE(e,t){return $T(t||e,e)}function tE(e,t,n){let r=eE(e,n?.in);return isNaN(t)?$T(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function nE(e,t,n){let r=eE(e,n?.in);if(isNaN(t))return $T(n?.in||e,NaN);if(!t)return r;let i=r.getDate(),a=$T(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 rE(e,t,n){return $T(n?.in||e,+eE(e)+t)}function iE(e,t,n){return rE(e,t*_re,n)}var vre={};function yre(){return vre}function aE(e,t){let n=yre(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=eE(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 oE(e){let t=eE(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 sE(e,...t){let n=$T.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function cE(e,t){let n=eE(e,t?.in);return n.setHours(0,0,0,0),n}function bre(e,t,n){let[r,i]=sE(n?.in,e,t),a=cE(r),o=cE(i),s=+a-oE(a),c=+o-oE(o);return Math.round((s-c)/gre)}function lE(e,t,n){let r=eE(e,n?.in);return r.setTime(r.getTime()+t*XT),r}function uE(e,t,n){return rE(e,t*1e3,n)}function dE(e,t,n){return nE(e,t*12,n)}function fE(e,t){let n,r=t?.in;return e.forEach(e=>{!r&&typeof e==`object`&&(r=$T.bind(null,e));let t=eE(e,r);(!n||n<t||isNaN(+t))&&(n=t)}),$T(r,n||NaN)}function xre(e,t){let n,r=t?.in;return e.forEach(e=>{!r&&typeof e==`object`&&(r=$T.bind(null,e));let t=eE(e,r);(!n||n>t||isNaN(+t))&&(n=t)}),$T(r,n||NaN)}function pE(e,t,n){let[r,i]=sE(n?.in,e,t),a=mE(r,i),o=Math.abs(bre(r,i));r.setDate(r.getDate()-a*o);let s=a*(o-Number(mE(r,i)===-a));return s===0?0:s}function mE(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 hE(e){return t=>{let n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function gE(e,t){return eE(e)-+eE(t)}function _E(e,t,n){let r=gE(e,t)/XT;return hE(n?.roundingMethod)(r)}function Sre(e,t){let n=eE(e,t?.in);return n.setHours(23,59,59,999),n}function vE(e,t,n){let r=gE(e,t)/1e3;return hE(n?.roundingMethod)(r)}function yE(e,t){let n=eE(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Cre(e,t){let n=eE(e,t?.in),r=n.getFullYear(),i=n.getMonth(),a=$T(n,0);return a.setFullYear(r,i+1,0),a.setHours(0,0,0,0),a.getDate()}function bE(e){return cE(Date.now(),e)}var xE=3,SE=2;function CE(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 wE(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 TE(e,t,n,r){let i=r.left,a=r.right;return i.size<SE*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 EE(e,t,n,r){let i=n.left,a=n.right;return a.size<SE*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 DE(e,t,n,r){if(r===null)return e===null?{key:t,val:n,size:1,left:null,right:null}:wE(t,n,e);let i=e;return i.size>xE*r.size?EE(t,n,i,r):{key:t,val:n,size:1+i.size+r.size,left:e,right:r}}function OE(e,t,n,r){if(e===null)return r===null?{key:t,val:n,size:1,left:null,right:null}:CE(t,n,r);let i=r;return i.size>xE*e.size?TE(t,n,e,i):{key:t,val:n,size:1+e.size+i.size,left:e,right:r}}function kE(e,t,n,r){return e===null?r===null?{key:t,val:n,size:1,left:null,right:null}:CE(t,n,r):r===null?wE(t,n,e):r.size>xE*e.size?TE(t,n,e,r):e.size>xE*r.size?EE(t,n,e,r):{key:t,val:n,size:1+e.size+r.size,left:e,right:r}}function AE(e,t,n){return n===null?{key:e,val:t,size:1,left:null,right:null}:DE(AE(e,t,n.left),n.key,n.val,n.right)}function jE(e,t,n){if(n===null)return{key:e,val:t,size:1,left:null,right:null};let r=jE(e,t,n.right);return OE(n.left,n.key,n.val,r)}function ME(e,t,n,r){return e===null?AE(t,n,r):r===null?jE(t,n,e):r.size>xE*e.size?DE(ME(e,t,n,r.left),r.key,r.val,r.right):e.size>xE*r.size?OE(e.left,e.key,e.val,ME(e.right,t,n,r)):{key:t,val:n,size:1+e.size+r.size,left:e,right:r}}function NE(e){let t=e.left;if(t===null)return{k:e.key,v:e.val,rest:e.right};{let n=NE(t);return n.rest=OE(n.rest,e.key,e.val,e.right),n}}function PE(e){let t=e.right;if(t===null)return{k:e.key,v:e.val,rest:e.left};{let n=PE(t);return n.rest=DE(e.left,e.key,e.val,n.rest),n}}function FE(e,t){if(e===null)return t;if(t===null)return e;if(e.size>t.size){let{k:n,v:r,rest:i}=PE(e);return OE(i,n,r,t)}else{let{k:n,v:r,rest:i}=NE(t);return DE(e,n,r,i)}}function IE(e,t){return e===null?t:t===null?e:t.size>xE*e.size?DE(IE(e,t.left),t.key,t.val,t.right):e.size>xE*t.size?OE(e.left,e.key,e.val,IE(e.right,t)):FE(e,t)}function LE(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 RE(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 zE(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 BE(e){let t=e.left.size,n=e.right?.size??0;if(t>xE*n&&t+n>1){let t=e.left.left?.size??0;return(e.left.right?.size??0)<SE*t||(e.left=RE(e.left)),zE(e)}return e}function VE(e){let t=e.left?.size??0,n=e.right.size;return n>xE*t&&t+n>1?((e.right.left?.size??0)<SE*(e.right.right?.size??0)||(e.right=zE(e.right)),RE(e)):e}function HE(e){return typeof e==`object`&&!!e&&`compare`in e}function UE(e,t){return`asc`in e?e.asc(t):`desc`in e?e.desc(t):e(t)}function WE(...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(HE(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(HE(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 GE(e,t){return e===t?0:e?1:-1}function KE(e,t){return e-t}function qE(e,t){return e.localeCompare(t)}function JE(e,t){return e.getTime()-t.getTime()}function YE(e,t){return e.compare(t)}function XE(){let e;function t(t){switch(typeof t){case`object`:if(t instanceof Date){e.compare=JE;return}else if(HE(t)){e.compare=YE;return}else throw Error(`key type must have compare method`);case`string`:e.compare=qE;return;case`number`:e.compare=KE;return;case`boolean`:e.compare=GE;return;default:throw Error(`cannot compare keys`)}}function n(n,r){return t(n),e.compare(n,r)}return e={compare:n},e}function ZE({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 QE(e){let t=e;for(;;){let e=t.left;if(e)t=e;else return[t.key,t.val]}}function $E(e){let t=e;for(;;){let e=t.right;if(e)t=e;else return[t.key,t.val]}}function eD({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?FE(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:kE(e,r.key,r.val,r.right)}else{let e=i(r.right);return e===r.right?r:kE(r.left,r.key,r.val,e)}}return i(r)}function tD({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),BE(i);if(s>0)return i.right=o(i.right),a&&(i.size+=1),VE(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 wre({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),BE(t)):a>0?(t.right=s(t.right),o&&(t.size+=1),VE(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 nD({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),BE(t);if(n>0)return t.right=c(t.right),s&&(t.size+=1),VE(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*rD(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*iD(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 aD(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 oD(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 sD(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 cD(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?IE(i,o):a===n.val&&i===n.left&&o===n.right?n:ME(i,n.key,a,o)}return r(n)}function lD({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=ME(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:ME(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 uD(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:ME(r,t.key,t.val,a),IE(i,o)];{let e=o===t.right&&i===t.left?t:ME(i,t.key,t.val,o);return[IE(r,a),e]}}return n(t)}function dD(e){return NE(e)}function fD(e){return PE(e)}function pD(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=lD(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 mD(e,t,n){if(!t||!n)return!0;function r(t,n){if(!t||!n)return!0;if(t.size===1)return ZE(e,t.key,n)===void 0;let i=lD(e,t.key,n);return i.val===void 0&&r(t.left,i.below)&&r(t.right,i.above)}return r(t,n)}function hD({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 gD(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 _D(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 _D(e,t.left);{let r=_D(e-n-1,t.right);return ME(t.left,t.key,t.val,r)}}function vD(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?ME(vD(e,t.left),t.key,t.val,t.right):e===n?AE(t.key,t.val,t.right):vD(e-n-1,t.right)}function yD(e,t,n){if(e<0||n===null)return n;let r=n.left?n.left.size:0;if(e<r){let r=yD(e,t,n.left);return r===n.left?n:kE(r,n.key,n.val,n.right)}else if(e===r){let e=t(n.key,n.val);return e===void 0?FE(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=yD(e-r-1,t,n.right);return i===n.right?n:kE(n.left,n.key,n.val,i)}}function bD(e,t,n,r){function i(n,r){if(!n)return r;if(!r)return n;if(!n.left&&!n.right)return eD(e,n.key,e=>e===void 0?n.val:t(n.val,e,n.key),r);if(!r.left&&!r.right)return eD(e,r.key,e=>e===void 0?r.val:t(e,r.val,r.key),n);let a=lD(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?ME(o,n.key,n.val,s):ME(o,n.key,t(n.val,a.val,n.key),s)}return i(n,r)}function xD(e,t,n,r){function i(n,r){if(!n||!r)return null;let a=lD(e,n.key,r),o=i(n.left,a.below),s=i(n.right,a.above);return a.val===void 0?IE(o,s):o===n.left&&s===n.right&&a.val===n.val?n:ME(o,n.key,t(n.val,a.val,n.key),s)}return i(n,r)}function SD(e,t,n){function r(t,n){if(!t)return null;if(!n)return t;let i=lD(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:ME(a,t.key,t.val,o):IE(a,o)}return r(t,n)}function CD(e,t,n){function r(t,n){if(!t)return n;if(!n)return t;if(!t.left&&!t.right)return eD(e,t.key,e=>e===void 0?t.val:void 0,n);if(!n.left&&!n.right)return eD(e,n.key,e=>e===void 0?n.val:void 0,t);let i=lD(e,t.key,n),a=r(t.left,i.below),o=r(t.right,i.above);return i.val===void 0?ME(a,t.key,t.val,o):IE(a,o)}return r(t,n)}function wD(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 cD(i,!1,r);let o=lD(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?IE(s,c):e===n.val&&s===n.left&&c===n.right?n:ME(s,n.key,e,c)}else if(s===n.left&&c===n.right)return n;else return ME(s,n.key,n.val,c)}return a(n,r)}function TD(e){return typeof e==`object`&&!!e&&`hash`in e}function ED(e,t){return e*16777619^t}function DD(e){let t=2166136261;for(let n=0;n<e.length;n++)t=ED(t,e.charCodeAt(n));return ED(t,e.length)}function OD(e){return+!!e}function kD(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 ED(ED(2166136261,n[0]),n[1])}}function AD(e){return kD(e.getTime())}function jD(...e){let t=e.length===1?0:2166136261;for(let n=0;n<e.length;n++){let r=e[n];if(r==null)t=ED(t,0);else switch(typeof r){case`string`:t=ED(t,DD(r));break;case`number`:t=ED(t,kD(r));break;case`boolean`:t=ED(t,OD(r));break;default:t=r instanceof Date?ED(t,kD(r.getTime())):TD(r)?ED(t,r.hash()):ED(t,DD(r.toString()));break}}return e.length===1?t:ED(t,e.length)}function MD(){let e;function t(t){switch(typeof t){case`object`:if(t instanceof Date){e.compare=JE,e.hash=AD;return}else if(TD(t)){e.compare=YE,e.hash=e=>e.hash();return}else throw Error(`key type must have compare and hash methods`);case`string`:e.compare=qE,e.hash=DD;return;case`number`:e.compare=KE,e.hash=kD;return;case`boolean`:e.compare=GE,e.hash=OD;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 ND=5,PD=(1<<ND)-1,FD=-1;function ID(e,t){return 1<<(e>>>t&PD)}function LD(e){return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),(e+(e>>4)&252645135)*16843009>>24}function RD(e,t){return LD(e&t-1)}function zD(e,t){return e>>>t&PD}function BD(){}function VD(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!==FD){let t=ID(r,i);if((e&t)===0)return;a=a.children[RD(e,t)],i+=ND}else a=a.children[zD(r,i)],i+=ND}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 ZE(e,t,a.collision);else return;while(a);throw Error(`Internal immutable-collections violation: node undefined during lookup`)}function HD(e,t,n){let r=t.hash,i=n.hash,a,o;for(;;){let s=ID(r,e),c=ID(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+=ND}else{let l={bitmap:s|c,children:zD(r,e)<zD(i,e)?[t,n]:[n,t]};return o!==void 0&&(o[0]=l),a??l}}}function UD(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!==FD){let d=ID(i,c);if(e=RD(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=zD(i,c),r={bitmap:FD,children:[...l.children]};a===void 0&&(a=r),o!==void 0&&(o[s]=r),o=r.children,s=e,c+=ND,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:LE(a,t,n(void 0),l.key,l.val)}}else u=HD(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=eD(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=HD(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 WD(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!==FD){let o=ID(a,c);if(e=RD(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=zD(a,c);o=l.children,s=e,c+=ND,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:LE(o,t,r(void 0,n),l.key,l.val)}}else u=HD(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=tD(e,t,n,r,l.collision),i;else{let e=HD(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 GD(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=WD(e,n,i,a,r);return[r,i]}function KD(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=WD(e,n(r),r,o,i);return[i,a]}function qD(e){for(;;)if(`children`in e)if(e.children.length===1)e=e.children[0];else return null;else return e}function JD(e,t,n){let r=e[e.length-1];if(r.node.bitmap===FD){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=qD(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&=~ID(t,n-ND),r.node.children.splice(r.childIdx,1),e[0].node}function YD(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 XD(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!==FD){let a=ID(r,i);if((t&a)===0)return n;e=RD(t,a)}else e=zD(r,i);let s={bitmap:t,children:[...o.children]};YD(a,s,e),i+=ND,o=s.children[e]}else if(`key`in o)return r===o.hash&&e.compare(t,o.key)===0?a.length===0?null:JD(a,r,i):n;else if(r===o.hash){let i=eD(e,t,BD,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 ZD(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!==FD){let l=ID(i,o);if((c&l)===0){let e=n(void 0);if(e===void 0)return[r,0];{let n=s.children,r=RD(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=RD(c,l)}else e=zD(i,o);let l={bitmap:c,children:[...s.children]};YD(a,l,e),o+=ND,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]:[JD(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:LE(u,t,e,s.key,s.val)},l=1}}else{let e=n(void 0);if(e===void 0)return[r,0];c=HD(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=eD(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=HD(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*QD(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*rD(e,r.collision)}function $D(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):aD(e,r,a.collision);return r}function eO(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=sD(e,t.collision);return n===t.collision?t:{hash:t.hash,collision:n}}}return n(t)}function tO(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&&qD(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=cD(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 nO(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:LE(n,r.key,r.val,o.key,o.val)}}else return HD(n,r,o);else if(`key`in r&&`collision`in o)if(r.hash===o.hash){let n=eD(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 HD(n,r,o);else if(`collision`in r&&`key`in o)if(r.hash===o.hash){let n=eD(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 HD(n,r,o);else if(`collision`in r&&`collision`in o)if(r.hash===o.hash){let n=bD(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 HD(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+ND,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===FD)s=zD(e,n);else{let r=ID(e,n);if(t&r)s=RD(t,r);else{let e=RD(t,r),n=[...i.slice(0,e),o,...i.slice(e)];return{bitmap:t|r,children:n}}}let c=i[s],l=a(n+ND,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===FD)c=zD(e,n);else{let t=ID(e,n);if(i&t)c=RD(i,t);else{let e=RD(i,t),n=[...s.slice(0,e),r,...s.slice(e)];return{bitmap:i|t,children:n}}}let l=s[c],u=a(n+ND,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 rO(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=VD(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=VD(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=xD(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+ND,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?qD(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===FD)i=zD(e,n);else{let r=ID(e,n);if(r&t)i=RD(t,r);else return null}return a(n+ND,r.children[i],o)}else{let e=r.hash,t=o,i=t.bitmap,s;if(i===FD)s=zD(e,n);else{let t=ID(e,n);if(t&i)s=RD(i,t);else return null}return a(n+ND,r,t.children[s])}}return[a(0,n,r),i]}function iO(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 VD(e,n.key,a,n.hash,t)===void 0?n:(r+=1,null);if(`key`in a){let i=XD(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+ND,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?qD(s[0])??{bitmap:c,children:s}:{bitmap:c,children:s}:n}else if(`collision`in n&&`collision`in a){let t=SD(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===FD)o=zD(e,t),s=1<<o;else if(s=ID(e,t),r&s)o=RD(r,s);else return n;let c=n.children,l=c[o],u=i(t+ND,l,a);if(u===l)return n;if(u===null)if(c.length===2){let e=c[1-o];return qD(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===FD)s=zD(e,t);else{let r=ID(e,t);if(r&o)s=RD(o,r);else return n}return i(t+ND,n,r.children[s])}}return[i(0,t,n),r]}function aO(e,t,n,r){if(r===null)return[n,0];if(n===null){let[e,t]=tO(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:LE(n,r.key,r.val,s.key,e)})}}else{let e=t(void 0,s.val,s.key);return e===void 0?r:(--a,HD(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=eD(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,HD(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=wD(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=cD(i,!1,s.collision);return e===null?r:e.size===1?(--a,HD(n,r,{hash:s.hash,key:e.key,val:e.val})):(a-=e.size,HD(n,r,{hash:s.hash,collision:e}))}else if(`collision`in r&&`collision`in s)if(r.hash===s.hash){let n=wD(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=cD(i,!1,s.collision);return e===null?r:e.size===1?(--a,HD(n,r,{hash:s.hash,key:e.key,val:e.val})):(a-=e.size,HD(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+ND,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]=tO(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?qD(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===FD?(l=zD(t,n),u=1<<l):(u=ID(t,n),l=RD(c,u)),c&u){let e=r.children,t=e[l],i=o(n+ND,t,s);if(i===null)if(e.length===2){let t=e[1-l];return qD(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=RD(c,u),[n,o]=tO(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=ID(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+ND,r,e.children[s]);else{let t;[l,t]=tO(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?qD(u[0])??{bitmap:d,children:u}:{bitmap:d,children:u}:s}}return[o(0,n,r),a]}function oO(){return!0}var sO=class e{static empty(){return new e(MD(),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=MD();function a(e){return e===void 0&&r++,!0}for(let e of t)n=WD(i,e,void 0,a,n);return new e(i,n,r)}static build(t,n){let r=null,i=0,a=MD();function o(e){return e===void 0&&i++,!0}for(let e of t)r=WD(a,n(e),void 0,o,r);return new e(a,r,i)}has(e){return this.root!==null&&VD(this.cfg,e,this.root)!==void 0}[Symbol.iterator](){return QD(e=>e,this.root)}entries(){return QD(e=>[e,e],this.root)}keys(){return QD(e=>e,this.root)}values(){return QD(e=>e,this.root)}forEach(e){$D((t,n)=>{e(n,n,this)},void 0,this.root)}fold(e,t){return $D((t,n)=>e(t,n),t,this.root)}toLazySeq(){let e=this.root;return Q.ofIterator(()=>QD(e=>e,e))}add(t){let[n,r]=UD(this.cfg,t,oO,this.root);return n===this.root?this:new e(this.cfg,n,this.size+ +!!r)}delete(t){let n=XD(this.cfg,t,this.root);return n===this.root?this:new e(this.cfg,n,this.size-1)}union(t){let[n,r]=nO(this.cfg,oO,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]=nO(i.cfg,oO,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]=rO(this.cfg,oO,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]=rO(i.cfg,oO,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]=iO(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n,this.size-r)}symmetricDifference(t){let[n,r]=aO(this.cfg,e=>e===void 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]=tO((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(sO.prototype,"@@__IMMUTABLE_SET__@@",{value:!0});function cO(){return!0}function lO(){}var uO=class e{static empty(){return new e(XE(),null)}static ofKeys(t){let n=t;return new e(n.cfg,n.root)}static from(t){let n=XE();return new e(n,nD(n,t,e=>e,cO))}static build(t,n){let r=XE();return new e(r,nD(r,t,n,cO))}get size(){return this.root===null?0:this.root.size}has(e){return this.root!==null&&ZE(this.cfg,e,this.root)!==void 0}[Symbol.iterator](){return rD(e=>e,this.root)}entries(){return rD(e=>[e,e],this.root)}keys(){return rD(e=>e,this.root)}values(){return rD(e=>e,this.root)}forEach(e){aD((t,n)=>{e(n,n,this)},void 0,this.root)}foldl(e,t){return aD((t,n)=>e(t,n),t,this.root)}foldr(e,t){return oD((t,n,r)=>e(t,r),t,this.root)}toAscLazySeq(){let e=this.root;return Q.ofIterator(()=>rD(e=>e,e))}toDescLazySeq(){let e=this.root;return Q.ofIterator(()=>iD(e=>e,e))}add(t){let n=eD(this.cfg,t,cO,this.root);return n===this.root?this:new e(this.cfg,n)}delete(t){let n=eD(this.cfg,t,lO,this.root);return n===this.root?this:new e(this.cfg,n)}partition(t){let[n,r]=uD(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=cD((e,n)=>t(n)?!0:void 0,!1,this.root);return n===this.root?this:new e(this.cfg,n)}split(t){let n=lD(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 QE(this.root)[0]}lookupMax(){if(this.root!==null)return $E(this.root)[0]}deleteMin(){if(this.root===null)return this;let t=dD(this.root);return new e(this.cfg,t.rest)}deleteMax(){if(this.root===null)return this;let t=fD(this.root);return new e(this.cfg,t.rest)}minView(){if(this.root!==null){let t=dD(this.root);return{min:t.k,rest:new e(this.cfg,t.rest)}}}maxView(){if(this.root!==null){let t=fD(this.root);return{max:t.k,rest:new e(this.cfg,t.rest)}}}indexOf(e){return hD(this.cfg,e,this.root)}getByIndex(e){return gD(e,this.root)?.[0]}take(t){let n=_D(t,this.root);return n===this.root?this:new e(this.cfg,n)}drop(t){let n=vD(t,this.root);return n===this.root?this:new e(this.cfg,n)}deleteByIndex(t){let n=yD(t,lO,this.root);return n===this.root?this:new e(this.cfg,n)}union(t){let n=bD(this.cfg,cO,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=bD(r.cfg,cO,t,r.root)}return t===n[0].root?n[0]:new e(n[0].cfg,t)}}intersection(t){let n=xD(this.cfg,cO,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=xD(r.cfg,cO,n,r.root)}return n===t[0].root?t[0]:new e(t[0].cfg,n)}}difference(t){let n=SD(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n)}symmetricDifference(t){let n=CD(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n)}isSubsetOf(e){return pD(this.cfg,this.root,e.root)}isSupersetOf(e){return pD(this.cfg,e.root,this.root)}isDisjointFrom(e){return mD(this.cfg,this.root,e.root)}constructor(e,t){this.cfg=e,this.root=t}};Object.defineProperty(uO.prototype,"@@__IMMUTABLE_SET__@@",{value:!0}),Object.defineProperty(uO.prototype,"@@__IMMUTABLE_ORDERED__@@",{value:!0});function dO(){}var fO=class e{static empty(){return new e(XE(),null)}static from(t,n){let r=XE();return new e(r,wre(r,t,n))}static build(t,n,r){let i=XE();return new e(i,nD(i,t,n,r))}get size(){return this.root===null?0:this.root.size}get(e){return ZE(this.cfg,e,this.root)}has(e){return ZE(this.cfg,e,this.root)!==void 0}[Symbol.iterator](){return rD((e,t)=>[e,t],this.root)}entries(){return rD((e,t)=>[e,t],this.root)}keys(){return rD(e=>e,this.root)}values(){return rD((e,t)=>t,this.root)}forEach(e){aD((t,n,r)=>{e(r,n,this)},void 0,this.root)}foldl(e,t){return aD(e,t,this.root)}foldr(e,t){return oD(e,t,this.root)}toAscLazySeq(){let e=this.root;return Q.ofIterator(()=>rD((e,t)=>[e,t],e))}keysToAscLazySeq(){let e=this.root;return Q.ofIterator(()=>rD(e=>e,e))}valuesToAscLazySeq(){let e=this.root;return Q.ofIterator(()=>rD((e,t)=>t,e))}toDescLazySeq(){let e=this.root;return Q.ofIterator(()=>iD((e,t)=>[e,t],e))}keysToDescLazySeq(){let e=this.root;return Q.ofIterator(()=>iD(e=>e,e))}valuesToDescLazySeq(){let e=this.root;return Q.ofIterator(()=>iD((e,t)=>t,e))}keySet(){return uO.ofKeys(this)}set(t,n){let r=eD(this.cfg,t,()=>n,this.root);return r===this.root?this:new e(this.cfg,r)}alter(t,n){let r=eD(this.cfg,t,n,this.root);return r===this.root?this:new e(this.cfg,r)}delete(t){let n=eD(this.cfg,t,dO,this.root);return n===this.root?this:new e(this.cfg,n)}partition(t){let[n,r]=uD(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=sD(t,this.root);return n===this.root?this:new e(this.cfg,n)}collectValues(t){let n=cD(t,!0,this.root);return n===this.root?this:new e(this.cfg,n)}filter(t){let n=cD((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=lD(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 QE(this.root)}lookupMax(){if(this.root!==null)return $E(this.root)}deleteMin(){if(this.root===null)return this;let t=dD(this.root);return new e(this.cfg,t.rest)}deleteMax(){if(this.root===null)return this;let t=fD(this.root);return new e(this.cfg,t.rest)}minView(){if(this.root!==null){let t=dD(this.root);return{minKey:t.k,minVal:t.v,rest:new e(this.cfg,t.rest)}}}maxView(){if(this.root!==null){let t=fD(this.root);return{maxKey:t.k,maxVal:t.v,rest:new e(this.cfg,t.rest)}}}indexOf(e){return hD(this.cfg,e,this.root)}getByIndex(e){return gD(e,this.root)}take(t){let n=_D(t,this.root);return n===this.root?this:new e(this.cfg,n)}drop(t){let n=vD(t,this.root);return n===this.root?this:new e(this.cfg,n)}setByIndex(t,n){let r=yD(t,()=>n,this.root);return r===this.root?this:new e(this.cfg,r)}deleteByIndex(t){let n=yD(t,dO,this.root);return n===this.root?this:new e(this.cfg,n)}alterByIndex(t,n){let r=yD(t,n,this.root);return r===this.root?this:new e(this.cfg,r)}union(t,n){let r=bD(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=bD(i.cfg,t,n,i.root)}return n===r[0].root?r[0]:new e(r[0].cfg,n)}}intersection(t,n){let r=xD(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=xD(i.cfg,t,r,i.root)}return r===n[0].root?n[0]:new e(n[0].cfg,r)}}difference(t){let n=SD(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n)}symmetricDifference(t){let n=CD(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n)}withoutKeys(t){let n=t,r=SD(this.cfg,this.root,n.root);return r===this.root?this:new e(this.cfg,r)}adjust(t,n){let r=wD(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(fO.prototype,"@@__IMMUTABLE_KEYED__@@",{value:!0}),Object.defineProperty(fO.prototype,"@@__IMMUTABLE_ORDERED__@@",{value:!0});var pO=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)},mO=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},hO,Q=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})}[(hO=new WeakMap,Symbol.iterator)](){return pO(this,hO,`f`)[Symbol.iterator]()}aggregate(t,n,r){let i=new Map;for(let e of pO(this,hO,`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=pO(this,hO,`f`);return e.ofIterator(function*(){yield*n,yield t})}chunk(t){let n=pO(this,hO,`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=pO(this,hO,`f`);return e.ofIterator(function*(){yield*n,yield*t})}distinct(){let t=pO(this,hO,`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=pO(this,hO,`f`),i={hash:e=>jD(...n.map(t=>t(e))),compare:WE(...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=WD(i,a,!0,n,e),t&&(yield a)})}distinctAndSortBy(t,...n){n.unshift(t);let r={compare:WE(...n)},i=null;function a(e,t){return e===void 0?t:e}for(let e of pO(this,hO,`f`))i=tD(r,e,e,a,i);return e.ofIterator(()=>rD(e=>e,i))}drop(t){let n=pO(this,hO,`f`);return e.ofIterator(function*(){let e=0;for(let r of n)e>=t?yield r:e+=1})}dropWhile(t){let n=pO(this,hO,`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=pO(this,hO,`f`);return e.ofIterator(function*(){for(let e of n)t(e)&&(yield e)})}flatMap(t){let n=pO(this,hO,`f`);return e.ofIterator(function*(){for(let e of n)yield*t(e)})}groupBy(t,...n){n.unshift(t);let r={hash:e=>jD(...n.map(t=>t(e))),compare:WE(...n)},i=null;function a(e,t){return e===void 0?[t]:(e.push(t),e)}for(let e of pO(this,hO,`f`))i=WD(r,e,e,a,i);return e.ofIterator(()=>QD((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:WE(...n)},i=null;function a(e,t){return e===void 0?[t]:(e.push(t),e)}for(let e of pO(this,hO,`f`))i=tD(r,e,e,a,i);return e.ofIterator(()=>rD((e,t)=>n.length===1?[UE(n[0],e),t]:[n.map(t=>UE(t,e)),t],i))}map(t){let n=pO(this,hO,`f`);return e.ofIterator(function*(){let e=0;for(let r of n)yield t(r,e),e+=1})}collect(t){let n=pO(this,hO,`f`);return e.ofIterator(function*(){for(let e of n){let n=t(e);n!=null&&(yield n)}})}prepend(t){let n=pO(this,hO,`f`);return e.ofIterator(function*(){yield t,yield*n})}prependAll(t){let n=pO(this,hO,`f`);return e.ofIterator(function*(){yield*t,yield*n})}sortWith(t){return e.of(Array.from(pO(this,hO,`f`)).sort(t))}sortBy(t,...n){return e.of(Array.from(pO(this,hO,`f`)).sort(WE(t,...n)))}tail(){let t=pO(this,hO,`f`);return e.ofIterator(function*(){let e=!1;for(let n of t)e?yield n:e=!0})}take(t){let n=pO(this,hO,`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=pO(this,hO,`f`);return e.ofIterator(function*(){for(let e of n)if(t(e))yield e;else return})}zip(t){let n=pO(this,hO,`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 pO(this,hO,`f`))if(!e(t))return!1;return!0}some(e){for(let t of pO(this,hO,`f`))if(e(t))return!0;return!1}isEmpty(){return pO(this,hO,`f`)[Symbol.iterator]().next().done===!0}find(e){for(let t of pO(this,hO,`f`))if(e(t))return t}head(){let e=pO(this,hO,`f`)[Symbol.iterator]().next();if(!e.done)return e.value}length(){let e=0;for(let t of pO(this,hO,`f`))e+=1;return e}maxBy(e,...t){let n=WE(e,...t),r;for(let e of pO(this,hO,`f`))(r===void 0||n(r,e)<=0)&&(r=e);return r}minBy(e,...t){let n=WE(e,...t),r;for(let e of pO(this,hO,`f`))(r===void 0||n(r,e)>=0)&&(r=e);return r}sumBy(e){let t=0;for(let n of pO(this,hO,`f`))t+=e(n);return t}toRArray(){return Array.from(pO(this,hO,`f`))}toMutableArray(){return Array.from(pO(this,hO,`f`))}toSortedArray(e,...t){return Array.from(pO(this,hO,`f`)).sort(WE(e,...t))}toHashMap(e,t){return gO.from(this.map(e),t)}buildHashMap(e,t){return gO.build(pO(this,hO,`f`),e,t)}toOrderedMap(e,t){return fO.from(this.map(e),t)}buildOrderedMap(e,t){return fO.build(pO(this,hO,`f`),e,t)}toRMap(e,t){return this.toMutableMap(e,t)}toMutableMap(e,t){let n=new Map;for(let r of pO(this,hO,`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 pO(this,hO,`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 sO.build(pO(this,hO,`f`),e)}toOrderedSet(e){return uO.build(pO(this,hO,`f`),e)}toRSet(e){return this.toMutableSet(e)}toMutableSet(e){let t=new Set;for(let n of pO(this,hO,`f`))t.add(e(n));return t}fold(e,t){let n=e;for(let e of pO(this,hO,`f`))n=t(n,e);return n}reduce(e,t){if(t===void 0){let t=!0,n;for(let r of pO(this,hO,`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),gO.build(pO(this,hO,`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),fO.build(pO(this,hO,`f`),e,n)}toLookupMap(e,t,n,r){let i;return i=n===void 0?(e,n)=>(e??gO.empty()).set(t(n),n):r===void 0?(e,r)=>(e??gO.empty()).set(t(r),n(r)):(e,i)=>(e??gO.empty()).alter(t(i),e=>e===void 0?n(i):r(e,n(i))),gO.build(pO(this,hO,`f`),e,i)}toLookupOrderedMap(e,t,n,r){let i;return i=n===void 0?(e,n)=>(e??fO.empty()).set(t(n),n):r===void 0?(e,r)=>(e??fO.empty()).set(t(r),n(r)):(e,i)=>(e??fO.empty()).alter(t(i),e=>e===void 0?n(i):r(e,n(i))),fO.build(pO(this,hO,`f`),e,i)}toRLookup(e,t){let n=new Map;for(let r of pO(this,hO,`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){hO.set(this,void 0),mO(this,hO,e,`f`)}},gO=class e{static empty(){return new e(MD(),null,0)}static from(t,n){let r=MD(),[i,a]=GD(r,t,n);return new e(r,i,a)}static build(t,n,r){let i=MD(),[a,o]=KD(i,t,n,r);return new e(i,a,o)}get(e){if(this.root!==null)return VD(this.cfg,e,this.root)}has(e){return this.get(e)!==void 0}[Symbol.iterator](){return QD((e,t)=>[e,t],this.root)}entries(){return QD((e,t)=>[e,t],this.root)}keys(){return QD(e=>e,this.root)}values(){return QD((e,t)=>t,this.root)}forEach(e){$D((t,n,r)=>{e(r,n,this)},void 0,this.root)}fold(e,t){return $D(e,t,this.root)}toLazySeq(){let e=this.root;return Q.ofIterator(()=>QD((e,t)=>[e,t],e))}keysToLazySeq(){let e=this.root;return Q.ofIterator(()=>QD(e=>e,e))}valuesToLazySeq(){let e=this.root;return Q.ofIterator(()=>QD((e,t)=>t,e))}keySet(){return sO.ofKeys(this)}set(e,t){return this.modify(e,()=>t)}modify(t,n){let[r,i]=UD(this.cfg,t,n,this.root);return r===this.root?this:new e(this.cfg,r,this.size+ +!!i)}delete(t){let n=XD(this.cfg,t,this.root);return n===this.root?this:new e(this.cfg,n,this.size-1)}alter(t,n){let[r,i]=ZD(this.cfg,t,n,this.root);return r===this.root?this:new e(this.cfg,r,this.size+i)}mapValues(t){let n=eO(t,this.root);return n===this.root?this:new e(this.cfg,n,this.size)}collectValues(t){let[n,r]=tO(t,!0,this.root);return n===this.root?this:new e(this.cfg,n,r)}filter(t){let[n,r]=tO((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]=nO(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]=nO(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]=rO(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]=rO(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]=iO(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n,this.size-r)}symmetricDifference(t){let[n,r]=aO(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]=iO(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]=aO(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(gO.prototype,"@@__IMMUTABLE_KEYED__@@",{value:!0});function _O(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 vO=P(gO.empty()),yO=vO,bO=P(sO.empty()),xO=bO,SO=P(gO.empty()),CO=SO;function wO(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 TO=P(null,(e,t,n)=>{t(vO,e=>e.union(Q.ofObject(n.jobs).toHashMap(e=>e))),t(bO,e=>e.union(Q.ofObject(n.jobs).collect(([,e])=>e.scheduleId).toHashSet(e=>e)))}),EO=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.newJobs){let e=n.newJobs.scheduleId,a=Q.of(n.newJobs.jobs);t(vO,e=>{if(i){let t=tE(r,-30);e=e.filter(e=>e.routeStartUTC>=t)}return e.union(a.toHashMap(e=>{let t=new Qe({...e,copiedToSystem:!0});return[e.unique,t]}))}),e&&t(bO,t=>t.add(e))}}),DO=P(null,(e,t,n)=>{t(SO,Q.ofObject(n.jobs).toHashMap(e=>e))}),OO=_O(e=>P(t=>t(yO).get(e)?.comment??null,(t,n,r)=>{let i=r===null?``:r;n(vO,t=>{let n=t.get(e);return n===void 0?t:t.set(e,{...n,comment:i??void 0})})})),kO=Symbol(``);function AO(e){let t=Symbol(),n=P(t),r=P((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=>(n,r,i)=>e(n,e=>{let n;try{n=JSON.parse(e||``,t?.reviver)}catch{n=i}r(n)}),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=P(r?.getOnInit?n.getItem(e,t):t);return i.onMount=r=>(r(n.getItem(e,t)),n.subscribe?.call(n,e,r,t)),P(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=P(0),a=P([]);a.INTERNAL_onInit=e=>{e.set(a,[()=>e.set(i,e=>e+1)])};let o=P(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,P(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=P(e=>{let t=e(VO),n=e(yr);return n.user?n.user.profile.name||n.user.profile.sub||null:t},(e,t,n)=>{t(VO,n)}),WO=P({timeOfCurrentStatusUTC:new Date,jobs:{},pallets:{},material:[],alarms:[],queues:{}}),GO=WO,KO=P(Math.floor(Date.now()/1e3));KO.onMount=e=>{let t=setInterval(()=>{e(Math.floor(Date.now()/1e3))},1e3);return()=>clearInterval(t)};var qO=P(null,(e,t,n,r)=>{let i=r===null?``:r;t(WO,e=>{let t=e.jobs[n];if(t){let r=new $e(t);return r.comment=i,{...e,jobs:{...e.jobs,[n]:r}}}else return e}),t(OO(n),i),Ht.setJobComment(n,i)}),JO=P(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 dt({...e,comments:[...e.comments??[],new ft({comment:r,timeUTC:new Date})]}):e)}:e),Ut.recordWorkorderComment(n,i,r)}),YO=P(null,(e,t,n)=>t(WO,n)),XO=P(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 it(r(i)))}switch(e.type){case B.PartMark:for(let t of e.material)r(t.id,t=>({...t,serial:e.result}));break;case B.OrderAssignment:for(let t of e.material)r(t.id,t=>({...t,workorderId:e.result}));break;case B.Inspection:case B.InspectionForce:if(e.result.toLowerCase()===`true`||e.result===`1`){let t;if(t=e.type===B.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=P(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!==ot.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!==ot.InQueue||e.location.queuePosition===void 0||e.location.currentQueue===void 0)return e;if(e.materialID===r)return new it({...e,location:new at({...e.location,type:ot.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 it({...e,location:new at({...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===B.LoadUnloadCycle||t.type===B.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 jD(this.part,this.statGroup,this.operation)}toString(){return`{part: ${this.part}}, statGroup: ${this.statGroup}, operation: ${this.operation}}`}},ik=P(gO.empty()),ak=ik,ok=P(gO.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(Q.of(e)),n=1.4826*uk(Q.of(e).filter(e=>e<=t).map(e=>t-e));n<.25&&(n=.25);let r=1.4826*uk(Q.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=Q.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]:vE(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===B.PalletCycle&&n.material.length>0)for(let e of n.material)t.add(e.id);return fk(Q.of(e).filter(e=>(e.type===B.LoadUnloadCycle||e.type===B.BasketLoadUnload||e.type===B.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=P(null,(e,t,n)=>{t(ik,e=>e.size===0?hk(n):e)}),_k=P(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=P(gO.empty()),Mk=jk,Nk=P(e=>Ak(e(jk))),Pk=P(gO.empty()),Fk=Pk,Ik=P(e=>Ak(e(Pk)));function Lk(e,t,n,r){if(t.startofcycle||t.type!==B.LoadUnloadCycle&&t.type!==B.BasketLoadUnload&&t.type!==B.MachineCycle||t.loc===``)return null;let i=t.type===B.MachineCycle?{kind:`machining`,pallet:t.pal}:t.type===B.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=P(null,(e,t,n)=>{let r=e(ak),i=e(yr)?.loadStationNames;t(jk,e=>e.union(Rk(r,n,i)))}),Vk=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.logEntry&&n.logEntry.type===B.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(yr)?.loadStationNames,c=Lk(a,n.logEntry,o,s);if(!c)return;t(jk,e=>{if(i){let t=tE(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=P(null,(e,t,n)=>{let r=e(sk),i=e(yr)?.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=uO.empty(),r=uO.empty(),i=uO.empty(),a=fO.empty(),o=uO.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??uO.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:Q.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+`-`+Q.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=Q.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,Q.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:Q.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=Q.of(n).sumBy(e=>e.elapsedMinsPerMaterial*e.material.length),r=uE(n[0].endTime,-t*60),i=Q.of(n).sumBy(e=>e.activeMinutes);yield{station:e,startTime:r,endActive:i>0?lE(r,i):void 0,endOccupied:n[0].endTime,outlier:n.some(e=>e.isOutlier),parts:Q.of(n).flatMap(e=>Q.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 Q.ofObject(e.completedInspections??{}))r.add(t),i.add(t),n.success&&a.add(t)}}for(let e of Q.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>
|
|
245
|
+
<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>
|
|
246
|
+
<tbody>
|
|
247
|
+
`;let c=Q.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+`-`+Q.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>
|
|
248
|
+
`;return s+=`</tbody>
|
|
249
|
+
</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>
|
|
250
|
+
<thead><tr>`;n+=`<th>${t}</th><th>Date</th><th>Elapsed (min)</th>`,n+=`</tr></thead>
|
|
251
|
+
<tbody>
|
|
252
|
+
`;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>
|
|
253
|
+
`;return n+=`</tbody>
|
|
254
|
+
</table>`,n}function bA(e,t=`Pallet`){oA(yA(e,t)).catch(console.error)}function xA(e){switch(e.type){case B.LoadUnloadCycle:case B.MachineCycle:return e.loc+` #`+e.locnum.toString();case B.AddToQueue:case B.RemoveFromQueue:return e.loc;case B.PartMark:return`Mark`;case B.OrderAssignment:return`Workorder`;case B.CloseOut:return`CloseOut`;case B.Inspection:return`Signal `+((e.details||{}).InspectionType||``);case B.InspectionForce:return`Signal `+e.program;case B.InspectionResult:return`Inspect `+e.program;default:return e.loc}}function SA(e){switch(e.type){case B.Inspection:case B.InspectionForce:case B.LoadUnloadCycle:case B.PartMark:case B.OrderAssignment:return e.result;case B.AddToQueue:return`Add`;case B.RemoveFromQueue:return`Remove`;case B.MachineCycle:return e.program;case B.InspectionResult:return e.result.toLowerCase()===`false`?`Failed`:`Succeeded`;default:return``}}function CA(e){let t=`<table>
|
|
255
|
+
<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>
|
|
256
|
+
<tbody>
|
|
257
|
+
`;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>
|
|
258
|
+
`;return t+=`</tbody>
|
|
259
|
+
</table>`,t}function wA(e){oA(CA(e)).catch(console.error)}var TA=P([]),EA=TA,DA=P([]),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=P(null,(e,t,n)=>{let r=e(yr)?.loadStationNames;t(TA,e=>e.concat(kA(n.stationUse,r)))}),jA=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.newJobs?.stationUse){let a=n.newJobs?.stationUse,o=e(yr)?.loadStationNames;t(TA,e=>{if(i){let t=tE(r,-30),n=Q.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=P(null,(e,t,n)=>{let r=e(yr)?.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=I.useRef(e);return I.useEffect(()=>{t.current=e}),I.useMemo(()=>((...e)=>t.current?.call(t,...e)),[])},VA=e=>{let[t,n]=I.useState(e?.current||null);return e&&setTimeout(()=>{e.current!==t&&n(e.current)},0),{refProxy:I.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,I.useRef)(e),d=BA(c),[f,p]=(0,I.useState)({width:void 0,height:void 0}),m=(0,I.useRef)({width:void 0,height:void 0}),{refProxy:h,refElement:g}=VA(o),{box:_}=s||{},v=(0,I.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,I.useCallback)(zA(v,t,n,r),[v,t,n,r]);return(0,I.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=G(`div`)({backgroundColor:Ir[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=L(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,H.jsx)(`div`,{style:{visibility:s!==void 0&&o!==void 0?`visible`:`hidden`,position:`absolute`,left:c,top:l,zIndex:10},children:(0,H.jsx)(WA,{ref:a,style:i?.zIndex?{zIndex:i.zIndex}:void 0,children:(0,H.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,H.jsx)(J,{ref:a,sx:r,children:(0,H.jsxs)(J,{sx:{position:`relative`,overflow:`hidden`},children:[o&&(s||i)?e({width:o,height:s??0}):void 0,s&&o?(0,H.jsx)(GA,{chartHeight:s,chartWidth:o,atom:t,TooltipContent:n}):void 0]})})}function qA(e){return Q.ofObject(e.baskets??{}).collect(([,e])=>e.position.location===_t.LoadUnload||e.position.location===_t.LoadStationStaging?[e.basketId,{group:`L/U`,num:e.position.locationNum}]:null).toRMap(([e,t])=>[e,t])}function JA(e,t,n){return e.action.type===V.LoadingToBasket?n.get(e.action.loadToBasketId??0)??null:e.action.type===V.Loading?e.action.loadOntoPalletNum?t.get(e.action.loadOntoPalletNum)??null:e.action.loadFromBasketId?n.get(e.action.loadFromBasketId)??null:null:e.location.palletNum?t.get(e.location.palletNum)??null:e.location.basketId?n.get(e.location.basketId)??null:null}function YA(e,t,n,r){return Q.of(e.material).collect(e=>{if(e.action.type!==V.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:uE(e.timeOfCurrentStatusUTC,-s),expectedEnd:uE(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 Q.of(e.material).collect(e=>{if(e.action.type===V.UnloadToCompletedMaterial||e.action.type===V.UnloadToInProcess){let t=JA(e,n,i);return t?{mat:e,material:[e],proc:e.process,path:e.path,loc:t}:null}else if(e.action.type===V.Loading||e.action.type===V.LoadingToBasket){let t=JA(e,n,i);return t?{mat:e,material:[e],proc:e.action.processAfterLoad??e.process,path:e.action.pathAfterLoad??e.path,loc:t}:null}return null}).map(t=>{let n=e.jobs[t.mat.jobUnique],r=n?.procsAndPaths?.[t.proc-1],i=n?.procsAndPaths?.[t.proc-1]?.paths?.[t.path-1];if(t.mat.action.type===V.Loading||t.mat.action.type===V.LoadingToBasket){let e=t.mat.action.type===V.Loading?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===V.Loading||e.mat.action.type===V.LoadingToBasket?`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:uE(e.timeOfCurrentStatusUTC,-l),expectedEnd:uE(e.timeOfCurrentStatusUTC,-l+c),isOutlier:s,parts:Q.of(a).distinctAndSortBy(e=>e.mat.partName,e=>e.proc,e=>e.mat.action.type===V.Loading||e.mat.action.type===V.LoadingToBasket?`LOAD`:`UNLOAD`).map(e=>({part:e.mat.partName+`-`+e.proc.toString(),oper:e.mat.action.type===V.Loading||e.mat.action.type===V.LoadingToBasket?`LOAD`:`UNLOAD`})).toRArray()}})}function ZA(e,t,n){let r=Q.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,H.jsx)(`g`,{children:(n??e.ticks()).map((n,r)=>(0,H.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,H.jsx)(`g`,{children:(n??e.ticks()).map((n,r)=>(0,H.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,H.jsxs)(`g`,{children:[(0,H.jsx)(QA,{scale:t,width:n,tickOverride:i}),(0,H.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,H.jsxs)(`g`,{transform:`translate(0, ${e})`,children:[(0,H.jsx)(`line`,{x1:s[0],y1:0,x2:s[1],y2:0,stroke:`#222`,strokeWidth:1,shapeRendering:`crispEdges`}),o.map((e,t)=>(0,H.jsxs)(`g`,{transform:`translate(${e.pos}, 0)`,children:[(0,H.jsx)(`line`,{y1:tj,y2:0,stroke:`#222`,strokeWidth:1,shapeRendering:`crispEdges`}),(0,H.jsx)(`text`,{dy:13,textAnchor:`middle`,fontSize:r,fill:`#222`,dominantBaseline:`hanging`,children:i(e.tick)})]},t)),n?(0,H.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,H.jsxs)(`g`,{transform:`translate(${e}, 0)`,children:[(0,H.jsx)(`line`,{x1:0,y1:s[0],x2:0,y2:s[1],stroke:`#222`,strokeWidth:1,shapeRendering:`crispEdges`}),o.map((e,t)=>(0,H.jsxs)(`g`,{transform:`translate(0, ${e.pos})`,children:[(0,H.jsx)(`line`,{x1:-8,x2:0,y1:0,y2:0,stroke:`#222`,strokeWidth:1,shapeRendering:`crispEdges`}),(0,H.jsx)(`text`,{dx:-13,textAnchor:`end`,fontSize:r,fill:`#222`,dominantBaseline:`middle`,children:i(e.tick)})]},t)),n?(0,H.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,H.jsxs)(`g`,{transform:`translate(0, ${e})`,children:[(0,H.jsx)(`line`,{x1:s[0],y1:0,x2:s[1],y2:0,stroke:`#222`,strokeWidth:1,shapeRendering:`crispEdges`}),o.map((e,t)=>(0,H.jsxs)(`g`,{transform:`translate(${e.pos}, 0)`,children:[(0,H.jsx)(`line`,{y1:0,y2:-8,stroke:`#222`,strokeWidth:1,shapeRendering:`crispEdges`}),(0,H.jsx)(`text`,{dy:-13,textAnchor:`middle`,fontSize:r,fill:`#222`,children:i(e.tick)})]},t)),n?(0,H.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[Tre,Ere]=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:M,b:ne,B:re,c:null,d:zP,e:zP,f:WP,g:Ore,G:Are,H:BP,I:VP,j:HP,L:UP,m:GP,M:KP,p:ie,q:ae,Q:iF,s:aF,S:qP,u:JP,U:YP,V:ZP,w:QP,W:$P,x:null,X:null,y:Dre,Y:kre,Z:jre,"%":rF},b={a:oe,A:N,b:se,B:ce,c:null,d:eF,e:eF,f:Fre,g:Gre,G:qre,H:Mre,I:Nre,j:Pre,L:tF,m:Ire,M:Lre,p:P,q:le,Q:iF,s:aF,S:Rre,u:zre,U:Bre,V:Vre,w:Hre,W:Ure,x:null,X:null,y:Wre,Y:Kre,Z:Jre,"%":rF},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 M(e){return a[e.getDay()]}function ne(e){return c[e.getMonth()]}function re(e){return s[e.getMonth()]}function ie(e){return i[+(e.getHours()>=12)]}function ae(e){return 1+~~(e.getMonth()/3)}function oe(e){return o[e.getUTCDay()]}function N(e){return a[e.getUTCDay()]}function se(e){return c[e.getUTCMonth()]}function ce(e){return s[e.getUTCMonth()]}function P(e){return i[+(e.getUTCHours()>=12)]}function le(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var 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 Dre(e,t){return hP(e.getFullYear()%100,t,2)}function Ore(e,t){return e=XP(e),hP(e.getFullYear()%100,t,2)}function kre(e,t){return hP(e.getFullYear()%1e4,t,4)}function Are(e,t){var n=e.getDay();return e=n>=4||n===0?UN(e):UN.ceil(e),hP(e.getFullYear()%1e4,t,4)}function jre(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+hP(t/60|0,`0`,2)+hP(t%60,`0`,2)}function eF(e,t){return hP(e.getUTCDate(),t,2)}function Mre(e,t){return hP(e.getUTCHours(),t,2)}function Nre(e,t){return hP(e.getUTCHours()%12||12,t,2)}function Pre(e,t){return hP(1+IN.count(rP(e),e),t,3)}function tF(e,t){return hP(e.getUTCMilliseconds(),t,3)}function Fre(e,t){return tF(e,t)+`000`}function Ire(e,t){return hP(e.getUTCMonth()+1,t,2)}function Lre(e,t){return hP(e.getUTCMinutes(),t,2)}function Rre(e,t){return hP(e.getUTCSeconds(),t,2)}function zre(e){var t=e.getUTCDay();return t===0?7:t}function Bre(e,t){return hP(qN.count(rP(e)-1,e),t,2)}function nF(e){var t=e.getUTCDay();return t>=4||t===0?ZN(e):ZN.ceil(e)}function Vre(e,t){return e=nF(e),hP(ZN.count(rP(e),e)+(rP(e).getUTCDay()===4),t,2)}function Hre(e){return e.getUTCDay()}function Ure(e,t){return hP(JN.count(rP(e)-1,e),t,2)}function Wre(e,t){return hP(e.getUTCFullYear()%100,t,2)}function Gre(e,t){return e=nF(e),hP(e.getUTCFullYear()%100,t,2)}function Kre(e,t){return hP(e.getUTCFullYear()%1e4,t,4)}function qre(e,t){var n=e.getUTCDay();return e=n>=4||n===0?ZN(e):ZN.ceil(e),hP(e.getUTCFullYear()%1e4,t,4)}function Jre(){return`+0000`}function rF(){return`%`}function iF(e){return+e}function aF(e){return Math.floor(e/1e3)}var oF,sF;Yre({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 Yre(e){return oF=uP(e),sF=oF.format,oF.parse,oF.utcFormat,oF.utcParse,oF}function Xre(e){return new Date(e)}function Zre(e){return e instanceof Date?+e:+new Date(+e)}function cF(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,Zre)):f().map(Xre)},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,cF(e,t,n,r,i,a,o,s,c,l))},u}function lF(){return Ej.apply(cF(aP,oP,nP,eP,zN,FN,NN,jN,AN,sF).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var uF=Nr[200],dF=Nr[600],fF=Nr[900],pF=kr[700],Qre=Ir[400],$re=Ir[100];function eie(){let e=L(yO),t=L(EA);return(0,I.useMemo)(()=>{let n=iE(new Date,-12);return Q.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:Q.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 mF=P(null),hF=14,gF=20,_F=10,vF=2;function tie(e,t,n,r,i){let a=uO.build(e,e=>e.station).union(uO.build(t,e=>e.station)),o=(a.toAscLazySeq().map(e=>FA(e,hF)).maxBy(e=>e??0)??20)+30,s=Math.max(r-o-vF,5),c=Math.max(i-_F-gF,5),l=lF().domain([iE(n,-12),iE(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 nie({xScale:e,yScale:t}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(rj,{scale:e,top:t.range()[1]}),(0,H.jsx)(ij,{scale:t,left:e.range()[0],fontSize:hF}),(0,H.jsx)($A,{scale:e,height:t.range()[1]-t.range()[0]})]})}function rie({cycles:e,xScale:t,yScale:n,actualPlannedScale:r,hideTooltipRef:i}){let a=r(`actual`)??0,o=R(mF);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,I.useCallback)(()=>{i.current=setTimeout(()=>{o(null)},300)},[i,o]);return(0,H.jsx)(`g`,{children:e.map((e,i)=>e.endActive&&e.endActive<e.endOccupied?(0,H.jsxs)(`g`,{onMouseOver:s(e),onMouseLeave:c,children:[(0,H.jsx)(`rect`,{x:t(e.startTime),y:(n(e.station)??0)+a,width:t(e.endOccupied)-t(e.startTime),height:r.bandwidth(),fill:dF}),(0,H.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?pF:fF})]},i):(0,H.jsx)(`g`,{onMouseOver:s(e),onMouseLeave:c,children:(0,H.jsx)(`rect`,{x:t(e.startTime),y:(n(e.station)??0)+a,width:t(e.endOccupied)-t(e.startTime),height:r.bandwidth(),fill:dF})},i))})}function iie(e,t,n,r){return`M ${e} ${t} A ${n} ${r} 0 0 1 ${e} ${t+r}`}function aie({now:e,cycles:t,xScale:n,yScale:r,actualPlannedScale:i,hideTooltipRef:a}){let o=i(`actual`)??0,s=R(mF);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,I.useCallback)(()=>{a.current=setTimeout(()=>{s(null)},300)},[a,s]);return(0,H.jsx)(`g`,{children:t.map((t,a)=>(0,H.jsxs)(`g`,{onMouseOver:c(t),onMouseLeave:l,children:[(0,H.jsx)(`rect`,{x:n(t.start),y:(r(t.station)??0)+o,width:n(e)-n(t.start),height:i.bandwidth(),fill:dF}),t.expectedEnd<e?(0,H.jsxs)(H.Fragment,{children:[(0,H.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?pF:fF}),(0,H.jsx)(`path`,{d:iie(n(e),(r(t.station)??0)+o,80,i.bandwidth()),fill:uF})]}):(0,H.jsx)(`rect`,{x:n(e),y:(r(t.station)??0)+o,width:n(t.expectedEnd)-n(e),height:i.bandwidth(),fill:uF})]},a))})}function oie({sim:e,xScale:t,yScale:n,actualPlannedScale:r,hideTooltipRef:i}){let a=r(`planned`)??0,o=R(mF);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,I.useCallback)(()=>{i.current=setTimeout(()=>{o(null)},300)},[i,o]);return(0,H.jsx)(`g`,{children:e.map((e,i)=>(0,H.jsx)(`g`,{onMouseOver:s(e),onMouseLeave:c,children:(0,H.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?$re:Qre})},i))})}function sie({tooltip:e}){return(0,H.jsx)(MS,{children:e.data.kind===`actual`?(0,H.jsxs)(H.Fragment,{children:[e.data.cycle.outlier?(0,H.jsxs)(`div`,{children:[`Outlier Cycle for `,e.data.cycle.station]}):(0,H.jsx)(`div`,{children:e.data.cycle.station}),(0,H.jsxs)(`div`,{children:[`Start: `,e.data.cycle.startTime.toLocaleString()]}),(0,H.jsxs)(`div`,{children:[`End: `,e.data.cycle.endOccupied.toLocaleString()]}),e.data.cycle.endActive===void 0?void 0:(0,H.jsxs)(`div`,{children:[`Active Minutes:`,` `,_E(e.data.cycle.endActive,e.data.cycle.startTime)]}),(0,H.jsxs)(`div`,{children:[`Occupied Minutes:`,` `,_E(e.data.cycle.endOccupied,e.data.cycle.startTime)]}),e.data.cycle.parts.map((e,t)=>(0,H.jsxs)(`div`,{children:[`Part: `,e.part,` `,e.oper]},t))]}):e.data.kind===`sim`?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{children:[`Simulation of `,e.data.cycle.station]}),e.data.cycle.parts.map((e,t)=>(0,H.jsxs)(`div`,{children:[`Part: `,e]},t)),(0,H.jsxs)(`div`,{children:[`Predicted Start: `,e.data.cycle.start.toLocaleString()]}),(0,H.jsxs)(`div`,{children:[`Predicted End: `,e.data.cycle.end.toLocaleString()]}),e.data.cycle.plannedDown?(0,H.jsx)(`div`,{children:`Planned Downtime`}):void 0]}):(0,H.jsxs)(H.Fragment,{children:[e.data.cycle.isOutlier?(0,H.jsxs)(`div`,{children:[`Current Outlier Cycle for `,e.data.cycle.station]}):(0,H.jsxs)(`div`,{children:[`Current `,e.data.cycle.station]}),(0,H.jsxs)(`div`,{children:[`Start: `,e.data.cycle.start.toLocaleString()]}),(0,H.jsxs)(`div`,{children:[`Expected End: `,e.data.cycle.expectedEnd.toLocaleString()]}),e.data.cycle.expectedEnd<e.data.now?(0,H.jsxs)(`div`,{children:[`Cycle Exceeding Expected By`,` `,_E(e.data.now,e.data.cycle.expectedEnd),` Minutes`]}):(0,H.jsxs)(`div`,{children:[`Expected Remaining Minutes:`,` `,_E(e.data.cycle.expectedEnd,e.data.now)]}),(0,H.jsxs)(`div`,{children:[`Occupied Minutes: `,_E(e.data.now,e.data.cycle.start)]}),e.data.cycle.parts.map((e,t)=>(0,H.jsxs)(`div`,{children:[`Part: `,e.part,` `,e.oper]},t))]})})}function cie({now:e,xScale:t,yScale:n}){let r=t(e);return(0,H.jsxs)(`g`,{children:[(0,H.jsx)(`line`,{x1:r,x2:r,y1:n.range()[0],y2:n.range()[1]+8,stroke:`black`}),(0,H.jsx)(`text`,{x:r,y:n.range()[1]+8+11,textAnchor:`middle`,fontSize:11,children:`Now`})]})}function yF({height:e,width:t}){let n=L(Mk),r=L(ak),i=eie(),a=L(GO),o=L(yr),s=(0,I.useMemo)(()=>{let e=iE(new Date,-12);return hA(n.valuesToLazySeq().filter(t=>t.endTime>=e))},[n]),c=(0,I.useMemo)(()=>ZA(a,r,o.loadStationNames),[a,r,o.loadStationNames]),l=new Date,[,u]=(0,I.useState)(0),d=(0,I.useRef)(null);(0,I.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}=tie(s,c,l,t,e),g=(0,I.useRef)(null);return e<=0||t<=0?null:(0,H.jsxs)(`div`,{style:{position:`relative`,overflow:`hidden`},children:[(0,H.jsx)(`svg`,{height:e,width:t,children:(0,H.jsxs)(`g`,{transform:`translate(${h}, ${_F})`,children:[(0,H.jsx)(`clipPath`,{id:`recent-cycle-clip-body`,children:(0,H.jsx)(`rect`,{x:0,y:0,width:t-vF-h,height:e-gF-_F})}),(0,H.jsx)(nie,{xScale:f,yScale:p}),(0,H.jsxs)(`g`,{clipPath:`url(#recent-cycle-clip-body)`,children:[(0,H.jsx)(rie,{cycles:s,xScale:f,yScale:p,hideTooltipRef:g,actualPlannedScale:m}),(0,H.jsx)(aie,{now:l,cycles:c,xScale:f,yScale:p,hideTooltipRef:g,actualPlannedScale:m}),(0,H.jsx)(oie,{sim:i,xScale:f,yScale:p,actualPlannedScale:m,hideTooltipRef:g})]}),(0,H.jsx)(cie,{now:l,xScale:f,yScale:p})]})}),(0,H.jsx)(GA,{chartHeight:e,chartWidth:t,atom:mF,TooltipContent:sie})]})}var lie=Object.defineProperty,bF=(e,t)=>lie(e,`name`,{value:t,configurable:!0}),xF=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`}};bF(xF,`Part`);var uie=/[$_\p{ID_Start}]/u,die=/[$_\u200C\u200D\p{ID_Continue}]/u,SF=`.*`;function CF(e,t){return(t?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(e)}bF(CF,`isASCII`);function wF(e,t=!1){let n=[],r=0;for(;r<e.length;){let i=e[r],a=bF(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&&uie.test(n)||i!==r+1&&die.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(!CF(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}bF(wF,`lexer`);function TF(e,t={}){let n=wF(e);t.delimiter??=`/#?`,t.prefixes??=`./`;let r=`[^${EF(t.delimiter)}]+?`,i=[],a=0,o=0,s=new Set,c=bF(e=>{if(o<n.length&&n[o].type===e)return n[o++].value},`tryConsume`),l=bF(()=>c(`OTHER_MODIFIER`)??c(`ASTERISK`),`tryConsumeModifier`),u=bF(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=bF(()=>{let e=``,t;for(;t=c(`CHAR`)??c(`ESCAPED_CHAR`);)e+=t;return e},`consumeText`),f=bF(e=>e,`DefaultEncodePart`),p=t.encodePart||f,m=``,h=bF(e=>{m+=e},`appendToPendingFixedValue`),g=bF(()=>{m.length&&(i.push(new xF(3,``,``,p(m),``,3)),m=``)},`maybeAddPartFromPendingFixedValue`),_=bF((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 xF(3,``,``,p(e),``,l));return}let u;u=n?n===`*`?SF:n:r;let d=2;u===r?(d=1,u=``):u===SF&&(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 xF(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}bF(TF,`parse`);function EF(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,`\\$1`)}bF(EF,`escapeString`);function DF(e){return e&&e.ignoreCase?`ui`:`u`}bF(DF,`flags`);function OF(e,t,n){return AF(TF(e,n),t,n)}bF(OF,`stringToRegexp`);function kF(e){switch(e){case 0:return`*`;case 1:return`?`;case 2:return`+`;case 3:return``}}bF(kF,`modifierToString`);function AF(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+=EF(i.value):r+=`(?:${EF(i.value)})${kF(i.modifier)}`;continue}t&&t.push(i.name);let e=`[^${EF(n.delimiter)}]+?`,a=i.value;if(i.type===1?a=e:i.type===0&&(a=SF),!i.prefix.length&&!i.suffix.length){i.modifier===3||i.modifier===1?r+=`(${a})${kF(i.modifier)}`:r+=`((?:${a})${kF(i.modifier)})`;continue}if(i.modifier===3||i.modifier===1){r+=`(?:${EF(i.prefix)}(${a})${EF(i.suffix)})`,r+=kF(i.modifier);continue}r+=`(?:${EF(i.prefix)}`,r+=`((?:${a})(?:`,r+=EF(i.suffix),r+=EF(i.prefix),r+=`(?:${a}))*)${EF(i.suffix)})`,i.modifier===0&&(r+=`?`)}let i=`[${EF(n.endsWith)}]|$`,a=`[${EF(n.delimiter)}]`;if(n.end)return n.strict||(r+=`${a}?`),n.endsWith.length?r+=`(?=${i})`:r+=`$`,new RegExp(r,DF(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,DF(n))}bF(AF,`partsToRegexp`);var jF={delimiter:``,prefixes:``,sensitive:!0,strict:!0},fie={delimiter:`.`,prefixes:``,sensitive:!0,strict:!0},pie={delimiter:`/`,prefixes:`/`,sensitive:!0,strict:!0};function MF(e,t){return e.length?e[0]===`/`?!0:!t||e.length<2?!1:(e[0]==`\\`||e[0]==`{`)&&e[1]==`/`:!1}bF(MF,`isAbsolutePathname`);function NF(e,t){return e.startsWith(t)?e.substring(t.length,e.length):e}bF(NF,`maybeStripPrefix`);function PF(e,t){return e.endsWith(t)?e.substr(0,e.length-t.length):e}bF(PF,`maybeStripSuffix`);function FF(e){return!e||e.length<2?!1:e[0]===`[`||(e[0]===`\\`||e[0]===`{`)&&e[1]===`[`}bF(FF,`treatAsIPv6Hostname`);var IF=[`ftp`,`file`,`http`,`https`,`ws`,`wss`];function LF(e){if(!e)return!0;for(let t of IF)if(e.test(t))return!0;return!1}bF(LF,`isSpecialScheme`);function RF(e,t){if(e=NF(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):``}bF(RF,`canonicalizeHash`);function zF(e,t){if(e=NF(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):``}bF(zF,`canonicalizeSearch`);function BF(e,t){return t||e===``?e:FF(e)?ZF(e):XF(e)}bF(BF,`canonicalizeHostname`);function VF(e,t){if(t||e===``)return e;let n=new URL(`https://example.com`);return n.password=e,n.password}bF(VF,`canonicalizePassword`);function HF(e,t){if(t||e===``)return e;let n=new URL(`https://example.com`);return n.username=e,n.username}bF(HF,`canonicalizeUsername`);function UF(e,t,n){if(n||e===``)return e;if(t&&!IF.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}bF(UF,`canonicalizePathname`);function WF(e,t,n){return KF(t)===e&&(e=``),n||e===``?e:QF(e)}bF(WF,`canonicalizePort`);function GF(e,t){return e=PF(e,`:`),t||e===``?e:qF(e)}bF(GF,`canonicalizeProtocol`);function KF(e){switch(e){case`ws`:case`http`:return`80`;case`wws`:case`https`:return`443`;case`ftp`:return`21`;default:return``}}bF(KF,`defaultPortForProtocol`);function qF(e){if(e===``)return e;if(/^[-+.A-Za-z0-9]*$/.test(e))return e.toLowerCase();throw TypeError(`Invalid protocol '${e}'.`)}bF(qF,`protocolEncodeCallback`);function JF(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.username=e,t.username}bF(JF,`usernameEncodeCallback`);function YF(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.password=e,t.password}bF(YF,`passwordEncodeCallback`);function XF(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}bF(XF,`hostnameEncodeCallback`);function ZF(e){if(e===``)return e;if(/[^0-9a-fA-F[\]:]/g.test(e))throw TypeError(`Invalid IPv6 hostname '${e}'`);return e.toLowerCase()}bF(ZF,`ipv6HostnameEncodeCallback`);function QF(e){if(e===``||/^[0-9]*$/.test(e)&&parseInt(e)<=65535)return e;throw TypeError(`Invalid port '${e}'.`)}bF(QF,`portEncodeCallback`);function $F(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)}bF($F,`standardURLPathnameEncodeCallback`);function eI(e){return e===``?e:new URL(`data:${e}`).pathname}bF(eI,`pathURLPathnameEncodeCallback`);function tI(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.search=e,t.search.substring(1,t.search.length)}bF(tI,`searchEncodeCallback`);function nI(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.hash=e,t.hash.substring(1,t.hash.length)}bF(nI,`hashEncodeCallback`);var rI=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=wF(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,jF),e.encodePart=qF;let t=OF(this.#O(),void 0,e);this.#l=LF(t)}};bF(rI,`Parser`);var iI=[`protocol`,`username`,`password`,`hostname`,`port`,`pathname`,`search`,`hash`],aI=`*`;function oI(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)}}bF(oI,`extractValues`);function sI(e,t){return t?lI(e):e}bF(sI,`processBaseURLString`);function cI(e,t,n){let r;if(typeof t.baseURL==`string`)try{r=new URL(t.baseURL),t.protocol===void 0&&(e.protocol=sI(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=sI(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=sI(r.password,n)),t.protocol===void 0&&t.hostname===void 0&&(e.hostname=sI(r.hostname,n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&(e.port=sI(r.port,n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&(e.pathname=sI(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=sI(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=sI(r.hash.substring(1,r.hash.length),n))}catch{throw TypeError(`invalid baseURL '${t.baseURL}'.`)}if(typeof t.protocol==`string`&&(e.protocol=GF(t.protocol,n)),typeof t.username==`string`&&(e.username=HF(t.username,n)),typeof t.password==`string`&&(e.password=VF(t.password,n)),typeof t.hostname==`string`&&(e.hostname=BF(t.hostname,n)),typeof t.port==`string`&&(e.port=WF(t.port,e.protocol,n)),typeof t.pathname==`string`){if(e.pathname=t.pathname,r&&!MF(e.pathname,n)){let t=r.pathname.lastIndexOf(`/`);t>=0&&(e.pathname=sI(r.pathname.substring(0,t+1),n)+e.pathname)}e.pathname=UF(e.pathname,e.protocol,n)}return typeof t.search==`string`&&(e.search=zF(t.search,n)),typeof t.hash==`string`&&(e.hash=RF(t.hash,n)),e}bF(cI,`applyInit`);function lI(e){return e.replace(/([+*?:{}()\\])/g,`\\$1`)}bF(lI,`escapePatternString`);function uI(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,`\\$1`)}bF(uI,`escapeRegexpString`);function dI(e,t){t.delimiter??=`/#?`,t.prefixes??=`./`,t.sensitive??=!1,t.strict??=!1,t.end??=!0,t.start??=!0,t.endsWith=``;let n=`[^${uI(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+=lI(o.value);continue}i+=`{${lI(o.value)}}${kF(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+=lI(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+=lI(o.suffix),c&&(i+=`}`),o.modifier!==3&&(i+=kF(o.modifier))}return i}bF(dI,`partsToPattern`);var fI=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 rI(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:aI,protocol:aI,username:aI,password:aI,hostname:aI,port:aI,search:aI,hash:aI};this.#e=cI(a,e,!0),KF(this.#e.protocol)===this.#e.port&&(this.#e.port=``);let o;for(o of iI){if(!(o in this.#e))continue;let e={},t=this.#e[o];switch(this.#n[o]=[],o){case`protocol`:Object.assign(e,jF),e.encodePart=qF;break;case`username`:Object.assign(e,jF),e.encodePart=JF;break;case`password`:Object.assign(e,jF),e.encodePart=YF;break;case`hostname`:Object.assign(e,fie),FF(t)?e.encodePart=ZF:e.encodePart=XF;break;case`port`:Object.assign(e,jF),e.encodePart=QF;break;case`pathname`:LF(this.#t.protocol)?(Object.assign(e,pie,i),e.encodePart=$F):(Object.assign(e,jF,i),e.encodePart=eI);break;case`search`:Object.assign(e,jF,i),e.encodePart=tI;break;case`hash`:Object.assign(e,jF,i),e.encodePart=nI;break}try{this.#i[o]=TF(t,e),this.#t[o]=AF(this.#i[o],this.#n[o],e),this.#r[o]=dI(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`?cI(n,e,!1):cI(n,oI(e,t),!1)}catch{return!1}let r;for(r of iI)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`?cI(n,e,!1):cI(n,oI(e,t),!1)}catch{return null}let r={};t?r.inputs=[e,t]:r.inputs=[e];let i;for(i of iI){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=bF((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 xF(3,``,``,``,``,3),a=new xF(0,``,``,``,``,3),o=bF((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}};bF(fI,`URLPattern`),globalThis.URLPattern||(globalThis.URLPattern=fI);function*mie(e){let t=null;for(let n of e)t!=null&&t.type===B.RemoveFromQueue&&n.type===B.AddToQueue&&t.loc===n.loc?t=null:(t!==null&&(yield t),t=n);t!==null&&(yield t)}function pI(e,t){return e.containerId?`${t} fragment ${e.containerId.slice(0,8)}`:e.pal>0?`${t} ${e.pal}`:t}var mI=G(`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 hie(e,t){let n=Dk(t.basketName);switch(e.type){case B.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 B.BasketLoadUnload:return e.program===`LOAD`?`${n} Load`:`${n} Unload`;case B.BasketCycle:return`${n} Cycle`;case B.BasketInLocation:return e.startofcycle?`Arrive`:`Depart`;case B.BasketIdentityHint:return`${n} Identity Hint`;case B.BasketContentSnapshot:return`${n} Content Snapshot`;case B.MachineCycle:return e.startofcycle?`Start Cycle`:`End Cycle`;case B.PartMark:return`Serial`;case B.OrderAssignment:return`Workorder`;case B.Inspection:case B.InspectionForce:return`Signal`;case B.PalletCycle:return`Pallet Cycle`;case B.WorkorderComment:return`Workorder`;case B.CloseOut:return`CloseOut`;case B.InspectionResult:return`Inspection`;case B.AddToQueue:return`Queue`;case B.RemoveFromQueue:return`Queue`;case B.PalletInStocker:return`Stocker`;case B.PalletOnRotaryInbound:return`Rotary`;case B.SignalQuarantine:return`Quarantine`;case B.SwapMaterialOnPallet:return`Swap Serial`;case B.InvalidateCycle:return`Invalidate Cycle`;case B.Rebooking:return`Rebooking`;case B.CancelRebooking:return`Cancel Rebooking`;default:return`Message`}}function hI(e){return e.details?.PalletCycleInvalidated===`1`}function gI(e){return e.length>1?e[0].numproc==1?`${e[0].part} x${e.length}`:`${e[0].part}-${Q.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 _I(e){return e.length>1?`${e[0].part} x${e.length}`:e.length===1?e[0].part:``}function gie(e,t){let n=e.entry;switch(n.type){case B.LoadUnloadCycle:return(0,H.jsxs)(`span`,{children:[gI(n.material),` on`,` `,(0,H.jsxs)(mI,{$type:`pallet`,children:[`pallet `,n.pal]}),` at`,` `,(0,H.jsx)(mI,{$type:`loadStation`,children:Tk(n.locnum,t.loadStationNames)})]});case B.BasketLoadUnload:{let e=Dk(t.basketName);return(0,H.jsxs)(`span`,{children:[gI(n.material),` `,n.program===`LOAD`?`loaded onto`:`unloaded from`,` `,(0,H.jsx)(mI,{$type:`pallet`,children:pI(n,e)}),` at`,` `,(0,H.jsx)(mI,{$type:`loadStation`,children:Tk(n.locnum,t.loadStationNames)})]})}case B.BasketCycle:{let e=Dk(t.basketName);return n.startofcycle?(0,H.jsxs)(`span`,{children:[e,` `,n.pal,` started cycle`]}):(0,H.jsxs)(`span`,{children:[e,` `,n.pal,` completed cycle`,n.containerIds&&n.containerIds.length>0?` from ${n.containerIds.length} UUID fragment${n.containerIds.length===1?``:`s`}`:``]})}case B.BasketInLocation:{let e=Dk(t.basketName);return n.startofcycle?(0,H.jsxs)(`span`,{children:[pI(n,e),` arrived at `,n.loc,n.locnum>0?` position ${n.locnum}`:``]}):(0,H.jsxs)(`span`,{children:[pI(n,e),` departed from `,n.loc,n.locnum>0?` position ${n.locnum}`:``]})}case B.BasketIdentityHint:{let e=Dk(t.basketName);return(0,H.jsxs)(`span`,{children:[pI(n,e),` presently associated with `,e,` `,n.pal]})}case B.BasketContentSnapshot:return(0,H.jsxs)(`span`,{children:[pI(n,Dk(t.basketName)),` contained `,gI(n.material)]});case B.MachineCycle:return(0,H.jsxs)(`span`,{children:[gI(n.material),` on`,` `,(0,H.jsxs)(mI,{$type:`pallet`,children:[`pallet `,n.pal]}),` at`,` `,(0,H.jsxs)(mI,{$type:`machine`,children:[n.loc,` `,n.locnum.toString()]}),n.program&&n.program!==``?(0,H.jsxs)(`span`,{children:[` with program `,n.program]}):void 0]});case B.PartMark:return(0,H.jsxs)(`span`,{children:[gI(n.material),` marked with `,n.result]});case B.OrderAssignment:return(0,H.jsxs)(`span`,{children:[gI(n.material),` assigned to workorder `,n.result]});case B.PalletCycle:return n.startofcycle?(0,H.jsxs)(`span`,{children:[`Pallet `,n.pal,` started route`]}):(0,H.jsxs)(`span`,{children:[`Pallet `,n.pal,` completed route`]});case B.Inspection:{let e=(n.details||{}).InspectionType||``;return n.result.toLowerCase()===`true`||n.result===`1`?(0,H.jsxs)(`span`,{children:[gI(n.material),` signaled for inspection`,` `,(0,H.jsx)(mI,{$type:`inspectionSignaled`,children:e})]}):(0,H.jsxs)(`span`,{children:[gI(n.material),` skipped inspection`,` `,(0,H.jsx)(mI,{$type:`inspectionNotSignaled`,children:e})]})}case B.InspectionForce:{let e=n.program;return n.result.toLowerCase()===`true`||n.result===`1`?(0,H.jsxs)(`span`,{children:[gI(n.material),` declared for inspection`,` `,(0,H.jsx)(mI,{$type:`inspectionSignaled`,children:e})]}):(0,H.jsxs)(`span`,{children:[gI(n.material),` passed over for inspection`,` `,(0,H.jsx)(mI,{$type:`inspectionNotSignaled`,children:e})]})}case B.WorkorderComment:return(0,H.jsxs)(`span`,{children:[`Workorder `,n.result,` Comment`]});case B.InspectionResult:return n.result.toLowerCase()===`false`?(0,H.jsxs)(mI,{$type:`inspectionSignaled`,children:[n.program,` Failed`]}):(0,H.jsxs)(mI,{$type:`inspectionSignaled`,children:[n.program,` Succeeded`]});case B.CloseOut:return n.result.toLowerCase()===`failed`?(0,H.jsxs)(mI,{$type:`closeoutFailed`,children:[n.program&&n.program!==``?n.program:`CloseOut`,` Failed`]}):(0,H.jsxs)(`span`,{children:[n.program&&n.program!==``?n.program:`CloseOut`,` Completed`]});case B.AddToQueue:switch(n.program){case`Unloaded`:return(0,H.jsxs)(`span`,{children:[_I(n.material),` unloaded into queue`,` `,(0,H.jsx)(mI,{$type:`queue`,children:n.loc})]});case`SetByOperator`:return(0,H.jsxs)(`span`,{children:[_I(n.material),` set manually into queue`,` `,(0,H.jsx)(mI,{$type:`queue`,children:n.loc})]});case`Quarantine`:return(0,H.jsxs)(`span`,{children:[_I(n.material),` quarantined into queue`,` `,(0,H.jsx)(mI,{$type:`queue`,children:n.loc})]});case`SwapMaterial`:return(0,H.jsxs)(`span`,{children:[_I(n.material),` swapped off pallet into queue`,` `,(0,H.jsx)(mI,{$type:`queue`,children:n.loc})]});case`MaterialMissingOnPallet`:return(0,H.jsxs)(`span`,{children:[_I(n.material),` removed from cell controller, added to queue`,` `,(0,H.jsx)(mI,{$type:`queue`,children:n.loc})]});default:return(0,H.jsxs)(`span`,{children:[_I(n.material),` added to queue`,` `,(0,H.jsx)(mI,{$type:`queue`,children:n.loc}),n.program&&n.program!==``?` (`+n.program+`)`:void 0]})}case B.RemoveFromQueue:return(0,H.jsxs)(`span`,{children:[_I(n.material),` removed from queue`,` `,(0,H.jsx)(mI,{$type:`queue`,children:n.loc})]});case B.PalletInStocker:return n.startofcycle?(0,H.jsxs)(`span`,{children:[(0,H.jsxs)(mI,{$type:`pallet`,children:[`Pallet `,n.pal]}),` arrived at stocker`,` `,n.locnum]}):(0,H.jsxs)(`span`,{children:[(0,H.jsxs)(mI,{$type:`pallet`,children:[`Pallet `,n.pal]}),` departed stocker`,` `,n.locnum]});case B.PalletOnRotaryInbound:return n.startofcycle?(0,H.jsxs)(`span`,{children:[(0,H.jsxs)(mI,{$type:`pallet`,children:[`Pallet `,n.pal]}),` arrived at`,` `,(0,H.jsxs)(mI,{$type:`machine`,children:[n.loc,` `,n.locnum.toString()]})]}):n.result==`RotateIntoWorktable`?(0,H.jsxs)(`span`,{children:[(0,H.jsxs)(mI,{$type:`pallet`,children:[`Pallet `,n.pal]}),` rotated into`,` `,(0,H.jsxs)(mI,{$type:`machine`,children:[n.loc,` `,n.locnum.toString()]}),` `,`worktable`]}):(0,H.jsxs)(`span`,{children:[(0,H.jsxs)(mI,{$type:`pallet`,children:[`Pallet `,n.pal]}),` left`,` `,(0,H.jsxs)(mI,{$type:`machine`,children:[n.loc,` `,n.locnum.toString()]})]});case B.SignalQuarantine:return(0,H.jsxs)(`span`,{children:[gI(n.material),` signaled for quarantine after unload`]});case B.SwapMaterialOnPallet:return(0,H.jsx)(`span`,{children:n.result});case B.InvalidateCycle:return(0,H.jsx)(`span`,{children:n.result});case B.Rebooking:return(0,H.jsxs)(`span`,{children:[`Rebooking requested with ID `,n.result]});case B.CancelRebooking:return(0,H.jsxs)(`span`,{children:[`Rebooking `,n.result,` canceled`]});default:return(0,H.jsx)(`span`,{children:n.result})}}function _ie(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 vie=[B.AddToQueue,B.RemoveFromQueue,B.LoadUnloadCycle,B.BasketLoadUnload,B.MachineCycle],yie=G(dw,{shouldForwardProp:e=>e.toString()[0]!==`$`})(({$highlightProc:e,$invalidCycle:t})=>({...e&&{backgroundColor:`#eeeeee`},...t&&{textDecoration:`line-through`}})),bie=(0,I.memo)(function(e){let t=_ie(e.entry),n=e.highlightProcsGreaterOrEqualTo,r=L(yr);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(yie,{$highlightProc:n!==void 0&&e.entry.material.findIndex(e=>e.proc>=n)>=0&&vie.indexOf(e.entry.type)>=0,$invalidCycle:hI(e.entry),children:[(0,H.jsx)(Z,{size:`small`,children:e.entry.endUTC.toLocaleDateString(void 0,{month:`short`,day:`numeric`,year:`2-digit`})}),(0,H.jsx)(Z,{size:`small`,children:e.entry.endUTC.toLocaleTimeString(void 0,{hour:`numeric`,minute:`2-digit`})}),(0,H.jsx)(Z,{size:`small`,children:hie(e.entry,r)}),(0,H.jsx)(Z,{size:`small`,children:gie(e,r)}),(0,H.jsx)(Z,{padding:`checkbox`,children:t.length>0?(0,H.jsx)(Gm,{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,H.jsx)(dT,{fontSize:`inherit`})}):void 0})]}),t.length>0&&e.entry.counter===e.detailLogCounter?(0,H.jsx)(dw,{children:(0,H.jsx)(Z,{colSpan:5,children:(0,H.jsx)(`ul`,{children:t.map((e,t)=>(0,H.jsxs)(`li`,{children:[e.name,`: `,e.value]},t))})})}):void 0]})}),vI=(0,I.memo)(function(e){let[t,n]=(0,I.useState)(null);return(0,H.jsxs)(AC,{children:[(0,H.jsx)($C,{children:(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{children:`Date`}),(0,H.jsx)(Z,{children:`Time`}),(0,H.jsx)(Z,{children:`Type`}),(0,H.jsx)(Z,{children:`Details`}),(0,H.jsx)(Z,{padding:`checkbox`,children:e.copyToClipboard?(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(Gm,{onClick:()=>wA(e.entries),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,H.jsx)(jT,{})})}):void 0})]})}),(0,H.jsx)(LC,{children:Array.from(mie(e.entries)).map((r,i)=>(0,H.jsx)(bie,{entry:r,detailLogCounter:t,setDetail:n,highlightProcsGreaterOrEqualTo:e.highlightProcsGreaterOrEqualTo},i))})]})}),yI=P(null),bI=P(e=>e(yI),(e,t,n)=>{n===null?(t(yI,null),t(kI,[])):t(yI,n)}),xI=P(async e=>{let t=e(yI);if(t&&t.type===`Barcode`){if(Vt===void 0)return null;let n=e(UI),r=t.toQueue?[t.toQueue]:n.route===$.Station_LoadMonitor||n.route===$.Station_Queues?n.queues:null;return await Vt.parseBarcode(t.barcode,r)}else return null}),SI=P(async e=>(await e(xI))?.potentialNewMaterial??null),CI=P(async e=>{let t=e(yI);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(xI);return t?.existingMaterial&&t.existingMaterial.materialID>=0?t.existingMaterial:null}case`ManuallyEnteredSerial`:case`AddMatWithEnteredSerial`:return Ut===void 0?null:(await Ut.materialForSerial(t.serial))?.[0]??null}}),wI=BO(CI,e=>e??null);function TI(e){return BO(P(t=>t(e).then(e=>({state:`hasData`,data:e}),e=>({state:`hasError`,error:e}))),()=>({state:`loading`}))}var xie=TI(CI),EI=P(async e=>{let t=e(GO),n=e(yI);if(n===null)return null;if(n.type===`InProcMat`)return n.inproc;let r=(await e(CI))?.materialID??null;return r!==null&&r>=0?t.material.find(e=>e.materialID===r)??null:null}),DI=P(async e=>{let t=e(yI);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(xI);return t?.existingMaterial?.serial??t?.potentialNewMaterial?.serial??null}case`ManuallyEnteredSerial`:case`AddMatWithEnteredSerial`:return t.serial}});BO(DI,e=>e??null);var Sie=TI(DI),OI=P(async e=>{let t=e(yI);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(xI);return t?.existingMaterial?.workorder??t?.potentialNewMaterial?.workorder??null}case`ManuallyEnteredSerial`:case`AddMatWithEnteredSerial`:return null}}),kI=P([]),Cie=BO(P(async(e,{signal:t})=>{let n=await e(CI);return n===null||Ut===void 0?[]:n.materialID>=0?await Ut.logForMaterial(n.materialID,t):n.serial&&n.serial!==``?await Ut.logForSerial(n.serial):[]}),e=>e??[]),wie=BO(P(async(e,{signal:t})=>{let n=await e(DI);if(n===null||n===``)return[];let r=[];for(let e of Kt)r.push.apply(await e.logForSerial(n,t));return r}),e=>e??[]),AI=P(e=>{let t=e(kI);return Q.of(e(Cie)).concat(e(wie)).sortBy(e=>e.endUTC.getTime(),e=>e.counter).concat(t).toRArray()}),jI=P(async e=>{let t=await e(CI);if(t===null)return null;let n=e(AI),r=Q.of(n).filter(e=>!hI(e)&&(e.type===B.LoadUnloadCycle||e.type===B.MachineCycle||e.type===B.AddToQueue)).flatMap(e=>e.material).filter(e=>e.id===t.materialID).maxBy(e=>e.proc);return r?{process:r.proc,totalNumProcesses:r.numproc}:null}),MI=P(e=>{let t=e(yI),n=e(AI);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 B.Inspection:if(e.result.toLowerCase()===`true`||e.result===`1`){let t=(e.details||{}).InspectionType;t&&r.add(t)}break;case B.InspectionForce:(e.result.toLowerCase()===`true`||e.result===`1`)&&r.add(e.program);break;case B.InspectionResult:i.add(e.program);break}}),{signaledInspections:Q.of(r).toSortedArray(e=>e),completedInspections:Q.of(i).toSortedArray(e=>e)}}),Tie=P(async e=>{let t=await e(CI);if(t===null||t.partName===``)return[];let n=e(GO)?.workorders??[];return Q.of(n).filter(e=>e.part===t.partName).toSortedArray(e=>e.dueDate.getTime(),e=>-e.priority)});function NI(){let[e,t]=(0,I.useState)(!1),n=R(kI);return[(0,I.useCallback)(e=>{t(!0),Ut.setInspectionDecision(e.mat.materialID,e.inspType,1,e.inspect).then(e=>n(t=>[...t,e])).catch(console.log).finally(()=>t(!1))},[n]),e]}function Eie(){let[e,t]=(0,I.useState)(!1);return[(0,I.useCallback)(e=>{t(!0),Ut.recordInspectionCompleted(new Mt({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 PI(){let[e,t]=(0,I.useState)(!1);return[(0,I.useCallback)(e=>{t(!0),Ut.recordCloseoutCompleted(new Nt({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 FI(){let[e,t]=(0,I.useState)(!1),n=R(kI);return[(0,I.useCallback)((e,r)=>{t(!0),Ut.setWorkorder(e.materialID,1,r).then(e=>n(t=>[...t,e])).catch(console.log).finally(()=>t(!1))},[n]),e]}function Die(){let[e,t]=(0,I.useState)(!1),n=R(kI);return[(0,I.useCallback)(e=>{t(!0),Ut.recordOperatorNotes(e.matId,e.process,e.operator,e.notes).then(e=>n(t=>[...t,e])).catch(console.log).finally(()=>t(!1))},[n]),e]}function II(){let[e,t]=(0,I.useState)(!1),[n,r]=(0,I.useState)(!1);return[(0,I.useCallback)(e=>{t(!0),Vt.printLabel(e.materialId,e.proc).catch(console.log).finally(()=>{t(!1),r(!0)})},[]),e,n]}function Oie(){let[e,t]=(0,I.useState)(!1);return[(0,I.useCallback)((e,n)=>{t(!0),Ht.removeMaterialFromAllQueues(e,n??void 0).catch(console.log).finally(()=>t(!1))},[]),e]}function kie(){let[e,t]=(0,I.useState)(!1);return[(0,I.useCallback)((e,n,r)=>{t(!0),Ht.signalMaterialForQuarantine(e,n,r===``?void 0:r).catch(console.log).finally(()=>t(!1))},[]),e]}function LI(){let[e,t]=(0,I.useState)(!1);return[(0,I.useCallback)(e=>{t(!0),Ht.setMaterialInQueue(e.materialId,e.operator,new At({queue:e.queue,position:e.queuePosition})).catch(console.log).finally(()=>t(!1))},[]),e]}function Aie(){let[e,t]=(0,I.useState)(!1);return[(0,I.useCallback)(e=>{t(!0),Ht.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 RI(){let[e,t]=(0,I.useState)(!1);return[(0,I.useCallback)(e=>{t(!0),Ht.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}({}),jie=Q.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 zI(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 BI(e){for(let[t,n]of jie){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 VI=P(BI(new URL(location.href))),HI=P(!1),UI=P(e=>e(VI),(e,t,n)=>{let r=e(HI);t(VI,n),t(bI,null),r||history.pushState(null,``,zI(n))});function Mie({to:e,children:t}){let n=R(UI);return(0,I.createElement)(Qte,{href:zI(e),onClick:t=>{t.preventDefault(),t.stopPropagation(),n(e)}},t)}function Nie(){let e=L(HI),t=R(VI);(0,I.useEffect)(()=>{if(e)return;function n(){t(BI(new URL(location.href)))}return addEventListener(`popstate`,n),()=>removeEventListener(`popstate`,n)},[e,t])}function WI(){return L(HI)}function GI(e){(0,I.useEffect)(()=>{document.title=e+` - FMS Insight`},[WI(),e])}function Pie(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 KI=new Intl.NumberFormat(void 0,{style:`percent`,minimumFractionDigits:1});function Fie(){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 qI=(0,I.memo)(function(){let e=L(GO),t=Q.ofObject(e.jobs).sumBy(([,e])=>Q.of(e.completed??[]).sumBy(e=>Q.of(e).sumBy(e=>e))),n=Q.ofObject(e.jobs).flatMap(([,e])=>e.procsAndPaths).flatMap(e=>e.paths).sumBy(Fie()),r=Q.ofObject(e.jobs).sumBy(([,e])=>(e.cycles??0)*e.procsAndPaths.length);return(0,H.jsx)(J,{sx:{maxWidth:`60em`,ml:`auto`,mr:`auto`,pt:`1em`},children:(0,H.jsxs)(J,{sx:{display:`grid`,gridTemplateColumns:`auto 1fr auto`,gridColumnGap:`0.5em`,alignItems:`center`},children:[(0,H.jsx)(J,{sx:{gridRow:1,gridColumn:1},children:(0,H.jsxs)(q,{variant:`body2`,children:[`Completed Parts: `,t,`/`,r]})}),(0,H.jsx)(J,{sx:{gridRow:1,gridColumn:2},children:(0,H.jsx)(tb,{variant:`determinate`,value:t/r*100,color:`secondary`})}),(0,H.jsx)(J,{sx:{gridRow:1,gridColumn:3},children:(0,H.jsx)(q,{variant:`body2`,children:KI.format(t/r)})}),(0,H.jsx)(J,{sx:{gridRow:2,gridColumn:1},children:(0,H.jsxs)(q,{variant:`body2`,children:[`Simulated Parts: `,n,`/`,r]})}),(0,H.jsx)(J,{sx:{gridRow:2,gridColumn:2},children:(0,H.jsx)(tb,{variant:`determinate`,value:n/r*100,color:`secondary`})}),(0,H.jsx)(J,{sx:{gridRow:2,gridColumn:3},children:(0,H.jsx)(q,{variant:`body2`,children:KI.format(n/r)})})]})})});function Iie(){let{ref:e,width:t,height:n}=UA({refreshMode:`debounce`,refreshRate:100});return(0,H.jsxs)(`main`,{style:{height:`calc(100vh - 64px)`,display:`flex`,flexDirection:`column`},children:[(0,H.jsx)(`div`,{children:(0,H.jsx)(qI,{})}),(0,H.jsx)(`div`,{ref:e,style:{flexGrow:1,overflow:`hidden`,margin:`8px`},children:t&&n&&(0,H.jsx)(yF,{width:t,height:n})})]})}function Lie(){let{ref:e,width:t}=UA({refreshMode:`debounce`,refreshRate:100,handleHeight:!1});return(0,H.jsxs)(`main`,{style:{padding:`8px`},children:[(0,H.jsx)(qI,{}),(0,H.jsx)(`div`,{ref:e,style:{overflow:`hidden`},children:t&&(0,H.jsx)(yF,{width:t,height:500})})]})}function Rie(){return GI(`Dashboard`),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(J,{sx:{display:{xs:`none`,md:`block`}},children:(0,H.jsx)(Iie,{})}),(0,H.jsx)(J,{sx:{display:{xs:`block`,md:`none`}},children:(0,H.jsx)(Lie,{})})]})}var JI=P([]),YI=JI,XI=P([]),zie=XI;function*ZI(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 Bie=P(null,(e,t,n)=>{t(JI,e=>[...e,...ZI(Object.values(n.jobs))])}),Vie=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.newJobs){let e=n.newJobs.jobs;t(JI,t=>{if(i){let n=tE(r,-30),i=Q.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,...ZI(e)]})}}),Hie=P(null,(e,t,n)=>{t(XI,Array.from(ZI(Object.values(n.jobs))))}),QI=P(gO.empty()),Uie=QI,$I=P(gO.empty()),Wie=$I;function eL(e){if(e.elapsed===``)return null;let t=tk(e.elapsed);if(t<=0)return null;switch(e.type){case B.RemoveFromQueue:return[e.counter,{buffer:{type:`Queue`,queue:e.loc},endTime:e.endUTC,elapsedSeconds:t,numMaterial:e.material.length}];case B.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 B.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 Gie=P(null,(e,t,n)=>{t(QI,e=>e.union(Q.of(n).collect(eL).toHashMap(e=>e)))}),Kie=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(!n.logEntry)return;let a=eL(n.logEntry);a&&t(QI,e=>{if(i){let t=tE(r,-30);e=e.filter(e=>e.endTime>=t)}return e.set(a[0],a[1])})}),qie=P(null,(e,t,n)=>{t($I,Q.of(n).collect(eL).toHashMap(e=>e))}),Jie=P(null),tL=P(null,(e,t,n)=>{t(Jie,n)}),nL=function(e){return e[e.Triggered=0]=`Triggered`,e[e.Forced=1]=`Forced`,e[e.Completed=2]=`Completed`,e}({}),rL=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 jD(this.part,this.inspType)}toString(){return`{part: ${this.part}}, inspType: ${this.inspType}}`}},iL=P(gO.empty()),aL=iL,oL=P(gO.empty()),Yie=oL;function sL(e){return e.type!==B.Inspection&&e.type!==B.InspectionForce&&e.type!==B.InspectionResult?[]:e.material.map(t=>{if(e.type===B.Inspection){let n=JSON.parse((e.details||{}).ActualPath||`[]`),r=Array.isArray(n)?n:[],i=[];for(let e of r)i.push(Pe.fromJS(e));let a=(e.details||{}).InspectionType||``,o;return o=e.result.toLowerCase()===`true`||e.result===`1`,{key:new rL(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===B.InspectionForce){let n;return n=e.result.toLowerCase()===`true`||e.result===`1`,{key:new rL(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 rL(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 Xie=P(null,(e,t,n)=>{t(iL,e=>e.union(Q.of(n).flatMap(sL).toLookupMap(e=>e.key,e=>e.entry.cntr,e=>e.entry),(e,t)=>e.union(t)))}),Zie=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.logEntry){let e=sL(n.logEntry);if(e.length===0)return;t(iL,t=>{if(i){let e=tE(r,-30);t=t.collectValues(t=>{let n=t.filter(t=>t.time>=e);return n.size===0?null:n})}return t.union(Q.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(iL,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}))}}),Qie=P(null,(e,t,n)=>{t(oL,Q.of(n).flatMap(sL).toLookupMap(e=>e.key,e=>e.entry.cntr,e=>e.entry))}),cL=P({matsById:gO.empty(),matIdsForJob:gO.empty()}),lL=cL,uL=P({matsById:gO.empty(),matIdsForJob:gO.empty()}),dL=uL;function fL(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 pL(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,sO.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 B.PartMark:a={...a,serial:t.result};break;case B.OrderAssignment:a={...a,workorderId:t.result};break;case B.Inspection:if(t.result.toLowerCase()===`true`||t.result===`1`){let e=(t.details||{}).InspectionType;e&&(a={...a,signaledInspections:[...a.signaledInspections,e]})}break;case B.InspectionForce:if(t.result.toLowerCase()===`true`||t.result===`1`){let e=t.program;a={...a,signaledInspections:[...a.signaledInspections,e]}}break;case B.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 B.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 B.MachineCycle:a.currently_quarantined&&(a={...a,currently_quarantined:!1});break;case B.AddToQueue:t.program===`Quarantine`&&(a={...a,currently_quarantined:!0});break;case B.CloseOut:a={...a,closeout_completed:t.endUTC,closeout_failed:t.result===`Failed`};break;case B.SignalQuarantine:a={...a,quarantineAfterUnload:!0}}n=n.set(e.id,a)}return{matsById:n,matIdsForJob:r}}function mL(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=Q.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 hL(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 B.Inspection:case B.InspectionForce:{let e=t.program,n;n=t.result.toLowerCase()===`true`||t.result===`1`,n&&(a={...a,signaledInspections:Q.of(a.signaledInspections).filter(t=>t!==e).toRArray()},o={...o,signaledInspections:Q.of([...o.signaledInspections,e]).distinct().toSortedArray(e=>e)})}}}return{matsById:t.matsById.set(a.materialID,a).set(o.materialID,o),matIdsForJob:n}}var gL=P(null,(e,t,n)=>{t(cL,e=>n.reduce(pL,e))}),_L=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.logEntry){let e=n.logEntry;t(cL,t=>{let n=pL(t,e);return n===t||!i?t:mL(tE(r,-30),n)})}else if(n.editMaterialInLog){let e=n.editMaterialInLog;t(cL,t=>hL(e,t))}}),vL=P(null,(e,t,n)=>{t(uL,n.reduce(pL,{matsById:gO.empty(),matIdsForJob:gO.empty()}))}),yL=P(new Set),bL=yL,xL=P(new Set),SL=xL,CL=P(new Set),wL=CL,TL=P(new Set),EL=TL,DL=P(null,(e,t,{evt:n})=>{n.newJobs?jL(t,n.newJobs.jobs):n.logEntry?NL(t,[n.logEntry]):n.newCurrentStatus&&ML(e,t,n.newCurrentStatus)}),OL=P(null,(e,t,n)=>{jL(t,Object.values(n.jobs))}),kL=P(null,(e,t,n)=>NL(t,n)),AL=P(null,ML);function jL(e,t){e(CL,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 ML(e,t,n){jL(t,Object.values(n.jobs));let r=e(yL),i=e(xL),a=new Set,o=new Set;for(let[e,t]of Q.ofObject(n.queues))t.role===lt.RawMaterial?r.has(e)||a.add(e):t.role===lt.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 NL(e,t){e(TL,e=>{let n=new Set;for(let r of t)switch(r.type){case B.Inspection:{let t=(r.details||{}).InspectionType;t&&!e.has(t)&&n.add(t)}break;case B.InspectionForce:case B.InspectionResult:{let t=r.program;e.has(t)||n.add(t)}break}return n.size===0?e:new Set([...e,...n])})}var PL=P(gO.empty()),FL=PL;function IL(e,t,n){if(e.tooluse===void 0||e.tooluse.length===0||e.type!==B.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=Q.of(e.tooluse).groupBy(e=>e.tool).map(([e,t])=>({toolName:e,cycleUsageMinutes:Q.of(t).sumBy(e=>e.toolUseDuringCycle&&e.toolUseDuringCycle!==``?nk(e.toolUseDuringCycle):0),cycleUsageCnt:Q.of(t).sumBy(e=>e.toolUseCountDuringCycle??0),toolChangedDuringMiddleOfCycle:Q.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:uO.empty().add(wk(e.loc,e.locnum)),recentCycles:[{tools:o}]}})}var LL=P(null,(e,t,n)=>{let r=e(ak);t(PL,e=>n.reduce((e,t)=>IL(t,r,e),e))}),RL=P(null,(e,t,{evt:n})=>{if(n.logEntry){let r=n.logEntry,i=e(ak);t(PL,e=>IL(r,i,e))}}),zL=P(gO.empty()),BL=zL,VL=P(gO.empty()),HL=VL;function UL(e){return{cntr:e.counter,x:e.endUTC,y:nk(e.elapsed),active:nk(e.active),mats:e.material}}var WL=P(null,(e,t,n)=>{t(zL,e=>e.union(Q.of(n).filter(e=>!e.startofcycle&&e.type===B.PalletCycle&&e.pal!==0).toLookupMap(e=>e.pal,e=>e.counter,UL),(e,t)=>e.union(t)))}),GL=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.logEntry&&!n.logEntry.startofcycle&&n.logEntry.type===B.PalletCycle&&n.logEntry.pal!==0){let e=n.logEntry;t(zL,t=>{if(i){let e=tE(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??gO.empty()).set(e.counter,UL(e)))})}}),KL=P(null,(e,t,n)=>{t(VL,Q.of(n).filter(e=>!e.startofcycle&&e.type===B.PalletCycle&&e.pal!==0).toLookupMap(e=>e.pal,e=>e.counter,UL))}),qL=P(gO.empty()),JL=qL,YL=P(e=>e(qL).size>0),XL=P(gO.empty()),ZL=XL,QL=P(e=>e(XL).size>0);function $L(e){return{cntr:e.counter,x:e.endUTC,y:nk(e.elapsed),active:nk(e.active),mats:e.material}}var eR=P(null,(e,t,n)=>{t(qL,e=>e.union(Q.of(n).filter(e=>!e.startofcycle&&e.type===B.BasketCycle&&e.pal!==0).toLookupMap(e=>e.pal,e=>e.counter,$L),(e,t)=>e.union(t)))}),tR=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.logEntry&&!n.logEntry.startofcycle&&n.logEntry.type===B.BasketCycle&&n.logEntry.pal!==0){let e=n.logEntry;t(qL,t=>{if(i){let e=tE(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??gO.empty()).set(e.counter,$L(e)))})}}),nR=P(null,(e,t,n)=>{t(XL,Q.of(n).filter(e=>!e.startofcycle&&e.type===B.BasketCycle&&e.pal!==0).toLookupMap(e=>e.pal,e=>e.counter,$L))}),rR=class e{constructor(e,t){this.group=e,this.num=t}static ofLogCycle(t){return new e(t.loc,t.locnum)}hash(){return jD(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()}},iR={replacements:fO.empty(),recentUse:gO.empty()},aR=P(iR),oR=P(e=>e(aR).replacements),sR=P(iR),cR=P(e=>e(sR).replacements);function lR(e,t){let n=rR.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??fO.empty()).set(t.counter,{time:t.endUTC,replacements:i}):r}),recentUse:t.tooluse?e.recentUse.set(n,t.tooluse):e.recentUse}}var uR=P(null,(e,t,n)=>{t(aR,e=>Q.of(n).filter(e=>e.type===B.MachineCycle&&!e.startofcycle&&!!e.tooluse&&e.tooluse.length>0).fold(e,lR))}),dR=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.logEntry&&!n.logEntry.startofcycle&&n.logEntry.type===B.MachineCycle&&n.logEntry.tooluse&&n.logEntry.tooluse.length>0){let e=n.logEntry;t(aR,t=>{if(i){let e=tE(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 lR(t,e)})}}),fR=P(null,(e,t,n)=>{t(sR,Q.of(n).filter(e=>e.type===B.MachineCycle&&!e.startofcycle&&!!e.tooluse&&e.tooluse.length>0).fold(iR,lR))}),pR=P(null),mR=pR;function hR(e,t,n,r){let i=e(mR);(i===null||i.simId<n)&&t(pR,{simId:n,usage:r})}var gR=P(null,(e,t,n)=>{!n.mostRecentSimulationId||!n.mostRecentSimDayUsage||n.mostRecentSimDayUsage.length===0||hR(e,t,n.mostRecentSimulationId,n.mostRecentSimDayUsage)}),_R=P(null,(e,t,{evt:n})=>{n.newJobs&&n.newJobs.simDayUsage&&n.newJobs.simDayUsage.length>0&&hR(e,t,n.newJobs.scheduleId,n.newJobs.simDayUsage)}),vR=P(fO.empty()),yR=BO(P(async(e,{signal:t})=>{if(Ht===void 0)return fO.empty();let n=await Ht.unscheduledRebookings(t);return fO.build(n,e=>e.bookingId)}),e=>e??fO.empty()),bR=P(e=>{let t=e(vR),n=e(yR);return t.union(n,(e,t)=>e??t)}),xR=P(fO.empty()),SR=xR,CR=P(fO.empty()),wR=CR;function TR(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 ER=P(null,(e,t,n)=>{t(vR,e=>e.union(Q.of(n).filter(e=>e.type===B.Rebooking).toOrderedMap(e=>[e.result,TR(e)]))),t(xR,e=>e.union(Q.of(n).filter(e=>e.type===B.CancelRebooking).toOrderedMap(e=>[e.result,e.endUTC])))});function DR(e,t,n){e(CR,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 OR=P(null,(e,t,n)=>{DR(t,Q.ofObject(n.jobs).map(([,e])=>e))}),kR=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.newJobs)DR(t,Q.of(n.newJobs.jobs),i?tE(r,-30):void 0);else if(n.logEntry){let e=n.logEntry;e.type===B.Rebooking?t(vR,t=>t.set(e.result,TR(e))):e.type===B.CancelRebooking&&t(xR,t=>t.set(e.result,e.endUTC))}});function AR(){let[e,t]=(0,I.useState)(!1);return[(0,I.useCallback)(e=>(t(!0),Ut.cancelRebooking(e).then(()=>{}).catch(console.log).finally(()=>t(!1))),[]),e]}function jR(){let[e,t]=(0,I.useState)(!1);return[(0,I.useCallback)(e=>(t(!0),Ut.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 MR=P(null),NR=MR,PR=P(null,(e,t,n)=>{if(n.evt.newCurrentStatus&&t(tL,n.evt.newCurrentStatus.customState??null),t(Vie,n),t(jA,n),t(EO,n),t(Kie,n),t(XO,n),t(_L,n),t(Zie,n),t(DL,n),t(RL,n),t(GL,n),t(tR,n),t(dR,n),t(Vk,n),t(kR,n),t(_R,n),n.evt.logEntry){let e=n.evt.logEntry.counter;t(MR,t=>t===null?t:Math.max(t,e))}}),FR=P(null,(e,t,n)=>{let r=wO(e(xO),n);t(AA,r),t(Bie,r),t(TO,r),t(OL,r),t(gR,r),t(OR,r)}),IR=P(null,(e,t,n)=>{t(gk,n),t(Gie,n),t(Xie,n),t(gL,n),t(kL,n),t(LL,n),t(WL,n),t(eR,n),t(uR,n),t(Bk,n),t(ER,n);let r=Q.of(n).maxBy(e=>e.counter)?.counter??null;t(MR,e=>e===null?r:Math.max(e,r??-1))}),LR=P(null,(e,t,n)=>{t(YO,n),t(tL,n.customState??null),t(AL,n)}),RR=P(null,(e,t,n)=>{t(MA,n),t(Hie,n),t(DO,n)}),zR=P(null,(e,t,n)=>{t(_k,n),t(qie,n),t(Qie,n),t(vL,n),t(KL,n),t(nR,n),t(fR,n),t(Hk,n)}),BR=P(`Last30`),VR=P(yE(new Date)),HR=P(e=>e(VR),(e,t,n)=>{t(BR,`SpecificMonth`),t(VR,n),e(WR)!==n&&!e(GR)&&YR(n,t)}),UR=P(e=>e(BR)===`Last30`?{type:`Last30`}:{type:`SpecificMonth`,month:e(VR)}),WR=P(null),GR=P(!1),KR=GR,qR=P(null),JR=qR;function YR(e,t){t(GR,!0),t(qR,null);let n=nE(e,1),r=Ht.history(e,n).then(e=>t(RR,e)),i=Ut.get(e,n).then(e=>t(zR,e));Promise.all([r,i]).then(()=>t(WR,e)).catch(e=>t(qR,e.message??`Error`)).finally(()=>t(GR,!1))}function XR(){let e=R(BR);return()=>e(`Last30`)}function ZR(){return R(VR)}function QR(e){return bk(e)&&e.operation===`UNLOAD`}function $R(e){return Object.prototype.hasOwnProperty.call(e,`month`)}function ez(e,t,n,r){let i=$R(r)?r.month:r.thirtyDaysAgo,a=$R(r)?nE(r.month,1):tE(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(QR(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=Q.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:Q.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:Q.of(t).filter(e=>vk(e)).sumBy(e=>e.activeMinutes/c),automation:o>0?t.reduce((e,t)=>QR(t)?e+1:e,0)/o:0})).toRArray(),machineQuantities:Q.of(l).toOrderedMap(([e,t])=>[e,t.size]),type:r}}function tz(e,t,n,r){let i=$R(e.type)?Cre(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 nz(e){let t=`<table>
|
|
260
|
+
<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>
|
|
261
|
+
<tbody>
|
|
262
|
+
`;let n=Q.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>
|
|
263
|
+
`}return t+=`</tbody>
|
|
264
|
+
</table>`,t}function rz(e){oA(nz(e))}function iz(e){let t=`<table>
|
|
265
|
+
<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>
|
|
266
|
+
<tbody>
|
|
267
|
+
`;let n=Q.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>
|
|
268
|
+
`}return t+=`</tbody>
|
|
269
|
+
</table>`,t}function az(e){oA(iz(e))}function oz(e,t,n){return parseInt(e.substr(t,n),16)}function sz(e){return e|=0,e<0?`00`:e<16?`0`+e.toString(16):e<256?e.toString(16):`ff`}function cz(e,t,n){return n=n<0?n+6:n>6?n-6:n,sz(255*(n<1?e+(t-e)*n:n<3?t:n<4?e+(t-e)*(4-n):e))}function lz(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 uz(e,t,n){let r;if(t==0){let e=sz(n*255);r=e+e+e}else{let i=n<=.5?n*(t+1):n+t-n*t,a=n*2-i;r=cz(a,i,e*6+2)+cz(a,i,e*6)+cz(a,i,e*6-2)}return`#`+r}function dz(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,uz(e,t,n)}var fz=typeof window<`u`?window:typeof self<`u`?self:typeof global<`u`?global:{},pz={V:`jdenticon_config`,n:`config`},mz={};function hz(e,t){let n=typeof e==`object`&&e||mz[pz.n]||fz[pz.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:lz(s),X:typeof e==`number`?e:typeof c==`number`?c:t}}var gz=class{constructor(e,t){this.x=e,this.y=t}},_z=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 gz(i-t-(r||0),this.t+e):o===2?new gz(i-e-(n||0),a-t-(r||0)):o===3?new gz(this.q+t,a-e-(n||0)):new gz(this.q+e,this.t+t)}},vz=new _z(0,0,0,0),yz=class{constructor(e){this.J=e,this.u=vz}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 bz(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 xz(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 Sz(e,t){return e=t.W(e),[dz(e,t.D,t.F(0)),dz(e,t.o,t.p(.5)),dz(e,t.D,t.F(1)),dz(e,t.o,t.p(1)),dz(e,t.o,t.p(0))]}function Cz(e,t,n){let r=hz(n,.08);r.G&&e.m(r.G);let i=e.k,a=.5+i*r.X|0;i-=a*2;let o=new yz(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=oz(t,i,1),m=a?oz(t,a,1):0;e.L(d[f[n]]);for(let e=0;e<u.length;e++)o.u=new _z(c+u[e][0]*s,l+u[e][1]*s,s,m++%4),r(p,o,s,e);e.M()}let d=Sz(oz(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=oz(t,8+e,1)%d.length,(m([0,4])||m([2,3]))&&(p=1),f.push(p);u(0,xz,2,3,[[1,0],[2,0],[2,3],[1,3],[0,1],[3,1],[3,2],[0,2]]),u(1,xz,4,5,[[0,0],[3,0],[3,3],[0,3]]),u(2,bz,1,null,[[1,1],[2,1],[2,2],[1,2]]),e.finish()}function wz(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 Tz(e){return/^[0-9a-f]{11,}$/i.test(e)&&e}function Ez(e){return wz(e==null?``:``+e)}typeof document<`u`&&document.querySelectorAll.bind(document);function Dz(e){return(e*10+.5|0)/10}var Oz=class{constructor(){this.v=``}g(e){let t=``;for(let n=0;n<e.length;n++)t+=(n?`L`:`M`)+Dz(e[n].x)+` `+Dz(e[n].y);this.v+=t+`Z`}h(e,t,n){let r=+!n,i=Dz(t/2),a=Dz(t),o=`a`+i+`,`+i+` 0 1,`+r+` `;this.v+=`M`+Dz(e.x)+` `+Dz(e.y+t/2)+o+a+`,0`+o+-a+`,0`}},kz=class{constructor(e){this.A,this.B={},this.O=e,this.k=e.k}m(e){let t=/^(#......)(..)?/.exec(e),n=t[2]?oz(t[2],0)/255:1;this.O.m(t[1],n)}L(e){this.A=this.B[e]||(this.B[e]=new Oz)}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)}},Az={R:`http://www.w3.org/2000/svg`,S:`width`,T:`height`},jz=class{constructor(e){this.k=e,this.C=`<svg xmlns="`+Az.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 Mz(e,t,n){let r=new jz(t);return Cz(new kz(r),Tz(e)||Ez(e),n),r.toString()}function Nz(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 Pz=(e,t,n)=>{let r=e===1?t:t+`s`;return e+` `+r+` `+n};function Fz(){return Fz=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},Fz.apply(null,arguments)}var Iz=60,Lz=Iz*60,Rz=Lz*24,zz=Rz*7,Bz=Rz*30,Vz=Rz*365,Hz=()=>Date.now();function Uz({date:e,formatter:t,component:n=`time`,live:r=!0,minPeriod:i=0,maxPeriod:a=zz,title:o,now:s=Hz,...c}){let[l,u]=(0,I.useState)(s());(0,I.useEffect)(()=>{if(!r)return;let t=(()=>{let t=Nz(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<Iz?1e3:n<Lz?1e3*Iz:n<Rz?1e3*Lz:1e3*zz,i*1e3),a*1e3);return r?setTimeout(()=>{u(s())},r):0})();return()=>{t&&clearTimeout(t)}},[e,r,a,i,s,l]),(0,I.useEffect)(()=>{u(s())},[e]);let d=n,f=Nz(e).valueOf();if(!f)return null;let p=Math.round(Math.abs(l-f)/1e3),m=f<l?`ago`:`from now`,[h,g]=p<Iz?[Math.round(p),`second`]:p<Lz?[Math.round(p/Iz),`minute`]:p<Rz?[Math.round(p/Lz),`hour`]:p<zz?[Math.round(p/Rz),`day`]:p<Bz?[Math.round(p/zz),`week`]:p<Vz?[Math.round(p/Bz),`month`]:[Math.round(p/Vz),`year`],_=o===void 0?typeof e==`string`?e:Nz(e).toISOString().substring(0,16).replace(`T`,` `):o,v=d===`time`?{...c,dateTime:Nz(e).toISOString()}:c,y=(e=e,t=t,n=n,r=f,i=Pz,a=a)=>Pz(e,t,n,r,i,a),b=t||Pz,x;try{x=b(h,g,m,f,y,s),x||=Pz(h,g,m,f,y,s)}catch(e){console.error(`[react-timeago] Formatter threw an error:`,e),x=Pz(h,g,m,f,y,s)}return I.createElement(d,Fz({},v,{title:_}),x)}function Wz(){var e=[...arguments];return(0,I.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var Gz=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 qz(e){return`nodeType`in e}function Jz(e){return e?Kz(e)?e:qz(e)?e.ownerDocument?.defaultView??window:window:window}function Yz(e){let{Document:t}=Jz(e);return e instanceof t}function Xz(e){return!Kz(e)&&e instanceof Jz(e).HTMLElement}function Zz(e){return e instanceof Jz(e).SVGElement}function Qz(e){return e?Kz(e)?e.document:qz(e)?Yz(e)?e:Xz(e)||Zz(e)?e.ownerDocument:document:document:document}var $z=Gz?I.useLayoutEffect:I.useEffect;function eB(e){let t=(0,I.useRef)(e);return $z(()=>{t.current=e}),(0,I.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function tB(){let e=(0,I.useRef)(null);return[(0,I.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,I.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function nB(e,t){t===void 0&&(t=[e]);let n=(0,I.useRef)(e);return $z(()=>{n.current!==e&&(n.current=e)},t),n}function rB(e,t){let n=(0,I.useRef)();return(0,I.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function iB(e){let t=eB(e),n=(0,I.useRef)(null);return[n,(0,I.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function aB(e){let t=(0,I.useRef)();return(0,I.useEffect)(()=>{t.current=e},[e]),t.current}var oB={};function sB(e,t){return(0,I.useMemo)(()=>{if(t)return t;let n=oB[e]==null?0:oB[e]+1;return oB[e]=n,e+`-`+n},[e,t])}function cB(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 lB=cB(1),uB=cB(-1);function dB(e){return`clientX`in e&&`clientY`in e}function fB(e){if(!e)return!1;let{KeyboardEvent:t}=Jz(e.target);return t&&e instanceof t}function pB(e){if(!e)return!1;let{TouchEvent:t}=Jz(e.target);return t&&e instanceof t}function mB(e){if(pB(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 dB(e)?{x:e.clientX,y:e.clientY}:null}var hB=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[hB.Translate.toString(e),hB.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),gB=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function _B(e){return e.matches(gB)?e:e.querySelector(gB)}var vB={display:`none`};function yB(e){let{id:t,value:n}=e;return I.createElement(`div`,{id:t,style:vB},n)}function bB(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return I.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 xB(){let[e,t]=(0,I.useState)(``);return{announce:(0,I.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var SB=(0,I.createContext)(null);function CB(e){let t=(0,I.useContext)(SB);(0,I.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function wB(){let[e]=(0,I.useState)(()=>new Set),t=(0,I.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,I.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var TB={draggable:`
|
|
270
|
+
To pick up a draggable item, press the space bar.
|
|
271
|
+
While dragging, use the arrow keys to move the item.
|
|
272
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
273
|
+
`},EB={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 DB(e){let{announcements:t=EB,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=TB}=e,{announce:a,announcement:o}=xB(),s=sB(`DndLiveRegion`),[c,l]=(0,I.useState)(!1);if((0,I.useEffect)(()=>{l(!0)},[]),CB((0,I.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=I.createElement(I.Fragment,null,I.createElement(yB,{id:r,value:i.draggable}),I.createElement(bB,{id:s,announcement:o}));return n?(0,i_.createPortal)(u,n):u}var OB;(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`})(OB||={});function kB(){}function AB(e,t){return(0,I.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function jB(){var e=[...arguments];return(0,I.useMemo)(()=>[...e].filter(e=>e!=null),[...e])}var MB=Object.freeze({x:0,y:0});function NB(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function PB(e,t){let n=mB(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 FB(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function IB(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function LB(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 RB(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function zB(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 BB=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=zB(t,t.left,t.top),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=NB(zB(r),i);a.push({id:t,data:{droppableContainer:e,value:n}})}}return a.sort(FB)},VB=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=LB(t),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=LB(r),o=i.reduce((e,t,r)=>e+NB(n[r],t),0),s=Number((o/4).toFixed(4));a.push({id:t,data:{droppableContainer:e,value:s}})}}return a.sort(FB)};function HB(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 UB=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=HB(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(IB)};function WB(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 GB=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&&WB(r,a)){let n=LB(a).reduce((e,t)=>e+NB(r,t),0),o=Number((n/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:o}})}}return i.sort(FB)};function KB(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function qB(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:MB}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 YB=JB(1);function XB(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 ZB(e,t,n){let r=XB(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 QB={ignoreTransform:!1};function $B(e,t){t===void 0&&(t=QB);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=Jz(e).getComputedStyle(e);t&&(n=ZB(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 eV(e){return $B(e,{ignoreTransform:!0})}function tV(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function nV(e,t){return t===void 0&&(t=Jz(e).getComputedStyle(e)),t.position===`fixed`}function rV(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)})}function iV(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(Yz(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!Xz(i)||Zz(i)||n.includes(i))return n;let a=Jz(e).getComputedStyle(i);return i!==e&&rV(i,a)&&n.push(i),nV(i,a)?n:r(i.parentNode)}return e?r(e):n}function aV(e){let[t]=iV(e,1);return t??null}function oV(e){return!Gz||!e?null:Kz(e)?e:qz(e)?Yz(e)||e===Qz(e).scrollingElement?window:Xz(e)?e:null:null}function sV(e){return Kz(e)?e.scrollX:e.scrollLeft}function cV(e){return Kz(e)?e.scrollY:e.scrollTop}function lV(e){return{x:sV(e),y:cV(e)}}var uV;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(uV||={});function dV(e){return!Gz||!e?!1:e===document.scrollingElement}function fV(e){let t={x:0,y:0},n=dV(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 pV={x:.2,y:.2};function mV(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=pV);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=fV(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=uV.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=uV.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=uV.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=uV.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function hV(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 gV(e){return e.reduce((e,t)=>lB(e,lV(t)),MB)}function _V(e){return e.reduce((e,t)=>e+sV(t),0)}function vV(e){return e.reduce((e,t)=>e+cV(t),0)}function yV(e,t){if(t===void 0&&(t=$B),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);aV(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var bV=[[`x`,[`left`,`right`],_V],[`y`,[`top`,`bottom`],vV]],xV=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=iV(t),r=gV(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of bV)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})}},SV=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 CV(e){let{EventTarget:t}=Jz(e);return e instanceof t?e:Qz(e)}function wV(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}var TV;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(TV||={});function EV(e){e.preventDefault()}function DV(e){e.stopPropagation()}var OV;(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`})(OV||={});var kV={start:[OV.Space,OV.Enter],cancel:[OV.Esc],end:[OV.Space,OV.Enter,OV.Tab]},AV=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case OV.Right:return{...n,x:n.x+25};case OV.Left:return{...n,x:n.x-25};case OV.Down:return{...n,y:n.y+25};case OV.Up:return{...n,y:n.y-25}}},jV=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 SV(Qz(t)),this.windowListeners=new SV(Jz(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(TV.Resize,this.handleCancel),this.windowListeners.add(TV.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(TV.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&yV(n),t(MB)}handleKeyDown(e){if(fB(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=kV,coordinateGetter:a=AV,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}:MB;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=uB(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}=fV(n),p=hV(n),m={x:Math.min(i===OV.Right?p.right-p.width/2:p.right,Math.max(i===OV.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===OV.Down?p.bottom-p.height/2:p.bottom,Math.max(i===OV.Down?p.top:p.top+p.height/2,u.y))},h=i===OV.Right&&!s||i===OV.Left&&!c,g=i===OV.Down&&!l||i===OV.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===OV.Right&&e<=d.x||i===OV.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}a?r.x=n.scrollLeft-e:r.x=i===OV.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===OV.Down&&e<=d.y||i===OV.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}a?r.y=n.scrollTop-e:r.y=i===OV.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,lB(uB(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()}};jV.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=kV,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 MV(e){return!!(e&&`distance`in e)}function NV(e){return!!(e&&`delay`in e)}var PV=class{constructor(e,t,n){n===void 0&&(n=CV(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=Qz(i),this.documentListeners=new SV(this.document),this.listeners=new SV(n),this.windowListeners=new SV(Jz(i)),this.initialCoordinates=mB(r)??MB,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(TV.Resize,this.handleCancel),this.windowListeners.add(TV.DragStart,EV),this.windowListeners.add(TV.VisibilityChange,this.handleCancel),this.windowListeners.add(TV.ContextMenu,EV),this.documentListeners.add(TV.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(NV(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(MV(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(TV.Click,DV,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(TV.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=mB(e)??MB,s=uB(n,o);if(!t&&a){if(MV(a)){if(a.tolerance!=null&&wV(s,a.tolerance))return this.handleCancel();if(wV(s,a.distance))return this.handleStart()}if(NV(a)&&wV(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===OV.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},FV={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},IV=class extends PV{constructor(e){let{event:t}=e,n=Qz(t.target);super(e,FV,n)}};IV.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 LV={move:{name:`mousemove`},end:{name:`mouseup`}},RV;(function(e){e[e.RightClick=2]=`RightClick`})(RV||={});var zV=class extends PV{constructor(e){super(e,LV,Qz(e.event.target))}};zV.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===RV.RightClick?!1:(r?.({event:n}),!0)}}];var BV={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},VV=class extends PV{constructor(e){super(e,BV)}static setup(){return window.addEventListener(BV.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(BV.move.name,e)};function e(){}}};VV.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 HV;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(HV||={});var UV;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(UV||={});function WV(e){let{acceleration:t,activator:n=HV.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:s=UV.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:u,delta:d,threshold:f}=e,p=KV({delta:d,disabled:!a}),[m,h]=tB(),g=(0,I.useRef)({x:0,y:0}),_=(0,I.useRef)({x:0,y:0}),v=(0,I.useMemo)(()=>{switch(n){case HV.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case HV.DraggableRect:return i}},[n,i,c]),y=(0,I.useRef)(null),b=(0,I.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,I.useMemo)(()=>s===UV.TreeOrder?[...l].reverse():l,[s,l]);(0,I.useEffect)(()=>{if(!a||!l.length||!v){h();return}for(let e of x){if(r?.(e)===!1)continue;let n=l.indexOf(e),i=u[n];if(!i)continue;let{direction:a,speed:s}=mV(e,i,v,t,f);for(let e of[`x`,`y`])p[e][a[e]]||(s[e]=0,a[e]=0);if(s.x>0||s.y>0){h(),y.current=e,m(b,o),g.current=s,_.current=a;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 GV={x:{[uV.Backward]:!1,[uV.Forward]:!1},y:{[uV.Backward]:!1,[uV.Forward]:!1}};function KV(e){let{delta:t,disabled:n}=e,r=aB(t);return rB(e=>{if(n||!r||!e)return GV;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[uV.Backward]:e.x[uV.Backward]||i.x===-1,[uV.Forward]:e.x[uV.Forward]||i.x===1},y:{[uV.Backward]:e.y[uV.Backward]||i.y===-1,[uV.Forward]:e.y[uV.Forward]||i.y===1}}},[n,t,r])}function qV(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return rB(e=>t==null?null:r??e??null,[r,t])}function JV(e,t){return(0,I.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 YV;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(YV||={});var XV;(function(e){e.Optimized=`optimized`})(XV||={});var ZV=new Map;function QV(e,t){let{dragging:n,dependencies:r,config:i}=t,[a,o]=(0,I.useState)(null),{frequency:s,measure:c,strategy:l}=i,u=(0,I.useRef)(e),d=g(),f=nB(d),p=(0,I.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,I.useRef)(null),h=rB(t=>{if(d&&!n)return ZV;if(!t||t===ZV||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 xV(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,I.useEffect)(()=>{u.current=e},[e]),(0,I.useEffect)(()=>{d||p()},[n,d]),(0,I.useEffect)(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),(0,I.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 YV.Always:return!1;case YV.BeforeDragging:return n;default:return!n}}}function $V(e,t){return rB(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function eH(e,t){return $V(e,t)}function tH(e){let{callback:t,disabled:n}=e,r=eB(t),i=(0,I.useMemo)(()=>{if(n||typeof window>`u`||window.MutationObserver===void 0)return;let{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,I.useEffect)(()=>()=>i?.disconnect(),[i]),i}function nH(e){let{callback:t,disabled:n}=e,r=eB(t),i=(0,I.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,I.useEffect)(()=>()=>i?.disconnect(),[i]),i}function rH(e){return new xV($B(e),e)}function iH(e,t,n){t===void 0&&(t=rH);let[r,i]=(0,I.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=tH({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=nH({callback:a});return $z(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),r}function aH(e){return qB(e,$V(e))}var oH=[];function sH(e){let t=(0,I.useRef)(e),n=rB(n=>e?n&&n!==oH&&e&&t.current&&e.parentNode===t.current.parentNode?n:iV(e):oH,[e]);return(0,I.useEffect)(()=>{t.current=e},[e]),n}function cH(e){let[t,n]=(0,I.useState)(null),r=(0,I.useRef)(e),i=(0,I.useCallback)(e=>{let t=oV(e.target);t&&n(e=>e?(e.set(t,lV(t)),new Map(e)):null)},[]);return(0,I.useEffect)(()=>{let t=r.current;if(e!==t){a(t);let o=e.map(e=>{let t=oV(e);return t?(t.addEventListener(`scroll`,i,{passive:!0}),[t,lV(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=>{oV(e)?.removeEventListener(`scroll`,i)})}},[i,e]),(0,I.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>lB(e,t),MB):gV(e):MB,[e,t])}function lH(e,t){t===void 0&&(t=[]);let n=(0,I.useRef)(null);return(0,I.useEffect)(()=>{n.current=null},t),(0,I.useEffect)(()=>{let t=e!==MB;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?uB(e,n.current):MB}function uH(e){(0,I.useEffect)(()=>{if(!Gz)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 dH(e,t){return(0,I.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}function fH(e){return(0,I.useMemo)(()=>e?tV(e):null,[e])}var pH=[];function mH(e,t){t===void 0&&(t=$B);let[n]=e,r=fH(n?Jz(n):null),[i,a]=(0,I.useState)(pH);function o(){a(()=>e.length?e.map(e=>dV(e)?r:new xV(t(e),e)):pH)}let s=nH({callback:o});return $z(()=>{s?.disconnect(),o(),e.forEach(e=>s?.observe(e))},[e]),i}function hH(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return Xz(t)?t:e}function gH(e){let{measure:t}=e,[n,r]=(0,I.useState)(null),i=nH({callback:(0,I.useCallback)(e=>{for(let{target:n}of e)if(Xz(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[a,o]=iB((0,I.useCallback)(e=>{let n=hH(e);i?.disconnect(),n&&i?.observe(n),r(n?t(n):null)},[t,i]));return(0,I.useMemo)(()=>({nodeRef:a,rect:n,setRef:o}),[n,a,o])}var _H=[{sensor:IV,options:{}},{sensor:jV,options:{}}],vH={current:{}},yH={draggable:{measure:eV},droppable:{measure:eV,strategy:YV.WhileDragging,frequency:XV.Optimized},dragOverlay:{measure:$B}},bH=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}},xH={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new bH,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:kB},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:yH,measureDroppableContainers:kB,windowRect:null,measuringScheduled:!1},SH={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:kB,draggableNodes:new Map,over:null,measureDroppableContainers:kB},CH=(0,I.createContext)(SH),wH=(0,I.createContext)(xH);function TH(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new bH}}}function EH(e,t){switch(t.type){case OB.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case OB.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 OB.DragEnd:case OB.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case OB.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new bH(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case OB.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 bH(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case OB.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new bH(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function DH(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,I.useContext)(CH),a=aB(r),o=aB(n?.id);return(0,I.useEffect)(()=>{if(!t&&!r&&a&&o!=null){if(!fB(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=_B(e);if(t){t.focus();break}}})}},[r,t,i,o,a]),null}function OH(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}function kH(e){return(0,I.useMemo)(()=>({draggable:{...yH.draggable,...e?.draggable},droppable:{...yH.droppable,...e?.droppable},dragOverlay:{...yH.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function AH(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,a=(0,I.useRef)(!1),{x:o,y:s}=typeof i==`boolean`?{x:i,y:i}:i;$z(()=>{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=qB(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=aV(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,s,r,n])}var jH=(0,I.createContext)({...MB,scaleX:1,scaleY:1}),MH;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(MH||={});var NH=(0,I.memo)(function(e){let{id:t,accessibility:n,autoScroll:r=!0,children:i,sensors:a=_H,collisionDetection:o=UB,measuring:s,modifiers:c,...l}=e,[u,d]=(0,I.useReducer)(EH,void 0,TH),[f,p]=wB(),[m,h]=(0,I.useState)(MH.Uninitialized),g=m===MH.Initialized,{draggable:{active:_,nodes:v,translate:y},droppable:{containers:b}}=u,x=_==null?null:v.get(_),S=(0,I.useRef)({initial:null,translated:null}),C=(0,I.useMemo)(()=>_==null?null:{id:_,data:x?.data??vH,rect:S},[_,x]),w=(0,I.useRef)(null),[T,E]=(0,I.useState)(null),[D,O]=(0,I.useState)(null),ee=nB(l,Object.values(l)),te=sB(`DndDescribedBy`,t),k=(0,I.useMemo)(()=>b.getEnabled(),[b]),A=kH(s),{droppableRects:j,measureDroppableContainers:M,measuringScheduled:ne}=QV(k,{dragging:g,dependencies:[y.x,y.y],config:A.droppable}),re=qV(v,_),ie=(0,I.useMemo)(()=>D?mB(D):null,[D]),ae=Ae(),oe=eH(re,A.draggable.measure);AH({activeNode:_==null?null:v.get(_),config:ae.layoutShiftCompensation,initialRect:oe,measure:A.draggable.measure});let N=iH(re,A.draggable.measure,oe),se=iH(re?re.parentElement:null),ce=(0,I.useRef)({activatorEvent:null,active:null,activeNode:re,collisionRect:null,collisions:null,droppableRects:j,draggableNodes:v,draggingNode:null,draggingNodeRect:null,droppableContainers:b,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),P=b.getNodeFor(ce.current.over?.id),le=gH({measure:A.dragOverlay.measure}),ue=le.nodeRef.current??re,de=g?le.rect??N:null,F=!!(le.nodeRef.current&&le.rect),fe=aH(F?null:N),pe=fH(ue?Jz(ue):null),me=sH(g?P??re:null),he=mH(me),ge=OH(c,{transform:{x:y.x-fe.x,y:y.y-fe.y,scaleX:1,scaleY:1},activatorEvent:D,active:C,activeNodeRect:N,containerNodeRect:se,draggingNodeRect:de,over:ce.current.over,overlayNodeRect:le.rect,scrollableAncestors:me,scrollableAncestorRects:he,windowRect:pe}),_e=ie?lB(ie,y):null,ve=cH(me),ye=lH(ve),be=lH(ve,[N]),xe=lB(ge,ye),Se=de?YB(de,ge):null,Ce=C&&Se?o({active:C,collisionRect:Se,droppableRects:j,droppableContainers:k,pointerCoordinates:_e}):null,L=RB(Ce,`id`),[R,z]=(0,I.useState)(null),we=KB(F?ge:lB(ge,be),R?.rect??null,N),Te=(0,I.useRef)(null),Ee=(0,I.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,o=new n({active:w.current,activeNode:i,event:a,options:r,context:ce,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,i_.unstable_batchedUpdates)(()=>{r?.(i),h(MH.Initializing),d({type:OB.DragStart,initialCoordinates:e,active:t}),f({type:`onDragStart`,event:i}),E(Te.current),O(a)})},onMove(e){d({type:OB.DragMove,coordinates:e})},onEnd:s(OB.DragEnd),onCancel:s(OB.DragCancel)});Te.current=o;function s(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=ce.current,o=null;if(t&&i){let{cancelDrop:s}=ee.current;o={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===OB.DragEnd&&typeof s==`function`&&await Promise.resolve(s(o))&&(e=OB.DragCancel)}w.current=null,(0,i_.unstable_batchedUpdates)(()=>{d({type:e}),h(MH.Uninitialized),z(null),E(null),O(null),Te.current=null;let t=e===OB.DragEnd?`onDragEnd`:`onDragCancel`;if(o){let e=ee.current[t];e?.(o),f({type:t,event:o})}})}}},[v]),De=JV(a,(0,I.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,Ee(n,t))},[v,Ee]));uH(a),$z(()=>{N&&m===MH.Initializing&&h(MH.Initialized)},[N,m]),(0,I.useEffect)(()=>{let{onDragMove:e}=ee.current,{active:t,activatorEvent:n,collisions:r,over:i}=ce.current;if(!t||!n)return;let a={active:t,activatorEvent:n,collisions:r,delta:{x:xe.x,y:xe.y},over:i};(0,i_.unstable_batchedUpdates)(()=>{e?.(a),f({type:`onDragMove`,event:a})})},[xe.x,xe.y]),(0,I.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=ce.current;if(!e||w.current==null||!t||!i)return;let{onDragOver:a}=ee.current,o=r.get(L),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,i_.unstable_batchedUpdates)(()=>{z(s),a?.(c),f({type:`onDragOver`,event:c})})},[L]),$z(()=>{ce.current={activatorEvent:D,active:C,activeNode:re,collisionRect:Se,collisions:Ce,droppableRects:j,draggableNodes:v,draggingNode:ue,draggingNodeRect:de,droppableContainers:b,over:R,scrollableAncestors:me,scrollAdjustedTranslate:xe},S.current={initial:de,translated:Se}},[C,re,Ce,Se,v,ue,de,j,b,R,me,xe]),WV({...ae,delta:y,draggingRect:Se,pointerCoordinates:_e,scrollableAncestors:me,scrollableAncestorRects:he});let Oe=(0,I.useMemo)(()=>({active:C,activeNode:re,activeNodeRect:N,activatorEvent:D,collisions:Ce,containerNodeRect:se,dragOverlay:le,draggableNodes:v,droppableContainers:b,droppableRects:j,over:R,measureDroppableContainers:M,scrollableAncestors:me,scrollableAncestorRects:he,measuringConfiguration:A,measuringScheduled:ne,windowRect:pe}),[C,re,N,D,Ce,se,le,v,b,j,R,M,me,he,A,ne,pe]),ke=(0,I.useMemo)(()=>({activatorEvent:D,activators:De,active:C,activeNodeRect:N,ariaDescribedById:{draggable:te},dispatch:d,draggableNodes:v,over:R,measureDroppableContainers:M}),[D,De,C,N,d,te,v,R,M]);return I.createElement(SB.Provider,{value:p},I.createElement(CH.Provider,{value:ke},I.createElement(wH.Provider,{value:Oe},I.createElement(jH.Provider,{value:we},i)),I.createElement(DH,{disabled:n?.restoreFocus===!1})),I.createElement(DB,{...n,hiddenTextDescribedById:te}));function Ae(){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}}}),PH=(0,I.createContext)(null),FH=`button`,IH=`Draggable`;function LH(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=sB(IH),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,I.useContext)(CH),{role:p=FH,roleDescription:m=`draggable`,tabIndex:h=0}=i??{},g=c?.id===t,_=(0,I.useContext)(g?jH:PH),[v,y]=iB(),[b,x]=iB(),S=dH(o,t),C=nB(n);return $z(()=>(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,I.useMemo)(()=>({role:p,tabIndex:h,"aria-disabled":r,"aria-pressed":g&&p===FH?!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 RH(){return(0,I.useContext)(wH)}var zH=`Droppable`,BH={timeout:25};function VH(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=sB(zH),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,I.useContext)(CH),u=(0,I.useRef)({disabled:n}),d=(0,I.useRef)(!1),f=(0,I.useRef)(null),p=(0,I.useRef)(null),{disabled:m,updateMeasurementsFor:h,timeout:g}={...BH,...i},_=nB(h??r),v=nH({callback:(0,I.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]=iB((0,I.useCallback)((e,t)=>{v&&(t&&(v.unobserve(t),d.current=!1),e&&v.observe(e))},[v])),x=nB(t);return(0,I.useEffect)(()=>{!v||!y.current||(v.disconnect(),d.current=!1,v.observe(y.current))},[y,v]),(0,I.useEffect)(()=>(s({type:OB.RegisterDroppable,element:{id:r,key:a,disabled:n,node:y,rect:f,data:x}}),()=>s({type:OB.UnregisterDroppable,key:a,id:r})),[r]),(0,I.useEffect)(()=>{n!==u.current.disabled&&(s({type:OB.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 HH(e){let{animation:t,children:n}=e,[r,i]=(0,I.useState)(null),[a,o]=(0,I.useState)(null),s=aB(n);return!n&&!r&&s&&i(s),$z(()=>{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]),I.createElement(I.Fragment,null,n,r?(0,I.cloneElement)(r,{ref:o}):null)}var UH={x:0,y:0,scaleX:1,scaleY:1};function WH(e){let{children:t}=e;return I.createElement(CH.Provider,{value:SH},I.createElement(jH.Provider,{value:UH},t))}var GH={position:`fixed`,touchAction:`none`},KH=e=>fB(e)?`transform 250ms ease`:void 0,qH=(0,I.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={...GH,width:s.width,height:s.height,top:s.top,left:s.left,transform:hB.Transform.toString(d),transformOrigin:i&&r?PB(r,s):void 0,transition:typeof u==`function`?u(r):u,...c};return I.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:hB.Transform.toString(t)},{transform:hB.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 YH(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return eB((e,a)=>{if(t===null)return;let o=n.get(e);if(!o)return;let s=o.node.current;if(!s)return;let c=hH(a);if(!c)return;let{transform:l}=Jz(a).getComputedStyle(a),u=XB(l);if(!u)return;let d=typeof t==`function`?t:XH(t);return yV(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 XH(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 ZH=0;function QH(e){return(0,I.useMemo)(()=>{if(e!=null)return ZH++,ZH},[e])}var $H=I.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}=RH(),S=(0,I.useContext)(jH),C=QH(d?.id),w=OH(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=$V(f),E=YH({config:r,draggableNodes:m,droppableContainers:h,measuringConfiguration:v}),D=T?g.setRef:void 0;return I.createElement(WH,null,I.createElement(HH,{animation:E},d&&C?I.createElement(qH,{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 eU(e,t,n){let r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function tU(e,t){return e.reduce((e,n,r)=>{let i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function nU(e){return e!==null&&e>=0}function rU(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 iU(e){return typeof e==`boolean`?{draggable:e,droppable:e}:e}var aU={scaleX:1,scaleY:1},oU=e=>{let{rects:t,activeNodeRect:n,activeIndex:r,overIndex:i,index:a}=e,o=t[r]??n;if(!o)return null;let s=sU(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,...aU}:null}return a>r&&a<=i?{x:-o.width-s,y:0,...aU}:a<r&&a>=i?{x:o.width+s,y:0,...aU}:{x:0,y:0,...aU}};function sU(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 cU=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e,a=eU(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}},lU={scaleX:1,scaleY:1},uU=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,...lU}:null}let s=dU(i,r,t);return r>t&&r<=a?{x:0,y:-o.height-s,...lU}:r<t&&r>=a?{x:0,y:o.height+s,...lU}:{x:0,y:0,...lU}};function dU(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 fU=`Sortable`,pU=I.createContext({activeIndex:-1,containerId:fU,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:cU,disabled:{draggable:!1,droppable:!1}});function mU(e){let{children:t,id:n,items:r,strategy:i=cU,disabled:a=!1}=e,{active:o,dragOverlay:s,droppableRects:c,over:l,measureDroppableContainers:u}=RH(),d=sB(fU,n),f=s.rect!==null,p=(0,I.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,I.useRef)(p),v=!rU(p,_.current),y=g!==-1&&h===-1||v,b=iU(a);$z(()=>{v&&m&&u(p)},[v,p,m,u]),(0,I.useEffect)(()=>{_.current=p},[p]);let x=(0,I.useMemo)(()=>({activeIndex:h,containerId:d,disabled:b,disableTransforms:y,items:p,overIndex:g,useDragOverlay:f,sortedRects:tU(p,c),strategy:i}),[h,d,b.draggable,b.droppable,y,p,g,c,f,i]);return I.createElement(pU.Provider,{value:x},t)}var hU=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return eU(n,r,i).indexOf(t)},gU=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},_U={duration:200,easing:`ease`},vU=`transform`,yU=hB.Transition.toString({property:vU,duration:0,easing:`linear`}),bU={roleDescription:`sortable`};function xU(e){let{disabled:t,index:n,node:r,rect:i}=e,[a,o]=(0,I.useState)(null),s=(0,I.useRef)(n);return $z(()=>{if(!t&&n!==s.current&&r.current){let e=i.current;if(e){let t=$B(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,I.useEffect)(()=>{a&&o(null)},[a]),a}function SU(e){let{animateLayoutChanges:t=gU,attributes:n,disabled:r,data:i,getNewIndex:a=hU,id:o,strategy:s,resizeObserverConfig:c,transition:l=_U}=e,{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:m,sortedRects:h,overIndex:g,useDragOverlay:_,strategy:v}=(0,I.useContext)(pU),y=CU(r,p),b=u.indexOf(o),x=(0,I.useMemo)(()=>({sortable:{containerId:d,index:b,items:u},...i}),[d,i,b,u]),S=(0,I.useMemo)(()=>u.slice(u.indexOf(o)),[u,o]),{rect:C,node:w,isOver:T,setNodeRef:E}=VH({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:M,setActivatorNodeRef:ne,transform:re}=LH({id:o,data:x,attributes:{...bU,...n},disabled:y.draggable}),ie=Wz(E,k),ae=!!D,oe=ae&&!m&&nU(f)&&nU(g),N=!_&&j,se=oe?(N&&oe?re:null)??(s??v)({rects:h,activeNodeRect:ee,activeIndex:f,overIndex:g,index:b}):null,ce=nU(f)&&nU(g)?a({id:o,items:u,activeIndex:f,overIndex:g}):b,P=D?.id,le=(0,I.useRef)({activeId:P,items:u,newIndex:ce,containerId:d}),ue=u!==le.current.items,de=t({active:D,containerId:d,isDragging:j,isSorting:ae,id:o,index:b,items:u,newIndex:le.current.newIndex,previousItems:le.current.items,previousContainerId:le.current.containerId,transition:l,wasDragging:le.current.activeId!=null}),F=xU({disabled:!de,index:b,node:w,rect:C});return(0,I.useEffect)(()=>{ae&&le.current.newIndex!==ce&&(le.current.newIndex=ce),d!==le.current.containerId&&(le.current.containerId=d),u!==le.current.items&&(le.current.items=u)},[ae,ce,d,u]),(0,I.useEffect)(()=>{if(P===le.current.activeId)return;if(P!=null&&le.current.activeId==null){le.current.activeId=P;return}let e=setTimeout(()=>{le.current.activeId=P},50);return()=>clearTimeout(e)},[P]),{active:D,activeIndex:f,attributes:te,data:x,rect:C,index:b,newIndex:ce,items:u,isOver:T,isSorting:ae,isDragging:j,listeners:A,node:w,overIndex:g,over:M,setNodeRef:ie,setActivatorNodeRef:ne,setDroppableNodeRef:E,setDraggableNodeRef:k,transform:F??se,transition:fe()};function fe(){if(F||ue&&le.current.newIndex===b)return yU;if(!(N&&!fB(O)||!l)&&(ae||de))return hB.Transition.toString({...l,property:vU})}}function CU(e,t){return typeof e==`boolean`?{draggable:e,droppable:!1}:{draggable:e?.draggable??t.draggable,droppable:e?.droppable??t.droppable}}function wU(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 TU=[OV.Down,OV.Right,OV.Up,OV.Left],EU=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:a,over:o,scrollableAncestors:s}}=t;if(TU.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 OV.Down:r.top<a.top&&t.push(n);break;case OV.Up:r.top>a.top&&t.push(n);break;case OV.Left:r.left>a.left&&t.push(n);break;case OV.Right:r.left<a.left&&t.push(n);break}});let c=VB({active:n,collisionRect:r,droppableRects:i,droppableContainers:t,pointerCoordinates:null}),l=RB(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=iV(c).some((e,t)=>s[t]!==e),i=DU(e,t),a=OU(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:uB(u,l)}}}};function DU(e,t){return!wU(e)||!wU(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function OU(e,t){return!wU(e)||!wU(t)||!DU(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}var kU=(0,I.createContext)(null),AU={didCatch:!1,error:null},jU=class extends I.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=AU}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(AU))}componentDidCatch(e,t){this.props.onError?.(e,t)}componentDidUpdate(e,t){let{didCatch:n}=this.state,{resetKeys:r}=this.props;n&&t.error!==null&&MU(e.resetKeys,r)&&(this.props.onReset?.({next:r,prev:e.resetKeys,reason:`keys`}),this.setState(AU))}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,I.createElement)(n,e);else if(r!==void 0)o=r;else throw a}return(0,I.createElement)(kU.Provider,{value:{didCatch:i,error:a,resetErrorBoundary:this.resetErrorBoundary}},o)}};function MU(e=[],t=[]){return e.length!==t.length||e.some((e,n)=>!Object.is(e,t[n]))}function NU(e){return typeof e==`string`?e:typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`?e.toString():JSON.stringify(e)??``}function PU(){return(0,H.jsxs)(`div`,{style:{textAlign:`center`,marginTop:`4em`},children:[(0,H.jsx)(zm,{}),(0,H.jsx)(`p`,{children:`Loading`})]})}function FU({error:e}){return e===void 0?(0,H.jsx)(H.Fragment,{}):zt.isApiException(e)?(0,H.jsx)(Av,{children:(0,H.jsxs)(Pv,{children:[(0,H.jsx)(`h3`,{children:`FMS Insight Server Error`}),(0,H.jsx)(`p`,{children:e.response})]})}):e instanceof Error?(0,H.jsx)(Av,{children:(0,H.jsx)(Pv,{children:e.message})}):(0,H.jsx)(Av,{children:(0,H.jsxs)(Pv,{children:[(0,H.jsx)(`h3`,{children:`Unknown Error`}),(0,H.jsx)(`p`,{children:NU(e)})]})})}function IU(e){return(0,H.jsx)(jU,{FallbackComponent:FU,children:(0,H.jsx)(I.Suspense,{fallback:e.fallback??(0,H.jsx)(PU,{}),children:e.children})})}var LU=class extends I.PureComponent{render(){let e=this.props.size||50,t=Mz(this.props.part,e);return(0,H.jsx)(`div`,{style:{width:e,height:e},dangerouslySetInnerHTML:{__html:t}})}},RU=2,zU=Pa`
|
|
274
|
+
from, to { transform: translate(0, 0) }
|
|
275
|
+
10% { transform: translate(${RU}px, 0) }
|
|
276
|
+
20% { transform: translate(0, 0) }
|
|
277
|
+
30% { transform: translate(${RU}px, 0) }
|
|
278
|
+
40% { transform: translate(0, 0) }
|
|
279
|
+
50% { transform: translate(${RU}px, 0) }
|
|
280
|
+
60% { transform: translate(0, 0) }
|
|
281
|
+
`,BU=`${zU} 1s ease-in-out infinite`;function VU(e){return`animationName`in e}function HU(e){let t=e.currentTarget.getAnimations().find(e=>VU(e)&&e.animationName===zU.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 UU=G(`div`,{shouldForwardProp:e=>e!==`fsize`})(({fsize:e,theme:t})=>{if(!e)return{fontSize:`1.25rem`,fontWeight:`500`};switch(e){case`normal`:return{fontSize:`1rem`,fontWeight:`500`,[t.breakpoints.up(`md`)]:{fontSize:`1.25rem`},[t.breakpoints.up(`lg`)]:{fontSize:`1.5rem`}};case`large`:return{fontSize:`1.5rem`,fontWeight:`500`,[t.breakpoints.up(`lg`)]:{fontSize:`1.75rem`},[t.breakpoints.up(`xl`)]:{fontSize:`2rem`}};case`x-large`:return{fontSize:`1.5rem`,fontWeight:`500`,[t.breakpoints.up(`md`)]:{fontSize:`1.75rem`},[t.breakpoints.up(`lg`)]:{fontSize:`2.75rem`},[t.breakpoints.up(`xl`)]:{fontSize:`3.75rem`}}}}),WU=G(`div`,{shouldForwardProp:e=>e!==`fsize`})(({fsize:e,theme:t})=>{if(!e)return{fontSize:`0.75rem`,fontWeight:`500`};switch(e){case`normal`:return{fontSize:`0.75rem`,fontWeight:`500`,[t.breakpoints.up(`md`)]:{fontSize:`1rem`}};case`large`:return{fontSize:`1rem`,fontWeight:`500`,[t.breakpoints.up(`lg`)]:{fontSize:`1.5rem`},[t.breakpoints.up(`xl`)]:{fontSize:`1.75rem`}};case`x-large`:return{fontSize:`1rem`,fontWeight:`500`,[t.breakpoints.up(`md`)]:{fontSize:`1.5rem`},[t.breakpoints.up(`lg`)]:{fontSize:`2.5rem`},[t.breakpoints.up(`xl`)]:{fontSize:`3.5rem`}}}});function GU({mat:e,displayActionForSinglePallet:t,fsize:n}){let r=L(GO),i=Dk(L(yr).basketName);switch(e.action.type){case V.Loading:if(e.action.loadFromBasketId){if(e.action.loadOntoPalletNum===null||e.action.loadOntoPalletNum===void 0)return(0,H.jsxs)(WU,{fsize:n,children:[`Load into `,i,` `,e.action.loadFromBasketId]});if(t===void 0)return(0,H.jsxs)(WU,{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,H.jsxs)(WU,{fsize:n,children:[`Load from `,i,` `,e.action.loadFromBasketId,` to`,` `,a??`face ${t}`]})}else return null}switch(e.location.type){case ot.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,H.jsxs)(WU,{fsize:n,children:[`Reclamp material to process # `,e.action.processAfterLoad]}):null;{let t=e.action.loadOntoFace??0,i=e.location.palletNum?r.pallets[e.location.palletNum]?.faceNames?.[t-1]:null;return(0,H.jsxs)(WU,{fsize:n,children:[`Transfer to `,i??`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,H.jsxs)(WU,{fsize:n,children:[`Load to `,a??`face ${i}`,` of pal `,e.action.loadOntoPalletNum??``]}):t===e.action.loadOntoPalletNum?(0,H.jsxs)(WU,{fsize:n,children:[`Load to `,a??`face ${i}`]}):null}}case V.LoadingToBasket:return(0,H.jsxs)(WU,{fsize:n,children:[`Load into `,i,` `,e.action.loadToBasketId??``,e.action.loadToBasketSlot===void 0?``:` slot ${e.action.loadToBasketSlot}`]});case V.UnloadToInProcess:case V.UnloadToCompletedMaterial:return e.action.unloadToBasketId?(0,H.jsxs)(WU,{fsize:n,children:[`Unload to `,i,` `,e.action.unloadToBasketId,e.action.unloadToBasketSlot===void 0?``:` slot ${e.action.unloadToBasketSlot}`]}):e.action.unloadIntoQueue?(0,H.jsxs)(WU,{fsize:n,children:[`Unload into queue `,e.action.unloadIntoQueue]}):e.action.type===V.UnloadToCompletedMaterial&&e.location.type===ot.InBasket?(0,H.jsxs)(WU,{fsize:n,children:[`Unload from `,i,` `,e.location.basketId,` to completed material`]}):e.location.type===ot.InBasket?(0,H.jsxs)(WU,{fsize:n,children:[`Unload from `,i,` `,e.location.basketId]}):(0,H.jsx)(WU,{fsize:n,children:`Unload from pallet`});case V.Waiting:if(e.location.type===ot.InQueue&&e.jobUnique&&e.jobUnique!==``)return(0,H.jsxs)(WU,{fsize:n,children:[`Waiting; next process is #`,e.process+1]});if(e.location.type===ot.InBasket)return(0,H.jsxs)(WU,{fsize:n,children:[`In `,i,` `,e.location.basketId]});if(e.location.type===ot.OnPallet&&(e.lastCompletedMachiningRouteStopIndex===null||e.lastCompletedMachiningRouteStopIndex===void 0))return(0,H.jsx)(WU,{fsize:n,children:`Waiting for machining`});break;case V.Machining:return(0,H.jsxs)(WU,{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,H.jsx)(X,{title:t,children:(0,H.jsx)(JT,{})})}function qU({fsize:e,mat:t}){let n=L(GO).jobs[t.jobUnique],r=t.path;if((t.action.type===V.Loading||t.action.type===V.LoadingToBasket)&&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,H.jsx)(WU,{fsize:e,children:i.casting}):null}function JU({fsize:e,uniq:t}){let n=L(GO).jobs[t],r=L(bR);if(n&&n.bookings&&n.bookings.length>0){let t=r.get(n.bookings[0]);if(t&&t.notes&&t.notes!==``)return(0,H.jsx)(WU,{fsize:e,style:{textOverflow:`ellipsis`,overflow:`hidden`,whiteSpace:`nowrap`,maxWidth:`10em`},children:t.notes})}return null}function YU(){let e=L(GO),t=L(OI);if(!t)return null;let n=e.workorders?.find(e=>e.workorderId===t)?.comments??[];return(0,H.jsxs)(`div`,{style:{marginTop:`1em`,marginLeft:`1em`},children:[(0,H.jsxs)(`p`,{children:[`Workorder: `,t]}),(0,H.jsx)(`ul`,{children:n.map((e,t)=>(0,H.jsx)(`li`,{children:e.comment},t))})]})}var XU=(0,I.forwardRef)(function(e,t){let n=R(bI),r=e.mat.completedInspections||{},i;return e.focusInspectionType&&r[e.focusInspectionType]?i=(0,H.jsxs)(WU,{fsize:e.fsize,children:[(0,H.jsx)(`span`,{children:`Inspection completed `}),(0,H.jsx)(Uz,{date:r[e.focusInspectionType].time})]}):e.focusInspectionType&&e.mat.last_unload_time?i=(0,H.jsxs)(WU,{fsize:e.fsize,children:[(0,H.jsx)(`span`,{children:`Unloaded `}),(0,H.jsx)(Uz,{date:e.mat.last_unload_time})]}):e.mat.closeout_completed&&(i=(0,H.jsxs)(WU,{fsize:e.fsize,children:[(0,H.jsxs)(`span`,{children:[e.mat.closeout_failed?`Failed `:``,`Closed Out `]}),(0,H.jsx)(Uz,{date:e.mat.closeout_completed})]})),(0,H.jsxs)(Hp,{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?BU:void 0,"&:hover":{animationPlayState:`paused`}},onAnimationIteration:HU,...e.dragRootProps,children:[e.showDragHandle?(0,H.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,H.jsx)(yT,{fontSize:`large`,color:`action`})}):void 0,(0,H.jsx)(gm,{focusRipple:!0,sx:{width:`100%`},onClick:()=>n(e.inProcMat?{type:`InProcMat`,inproc:e.inProcMat}:{type:`MatSummary`,summary:e.mat}),children:(0,H.jsxs)(J,{sx:{display:`flex`,textAlign:`left`,alignItems:`center`,width:`100%`},children:[(0,H.jsx)(LU,{part:e.mat.partName}),(0,H.jsxs)(J,{sx:{marginLeft:`8px`,flexGrow:1},children:[(0,H.jsx)(UU,{fsize:e.fsize,children:e.mat.partName}),e.displayJob?(0,H.jsx)(WU,{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,H.jsxs)(WU,{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,H.jsxs)(WU,{fsize:e.fsize,children:[`Workorder: `,e.mat.workorderId]}),e.mat.jobUnique!==void 0&&e.showRawMaterial&&e.inProcMat&&e.inProcMat.process===0?(0,H.jsx)(qU,{fsize:e.fsize,mat:e.inProcMat}):void 0,e.showJobComment&&e.mat.jobUnique&&e.mat.jobUnique!==``?(0,H.jsx)(JU,{fsize:e.fsize,uniq:e.mat.jobUnique}):void 0,e.inProcMat?(0,H.jsx)(GU,{mat:e.inProcMat,displayActionForSinglePallet:e.displayActionForSinglePallet,fsize:e.fsize}):void 0,e.inProcMat?.problem?(0,H.jsx)(WU,{fsize:e.fsize,children:(0,H.jsxs)(q,{variant:`body2`,color:`error`,sx:{fontWeight:`bold`},children:[`⚠ `,e.inProcMat.problem]})}):void 0,i]}),(0,H.jsxs)(J,{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,H.jsx)(`div`,{children:(0,H.jsx)(Z_,{style:{width:`30px`,height:`30px`},children:e.mat.serial.slice(-1)})}):void 0,e.hideWarningIcon?void 0:(0,H.jsx)(`div`,{children:(0,H.jsx)(KU,{mat:e.mat})})]})]})})]})}),ZU=(0,I.memo)(XU),QU=(0,I.memo)(function(e){return(0,H.jsx)(XU,{mat:fL(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})}),$U=(0,I.memo)(function(e){let t={mat:e.mat},{active:n,isDragging:r,attributes:i,listeners:a,setNodeRef:o,setActivatorNodeRef:s,transform:c,transition:l}=SU({id:e.mat.materialID,data:t}),u={...a};for(let[e,t]of Object.entries(i))e.startsWith(`aria`)&&(u[e]=t);let d={transform:c?`translate3d(${Math.round(c.x)}px, ${Math.round(c.y)}px, 0)`:void 0,transition:n===null?void 0:l};return(0,H.jsx)(XU,{ref:o,dragRootProps:{style:d},showDragHandle:!0,dragHandleProps:u,setDragHandleRef:s,isActiveDrag:r,mat:fL(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 eW(e){return(0,H.jsx)(XU,{mat:fL(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 tW=(0,I.memo)(function(e){return(0,H.jsx)(Hp,{elevation:4,sx:{display:`flex`,minWidth:`10em`,padding:`8px`,margin:`8px`},children:(0,H.jsx)(mv,{badgeContent:e.material.length<2?0:e.material.length,color:`secondary`,children:(0,H.jsx)(gm,{focusRipple:!0,onClick:()=>e.onOpen(),children:(0,H.jsxs)(J,{sx:{display:`flex`,textAlign:`left`},children:[(0,H.jsx)(LU,{part:e.partOrCasting}),(0,H.jsxs)(J,{sx:{marginLeft:`8px`,flexGrow:1},children:[(0,H.jsx)(q,{variant:`h6`,children:e.partOrCasting}),(0,H.jsx)(WU,{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,H.jsx)(`div`,{children:(0,H.jsx)(Z_,{style:{width:`30px`,height:`30px`},children:e.material[0].serial.slice(-1)})}):void 0]})})})})}),nW=(0,I.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,H.jsxs)(J,{sx:{display:`flex`,textAlign:`left`},children:[e===``?(0,H.jsx)(UT,{}):(0,H.jsx)(LU,{part:e}),(0,H.jsxs)(J,{sx:{marginLeft:`8px`,flexGrow:1},children:[(0,H.jsx)(q,{variant:`h6`,children:i}),n?(0,H.jsx)(q,{variant:`caption`,children:n}):void 0]})]})});function rW({notes:e}){let t=L(bI),n=L(xie),r=L(Sie),i=``,a=null;switch(t?.type){case`InProcMat`:i=t.inproc.partName,a=t.inproc.serial;break;case`MatSummary`:i=t.summary.partName,a=t.summary.serial;break;case`MatDetails`:i=t.details.partName,a=t.details.serial;break;case`LogMat`:i=t.logMat.part,a=t.logMat.serial;break;case`Barcode`:a=t.barcode;break;case`ManuallyEnteredSerial`:case`AddMatWithEnteredSerial`:a=t.serial;break}return n.state===`hasData`&&n.data!==null&&(i=n.data.partName,a=n.data.serial??a),r.state===`hasData`&&r.data&&(a=r.data),(0,H.jsx)(nW,{notes:e,partName:i,serial:a})}function iW(){let e=L(MI);function t(t){return e.completedInspections.includes(t)?`black`:`red`}return e.signaledInspections.length===0?(0,H.jsx)(`small`,{children:`Inspections: none`}):(0,H.jsxs)(`small`,{children:[`Inspections:`,` `,e.signaledInspections.map((e,n)=>(0,H.jsxs)(`span`,{children:[n===0?``:`, `,(0,H.jsx)(`span`,{style:{color:t(e)},children:e})]},n))]})}function aW({highlightProcsGreaterOrEqualTo:e}){return(0,H.jsx)(vI,{entries:L(AI),copyToClipboard:!0,highlightProcsGreaterOrEqualTo:e})}function oW(){let e=L(EI),t=L(GO).jobs,n=L(bR),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,H.jsx)(q,{variant:`caption`,sx:{width:`100%`,textWrap:`wrap`},children:e.notes})}return null}var sW=(0,I.memo)(function({highlightProcsGreaterOrEqualTo:e}){let t=L(bI),n=L(CI),r=L(SI);return t===null?null:n===null?t.type===`AddMatWithEnteredSerial`||t.type===`ManuallyEnteredSerial`?(0,H.jsxs)(`div`,{style:{marginLeft:`1em`},children:[`Material with serial `,t.serial,` not found.`]}):t.type===`Barcode`?r?(0,H.jsxs)(`div`,{style:{marginLeft:`1em`},children:[`Material with barcode `,t.barcode,` does not yet exist in the cell.`]}):(0,H.jsxs)(`div`,{style:{marginLeft:`1em`},children:[`Material with barcode `,t.barcode,` not found.`]}):(0,H.jsx)(`div`,{style:{marginLeft:`1em`},children:`Material not found.`}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{style:{marginLeft:`1em`},children:[(0,H.jsx)(`div`,{children:(0,H.jsxs)(`small`,{children:[`Workorder: `,n?.workorderId??`none`]})}),(0,H.jsx)(`div`,{children:(0,H.jsx)(IU,{fallback:(0,H.jsxs)(`small`,{children:[`Inspections: `,(0,H.jsx)(zm,{size:`10`})]}),children:(0,H.jsx)(iW,{})})}),(0,H.jsx)(`div`,{children:(0,H.jsx)(IU,{fallback:(0,H.jsx)(`div`,{}),children:(0,H.jsx)(oW,{})})})]}),(0,H.jsx)(IU,{fallback:(0,H.jsx)(zm,{}),children:(0,H.jsx)(aW,{highlightProcsGreaterOrEqualTo:e})})]})});function cW(e){let[t,n]=(0,I.useState)(``),r=L(UO),[i]=Die(),a=L(CI);return a===null?null:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(jy,{children:(0,H.jsx)(Hw,{sx:{mt:`5px`},multiline:!0,label:`Note`,autoFocus:!0,variant:`outlined`,value:t,onChange:e=>n(e.target.value)})}),(0,H.jsxs)(Ay,{children:[(0,H.jsx)(Y,{onClick:()=>{i({matId:a.materialID,process:0,operator:r,notes:t}),e.setNotesOpen(!1),n(``)},disabled:t===``,color:`secondary`,children:`Save`}),(0,H.jsx)(Y,{onClick:()=>{e.setNotesOpen(!1),n(``)},color:`secondary`,children:`Cancel`})]})]})}function lW(){let e=L(bI);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,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`},children:[(0,H.jsx)(zm,{}),(0,H.jsx)(`div`,{style:{marginTop:`1em`},children:t})]})}function uW({setNotesOpen:e}){let t=L(CI);return t===null||t.materialID<0?null:(0,H.jsx)(Y,{onClick:()=>e(!0),color:`primary`,children:`Add Note`})}var dW=(0,I.memo)(function(e){let[t,n]=(0,I.useState)(!1),[r,i]=z(bI);function a(){i(null),e.onClose&&e.onClose()}let o,s;return r&&(o=(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(My,{children:(0,H.jsx)(rW,{})}),(0,H.jsx)(jy,{children:(0,H.jsxs)(IU,{fallback:(0,H.jsx)(lW,{}),children:[(0,H.jsx)(sW,{highlightProcsGreaterOrEqualTo:e.highlightProcsGreaterOrEqualTo}),(0,H.jsx)(IU,{fallback:(0,H.jsx)(zm,{}),children:e.extraDialogElements})]})}),(0,H.jsxs)(Ay,{children:[r&&(e.buttons||e.allowNote)?(0,H.jsx)(jU,{fallback:(0,H.jsx)(`div`,{}),children:(0,H.jsxs)(I.Suspense,{fallback:(0,H.jsx)(`div`,{}),children:[r&&e.allowNote?(0,H.jsx)(uW,{setNotesOpen:n}):void 0,e.buttons]})}):null,(0,H.jsx)(Y,{onClick:a,color:`secondary`,children:`Close`})]})]}),e.allowNote&&(s=(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(My,{children:(0,H.jsx)(rW,{notes:!0})}),(0,H.jsxs)(IU,{fallback:(0,H.jsx)(jy,{children:(0,H.jsx)(zm,{})}),children:[(0,H.jsx)(cW,{setNotesOpen:n}),`;`]})]}))),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(ky,{open:r!==null,onClose:a,maxWidth:`lg`,children:o}),e.allowNote?(0,H.jsx)(ky,{open:t,onClose:()=>n(!1),maxWidth:`md`,children:s}):void 0]})}),fW=PO(`MachineCostPerYear`,{}),pW=PO(`AutomationCostPerYear`,null),mW=PO(`Last30LaborCost`,null),hW=_O(e=>PO(`PerMonthLabor-`+e.getFullYear().toString()+`-`+e.getMonth().toString(),null)),gW=P(e=>e(e(UR).type===`Last30`?yO:CO).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)),_W=P(e=>{let t=e(UR),n=e(t.type===`Last30`?Mk:Fk),r=e(t.type===`Last30`?lL:dL),i=e(gW),a=tE(bE(),-30),o=t.type===`Last30`?null:t.month;return ez(n.valuesToLazySeq(),i,r.matsById,o?{month:o}:{thirtyDaysAgo:a})}),vW=P(e=>{let t=e(UR),n=e(fW),r=e(pW),i=e(t.type===`Last30`?mW:hW(t.month));return tz(e(_W),n,r,i??0)});function yW(){let[e,t]=(0,I.useState)(null),[n,r]=z(pW);return(0,H.jsx)(Hw,{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 bW(){let e=L(UR),t=e.type===`Last30`?null:e.month,[n,r]=(0,I.useState)(null),[i,a]=z(t===null?mW:hW(t));return(0,H.jsx)(Hw,{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 xW(e){let[t,n]=(0,I.useState)(null),[r,i]=z(fW);return(0,H.jsx)(Hw,{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 SW(){let e=L(vW);return(0,H.jsx)(H.Fragment,{children:e.machineQuantities.keysToAscLazySeq().map((t,n)=>(0,H.jsx)(xW,{machineQuantities:e.machineQuantities,machineGroup:t},n))})}var CW=Intl.NumberFormat(void 0,{minimumFractionDigits:1,maximumFractionDigits:1}),wW=new Intl.NumberFormat(void 0,{style:`percent`,minimumFractionDigits:1,maximumFractionDigits:1});function TW(){GI(`Cost Percentages`);let e=L(_W);return(0,H.jsxs)(J,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,H.jsxs)(J,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,H.jsx)(q,{variant:`subtitle1`,children:`Part Cost Percentage Breakdown`}),(0,H.jsx)(J,{sx:{flexGrow:1}}),(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(Gm,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>az(e),size:`large`,children:(0,H.jsx)(jT,{})})})]}),(0,H.jsx)(`main`,{children:(0,H.jsxs)(AC,{stickyHeader:!0,children:[(0,H.jsx)($C,{children:(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{children:`Part`}),(0,H.jsx)(Z,{align:`right`,children:`Completed Quantity`}),e.machineQuantities.keysToAscLazySeq().map(e=>(0,H.jsxs)(Z,{align:`right`,children:[e,` Cost %`]},e)),(0,H.jsx)(Z,{align:`right`,children:`Labor Cost %`}),(0,H.jsx)(Z,{align:`right`,children:`Automation Cost %`})]})}),(0,H.jsx)(LC,{children:Q.of(e.parts).sortBy(e=>e.part).map((t,n)=>(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{children:(0,H.jsxs)(J,{sx:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(J,{sx:{mr:`0.2em`},children:(0,H.jsx)(LU,{part:t.part,size:25})}),(0,H.jsx)(`div`,{children:(0,H.jsx)(q,{variant:`body2`,component:`span`,sx:{display:`block`},children:t.part})})]})}),(0,H.jsx)(Z,{align:`right`,children:t.parts_completed}),e.machineQuantities.keysToAscLazySeq().map(e=>(0,H.jsx)(Z,{align:`right`,children:wW.format(t.machine.get(e)??0)},e)),(0,H.jsx)(Z,{align:`right`,children:wW.format(t.labor)}),(0,H.jsx)(Z,{align:`right`,children:wW.format(t.automation)})]},n))})]})})]})}function EW(){let e=L(vW);return(0,H.jsxs)(AC,{stickyHeader:!0,children:[(0,H.jsx)($C,{children:(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{children:`Part`}),(0,H.jsx)(Z,{align:`right`,children:`Completed Quantity`}),e.machineQuantities.keysToAscLazySeq().map(e=>(0,H.jsxs)(Z,{align:`right`,children:[e,` Cost`]},e)),(0,H.jsx)(Z,{align:`right`,children:`Labor Cost`}),(0,H.jsx)(Z,{align:`right`,children:`Automation Cost`}),(0,H.jsxs)(Z,{align:`right`,children:[(0,H.jsx)(`span`,{children:`Total`}),(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(Gm,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>rz(e),size:`large`,children:(0,H.jsx)(jT,{})})})]})]})}),(0,H.jsx)(LC,{children:Q.of(e.parts).sortBy(e=>e.part).map((t,n)=>(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{children:(0,H.jsxs)(J,{sx:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(J,{sx:{mr:`0.2em`},children:(0,H.jsx)(LU,{part:t.part,size:25})}),(0,H.jsx)(`div`,{children:(0,H.jsx)(q,{variant:`body2`,component:`span`,sx:{display:`block`},children:t.part})})]})}),(0,H.jsx)(Z,{align:`right`,children:t.parts_completed}),e.machineQuantities.keysToAscLazySeq().map(e=>(0,H.jsx)(Z,{align:`right`,children:CW.format(t.machine.get(e)??0)},e)),(0,H.jsx)(Z,{align:`right`,children:CW.format(t.labor)}),(0,H.jsx)(Z,{align:`right`,children:CW.format(t.automation)}),(0,H.jsx)(Z,{align:`right`,children:CW.format(t.machine.valuesToAscLazySeq().sumBy(e=>e)+t.labor+t.automation)})]},n))})]})}var DW=(0,I.memo)(function(){return GI(`Cost Per Piece`),(0,H.jsx)(J,{component:`main`,sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`20px`},children:(0,H.jsxs)(MS,{direction:`column`,spacing:4,children:[(0,H.jsxs)(MS,{direction:`column`,spacing:2,children:[(0,H.jsx)(bW,{}),(0,H.jsx)(yW,{}),(0,H.jsx)(SW,{})]}),(0,H.jsx)(EW,{})]})})}),OW=[{type:`Subheader`,caption:`Shop Floor`},{type:`Link`,route:{route:$.Station_LoadMonitor,loadNum:1,queues:[],completed:!1},icon:(0,H.jsx)(gT,{}),label:`Load Station`},{type:`Link`,route:{route:$.Station_Queues,queues:[]},icon:(0,H.jsx)(wT,{}),label:`Queue Management`},{type:`Link`,route:{route:$.Station_InspectionMonitor},icon:(0,H.jsx)(MT,{}),label:`Inspection Stand`},{type:`Link`,route:{route:$.Station_Closeout},icon:(0,H.jsx)(BT,{}),label:`Close Out`},{type:`Link`,route:{route:$.Tools_Dashboard},icon:(0,H.jsx)(rT,{}),label:`Tool Management`},{type:`Link`,route:{route:$.Station_Overview},icon:(0,H.jsx)(oT,{}),label:`System Overview`},{type:`Subheader`,caption:`Daily Monitoring`},{type:`Link`,route:{route:$.Operations_Dashboard},icon:(0,H.jsx)(WT,{}),label:`Operation Management`},{type:`Link`,route:{route:$.Engineering_Cycles},icon:(0,H.jsx)(ire,{}),label:`Engineering`},{type:`Link`,route:{route:$.Quality_Dashboard},icon:(0,H.jsx)(ure,{}),label:`Quality Analysis`},{type:`Link`,route:{route:$.Sales_Dashboard},icon:(0,H.jsx)(ore,{}),label:`Sales`},{type:`Subheader`,caption:`Monthly Review`},{type:`Link`,route:{route:$.Analysis_Buffers},icon:(0,H.jsx)(NT,{}),label:`Flexibility Analysis`}];function kW(e){let t=(0,H.jsx)(Hp,{children:(0,H.jsx)(sb,{component:`nav`,dense:!0,children:(e.modes??OW).map((t,n)=>t.type===`Subheader`?(0,H.jsx)(y_,{children:t.caption},n):(0,H.jsx)(hb,{children:(0,H.jsxs)(cb,{onClick:()=>e.setRoute(t.route),children:[(0,H.jsx)(bb,{children:t.icon}),(0,H.jsx)(Tb,{children:t.label})]})},n))})});return(0,H.jsx)(`main`,{style:{display:`flex`,justifyContent:`center`},children:(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,H.jsx)(q,{variant:`h4`,style:{marginTop:`2em`},children:`Select user and computer location`}),(0,H.jsxs)(q,{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,H.jsx)(`a`,{href:`https://fms-insight.seedtactics.com/docs/client-dashboard.html`,children:`Learn More`})]})]}),t]})})}var AW=[[`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`],[`Telepen`,`B`,` `,`lr I`,32,`Telepen`],[`TelepenAlpha`,`B`,`0`,`lr I`,32,`Telepen Alpha`],[`TelepenNumeric`,`B`,`1`,`lr I`,87,`Telepen Numeric`],[`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`,`mr `,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`]],jW={DataBarExpanded:`DataBarExp`,DataBarLimited:`DataBarLtd`,"Linear-Codes":`AllLinear`,"Matrix-Codes":`AllMatrix`,Any:`All`,rMQRCode:`RMQRCode`};AW.map(e=>e[5]),AW.filter(e=>e[1]===`*`).map(e=>e[0]),AW.filter(e=>e[1]!==`*`).map(e=>e[0]),AW.filter(e=>e[2]===` `).map(e=>e[0]),AW.filter(e=>e[3][0]===`l`).map(e=>e[0]),AW.filter(e=>e[3][0]===`m`).map(e=>e[0]),AW.filter(e=>e[3][1]===`r`).map(e=>e[0]),AW.filter(e=>e[3][2]===`w`||e[4]!==0).map(e=>e[0]),AW.filter(e=>e[3][3]===`G`).map(e=>e[0]),AW.filter(e=>e[3][4]===`R`).map(e=>e[0]),AW.filter(e=>e[3][4]===`I`).map(e=>e[0]);function MW(e){return jW[e]??e}function NW(e){return e.map(MW).join(`,`)}var PW=[`LocalAverage`,`GlobalHistogram`,`FixedThreshold`,`BoolCast`];function FW(e){return PW.indexOf(e)}var IW=`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 LW(e){return e===`UnicodeBig`?IW.indexOf(`UTF16BE`):IW.indexOf(e)}var RW=[`Text`,`Binary`,`Mixed`,`GS1`,`ISO15434`,`UnknownECI`];function zW(e){return RW[e]}var BW=[`Ignore`,`Read`,`Require`];function VW(e){return BW.indexOf(e)}var HW=[`Plain`,`ECI`,`HRI`,`Escaped`,`Hex`,`HexECI`];function UW(e){return HW.indexOf(e)}var WW={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 GW(e){return{...e,formats:NW(e.formats),binarizer:FW(e.binarizer),eanAddOnSymbol:VW(e.eanAddOnSymbol),textMode:UW(e.textMode),characterSet:LW(e.characterSet),tryCode39ExtendedMode:e.tryCode39ExtendedMode??!0}}function KW(e){return{...e,format:e.format,symbology:e.symbology,contentType:zW(e.contentType)}}var qW={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.1.0/dist/${n[1]}/${e}`:t+e}},YW=new WeakMap;function XW(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 ZW(e,{overrides:t,equalityFn:n=XW,fireImmediately:r=!1}={}){let[i,a]=YW.get(e)??[JW],o=t??i,s;if(r){if(a&&(s=n(i,o)))return a;let t=e({...o});return YW.set(e,[o,t]),t}(s??n(i,o))||YW.set(e,[o])}function QW(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 $W(e,t,n=WW){let r={...WW,...n},i=await ZW(e,{fireImmediately:!0}),a,o;if(`width`in t&&`height`in t&&`data`in t){let{data:e,width:n,height:s}=t,c=QW(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,GW(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,GW(r))}finally{i._free(o)}}let s=[];for(let e=0;e<a.size();++e)s.push(KW(a.get(e)));return s}({...WW}),[...WW.formats],{...qW};async function eG(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=cr.buffer;re=new Int8Array(e),M=new Int16Array(e),i.HEAPU8=se=new Uint8Array(e),oe=new Uint16Array(e),ne=new Int32Array(e),N=new Uint32Array(e),ie=new Float32Array(e),ae=new Float64Array(e)}function S(){if(i.preRun)for(typeof i.preRun==`function`&&(i.preRun=[i.preRun]);i.preRun.length;)de(i.preRun.shift());ce(ue)}function C(){b=!0,Zr.Ba()}function w(){if(i.postRun)for(typeof i.postRun==`function`&&(i.postRun=[i.postRun]);i.postRun.length;)le(i.postRun.shift());ce(P)}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:dr}}async function j(){function e(e,t){return Zr=e.exports,ur(Zr),x(),Zr}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 M,ne,re,ie,ae,oe,N,se,ce=e=>{for(;e.length>0;)e.shift()(i)},P=[],le=e=>P.push(e),ue=[],de=e=>ue.push(e),F=e=>er(e),fe=()=>tr(),pe=[],me=0,he=e=>{var t=new _e(e);return t.get_caught()||(t.set_caught(!0),me--),t.set_rethrown(!1),pe.push(t),Zn(e)},I=0,ge=()=>{Qn(0,0);var e=pe.pop();nr(e.excPtr),I=0};class _e{constructor(e){this.excPtr=e,this.ptr=e-24}set_type(e){N[this.ptr+4>>2]=e}get_type(){return N[this.ptr+4>>2]}set_destructor(e){N[this.ptr+8>>2]=e}get_destructor(){return N[this.ptr+8>>2]}set_caught(e){e=+!!e,re[this.ptr+12]=e}get_caught(){return re[this.ptr+12]!=0}set_rethrown(e){e=+!!e,re[this.ptr+13]=e}get_rethrown(){return re[this.ptr+13]!=0}init(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)}set_adjusted_ptr(e){N[this.ptr+16>>2]=e}get_adjusted_ptr(){return N[this.ptr+16>>2]}}var ve=e=>$n(e),ye=e=>{var t=I;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(ir(i,r,a))return ve(i),t}return ve(r),t},be=()=>ye([]),xe=e=>ye([e]),Se=(e,t)=>ye([e,t]),Ce=()=>{var e=pe.pop();e||T(`no exception to throw`);var t=e.excPtr;throw e.get_rethrown()||(pe.push(e),e.set_rethrown(!0),e.set_caught(!1),me++),rr(t),I=t,I},L=(e,t,n)=>{throw new _e(e).init(t,n),rr(e),I=e,me++,I},R=()=>me,z=e=>{throw I||=e,I},we=()=>T(``),Te={},Ee=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function De(e){return this.fromWireType(N[e>>2])}var Oe={},ke={},Ae={},je=class extends Error{constructor(e){super(e),this.name=`InternalError`}},Me=e=>{throw new je(e)},B=(e,t,n)=>{e.forEach(e=>Ae[e]=t);function r(t){var r=n(t);r.length!==e.length&&Me(`Mismatched type converter count`);for(var i=0;i<e.length;++i)ze(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];ke.hasOwnProperty(n)?i[t]=ke[n]:(a.push(n),Oe.hasOwnProperty(n)||(Oe[n]=[]),Oe[n].push(()=>{i[t]=ke[n],++o,o===a.length&&r(i)}))}}a.length===0&&r(i)},Ne=e=>{var t=Te[e];delete Te[e];var n=t.rawConstructor,r=t.rawDestructor,i=t.fields,a=i.map(e=>e.getterReturnType).concat(i.map(e=>e.setterArgumentType));B([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)),Ee(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:De,destructorFunction:r}]})},Pe=(e,t,n,r,i)=>{},Fe=e=>{for(var t=``;;){var n=se[e++];if(!n)return t;t+=String.fromCharCode(n)}},Ie=class extends Error{constructor(e){super(e),this.name=`BindingError`}},Le=e=>{throw new Ie(e)};function Re(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var r=t.name;if(e||Le(`type "${r}" must have a positive integer typeid pointer`),ke.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;Le(`Cannot register type '${r}' twice`)}if(ke[e]=t,delete Ae[e],Oe.hasOwnProperty(e)){var i=Oe[e];delete Oe[e],i.forEach(e=>e())}}function ze(e,t){return Re(e,t,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{})}var Be=(e,t,n,r)=>{t=Fe(t),ze(e,{name:t,fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:r},readValueFromPointer:function(e){return this.fromWireType(se[e])},destructorFunction:null})},Ve=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),He=e=>{function t(e){return e.$$.ptrType.registeredClass.name}Le(t(e)+` instance already deleted`)},Ue=!1,We=e=>{},Ge=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},Ke=e=>{--e.count.value,e.count.value===0&&Ge(e)},qe=e=>globalThis.FinalizationRegistry?(Ue=new FinalizationRegistry(e=>{Ke(e.$$)}),qe=e=>{var t=e.$$;if(t.smartPtr){var n={$$:t};Ue.register(e,n,e)}return e},We=e=>Ue.unregister(e),qe(e)):(qe=e=>e,e),Je=[],Ye=()=>{for(;Je.length;){var e=Je.pop();e.$$.deleteScheduled=!1,e.delete()}},Xe,Ze=()=>{let e=Qe.prototype;Object.assign(e,{isAliasOf(e){if(!(this instanceof Qe)||!(e instanceof Qe))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||He(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=qe(Object.create(Object.getPrototypeOf(this),{$$:{value:Ve(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||He(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Le(`Object already scheduled for deletion`),We(this),Ke(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||He(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Le(`Object already scheduled for deletion`),Je.push(this),Je.length===1&&Xe&&Xe(Ye),this.$$.deleteScheduled=!0,this}});let t=Symbol.dispose;t&&(e[t]=e.delete)};function Qe(){}var $e=(e,t)=>Object.defineProperty(t,"name",{value:e}),et={},tt=(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)||Le(`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}},nt=(e,t,n)=>{i.hasOwnProperty(e)?((n===void 0||i[e].overloadTable!==void 0&&i[e].overloadTable[n]!==void 0)&&Le(`Cannot register public name '${e}' twice`),tt(i,e,e),i[e].overloadTable.hasOwnProperty(n)&&Le(`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)},rt=48,it=57,at=e=>{e=e.replace(/[^a-zA-Z0-9_]/g,`$`);var t=e.charCodeAt(0);return t>=rt&&t<=it?`_${e}`:e};function ot(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 st=(e,t,n)=>{for(;t!==n;)t.upcast||Le(`Expected null or instance of ${n.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e},V=e=>{if(e===null)return`null`;var t=typeof e;return t===`object`||t===`array`||t===`function`?e.toString():``+e};function ct(e,t){if(t===null)return this.isReference&&Le(`null is not a valid ${this.name}`),0;t.$$||Le(`Cannot pass "${V(t)}" as a ${this.name}`),t.$$.ptr||Le(`Cannot pass deleted object as a pointer of type ${this.name}`);var n=t.$$.ptrType.registeredClass;return st(t.$$.ptr,n,this.registeredClass)}function lt(e,t){var n;if(t===null)return this.isReference&&Le(`null is not a valid ${this.name}`),this.isSmartPointer?(n=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,n),n):0;(!t||!t.$$)&&Le(`Cannot pass "${V(t)}" as a ${this.name}`),t.$$.ptr||Le(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&Le(`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=st(t.$$.ptr,r,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&Le(`Passing raw pointer to smart pointer is illegal`),this.sharingPolicy){case 0:t.$$.smartPtrType===this?n=t.$$.smartPtr:Le(`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,Bt.toHandle(()=>i.delete())),e!==null&&e.push(this.rawDestructor,n)}break;default:Le(`Unsupported sharing policy`)}return n}function ut(e,t){if(t===null)return this.isReference&&Le(`null is not a valid ${this.name}`),0;t.$$||Le(`Cannot pass "${V(t)}" as a ${this.name}`),t.$$.ptr||Le(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&Le(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;return st(t.$$.ptr,n,this.registeredClass)}var dt=(e,t,n)=>{if(t===n)return e;if(n.baseClass===void 0)return null;var r=dt(e,t,n.baseClass);return r===null?null:n.downcast(r)},ft={},pt=(e,t)=>{for(t===void 0&&Le(`ptr should not be undefined`);e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},mt=(e,t)=>(t=pt(e,t),ft[t]),ht=(e,t)=>((!t.ptrType||!t.ptr)&&Me(`makeClassHandle requires ptr and ptrType`),!!t.smartPtrType!=!!t.smartPtr&&Me(`Both smartPtrType and smartPtr must be specified`),t.count={value:1},qe(Object.create(e,{$$:{value:t,writable:!0}})));function gt(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var n=mt(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?ht(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):ht(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a=et[this.registeredClass.getActualType(t)];if(!a)return i.call(this);var o=this.isConst?a.constPointerType:a.pointerType,s=dt(t,this.registeredClass,o.registeredClass);return s===null?i.call(this):this.isSmartPointer?ht(o.registeredClass.instancePrototype,{ptrType:o,ptr:s,smartPtrType:this,smartPtr:e}):ht(o.registeredClass.instancePrototype,{ptrType:o,ptr:s})}var _t=()=>{Object.assign(vt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var t;(t=this.rawDestructor)==null||t.call(this,e)},readValueFromPointer:De,fromWireType:gt})};function vt(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=ct,this.destructorFunction=null):(this.toWireType=ut,this.destructorFunction=null):this.toWireType=lt}var yt=(e,t,n)=>{i.hasOwnProperty(e)||Me(`Replacing nonexistent public symbol`),i[e].overloadTable!==void 0&&n!==void 0?i[e].overloadTable[n]=t:(i[e]=t,i[e].argCount=n)},bt={},xt=(e,t,n)=>{e=e.replace(/p/g,`i`);var r=bt[e];return r(t,...n)},St=[],Ct=e=>{var t=St[e];return t||(St[e]=t=lr.get(e)),t},wt=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 xt(e,t,n);var r=Ct(t)(...n);function i(e){return e}return i(r)},Tt=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return function(){return wt(e,t,[...arguments],n)}},Et=function(e,t){arguments.length>2&&arguments[2]!==void 0&&arguments[2],e=Fe(e);function n(){return e.includes(`j`)?Tt(e,t):Ct(t)}var r=n();return typeof r!=`function`&&Le(`unknown function pointer with signature ${e}: ${t}`),r};class Dt extends Error{}var Ot=e=>{var t=Jn(e),n=Fe(t);return Yn(t),n},kt=(e,t)=>{var n=[],r={};function i(e){if(!r[e]&&!ke[e]){if(Ae[e]){Ae[e].forEach(i);return}n.push(e),r[e]=!0}}throw t.forEach(i),new Dt(`${e}: `+n.map(Ot).join([`, `]))},At=(e,t,n,r,i,a,o,s,c,l,u,d,f)=>{u=Fe(u),a=Et(i,a),s&&=Et(o,s),l&&=Et(c,l),f=Et(d,f);var p=at(u);nt(p,function(){kt(`Cannot construct ${u} due to unbound types`,[r])}),B([e,t,n],r?[r]:[],t=>{t=t[0];var n,i;r?(n=t.registeredClass,i=n.instancePrototype):i=Qe.prototype;var o=$e(u,function(){if(Object.getPrototypeOf(this)!==c)throw new Ie(`Use 'new' to construct ${u}`);if(d.constructor_body===void 0)throw new Ie(`${u} has no accessible constructor`);var e=[...arguments],t=d.constructor_body[e.length];if(t===void 0)throw new Ie(`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 ot(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 vt(u,d,!0,!1,!1),g=new vt(u+`*`,d,!1,!1,!1),_=new vt(u+` const*`,d,!1,!0,!1);return et[e]={pointerType:g,constPointerType:_},yt(p,o),[h,g,_]})},jt=(e,t)=>{for(var n=[],r=0;r<e;r++)n.push(N[t+r*4>>2]);return n};function Mt(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].destructorFunction===void 0)return!0;return!1}function Nt(e,t,n,r,i,a){var o=t.length;o<2&&Le(`argTypes array size mismatch! Must at least get return value and 'this' types!`);var s=t[1]!==null&&n!==null,c=Mt(t),l=!t[0].isVoid,u=o-2,d=Array(u),f=[],p=[];return $e(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)Ee(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 Pt=(e,t,n,r,i,a)=>{var o=jt(t,n);i=Et(r,i),B([],[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 Ie(`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]=()=>{kt(`Cannot construct ${e.name} due to unbound types`,o)},B([],o,r=>(r.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Nt(n,r,null,i,a),[])),[]})},Ft=e=>{e=e.trim();let t=e.indexOf(`(`);return t===-1?e:e.slice(0,t)},It=(e,t,n,r,i,a,o,s,c,l)=>{var u=jt(n,r);t=Fe(t),t=Ft(t),a=Et(i,a,c),B([],[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(){kt(`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):(tt(l,t,r),l[t].overloadTable[n-2]=i),B([],u,i=>{var s=Nt(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,[]}),[]})},Lt=[],Rt=[0,1,,1,null,1,!0,1,!1,1],zt=e=>{e>9&&--Rt[e+1]===0&&(Rt[e]=void 0,Lt.push(e))},Bt={toValue:e=>(e||Le(`Cannot use deleted val. handle = ${e}`),Rt[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=Lt.pop()||Rt.length;return Rt[t]=e,Rt[t+1]=1,t}}}},Vt={name:`emscripten::val`,fromWireType:e=>{var t=Bt.toValue(e);return zt(e),t},toWireType:(e,t)=>Bt.toHandle(t),readValueFromPointer:De,destructorFunction:null},Ht=e=>ze(e,Vt),Ut=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(ie[e>>2])};case 8:return function(e){return this.fromWireType(ae[e>>3])};default:throw TypeError(`invalid float width (${t}): ${e}`)}},Wt=(e,t,n)=>{t=Fe(t),ze(e,{name:t,fromWireType:e=>e,toWireType:(e,t)=>t,readValueFromPointer:Ut(t,n),destructorFunction:null})},Gt=(e,t,n,r,i,a,o,s)=>{var c=jt(t,n);e=Fe(e),e=Ft(e),i=Et(r,i,o),nt(e,function(){kt(`Cannot call ${e} due to unbound types`,c)},t-1),B([],c,n=>{var r=[n[0],null].concat(n.slice(1));return yt(e,Nt(e,r,null,i,a,o),t-1),[]})},Kt=(e,t,n)=>{switch(t){case 1:return n?e=>re[e]:e=>se[e];case 2:return n?e=>M[e>>1]:e=>oe[e>>1];case 4:return n?e=>ne[e>>2]:e=>N[e>>2];default:throw TypeError(`invalid integer width (${t}): ${e}`)}},qt=(e,t,n,r,i)=>{t=Fe(t);let a=r===0,o=e=>e;if(a){var s=32-8*n;o=e=>e<<s>>>s,i=o(i)}ze(e,{name:t,fromWireType:o,toWireType:(e,t)=>t,readValueFromPointer:Kt(t,n,r!==0),destructorFunction:null})},Jt=(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))})},Yt=(e,t,n,r)=>{n=Fe(n),r=Fe(r),B([],[e,t],e=>{let t=e[0];return Jt(t.registeredClass.instancePrototype,n,r),[]})},Xt=(e,t,n)=>{var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function i(e){var t=N[e>>2],n=N[e+4>>2];return new r(re.buffer,n,t)}n=Fe(n),ze(e,{name:n,fromWireType:i,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},Zt=Object.assign({optional:!0},Vt),Qt=(e,t)=>{ze(e,Zt)},$t=(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},en=(e,t,n)=>$t(e,se,t,n),tn=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},nn=globalThis.TextDecoder&&new TextDecoder,rn=(e,t,n,r)=>{var i=t+n;if(r)return i;for(;e[t]&&!(t>=i);)++t;return t},an=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=rn(e,t,n,r);if(i-t>16&&e.buffer&&nn)return nn.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},on=(e,t,n)=>e?an(se,e,t,n):``,sn=(e,t)=>{t=Fe(t);var n=!0;ze(e,{name:t,fromWireType(e){var t=N[e>>2],r=e+4,i;if(n)i=on(r,t,!0);else{i=``;for(var a=0;a<t;++a)i+=String.fromCharCode(se[r+a])}return Yn(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||Le(`Cannot pass non-string to std::string`),r=n&&i?tn(t):t.length;var a=Xn(4+r+1),o=a+4;if(N[a>>2]=r,i)if(n)en(t,o,r+1);else for(var s=0;s<r;++s){var c=t.charCodeAt(s);c>255&&(Yn(a),Le(`String has UTF-16 code units that do not fit in 8 bits`)),se[o+s]=c}else se.set(t,o);return e!==null&&e.push(Yn,a),a},readValueFromPointer:De,destructorFunction(e){Yn(e)}})},cn=globalThis.TextDecoder?new TextDecoder(`utf-16le`):void 0,ln=(e,t,n)=>{var r=e>>1,i=rn(oe,r,t/2,n);if(i-r>16&&cn)return cn.decode(oe.subarray(r,i));for(var a=``,o=r;o<i;++o){var s=oe[o];a+=String.fromCharCode(s)}return a},un=(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);M[t>>1]=o,t+=2}return M[t>>1]=0,t-r},dn=e=>e.length*2,fn=(e,t,n)=>{for(var r=``,i=e>>2,a=0;!(a>=t/4);a++){var o=N[i+a];if(!o&&!n)break;r+=String.fromCodePoint(o)}return r},pn=(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++,ne[t>>2]=o,t+=4,t+4>i)break}return ne[t>>2]=0,t-r},mn=e=>{for(var t=0,n=0;n<e.length;++n)e.codePointAt(n)>65535&&n++,t+=4;return t},hn=(e,t,n)=>{n=Fe(n);var r,i,a;t===2?(r=ln,i=un,a=dn):(r=fn,i=pn,a=mn),ze(e,{name:n,fromWireType:e=>{var n=N[e>>2],i=r(e+4,n*t,!0);return Yn(e),i},toWireType:(e,r)=>{typeof r!=`string`&&Le(`Cannot pass non-string to C++ string type ${n}`);var o=a(r),s=Xn(4+o+t);return N[s>>2]=o/t,i(r,s+4,o+t),e!==null&&e.push(Yn,s),s},readValueFromPointer:De,destructorFunction(e){Yn(e)}})},gn=(e,t,n,r,i,a)=>{Te[e]={name:Fe(t),rawConstructor:Et(n,r),rawDestructor:Et(i,a),fields:[]}},_n=(e,t,n,r,i,a,o,s,c,l)=>{Te[e].fields.push({fieldName:Fe(t),getterReturnType:n,getter:Et(r,i),getterContext:a,setterArgumentType:o,setter:Et(s,c),setterContext:l})},vn=(e,t)=>{t=Fe(t),ze(e,{isVoid:!0,name:t,fromWireType:()=>void 0,toWireType:(e,t)=>void 0})},yn=[],bn=e=>{var t=yn.length;return yn.push(e),t},xn=(e,t)=>{var n=ke[e];return n===void 0&&Le(`${t} has unknown type ${Ot(e)}`),n},Sn=(e,t)=>{for(var n=Array(e),r=0;r<e;++r)n[r]=xn(N[t+r*4>>2],`parameter ${r}`);return n},Cn=(e,t,n)=>{var r=[],i=e(r,n);return r.length&&(N[t>>2]=Bt.toHandle(r)),i},wn={},Tn=e=>{var t=wn[e];return t===void 0?Fe(e):t},En=(e,t,n)=>{var[r,...i]=Sn(e,t),a=r.toWireType.bind(r),o=i.map(e=>e.readValueFromPointer.bind(e));e--;var s=Array(e);return bn($e(`methodCaller<(${i.map(e=>e.name)}) => ${r.name}>`,(t,r,i,c)=>{for(var l=0,u=0;u<e;++u)s[u]=o[u](c+l),l+=8;var d;switch(n){case 0:d=Bt.toValue(t).apply(null,s);break;case 2:d=Reflect.construct(Bt.toValue(t),s);break;case 3:d=s[0];break;case 1:d=Bt.toValue(t)[Tn(r)](...s);break}return Cn(a,i,d)}))},Dn=e=>e?(e=Tn(e),Bt.toHandle(globalThis[e])):Bt.toHandle(globalThis),On=e=>{e>9&&(Rt[e+1]+=1)},kn=(e,t,n,r,i)=>yn[e](t,n,r,i),An=e=>{Ee(Bt.toValue(e)),zt(e)},jn=(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);N[e>>2]=l*60,ne[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?(en(d,n,17),en(f,r,17)):(en(d,r,17),en(f,n,17))},Mn=()=>2147483648,Nn=(e,t)=>Math.ceil(e/t)*t,Pn=e=>{var t=(e-cr.buffer.byteLength+65535)/65536|0;try{return cr.grow(t),x(),1}catch{}},Fn=e=>{var t=se.length;e>>>=0;var n=Mn();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),Pn(Math.min(n,Nn(Math.max(e,i),65536))))return!0}return!1},In={},Ln=()=>c||`./this.program`,Rn=()=>{if(!Rn.strings){var e={USER:`web_user`,LOGNAME:`web_user`,PATH:`/`,PWD:`/`,HOME:`/home/web_user`,LANG:(globalThis.navigator?.language??`C`).replace(`-`,`_`)+`.UTF-8`,_:Ln()};for(var t in In)In[t]===void 0?delete e[t]:e[t]=In[t];var n=[];for(var t in e)n.push(`${t}=${e[t]}`);Rn.strings=n}return Rn.strings},zn=(e,t)=>{var n=0,r=0;for(var i of Rn()){var a=t+n;N[e+r>>2]=a,n+=en(i,a,1/0)+1,r+=4}return 0},Bn=(e,t)=>{var n=Rn();N[e>>2]=n.length;var r=0;for(var i of n)r+=tn(i)+1;return N[t>>2]=r,0},Vn=e=>52,Hn=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+t*4294967296:NaN;function Un(e,t,n,r,i){return Hn(t,n),70}var Wn=[null,[],[]],Gn=(e,t)=>{var n=Wn[e];t===0||t===10?((e===1?m:h)(an(n)),n.length=0):n.push(t)},Kn=(e,t,n,r)=>{for(var i=0,a=0;a<n;a++){var o=N[t>>2],s=N[t+4>>2];t+=8;for(var c=0;c<s;c++)Gn(e,se[o+c]);i+=s}return N[r>>2]=i,0},qn=e=>e;if(Ze(),_t(),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 Jn,Yn,Xn,Zn,Qn,$n,er,tr,nr,rr,ir,ar,or,sr,cr,lr;function ur(e){Jn=e.Ca,Yn=i._free=e.Da,Xn=i._malloc=e.Fa,Zn=e.Ga,Qn=e.Ha,$n=e.Ia,er=e.Ja,tr=e.Ka,nr=e.La,rr=e.Ma,ir=e.Na,bt.viijii=e.Oa,ar=bt.viijjijjjjjj=e.Pa,or=bt.iiijj=e.Qa,bt.jiji=e.Ra,sr=bt.jiiii=e.Sa,bt.iiiiij=e.Ta,bt.iiiiijj=e.Ua,bt.iiiiiijj=e.Va,cr=e.Aa,lr=e.Ea}var dr={r:he,x:ge,a:be,i:xe,m:Se,S:Ce,p:L,ha:R,d:z,da:we,xa:Ne,ca:Pe,ra:Be,va:At,ua:Pt,H:It,pa:Ht,Y:Wt,Z:Gt,A:qt,ta:Yt,u:Xt,wa:Qt,qa:sn,T:hn,I:gn,ya:_n,sa:vn,O:En,za:zt,E:Dn,U:On,N:kn,la:An,ea:jn,ia:Fn,fa:zn,ga:Bn,ja:Vn,$:Un,W:Kn,na:Nr,M:Ir,B:Hr,P:yr,V:Wr,q:jr,b:mr,F:Fr,ka:Br,c:gr,Q:Vr,h:vr,j:Tr,s:Er,R:Pr,t:Or,G:kr,C:Ar,K:Gr,aa:Jr,_:Yr,f:br,l:fr,e:hr,X:Lr,g:_r,L:Ur,k:pr,ma:Rr,o:Dr,y:Sr,v:Mr,D:wr,w:zr,n:xr,J:Kr,oa:Cr,ba:qr,z:qn};function fr(e,t){var n=fe();try{Ct(e)(t)}catch(e){if(F(n),e!==e+0)throw e;Qn(1,0)}}function pr(e,t,n,r,i){var a=fe();try{Ct(e)(t,n,r,i)}catch(e){if(F(a),e!==e+0)throw e;Qn(1,0)}}function mr(e,t){var n=fe();try{return Ct(e)(t)}catch(e){if(F(n),e!==e+0)throw e;Qn(1,0)}}function hr(e,t,n){var r=fe();try{Ct(e)(t,n)}catch(e){if(F(r),e!==e+0)throw e;Qn(1,0)}}function gr(e,t,n){var r=fe();try{return Ct(e)(t,n)}catch(e){if(F(r),e!==e+0)throw e;Qn(1,0)}}function _r(e,t,n,r){var i=fe();try{Ct(e)(t,n,r)}catch(e){if(F(i),e!==e+0)throw e;Qn(1,0)}}function vr(e,t,n,r){var i=fe();try{return Ct(e)(t,n,r)}catch(e){if(F(i),e!==e+0)throw e;Qn(1,0)}}function yr(e,t,n,r,i,a){var o=fe();try{return Ct(e)(t,n,r,i,a)}catch(e){if(F(o),e!==e+0)throw e;Qn(1,0)}}function br(e){var t=fe();try{Ct(e)()}catch(e){if(F(t),e!==e+0)throw e;Qn(1,0)}}function xr(e,t,n,r,i,a,o,s,c,l,u){var d=fe();try{Ct(e)(t,n,r,i,a,o,s,c,l,u)}catch(e){if(F(d),e!==e+0)throw e;Qn(1,0)}}function Sr(e,t,n,r,i,a,o){var s=fe();try{Ct(e)(t,n,r,i,a,o)}catch(e){if(F(s),e!==e+0)throw e;Qn(1,0)}}function Cr(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g){var _=fe();try{Ct(e)(t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g)}catch(e){if(F(_),e!==e+0)throw e;Qn(1,0)}}function wr(e,t,n,r,i,a,o,s,c){var l=fe();try{Ct(e)(t,n,r,i,a,o,s,c)}catch(e){if(F(l),e!==e+0)throw e;Qn(1,0)}}function Tr(e,t,n,r,i){var a=fe();try{return Ct(e)(t,n,r,i)}catch(e){if(F(a),e!==e+0)throw e;Qn(1,0)}}function Er(e,t,n,r,i,a){var o=fe();try{return Ct(e)(t,n,r,i,a)}catch(e){if(F(o),e!==e+0)throw e;Qn(1,0)}}function Dr(e,t,n,r,i,a){var o=fe();try{Ct(e)(t,n,r,i,a)}catch(e){if(F(o),e!==e+0)throw e;Qn(1,0)}}function Or(e,t,n,r,i,a,o){var s=fe();try{return Ct(e)(t,n,r,i,a,o)}catch(e){if(F(s),e!==e+0)throw e;Qn(1,0)}}function kr(e,t,n,r,i,a,o,s){var c=fe();try{return Ct(e)(t,n,r,i,a,o,s)}catch(e){if(F(c),e!==e+0)throw e;Qn(1,0)}}function Ar(e,t,n,r,i,a,o,s,c){var l=fe();try{return Ct(e)(t,n,r,i,a,o,s,c)}catch(e){if(F(l),e!==e+0)throw e;Qn(1,0)}}function jr(e){var t=fe();try{return Ct(e)()}catch(e){if(F(t),e!==e+0)throw e;Qn(1,0)}}function Mr(e,t,n,r,i,a,o,s){var c=fe();try{Ct(e)(t,n,r,i,a,o,s)}catch(e){if(F(c),e!==e+0)throw e;Qn(1,0)}}function Nr(e,t,n){var r=fe();try{return Ct(e)(t,n)}catch(e){if(F(r),e!==e+0)throw e;Qn(1,0)}}function Pr(e,t,n,r,i,a,o){var s=fe();try{return Ct(e)(t,n,r,i,a,o)}catch(e){if(F(s),e!==e+0)throw e;Qn(1,0)}}function Fr(e,t,n,r){var i=fe();try{return Ct(e)(t,n,r)}catch(e){if(F(i),e!==e+0)throw e;Qn(1,0)}}function Ir(e,t,n,r){var i=fe();try{return Ct(e)(t,n,r)}catch(e){if(F(i),e!==e+0)throw e;Qn(1,0)}}function Lr(e,t,n,r,i,a,o,s,c){var l=fe();try{Ct(e)(t,n,r,i,a,o,s,c)}catch(e){if(F(l),e!==e+0)throw e;Qn(1,0)}}function Rr(e,t,n,r,i,a,o,s){var c=fe();try{Ct(e)(t,n,r,i,a,o,s)}catch(e){if(F(c),e!==e+0)throw e;Qn(1,0)}}function zr(e,t,n,r,i,a,o,s,c,l){var u=fe();try{Ct(e)(t,n,r,i,a,o,s,c,l)}catch(e){if(F(u),e!==e+0)throw e;Qn(1,0)}}function Br(e,t,n){var r=fe();try{return Ct(e)(t,n)}catch(e){if(F(r),e!==e+0)throw e;Qn(1,0)}}function Vr(e,t,n,r,i){var a=fe();try{return Ct(e)(t,n,r,i)}catch(e){if(F(a),e!==e+0)throw e;Qn(1,0)}}function Hr(e,t,n,r,i,a){var o=fe();try{return Ct(e)(t,n,r,i,a)}catch(e){if(F(o),e!==e+0)throw e;Qn(1,0)}}function Ur(e,t,n,r,i,a,o){var s=fe();try{Ct(e)(t,n,r,i,a,o)}catch(e){if(F(s),e!==e+0)throw e;Qn(1,0)}}function Wr(e,t,n,r){var i=fe();try{return Ct(e)(t,n,r)}catch(e){if(F(i),e!==e+0)throw e;Qn(1,0)}}function Gr(e,t,n,r,i,a,o,s,c,l,u,d){var f=fe();try{return Ct(e)(t,n,r,i,a,o,s,c,l,u,d)}catch(e){if(F(f),e!==e+0)throw e;Qn(1,0)}}function Kr(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){var g=fe();try{Ct(e)(t,n,r,i,a,o,s,c,l,u,d,f,p,m,h)}catch(e){if(F(g),e!==e+0)throw e;Qn(1,0)}}function qr(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y){var b=fe();try{ar(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y)}catch(e){if(F(b),e!==e+0)throw e;Qn(1,0)}}function Jr(e,t,n,r,i,a,o){var s=fe();try{return or(e,t,n,r,i,a,o)}catch(e){if(F(s),e!==e+0)throw e;Qn(1,0)}}function Yr(e,t,n,r,i){var a=fe();try{return sr(e,t,n,r,i)}catch(e){if(F(a),e!==e+0)throw e;Qn(1,0)}}function Xr(){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 Zr=await j();return Xr(),t=b?i:new Promise((e,t)=>{v=e,y=t}),t}function tG(e){return ZW(eG,e)}async function nG(e,t){return $W(eG,e,t)}var rG=[[`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`],[`micro_pdf417`,`MicroPDF417`],[`qr_code`,`QRCode`],[`qr_code_model_1`,`QRCodeModel1`],[`qr_code_model_2`,`QRCodeModel2`],[`rm_qr_code`,`RMQRCode`],[`upc_a`,`UPCA`],[`upc_e`,`UPCE`],[`telepen`,`Telepen`],[`telepen_alpha`,`TelepenAlpha`],[`telepen_numeric`,`TelepenNumeric`],[`other_barcode`,`OtherBarcode`],[`linear_codes`,`AllLinear`],[`matrix_codes`,`AllMatrix`],[`gs1_codes`,`AllGS1`],[`retail_codes`,`AllRetail`],[`industrial_codes`,`AllIndustrial`],[`any`,`All`]],iG=[...rG,[`unknown`]].map(e=>e[0]),aG=new Map(rG);function oG(e){for(let[t,n]of aG)if(e===n)return t;return`unknown`}function sG(e){if(cG(e))return{width:e.naturalWidth,height:e.naturalHeight};if(lG(e))return{width:e.width.baseVal.value,height:e.height.baseVal.value};if(uG(e))return{width:e.videoWidth,height:e.videoHeight};if(fG(e))return{width:e.width,height:e.height};if(mG(e))return{width:e.displayWidth,height:e.displayHeight};if(dG(e)||pG(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 cG(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 lG(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 uG(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 dG(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 fG(e){try{return e instanceof ImageBitmap||Object.prototype.toString.call(e)===`[object ImageBitmap]`}catch{return!1}}function pG(e){try{return e instanceof OffscreenCanvas||Object.prototype.toString.call(e)===`[object OffscreenCanvas]`}catch{return!1}}function mG(e){try{return e instanceof VideoFrame||Object.prototype.toString.call(e)===`[object VideoFrame]`}catch{return!1}}function hG(e){try{return e instanceof Blob||Object.prototype.toString.call(e)===`[object Blob]`}catch{return!1}}function gG(e){try{return e instanceof ImageData||Object.prototype.toString.call(e)===`[object ImageData]`}catch{return!1}}function _G(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 vG(e){if(cG(e)&&!await SG(e))throw new DOMException(`Failed to load or decode HTMLImageElement.`,`InvalidStateError`);if(lG(e)&&!await CG(e))throw new DOMException(`Failed to load or decode SVGImageElement.`,`InvalidStateError`);if(mG(e)&&wG(e))throw new DOMException(`VideoFrame is closed.`,`InvalidStateError`);if(uG(e)&&(e.readyState===0||e.readyState===1))throw new DOMException(`Invalid element or state.`,`InvalidStateError`);if(fG(e)&&EG(e))throw new DOMException(`The image source is detached.`,`InvalidStateError`);let{width:t,height:n}=sG(e);if(t===0||n===0)return null;let r=_G(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 yG(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 vG(t)}function bG(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 xG(e){if(hG(e))return await yG(e);if(gG(e)){if(TG(e))throw new DOMException(`The image data has been detached.`,`InvalidStateError`);return e}return dG(e)||pG(e)?bG(e):await vG(e)}async function SG(e){try{return await e.decode(),!0}catch{return!1}}async function CG(e){try{return await e.decode?.call(e),!0}catch{return!1}}function wG(e){return e.format===null}function TG(e){return e.data.buffer.byteLength===0}function EG(e){return e.width===0&&e.height===0}function DG(e,t){return OG(e)?new DOMException(`${t}: ${e.message}`,e.name):kG(e)?new e.constructor(`${t}: ${e.message}`):Error(`${t}: ${e}`)}function OG(e){return e instanceof DOMException||Object.prototype.toString.call(e)===`[object DOMException]`}function kG(e){return e instanceof Error||Object.prototype.toString.call(e)===`[object Error]`}function AG(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function jG(e,t,n){AG(e,t),t.set(e,n)}function MG(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 NG(e,t,n){return e.set(MG(e,t),n),n}function PG(e,t){return e.get(MG(e,t))}var FG=new WeakMap,IG=class{constructor(e={}){jG(this,FG,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(!aG.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.`);NG(FG,this,n??[]),tG({fireImmediately:!0}).catch(()=>{})}catch(e){throw DG(e,`Failed to construct 'BarcodeDetector'`)}}static async getSupportedFormats(){return iG.filter(e=>e!==`unknown`)}async detect(e){try{let t=await xG(e);if(t===null)return[];let n,r={textMode:`Plain`,formats:PG(FG,this).map(e=>aG.get(e))};try{n=await nG(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:oG(e.format),cornerPoints:[{x:t,y:n},{x:r,y:i},{x:s,y:c},{x:a,y:o}]}})}catch(e){throw DG(e,`Failed to execute 'detect' on 'BarcodeDetector'`)}}},LG=!0,RG=!0;function zG(e,t,n){let r=e.match(t);return r&&r.length>=n&&parseFloat(r[n],10)}function BG(e,t,n){if(!e.RTCPeerConnection)return;if(!Object.getOwnPropertyDescriptor(EventTarget.prototype,`addEventListener`).writable){UG(`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 VG(e){return typeof e==`boolean`?(LG=e,e?`adapter.js logging disabled`:`adapter.js logging enabled`):Error(`Argument type: `+typeof e+`. Please use a boolean.`)}function HG(e){return typeof e==`boolean`?(RG=!e,`adapter.js deprecation warnings `+(e?`disabled`:`enabled`)):Error(`Argument type: `+typeof e+`. Please use a boolean.`)}function UG(){if(typeof window==`object`){if(LG)return;typeof console<`u`&&typeof console.log==`function`&&console.log.apply(console,arguments)}}function WG(e,t){RG&&console.warn(e+` is deprecated, please use `+t+` instead.`)}function GG(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(zG(n.userAgent,/Firefox\/(\d+)\./,1));else if(n.webkitGetUserMedia||e.isSecureContext===!1&&e.webkitRTCPeerConnection)t.browser=`chrome`,t.version=parseInt(zG(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2))||null;else if(e.RTCPeerConnection&&n.userAgent.match(/AppleWebKit\/(\d+)\./))t.browser=`safari`,t.version=parseInt(zG(n.userAgent,/AppleWebKit\/(\d+)\./,1)),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&`currentDirection`in e.RTCRtpTransceiver.prototype,t._safariVersion=zG(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 qG(e){return KG(e)?Object.keys(e).reduce(function(t,n){let r=KG(e[n]),i=r?qG(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 YG(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 XG=UG;function ZG(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),XG(`chrome: `+JSON.stringify(e)),i(e)})}e.video=r(e.video)}return XG(`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 QG=s({fixNegotiationNeeded:()=>oK,shimAddTrackRemoveTrack:()=>iK,shimAddTrackRemoveTrackWithNative:()=>rK,shimGetSendersWithDtmf:()=>tK,shimGetUserMedia:()=>ZG,shimMediaStream:()=>$G,shimOnTrack:()=>eK,shimPeerConnection:()=>aK,shimSenderReceiverGetStats:()=>nK});function $G(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function eK(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 BG(e,`track`,e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e))}function tK(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 nK(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=>YG(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}),BG(e,`track`,e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){let e=this;return this._pc.getStats().then(t=>YG(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 rK(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 iK(e,t){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return rK(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 aK(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 oK(e,t){t.version>102||BG(e,`negotiationneeded`,e=>{let n=e.target;if(!((t.version<72||n.getConfiguration&&n.getConfiguration().sdpSemantics===`plan-b`)&&n.signalingState!==`stable`))return e})}function sK(e,t){let n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,r){WG(`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 cK(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 lK=s({shimAddTransceiver:()=>_K,shimCreateAnswer:()=>bK,shimCreateOffer:()=>yK,shimGetDisplayMedia:()=>cK,shimGetParameters:()=>vK,shimGetStats:()=>fK,shimGetUserMedia:()=>sK,shimOnTrack:()=>uK,shimPeerConnection:()=>dK,shimRTCDataChannel:()=>gK,shimReceiverGetStats:()=>mK,shimRemoveStream:()=>hK,shimSenderGetStats:()=>pK});function uK(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 dK(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 fK(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 pK(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 mK(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}),BG(e,`track`,e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function hK(e){!e.RTCPeerConnection||`removeStream`in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){WG(`removeStream`,`removeTrack`),this.getSenders().forEach(t=>{t.track&&e.getTracks().includes(t.track)&&this.removeTrack(t)})})}function gK(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function _K(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 vK(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 yK(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 bK(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 xK=s({shimAudioContext:()=>AK,shimCallbacksAPI:()=>wK,shimConstraints:()=>EK,shimCreateOfferLegacy:()=>kK,shimGetUserMedia:()=>TK,shimLocalStreamsAPI:()=>SK,shimRTCIceServerUrls:()=>DK,shimRemoteStreamsAPI:()=>CK,shimTrackEventTransceiver:()=>OK});function SK(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 CK(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 wK(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 TK(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(EK(e))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}.bind(t))}function EK(e){return e&&e.video!==void 0?Object.assign({},e,{video:qG(e.video)}):e}function DK(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?(WG(`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 OK(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 kK(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 AK(e){typeof e!=`object`||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var jK=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(`
|
|
282
|
+
`).map(e=>e.trim())},n.splitSections=function(e){return e.split(`
|
|
283
|
+
m=`).map((e,t)=>(t>0?`m=`+e:e).trim()+`\r
|
|
284
|
+
`)},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
|
|
285
|
+
`},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
|
|
286
|
+
`},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
|
|
287
|
+
`}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
|
|
288
|
+
`}),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
|
|
289
|
+
`;return e.fingerprints.forEach(e=>{n+=`a=fingerprint:`+e.algorithm+` `+e.value+`\r
|
|
290
|
+
`}),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
|
|
291
|
+
`},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
|
|
292
|
+
a=ice-pwd:`+e.password+`\r
|
|
293
|
+
`;return e.iceLite&&(t+=`a=ice-lite\r
|
|
294
|
+
`),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
|
|
295
|
+
`,r+=`c=IN IP4 0.0.0.0\r
|
|
296
|
+
`,r+=`a=rtcp:9 IN IP4 0.0.0.0\r
|
|
297
|
+
`,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
|
|
298
|
+
`),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
|
|
299
|
+
`),e.mux&&(t+=`a=rtcp-mux\r
|
|
300
|
+
`),e.ssrc!==void 0&&e.cname&&(t+=`a=ssrc:`+e.ssrc+` cname:`+e.cname+`\r
|
|
301
|
+
`),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
|
|
302
|
+
`,`c=IN IP4 0.0.0.0\r
|
|
303
|
+
`,`a=sctpmap:`+t.port+` `+t.protocol+` 65535\r
|
|
304
|
+
`]:[`m=`+e.kind+` 9 `+e.protocol+` `+t.protocol+`\r
|
|
305
|
+
`,`c=IN IP4 0.0.0.0\r
|
|
306
|
+
`,`a=sctp-port:`+t.port+`\r
|
|
307
|
+
`],t.maxMessageSize!==void 0&&n.push(`a=max-message-size:`+t.maxMessageSize+`\r
|
|
308
|
+
`),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
|
|
309
|
+
o=`+(r||`thisisadapterortc`)+` `+i+` `+a+` IN IP4 127.0.0.1\r
|
|
310
|
+
s=-\r
|
|
311
|
+
t=0 0\r
|
|
312
|
+
`},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)})),MK=s({removeExtmapAllowMixed:()=>zK,shimAddIceCandidateNullOrEmpty:()=>BK,shimConnectionState:()=>RK,shimMaxMessageSize:()=>IK,shimParameterlessSetLocalDescription:()=>VK,shimRTCIceCandidate:()=>PK,shimRTCIceCandidateRelayProtocol:()=>FK,shimSendThrowTypeError:()=>LK}),NK=l(jK());function PK(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=NK.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,BG(e,`icecandidate`,t=>(t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:`false`}),t))}function FK(e){!e.RTCIceCandidate||e.RTCIceCandidate&&`relayProtocol`in e.RTCIceCandidate.prototype||BG(e,`icecandidate`,e=>{if(e.candidate){let t=NK.default.parseCandidate(e.candidate.candidate);t.type===`relay`&&(e.candidate.relayProtocol={0:`tls`,1:`tcp`,2:`udp`}[t.priority>>24])}return e})}function IK(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=NK.default.splitSections(e.sdp);return t.shift(),t.some(e=>{let t=NK.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=NK.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 LK(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},BG(e,`datachannel`,e=>(n(e.channel,e.target),e))}function RK(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 zK(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(`
|
|
313
|
+
a=extmap-allow-mixed`)!==-1){let n=t.sdp.split(`
|
|
314
|
+
`).filter(e=>e.trim()!==`a=extmap-allow-mixed`).join(`
|
|
315
|
+
`);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 BK(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 VK(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 HK({window:e}={},t={shimChrome:!0,shimFirefox:!0,shimSafari:!0}){let n=UG,r=GG(e),i={browserDetails:r,commonShim:MK,extractVersion:zG,disableLog:VG,disableWarnings:HG,sdp:NK};switch(r.browser){case`chrome`:if(!QG||!aK||!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=QG,BK(e,r),VK(e,r),ZG(e,r),$G(e,r),aK(e,r),eK(e,r),iK(e,r),tK(e,r),nK(e,r),oK(e,r),PK(e,r),FK(e,r),RK(e,r),IK(e,r),LK(e,r),zK(e,r);break;case`firefox`:if(!lK||!dK||!t.shimFirefox)return n(`Firefox shim is not included in this adapter release.`),i;n(`adapter.js shimming firefox.`),i.browserShim=lK,BK(e,r),VK(e,r),sK(e,r),dK(e,r),fK(e,r),uK(e,r),hK(e,r),pK(e,r),mK(e,r),gK(e,r),_K(e,r),vK(e,r),yK(e,r),bK(e,r),PK(e,r),RK(e,r),IK(e,r),LK(e,r);break;case`safari`:if(!xK||!t.shimSafari)return n(`Safari shim is not included in this adapter release.`),i;n(`adapter.js shimming safari.`),i.browserShim=xK,BK(e,r),VK(e,r),DK(e,r),kK(e,r),wK(e,r),SK(e,r),CK(e,r),OK(e,r),TK(e,r),AK(e,r),PK(e,r),FK(e,r),IK(e,r),LK(e,r),zK(e,r);break;default:n(`Unsupported browser!`);break}return i}HK({window:typeof window>`u`?void 0:window}),typeof window<`u`&&`BarcodeDetector`in window;var UK=3e3,WK=500;function GK(e={}){let{startTimeoutMs:t=UK,settleDelayMs:n=WK}=e,r=(0,I.useRef)(Promise.resolve({type:`stop`,data:{}})),i=(0,I.useRef)(null),a=(0,I.useRef)(null),[o,s]=(0,I.useState)({}),[c,l]=(0,I.useState)({}),u=(0,I.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,I.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,I.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,I.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,I.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,I.useCallback)(async()=>{try{await r.current}catch{}},[]);return(0,I.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`,qK={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:qK[t]??`unknown`,message:n,cause:e}}return{kind:`unknown`,message:typeof e==`string`?e:`Unknown scanner error`,cause:e}}var YK=[];function XK(e){let{videoElementRef:t,onScan:n,onFound:r,onError:i,retryDelay:a=100,scanDelay:o=0,formats:s=YK,allowMultiple:c=!1,sound:l=!0}=e,u=(0,I.useMemo)(()=>[...s].sort().join(`|`),[s]),d=(0,I.useRef)(null),f=(0,I.useRef)(null),p=(0,I.useRef)(null);typeof window<`u`&&d.current===null&&(d.current=new IG({formats:s})),(0,I.useEffect)(()=>{typeof window>`u`||(d.current=new IG({formats:s}))},[u]),(0,I.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,I.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,I.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,I.useCallback)(()=>{p.current!==null&&(window.cancelAnimationFrame(p.current),p.current=null)},[])}}var ZK={finder:!0,torch:!0,tracker:void 0,onOff:!1,zoom:!1},QK={facingMode:`environment`,width:{min:640,ideal:720,max:1920},height:{min:640,ideal:720,max:1080}},$K={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`}},eq=e=>e instanceof Date,tq=e=>e==null,nq=e=>typeof e==`object`,rq=e=>!tq(e)&&!Array.isArray(e)&&nq(e)&&!eq(e),iq=e=>tq(e)||!nq(e);function aq(e,t){if(iq(e)||iq(t))return e===t;if(eq(e)&&eq(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(!aq(e[n],t[n]))return!1;return!0}if(!rq(e)||!rq(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=rq(t)&&rq(i),s=Array.isArray(t)&&Array.isArray(i),c=eq(t)&&eq(i);if(a||s||c){if(!aq(t,i))return!1}else if(t!==i)return!1}return!0}function oq(e){let{disabled:t=!1,className:n,style:r}=e;return(0,H.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,H.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 sq(e){let{disabled:t=!1,className:n,style:r}=e;return(0,H.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,H.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,H.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 cq={bottom:85,right:8,position:`absolute`,zIndex:2,background:`transparent`,border:0,padding:4,margin:0,display:`inline-flex`,alignItems:`center`,justifyContent:`center`};function lq(e){let{scanning:t,startScanning:n,stopScanning:r}=e,[i,a]=(0,I.useState)(!1),o=(0,I.useRef)(null);(0,I.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,H.jsx)(`button`,{type:`button`,"aria-label":t?`Turn camera off`:`Turn camera on`,"aria-pressed":t,disabled:i,onClick:s,style:{...cq,cursor:i?`default`:`pointer`},children:t?(0,H.jsx)(oq,{disabled:i}):(0,H.jsx)(sq,{disabled:i})})}function uq(e){let{className:t,style:n}=e;return(0,H.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,H.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 dq(e){let{className:t,style:n}=e;return(0,H.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,H.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 fq={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 pq(e){let{status:t,scanning:n,torchToggle:r}=e;return n?(0,H.jsx)(`button`,{type:`button`,"aria-label":t?`Turn flashlight off`:`Turn flashlight on`,"aria-pressed":t,onClick:()=>r(!t),style:fq,children:t?(0,H.jsx)(uq,{}):(0,H.jsx)(dq,{})}):null}function mq(e){let{className:t,disabled:n=!1,style:r}=e;return(0,H.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,H.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 hq(e){let{className:t,disabled:n=!1,style:r}=e;return(0,H.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,H.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 gq={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`},_q={...gq,bottom:180};function vq(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,H.jsxs)(I.Fragment,{children:[(0,H.jsx)(`button`,{type:`button`,"aria-label":`Zoom out`,disabled:c,onClick:s,style:{...gq,cursor:c?`default`:`pointer`},children:(0,H.jsx)(hq,{disabled:c})}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`Zoom in`,disabled:l,onClick:o,style:{..._q,cursor:l?`default`:`pointer`},children:(0,H.jsx)(mq,{disabled:l})})]})}var yq={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 bq(e){let{scanning:t,capabilities:n,onOff:r,torch:i,zoom:a,startScanning:o,stopScanning:s}=e;return(0,H.jsx)(`div`,{style:yq.fullContainer,children:(0,H.jsxs)(`div`,{style:yq.innerContainer,children:[(0,H.jsx)(`div`,{style:yq.overlay,children:(0,H.jsxs)(`div`,{style:yq.borderBox,children:[(0,H.jsx)(`div`,{style:yq.cornerTopLeft}),(0,H.jsx)(`div`,{style:yq.cornerTopRight}),(0,H.jsx)(`div`,{style:yq.cornerBottomLeft}),(0,H.jsx)(`div`,{style:yq.cornerBottomRight})]})}),r&&(0,H.jsx)(lq,{scanning:t,startScanning:o,stopScanning:s}),i&&n.torch&&(0,H.jsx)(pq,{scanning:t,status:i.status,torchToggle:i.toggle}),a&&n.zoom&&(0,H.jsx)(vq,{scanning:t,capabilities:n.zoom,value:a.value,onZoom:a.onChange})]})})}var xq={position:`absolute`,width:`100%`,height:`100%`},Sq={position:`absolute`,width:`100%`,height:`100%`},Cq={position:`absolute`,width:`100%`,height:`100%`};function wq(e){if(e===null)return;let t=e.getContext(`2d`);t!==null&&t.clearRect(0,0,e.width,e.height)}function Tq(e,t,n,r){if(n===null||t===null)return;if(e.length===0||r===void 0){wq(n);return}let i=t.offsetWidth,a=t.offsetHeight,o=t.videoWidth,s=t.videoHeight;if(o===0||s===0){wq(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 Eq=(0,I.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,I.useRef)(null),y=(0,I.useRef)(null),b=(0,I.useRef)(null),x=(0,I.useMemo)(()=>{let e={...QK,...r};return r?.deviceId&&delete e.facingMode,e},[r]),S=(0,I.useMemo)(()=>({...ZK,...o}),[o]),C=s??S.tracker,[w,T]=(0,I.useState)(!1),[E,D]=(0,I.useState)(!1),[O,ee]=(0,I.useState)(x),te=GK({startTimeoutMs:g,settleDelayMs:_}),k=(0,I.useRef)(te),A=(0,I.useRef)(n),j=(0,I.useRef)(m),M=(0,I.useRef)(C);(0,I.useEffect)(()=>{k.current=te},[te]),(0,I.useEffect)(()=>{A.current=n},[n]),(0,I.useEffect)(()=>{j.current=m},[m]),(0,I.useEffect)(()=>{M.current=C},[C]);let ne=(0,I.useCallback)(e=>{A.current?.(e)},[]),re=(0,I.useCallback)(e=>{j.current?.(e)},[]),{startScanning:ie,stopScanning:ae}=XK({videoElementRef:v,onScan:ne,onFound:(0,I.useCallback)(e=>{Tq(e,v.current,b.current,M.current)},[]),onError:re,formats:i,retryDelay:p??(C===void 0?500:33),scanDelay:f,allowMultiple:d,sound:h});(0,I.useEffect)(()=>(T(!0),()=>{T(!1)}),[]),(0,I.useEffect)(()=>{aq(x,O)||ee(x)},[x,O]);let oe=(0,I.useMemo)(()=>({constraints:O,shouldStream:w&&!a}),[O,w,a]),N=(0,I.useCallback)(async()=>{let e=v.current,t=y.current;if(e===null||t===null)return;let n=t.getContext(`2d`);if(n!==null)try{oe.shouldStream?(await k.current.stopCamera(),D(!1),await k.current.startCamera(e,{constraints:oe.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))}},[oe]);(0,I.useEffect)(()=>{N()},[N]);let se=(0,I.useMemo)(()=>oe.shouldStream&&E,[oe.shouldStream,E]);(0,I.useEffect)(()=>(se&&(wq(y.current),wq(b.current),ie()),()=>{ae()}),[se,ie,ae]),(0,I.useImperativeHandle)(t,()=>({getVideoElement:()=>v.current,getStream:()=>k.current.getStream()}),[]);let ce=(0,I.useMemo)(()=>({...$K.container,...l?.container}),[l?.container]),P=(0,I.useMemo)(()=>({...$K.video,...l?.video,visibility:a?`hidden`:`visible`}),[l?.video,a]),le=(0,I.useMemo)(()=>({...Sq,display:a?`block`:`none`}),[a]);return(0,H.jsxs)(`div`,{style:ce,className:u?.container,children:[(0,H.jsx)(`video`,{ref:v,style:P,className:u?.video,autoPlay:!0,muted:!0,playsInline:!0}),(0,H.jsx)(`canvas`,{ref:y,style:le}),(0,H.jsx)(`canvas`,{ref:b,style:Cq}),(0,H.jsxs)(`div`,{style:xq,children:[S.finder&&(0,H.jsx)(bq,{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 N(),stopScanning:async()=>{try{await te.stopCamera(),wq(b.current),D(!1)}catch(e){j.current?.(JK(e))}}}),c]})]})}),Dq=(0,I.memo)(function(){let e=R(bI);return(0,I.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}),Oq=(0,I.memo)(function(){let[e,t]=(0,I.useState)(!1),n=R(bI),[r,i]=(0,I.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,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(ky,{open:e,onClose:()=>t(!1),children:[(0,H.jsx)(My,{children:`Scan a QR Code`}),(0,H.jsxs)(jy,{children:[(0,H.jsx)(J,{sx:{width:`15em`,height:`15em`},children:e?(0,H.jsx)(Eq,{onScan:a}):void 0}),(0,H.jsx)(J,{sx:{marginTop:`1em`},children:(0,H.jsx)(Hw,{label:`Manual Entry`,value:r,variant:`outlined`,fullWidth:!0,onKeyDown:e=>{e.key===`Enter`&&o()},onChange:e=>i(e.target.value)})})]}),(0,H.jsxs)(Ay,{children:[r===``?void 0:(0,H.jsx)(Y,{onClick:o,children:`Submit`}),(0,H.jsx)(Y,{onClick:()=>t(!1),children:`Cancel`})]})]}),(0,H.jsx)(X,{title:`Scan QR Code`,children:(0,H.jsx)(Gm,{onClick:()=>t(!0),size:`large`,children:(0,H.jsx)(cT,{})})})]})}),kq=P(null),Aq=(0,I.memo)(function(){let[e,t]=z(kq),[n,r]=(0,I.useState)(``),i=R(bI);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,H.jsxs)(ky,{open:e!==null,onClose:()=>t(null),maxWidth:`md`,children:[(0,H.jsxs)(My,{children:[`Scan a Barcode To Add To `,e]}),(0,H.jsxs)(jy,{children:[window.location.protocol===`https:`?(0,H.jsx)(J,{sx:{width:`15em`,height:`15em`},children:e===null?void 0:(0,H.jsx)(Eq,{onScan:a})}):void 0,(0,H.jsx)(J,{sx:{marginTop:`1em`},children:(0,H.jsx)(Hw,{label:`Manual Entry`,value:n,variant:`outlined`,fullWidth:!0,onKeyDown:e=>{e.key===`Enter`&&o()},onChange:e=>r(e.target.value)})})]}),(0,H.jsxs)(Ay,{children:[n===``?void 0:(0,H.jsx)(Y,{onClick:o,children:`Submit`}),(0,H.jsx)(Y,{onClick:()=>t(null),children:`Cancel`})]})]})});function jq(e,t,n,r){let i=Q.of(t).flatMap(([e,t])=>Q.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 Q.ofObject(r.jobs)){let n=Q.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:Q.of(t.decrements||[]).sumBy(e=>e.quantity),completedQty:Q.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=Q.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:Q.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=Q.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 Mq(e,t){let n=`<table>
|
|
316
|
+
<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>
|
|
317
|
+
<tbody>
|
|
318
|
+
`;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>
|
|
319
|
+
`;return n+=`</tbody>
|
|
320
|
+
</table>`,n}function Nq(e,t){oA(Mq(e,t))}var Pq=PO(`fmsinsight.hide-nonloading-loadstation`,!1);function Fq(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 Iq(e,t,n){let r=Q.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 Lq(e,t,n){let r=t?.workorder;return Q.of(t?.possibleCastingsByQueue?.[n]??[]).map(t=>({casting:t,message:r?Iq(e,r,t):null})).toSortedArray(e=>e.casting)}function Rq(e,t,n,r){return Q.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:Q.of(r).collect(e=>e.workorder).head()??null,machinedProcs:r.map(e=>({lastProc:e.lastCompletedProcess,details:i?.procsAndPaths[e.lastCompletedProcess].paths.map(Fq).join(` | `)??``}))}}).toSortedArray(e=>e.job?.partName??e.jobUnique)}function zq(e){let t=L(yO),n=L(GO),r=L(SI),i=L(bL);return(0,I.useMemo)(()=>r===null||e===null?{castings:[],jobs:[]}:{castings:i.has(e)?Lq(n,r,e):[],jobs:Rq(n,t,r,e)},[n,t,e,r,i])}function Bq(e,t){return t.jobUnique===e&&t.location.type===ot.InQueue&&t.action.type!==V.Loading&&t.action.type!==V.LoadingToBasket&&t.process===0}function Vq(e,t){return t.partName===e&&t.location.type===ot.InQueue&&t.action.type!==V.Loading&&t.action.type!==V.LoadingToBasket&&t.process===0&&!t.jobUnique}function Hq(e,t,n){return Q.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=Q.of(r).collect(e=>e.casting&&e.casting!==``?e.casting:void 0).head()??e.partName;return{job:e,startingTime:Q.of(r).map(e=>e.simulatedStartingUTC).minBy(e=>e),rawMatName:i,remainingToStart:e.remainingToStart??0,assignedRaw:Q.of(t).filter(t=>Bq(e.unique,t)).length(),availableUnassigned:Q.of(t).filter(e=>Vq(i,e)).length()}}).toSortedArray(e=>{let t=Q.of(e.job.precedence?.[0]??[]).minBy(e=>e);return!t||t<0?2**53-1:t})}function Uq(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=fO.empty(),r=new Map;for(let i of t.material)if(i.location.type===ot.InQueue&&i.location.currentQueue===e&&i.location.queuePosition!==void 0)if(i.serial&&i.serial!==``||i.action.type!==V.Waiting)n=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:Q.of(t.material).filter(t=>t.location.type===ot.InQueue&&t.location.currentQueue===e&&t.location.queuePosition!==void 0).toSortedArray(e=>e.location.queuePosition??0)});return i}async function Wq(e){let t=[];for(let n of Q.of(e).chunk(15))t.push(...await Ut.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===B.AddToQueue||r.type===B.RemoveFromQueue){let i=[...r.material];for(;e+1<t.length&&t[e+1].type===r.type&&vE(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 Gq(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,H.jsxs)(`div`,{children:[`Completed: `,t]})}function qq(e){let t=L(yr),n=e=>e.map(e=>Tk(e,t.loadStationNames)).join(`, `);return(0,H.jsx)(`div`,{children:(0,H.jsxs)(`dl`,{children:[(0,H.jsx)(`dt`,{children:`Job ID`}),(0,H.jsx)(`dd`,{children:e.job.unique}),(0,H.jsx)(`dt`,{children:`Time`}),(0,H.jsxs)(`dd`,{children:[Gq(e.job.routeStartUTC),` to `,Gq(e.job.routeEndUTC)]}),e.job.cycles?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`dt`,{children:`Quantity`}),(0,H.jsx)(`dd`,{children:e.job.cycles})]}):void 0,e.job.comment!==void 0&&e.job.comment!==``?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`dt`,{children:`Comment`}),(0,H.jsx)(`dd`,{children:e.job.comment})]}):void 0,e.job.assignedWorkorders&&e.job.assignedWorkorders.length>0?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`dt`,{children:`Workorders`}),(0,H.jsx)(`dd`,{children:e.job.assignedWorkorders.join(`, `)})]}):void 0,e.job.procsAndPaths.map((t,r)=>(0,H.jsx)(I.Fragment,{children:t.paths.map((i,a)=>(0,H.jsxs)(I.Fragment,{children:[(0,H.jsxs)(`dt`,{children:[`Process `,r+1,t.paths.length>1?`, Path `+(a+1).toString():void 0]}),(0,H.jsxs)(`dd`,{children:[(0,H.jsx)(Kq,{job:e.job,procIdx:r,pathIdx:a}),(0,H.jsxs)(`div`,{children:[`Estimated Start: `,Gq(i.simulatedStartingUTC)]}),(0,H.jsxs)(`div`,{children:[`Pallets: `,(i.palletNums??[]).map(e=>e.toString()).join(`,`)]}),i.fixture?(0,H.jsxs)(`div`,{children:[`Fixture: `,i.fixture,` `,i.face===void 0?void 0:`, Face: `+i.face.toString()]}):void 0,i.inputQueue?(0,H.jsxs)(`div`,{children:[`Input Queue: `,i.inputQueue]}):void 0,i.casting?(0,H.jsxs)(`div`,{children:[`Raw Material: `,i.casting]}):void 0,t.basketLoadStations&&t.basketLoadStations.length>0&&t.expectedBasketLoadTime?(0,H.jsxs)(`div`,{children:[`Basket Load Stations: `,n(t.basketLoadStations),` |`,` `,nk(t.expectedBasketLoadTime).toFixed(1),` mins`,i.partsPerPallet>1?` per piece`:``]}):void 0,(0,H.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,H.jsx)(I.Fragment,{children:(0,H.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,H.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,H.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,H.jsxs)(`div`,{children:[`Output Queue: `,i.outputQueue]}):void 0,i.inspections&&i.inspections.length>0?(0,H.jsxs)(`div`,{children:[`Inspections: `,i.inspections.map(e=>e.inspectionType).join(`,`)]}):void 0]})]},a))},r))]})})}function Jq(e){let t=Dk(L(yr).basketName);return e.inProcMat!==null&&e.inProcMat.location.type===ot.OnPallet?(0,H.jsxs)(`span`,{children:[`On pallet `,e.inProcMat.location.palletNum??``]}):e.inProcMat!==null&&e.inProcMat.location.type===ot.InQueue?(0,H.jsxs)(`span`,{children:[`In queue `,e.inProcMat.location.currentQueue??``]}):e.inProcMat!==null&&e.inProcMat.location.type===ot.InBasket?(0,H.jsxs)(`span`,{children:[`In `,t,` `,e.inProcMat.location.basketId??``]}):e.matSummary?.completed_last_proc_machining?(0,H.jsx)(`span`,{children:`Completed`}):e.matSummary!==null&&!e.matSummary.startedProcess1?(0,H.jsx)(`span`,{children:`Not yet started`}):(0,H.jsx)(`span`,{})}function Yq(e){let t=L(GO).material,n=R(bI),r=Q.of(e.matIdsForJob.get(e.unique)??sO.empty()).collect(t=>e.matsFromEvents.get(t)).toRArray();if(r===null||r.length===0)return(0,H.jsx)(`div`,{});let i=Q.of(t).toHashMap(e=>[e.materialID,e],(e,t)=>e),a=Q.of(r).some(e=>e.workorderId!==void 0&&e.workorderId!==``&&e.workorderId!==e.serial);return(0,H.jsx)(`div`,{children:(0,H.jsxs)(AC,{size:`small`,style:{width:e.fullWidth?`100%`:`auto`},children:[(0,H.jsx)($C,{children:(0,H.jsxs)(dw,{children:[a?(0,H.jsx)(Z,{children:`Workorder`}):void 0,(0,H.jsx)(Z,{children:`Serial`}),(0,H.jsx)(Z,{children:`Status`}),(0,H.jsx)(Z,{padding:`checkbox`})]})}),(0,H.jsx)(LC,{children:r.map(t=>(0,H.jsxs)(dw,{children:[a?(0,H.jsx)(Z,{children:t.workorderId??``}):void 0,(0,H.jsx)(Z,{children:t.serial??``}),(0,H.jsx)(Z,{children:(0,H.jsx)(Jq,{matSummary:e.matsFromEvents.get(t.materialID)??null,inProcMat:i.get(t.materialID)??null})}),(0,H.jsx)(Z,{padding:`checkbox`,children:(0,H.jsx)(Gm,{onClick:()=>n({type:`MatSummary`,summary:t}),size:`large`,children:(0,H.jsx)(zT,{fontSize:`inherit`})})})]},t.materialID))})]})})}function Xq(e){let t=L(UR),n=L(e.checkAnalysisMonth&&t.type===`SpecificMonth`?dL:lL);return(0,H.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-evenly`},children:e.job===null?void 0:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(qq,{job:e.job}),(0,H.jsx)(Yq,{unique:e.job.unique,fullWidth:!1,matsFromEvents:n.matsById,matIdsForJob:n.matIdsForJob})]})})}function Zq(e){return typeof e==`object`&&!!e&&`mat`in e}function Qq(e){return typeof e==`number`?e:null}var $q=(0,I.memo)(function(e){let[t,n]=(0,I.useState)(void 0),[r]=LI(),i=R(QO),a=L(UO),o=(0,I.useMemo)(()=>e.matIds.slice(),[e.matIds]);return(0,H.jsx)(NH,{sensors:jB(AB(IV),AB(jV,{coordinateGetter:EU})),collisionDetection:BB,onDragStart:({active:e})=>n(Zq(e.data.current)?e.data.current.mat:void 0),onDragCancel:()=>n(void 0),onDragEnd:({active:t,over:o})=>{let s=Qq(t.id),c=o?Qq(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,H.jsxs)(mU,{items:o,strategy:e.direction===`vertical`?uU:cU,children:[e.children,(0,H.jsx)($H,{children:t===void 0?void 0:e.renderDragOverlay(t)})]})})}),eJ=`printWindow`;function tJ(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=eJ,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 nJ({level:e=`error`,messages:t,suppressErrors:n=!1}){n||(e===`error`?console.error(t):e===`warning`?console.warn(t):console.debug(t))}function rJ(e,t){if(t||!e){let e=document.getElementById(eJ);e&&document.body.removeChild(e)}}function iJ(e){return e instanceof Error?e:Error(`Unknown Error`)}function aJ(e,t){let{documentTitle:n,onAfterPrint:r,onPrintError:i,preserveAfterPrint:a,print:o,suppressErrors:s}=t;setTimeout(()=>{if(e.contentWindow){let t=function(){r?.(),rJ(a)};if(e.contentWindow.focus(),o)o(e).then(t).catch(e=>{i?i(`print`,iJ(e)):nJ({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 nJ({messages:["Printing for this browser is not currently possible: the browser does not have a `print` method available for iframes."],suppressErrors:s});oJ()?setTimeout(t,500):t()}}else nJ({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 oJ(){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 sJ(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 cJ(e,t,n){let r=sJ(e),i=sJ(t);if(r.length!==i.length){nJ({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,cJ(o,e,n)}}}var lJ=`
|
|
321
|
+
@page {
|
|
322
|
+
/* Remove browser default header (title) and footer (url) */
|
|
323
|
+
margin: 0;
|
|
324
|
+
}
|
|
325
|
+
@media print {
|
|
326
|
+
body {
|
|
327
|
+
/* Tell browsers to print background colors */
|
|
328
|
+
color-adjust: exact; /* Firefox. This is an older version of "print-color-adjust" */
|
|
329
|
+
print-color-adjust: exact; /* Firefox/Safari */
|
|
330
|
+
-webkit-print-color-adjust: exact; /* Chrome/Safari/Edge/Opera */
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
`;function uJ(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)){nJ({level:`debug`,messages:[`Tried to mark a resource that has already been handled`,t],suppressErrors:m});return}r?(nJ({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&&aJ(e,n)}e.onload=null;let y=e.contentDocument??e.contentWindow?.document;if(y){let t=y.body.appendChild(i);h&&cJ(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:`,iJ(e)])})}):(u.forEach(e=>{v(e)}),nJ({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??lJ,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){nJ({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
|
|
334
|
+
`)}catch(e){nJ({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: ${iJ(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`))nJ({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 nJ({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&&aJ(e,n)}function dJ(e,t,n){e.onload=()=>{uJ(e,t,n)},document.body.appendChild(e)}function fJ({contentRef:e,optionalContent:t,suppressErrors:n}){if(t&&typeof t==`function`)return e&&nJ({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;nJ({messages:['"react-to-print" did not receive a `contentRef` option or a optional-content param pass to its callback.'],suppressErrors:n})}function pJ(e,t){let{contentRef:n,fonts:r,ignoreGlobalStyles:i,suppressErrors:a}=t,o=fJ({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 mJ({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,I.useCallback)(h=>{rJ(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=tJ(p),_=pJ(h,c);if(!_){nJ({messages:[`There is nothing to print`],suppressErrors:m});return}dJ(g,_,c)}c?c().then(()=>{g()}).catch(e=>{l?.(`onBeforePrint`,iJ(e))}):g()},[e,t,n,r,i,a,o,s,c,l,u,d,p,f,m])}var hJ=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}})),gJ=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(hJ());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})),_J=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]})),vJ=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(hJ()),r=_J();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)})),yJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=_J(),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})}})),bJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=r(vJ()),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)}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)})),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}}(),n=i(vJ()),r=_J();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)})),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=i(vJ()),r=_J();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)})),CJ=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(vJ()),r=_J();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)})),wJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CODE128C=e.CODE128B=e.CODE128A=e.CODE128=void 0;var t=a(bJ()),n=a(xJ()),r=a(SJ()),i=a(CJ());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})),TJ=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`]})),EJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=TJ();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(``)}})),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=TJ(),r=a(EJ()),i=a(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)}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)})),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=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=TJ(),i=a(DJ());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)})),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}}(),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(DJ());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)})),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=TJ(),r=a(EJ()),i=a(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=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)})),jJ=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=TJ(),r=a(EJ()),i=a(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)}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)})),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}}();e.checksum=l;var n=i(EJ()),r=i(hJ());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})),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=a(EJ()),r=a(hJ()),i=MJ();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})),PJ=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(OJ()),n=s(kJ()),r=s(AJ()),i=s(jJ()),a=s(MJ()),o=s(NJ());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})),FJ=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`]})),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=FJ(),r=i(hJ());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)})),LJ=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(IJ());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)})),RJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ITF14=e.ITF=void 0;var t=r(IJ()),n=r(LJ());function r(e){return e&&e.__esModule?e:{default:e}}e.ITF=t.default,e.ITF14=n.default})),zJ=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(hJ());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})),BJ=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}})),VJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=r(zJ()),n=BJ();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)})),HJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=r(zJ()),n=BJ();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)})),UJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=r(zJ()),n=BJ();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)})),WJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=r(zJ()),n=BJ();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)})),GJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MSI1110=e.MSI1010=e.MSI11=e.MSI10=e.MSI=void 0;var t=o(zJ()),n=o(VJ()),r=o(HJ()),i=o(UJ()),a=o(WJ());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(hJ());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)})),qJ=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(hJ());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`]}})),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=JJ(),r=i(hJ());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)})),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}}(),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)}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)})),ZJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CODE93FullASCII=e.CODE93=void 0;var t=r(YJ()),n=r(XJ());function r(e){return e&&e.__esModule?e:{default:e}}e.CODE93=t.default,e.CODE93FullASCII=n.default})),QJ=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(hJ());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)})),$J=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=gJ(),n=wJ(),r=PJ(),i=RJ(),a=GJ(),o=KJ(),s=qJ(),c=ZJ(),l=QJ();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}})),eY=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)}})),tY=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}})),nY=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}})),rY=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}})),iY=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(){}}})),aY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=r(rY()),n=r(iY());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})),oY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getTotalWidthOfEncodings=e.calculateEncodingAttributes=e.getBarcodePadding=e.getEncodingHeight=e.getMaximumHeightOfEncodings=void 0;var t=n(eY());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})),sY=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(eY()),r=oY();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}()})),cY=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(eY()),r=oY();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}()})),lY=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}()})),uY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=i(sY()),n=i(cY()),r=i(lY());function i(e){return e&&e.__esModule?e:{default:e}}e.default={CanvasRenderer:t.default,SVGRenderer:n.default,ObjectRenderer:r.default}})),dY=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})),fY=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(aY()),r=a(uY()),i=dY();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})),pY=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}()})),mY=l(o(((e,t)=>{var n=d($J()),r=d(eY()),i=d(tY()),a=d(nY()),o=d(fY()),s=d(rY()),c=d(pY()),l=dY(),u=d(iY());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 hY(e){let t=(0,I.useRef)(null),n=(0,I.useCallback)(n=>{n&&(0,mY.default)(n,e.text,{format:`CODE128`}),t.current=n},[e.text]);return(0,I.useEffect)(()=>{t.current&&(0,mY.default)(t.current,e.text,{format:`CODE128`,fontSize:30})},[e.text]),(0,H.jsx)(`svg`,{ref:n})}function gY(e){return(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{marginTop:`4em`,display:`flex`,justifyContent:`center`},children:(0,H.jsx)(`h2`,{children:`SeedTactic: FMS Insight`})}),(0,H.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`},children:(0,H.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,H.jsxs)(`div`,{style:{marginTop:`2em`,display:`flex`,justifyContent:`space-around`},children:[(0,H.jsx)(hY,{text:e.materialName??e.partName}),e.count>=2?(0,H.jsx)(hY,{text:e.count.toString()}):void 0]}),e.serial1&&e.serial1!==``?(0,H.jsxs)(`div`,{style:{marginTop:`2em`,display:`flex`,justifyContent:`space-around`},children:[(0,H.jsx)(hY,{text:e.serial1}),e.serial2&&e.serial2!==``?(0,H.jsx)(hY,{text:e.serial2||``}):void 0]}):void 0,(0,H.jsx)(`div`,{style:{marginTop:`2em`,marginLeft:`4em`,marginRight:`4em`,marginBottom:`9em`},children:e.uniq===null||e.uniq===``?(0,H.jsx)(`p`,{style:{fontSize:`x-large`},children:`Not currently assigned to any jobs`}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`p`,{style:{fontSize:`x-large`},children:`Assigned To`}),(0,H.jsxs)(`div`,{style:{marginTop:`1em`,marginLeft:`2em`,display:`flex`,alignItems:`center`},children:[(0,H.jsx)(hY,{text:e.partName}),(0,H.jsxs)(`h3`,{style:{marginLeft:`4em`},children:[`assigned to `,e.uniq,e.jobCycles&&e.jobCycles>0?` (`+e.jobCycles.toString()+` scheduled)`:``]})]})]})}),e.note?(0,H.jsx)(`div`,{style:{marginBottom:`2em`},children:(0,H.jsx)(`p`,{style:{fontSize:`xxx-large`,textAlign:`center`},children:e.note})}):void 0,(0,H.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`},children:e.operator?(0,H.jsx)(`p`,{style:{fontSize:`x-large`},children:e.operator}):void 0})]})}function _Y(e){let t=L(GO).jobs,n=(0,I.useMemo)(()=>Q.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,H.jsx)(`div`,{}):n.length===0?(0,H.jsx)(gY,{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,H.jsx)(`div`,{children:n.map(([t,r],i)=>(0,H.jsxs)(I.Fragment,{children:[(0,H.jsx)(gY,{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,H.jsx)(`div`,{style:{pageBreakAfter:`always`}}):void 0]},i))})}function vY(e){let t=(0,I.useMemo)(()=>Q.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=L(GO).jobs,r=(0,I.useMemo)(()=>Q.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,H.jsx)(`div`,{}):(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{marginTop:`4em`,display:`flex`,justifyContent:`center`},children:(0,H.jsx)(`h2`,{children:`SeedTactic: FMS Insight`})}),(0,H.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`},children:(0,H.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,H.jsxs)(`div`,{style:{marginTop:`2em`,display:`flex`,justifyContent:`space-around`},children:[(0,H.jsx)(hY,{text:e.materialName??e.material[0].partName}),e.material.length>=2?(0,H.jsx)(hY,{text:e.material.length.toString()}):void 0]}),e.material[0].serial&&e.material[0].serial!==``?(0,H.jsxs)(`div`,{style:{marginTop:`2em`,display:`flex`,justifyContent:`space-around`},children:[(0,H.jsx)(hY,{text:e.material[0].serial}),e.material.length>=2&&e.material[e.material.length-1].serial&&e.material[e.material.length-1].serial!==``?(0,H.jsx)(hY,{text:e.material[e.material.length-1].serial||``}):void 0]}):void 0,(0,H.jsx)(`div`,{style:{marginTop:`2em`,marginLeft:`4em`,marginRight:`4em`,marginBottom:`9em`},children:t.length===0?(0,H.jsx)(`p`,{style:{fontSize:`x-large`},children:`Not currently assigned to any jobs`}):e.materialName?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`p`,{style:{fontSize:`x-large`},children:`Assigned To`}),t.map(([e,t],n)=>(0,H.jsxs)(`div`,{style:{marginTop:`1em`,marginLeft:`2em`,display:`flex`,alignItems:`center`},children:[(0,H.jsx)(hY,{text:t.part}),(0,H.jsxs)(`h3`,{style:{marginLeft:`4em`},children:[`x`,t.length]}),(0,H.jsxs)(`h3`,{style:{marginLeft:`4em`},children:[`assigned to `,e]})]},n))]}):t.length===1?(0,H.jsx)(`div`,{style:{marginTop:`1em`,display:`flex`,justifyContent:`space-around`},children:(0,H.jsxs)(`p`,{style:{fontSize:`x-large`},children:[(0,H.jsxs)(`span`,{children:[`Assigned to `,t[0][0]]}),t[0][1].length>1?(0,H.jsxs)(`span`,{style:{marginLeft:`1em`},children:[`x`,t[0][1].length]}):void 0]})}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`p`,{style:{fontSize:`x-large`},children:`Assigned To`}),t.map(([e,t],n)=>(0,H.jsxs)(`h3`,{style:{marginTop:`1em`,marginLeft:`2em`},children:[(0,H.jsx)(`span`,{children:e}),t.length>1?(0,H.jsxs)(`span`,{style:{marginLeft:`1em`},children:[`x`,t.length]}):void 0]},n))]})}),r.length>0?(0,H.jsx)(`div`,{style:{marginBottom:`2em`},children:r.map((e,t)=>(0,H.jsx)(`p`,{style:{fontSize:`xxx-large`,textAlign:`center`},children:e},t))}):void 0,(0,H.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`},children:e.operator?(0,H.jsx)(`p`,{style:{fontSize:`x-large`},children:e.operator}):void 0})]})}function yY(e){return e.oneJobPerPage?(0,H.jsx)(_Y,{...e}):(0,H.jsx)(vY,{...e})}function bY({mat:e,materialName:t,operator:n}){let r=(0,I.useRef)(null),i=mJ({contentRef:r,ignoreGlobalStyles:!0});return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Y,{color:`primary`,onClick:()=>i(),children:`Print Label`}),(0,H.jsx)(`div`,{style:{display:`none`},children:(0,H.jsx)(`div`,{ref:r,children:(0,H.jsx)(yY,{materialName:t,material:Array.isArray(e)?e:[e],oneJobPerPage:!1,operator:n})})})]})}function xY(){let e=L(yr),t=L(CI),n=L(EI),[r,i,a]=II();return!e.usingLabelPrinterForSerials||t===null||t.materialID<0?null:e.useClientPrinterForLabels?n===null?null:(0,H.jsx)(bY,{mat:n}):(0,H.jsx)(Y,{color:`primary`,disabled:i||a,onClick:()=>r({materialId:t.materialID,proc:n?.process??0}),children:a?`Printed`:`Print Label`})}var SY=P(null),CY=P(null);function wY(){let[e,t]=z(CY),n=L(GO),r=(0,I.useRef)(null),i=(0,I.useRef)(!1),a=mJ({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,I.useEffect)(()=>{if(e===null){i.current&&=!1;return}i.current||o===null||(a(),i.current=!0)},[e,o,i,a]),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(ky,{open:e!==null,children:[(0,H.jsx)(My,{children:`Waiting for Material Assignment`}),(0,H.jsx)(jy,{children:o===null?e===null?(0,H.jsx)(`div`,{}):(0,H.jsxs)(MS,{direction:`column`,spacing:2,sx:{mt:`0.5em`,mb:`0.5em`},children:[(0,H.jsx)(zm,{color:`secondary`}),(0,H.jsx)(`div`,{children:`Waiting for material assignment. This could take a while if a download is currently in progress.`})]}):(0,H.jsx)(`div`,{children:`Printing...`})}),(0,H.jsx)(Ay,{children:(0,H.jsx)(Y,{color:`primary`,onClick:()=>t(null),children:`Cancel`})})]}),(0,H.jsx)(`div`,{style:{display:`none`},children:(0,H.jsx)(`div`,{ref:r,children:(0,H.jsx)(yY,{materialName:e?.selectedCasting,material:o,operator:e?.operator,oneJobPerPage:!0})})})]})}function TY({casting:e,queue:t}){let n=L(GO),r=(0,I.useMemo)(()=>Hq(n.jobs,n.material,t).filter(t=>t.rawMatName===e),[n.jobs,n.material,e,t]);return r.length===0?null:(0,H.jsxs)(AC,{size:`small`,children:[(0,H.jsx)($C,{children:(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{children:`Job`}),(0,H.jsx)(Z,{align:`right`,children:`Plan`}),(0,H.jsx)(Z,{align:`right`,children:`Remaining`}),(0,H.jsx)(Z,{align:`right`,children:`Assigned`}),(0,H.jsx)(Z,{align:`right`,children:`Required`}),(0,H.jsx)(Z,{align:`right`,children:`Available`})]})}),(0,H.jsxs)(LC,{children:[r.map((e,t)=>(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{children:e.job.unique}),(0,H.jsx)(Z,{align:`right`,children:e.job.cycles}),(0,H.jsx)(Z,{align:`right`,children:e.remainingToStart}),(0,H.jsx)(Z,{align:`right`,children:e.assignedRaw}),(0,H.jsx)(Z,{align:`right`,children:Math.max(e.remainingToStart-e.assignedRaw,0)}),(0,H.jsx)(Z,{align:`right`,children:e.availableUnassigned})]},t)),r.length>=2?(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{children:`Total`}),(0,H.jsx)(Z,{align:`right`,children:Q.of(r).sumBy(e=>e.job.cycles)}),(0,H.jsx)(Z,{align:`right`,children:Q.of(r).sumBy(e=>e.remainingToStart)}),(0,H.jsx)(Z,{align:`right`,children:Q.of(r).sumBy(e=>e.assignedRaw)}),(0,H.jsx)(Z,{align:`right`,children:Q.of(r).sumBy(e=>Math.max(e.remainingToStart-e.assignedRaw,0))}),(0,H.jsx)(Z,{align:`right`,children:Q.of(r).sumBy(e=>e.availableUnassigned)})]}):void 0]})]})}var EY=(0,I.memo)(function(){let[e,t]=z(SY),n=L(UO),r=L(yr),i=r.usingLabelPrinterForSerials&&r.useClientPrinterForLabels,[a]=RI(),o=R(CY),[s,c]=(0,I.useState)(null),[l,u]=(0,I.useState)(null),[d,f]=(0,I.useState)(null),[p,m]=(0,I.useState)(!1),h=L(GO),g=L(wL),_=(0,I.useMemo)(()=>Q.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(Q.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,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(ky,{open:e!==null,onClose:()=>v(),maxWidth:`md`,children:[(0,H.jsx)(My,{children:`Add Raw Material`}),(0,H.jsx)(jy,{children:(0,H.jsxs)(MS,{direction:`column`,spacing:2,sx:{mt:`0.5em`},children:[(0,H.jsx)(Hw,{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,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(`div`,{style:{marginRight:`0.5em`},children:(0,H.jsx)(LU,{part:s,size:25})}),(0,H.jsx)(`div`,{children:s})]})}},children:_.map(([e,t],n)=>(0,H.jsxs)(wx,{value:e,children:[(0,H.jsx)(bb,{children:(0,H.jsx)(LU,{part:e})}),(0,H.jsx)(Tb,{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,H.jsx)(Hw,{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,H.jsx)(Hw,{fullWidth:!0,label:`Operator`,value:d||``,onChange:e=>f(e.target.value)}):void 0,s!==null&&e!==null?(0,H.jsx)(TY,{casting:s,queue:e}):void 0]})}),(0,H.jsxs)(Ay,{children:[i?(0,H.jsxs)(Y,{color:`primary`,disabled:p||s===null||l===null||isNaN(l)||r.requireOperatorNamePromptWhenAddingMaterial&&(d===null||d===``),onClick:b,children:[p?(0,H.jsx)(zm,{size:10}):void 0,`Add `,l!==null&&!isNaN(l)?l.toString()+` `:``,`to`,` `,e]}):(0,H.jsxs)(Y,{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,H.jsx)(Y,{color:`primary`,disabled:p&&i,onClick:v,children:`Cancel`})]})]}),(0,H.jsx)(wY,{})]})}),DY=(0,I.memo)(function(e){let t=L(yr),n=L(GO).jobs,[r,i]=II(),[a,o]=(0,I.useState)(!1),[s,c]=(0,I.useState)([]),[l,u]=(0,I.useState)(!1),[d,f]=(0,I.useState)(NaN),[p,m]=(0,I.useState)(void 0);(0,I.useEffect)(()=>{if(e.material===null)return;let t=!0;return o(!0),Wq(e.material).then(e=>{if(t){c(e);let t;for(let n of e)n.type===B.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,I.useMemo)(()=>{if(!e.material||e.material.length===0)return;let t=e.material[0].jobUnique;if(!(!t||t===``||!n[t]))return Q.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),Ht.bulkRemoveMaterialFromQueues(e.operator,Q.of(e.material||[]).take(d).map(e=>e.materialID).toRArray()).catch(console.error).finally(g)):u(!0)}let v=e.material?.[0];return(0,H.jsxs)(ky,{open:e.material!==null,onClose:g,maxWidth:`md`,children:[(0,H.jsx)(My,{children:v&&e.material&&e.material.length>0?(0,H.jsx)(nW,{partName:v.partName,subtitle:e.material.length.toString()+(v.jobUnique&&v.jobUnique!==``?` assigned to `+v.jobUnique:` unassigned`)}):`Material`}),(0,H.jsxs)(jy,{children:[a?(0,H.jsx)(zm,{color:`secondary`}):(0,H.jsx)(vI,{entries:s,copyToClipboard:!0}),l&&e.material?(0,H.jsx)(`div`,{style:{marginTop:`1em`},children:(0,H.jsx)(Hw,{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,H.jsxs)(Ay,{children:[e.material&&e.material.length>0&&t.usingLabelPrinterForSerials?t.useClientPrinterForLabels?(0,H.jsx)(bY,{mat:e.material||[],materialName:h,operator:p}):(0,H.jsx)(Y,{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,H.jsx)(Y,{color:`primary`,onClick:_,disabled:a||l&&isNaN(d),children:a&&l?`Removing...`:l&&!isNaN(d)?`Remove ${d} material`:`Remove Material`}),(0,H.jsx)(Y,{color:`primary`,onClick:g,children:`Close`})]})]})}),OY=(0,I.memo)(function(){let[e,t]=(0,I.useState)(null),[n,r]=(0,I.useState)(!1),i=R(bI);function a(){r(!1),t(null)}function o(){e&&e!==``&&(i({type:`ManuallyEnteredSerial`,serial:e}),a())}return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(X,{title:`Enter Serial`,children:(0,H.jsx)(Gm,{onClick:()=>r(!0),size:`large`,children:(0,H.jsx)(UT,{})})}),(0,H.jsxs)(ky,{open:n,onClose:a,maxWidth:`md`,children:[(0,H.jsx)(My,{children:`Enter a part's serial`}),(0,H.jsx)(jy,{children:(0,H.jsx)(`div`,{style:{minWidth:`20em`},children:(0,H.jsx)(Hw,{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,H.jsxs)(Ay,{children:[(0,H.jsx)(Y,{onClick:o,disabled:e===null||e===``,color:`secondary`,children:`Open`}),(0,H.jsx)(Y,{onClick:a,color:`secondary`,children:`Cancel`})]})]})]})}),kY=P(null),AY=(0,I.memo)(function(){let[e,t]=z(kY),n=R(bI),[r,i]=(0,I.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,H.jsxs)(ky,{open:e!==null,onClose:o,maxWidth:`md`,children:[(0,H.jsxs)(My,{children:[`Lookup Material To Add To `,e]}),(0,H.jsx)(jy,{children:(0,H.jsx)(Hw,{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,H.jsxs)(Ay,{children:[(0,H.jsx)(Y,{onClick:a,color:`secondary`,children:`Lookup Serial`}),(0,H.jsx)(Y,{onClick:o,color:`primary`,children:`Cancel`})]})]})});function jY(e){let t=L(CI),n=L(EI),r=L(SI);return!(n!==null&&n.location.type===ot.InQueue&&n.location.currentQueue&&e.includes(n.location.currentQueue)||n?.location.type===ot.OnPallet||n?.action.type===V.Loading||n?.action.type===V.LoadingToBasket||t===null&&!r)}var MY=G(CT,{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 NY({newMaterialTy:e,setNewMaterialTy:t,castings:n,indent:r}){return(0,H.jsx)(sb,{sx:r?e=>({pl:e.spacing(4)}):void 0,children:n.map(n=>(0,H.jsx)(hb,{children:(0,H.jsxs)(cb,{selected:e?.kind===`RawMat`&&e?.rawMatName===n.casting,onClick:()=>t({kind:`RawMat`,rawMatName:n.casting}),children:[(0,H.jsx)(bb,{children:(0,H.jsx)(LU,{part:n.casting})}),(0,H.jsx)(Tb,{primary:n.casting,secondary:n.message??void 0,slotProps:{primary:{variant:`h4`}}})]})},n.casting))})}function PY({newMaterialTy:e,setNewMaterialTy:t,curCollapse:n,setCurCollapse:r,indent:i,jobs:a}){return(0,H.jsx)(sb,{sx:i?e=>({pl:e.spacing(4)}):void 0,children:a.map((a,o)=>a.machinedProcs.length===1?(0,H.jsx)(`div`,{children:(0,H.jsx)(hb,{children:(0,H.jsxs)(cb,{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,H.jsx)(bb,{children:(0,H.jsx)(LU,{part:a.job.partName})}):void 0,(0,H.jsx)(Tb,{primary:(a.job?.partName??``)+` (`+a.jobUnique+`)`,slotProps:{primary:{variant:`h4`}},secondary:(0,H.jsxs)(q,{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,H.jsxs)(I.Fragment,{children:[(0,H.jsx)(hb,{children:(0,H.jsxs)(cb,{onClick:()=>{e&&t(null),r(n&&n.kind===`Job`&&n.unique===a.jobUnique?null:{kind:`Job`,unique:a.jobUnique})},children:[(0,H.jsx)(bb,{children:(0,H.jsx)(MY,{$expandedOpen:n!==null&&n.kind===`Job`&&n.unique===a.jobUnique})}),a.job?(0,H.jsx)(bb,{children:(0,H.jsx)(LU,{part:a.job.partName})}):void 0,(0,H.jsx)(Tb,{primary:(a.job?.partName??``)+` (`+a.jobUnique+`)`,slotProps:{primary:{variant:`h4`}},secondary:a.job?.routeStartUTC.toLocaleDateString()})]})}),(0,H.jsx)(Rp,{in:n!==null&&n.kind===`Job`&&n.unique===a.jobUnique,timeout:`auto`,children:a.machinedProcs.map((n,r)=>(0,H.jsx)(`div`,{children:(0,H.jsx)(hb,{sx:e=>({pl:e.spacing(i?8:4)}),children:(0,H.jsx)(cb,{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,H.jsx)(Tb,{primary:n.lastProc===0?`Raw Material`:`Last machined process `+n.lastProc.toString(),secondary:n.details})})})},r))})]},o))})}function FY({newMaterialTy:e,options:t,setNewMaterialTy:n,curCollapse:r,setCurCollapse:i}){return(0,H.jsxs)(sb,{children:[(0,H.jsx)(hb,{children:(0,H.jsxs)(cb,{onClick:()=>{e&&n(null),i(r&&r.kind===`RawMat`?null:{kind:`RawMat`})},children:[(0,H.jsx)(bb,{children:(0,H.jsx)(MY,{$expandedOpen:r!==null&&r.kind===`RawMat`})}),(0,H.jsx)(Tb,{primary:`Raw Material`})]})}),(0,H.jsx)(Rp,{in:r!==null&&r.kind===`RawMat`,timeout:`auto`,children:(0,H.jsx)(NY,{castings:t.castings,newMaterialTy:e,setNewMaterialTy:n,indent:!0})}),(0,H.jsx)(hb,{children:(0,H.jsxs)(cb,{onClick:()=>{e&&n(null),i(r&&(r.kind===`AllJobs`||r.kind===`Job`)?null:{kind:`AllJobs`})},children:[(0,H.jsx)(bb,{children:(0,H.jsx)(MY,{$expandedOpen:r!==null&&(r.kind===`AllJobs`||r.kind===`Job`)})}),(0,H.jsx)(Tb,{primary:`Specify Job`})]})}),(0,H.jsx)(Rp,{in:r!==null&&(r.kind===`AllJobs`||r.kind===`Job`),timeout:`auto`,children:(0,H.jsx)(PY,{newMaterialTy:e,jobs:t.jobs,setNewMaterialTy:n,curCollapse:r,setCurCollapse:i,indent:!0})})]})}function IY({newMaterialTy:e,setNewMaterialTy:t,toQueue:n}){let r=L(DI),i=L(CI),[a,o]=(0,I.useState)(null),s=zq(n);return i||r===null||n===null?null:s.castings.length===0&&s.jobs.length===0?(0,H.jsxs)(`div`,{children:[`No jobs are currently scheduled for `,n]}):s.jobs.length===0?(0,H.jsx)(NY,{newMaterialTy:e,setNewMaterialTy:t,castings:s.castings}):s.castings.length===0?(0,H.jsx)(PY,{jobs:s.jobs,newMaterialTy:e,setNewMaterialTy:t,curCollapse:a,setCurCollapse:o}):(0,H.jsx)(FY,{options:s,newMaterialTy:e,setNewMaterialTy:t,curCollapse:a,setCurCollapse:o})}function LY({selectedQueue:e,setSelectedQueue:t,queueNames:n}){let r=(0,I.useRef)(null);return(0,I.useEffect)(()=>{r.current?.scrollIntoView({behavior:`smooth`,block:`end`})},[r]),(0,H.jsxs)(`div`,{ref:r,children:[(0,H.jsx)(`p`,{children:`Select a queue`}),(0,H.jsx)(sb,{children:n.map((n,r)=>(0,H.jsx)(cb,{selected:n===e,onClick:()=>t(n),children:n},r))})]})}function RY({enteredOperator:e,setEnteredOperator:t}){return L(yr).requireOperatorNamePromptWhenAddingMaterial?(0,H.jsx)(`div`,{style:{marginLeft:`1em`},children:(0,H.jsx)(Hw,{fullWidth:!0,label:`Operator`,value:e||``,required:!0,onChange:e=>t(e.target.value)})}):null}function zY({st:e,queueNames:t,setState:n}){return jY(t)?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(YU,{}),t.length>1?(0,H.jsx)(LY,{selectedQueue:e.toQueue,setSelectedQueue:t=>{n({toQueue:t,newMaterialTy:null,enteredOperator:e.enteredOperator})},queueNames:t}):void 0,(0,H.jsx)(IY,{newMaterialTy:e.newMaterialTy,toQueue:t.length>1?e.toQueue:t[0]??null,setNewMaterialTy:t=>n({...e,newMaterialTy:t})}),(0,H.jsx)(RY,{enteredOperator:e.enteredOperator,setEnteredOperator:t=>n({...e,enteredOperator:t})})]}):null}function BY({st:{enteredOperator:e,newMaterialTy:t,toQueue:n},queueNames:r,onClose:i}){let a=L(yr),o=L(UO),s=R(bI),c=L(DI),l=L(OI),u=L(CI),d=L(EI),f=L(jI),[p,m]=LI(),[h,g]=Aie(),[_,v]=RI();if(!jY(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,H.jsx)(H.Fragment,{children:(0,H.jsx)(X,{title:n===null?`Select a queue to add the material to`:a.requireOperatorNamePromptWhenAddingMaterial&&(e===null||e===``)?`Please enter an operator name`:``,children:(0,H.jsx)(`span`,{children:(0,H.jsx)(Y,{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,H.jsxs)(`span`,{children:[x===null?`Add To`:`Move From ${x} To`,` `,n,b,y]})})})})})}function VY(e){let t=L(yr),[n,r]=Oie(),[i,a]=kie(),o=L(EI),s=L(GO),c=L(UO);if(e&&(c=null),o===null||o.materialID<0)return null;let l=t.quarantineQueue?.length?t.quarantineQueue:null,u=Q.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(Q.ofObject(s.queues).filter(([,e])=>e.role===lt.RawMaterial||e.role===lt.InProcessTransfer).map(([e,t])=>e)).toRSet(e=>e),d=Q.ofObject(s.queues).filter(([e,t])=>!u.has(e)).toRSet(([e,t])=>e),f=Q.ofObject(s.pallets).toOrderedMap(([e,t])=>[t.palletNum,t.currentPalletLocation]);if(o.location.type===ot.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 ot.OnPallet:if(t.allowQuarantineToCancelLoad){let e=o.location.palletNum&&f.get(o.location.palletNum)?.loc===rt.LoadUnload;p=o.action.type===V.Loading||e?`CancelLoad`:`SignalForScrap`}else{if(o.action.type===V.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 ot.InQueue:if((o.action.type===V.Loading||o.action.type===V.LoadingToBasket)&&!t.allowQuarantineToCancelLoad)return null;p=o.action.type===V.Loading||o.action.type===V.LoadingToBasket?`CancelLoad`:`Scrap`;break;case ot.InBasket:if(o.action.type===V.Loading&&!t.allowQuarantineToCancelLoad)return null;p=o.action.type===V.Loading?`CancelLoad`:`Scrap`;break;case ot.Free:p=`Scrap`;break}return p?{type:p,quarantine:e=>i(o.materialID,c,e),removing:a,quarantineQueueDestination:l}:null}function HY({onClose:e,ignoreOperator:t}){let[n,r]=(0,I.useState)(!1),[i,a]=(0,I.useState)(``),o=VY(!!t),s=R(bI);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,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(X,{title:c,children:(0,H.jsx)(Y,{color:`primary`,disabled:o.removing,onClick:()=>r(!0),children:l})}),(0,H.jsxs)(ky,{open:n,onClose:()=>r(!1),children:[(0,H.jsx)(My,{children:`Quarantine Material`}),(0,H.jsxs)(jy,{children:[(0,H.jsx)(`p`,{children:c}),(0,H.jsx)(Hw,{label:`Reason`,value:i,onChange:e=>a(e.target.value),fullWidth:!0,autoFocus:!0,multiline:!0})]}),(0,H.jsxs)(Ay,{children:[(0,H.jsx)(Y,{color:`primary`,onClick:u,children:l}),(0,H.jsx)(Y,{color:`secondary`,onClick:()=>r(!1),children:`Cancel`})]})]})]})}function UY(e){let t=L(jI),n=L(SI),r=L(GO),i=L(yO),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,H.jsx)(Hw,{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,H.jsx)(y_,{children:`Invalidate Selected Process`},`procheader`)]:[],t?Q.ofRange(1,t.process+1).map(e=>(0,H.jsxs)(wx,{value:`proc`+e.toString(),children:[`Invalidate Process `,e]},e)).toRArray():[],s&&c?[(0,H.jsx)(y_,{children:`Change Material Type`},`matheader`)]:[],c?[...a.map(e=>(0,H.jsxs)(wx,{value:`rawMat`+e,children:[`Invalidate Everything And Change to `,e]},`rawMat`+e)),...o.map(({jobUnique:e,job:t})=>(0,H.jsxs)(wx,{value:`job`+e,children:[t?(0,H.jsx)(bb,{children:(0,H.jsx)(LU,{part:t.partName})}):void 0,(0,H.jsx)(Tb,{primary:`Invalidate Everything And Change To Job `+e,secondary:t?.partName})]},`job`+e))]:[]]})}function WY(e){let t=L(CI),n=e.st!==null&&t!==null,r=(0,I.useRef)(null);return(0,I.useEffect)(()=>{r.current?.scrollIntoView({behavior:`smooth`,block:`end`})},[r,n]),n?(0,H.jsx)(J,{ref:r,sx:{display:`flex`,flexDirection:`column`,alignItems:`center`,marginTop:`1em`},children:(0,H.jsxs)(MS,{spacing:2,children:[(0,H.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,H.jsx)(UY,{st:e.st,setState:e.setState})]})}):(0,H.jsx)(`div`,{})}function GY(e){let t=L(yr),n=L(CI),r=L(EI),i=L(jI),a=L(SI),o=R(bI),s=L(UO);if(e.loadStation&&!t.allowInvalidateMaterialAtLoadStation||!e.loadStation&&!t.allowInvalidateMaterialOnQueuesPage||n===null||r&&r.location.type===ot.OnPallet||!(a!==null&&(!Q.ofObject(a.possibleCastingsByQueue??{}).isEmpty()||!Q.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}),Ht.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,H.jsxs)(H.Fragment,{children:[e.st===null?(0,H.jsx)(Y,{color:`primary`,onClick:c,children:`Invalidate Cycle`}):void 0,e.st===null?void 0:(0,H.jsx)(Y,{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 qY(e,t){return n=>{if(KY(n.serial)||n.location.type===ot.OnPallet||n.process!==e.process-1)return!1;if(KY(n.jobUnique)){if(KY(n.partName)||n.partName!==e.partName&&(!t||!Q.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=L(GO),n=L(EI);if(n===null||e.st===null)return(0,H.jsx)(`div`,{});let r=t.jobs[n.jobUnique],i=t.material.filter(qY(n,r));return i.length===0?(0,H.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,H.jsxs)(`div`,{style:{margin:`2em`},children:[(0,H.jsx)(`p`,{children:`Swap serial on pallet with material from the same job.`}),(0,H.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,H.jsx)(Hw,{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,H.jsx)(wx,{value:e.serial,children:e.serial},e.materialID))})]})}function YY(e){let t=L(yr),n=L(EI),r=R(bI),i=L(UO);if(!t.allowSwapSerialAtLoadStation||(e.ignoreOperator&&(i=null),!n||n.location.type!==ot.OnPallet||n.action.type===V.Loading||n.action.type===V.UnloadToCompletedMaterial||n.action.type===V.UnloadToInProcess))return null;function a(){n&&e.st&&e.st.selectedMatToSwap&&n.location.type===ot.OnPallet&&(e.setState({selectedMatToSwap:e.st.selectedMatToSwap,updating:!0}),Ht.swapMaterialOnPallet(n.materialID,i,{pallet:n.location.palletNum??0,materialIDToSetOnPallet:e.st.selectedMatToSwap.materialID}).catch(console.log).finally(()=>{r(null),e.onClose()}))}return(0,H.jsxs)(H.Fragment,{children:[e.st===null?(0,H.jsx)(Y,{color:`primary`,onClick:()=>e.setState({selectedMatToSwap:null,updating:!1}),children:`Swap Serial`}):void 0,e.st===null?void 0:(0,H.jsx)(Y,{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 XY=G(dw,{shouldForwardProp:e=>e.toString()[0]!==`$`})(({$noBorderBottom:e,$highlightedRow:t,$noncompletedRow:n})=>({...e&&{"& > *":{borderBottom:`unset`}},backgroundColor:t?`#FF8A65`:n?`#E0E0E0`:void 0})),ZY=[/\bhold\b/,/\bmissing\b/,/\bwait\b/,/\bwaiting\b/,/\bnone\b/];function QY(e){let t=e.comment;return!t||t===``?!1:Q.of(ZY).some(e=>e.test(t))}function $Y(e){let t=(L(yr).allowEditJobPlanQuantityFromQueuesPage??null)!=null,[n,r]=(0,I.useState)(!1),i=e.job,a=QY(i.job);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(XY,{$noBorderBottom:!0,$highlightedRow:a,$noncompletedRow:i.remainingToStart-i.assignedRaw>0,children:[(0,H.jsx)(Z,{children:(0,H.jsxs)(J,{sx:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(J,{sx:{mr:`0.2em`},children:(0,H.jsx)(LU,{part:i.job.partName,size:25})}),(0,H.jsx)(`div`,{children:(0,H.jsx)(q,{variant:`body2`,component:`span`,sx:{display:`block`},children:i.job.unique})})]})}),(0,H.jsx)(Z,{children:i.startingTime?i.startingTime.toLocaleString():``}),(0,H.jsx)(Z,{children:i.rawMatName===i.job.partName?i.rawMatName:(0,H.jsxs)(J,{sx:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(J,{sx:{mr:`0.2em`},children:(0,H.jsx)(LU,{part:i.rawMatName,size:25})}),(0,H.jsx)(q,{variant:`body2`,sx:{display:`block`},children:i.rawMatName})]})}),(0,H.jsxs)(Z,{children:[i.job.comment,(0,H.jsx)(X,{title:`Edit`,children:(0,H.jsx)(Gm,{size:`small`,onClick:()=>e.editNote(i.job),children:(0,H.jsx)(bT,{})})})]}),(0,H.jsxs)(Z,{align:`right`,children:[i.job.cycles??0,t?(0,H.jsx)(X,{title:`Edit`,children:(0,H.jsx)(Gm,{size:`small`,onClick:()=>e.editQty(i),children:(0,H.jsx)(bT,{})})}):void 0]}),(0,H.jsx)(Z,{align:`right`,children:i.remainingToStart}),(0,H.jsx)(Z,{align:`right`,children:i.assignedRaw}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(X,{title:i.remainingToStart>0||i.assignedRaw>0?`${i.remainingToStart} - ${i.assignedRaw}`:``,children:(0,H.jsx)(`span`,{children:Math.max(i.remainingToStart-i.assignedRaw,0)})})}),(0,H.jsx)(Z,{align:`right`,children:i.availableUnassigned}),(0,H.jsx)(Z,{children:(0,H.jsx)(X,{title:`Show Details`,children:(0,H.jsx)(Gm,{size:`small`,onClick:()=>r(!n),children:n?(0,H.jsx)(LT,{}):(0,H.jsx)(PT,{})})})})]}),(0,H.jsx)(XY,{$highlightedRow:a,$noncompletedRow:i.remainingToStart-i.assignedRaw>0,children:(0,H.jsx)(Z,{sx:{pb:`0`,pt:`0`},colSpan:10,children:(0,H.jsx)(Rp,{in:n,timeout:`auto`,unmountOnExit:!0,children:(0,H.jsx)(Xq,{job:i.job,checkAnalysisMonth:!1})})})})]})}function eX(e){let t=L(GO),n=(0,I.useMemo)(()=>Hq(t.jobs,t.material,e.queue),[t,e.queue]);return n.length===0?null:(0,H.jsxs)(AC,{size:`small`,children:[(0,H.jsx)($C,{children:(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{children:`Job`}),(0,H.jsx)(Z,{children:`Starting Time`}),(0,H.jsx)(Z,{children:`Material`}),(0,H.jsx)(Z,{children:`Note`}),(0,H.jsx)(Z,{align:`right`,children:`Planned Quantity`}),(0,H.jsx)(Z,{align:`right`,children:`Remaining To Start`}),(0,H.jsx)(Z,{align:`right`,children:`Assigned Raw Material`}),(0,H.jsx)(Z,{align:`right`,children:`Required`}),(0,H.jsx)(Z,{align:`right`,children:`Available Unassigned`}),(0,H.jsx)(Z,{})]})}),(0,H.jsx)(LC,{children:n.map((t,n)=>(0,H.jsx)($Y,{job:t,editNote:e.editNote,editQty:e.editQty},n))})]})}var tX=(0,I.memo)(function({workorder:e,inProc:t}){let n=R(aX);return(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{children:e.workorderId}),(0,H.jsx)(Z,{children:(0,H.jsxs)(J,{sx:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(J,{sx:{mr:`0.2em`},children:(0,H.jsx)(LU,{part:e.part,size:25})}),(0,H.jsx)(q,{variant:`body2`,sx:{display:`block`},children:e.part})]})}),(0,H.jsxs)(Z,{children:[e.comments&&e.comments.length>0?e.comments[e.comments.length-1].comment:``,(0,H.jsx)(X,{title:`Edit`,children:(0,H.jsx)(Gm,{size:`small`,onClick:()=>n(e),children:(0,H.jsx)(bT,{})})})]}),(0,H.jsx)(Z,{children:e.dueDate.toLocaleDateString()}),(0,H.jsx)(Z,{children:e.priority}),(0,H.jsx)(Z,{children:e.plannedQuantity}),(0,H.jsx)(Z,{children:e.completedQuantity}),(0,H.jsx)(Z,{children:t}),(0,H.jsx)(Z,{children:Math.max(0,e.plannedQuantity-e.completedQuantity-t)})]})}),nX=(0,I.memo)(function(){let e=L(GO);if(!e.workorders||e.workorders.length===0)return null;let t=Q.of(e.workorders).sortBy(e=>e.dueDate.getTime(),e=>e.priority),n=Q.of(e.material).filter(e=>!!e.workorderId&&e.workorderId!==``).toLookupMap(e=>e.workorderId??``,e=>e.partName,()=>1,(e,t)=>e+t);return(0,H.jsxs)(AC,{size:`small`,children:[(0,H.jsx)($C,{children:(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{children:`Workorder`}),(0,H.jsx)(Z,{children:`Part`}),(0,H.jsx)(Z,{children:`Comment`}),(0,H.jsx)(Z,{children:`Due Date`}),(0,H.jsx)(Z,{children:`Priority`}),(0,H.jsx)(Z,{children:`Planned Qty`}),(0,H.jsx)(Z,{children:`Completed Qty`}),(0,H.jsx)(Z,{children:`In Process`}),(0,H.jsx)(Z,{children:`Remaining To Assign`})]})}),(0,H.jsx)(LC,{children:t.map(e=>(0,H.jsx)(tX,{workorder:e,inProc:n.get(e.workorderId)?.get(e.part)??0},`${e.workorderId}-${e.part}`))})]})}),rX=(0,I.memo)(function(e){let[t,n]=(0,I.useState)(null),r=R(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,H.jsx)(ky,{open:e.job!==null,onClose:i,children:e.job===null?void 0:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(My,{children:(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(`div`,{children:(0,H.jsx)(LU,{part:e.job.partName,size:40})}),(0,H.jsxs)(`div`,{style:{marginLeft:`1em`,flexGrow:1},children:[`Edit Note For `,e.job.unique]})]})}),(0,H.jsx)(jy,{children:(0,H.jsx)(Hw,{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,H.jsxs)(Ay,{children:[(0,H.jsx)(Y,{color:`primary`,disabled:t===null,onClick:a,children:`Save Note`}),(0,H.jsx)(Y,{color:`primary`,onClick:i,children:`Cancel`})]})]})})}),iX=(0,I.memo)(function(e){let[t,n]=(0,I.useState)(!1),[r,i]=(0,I.useState)(null),a=L(yr).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,H.jsx)(ky,{open:a!=null&&e.job!==null,onClose:o,children:e.job===null?void 0:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(My,{children:(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(`div`,{children:(0,H.jsx)(LU,{part:e.job.job.partName,size:40})}),(0,H.jsxs)(`div`,{style:{marginLeft:`1em`,flexGrow:1},children:[`Edit Planned Quantity For `,e.job.job.unique]})]})}),(0,H.jsxs)(jy,{children:[(0,H.jsxs)(`p`,{children:[e.job.job.cycles,` currently planned, `,e.job.remainingToStart,` remaining to start`]}),(0,H.jsx)(Hw,{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,H.jsxs)(Ay,{children:[(0,H.jsxs)(Y,{color:`primary`,disabled:t||r===null||isNaN(r),onClick:()=>void s(),children:[t?(0,H.jsx)(zm,{size:10}):void 0,`Set Quantity`]}),(0,H.jsx)(Y,{color:`primary`,disabled:t,onClick:o,children:`Cancel`})]})]})})}),aX=P(null);function oX(){let[e,t]=z(aX),[n,r]=(0,I.useState)(null),i=R(JO);function a(){t(null),r(null)}function o(){e&&n&&n!==``&&i({workorder:e.workorderId,comment:n}),a()}return(0,H.jsx)(ky,{open:e!==null,onClose:a,children:e===null?void 0:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(My,{children:(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(`div`,{children:(0,H.jsx)(LU,{part:e.part,size:40})}),(0,H.jsxs)(`div`,{style:{marginLeft:`1em`,flexGrow:1},children:[`Add Comment For `,e.workorderId]})]})}),(0,H.jsxs)(jy,{children:[(0,H.jsx)(`ul`,{children:(e.comments??[]).map((e,t)=>(0,H.jsx)(`li`,{children:(0,H.jsxs)(q,{variant:`body1`,children:[e.timeUTC.toLocaleString(),`: `,e.comment]})},t))}),(0,H.jsx)(Hw,{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,H.jsxs)(Ay,{children:[(0,H.jsx)(Y,{color:`primary`,onClick:o,children:`Save Comment`}),(0,H.jsx)(Y,{color:`primary`,onClick:a,children:`Cancel`})]})]})})}var sX=(0,I.memo)(function(e){let t=L(yr),n=R(SY),r=R(kY),i=R(kq);if(!t.addToQueueButton||t.addToQueueButton===ke.DoNotShow)return null;function a(){switch(t.addToQueueButton){case ke.DoNotShow:return;case ke.AddBulkUnassigned:e.rawMatQueue?n(e.label):r(e.label);break;case ke.LookupExistingSerial:r(e.label);return;case ke.ManualBarcodeScan:i(e.label);return}}return e.rawMatQueue?(0,H.jsx)(X,{title:`Add Raw Material`,children:(0,H.jsx)(Iy,{color:`secondary`,onClick:a,size:`large`,style:{marginBottom:`-30px`,zIndex:1},children:(0,H.jsx)(Qw,{})})}):e.inProcQueue?(0,H.jsx)(X,{title:`Add Material`,children:(0,H.jsx)(Iy,{color:`secondary`,onClick:a,size:`medium`,style:{marginBottom:`-30px`,zIndex:1},children:(0,H.jsx)(eT,{fontSize:`inherit`})})}):null});function cX(e){let t=L(bI);return t&&t.type===`AddMatWithEnteredSerial`||t&&t.type===`Barcode`&&t.toQueue?e.includes(t.toQueue)?[t.toQueue]:[]:e}var lX=(0,I.memo)(function({queueNames:e}){let[t,n]=(0,I.useState)({toQueue:null,enteredOperator:null,newMaterialTy:null}),[r,i]=(0,I.useState)(null),a=(0,I.useCallback)(()=>{n({toQueue:null,enteredOperator:null,newMaterialTy:null}),i(null)},[]);return e=cX(e),(0,H.jsx)(dW,{allowNote:!0,onClose:a,highlightProcsGreaterOrEqualTo:r?.process??void 0,extraDialogElements:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(WY,{st:r,setState:i}),(0,H.jsx)(zY,{queueNames:e,st:t,setState:n})]}),buttons:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(xY,{}),(0,H.jsx)(HY,{onClose:a}),(0,H.jsx)(GY,{onClose:a,st:r,setState:i}),(0,H.jsx)(BY,{st:t,queueNames:e,onClose:a})]})})}),uX=e=>{let t=L(UO),n=L(GO),r=L(bL),i=L(SL),a=(0,I.useMemo)(()=>Uq(e.queues,n,r,i),[n,e.queues,r,i]),o=!Q.ofObject(n.jobs).isEmpty(),[s,c]=(0,I.useState)(null),l=(0,I.useCallback)(()=>c(null),[]),[u,d]=(0,I.useState)(null),f=(0,I.useCallback)(()=>d(null),[]),[p,m]=(0,I.useState)(null),h=(0,I.useCallback)(()=>m(null),[]);return(0,H.jsxs)(J,{sx:{padding:`8px`,width:`100%`},children:[a.map((e,t)=>(0,H.jsx)(`div`,{style:t<a.length-1?{borderBottom:`1px solid black`}:void 0,children:(0,H.jsx)($q,{matIds:e.material.map(e=>e.materialID),direction:`rect`,queueName:e.label,renderDragOverlay:t=>(0,H.jsx)(eW,{mat:t,hideEmptySerial:!0,displayJob:o&&e.rawMaterialQueue,fsize:`normal`}),children:(0,H.jsxs)(J,{sx:{minHeight:`134px`},children:[(0,H.jsxs)(J,{sx:{display:`flex`,margin:`4px`},children:[(0,H.jsx)(q,{variant:`h4`,sx:{flexGrow:1},children:e.label}),e.free?void 0:(0,H.jsx)(sX,{label:e.label,rawMatQueue:e.rawMaterialQueue,inProcQueue:e.inProcQueue})]}),(0,H.jsxs)(J,{sx:{justifyContent:`flex-start`,display:`flex`,flexWrap:`wrap`},children:[e.material.map((t,n)=>(0,H.jsx)($U,{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,H.jsx)(QU,{mat:n.material[0],hideEmptySerial:!0,fsize:`normal`,displayJob:o&&e.rawMaterialQueue},r):(0,H.jsx)(tW,{partOrCasting:n.partOrCasting,assignedJobUnique:n.assignedJobUnique,material:n.material,fsize:`normal`,onOpen:()=>m(n.material)},t)):void 0,e.rawMaterialQueue?o?(0,H.jsx)(eX,{queue:e.label,editNote:c,editQty:d}):(0,H.jsx)(nX,{}):void 0]})]})})},t)),(0,H.jsx)(lX,{queueNames:e.queues}),(0,H.jsx)(AY,{}),(0,H.jsx)(Aq,{}),(0,H.jsx)(EY,{}),(0,H.jsx)(rX,{job:s,closeDialog:l}),(0,H.jsx)(iX,{job:u,closeDialog:f}),(0,H.jsx)(oX,{}),(0,H.jsx)(DY,{material:p,closeDialog:h,operator:t})]})};function dX(e){return GI(`Queues`),(0,H.jsx)(J,{component:`main`,sx:{backgroundColor:`#F8F8F8`,minHeight:{xs:`calc(100vh - 64px - 32px)`,sm:`calc(100vh - 64px - 40px)`,md:`calc(100vh - 64px)`}},children:(0,H.jsx)(uX,{...e})})}var fX=G(dw,{shouldForwardProp:e=>e.toString()[0]!==`$`})(e=>({"& > *":{borderBottom:`unset`},...e.$darkRow&&{backgroundColor:`#F5F5F5`}})),pX=G(dw,{shouldForwardProp:e=>e.toString()[0]!==`$`})(e=>({...e.$darkRow&&{backgroundColor:`#F5F5F5`}}));function mX(e){let[t,n]=(0,I.useState)(!1),r=10;e.showMaterial&&(r+=1);let i=e.job;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(fX,{$darkRow:e.showDarkRow&&i.darkRow,children:[(0,H.jsx)(Z,{children:i.routeStartTime.toLocaleString()}),(0,H.jsx)(Z,{children:(0,H.jsxs)(J,{sx:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(J,{sx:{mr:`0.2em`},children:(0,H.jsx)(LU,{part:i.partName,size:25})}),(0,H.jsx)(`div`,{children:(0,H.jsx)(q,{variant:`body2`,component:`span`,sx:{display:`block`},children:i.partName})})]})}),e.showMaterial?(0,H.jsx)(Z,{children:i.casting?(0,H.jsxs)(J,{sx:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(J,{sx:{mr:`0.2em`},children:(0,H.jsx)(LU,{part:i.casting,size:25})}),(0,H.jsx)(q,{variant:`body2`,sx:{display:`block`},children:i.casting})]}):void 0}):void 0,(0,H.jsxs)(Z,{children:[i.comment,(0,H.jsx)(X,{title:`Edit`,children:(0,H.jsx)(Gm,{size:`small`,onClick:()=>e.setCurEditNoteJob(i),children:(0,H.jsx)(bT,{})})})]}),(0,H.jsx)(Z,{children:i.inProcJob===null?`Archived`:`Active`}),(0,H.jsx)(Z,{align:`right`,children:i.scheduledQty}),(0,H.jsx)(Z,{align:`right`,sx:{backgroundColor:i.decrementedQty>0?`#FF8A65`:void 0},children:i.decrementedQty}),(0,H.jsx)(Z,{align:`right`,children:i.completedQty}),(0,H.jsx)(Z,{align:`right`,children:i.inProcessQty}),(0,H.jsx)(Z,{align:`right`,children:i.remainingQty}),(0,H.jsx)(Z,{children:(0,H.jsx)(X,{title:`Show Details`,children:(0,H.jsx)(Gm,{size:`small`,onClick:()=>n(!t),children:t?(0,H.jsx)(LT,{}):(0,H.jsx)(PT,{})})})})]}),(0,H.jsx)(pX,{$darkRow:e.showDarkRow&&i.darkRow,children:(0,H.jsx)(Z,{sx:{pb:`0`,pt:`0`},colSpan:r,children:(0,H.jsx)(Rp,{in:t,timeout:`auto`,unmountOnExit:!0,children:(0,H.jsx)(Xq,{job:i.inProcJob?i.inProcJob:i.historicJob,checkAnalysisMonth:!1})})})})]})}function hX(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?Q.of(e):Q.of(e).filter(e=>e.inProcJob!==null)).toSortedArray(n===`asc`?{asc:i}:{desc:i})}function gX(e){return(0,H.jsx)(X,{title:`Sort`,enterDelay:300,children:(0,H.jsx)(Z,{align:e.align,sortDirection:e.sortBy===e.col&&e.order,children:(0,H.jsx)(vw,{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 _X=(0,I.memo)(function(e){let t={sortBy:e.sortBy,setSortBy:e.setSortBy,order:e.order,setOrder:e.setOrder};return(0,H.jsx)($C,{children:(0,H.jsxs)(dw,{children:[(0,H.jsx)(gX,{align:`left`,col:0,...t,children:`Date`}),(0,H.jsx)(gX,{align:`left`,col:1,...t,children:`Part`}),e.showMaterial?(0,H.jsx)(gX,{align:`left`,col:2,...t,children:`Material`}):void 0,(0,H.jsx)(gX,{align:`left`,col:3,...t,children:`Note`}),(0,H.jsxs)(Z,{align:`left`,children:[`Active`,(0,H.jsx)(X,{title:e.showArchived?`Hide Archived`:`Show Archived`,children:(0,H.jsx)(Gm,{size:`small`,onClick:t=>{e.setShowArchived(e=>!e),t.stopPropagation()},children:e.showArchived?(0,H.jsx)(fre,{}):(0,H.jsx)(pre,{})})})]}),(0,H.jsx)(gX,{align:`right`,col:4,...t,children:`Scheduled`}),(0,H.jsx)(gX,{align:`right`,col:5,...t,children:`Removed`}),(0,H.jsx)(gX,{align:`right`,col:6,...t,children:`Completed`}),(0,H.jsx)(gX,{align:`right`,col:7,...t,children:`In Process`}),(0,H.jsx)(gX,{align:`right`,col:8,...t,children:`Remaining To Run`}),(0,H.jsx)(Z,{children:(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(Gm,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>Nq(e.jobs,e.showMaterial),size:`large`,children:(0,H.jsx)(jT,{})})})})]})})}),vX=(0,I.memo)(function(){let[e,t]=(0,I.useState)(null),[n,r]=(0,I.useState)(0),[i,a]=(0,I.useState)(`desc`),[o,s]=(0,I.useState)(!0),c=L(lL),l=L(yO),u=L(GO),d=(0,I.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,I.useMemo)(()=>jq({start:tE(bE(),-6),end:tE(bE(),1)},c.matsById,l,u),[c.matsById,l,u]),p=(0,I.useMemo)(()=>hX(f,n,i,o),[f,n,i,o]);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(AC,{stickyHeader:!0,children:[(0,H.jsx)(_X,{jobs:f,showMaterial:d,sortBy:n,setSortBy:r,order:i,setOrder:a,showArchived:o,setShowArchived:s}),(0,H.jsx)(LC,{children:p.map((e,r)=>(0,H.jsx)(mX,{job:e,showDarkRow:n===0,showMaterial:d,setCurEditNoteJob:t},e.inProcJob?.unique??e.historicJob?.unique??r))})]}),(0,H.jsx)(rX,{job:e?.historicJob??null,closeDialog:()=>t(null)})]})});function yX(){return GI(`Scheduled Jobs`),(0,H.jsx)(`main`,{style:{padding:`24px`},children:(0,H.jsx)(vX,{})})}var bX=`__FMS_INSIGHT_LOAD_STATION_BIN__`,xX=`__FMS_INSIGHT_PALLETS_BIN__`,SX=`__FMS_INSIGHT_ACTIVE_QUEUE_BIN__`,CX=`__FMS_INSIGHT_BASKETS_BIN__`,wX=PO(`material-bins`,[]);function TX(e,t,n){let r=Array.from(e),[i]=r.splice(t,1);return r.splice(n,0,i),r}function EX(e,t,n){let r=e.get(t);r?r.push(n):e.set(t,[n])}var DX=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 OX(e){let t;return t=e.position.locationTitle&&e.position.locationTitle.length>0?e.position.locationTitle:e.position.location+` `+e.position.locationNum.toString(),e.position.zone&&(t+=`-${e.position.zone}`),t}function kX(e,t){let n=new Map,r=new Map,i=new Map,a=new Map,o=Q.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 ot.InQueue:if(t.action.type===V.Loading){let r=e.pallets[t.action.loadOntoPalletNum??0];if(r&&r.currentPalletLocation.loc===rt.LoadUnload){let e=r.currentPalletLocation.num;EX(n,e,t)}else EX(i,t.location.currentQueue||`Queue`,t)}else EX(i,t.location.currentQueue||`Queue`,t);break;case ot.OnPallet:if(t.location.palletNum){let i=e.pallets[t.location.palletNum];i.currentPalletLocation.loc===rt.LoadUnload?EX(n,i.currentPalletLocation.num,t):EX(r,o.get(t.location.palletNum)??``,t)}else EX(r,`Pallet`,t);break;case ot.Free:switch(t.action.type){case V.Loading:{let r=e.pallets[t.action.loadOntoPalletNum??0]?.currentPalletLocation.num;EX(n,r,t);break}case V.LoadingToBasket:{let r=e.baskets?.[t.action.loadToBasketId??0];r?.position.location===_t.LoadUnload?EX(n,r.position.locationNum,t):EX(i,`Free Material`,t);break}default:EX(i,`Free Material`,t);break}break;case ot.InBasket:t.location.basketId!==void 0&&EX(a,t.location.basketId,t);break}let s=Q.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(Q.ofObject(e.queues).filter(([,e])=>e.role===lt.RawMaterial||e.role===lt.InProcessTransfer).map(([e,t])=>e)).toRSet(e=>e),c=Q.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(SX),a.size>0&&l.indexOf(`__FMS_INSIGHT_BASKETS_BIN__`)<0&&l.unshift(CX),l.indexOf(`__FMS_INSIGHT_PALLETS_BIN__`)<0&&l.unshift(xX),l.indexOf(`__FMS_INSIGHT_LOAD_STATION_BIN__`)<0&&l.unshift(bX);for(let e of Q.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:bX,byLul:n};if(t===`__FMS_INSIGHT_PALLETS_BIN__`)return{type:`Bin_Pallets`,binId:xX,byPallet:r};if(t===`__FMS_INSIGHT_ACTIVE_QUEUE_BIN__`)return{type:`Bin_ActiveQueues`,binId:SX,byQueue:Q.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:CX,byBasket:new Map(a),basketLocations:Q.ofObject(e.baskets??{}).collect(([e,t])=>parseInt(e)>0?[parseInt(e),OX(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 AX(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 jX(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 MX(e,t){for(let n of t)if(n.type===`Bin_Quarantine`&&n.queueName===e)return{bin:n,idx:0};return null}var NX=(0,I.forwardRef)(function(e,t){return(0,H.jsxs)(J,{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,H.jsx)(J,{role:`button`,tabIndex:0,sx:{cursor:e.isDragOverlay?`grabbing`:`grab`},...e.dragHandleProps,children:(0,H.jsx)(q,{variant:`h4`,children:e.label})}),(0,H.jsx)(J,{sx:{display:`flex`,flexDirection:`column`,flexWrap:`nowrap`,width:`18em`,minHeight:`20em`},children:e.children})]})});function PX(e){let t={type:`container`,bin:e.bin},{active:n,isDragging:r,attributes:i,listeners:a,setNodeRef:o,setActivatorNodeRef:s,transform:c,transition:l}=SU({id:e.binId,data:t}),u={...a};for(let[e,t]of Object.entries(i))e.startsWith(`aria`)&&(u[e]=t);let d={transform:c?`translate3d(${Math.round(c.x)}px, ${Math.round(c.y)}px, 0)`:void 0,transition:n===null?void 0:l};return(0,H.jsx)(NX,{ref:o,dragRootProps:{style:d},dragHandleProps:u,setDragHandleRef:s,isActiveDrag:r,...e})}var FX=(0,I.memo)(function(e){return e.isDragOverlay?(0,H.jsx)(NX,{binId:e.binId,label:e.queue,isDragOverlay:!0,children:e.material.map(e=>(0,H.jsx)(QU,{mat:e,hideAvatar:!0,showHandle:!0},e.materialID))}):(0,H.jsx)(PX,{binId:e.binId,label:e.queue,bin:e.bin,children:(0,H.jsx)(mU,{items:e.material.map(e=>e.materialID),strategy:uU,children:e.material.map(e=>(0,H.jsx)($U,{mat:e,hideAvatar:!0},e.materialID))})})});function IX(e,t){return e-t}function LX(e){return`Pallet `+e}function RX(e,t){let n=parseInt(e),r=parseInt(t);return isNaN(n)||isNaN(r)?e.localeCompare(t):n-r}function zX(e){return e}function BX(e,t){return e.localeCompare(t)}function VX(e,t){return e-t}var HX=class extends I.PureComponent{render(){return(0,H.jsx)(this.props.isDragOverlay?NX:PX,{label:this.props.name,binId:this.props.binId,bin:this.props.bin,isDragOverlay:this.props.isDragOverlay,children:Q.of(this.props.material).sortWith(([e,t],[n,r])=>this.props.compareLabel(e,n)).map(([e,t],n)=>(0,H.jsxs)(`div`,{children:[(0,H.jsx)(q,{variant:`caption`,children:this.props.renderLabel(e)}),t.map((e,t)=>(0,H.jsx)(QU,{mat:e,hideAvatar:!0},t))]},n))})}};function UX({matBin:e,isDragOverlay:t}){let n=L(yr),r=Dk(n.basketName);switch(e.type){case DX.LoadStations:return(0,H.jsx)(HX,{name:`Load Stations`,binId:e.binId,renderLabel:e=>Tk(e,n.loadStationNames),compareLabel:IX,material:e.byLul,bin:e,isDragOverlay:t});case DX.Pallets:return(0,H.jsx)(HX,{name:`Pallets`,binId:e.binId,renderLabel:LX,compareLabel:RX,material:e.byPallet,bin:e,isDragOverlay:t});case DX.ActiveQueues:return(0,H.jsx)(HX,{name:`Queues`,binId:e.binId,renderLabel:zX,compareLabel:BX,material:e.byQueue,bin:e,isDragOverlay:t});case DX.Baskets:return(0,H.jsx)(HX,{name:r+`s`,binId:e.binId,renderLabel:t=>r+` `+t.toString()+(typeof t==`number`&&e.basketLocations.get(t)?` (${e.basketLocations.get(t)})`:``),compareLabel:VX,material:e.byBasket,bin:e,isDragOverlay:t});case DX.QuarantineQueues:return(0,H.jsx)(FX,{binId:e.binId,queue:e.queueName,material:e.material,bin:e,isDragOverlay:t})}}var WX=(0,I.memo)(function(){let[e,t]=(0,I.useState)(null),[n,r]=(0,I.useState)(null);function i(){t(null),r(null)}return(0,H.jsx)(dW,{onClose:i,allowNote:!0,highlightProcsGreaterOrEqualTo:n?.process??void 0,extraDialogElements:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(JY,{st:e,setState:t}),n===null?null:(0,H.jsx)(WY,{st:n,setState:r})]}),buttons:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(HY,{onClose:i,ignoreOperator:!0}),(0,H.jsx)(YY,{st:e,setState:t,onClose:i,ignoreOperator:!0}),(0,H.jsx)(GY,{st:n,setState:r,onClose:i,ignoreOperator:!0})]})})});function GX(e){return(0,I.useCallback)(t=>{if(typeof t.active.id==`string`)return BB({...t,droppableContainers:t.droppableContainers.filter(e=>typeof e.id==`string`)});let n=GB(t),r=RB(n.length>0?n:UB(t),`id`);if(r!=null){if(typeof r==`string`){let n=MX(r,e);n&&n.bin.material.length>0&&(r=BB({...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){GI(`All Material`);let t=L(GO),[n,r]=z(wX),[i]=LI(),a=R(QO),[o,s]=(0,I.useState)(null),c=(0,I.useMemo)(()=>{let e=kX(t,n);return o&&o.type===`material`&&o.curOverBinId!==null?AX(e,o.mat,o.curOverBinId,o.initialIdx):e},[t,n,o]),l=e.displaySystemBins?c:c.filter(e=>e.type===DX.QuarantineQueues);return(0,H.jsxs)(NH,{collisionDetection:GX(c),measuring:{droppable:{strategy:YV.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`?MX(e.id,c):jX(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(TX(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`?MX(e.id,c):jX(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,H.jsx)(mU,{items:l.map(e=>e.binId),strategy:oU,children:(0,H.jsx)(J,{component:`main`,sx:{display:`flex`,flexWrap:`nowrap`,backgroundColor:`#F8F8F8`,minHeight:{xs:`calc(100vh - 64px - 48px)`,md:`calc(100vh - 64px)`}},children:l.map(e=>(0,H.jsx)(UX,{matBin:e},e.binId))})}),(0,H.jsx)($H,{children:o?.type===`material`?(0,H.jsx)(eW,{mat:o.mat,hideAvatar:!0}):o?.type===`column`?(0,H.jsx)(UX,{matBin:o.bin,isDragOverlay:!0}):void 0}),(0,H.jsx)(WX,{})]})}function qX(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=Q.of(e).collect(e=>e.result.type===nL.Completed&&!e.result.success?e.materialID:null).toRSet(e=>e);return Q.of(e).collect(e=>{if(t&&(e.time<t.start||e.time>t.end))return null;switch(e.result.type){case nL.Triggered:return{time:e.time,materialID:e.materialID,partName:e.part,serial:e.serial,workorder:e.workorder,toInspect:e.result.toInspect,path:qX(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:Q.of(e).toSortedArray(n,e=>e.time.getTime()),failedCnt:e.reduce((e,t)=>e+ +!!t.failed,0)}))}function YX(e,t,n){return Q.of(e).collect(e=>e.time<t||e.time>n?null:e.result.type===nL.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 XX(e){for(let t of e)if(t.type===B.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(Pe.fromJS(t));if(n.length>0)return n}return[]}function ZX(e,t,n){let r=`<table>
|
|
335
|
+
<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>
|
|
336
|
+
<tbody>
|
|
337
|
+
`;let i=JX(n,void 0,{asc:e=>e.time.getTime()}),a=Q.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>
|
|
338
|
+
`}return r+=`</tbody>
|
|
339
|
+
</table>`,r}function QX(e,t,n){oA(ZX(e,t,n))}function $X(e){let t=`<table>
|
|
340
|
+
<thead><tr>`;t+=`<th>Date</th><th>Part</th><th>Inspection</th><th>Serial</th><th>Workorder</th>`,t+=`</tr></thead>
|
|
341
|
+
<tbody>
|
|
342
|
+
`;for(let n of Q.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>
|
|
343
|
+
`;return t+=`</tbody>
|
|
344
|
+
</table>`,t}function eZ(e){oA($X(e))}function tZ(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 nZ(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 rZ(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 iZ(e,t){return e.sourceLinks.length?e.depth:t-1}function aZ(e){return function(){return e}}function oZ(e,t){return cZ(e.source,t.source)||e.index-t.index}function sZ(e,t){return cZ(e.target,t.target)||e.index-t.index}function cZ(e,t){return e.y0-t.y0}function lZ(e){return e.value}function uZ(e){return e.index}function dZ(e){return e.nodes}function fZ(e){return e.links}function pZ(e,t){let n=e.get(t);if(!n)throw Error(`missing: `+t);return n}function mZ({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 hZ(){let e=0,t=0,n=1,r=1,i=24,a=8,o,s=uZ,c=iZ,l,u,d=dZ,f=fZ,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),mZ(e),e}m.update=function(e){return mZ(e),e},m.nodeId=function(e){return arguments.length?(s=typeof e==`function`?e:aZ(e),m):s},m.nodeAlign=function(e){return arguments.length?(c=typeof e==`function`?e:aZ(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:aZ(e),m):d},m.links=function(e){return arguments.length?(f=typeof e==`function`?e:aZ(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=pZ(n,t)),typeof i!=`object`&&(i=r.target=pZ(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(rZ(t.sourceLinks,lZ),rZ(t.targetLinks,lZ)):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=tZ(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=nZ(e,e=>(r-t-(e.length-1)*o)/rZ(e,lZ));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)/(tZ(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(cZ),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(cZ),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(sZ);for(let{target:{targetLinks:t}}of e)t.sort(oZ)}}function O(e){if(u===void 0)for(let{sourceLinks:t,targetLinks:n}of e)t.sort(sZ),n.sort(oZ)}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 gZ=Math.PI,_Z=2*gZ,vZ=1e-6,yZ=_Z-vZ;function bZ(){this._x0=this._y0=this._x1=this._y1=null,this._=``}function xZ(){return new bZ}bZ.prototype=xZ.prototype={constructor:bZ,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>vZ)if(!(Math.abs(u*s-c*l)>vZ)||!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((gZ-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>vZ&&(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)>vZ||Math.abs(this._y1-l)>vZ)&&(this._+=`L`+c+`,`+l),n&&(d<0&&(d=d%_Z+_Z),d>yZ?this._+=`A`+n+`,`+n+`,0,1,`+u+`,`+(e-o)+`,`+(t-s)+`A`+n+`,`+n+`,0,1,`+u+`,`+(this._x1=c)+`,`+(this._y1=l):d>vZ&&(this._+=`A`+n+`,`+n+`,0,`+ +(d>=gZ)+`,`+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 SZ(e){return function(){return e}}function CZ(e){return e[0]}function wZ(e){return e[1]}var TZ=Array.prototype.slice;function EZ(e){return e.source}function DZ(e){return e.target}function OZ(e){var t=EZ,n=DZ,r=CZ,i=wZ,a=null;function o(){var o,s=TZ.call(arguments),c=t.apply(this,s),l=n.apply(this,s);if(a||=o=xZ(),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:SZ(+e),o):r},o.y=function(e){return arguments.length?(i=typeof e==`function`?e:SZ(+e),o):i},o.context=function(e){return arguments.length?(a=e??null,o):a},o}function kZ(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function AZ(){return OZ(kZ)}function jZ(e){return[e.source.x1,e.y0]}function MZ(e){return[e.target.x0,e.y1]}function NZ(){return AZ().source(jZ).target(MZ)}var PZ=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 jD(this.unique,this.name)}toString(){return`{unique: ${this.unique}}, name: ${this.name}}`}},FZ=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 jD(this.from,this.to)}toString(){return`{from: ${this.from.toString()}}, to: ${this.to.toString()}}`}};function IZ(e,t,n){let r=``,i=new PZ(``,`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 PZ(r,n);a.push(new FZ(i,o)),i=o}return t&&n!==void 0?n?a.push(new FZ(i,new PZ(`@@success`,`success`))):a.push(new FZ(i,new PZ(`@@failed`,`failed`))):a.push(new FZ(i,new PZ(`@@uninspected`,`uninspected`))),a}function LZ(e){let t=Q.of(e).filter(e=>e.result.type===nL.Completed).toRMap(e=>[e.materialID,e.result.type===nL.Completed&&e.result.success]),n=Q.of(e).flatMap(e=>e.result.type===nL.Triggered?IZ(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 RZ=(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);!zZ(i,a)&&r||Object.defineProperty(e,n,a)},zZ=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)},BZ=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},VZ=(e,t)=>`/* Wrapped ${e}*/\n${t}`,HZ=Object.getOwnPropertyDescriptor(Function.prototype,`toString`),UZ=Object.getOwnPropertyDescriptor(Function.prototype.toString,`name`),WZ=(e,t,n)=>{let r=n===``?``:`with ${n.trim()}() `,i=VZ.bind(null,r,t.toString());Object.defineProperty(i,"name",UZ);let{writable:a,enumerable:o,configurable:s}=HZ;Object.defineProperty(e,"toString",{value:i,writable:a,enumerable:o,configurable:s})};function GZ(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:r}=e;for(let r of Reflect.ownKeys(t))RZ(e,t,r,n);return BZ(e,t),WZ(e,t,r),e}var KZ=2147483647,qZ=new WeakMap,JZ=new WeakMap,YZ=new WeakMap;function XZ(e,t){let n=e.get(t);if(n){if(n.maxAge<=Date.now()){e.delete(t);return}return n}}function ZZ(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=XZ(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 GZ(i,e,{ignoreNonConfigurable:!0}),qZ.set(i,n),YZ.set(i,t??(e=>e[0])),i}function QZ(e){return typeof e==`string`}function $Z(e,t,n){return n.indexOf(e)===t}function eQ(e){return e.toLowerCase()===e}function tQ(e){return e.indexOf(`,`)===-1?e:e.split(`,`)}function nQ(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 nQ(n)}if(e.indexOf(`@`)!==-1){var r=e.split(`@`)[0],n=r===void 0?``:r;return nQ(n)}if(e.indexOf(`-`)===-1||!eQ(e))return e;var i=e.split(`-`),a=i[0],o=i[1];return`${a}-${(o===void 0?``:o).toUpperCase()}`}function rQ(e){var t=e===void 0?{}:e,n=t.useFallbackLocale,r=n===void 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(tQ(d))}var f=navigator.language,p=f&&tQ(f);o=o.concat(c,p)}return r&&o.push(a),o.filter(QZ).map(nQ).filter($Z)}var iQ=ZZ(rQ,{cacheKey:JSON.stringify});function aQ(e){return iQ(e)[0]||null}var oQ=ZZ(aQ,{cacheKey:JSON.stringify}),sQ=new Map;function cQ(e){return function(t,n){let r=t||oQ();sQ.has(r)||sQ.set(r,new Map);let i=sQ.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 lQ(e){let t=new Date(e);return new Date(t.setHours(12))}function uQ(e){return(t,n)=>cQ(e)(t,lQ(n))}var dQ={day:`numeric`},fQ={day:`numeric`,month:`long`,year:`numeric`},pQ={month:`long`},mQ={month:`long`,year:`numeric`},hQ={weekday:`short`},gQ={weekday:`long`},_Q={year:`numeric`},vQ=uQ(dQ),yQ=uQ(fQ),bQ=uQ(pQ),xQ=uQ(mQ),SQ=uQ(hQ),CQ=uQ(gQ),wQ=uQ(_Q);function TQ(e,t,n){return function(r,i=n){return t(e(r)+i)}}function EQ(e){return function(t){return new Date(e(t).getTime()-1)}}function DQ(e,t){return function(n){return[e(n),t(n)]}}function OQ(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 kQ(e){if(e instanceof Date)return e.getMonth();throw Error(`Failed to get month from date: ${e}.`)}function AQ(e){if(e instanceof Date)return e.getDate();throw Error(`Failed to get year from date: ${e}.`)}function jQ(e){let t=OQ(e),n=t+(-t+1)%100,r=new Date;return r.setFullYear(n,0,1),r.setHours(0,0,0,0),r}var MQ=TQ(OQ,jQ,-100),NQ=TQ(OQ,jQ,100),PQ=EQ(NQ),FQ=TQ(OQ,PQ,-100),IQ=DQ(jQ,PQ);function LQ(e){let t=OQ(e),n=t+(-t+1)%10,r=new Date;return r.setFullYear(n,0,1),r.setHours(0,0,0,0),r}var RQ=TQ(OQ,LQ,-10),zQ=TQ(OQ,LQ,10),BQ=EQ(zQ),VQ=TQ(OQ,BQ,-10),HQ=DQ(LQ,BQ);function UQ(e){let t=OQ(e),n=new Date;return n.setFullYear(t,0,1),n.setHours(0,0,0,0),n}var WQ=TQ(OQ,UQ,-1),GQ=TQ(OQ,UQ,1),KQ=EQ(GQ),qQ=TQ(OQ,KQ,-1),JQ=DQ(UQ,KQ);function YQ(e,t){return function(n,r=t){let i=OQ(n),a=kQ(n)+r,o=new Date;return o.setFullYear(i,a,1),o.setHours(0,0,0,0),e(o)}}function XQ(e){let t=OQ(e),n=kQ(e),r=new Date;return r.setFullYear(t,n,1),r.setHours(0,0,0,0),r}var ZQ=YQ(XQ,-1),QQ=YQ(XQ,1),$Q=EQ(QQ),e$=YQ($Q,-1),t$=DQ(XQ,$Q);function n$(e,t){return function(n,r=t){let i=OQ(n),a=kQ(n),o=AQ(n)+r,s=new Date;return s.setFullYear(i,a,o),s.setHours(0,0,0,0),e(s)}}function r$(e){let t=OQ(e),n=kQ(e),r=AQ(e),i=new Date;return i.setFullYear(t,n,r),i.setHours(0,0,0,0),i}var i$=EQ(n$(r$,1)),a$=DQ(r$,i$);function o$(e){return AQ($Q(e))}var s$={GREGORY:`gregory`,HEBREW:`hebrew`,ISLAMIC:`islamic`,ISO_8601:`iso8601`},c$={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`]},l$=[0,1,2,3,4,5,6],u$=l$[0],d$=l$[5],f$=l$[6];function p$(e,t=s$.ISO_8601){let n=e.getDay();switch(t){case s$.ISO_8601:return(n+6)%7;case s$.ISLAMIC:return(n+1)%7;case s$.HEBREW:case s$.GREGORY:return n;default:throw Error(`Unsupported calendar type.`)}}function m$(e){return OQ(jQ(e))}function h$(e){return OQ(LQ(e))}function g$(e,t=s$.ISO_8601){let n=OQ(e),r=kQ(e),i=e.getDate()-p$(e,t);return new Date(n,r,i)}function _$(e,t=s$.ISO_8601){let n=t===s$.GREGORY?s$.GREGORY:s$.ISO_8601,r=g$(e,t),i=OQ(e)+1,a,o;do a=new Date(i,0,n===s$.ISO_8601?4:1),o=g$(a,t),--i;while(e<o);return Math.round((r.getTime()-o.getTime())/(864e5*7))+1}function v$(e,t){switch(e){case`century`:return jQ(t);case`decade`:return LQ(t);case`year`:return UQ(t);case`month`:return XQ(t);case`day`:return r$(t);default:throw Error(`Invalid rangeType: ${e}`)}}function y$(e,t){switch(e){case`century`:return MQ(t);case`decade`:return RQ(t);case`year`:return WQ(t);case`month`:return ZQ(t);default:throw Error(`Invalid rangeType: ${e}`)}}function b$(e,t){switch(e){case`century`:return NQ(t);case`decade`:return zQ(t);case`year`:return GQ(t);case`month`:return QQ(t);default:throw Error(`Invalid rangeType: ${e}`)}}function x$(e,t){switch(e){case`decade`:return RQ(t,-100);case`year`:return WQ(t,-10);case`month`:return ZQ(t,-12);default:throw Error(`Invalid rangeType: ${e}`)}}function S$(e,t){switch(e){case`decade`:return zQ(t,100);case`year`:return GQ(t,10);case`month`:return QQ(t,12);default:throw Error(`Invalid rangeType: ${e}`)}}function C$(e,t){switch(e){case`century`:return PQ(t);case`decade`:return BQ(t);case`year`:return KQ(t);case`month`:return $Q(t);case`day`:return i$(t);default:throw Error(`Invalid rangeType: ${e}`)}}function w$(e,t){switch(e){case`century`:return FQ(t);case`decade`:return VQ(t);case`year`:return qQ(t);case`month`:return e$(t);default:throw Error(`Invalid rangeType: ${e}`)}}function T$(e,t){switch(e){case`decade`:return VQ(t,-100);case`year`:return qQ(t,-10);case`month`:return e$(t,-12);default:throw Error(`Invalid rangeType: ${e}`)}}function E$(e,t){switch(e){case`century`:return IQ(t);case`decade`:return HQ(t);case`year`:return JQ(t);case`month`:return t$(t);case`day`:return a$(t);default:throw Error(`Invalid rangeType: ${e}`)}}function D$(e,t,n){let r=[t,n].sort((e,t)=>e.getTime()-t.getTime());return[v$(e,r[0]),C$(e,r[1])]}function O$(e,t,n){return n.map(n=>(t||wQ)(e,n)).join(` – `)}function k$(e,t,n){return O$(e,t,IQ(n))}function A$(e,t,n){return O$(e,t,HQ(n))}function j$(e){return e.getDay()===new Date().getDay()}function M$(e,t=s$.ISO_8601){let n=e.getDay();switch(t){case s$.ISLAMIC:case s$.HEBREW:return n===d$||n===f$;case s$.ISO_8601:case s$.GREGORY:return n===f$||n===u$;default:throw Error(`Unsupported calendar type.`)}}var N$=`react-calendar__navigation`;function P$({activeStartDate:e,drillUp:t,formatMonthYear:n=xQ,formatYear:r=wQ,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=y$(b,e),T=C?x$(b,e):void 0,E=b$(b,e),D=C?S$(b,e):void 0,O=(()=>{if(w.getFullYear()<0)return!0;let t=w$(b,e);return o&&o>=t})(),ee=C&&(()=>{if(T.getFullYear()<0)return!0;let t=T$(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 M(){v(E,`next`)}function ne(){v(D,`next2`)}function re(e){let t=(()=>{switch(b){case`century`:return k$(i,r,e);case`decade`:return A$(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||oQ()||void 0,view:b}):t}function ie(){let n=`${N$}__label`;return(0,H.jsxs)(`button`,{"aria-label":s,"aria-live":c,className:n,disabled:!S,onClick:t,style:{flexGrow:1},type:`button`,children:[(0,H.jsx)(`span`,{className:`${n}__labelText ${n}__labelText--from`,children:re(e)}),y?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`span`,{className:`${n}__divider`,children:` – `}),(0,H.jsx)(`span`,{className:`${n}__labelText ${n}__labelText--to`,children:re(E)})]}):null]})}return(0,H.jsxs)(`div`,{className:N$,children:[h!==null&&C?(0,H.jsx)(`button`,{"aria-label":m,className:`${N$}__arrow ${N$}__prev2-button`,disabled:ee,onClick:j,type:`button`,children:h}):null,_!==null&&(0,H.jsx)(`button`,{"aria-label":g,className:`${N$}__arrow ${N$}__prev-button`,disabled:O,onClick:A,type:`button`,children:_}),ie(),p!==null&&(0,H.jsx)(`button`,{"aria-label":f,className:`${N$}__arrow ${N$}__next-button`,disabled:te,onClick:M,type:`button`,children:p}),d!==null&&C?(0,H.jsx)(`button`,{"aria-label":u,className:`${N$}__arrow ${N$}__next2-button`,disabled:k,onClick:ne,type:`button`,children:d}):null]})}function F$(e){return`${e}%`}function I$({children:e,className:t,count:n,direction:r,offset:i,style:a,wrap:o,...s}){return(0,H.jsx)(`div`,{className:t,style:{display:`flex`,flexDirection:r,flexWrap:o?`wrap`:`nowrap`,...a},...s,children:I.Children.map(e,(e,t)=>{let r=i&&t===0?F$(100*i/n):null;return(0,I.cloneElement)(e,{...e.props,style:{flexBasis:F$(100/n),flexShrink:0,flexGrow:0,overflow:`hidden`,marginLeft:r,marginInlineStart:r,marginInlineEnd:0}})})})}function L$(e,t,n){return t&&t>e?t:n&&n<e?n:e}function R$(e,t){return t[0]<=e&&t[1]>=e}function z$(e,t){return e[0]<=t[0]&&e[1]>=t[1]}function B$(e,t){return R$(e[0],t)||R$(e[1],t)}function V$(e,t,n){let r=B$(t,e),i=[];if(r){i.push(n);let r=R$(e[0],t),a=R$(e[1],t);r&&i.push(`${n}Start`),a&&i.push(`${n}End`),r&&a&&i.push(`${n}BothEnds`)}return i}function H$(e){return Array.isArray(e)?e[0]!==null&&e[1]!==null:e!==null}function U$(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 E$(t,n)})();if(R$(o,s)&&a.push(`${i}--now`),!t||!H$(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 E$(n,t)})();z$(c,s)?a.push(`${i}--active`):B$(c,s)&&a.push(`${i}--hasActive`);let l=V$(c,s,`${i}--range`);if(a.push(...l),r&&(Array.isArray(t)?t:[t]).length===1){let e=V$(r>c[0]?[c[0],r]:[r,c[0]],s,`${i}--hover`);a.push(...e)}return a}function W$({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:U$({date:t,dateType:r,hover:a,value:u,valueType:d}),date:t}))}return(0,H.jsx)(I$,{className:e,count:t,offset:o,wrap:!0,children:f})}function G$(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,I.useMemo)(()=>typeof m==`function`?m({activeStartDate:t,date:i,view:_}):m,[t,i,m,_]),y=(0,I.useMemo)(()=>typeof h==`function`?h({activeStartDate:t,date:i,view:_}):h,[t,i,h,_]);return(0,H.jsxs)(`button`,{className:U(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,H.jsx)(`abbr`,{"aria-label":a(o,i),children:n}):n,y]})}var K$=`react-calendar__century-view__decades__decade`;function q$({classes:e=[],currentCentury:t,formatYear:n=wQ,...r}){let{date:i,locale:a}=r,o=[];return e&&o.push(...e),o.push(K$),jQ(i).getFullYear()!==t&&o.push(`${K$}--neighboringCentury`),(0,H.jsx)(G$,{...r,classes:o,maxDateTransform:BQ,minDateTransform:LQ,view:`century`,children:A$(a,n,i)})}function J$(e){let{activeStartDate:t,hover:n,showNeighboringCentury:r,value:i,valueType:a,...o}=e,s=m$(t);return(0,H.jsx)(W$,{className:`react-calendar__century-view__decades`,dateTransform:LQ,dateType:`decade`,end:s+(r?119:99),hover:n,renderTile:({date:e,...n})=>(0,H.jsx)(q$,{...o,...n,activeStartDate:t,currentCentury:s,date:e},e.getTime()),start:s,step:10,value:i,valueType:a})}function Y$(e){function t(){return(0,H.jsx)(J$,{...e})}return(0,H.jsx)(`div`,{className:`react-calendar__century-view`,children:t()})}var X$=`react-calendar__decade-view__years__year`;function Z$({classes:e=[],currentDecade:t,formatYear:n=wQ,...r}){let{date:i,locale:a}=r,o=[];return e&&o.push(...e),o.push(X$),LQ(i).getFullYear()!==t&&o.push(`${X$}--neighboringDecade`),(0,H.jsx)(G$,{...r,classes:o,maxDateTransform:KQ,minDateTransform:UQ,view:`decade`,children:n(a,i)})}function Q$(e){let{activeStartDate:t,hover:n,showNeighboringDecade:r,value:i,valueType:a,...o}=e,s=h$(t);return(0,H.jsx)(W$,{className:`react-calendar__decade-view__years`,dateTransform:UQ,dateType:`year`,end:s+(r?11:9),hover:n,renderTile:({date:e,...n})=>(0,H.jsx)(Z$,{...o,...n,activeStartDate:t,currentDecade:s,date:e},e.getTime()),start:s,value:i,valueType:a})}function $$(e){function t(){return(0,H.jsx)(Q$,{...e})}return(0,H.jsx)(`div`,{className:`react-calendar__decade-view`,children:t()})}var e1=`react-calendar__month-view__days__day`;function t1({calendarType:e,classes:t=[],currentMonthIndex:n,formatDay:r=vQ,formatLongDate:i=yQ,...a}){let{date:o,locale:s}=a,c=[];return t&&c.push(...t),c.push(e1),M$(o,e)&&c.push(`${e1}--weekend`),o.getMonth()!==n&&c.push(`${e1}--neighboringMonth`),(0,H.jsx)(G$,{...a,classes:c,formatAbbr:i,maxDateTransform:i$,minDateTransform:r$,view:`month`,children:r(s,o)})}function n1(e){let{activeStartDate:t,calendarType:n,hover:r,showFixedNumberOfWeeks:i,showNeighboringMonth:a,value:o,valueType:s,...c}=e,l=OQ(t),u=kQ(t),d=i||a,f=p$(t,n),p=d?0:f,m=(d?-f:0)+1;return(0,H.jsx)(W$,{className:`react-calendar__month-view__days`,count:7,dateTransform:e=>{let t=new Date;return t.setFullYear(l,u,e),r$(t)},dateType:`day`,hover:r,end:(()=>{if(i)return m+42-1;let e=o$(t);if(a){let t=new Date;return t.setFullYear(l,u,e),t.setHours(0,0,0,0),e+(7-p$(t,n)-1)}return e})(),renderTile:({date:e,...r})=>(0,H.jsx)(t1,{...c,...r,activeStartDate:t,calendarType:n,currentMonthIndex:u,date:e},e.getTime()),offset:p,start:m,value:o,valueType:s})}var r1=`react-calendar__month-view__weekdays`,i1=`${r1}__weekday`;function a1(e){let{calendarType:t,formatShortWeekday:n=SQ,formatWeekday:r=CQ,locale:i,onMouseLeave:a}=e,o=XQ(new Date),s=OQ(o),c=kQ(o),l=[];for(let e=1;e<=7;e+=1){let a=new Date(s,c,e-p$(o,t)),u=r(i,a);l.push((0,H.jsx)(`div`,{className:U(i1,j$(a)&&`${i1}--current`,M$(a,t)&&`${i1}--weekend`),children:(0,H.jsx)(`abbr`,{"aria-label":u,title:u,children:n(i,a).replace(`.`,``)})},e))}return(0,H.jsx)(I$,{className:r1,count:7,onFocus:a,onMouseOver:a,children:l})}var o1=`react-calendar__tile`;function s1(e){let{onClickWeekNumber:t,weekNumber:n}=e,r=(0,H.jsx)(`span`,{children:n});if(t){let{date:t,onClickWeekNumber:n,weekNumber:i,...a}=e;return(0,H.jsx)(`button`,{...a,className:o1,onClick:e=>n(i,t,e),type:`button`,children:r})}else{let{date:t,onClickWeekNumber:n,weekNumber:i,...a}=e;return(0,H.jsx)(`div`,{...a,className:o1,children:r})}}function c1(e){let{activeStartDate:t,calendarType:n,onClickWeekNumber:r,onMouseLeave:i,showFixedNumberOfWeeks:a}=e,o=(()=>{if(a)return 6;let e=o$(t)-(7-p$(t,n));return 1+Math.ceil(e/7)})(),s=(()=>{let e=OQ(t),r=kQ(t),i=AQ(t),a=[];for(let t=0;t<o;t+=1)a.push(g$(new Date(e,r,i+t*7),n));return a})();return(0,H.jsx)(I$,{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,n)).map((e,t)=>{let n=s[t];if(!n)throw Error(`date is not defined`);return(0,H.jsx)(s1,{date:n,onClickWeekNumber:r,weekNumber:e},e)})})}function l1(e){if(e){for(let[t,n]of Object.entries(c$))if(n.includes(e))return t}return s$.ISO_8601}function u1(e){let{activeStartDate:t,locale:n,onMouseLeave:r,showFixedNumberOfWeeks:i}=e,{calendarType:a=l1(n),formatShortWeekday:o,formatWeekday:s,onClickWeekNumber:c,showWeekNumbers:l,...u}=e;function d(){return(0,H.jsx)(a1,{calendarType:a,formatShortWeekday:o,formatWeekday:s,locale:n,onMouseLeave:r})}function f(){return l?(0,H.jsx)(c1,{activeStartDate:t,calendarType:a,onClickWeekNumber:c,onMouseLeave:r,showFixedNumberOfWeeks:i}):null}function p(){return(0,H.jsx)(n1,{calendarType:a,...u})}let m=`react-calendar__month-view`;return(0,H.jsx)(`div`,{className:U(m,l?`${m}--weekNumbers`:``),children:(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-end`},children:[f(),(0,H.jsxs)(`div`,{style:{flexGrow:1,width:`100%`},children:[d(),p()]})]})})}var d1=`react-calendar__year-view__months__month`;function f1({classes:e=[],formatMonth:t=bQ,formatMonthYear:n=xQ,...r}){let{date:i,locale:a}=r;return(0,H.jsx)(G$,{...r,classes:[...e,d1],formatAbbr:n,maxDateTransform:$Q,minDateTransform:XQ,view:`year`,children:t(a,i)})}function p1(e){let{activeStartDate:t,hover:n,value:r,valueType:i,...a}=e,o=OQ(t);return(0,H.jsx)(W$,{className:`react-calendar__year-view__months`,dateTransform:e=>{let t=new Date;return t.setFullYear(o,e,1),XQ(t)},dateType:`month`,end:11,hover:n,renderTile:({date:e,...n})=>(0,H.jsx)(f1,{...a,...n,activeStartDate:t,date:e},e.getTime()),start:0,value:r,valueType:i})}function m1(e){function t(){return(0,H.jsx)(p1,{...e})}return(0,H.jsx)(`div`,{className:`react-calendar__year-view`,children:t()})}var h1=`react-calendar`,g1=[`century`,`decade`,`year`,`month`],_1=[`decade`,`year`,`month`,`day`],v1=new Date;v1.setFullYear(1,0,1),v1.setHours(0,0,0,0);var y1=new Date(864e13);function b1(e){return e instanceof Date?e:new Date(e)}function x1(e,t){return g1.slice(g1.indexOf(e),g1.indexOf(t)+1)}function S1(e,t,n){return x1(t,n).indexOf(e)!==-1}function C1(e,t,n){return e&&S1(e,t,n)?e:n}function w1(e){return _1[g1.indexOf(e)]}function T1(e,t){let n=Array.isArray(e)?e[t]:e;if(!n)return null;let r=b1(n);if(Number.isNaN(r.getTime()))throw Error(`Invalid date: ${e}`);return r}function E1({value:e,minDate:t,maxDate:n,maxDetail:r},i){let a=T1(e,i);if(!a)return null;let o=w1(r);return L$((()=>{switch(i){case 0:return v$(o,a);case 1:return C$(o,a);default:throw Error(`Invalid index value: ${i}`)}})(),t,n)}var D1=e=>E1(e,0),O1=e=>E1(e,1),k1=e=>[D1,O1].map(t=>t(e));function A1({maxDate:e,maxDetail:t,minDate:n,minDetail:r,value:i,view:a}){return v$(C1(a,r,t),D1({value:i,minDate:n,maxDate:e,maxDetail:t})||new Date)}function j1({activeStartDate:e,defaultActiveStartDate:t,defaultValue:n,defaultView:r,maxDate:i,maxDetail:a,minDate:o,minDetail:s,value:c,view:l}){let u=C1(l,s,a),d=e||t;return d?v$(u,d):A1({maxDate:i,maxDetail:a,minDate:o,minDetail:s,value:c||n,view:l||r})}function M1(e){return e&&(!Array.isArray(e)||e.length===1)}function N1(e,t){return e instanceof Date&&t instanceof Date&&e.getTime()===t.getTime()}var P1=(0,I.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=y1,maxDetail:x=`month`,minDate:S=v1,minDetail:C=`century`,navigationAriaLabel:w,navigationAriaLive:T,navigationLabel:E,next2AriaLabel:D,next2Label:O,nextAriaLabel:ee,nextLabel:te,onActiveStartDateChange:k,onChange:A,onClickDay:j,onClickDecade:M,onClickMonth:ne,onClickWeekNumber:re,onClickYear:ie,onDrillDown:ae,onDrillUp:oe,onViewChange:N,prev2AriaLabel:se,prev2Label:ce,prevAriaLabel:P,prevLabel:le,returnValue:ue=`start`,selectRange:de,showDoubleView:F,showFixedNumberOfWeeks:fe,showNavigation:pe=!0,showNeighboringCentury:me,showNeighboringDecade:he,showNeighboringMonth:ge=!0,showWeekNumbers:_e,tileClassName:ve,tileContent:ye,tileDisabled:be,value:xe,view:Se}=e,[Ce,L]=(0,I.useState)(s),[R,z]=(0,I.useState)(null),[we,Te]=(0,I.useState)(Array.isArray(c)?c.map(e=>e===null?null:b1(e)):c==null?null:b1(c)),[Ee,De]=(0,I.useState)(l),Oe=n||Ce||j1({activeStartDate:n,defaultActiveStartDate:s,defaultValue:c,defaultView:l,maxDate:b,maxDetail:x,minDate:S,minDetail:C,value:xe,view:Se}),ke=(()=>{let e=de&&M1(we)||xe===void 0?we:xe;return e?Array.isArray(e)?e.map(e=>e===null?null:b1(e)):e===null?null:b1(e):null})(),Ae=w1(x),je=C1(Se||Ee,C,x),Me=x1(C,x),B=de?R:null,Ne=Me.indexOf(je)<Me.length-1,Pe=Me.indexOf(je)>0,Fe=(0,I.useCallback)(e=>(()=>{switch(ue){case`start`:return D1;case`end`:return O1;case`range`:return k1;default:throw Error(`Invalid returnValue.`)}})()({maxDate:b,maxDetail:x,minDate:S,value:e}),[b,x,S,ue]),Ie=(0,I.useCallback)((e,t)=>{L(e);let n={action:t,activeStartDate:e,value:ke,view:je};k&&!N1(Oe,e)&&k(n)},[Oe,k,ke,je]),Le=(0,I.useCallback)((e,t)=>{let n=(()=>{switch(je){case`century`:return M;case`decade`:return ie;case`year`:return ne;case`month`:return j;default:throw Error(`Invalid view: ${je}.`)}})();n&&n(e,t)},[j,M,ne,ie,je]),Re=(0,I.useCallback)((e,t)=>{if(!Ne)return;Le(e,t);let n=Me[Me.indexOf(je)+1];if(!n)throw Error(`Attempted to drill down from the lowest view.`);L(e),De(n);let r={action:`drillDown`,activeStartDate:e,value:ke,view:n};k&&!N1(Oe,e)&&k(r),N&&je!==n&&N(r),ae&&ae(r)},[Oe,Ne,k,Le,ae,N,ke,je,Me]),ze=(0,I.useCallback)(()=>{if(!Pe)return;let e=Me[Me.indexOf(je)-1];if(!e)throw Error(`Attempted to drill up from the highest view.`);let t=v$(e,Oe);L(t),De(e);let n={action:`drillUp`,activeStartDate:t,value:ke,view:e};k&&!N1(Oe,t)&&k(n),N&&je!==e&&N(n),oe&&oe(n)},[Oe,Pe,k,oe,N,ke,je,Me]),Be=(0,I.useCallback)((e,t)=>{let n=ke;Le(e,t);let i=de&&!M1(n),a;if(de)if(i)a=v$(Ae,e);else{if(!n)throw Error(`previousValue is required`);if(Array.isArray(n))throw Error(`previousValue must not be an array`);a=D$(Ae,n,e)}else a=Fe(e);let o=!de||i||_?A1({maxDate:b,maxDetail:x,minDate:S,minDetail:C,value:a,view:je}):null;t.persist(),L(o),Te(a);let s={action:`onChange`,activeStartDate:o,value:a,view:je};if(k&&!N1(Oe,o)&&k(s),A)if(de){if(!M1(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)},[Oe,r,Fe,_,b,x,S,C,k,A,Le,de,ke,Ae,je]);function Ve(e){z(e)}function He(){z(null)}(0,I.useImperativeHandle)(t,()=>({activeStartDate:Oe,drillDown:Re,drillUp:ze,onChange:Be,setActiveStartDate:Ie,value:ke,view:je}),[Oe,Re,ze,Be,Ie,ke,je]);function Ue(e){let t={activeStartDate:e?b$(je,Oe):v$(je,Oe),hover:B,locale:y,maxDate:b,minDate:S,onClick:Ne?Re:Be,onMouseOver:de?Ve:void 0,tileClassName:ve,tileContent:ye,tileDisabled:be,value:ke,valueType:Ae};switch(je){case`century`:return(0,H.jsx)(Y$,{formatYear:g,showNeighboringCentury:me,...t});case`decade`:return(0,H.jsx)($$,{formatYear:g,showNeighboringDecade:he,...t});case`year`:return(0,H.jsx)(m1,{formatMonth:f,formatMonthYear:p,...t});case`month`:return(0,H.jsx)(u1,{calendarType:i,formatDay:u,formatLongDate:d,formatShortWeekday:m,formatWeekday:h,onClickWeekNumber:re,onMouseLeave:de?He:void 0,showFixedNumberOfWeeks:fe===void 0?F:fe,showNeighboringMonth:ge,showWeekNumbers:_e,...t});default:throw Error(`Invalid view: ${je}.`)}}function We(){return pe?(0,H.jsx)(P$,{activeStartDate:Oe,drillUp:ze,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:se,prev2Label:ce,prevAriaLabel:P,prevLabel:le,setActiveStartDate:Ie,showDoubleView:F,view:je,views:Me}):null}return(0,H.jsxs)(`div`,{className:U(h1,de&&(Array.isArray(ke)?ke:[ke]).length===1&&`${h1}--selectRange`,F&&`${h1}--doubleView`,a),"data-testid":o,ref:v,children:[We(),(0,H.jsxs)(`div`,{className:`${h1}__viewContainer`,onBlur:de?He:void 0,onMouseLeave:de?He:void 0,children:[Ue(),F?Ue(!0):null]})]})}),F1=G(Z,{shouldForwardProp:e=>e!==`expand`})(({expand:e})=>({width:e?`100%`:void 0}));function I1({open:e}){let t=R(e);return(0,H.jsx)(X,{title:`Filter`,enterDelay:300,children:(0,H.jsx)(Gm,{onClick:()=>t(!0),size:`small`,children:(0,H.jsx)(TT,{})})})}function L1(e){let t=e.copyToClipboardRows;return(0,H.jsx)($C,{children:(0,H.jsxs)(dw,{children:[e.columns.map(t=>(0,H.jsxs)(F1,{align:t.numeric?`right`:`left`,expand:t.expanded,sortDirection:e.sort.orderBy===t.id&&e.sort.order,children:[(0,H.jsx)(X,{title:`Sort`,placement:t.numeric?`bottom-end`:`bottom-start`,enterDelay:300,children:(0,H.jsx)(vw,{active:e.sort.orderBy===t.id,direction:e.sort.order,onClick:()=>e.sort.handleRequestSort(t.id),children:t.label})}),t.openFilterDialog?(0,H.jsx)(I1,{open:t.openFilterDialog}):void 0]},t.id)),e.showDetailsCol?(0,H.jsx)(F1,{padding:`checkbox`,children:t?(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(Gm,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>J1(e.columns,t),size:`large`,children:(0,H.jsx)(jT,{})})}):void 0}):void 0]})})}var R1=new Intl.DateTimeFormat([],{year:`numeric`,month:`short`,day:`numeric`}),z1=new Intl.DateTimeFormat([],{year:`numeric`,month:`long`}),B1=G(P1)(({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 V1(e){let[t,n]=(0,I.useState)(!1),r=e.zoom.current_date_zoom?e.zoom.current_date_zoom.start:e.zoom.default_date_range[0],i=tE(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:tE(t[1],1)}),n(!1)}return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`span`,{children:[R1.format(e.zoom.current_date_zoom?.start??e.zoom.default_date_range[0]),` `,`- `,R1.format(e.zoom.current_date_zoom?.end??e.zoom.default_date_range[1])]}),(0,H.jsx)(X,{title:`Zoom To Date Range`,children:(0,H.jsx)(Gm,{onClick:()=>n(!0),size:`large`,children:(0,H.jsx)(YT,{})})}),(0,H.jsx)(X,{title:`Reset Date Range`,children:(0,H.jsx)(Gm,{onClick:()=>e.zoom.set_date_zoom_range(void 0),size:`large`,children:(0,H.jsx)(mre,{})})}),(0,H.jsxs)(ky,{open:t,onClose:()=>n(!1),children:[(0,H.jsxs)(My,{children:[`Select Date Range `,z1.format(e.zoom.default_date_range[0])]}),(0,H.jsx)(jy,{children:(0,H.jsx)(B1,{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,H.jsx)(Ay,{children:(0,H.jsx)(Y,{onClick:()=>n(!1),children:`Close`})})]})]})}var H1=(0,I.memo)(function({zoom:e,tpage:t,count:n}){let r;return e&&e.type===`Last30Days`?r=(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(X,{title:`Last 24 hours`,children:(0,H.jsx)(Y,{onClick:()=>e.set_days_back(1),style:{color:`rgba(0, 0, 0, 0.54)`},children:`24h`})}),(0,H.jsx)(X,{title:`Last 2 days`,children:(0,H.jsx)(Y,{onClick:()=>e.set_days_back(2),style:{color:`rgba(0, 0, 0, 0.54)`},children:`2d`})}),(0,H.jsx)(X,{title:`Last 3 days`,children:(0,H.jsx)(Y,{onClick:()=>e.set_days_back(3),style:{color:`rgba(0, 0, 0, 0.54)`},children:`3d`})}),(0,H.jsx)(X,{title:`Last 4 days`,children:(0,H.jsx)(Y,{onClick:()=>e.set_days_back(4),style:{color:`rgba(0, 0, 0, 0.54)`},children:`4d`})}),(0,H.jsx)(X,{title:`Last 5 days`,children:(0,H.jsx)(Y,{onClick:()=>e.set_days_back(5),style:{color:`rgba(0, 0, 0, 0.54)`},children:`5d`})}),(0,H.jsx)(X,{title:`Last 6 days`,children:(0,H.jsx)(Y,{onClick:()=>e.set_days_back(6),style:{color:`rgba(0, 0, 0, 0.54)`},children:`6d`})}),(0,H.jsx)(X,{title:`Last 1 week`,children:(0,H.jsx)(Y,{onClick:()=>e.set_days_back(7),style:{color:`rgba(0, 0, 0, 0.54)`},children:`1w`})}),(0,H.jsx)(X,{title:`Last 2 weeks`,children:(0,H.jsx)(Y,{onClick:()=>e.set_days_back(14),style:{color:`rgba(0, 0, 0, 0.54)`},children:`2w`})}),(0,H.jsx)(X,{title:`Last 3 weeks`,children:(0,H.jsx)(Y,{onClick:()=>e.set_days_back(21),style:{color:`rgba(0, 0, 0, 0.54)`},children:`3w`})}),(0,H.jsx)(X,{title:`Last 30 days`,children:(0,H.jsx)(Y,{onClick:()=>e.set_days_back(null),style:{color:`rgba(0, 0, 0, 0.54)`},children:`30d`})})]}):e&&e.type===`ZoomIntoRange`?r=(0,H.jsx)(V1,{zoom:e}):e&&e.type===`ExtendDays`&&(r=(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(X,{title:`Extend 1 day previous`,children:(0,H.jsx)(Gm,{onClick:()=>e.extend(-1),size:`large`,children:(0,H.jsx)(KT,{})})}),(0,H.jsx)(q,{variant:`caption`,children:e.curStart.toLocaleDateString()+` to `+e.curEnd.toLocaleDateString()}),(0,H.jsx)(X,{title:`Extend 1 day`,children:(0,H.jsx)(Gm,{onClick:()=>e.extend(1),size:`large`,children:(0,H.jsx)(GT,{})})})]})),(0,H.jsxs)(rw,{children:[(0,H.jsx)(q,{color:`textSecondary`,variant:`caption`,children:`Rows per page:`}),(0,H.jsx)(oS,{style:{marginLeft:8,marginRight:`1em`},value:t.rowsPerPage,SelectDisplayProps:{style:{color:`rgba(0, 0, 0, 0.54)`}},input:(0,H.jsx)(df,{}),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,H.jsx)(wx,{value:e,children:e},e))}),(0,H.jsx)(q,{color:`textSecondary`,variant:`caption`,children:`${n===0?0:t.page*t.rowsPerPage+1}-${Math.min(n,(t.page+1)*t.rowsPerPage)} of ${n}`}),(0,H.jsx)(Gm,{onClick:()=>t.setPage(0),disabled:t.page===0,"aria-label":`First Page`,size:`large`,children:(0,H.jsx)(ET,{})}),(0,H.jsx)(Gm,{onClick:()=>t.setPage(t.page-1),disabled:t.page===0,"aria-label":`Previous Page`,size:`large`,children:(0,H.jsx)(FT,{})}),(0,H.jsx)(Gm,{onClick:()=>t.setPage(t.page+1),disabled:t.page>=Math.ceil(n/t.rowsPerPage)-1,"aria-label":`Next Page`,size:`large`,children:(0,H.jsx)(IT,{})}),(0,H.jsx)(Gm,{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,H.jsx)(RT,{})}),e?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{style:{flexGrow:1}}),r]}):void 0]})}),U1=class extends I.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,H.jsxs)(LC,{children:[t.map((t,n)=>(0,H.jsxs)(dw,{children:[this.props.columns.map(e=>(0,H.jsx)(F1,{align:e.numeric?`right`:`left`,expand:e.expanded,children:e.Cell?(0,H.jsx)(e.Cell,{row:t}):e.getDisplay(t)},e.id)),e?(0,H.jsx)(F1,{padding:`checkbox`,children:(0,H.jsx)(Gm,{onClick:n=>e(n,t),size:`large`,children:(0,H.jsx)(zT,{})})}):void 0]},n)),n>0?(0,H.jsx)(dw,{style:{height:53*n},children:(0,H.jsx)(Z,{colSpan:this.props.columns.length+ +!!this.props.onClickDetails,style:{textAlign:`center`},children:t.length===0?this.props.emptyMessage:void 0})}):void 0]})}};function W1(e){let[t,n]=(0,I.useState)(void 0);return(0,I.useMemo)(()=>{let r;return r=e.type===`Last30`?{type:`Last30Days`,set_days_back:e=>{if(e){let t=new Date;n({start:tE(t,-e),end:iE(t,1)})}else n(void 0)}}:{type:`ZoomIntoRange`,default_date_range:[e.month,nE(e.month,1)],current_date_zoom:t,set_date_zoom_range:n},{zoom:r,zoomRange:t}},[e,t,n])}function G1(){let[e,t]=(0,I.useState)(0),[n,r]=(0,I.useState)(10);return(0,I.useMemo)(()=>({page:e,setPage:t,rowsPerPage:n,setRowsPerPage:r}),[e,t,n,r])}function K1(e,t,n){let[r,i]=(0,I.useState)(e),[a,o]=(0,I.useState)(n??`asc`);return(0,I.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 q1(e,t){let n=`<table>
|
|
345
|
+
<thead><tr>`;for(let t of e)t.ignoreDuringExport||(n+=`<th>`+t.label+`</th>`);n+=`</tr></thead>
|
|
346
|
+
<tbody>
|
|
347
|
+
`;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>
|
|
348
|
+
`}return n+=`</tbody>
|
|
349
|
+
</table>`,n}function J1(e,t){oA(q1(e,t))}var Y1=[{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 X1(e,t,n){let[r,i]=(0,I.useState)(void 0),a;return e&&e===`Last30Days`?a={type:`Last30Days`,set_days_back:e=>{if(e){let t=new Date;i({start:tE(t,-e),end:iE(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 Z1=(0,I.memo)(function(e){let t=R(bI),n=K1(0,Y1),[r,i]=(0,I.useState)(gO.empty()),[a,o]=(0,I.useState)(10),[s,c]=(0,I.useState)(void 0),l=X1(e.zoomType,e.extendDateRange,e.default_date_range),u=JX(e.points,l.zoomRange,n.sortOn);return(0,H.jsx)(`div`,{style:{width:`100%`,marginTop:`1em`},children:Q.of(u).toSortedArray(([e])=>e).map(([u,d])=>{let f=Math.min(r.get(u)??0,Math.ceil(d.material.length/a));return(0,H.jsxs)(ree,{expanded:u===s,onChange:(e,t)=>c(t?u:void 0),children:[(0,H.jsxs)(Sm,{expandIcon:(0,H.jsx)(CT,{}),children:[(0,H.jsx)(q,{variant:`h6`,style:{flexBasis:`33.33%`,flexShrink:0},children:u}),(0,H.jsxs)(q,{variant:`caption`,children:[d.material.length,` total parts, `,d.failedCnt,` failed`]})]}),(0,H.jsx)(see,{children:(0,H.jsxs)(`div`,{style:{width:`100%`},children:[(0,H.jsxs)(AC,{children:[(0,H.jsx)(L1,{columns:Y1,sort:n,showDetailsCol:!0}),(0,H.jsx)(U1,{columns:Y1,pageData:Q.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,H.jsx)(H1,{tpage:{page:f,rowsPerPage:a,setPage:e=>i(r.set(u,e)),setRowsPerPage:o},count:d.material.length,zoom:l.zoom})]})})]},u)})})}),Q1=20,$1=20,e0=120,t0=20;function n0({link:e,path:t,strokeWidth:n,setTooltip:r}){let[i,a]=(0,I.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,H.jsx)(`path`,{d:t,stroke:i?Nr[600]:Nr[300],strokeWidth:n,opacity:.2,fill:`none`,onMouseMove:o,onMouseLeave:s})}function r0({node:e}){return e.x1===void 0||e.x0===void 0||e.y1===void 0||e.y0===void 0?null:(0,H.jsxs)(`g`,{transform:`translate(${e.x0}, ${e.y0})`,children:[(0,H.jsx)(`rect`,{width:e.x1-e.x0,height:e.y1-e.y0,fill:Nr[800],opacity:.8,stroke:`none`}),(0,H.jsx)(`text`,{x:18,y:(e.y1-e.y0)/2,children:e.name})]})}var i0=(0,I.memo)(function({data:e,setTooltip:t,parentHeight:n,parentWidth:r}){let{nodes:i,links:a}=(0,I.useMemo)(()=>{let t=LZ(e);if(t.nodes.length===0)return{nodes:[],links:[]};let i=hZ().nodeWidth(10).nodePadding(10).nodeAlign(iZ).extent([[Q1,$1],[r-e0,n-t0-$1]])({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=NZ();return(0,H.jsxs)(`svg`,{width:r,height:n,children:[(0,H.jsx)(`g`,{children:i.map((e,t)=>(0,H.jsx)(r0,{node:e},t))}),(0,H.jsx)(`g`,{children:a.map((e,n)=>(0,H.jsx)(n0,{link:e,path:o(e),strokeWidth:Math.max(e.width??1,1),setTooltip:t},n))})]})});function a0({tooltip:e}){return e===null?null:(0,H.jsxs)(`div`,{children:[e.data.source.name,` ➞ `,e.data.target.name,`: `,e.data.value,` parts`]})}var o0=(0,I.memo)(function({data:e}){let t=(0,I.useMemo)(()=>P(null),[]),n=R(t);return(0,H.jsx)(`div`,{style:{position:`relative`},children:(0,H.jsx)(KA,{sx:{height:{xs:`calc(100vh - 230px)`,md:`calc(100vh - 182px)`,xl:`calc(100vh - 130px)`},width:`100%`},chart:({height:t,width:r})=>(0,H.jsx)(i0,{data:e,setTooltip:n,parentHeight:t,parentWidth:r}),tooltipAtom:t,TooltipContent:a0})})}),s0=AO(e=>e(HI)?`aaa`:void 0),c0=AO(e=>e(HI)?`CMM`:void 0),l0=P(!1);function u0(e){let[t,n]=z(s0),[r,i]=z(c0),[a,o]=z(l0),s,c=e.restrictToPart||t;c&&r&&(s=e.inspectionlogs.get(new rL(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,H.jsxs)(J,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,H.jsxs)(J,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[e.subtitle?(0,H.jsx)(q,{variant:`subtitle1`,children:e.subtitle}):void 0,(0,H.jsx)(J,{sx:{flexGrow:1}}),e.onlyTable?void 0:(0,H.jsx)(Ry,{size:`small`,children:(0,H.jsxs)(oS,{autoWidth:!0,value:a?`table`:`sankey`,onChange:e=>o(e.target.value===`table`),children:[(0,H.jsx)(wx,{value:`sankey`,children:`Sankey`},`sankey`),(0,H.jsx)(wx,{value:`table`,children:`Table`},`table`)]})}),(0,H.jsx)(Ry,{size:`small`,children:(0,H.jsxs)(oS,{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,H.jsx)(wx,{value:``,children:(0,H.jsx)(`em`,{children:`Select Inspection Type`})},0),u.map(e=>(0,H.jsx)(wx,{value:e,children:e},e))]})}),e.restrictToPart===void 0?(0,H.jsx)(Ry,{size:`small`,children:(0,H.jsxs)(oS,{name:`inspection-sankey-select-part`,autoWidth:!0,displayEmpty:!0,value:c||``,onChange:e=>n(e.target.value),children:[c?void 0:(0,H.jsx)(wx,{value:``,children:(0,H.jsx)(`em`,{children:`Select Part`})},0),l.map(e=>(0,H.jsx)(wx,{value:e,children:(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(LU,{part:e,size:30}),(0,H.jsx)(`span`,{style:{marginRight:`1em`},children:e})]})},e))]})}):void 0,s?(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(Gm,{onClick:()=>s?QX(c||``,r||``,s):void 0,style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,H.jsx)(jT,{})})}):void 0]}),(0,H.jsx)(`main`,{children:s?a||e.onlyTable?(0,H.jsx)(Z1,{zoomType:e.zoomType,points:s,default_date_range:e.default_date_range,extendDateRange:e.extendDateRange,hideOpenDetailColumn:e.hideOpenDetailColumn}):(0,H.jsx)(o0,{data:s}):void 0})]})}var d0=P(null),f0=BO(P(async(e,{signal:t})=>{let n=e(d0);if(n==null||Ut===void 0)return gO.empty();let r=await Ut.get(n.curStart,n.curEnd,t);return Q.of(r).flatMap(sL).filter(e=>e.key.part===n.part).toLookupMap(e=>e.key,e=>e.entry.cntr,e=>e.entry)}),e=>e??gO.empty()),p0=BO(P(async e=>{let t=e(d0);if(t==null)return gO.empty();let n=[];for(let e of Kt)n.push(await e.get(t.curStart,t.curEnd));return Q.of(n).flatMap(e=>e).flatMap(sL).filter(e=>e.key.part===t.part).toLookupMap(e=>e.key,e=>e.entry.cntr,e=>e.entry)}),e=>e??gO.empty()),m0=P(e=>gO.union((e,t)=>e.union(t),e(f0),e(p0)));function h0(e){return t=>t===null?null:e<0?{curStart:tE(t.curStart,e),curEnd:t.curEnd,part:t.part}:{curStart:t.curStart,curEnd:tE(t.curEnd,e),part:t.part}}var g0=[{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 _0(e){let t=WI(),n=K1(0,g0),r=G1(),i=R(bI),a=Math.min(r.page,Math.ceil(e.failed.length/r.rowsPerPage)),o=Q.of(e.failed).sortBy(n.sortOn);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(AC,{children:[(0,H.jsx)(L1,{columns:g0,sort:n,showDetailsCol:!t}),(0,H.jsx)(U1,{columns:g0,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,H.jsx)(H1,{tpage:{...r,page:a},count:e.failed.length})]})}function v0(){let e=L(aL),t=(0,I.useMemo)(()=>{let t=bE();return YX(Q.of(e).flatMap(([e,t])=>t.valuesToLazySeq()),tE(t,-4),tE(t,1))},[e]);return(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(J,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,H.jsx)(q,{variant:`subtitle1`,children:`Inspections marked as failed in the last 5 days`}),(0,H.jsx)(J,{sx:{flexGrow:1}}),(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(Gm,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>eZ(t),size:`large`,children:(0,H.jsx)(jT,{})})})]}),(0,H.jsx)(_0,{failed:t})]})}function y0(){let e=WI(),t=R(bI),[n,r]=(0,I.useState)(e?`00000000i9`:``),[i,a]=(0,I.useState)(!1),[o,s]=(0,I.useState)(null);function c(){n&&n!==``&&(a(!0),s(null),Ut.materialForSerial(n).then(e=>{let i=Q.of(e).maxBy(e=>e.materialID);i?(t({type:`MatDetails`,details:i}),r(``),s(null)):s(`No material found with serial `+n)}).catch(e=>{zt.isApiException(e)?s(e.response):e instanceof Error?s(e.message):s(e)}).finally(()=>a(!1)))}return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(MS,{direction:`row`,spacing:2,sx:{alignItems:`center`,marginLeft:`auto`,marginRight:`auto`},children:[(0,H.jsx)(`div`,{children:(0,H.jsx)(Hw,{label:n===``?`Serial`:`Serial (press enter)`,value:n,onChange:e=>r(e.target.value),onKeyPress:e=>{e.key===`Enter`&&n!==``&&(e.preventDefault(),c())}})}),(0,H.jsx)(`div`,{children:(0,H.jsx)(Y,{variant:`contained`,color:`secondary`,disabled:n===``||i,onClick:c,children:i?(0,H.jsxs)(MS,{direction:`row`,spacing:2,children:[(0,H.jsx)(zm,{}),` Searching`]}):(0,H.jsx)(H.Fragment,{children:`Lookup`})})})]}),o&&o!==``?(0,H.jsx)(`div`,{children:o}):void 0]})}function b0(e){let t=e[0];if(t===void 0)return bE();let n=t.endUTC;for(let t of e)t.type===B.MachineCycle&&(n=t.endUTC);return n}function x0(){let e=L(wI),t=L(AI);return e?(0,H.jsx)(nW,{partName:e.partName,serial:e.serial,subtitle:`Path `+qX(XX(t))+` at `+b0(t).toLocaleString()}):(0,H.jsx)(`div`,{children:`Serial Details`})}function S0({setStep:e}){let t=L(wI),n=L(AI),r=R(d0),i=R(bI);return(0,H.jsxs)(MS,{direction:`row`,spacing:2,sx:{mt:`2em`},children:[t?(0,H.jsx)(Y,{variant:`contained`,color:`secondary`,onClick:()=>{let i=b0(n);r({part:t?.partName??``,curStart:cE(tE(i,-5)),curEnd:Sre(tE(i,5))}),e(2)},children:`Lookup Similar Paths`}):void 0,(0,H.jsx)(Y,{variant:`contained`,style:{marginLeft:`2em`},onClick:()=>{i(null),r(null),e(0)},children:`Reset`})]})}function C0(e){let t=L(CI),n=L(AI),[r,i]=z(d0),a=L(m0),o=R(bI);if(t===null)return null;function s(e){i(h0(e))}return(0,H.jsxs)(`div`,{children:[(0,H.jsx)(u0,{inspectionlogs:a,restrictToPart:t.partName,subtitle:`Paths for `+t.partName+` around `+b0(n).toLocaleString(),default_date_range:r?[r.curStart,r.curEnd]:[],zoomType:r?`ExtendDays`:void 0,extendDateRange:s,hideOpenDetailColumn:!0,onlyTable:!0}),(0,H.jsx)(Y,{variant:`contained`,style:{marginTop:`2em`},onClick:()=>{o(null),i(null),e.setStep(0)},children:`Reset`})]})}function w0(){let[e,t]=(0,I.useState)(0),n=L(bI),r=e;return r===0&&n&&(r=1),(0,H.jsxs)(MS,{direction:`column`,spacing:2,children:[(0,H.jsxs)(yC,{activeStep:r,orientation:`horizontal`,children:[(0,H.jsx)(zS,{children:(0,H.jsx)(nC,{children:`Select Material`})}),(0,H.jsx)(zS,{children:(0,H.jsx)(nC,{children:(0,H.jsx)(x0,{})})}),(0,H.jsx)(zS,{children:(0,H.jsx)(nC,{children:`Lookup similar paths`})})]}),r===0?(0,H.jsxs)(MS,{direction:`column`,spacing:4,children:[(0,H.jsx)(q,{children:`Enter a serial number, scan a barcode, or click on a material in the table below to see details.`}),(0,H.jsx)(y0,{}),(0,H.jsx)(v0,{})]}):r===1?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(IU,{fallback:(0,H.jsx)(lW,{}),children:(0,H.jsx)(sW,{})}),(0,H.jsx)(S0,{setStep:t})]}):r===2?(0,H.jsx)(IU,{children:(0,H.jsx)(C0,{setStep:t})}):void 0]})}function T0(){return GI(`Quality Material`),(0,H.jsx)(`main`,{style:{padding:`24px`},children:(0,H.jsx)(w0,{})})}var E0=(0,I.memo)(function(){GI(`Paths`);let e=L(aL);return(0,H.jsx)(u0,{inspectionlogs:(0,I.useMemo)(()=>{let t=bE(),n=tE(t,-6),r=tE(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:[tE(bE(),-6),tE(bE(),1)],subtitle:`Paths from the last 7 days`})}),D0=P(!1);function O0(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 k0({work:e}){return e.plannedQuantity<=e.completedQuantity?(0,H.jsx)(lT,{}):(0,H.jsx)(WT,{})}function A0(){let[e,t]=(0,I.useState)(null),n=L(CI),[r]=FI(),i=R(D0);return(0,H.jsx)(Hw,{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 j0(){let e=L(CI),t=L(Tie),n=R(D0),[r]=FI();return(0,H.jsx)(sb,{children:(t??[]).map(t=>(0,H.jsx)(hb,{children:(0,H.jsxs)(cb,{onClick:()=>{e&&r(e,t.workorderId),n(!1)},children:[(0,H.jsx)(bb,{children:(0,H.jsx)(k0,{work:t})}),(0,H.jsx)(Tb,{primary:t.workorderId,secondary:O0(t)})]})},t.workorderId))})}var M0=(0,I.memo)(function(){let[e,t]=z(D0),n;return n=e?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(My,{children:`Select Workorder`}),(0,H.jsx)(jy,{children:(0,H.jsxs)(IU,{children:[(0,H.jsx)(A0,{}),(0,H.jsx)(j0,{})]})}),(0,H.jsx)(Ay,{children:(0,H.jsx)(Y,{onClick:()=>t(!1),color:`primary`,children:`Cancel`})})]}):(0,H.jsx)(`p`,{children:`None`}),(0,H.jsx)(ky,{open:e,onClose:()=>t(!1),maxWidth:`md`,children:n})}),N0=P(!1);function P0(){let[e,t]=(0,I.useState)(null),n=L(CI),[r]=NI(),i=R(N0);return(0,H.jsx)(Hw,{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 F0(){let e=L(CI),[t]=NI(),n=L(EL),r=Q.of(n).sortBy(e=>e),i=R(N0);return e===null?null:(0,H.jsx)(sb,{children:r.map(n=>(0,H.jsx)(hb,{children:(0,H.jsxs)(cb,{onClick:()=>{t({mat:e,inspType:n,inspect:!0}),i(!1)},children:[(0,H.jsx)(bb,{children:(0,H.jsx)(UT,{})}),(0,H.jsx)(Tb,{primary:n})]})},n))})}function I0(){let e=R(N0),t=L(EI);return t===null||t.materialID<0?null:(0,H.jsx)(Y,{color:`primary`,onClick:()=>e(!0),children:`Signal Inspection`})}var L0=(0,I.memo)(function(){let[e,t]=z(N0),n;return n=e?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(My,{children:`Select Inspection Type`}),(0,H.jsx)(jy,{children:(0,H.jsxs)(IU,{children:[(0,H.jsx)(P0,{}),(0,H.jsx)(F0,{})]})}),(0,H.jsx)(Ay,{children:(0,H.jsx)(Y,{onClick:()=>t(!1),color:`primary`,children:`Cancel`})})]}):(0,H.jsx)(`p`,{children:`None`}),(0,H.jsx)(ky,{open:e,onClose:()=>t(!1),maxWidth:`md`,children:n})}),R0=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 z0(e){switch(e.type){case 0:return`Material-`+(e.identifier??(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 B0(e){switch(e.type){case 0:return[e.type,e.material,e.identifier];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 V0(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 H0(e,t){if(!e)return[];let n=V0(t);if(!n.completedMaterial)return[];let r=[],i=new Map,a=new Map,o=new Map,s=0;for(let[t,c]of Q.of(n.material).sortBy(([e])=>e.left,([e])=>e.top))switch(c.action.type){case V.UnloadToCompletedMaterial:case V.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===V.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 V.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===ot.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;case V.LoadingToBasket:{let i=c.action.loadToBasketId;if(i===void 0)break;let a=n.baskets.get(i),s=o.get(i)??0;o.set(i,s+1),r.push({fromX:t.right,fromY:t.top+t.height/2,toX:a===void 0?e.right-10:a.left+20,toY:a===void 0?t.top+t.height/2:a.top+50+20*s,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 U0(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 W0(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 G0=(0,I.memo)(function({container:e,arrowsWithRefs:t}){let[,n]=(0,I.useState)({height:window.innerHeight,width:window.innerWidth});return(0,I.useEffect)(()=>{function e(){n({height:window.innerHeight,width:window.innerWidth})}return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[n]),(0,H.jsx)(`g`,{children:H0(e.current?U0(e.current):null,t.collectValues(e=>e.elem.current?{...e,elem:U0(e.elem.current)}:null)).map((e,t)=>(0,H.jsx)(`path`,{style:{fill:`none`,stroke:`rgba(0,0,0,0.15)`,strokeWidth:2},d:W0(e),markerEnd:`url(#arrow)`},t))})}),K0=(0,I.createContext)(void 0),q0=(0,I.memo)(function({children:e,hideArrows:t,whiteBackground:n}){let r=(0,I.useRef)(null),[i,a]=(0,I.useState)(gO.empty()),o=(0,I.useMemo)(()=>({registerNode(e,t,n){a(t&&n?r=>r.set(e,{...t,elem:n}):t=>t.delete(e))}}),[a]);return(0,H.jsxs)(`div`,{style:{position:`relative`},children:[(0,H.jsxs)(`svg`,{style:{position:`absolute`,pointerEvents:`none`,width:`100%`,height:`100%`,top:0,right:0,zIndex:-1,backgroundColor:n?`white`:`#F8F8F8`},children:[(0,H.jsx)(`defs`,{children:(0,H.jsx)(`marker`,{id:`arrow`,markerWidth:6,markerHeight:10,refX:`0`,refY:`3`,orient:`auto`,markerUnits:`strokeWidth`,children:(0,H.jsx)(`path`,{d:`M0,0 L0,6 L5,3 z`,fill:`rgba(0,0,0,0.15)`})})}),t?void 0:(0,H.jsx)(G0,{container:r,arrowsWithRefs:i})]}),(0,H.jsx)(`div`,{ref:r,children:(0,H.jsx)(K0.Provider,{value:o,children:e})})]})});function J0(e){let t=(0,I.useContext)(K0);if(!t)throw Error(`useMoveMaterialArrowRef must be used within a MoveMaterialArrowContainer`);let n=(0,I.useRef)(null);return(0,I.useEffect)(()=>{let r=z0(e);return t.registerNode(r,e,n),()=>{t.registerNode(r,null,null)}},[t,...B0(e)]),n}function Y0({kind:e,children:t}){return(0,H.jsx)(`div`,{ref:J0(e),"data-move-material-identifier":z0(e),children:t})}var X0=45,Z0=55;function Q0(){let e=L(GO),t=L(yO),n=L(yr),r=Q.of(e.material).filter(e=>e.location.type===ot.OnPallet||e.action.type===V.Loading).toRLookup(e=>e.location.palletNum??e.action.loadOntoPalletNum??0),i=Q.of(e.material).filter(e=>e.location.type===ot.InBasket&&e.location.basketId!==null&&e.location.basketId!==void 0||e.action.type===V.LoadingToBasket&&e.action.loadToBasketId!==null&&e.action.loadToBasketId!==void 0).toRLookup(e=>e.location.basketId??e.action.loadToBasketId??0),a=Q.ofObject(e.pallets).filter(([e,t])=>t.currentPalletLocation.loc===rt.LoadUnload).toOrderedMap(([e,t])=>[t.currentPalletLocation.num,{lulNum:t.currentPalletLocation.num,pal:{pallet:t,mats:r.get(t.palletNum)??[]},basket:null,staging:[],sources:[]}]),o=Q.ofObject(e.pallets).filter(([,e])=>e.currentPalletLocation.loc===rt.Machine||e.currentPalletLocation.loc===rt.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===rt.Machine),o=a?r.get(a.palletNum)??[]:null,s=i.find(e=>e.currentPalletLocation.loc===rt.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=Q.ofObject(e.pallets).filter(([e,t])=>t.currentPalletLocation.loc===rt.Buffer||t.currentPalletLocation.loc===rt.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=tE(new Date,-7),d=t.valuesToLazySeq().filter(e=>e.routeEndUTC>u).concat(Q.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=Q.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??=fO.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=fO.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=Q.of(r?.pal?.mats??[]).toLookup(n=>{if(n.action.type===V.Machining)return`Machining`;if(n.action.type!==V.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 Q.ofObject(e.baskets??{}).map(([e,t])=>t).sortBy(e=>e.basketId)){let e={basket:t,mats:i.get(t.basketId)??[]};switch(t.position.location){case _t.Storage:e.mats.length>0?v+=1:_+=1;break;case _t.LoadUnload:case _t.LoadStationStaging:{let n=t.position.locationNum;if(n===null){g.set(t.basketId,e);break}let r=t.position.location===_t.LoadUnload?h:m,i=r.get(n)??[];i.push(e),r.set(n,i);break}case _t.InTransit:g.set(t.basketId,e);break}}let y=0,b=0;return a=a.mapValues(e=>{let t=new Map,r=Q.of(e.pal?.mats??e.basket?.mats??[]).filter(e=>e.location.type!==ot.OnPallet).toRArray();for(let e of r){if(e.location.type===ot.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===ot.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=Q.of(h.get(e.lulNum)??[]).sortBy(e=>e.basket.position.locationNum).toRArray();for(let e of i.slice(1))g.set(e.basket.basketId,e);let a=new Set(Q.of(e.pal?.mats??[]).collect(e=>e.action.loadFromBasketId??null).toRArray()),o=Q.of(m.get(e.lulNum)??[]).filter(e=>!a.has(e.basket.basketId)).sortBy(e=>e.basket.position.locationNum).toRArray();y=Math.max(y,o.length);let s=Q.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:Q.of(g.values()).toRArray(),storageBaskets:_+v>0?{empty:_,filled:v}:null,machineAtLoad:p.valuesToAscLazySeq().toRArray(),maxNumFacesOnPallet:l,maxNumStagingRows:y,maxNumSourceRows:b}}function $0({mats:e}){let[t,n]=(0,I.useState)(!1),r=(0,I.useRef)(null),i=(0,I.useRef)(null),[a,o]=(0,I.useState)(!1),s=R(bI),c=L(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,H.jsxs)(J,{sx:{width:X0,height:X0,overflow:`visible`},children:[(0,H.jsx)(Hp,{elevation:4,onPointerEnter:l,onPointerLeave:u,sx:{position:`relative`,zIndex:t?10:0,width:`max-content`,height:`max-content`},children:(0,H.jsx)(mv,{badgeContent:e.length>1?e.length:0,color:`secondary`,children:(0,H.jsx)(gm,{focusRipple:!0,onClick:d,ref:i,children:(0,H.jsx)(Rp,{orientation:`horizontal`,in:t,collapsedSize:X0,children:(0,H.jsxs)(J,{sx:{display:`flex`},children:[(0,H.jsx)(LU,{part:e[0].partName,size:X0}),(0,H.jsx)(J,{sx:{marginLeft:`10px`,marginRight:`10px`,whiteSpace:`nowrap`,textAlign:`left`},children:(0,H.jsx)(Rp,{in:t,collapsedSize:X0,children:(0,H.jsxs)(MS,{direction:`column`,sx:{marginBottom:`0.2em`},children:[(0,H.jsxs)(q,{variant:`h6`,children:[e[0].partName,`-`,e[0].process]}),(0,H.jsx)(`div`,{children:(0,H.jsx)(`small`,{children:f(e[0].location.palletNum,e[0].location.face)??f(e[0].action.loadOntoPalletNum,e[0].action.loadOntoFace)})}),Q.of(e).collect(e=>e.serial?(0,H.jsx)(`div`,{children:(0,H.jsxs)(`small`,{children:[`Serial: `,e.serial]})},e.materialID):void 0),(0,H.jsx)(`div`,{children:(0,H.jsx)(GU,{mat:e[0]})})]})})})]})})})})}),(0,H.jsx)(bx,{anchorEl:i.current,open:a,onClose:()=>o(!1),anchorOrigin:{vertical:`top`,horizontal:`left`},children:Q.of(e).map((e,t)=>(0,H.jsx)(wx,{onClick:()=>{o(!1),s({type:`MatDetails`,details:e})},children:e.serial&&e.serial!==``?e.serial:(t+1).toString()},e.materialID))})]})}function e2({maxNumFaces:e,mats:t,loadingOntoPallet:n,noFilter:r,showExpanded:i}){if(i&&e===1)return(0,H.jsx)(J,{sx:{display:`flex`,flexDirection:`column`,flexWrap:`wrap`},children:t.map(e=>(0,H.jsx)(QU,{mat:e},e.materialID))});{let i=n?Q.of(t).filter(e=>r||e.location.type!==ot.OnPallet).orderedGroupBy(e=>e.action.loadOntoFace??1):Q.of(t).filter(e=>r||e.location.type===ot.OnPallet).orderedGroupBy(e=>e.action.type===V.Loading?e.action.loadOntoFace??1:e.location.face??1);return(0,H.jsx)(J,{sx:{display:`grid`,gridTemplateRows:`${X0}px`,gridTemplateColumns:`repeat(${e}, ${X0}px)`,columnGap:`5px`,height:`100%`,alignContent:`center`,justifyContent:`center`},children:i.map(([e,t])=>(0,H.jsx)(J,{sx:{gridColumn:e,gridRow:1},children:(0,H.jsx)($0,{mats:t})},e))})}}function t2({mats:e}){let t=Q.of(e).orderedGroupBy(e=>e.location.basketSlot??0);return(0,H.jsx)(J,{sx:{display:`flex`,flexWrap:`wrap`,justifyContent:`flex-start`,alignItems:`flex-start`,gap:`5px`,minHeight:`${X0}px`,paddingLeft:`5px`,paddingRight:`5px`,height:`100%`,alignContent:`center`},children:t.map(([e,t])=>(0,H.jsx)(J,{children:(0,H.jsx)($0,{mats:t})},e))})}function n2({mats:e,maxNumFaces:t}){return(0,H.jsx)(J,{sx:{minHeight:`${Z0}px`,display:`flex`,alignItems:`center`,justifyContent:`flex-start`,paddingLeft:`5px`,gap:`5px`,paddingRight:`5px`},children:(0,H.jsx)(e2,{mats:e,maxNumFaces:t,loadingOntoPallet:!0})})}function r2(e,t){let n=X0*e+5*(e+1);return t?`60px ${Math.max(n,100)}px`:`${Math.max(n,100)}px`}function i2(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 a2(e){let t=e?.find(e=>e.action.type===V.Machining),n=t?.action?.elapsedMachiningTime,r=t?.action.expectedRemainingMachiningTime,i=L(GO).timeOfCurrentStatusUTC,a=L(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,`${i2(s)} / ${i2(o)}`,o<0?-1:s/(s+o)*100]:o===null?s===null?[!!t,`Idle`,null]:[!0,i2(s),null]:[!0,` / `+i2(o),o<0?-1:null]}function o2({machine:e}){let[t,n,r]=a2(e.worktable?.mats);return(0,H.jsxs)(`div`,{children:[(0,H.jsx)(q,{variant:`h5`,children:e.name}),(0,H.jsx)(q,{variant:`subtitle1`,children:n}),t?r===null?(0,H.jsx)(tb,{}):r<0?(0,H.jsx)(tb,{color:`error`}):(0,H.jsx)(tb,{variant:`determinate`,value:r}):void 0]})}function s2({maxNumFaces:e,machine:t}){return(0,H.jsxs)(J,{sx:{display:`grid`,border:`1px solid black`,margin:`5px`,gridTemplateRows:`auto ${Z0}px ${Z0}px ${Z0}px`,gridTemplateColumns:r2(e,!0),gridTemplateAreas:`"machname machname" "inboundpal inboundmat" "worktablepal worktablemat" "outboundpal outboundmat"`},children:[(0,H.jsx)(J,{sx:{gridArea:`machname`,padding:`0.2em`,borderBottom:`1px solid black`},children:(0,H.jsx)(o2,{machine:t})}),(0,H.jsx)(J,{sx:{gridArea:`inboundpal`,borderRight:`1px solid black`,borderBottom:`1px solid black`,padding:`2px`},children:(0,H.jsxs)(MS,{children:[(0,H.jsx)(q,{variant:`body1`,sx:{textAlign:`center`},children:`In`}),t.inbound?(0,H.jsx)(q,{variant:`h6`,sx:{textAlign:`center`},children:t.inbound.pallet.palletNum}):void 0]})}),(0,H.jsx)(J,{sx:{gridArea:`inboundmat`,borderBottom:`1px solid black`},children:t.inbound?(0,H.jsx)(e2,{mats:t.inbound.mats,maxNumFaces:e}):void 0}),(0,H.jsx)(J,{sx:{gridArea:`worktablepal`,borderRight:`1px solid black`,borderBottom:`1px solid black`,padding:`2px`},children:(0,H.jsxs)(MS,{children:[(0,H.jsx)(q,{variant:`body1`,sx:{textAlign:`center`},children:`Work`}),t.worktable?(0,H.jsx)(q,{variant:`h6`,sx:{textAlign:`center`},children:t.worktable.pallet.palletNum}):void 0]})}),(0,H.jsx)(J,{sx:{gridArea:`worktablemat`,borderBottom:`1px solid black`},children:t.worktable?(0,H.jsx)(e2,{mats:t.worktable.mats,maxNumFaces:e}):void 0}),(0,H.jsx)(J,{sx:{gridArea:`outboundpal`,borderRight:`1px solid black`,padding:`2px`},children:(0,H.jsxs)(MS,{children:[(0,H.jsx)(q,{variant:`body1`,sx:{textAlign:`center`},children:`Out`}),t.outbound?(0,H.jsx)(q,{variant:`h6`,sx:{textAlign:`center`},children:t.outbound.pallet.palletNum}):void 0]})}),(0,H.jsx)(J,{sx:{gridArea:`outboundmat`},children:t.outbound?(0,H.jsx)(e2,{mats:t.outbound.mats,maxNumFaces:e}):void 0})]})}function c2(e){let t=(e?.find(e=>e.action.type===V.Loading||e.action.type===V.LoadingToBasket||e.action.type===V.UnloadToCompletedMaterial||e.action.type===V.UnloadToInProcess))?.action?.elapsedLoadUnloadTime,n=L(GO).timeOfCurrentStatusUTC,r=L(KO),i=null;return t&&(i=tk(t)+(r-Math.floor(n.getTime()/1e3))),i===null?`Idle`:i2(i)}function l2({load:e}){let t=c2(e.pal?.mats??e.basket?.mats),n=L(yr);return(0,H.jsxs)(J,{sx:{display:`flex`,justifyContent:`space-between`,alignItems:`baseline`},children:[(0,H.jsx)(q,{variant:`h5`,children:Tk(e.lulNum,n.loadStationNames)}),(0,H.jsx)(q,{variant:`body1`,children:t})]})}function u2({maxNumFaces:e,maxNumStagingRows:t,maxNumSourceRows:n,load:r}){let i=Dk(L(yr).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,H.jsxs)(J,{sx:{display:`grid`,border:`1px solid black`,margin:`5px`,gridTemplateRows:`auto repeat(${s+1+c}, ${Z0}px)`,gridTemplateColumns:r2(e,!0),gridTemplateAreas:d},children:[(0,H.jsx)(J,{sx:{gridArea:`lulname`,padding:`0.2em`,borderBottom:`1px solid black`},children:(0,H.jsx)(l2,{load:r})}),Array.from({length:s},(t,n)=>{let i=r.sources[n]??null;return(0,H.jsxs)(I.Fragment,{children:[(0,H.jsx)(J,{sx:{gridArea:`source${n}`,borderRight:`1px solid black`,borderBottom:`1px solid black`,padding:`2px`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:i?(0,H.jsx)(q,{variant:`body2`,sx:{textAlign:`center`},children:i.label}):void 0}),(0,H.jsx)(J,{sx:{gridArea:`sourcemat${n}`,borderBottom:`1px solid black`,display:`flex`,flexDirection:`column`,justifyContent:`center`},children:i?(0,H.jsx)(n2,{mats:i.mats,maxNumFaces:e}):void 0})]},`source-${n}`)}),(0,H.jsx)(J,{sx:{gridArea:`current`,borderRight:`1px solid black`,borderBottom:`1px solid black`,padding:`2px`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,H.jsxs)(MS,{children:[a?(0,H.jsx)(q,{variant:`body1`,sx:{textAlign:`center`},children:a}):void 0,o?(0,H.jsx)(q,{variant:`h6`,sx:{textAlign:`center`},children:o}):void 0]})}),(0,H.jsxs)(J,{sx:{gridArea:`currentmat`,display:`flex`,flexDirection:`column`,justifyContent:`center`,borderBottom:`1px solid black`},children:[r.pal?(0,H.jsx)(e2,{mats:r.pal.mats,maxNumFaces:e}):void 0,!r.pal&&r.basket?(0,H.jsx)(t2,{mats:r.basket.mats}):void 0]}),Array.from({length:c},(e,t)=>{let n=r.staging[t]??null,a=t===c-1;return(0,H.jsxs)(I.Fragment,{children:[(0,H.jsx)(J,{sx:{gridArea:`stage${t}`,borderRight:`1px solid black`,...a?{}:{borderBottom:`1px solid black`},padding:`2px`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:n?(0,H.jsxs)(q,{variant:`body2`,sx:{textAlign:`center`},children:[`Staging `,i,` `,n.basket.basketId]}):void 0}),(0,H.jsx)(J,{sx:{gridArea:`stagemat${t}`,...a?{}:{borderBottom:`1px solid black`},display:`flex`,flexDirection:`column`,justifyContent:`center`},children:n?(0,H.jsx)(t2,{mats:n.mats}):void 0})]},`stage-${t}`)})]})}function d2({status:e}){let t=c2(e.loadingMats),[n,r,i]=a2(e.machiningMats);return(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(q,{variant:`h5`,children:[`Station `,e.lulNum]}),e.machineCurrentlyAtLoad?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(q,{variant:`h5`,children:[e.machineCurrentlyAtLoad.group,` `,e.machineCurrentlyAtLoad.num]}),(0,H.jsx)(q,{variant:`subtitle1`,children:r===`Idle`?t:r}),n?i===null?(0,H.jsx)(tb,{}):i<0?(0,H.jsx)(tb,{color:`error`}):(0,H.jsx)(tb,{variant:`determinate`,value:i}):void 0]}):(0,H.jsxs)(H.Fragment,{children:[e.machineMoving?(0,H.jsx)(q,{variant:`subtitle2`,children:`Machine Moving`}):void 0,(0,H.jsxs)(q,{variant:`subtitle1`,children:[`Loading `,t]})]})]})}function f2({maxNumFaces:e,status:t}){return(0,H.jsxs)(J,{sx:{display:`grid`,border:`1px solid black`,margin:`5px`,gridTemplateRows:`minmax(104px, max-content) repeat(3, ${e>1?Z0.toString()+`px`:`minmax(110px, max-content)`})`,gridTemplateColumns:e===1?`60px minmax(230px, max-content)`:r2(e,!0),gridTemplateAreas:`"name name" "ready readymat" "machining machiningmat" "loadstation loadstationmat"`},children:[(0,H.jsx)(J,{sx:{gridArea:`name`,padding:`0.2em`,borderBottom:`1px solid black`},children:(0,H.jsx)(d2,{status:t})}),(0,H.jsx)(J,{sx:{gridArea:`ready`,borderRight:`1px solid black`,borderBottom:`1px solid black`,padding:`2px`},children:(0,H.jsx)(q,{variant:`body1`,sx:{textAlign:`center`},children:`Ready`})}),(0,H.jsx)(J,{sx:{gridArea:`readymat`,borderBottom:`1px solid black`,display:`flex`,flexDirection:`column`,justifyContent:`center`},children:(0,H.jsx)(e2,{mats:t.readyMats,maxNumFaces:e,showExpanded:!0})}),(0,H.jsx)(J,{sx:{gridArea:`machining`,borderRight:`1px solid black`,borderBottom:`1px solid black`,padding:`2px`},children:(0,H.jsx)(q,{variant:`body1`,sx:{textAlign:`center`},children:`Work`})}),(0,H.jsx)(J,{sx:{gridArea:`machiningmat`,borderBottom:`1px solid black`,display:`flex`,flexDirection:`column`,justifyContent:`center`},children:(0,H.jsx)(e2,{mats:t.machiningMats,maxNumFaces:e,showExpanded:!0})}),(0,H.jsx)(J,{sx:{gridArea:`loadstation`,borderRight:`1px solid black`,padding:`2px`},children:(0,H.jsxs)(MS,{children:[(0,H.jsx)(q,{variant:`body1`,sx:{textAlign:`center`},children:`Load`}),(0,H.jsx)(q,{variant:`body1`,sx:{textAlign:`center`},children:`Station`})]})}),(0,H.jsx)(J,{sx:{gridArea:`loadstationmat`,display:`flex`,flexDirection:`column`,justifyContent:`center`},children:(0,H.jsx)(e2,{mats:t.loadingMats,maxNumFaces:e,showExpanded:!0,noFilter:!0})})]})}function p2({maxNumFaces:e,pallet:t}){return(0,H.jsxs)(J,{sx:{display:`grid`,border:`1px solid black`,margin:`5px`,gridTemplateRows:`auto ${Z0}px`,gridTemplateColumns:r2(e,!1),gridTemplateAreas:`"palname" "palmat"`},children:[(0,H.jsxs)(q,{variant:`h5`,sx:{gridArea:`palname`,padding:`0.2em`,borderBottom:`1px solid black`},children:[`Pallet `,t.pallet.palletNum]}),(0,H.jsx)(J,{sx:{gridArea:`palmat`},children:(0,H.jsx)(e2,{mats:t.mats,maxNumFaces:e})})]})}function m2({basket:e}){let t=Dk(L(yr).basketName);return(0,H.jsxs)(J,{sx:{display:`grid`,border:`1px solid black`,margin:`5px`,gridTemplateRows:`auto ${Z0}px`,gridTemplateColumns:`minmax(120px, max-content)`,gridTemplateAreas:`"basketname" "basketmat"`},children:[(0,H.jsxs)(q,{variant:`h5`,sx:{gridArea:`basketname`,padding:`0.2em`,borderBottom:`1px solid black`},children:[t,` `,e.basket.basketId]}),(0,H.jsx)(J,{sx:{gridArea:`basketmat`},children:(0,H.jsx)(t2,{mats:e.mats})})]})}function h2({empty:e,filled:t}){return(0,H.jsxs)(J,{sx:{display:`grid`,border:`1px solid black`,margin:`5px`,padding:`0.5em 1em`,alignContent:`center`,minWidth:`170px`},children:[(0,H.jsxs)(q,{variant:`h5`,children:[Dk(L(yr).basketName),` Storage`]}),(0,H.jsxs)(q,{variant:`body1`,children:[`Empty: `,e]}),(0,H.jsxs)(q,{variant:`body1`,children:[`Filled: `,t]})]})}var g2=(0,I.memo)(function({overview:e}){return(0,H.jsxs)(`div`,{children:[e.machines.toAscLazySeq().map(([t,n])=>(0,H.jsx)(J,{sx:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`},children:n.map(t=>(0,H.jsx)(s2,{machine:t,maxNumFaces:e.maxNumFacesOnPallet},t.name))},t)),e.loads.length>0?(0,H.jsx)(J,{sx:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`},children:e.loads.map(t=>(0,H.jsx)(u2,{load:t,maxNumFaces:e.maxNumFacesOnPallet,maxNumStagingRows:e.maxNumStagingRows,maxNumSourceRows:e.maxNumSourceRows},t.lulNum))}):void 0,e.machineAtLoad.length>0?(0,H.jsx)(J,{sx:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`},children:e.machineAtLoad.map(t=>(0,H.jsx)(f2,{status:t,maxNumFaces:e.maxNumFacesOnPallet},t.lulNum))}):void 0,e.stockerPals.length>0||e.floatingBaskets.length>0||e.storageBaskets?(0,H.jsxs)(J,{sx:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`},children:[e.stockerPals.map(t=>(0,H.jsx)(p2,{pallet:t,maxNumFaces:e.maxNumFacesOnPallet},t.pallet.palletNum)),e.floatingBaskets.map(e=>(0,H.jsx)(m2,{basket:e},e.basket.basketId)),e.storageBaskets?(0,H.jsx)(h2,{empty:e.storageBaskets.empty,filled:e.storageBaskets.filled}):void 0]}):void 0]})}),_2=(0,I.memo)(function({ignoreOperator:e}){let[t,n]=(0,I.useState)(null),[r,i]=(0,I.useState)(null);function a(){n(null),i(null)}return(0,H.jsx)(dW,{onClose:a,allowNote:!0,highlightProcsGreaterOrEqualTo:r?.process??void 0,extraDialogElements:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(JY,{st:t,setState:n}),r===null?null:(0,H.jsx)(WY,{st:r,setState:i})]}),buttons:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(HY,{ignoreOperator:e}),(0,H.jsx)(I0,{}),(0,H.jsx)(YY,{st:t,setState:n,onClose:a,ignoreOperator:e}),(0,H.jsx)(GY,{st:r,setState:i,onClose:a,ignoreOperator:e})]})})});function v2({ignoreOperator:e,whiteBackground:t}){GI(`System Overview`);let n=Q0();return(0,H.jsxs)(`main`,{style:{padding:`10px`,minHeight:`calc(100vh - 64px)`,backgroundColor:t?`white`:`#F8F8F8`},children:[(0,H.jsx)(g2,{overview:n}),(0,H.jsx)(_2,{ignoreOperator:e}),(0,H.jsx)(L0,{})]})}var y2=30;function b2({machine:e}){let t=Dd(),[,,n]=a2(e.worktable?.mats);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`rect`,{x:3,y:3,width:24,height:24,stroke:`black`}),`;`,(0,H.jsx)(`rect`,{x:3,y:3,width:24,height:8,fill:e.inbound===null?`white`:t.palette.secondary.main}),(0,H.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,H.jsx)(`rect`,{x:3,y:19,width:24,height:8,fill:e.outbound===null?`white`:t.palette.secondary.main})]})}function x2({load:e}){let t=Dd();return(0,H.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 S2({status:e}){let t=Dd(),[,,n]=a2(e.machiningMats);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`rect`,{x:3,y:3,width:24,height:24,stroke:`black`}),`;`,(0,H.jsx)(`rect`,{x:3,y:3,width:24,height:8,fill:e.readyMats.length===0?`white`:t.palette.secondary.main}),(0,H.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,H.jsx)(`rect`,{x:3,y:19,width:24,height:8,fill:e.loadingMats.length===0?`white`:t.palette.secondary.main})]})}var C2=(0,I.memo)(function({overview:e}){let t=e.machines.toAscLazySeq().sumBy(([,e])=>e.length);return(0,H.jsx)(J,{sx:{height:`1.5em`,"&:hover":{backgroundColor:`primary.light`}},children:(0,H.jsxs)(`svg`,{viewBox:`0 0 ${(t+e.loads.length+e.machineAtLoad.length)*y2} ${y2}`,preserveAspectRatio:`none`,width:`140px`,height:`1.5em`,children:[(0,H.jsx)(`g`,{children:e.machines.toAscLazySeq().flatMap(([,e])=>e).map((e,t)=>(0,H.jsx)(`g`,{transform:`translate(${t*y2})`,children:(0,H.jsx)(b2,{machine:e})},e.name))}),(0,H.jsx)(`g`,{transform:`translate(${t*y2})`,children:e.loads.map((e,t)=>(0,H.jsx)(`g`,{transform:`translate(${t*y2})`,children:(0,H.jsx)(x2,{load:e})},e.lulNum))}),(0,H.jsx)(`g`,{transform:`translate(${(t+e.loads.length)*y2})`,children:e.machineAtLoad.map((e,t)=>(0,H.jsx)(`g`,{transform:`translate(${t*y2})`,children:(0,H.jsx)(S2,{status:e})},e.lulNum))})]})})}),w2=(0,I.memo)(function({full:e}){let[t,n]=(0,I.useState)(!1),r=Q0();return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Y,{onClick:()=>n(!0),children:(0,H.jsx)(C2,{overview:r})}),(0,H.jsxs)(ky,{open:t,onClose:()=>n(!1),maxWidth:`xl`,fullScreen:e,children:[e?(0,H.jsx)(ph,{sx:{position:`relative`},children:(0,H.jsxs)(rw,{children:[(0,H.jsx)(Gm,{edge:`start`,color:`inherit`,onClick:()=>n(!1),"aria-label":`close`,children:(0,H.jsx)(pT,{})}),(0,H.jsx)(q,{sx:{ml:2,flex:1},variant:`h6`,component:`div`,children:`System Overview`})]})}):void 0,(0,H.jsx)(jy,{children:(0,H.jsx)(J,{sx:{paddingBottom:`2em`,paddingLeft:`5em`,paddingRight:`5em`},children:(0,H.jsx)(g2,{overview:r})})})]})]})});function T2(e){return Number.isInteger(e)&&(e??0)>0}function E2(e){return typeof e==`string`&&e.trim()!==``}function D2(e,t){if(e.location.type===ot.InBasket&&e.location.basketId===t&&(e.action.type===V.UnloadToInProcess||e.action.type===V.UnloadToCompletedMaterial))return T2(e.location.basketSlot)?`unload`:`invalid`;if(e.action.type===V.LoadingToBasket)return T2(e.action.loadToBasketId)?e.action.loadToBasketId===t?!T2(e.action.loadToBasketSlot)||e.location.type!==ot.Free&&(e.location.type!==ot.InQueue||!E2(e.location.currentQueue))?`invalid`:`load`:void 0:`invalid`}function O2(e,t){let n=Q.of(e).collect(e=>{let n=D2(e,t);return n===void 0?void 0:{phase:n,workId:e.action.workId}}).toRArray();if(n.some(({phase:e})=>e===`invalid`))return{type:`inconsistent`};let r=n.filter(e=>e.phase!==`invalid`);if(r.length===0)return{type:`none`};let i=r.filter(e=>E2(e.workId)),a=Q.of(i).toHashSet(({workId:e})=>e),o=Q.of(i).toHashSet(({phase:e})=>e);return i.length!==r.length||a.size!==1||o.size!==1?{type:`inconsistent`}:{type:`confirmable`,work:{workId:i[0].workId,phase:i[0].phase}}}function k2(e){return e.location.type===ot.InQueue&&e.location.currentQueue?e.location.currentQueue:`raw material`}function A2({material:e,fsize:t}){return e.map(e=>(0,H.jsx)(Y0,{kind:{type:R0.Material,material:e},children:(0,H.jsx)(QU,{mat:e,fsize:t})},e.materialID))}function j2({stationNumber:e,basket:t,material:n,fsize:r,submitCommand:i}){let[a,o]=(0,I.useState)(`idle`),s=(0,I.useMemo)(()=>O2(n,t.basketId),[t.basketId,n]),c=s.type===`confirmable`?s.work:void 0;(0,I.useEffect)(()=>o(`idle`),[c?.workId]);let l=(0,I.useMemo)(()=>Q.of(n).filter(e=>e.location.type===ot.InBasket&&e.location.basketId===t.basketId&&e.location.basketSlot!==void 0).groupBy(e=>e.location.basketSlot??0).toHashMap(e=>e),[t.basketId,n]),u=(0,I.useMemo)(()=>Q.of(n).filter(e=>e.action.type===V.LoadingToBasket&&e.action.loadToBasketId===t.basketId&&e.action.loadToBasketSlot!==void 0).groupBy(e=>e.action.loadToBasketSlot??0).toHashMap(e=>e),[t.basketId,n]),d=(0,I.useMemo)(()=>Q.of(t.emptySlots??[]).concat(t.unknownSlots??[]).concat(l.keysToLazySeq()).concat(u.keysToLazySeq()).distinctBy(e=>e).toSortedArray(e=>e),[t.emptySlots,t.unknownSlots,l,u]);async function f(){if(!(c===void 0||i===void 0)){o(`submitting`);try{o(await i(e,{workId:c.workId}))}catch{o(`error`)}}}let p=a===`submitting`||a===`accepted`||a===`conflict`,m=c?.phase===`unload`?`Unload Complete`:`Load Complete`;return(0,H.jsxs)(MS,{spacing:2,sx:{mt:2},children:[(0,H.jsx)(q,{variant:`h6`,children:`Basket slots`}),(0,H.jsx)(J,{sx:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(15em, 1fr))`,gap:2},children:d.map(e=>{let n=l.get(e)??[],i=u.get(e)??[],a=t.unknownSlots?.includes(e)===!0;return(0,H.jsx)(Av,{"data-testid":`basket-load-station-slot-${e}`,variant:`outlined`,children:(0,H.jsxs)(Pv,{children:[(0,H.jsxs)(q,{variant:`h6`,children:[`Slot `,e]}),n.length>0?(0,H.jsx)(A2,{material:n,fsize:r}):(0,H.jsx)(q,{color:a?`warning.main`:`text.secondary`,children:a?`Unknown`:`Empty`}),i.map((e,t)=>(0,H.jsxs)(J,{sx:{mt:1},children:[(0,H.jsxs)(q,{children:[`Load from `,k2(e)]}),(0,H.jsxs)(q,{variant:`body2`,color:`text.secondary`,children:[e.partName,` · Process `,e.action.processAfterLoad??e.process]})]},`${e.jobUnique}-${e.process}-${t}`))]})},e)})}),c&&i?(0,H.jsx)(J,{sx:{display:`flex`,justifyContent:`flex-end`},children:(0,H.jsx)(Y,{variant:`contained`,disabled:p,onClick:()=>void f(),children:m})}):c?(0,H.jsx)(rh,{severity:`warning`,children:`Basket work confirmation is not configured.`}):s.type===`inconsistent`?(0,H.jsx)(rh,{severity:`warning`,children:`Basket work is inconsistent. Wait for refreshed material actions before confirming.`}):null,a===`accepted`?(0,H.jsx)(rh,{severity:`success`,children:`Confirmation accepted. Waiting for refreshed work.`}):a===`conflict`?(0,H.jsx)(rh,{severity:`warning`,children:`Basket work changed before confirmation. Review the refreshed slots and try again.`}):a===`error`?(0,H.jsx)(rh,{severity:`error`,children:`Unable to confirm basket work. No work was assumed complete.`}):null]})}function M2(e){return encodeURIComponent(e.toString())}function N2(e){switch(e.kind){case`queue`:return`load-station-queue-${M2(e.label)}`;case`baskets`:return`load-station-baskets`;case`free`:return`load-station-material`}}function P2(e,t,n){switch(e.action.type){case V.Loading:return t!==void 0&&e.action.loadOntoPalletNum===t.palletNum||n!==void 0&&e.action.loadFromBasketId===n.basketId;case V.LoadingToBasket:return n!==void 0&&e.action.loadToBasketId===n.basketId;default:return!1}}function F2(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===rt.LoadUnload&&t.currentPalletLocation.num===e){i=t;break}for(let t of Object.values(n.baskets??{}))t.position.locationNum===e&&(t.position.location===_t.LoadUnload?a=t:t.position.location===_t.LoadStationStaging&&o.add(t.basketId))}let s=new Set(t);if(i!==void 0)for(let e of n.material)e.action.type===V.Loading&&e.action.loadOntoPalletNum===i.palletNum&&e.location.type===ot.InQueue&&e.location.currentQueue&&s.add(e.location.currentQueue),e.action.type===V.Loading&&e.action.loadOntoPalletNum===i.palletNum&&e.action.loadFromBasketId&&o.add(e.action.loadFromBasketId),(e.action.type===V.UnloadToInProcess||e.action.type===V.UnloadToCompletedMaterial)&&e.action.unloadToBasketId&&e.location.type===ot.OnPallet&&e.location.palletNum===i.palletNum&&o.add(e.action.unloadToBasketId),(e.action.type===V.UnloadToInProcess||e.action.type===V.UnloadToCompletedMaterial)&&e.action.unloadIntoQueue&&e.location.type===ot.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===ot.InBasket&&e.location.basketId===a.basketId&&(e.action.type===V.UnloadToInProcess||e.action.type===V.UnloadToCompletedMaterial)&&e.action.unloadIntoQueue&&s.add(e.action.unloadIntoQueue),e.location.type===ot.InQueue&&e.location.currentQueue&&P2(e,void 0,a)&&s.add(e.location.currentQueue);let c=new Map(Q.of(s).map(e=>[e,{mats:[],hiddenCnt:0}])),l=new Map(Q.of(o).map(e=>[e,{mats:[],hiddenCnt:0}])),u=[],d=fO.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===V.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===ot.Free&&u.push(e)),e.location.type===ot.OnPallet&&e.location.palletNum===i.palletNum&&((e.action.type===V.UnloadToCompletedMaterial||e.action.type===V.UnloadToInProcess)&&e.action.elapsedLoadUnloadTime&&(f=e.action.elapsedLoadUnloadTime),d=d.alter(e.location.face??1,t=>t?(t.push(e),t):[e]))):a&&(P2(e,i,a)&&e.action.elapsedLoadUnloadTime&&(f=e.action.elapsedLoadUnloadTime),e.action.type===V.LoadingToBasket&&e.action.loadToBasketId===a.basketId&&e.location.type===ot.Free&&u.push(e),e.location.type===ot.InBasket&&e.location.basketId===a.basketId&&((e.action.type===V.UnloadToCompletedMaterial||e.action.type===V.UnloadToInProcess)&&e.action.elapsedLoadUnloadTime&&(f=e.action.elapsedLoadUnloadTime),d=d.alter(1,t=>t?(t.push(e),t):[e]))),e.location.type===ot.InQueue&&e.location.currentQueue&&c.has(e.location.currentQueue)){let t=c.get(e.location.currentQueue);r&&!P2(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===ot.InBasket&&e.location.basketId&&l.has(e.location.basketId)){let t=l.get(e.location.basketId);r&&!P2(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(WE(e=>e.location.queuePosition??0))),l.forEach(e=>e.mats.sort(WE(e=>e.location.basketSlot??0)));let p=u.length+d.valuesToAscLazySeq().sumBy(e=>e.length);return{pallet:i,activeBasket:a,allMaterial:n.material,face:d,freeLoadingMaterial:u,queues:c,baskets:l,elapsedLoadingTime:f,fsize:p<=2?`x-large`:p<=6?`large`:`normal`}}function I2({loadData:e}){let t=WI(),n=L(UO),r=(0,I.useMemo)(()=>{let t=e.pallet;return t?Q.of(e.face.values()).append(e.freeLoadingMaterial).concat(Q.of(e.queues).collect(([e,t])=>t.mats)).flatMap(e=>e).collect(e=>e.action.type===V.Loading&&e.action.loadOntoPalletNum===t.palletNum&&e.location.type===ot.OnPallet&&e.location.palletNum===t.palletNum?Qt(e.partName,`unload`,e.materialID,t.palletNum,e.process,n):e.action.type===V.Loading&&e.action.loadOntoPalletNum===t.palletNum?Qt(e.partName,`load`,e.materialID,t.palletNum,e.action.processAfterLoad??e.process,n):e.location.type===ot.OnPallet&&e.location.palletNum===t.palletNum&&(e.action.type===V.UnloadToCompletedMaterial||e.action.type===V.UnloadToInProcess)?Qt(e.partName,`unload`,e.materialID,t.palletNum,e.process,n):null).toRArray():[]},[e,n]);if(r.length===0||t)return(0,H.jsx)(`div`,{});function i(){for(let e of r)window.open(e,`_blank`)}return(0,H.jsx)(J,{sx:{position:`fixed`,bottom:`5px`,right:`5px`},children:(0,H.jsx)(X,{title:`Open All Instructions`,children:(0,H.jsx)(Iy,{onClick:i,color:`secondary`,children:(0,H.jsx)(DT,{})})})})}function L2({elapsedLoadTime:e}){let t=L(GO).timeOfCurrentStatusUTC,n=L(KO);return e?(0,H.jsx)(`span`,{children:i2(tk(e)+(n-Math.floor(t.getTime()/1e3)))}):null}function R2({data:e,faceNum:t,loadNum:n,submitBasketLoadStationCommand:r}){let i=e.face.get(t),a=Dk(L(yr).basketName);return i?e.activeBasket&&!e.pallet?(0,H.jsxs)(`div`,{"data-testid":`load-station-active-basket`,children:[t===1?(0,H.jsxs)(J,{sx:{display:`grid`,gridTemplateColumns:`1fr auto`},children:[(0,H.jsxs)(q,{variant:`h4`,children:[a,` `,e.activeBasket.basketId]}),(0,H.jsx)(J,{sx:{justifySelf:`flex-end`},children:(0,H.jsx)(L2,{elapsedLoadTime:e.elapsedLoadingTime})})]}):null,(0,H.jsx)(J,{sx:{ml:`4em`,mr:`4em`},children:(0,H.jsx)(Y0,{kind:{type:R0.BasketZone,basketId:e.activeBasket.basketId},children:(0,H.jsx)(j2,{stationNumber:n,basket:e.activeBasket,material:e.allMaterial,fsize:e.fsize,submitCommand:r})})})]}):e.pallet?(0,H.jsxs)(`div`,{"data-testid":`load-station-pallet-face-${t}`,children:[t===1?(0,H.jsxs)(J,{sx:{display:`grid`,gridTemplateColumns:e.pallet.numFaces>1?`1fr 1fr 1fr`:`1fr 1fr`},children:[(0,H.jsxs)(q,{variant:`h4`,children:[`Pallet `,e.pallet.palletNum]}),e.pallet.numFaces>1?(0,H.jsx)(q,{variant:`h6`,sx:{justifySelf:`center`},children:e.pallet.faceNames?.[t-1]??`Face 1`}):void 0,(0,H.jsx)(J,{sx:{justifySelf:`flex-end`},children:(0,H.jsx)(L2,{elapsedLoadTime:e.elapsedLoadingTime})})]}):e.pallet.numFaces>1?(0,H.jsx)(J,{sx:{display:`flex`,justifyContent:`center`},children:(0,H.jsx)(q,{variant:`h6`,children:e.pallet.faceNames?.[t-1]??`Face ${t}`})}):void 0,(0,H.jsx)(J,{sx:{ml:`4em`,mr:`4em`},children:(0,H.jsx)(Y0,{kind:{type:R0.PalletFaceZone,face:t},children:(0,H.jsx)(J,{sx:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-around`},children:i.map((t,n)=>(0,H.jsx)(Y0,{kind:{type:R0.Material,material:t},children:(0,H.jsx)(QU,{mat:t,fsize:e.fsize})},n))})})})]}):null:null}function z2({data:e,mat:t}){return(0,H.jsxs)(`div`,{children:[t.label===``?null:(0,H.jsx)(q,{variant:`h4`,children:t.label}),t.material.mats.map((n,r)=>(0,H.jsx)(Y0,{kind:{type:R0.Material,material:n,identifier:n.materialID<0?`raw-${t.isFree?`free`:`queue`}-${t.label}-${r}`:void 0},children:t.isFree||t.sortable===!1?(0,H.jsx)(QU,{mat:n,displayActionForSinglePallet:e.pallet?e.pallet.palletNum:0,fsize:e.fsize,showRawMaterial:!0,showJobComment:!0}):(0,H.jsx)($U,{mat:n,displayActionForSinglePallet:e.pallet?e.pallet.palletNum:0,shake:n.action.type===V.Loading&&n.action.loadOntoPalletNum===e.pallet?.palletNum,fsize:n.action.type===V.Loading&&n.action.loadOntoPalletNum===e.pallet?.palletNum?e.fsize:void 0,showRawMaterial:!0,showJobComment:!0})},r)),t.material.hiddenCnt>0?(0,H.jsxs)(q,{variant:`body2`,color:`textSecondary`,sx:{textAlign:`center`,mt:`0.5em`},children:[`+`,t.material.hiddenCnt,` hidden`]}):null]})}function B2({data:e,label:t,baskets:n}){return(0,H.jsxs)(`div`,{children:[(0,H.jsx)(q,{variant:`h4`,children:t}),n.map((t,n)=>(0,H.jsxs)(J,{"data-testid":`load-station-basket-${M2(t.basketId)}`,sx:{mt:n===0?`0.5em`:`1.5em`,pt:n===0?void 0:`1em`},children:[(0,H.jsx)(q,{variant:`h6`,sx:{mb:`0.5em`},children:t.label}),(0,H.jsx)(Y0,{kind:{type:R0.BasketZone,basketId:t.basketId},children:(0,H.jsx)(z2,{data:e,mat:{label:``,material:t.material,isFree:!1,sortable:!1}})})]},t.basketId))]})}function V2({data:e,region:t}){switch(t.kind){case`free`:return(0,H.jsx)(Y0,{kind:{type:R0.FreeMaterialZone},children:(0,H.jsx)(z2,{data:e,mat:{label:t.label,material:t.material,isFree:!0,sortable:!1}})});case`queue`:return(0,H.jsx)(Y0,{kind:{type:R0.QueueZone,queue:t.label},children:(0,H.jsx)($q,{matIds:t.material.mats.map(e=>e.materialID),direction:`vertical`,queueName:t.label,renderDragOverlay:t=>(0,H.jsx)(eW,{mat:t,displayActionForSinglePallet:e.pallet?e.pallet.palletNum:0,fsize:t.action.type===V.Loading&&t.action.loadOntoPalletNum===e.pallet?.palletNum?e.fsize:void 0}),children:(0,H.jsx)(z2,{data:e,mat:{label:t.label,material:t.material,isFree:!1,sortable:!0}})})});case`baskets`:return(0,H.jsx)(B2,{data:e,label:t.label,baskets:t.baskets})}}function H2(){let e=L(lL);return(0,H.jsx)(`div`,{children:(0,I.useMemo)(()=>{let t=iE(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,H.jsx)(ZU,{mat:e},t))})}var U2=(0,I.memo)(function({fillViewPort:e,showMaterial:t}){let n=J0({type:t?R0.CompletedExpandedMaterialZone:R0.CompletedCollapsedMaterialZone});return t&&e?(0,H.jsxs)(J,{ref:n,sx:{padding:`8px`,display:`flex`,flexDirection:`column`,height:`100%`},children:[(0,H.jsx)(q,{variant:`h4`,children:`Completed`}),(0,H.jsx)(J,{sx:{position:`relative`,flexGrow:1},children:(0,H.jsx)(J,{sx:{position:`absolute`,top:`0`,left:`0`,right:`0`,bottom:`0`,overflow:`auto`},children:(0,H.jsx)(H2,{})})})]}):t?(0,H.jsxs)(J,{ref:n,sx:{padding:`8px`},children:[(0,H.jsx)(q,{variant:`h4`,children:`Completed`}),(0,H.jsx)(H2,{})]}):(0,H.jsx)(J,{ref:n,sx:{display:`flex`,justifyContent:e?`flex-end`:void 0,padding:`8px`},children:(0,H.jsx)(q,{variant:`h4`,sx:{margin:`4px`,...e?{textOrientation:`mixed`,writingMode:`vertical-rl`}:{}},children:`Completed`})})});function W2({pallet:e}){let t=L(EI),n=L(UO),r=WI();if(t===null)return null;let i;if(t.action.type===V.Loading&&t.action.loadOntoPalletNum===e?i=`load`:(t.action.type===V.UnloadToInProcess||t.action.type===V.UnloadToCompletedMaterial)&&t.location.type===ot.OnPallet&&t.location.palletNum===e&&(i=`unload`),i===void 0)return null;let a=Qt(t.partName,i,t.materialID,e,t.action.type===V.Loading?t.action.processAfterLoad??t.process:t.process,n);return r?(0,H.jsx)(Y,{color:`primary`,children:`Instructions`}):(0,H.jsx)(Y,{href:a,target:`bms-instructions`,color:`primary`,children:`Instructions`})}function G2({queues:e,onClose:t,toQueue:n,showAddToQueue:r,setShowAddToQueue:i}){let a=R(bI),o=L(jI),s=L(CI),c=L(EI),l=L(UO),[u,d]=LI();return!s||c?.location.type===ot.OnPallet||c?.action.type===V.Loading||c?.action.type===V.LoadingToBasket||e.length===0||c?.location.type===ot.InQueue&&c?.location.currentQueue&&e.includes(c?.location.currentQueue)?null:r?(0,H.jsxs)(Y,{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,H.jsx)(Y,{color:`primary`,onClick:()=>i(!0),children:`Add To Queue`})}function K2(){let e=L(yr),t=R(D0),n=L(CI);return!e.allowChangeWorkorderAtLoadStation||n===null||n.materialID<0?null:(0,H.jsx)(Y,{color:`primary`,onClick:()=>t(!0),children:`Assign Workorder`})}var q2=(0,I.memo)(function(e){let[t,n]=(0,I.useState)(null),[r,i]=(0,I.useState)(null),[a,o]=(0,I.useState)(!1),[s,c]=(0,I.useState)(null),l=(0,I.useCallback)(function(){n(null),i(null),o(!1),c(null)},[n,i]);return(0,H.jsx)(dW,{onClose:l,allowNote:!0,highlightProcsGreaterOrEqualTo:r?.process??void 0,extraDialogElements:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(JY,{st:t,setState:n}),r===null?null:(0,H.jsx)(WY,{st:r,setState:i}),a?(0,H.jsx)(LY,{selectedQueue:s,setSelectedQueue:c,queueNames:e.queues}):void 0]}),buttons:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(W2,{pallet:e.pallet}),(0,H.jsx)(xY,{}),(0,H.jsx)(HY,{}),(0,H.jsx)(I0,{}),(0,H.jsx)(G2,{toQueue:s,queues:e.queues,onClose:l,showAddToQueue:a,setShowAddToQueue:o}),(0,H.jsx)(YY,{st:t,setState:n,onClose:l}),(0,H.jsx)(GY,{st:r,setState:i,onClose:l,loadStation:!0}),(0,H.jsx)(K2,{})]})})});function J2({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)
|
|
350
|
+
`}return`${i} / ${a}`}function Y2(e){let t=Dk(L(yr).basketName),n=t.endsWith(`s`)?t:`${t}s`,r=L(GO),i=L(Pq),a=(0,I.useMemo)(()=>F2(e.loadNum,e.queues,r,i),[r,e.loadNum,e.queues,i]),o=[...Q.of(a.queues).sortBy(([e,t])=>e).map(([e,t])=>({kind:`queue`,label:e,material:t})).toRArray()];if(a.baskets.size>0){let e=Q.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=Yw(s<=1?`(min-width: 720px)`:s===2?`(min-width: 1030px)`:`(min-width: 1320px)`),l=J2({numMatCols:o.length,maxNumFaces:a.face.size,horizontal:c,showMatInCompleted:e.completed});return(0,H.jsx)(q0,{hideArrows:!c,whiteBackground:e.whiteBackground,children:(0,H.jsxs)(J,{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,H.jsx)(J,{"data-testid":N2(e),sx:{gridArea:`mat${t}`,padding:`8px`,borderRight:c?`1px solid black`:void 0,borderBottom:c?void 0:`1px solid black`},children:(0,H.jsx)(V2,{data:a,region:e})},t)),a.face.keysToAscLazySeq().map((t,n)=>(0,H.jsx)(J,{sx:{marginLeft:`15px`,gridArea:`palface${n}`,padding:`8px`,borderTop:a.pallet&&n!==0?`1px solid black`:void 0},children:(0,H.jsx)(R2,{data:a,faceNum:t,loadNum:e.loadNum,submitBasketLoadStationCommand:e.submitBasketLoadStationCommand})},t)),(0,H.jsx)(J,{"data-testid":`load-station-completed`,sx:{borderLeft:c?`1px solid black`:void 0,borderTop:c?void 0:`1px solid black`,gridArea:`completed`},children:(0,H.jsx)(U2,{fillViewPort:c,showMaterial:e.completed})}),(0,H.jsx)(I2,{loadData:a}),(0,H.jsx)(M0,{}),(0,H.jsx)(L0,{}),(0,H.jsx)(q2,{pallet:a.pallet?.palletNum??null,queues:e.queues})]})})}function X2(e){let t=L(yr);return GI(Tk(e.loadNum,t.loadStationNames)),(0,H.jsx)(Y2,{...e})}function Z2(e){let t=WI(),n=L(UO),r=L(CI),i=L(jI)?.process,[a,o]=Eie(),s=R(bI);if(r===null)return null;function c(t){r&&(a({mat:r,inspType:e.inspection_type,success:t,operator:n}),s(null))}let l=Qt(r.partName,e.inspection_type,r.materialID,null,i,n);return(0,H.jsxs)(H.Fragment,{children:[r.partName===``?void 0:t?(0,H.jsx)(Y,{color:`primary`,children:`Instructions`}):(0,H.jsx)(Y,{href:l,target:`bms-instructions`,color:`primary`,children:`Instructions`}),(0,H.jsx)(HY,{}),(0,H.jsxs)(Y,{color:`primary`,disabled:o,onClick:()=>c(!0),children:[`Mark `,e.inspection_type,` Success`]}),(0,H.jsxs)(Y,{color:`primary`,disabled:o,onClick:()=>c(!1),children:[`Mark `,e.inspection_type,` Failed`]})]})}function Q2({focusInspectionType:e}){let t=L(MI);return t===null||e||t.signaledInspections.length===1?null:(0,H.jsx)(H.Fragment,{children:t.signaledInspections.map(e=>(0,H.jsx)(Ay,{children:(0,H.jsx)(Z2,{inspection_type:e})},e))})}function $2({focusInspectionType:e}){let t=L(MI),n;if(e)n=e;else if(t&&t.signaledInspections.length===1)n=t.signaledInspections[0];else return null;return(0,H.jsx)(Z2,{inspection_type:n})}var e4=(0,I.memo)(function(e){return(0,H.jsx)(dW,{allowNote:!0,extraDialogElements:(0,H.jsx)(Q2,{focusInspectionType:e.focusInspectionType}),buttons:(0,H.jsx)($2,{focusInspectionType:e.focusInspectionType})})});function t4({focusInspectionType:e,forceSingleColumn:t}){let n=L(lL),r=(0,I.useMemo)(()=>r4(n.matsById,e),[n,e]);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(J,{sx:{display:t?void 0:{md:`flex`}},children:[(0,H.jsxs)(J,{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,H.jsx)(q,{variant:`h4`,children:`Parts to Inspect`}),(0,H.jsx)(J,{sx:{display:`flex`,justifyContent:`flex-start`,flexWrap:`wrap`},children:r.waiting_to_inspect.map((t,n)=>(0,H.jsx)(ZU,{mat:t,focusInspectionType:e,hideWarningIcon:!0},n))})]}),(0,H.jsxs)(J,{sx:{padding:`8px`,width:t?`100%`:{md:`50vw`}},children:[(0,H.jsx)(q,{variant:`h4`,children:`Recently Inspected`}),(0,H.jsx)(J,{sx:{display:`flex`,justifyContent:`flex-start`,flexWrap:`wrap`},children:r.inspect_completed.map((t,n)=>(0,H.jsx)(ZU,{mat:t,focusInspectionType:e,hideWarningIcon:!0},n))})]})]}),(0,H.jsx)(e4,{focusInspectionType:e})]})}function n4(e){let t=e.completedInspections;return t===void 0?e.signaledInspections.length===0:Q.of(e.signaledInspections).every(e=>e in t)}function r4(e,t){let n=tE(new Date,-7),r=tE(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&&!n4(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&&n4(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 i4(e){return GI(e.focusInspectionType&&e.focusInspectionType!==``?`Inspection ${e.focusInspectionType}`:`Inspection`),(0,H.jsx)(J,{component:`main`,sx:{backgroundColor:`#F8F8F8`,minHeight:{sm:`calc(100vh - 64px - 40px)`,md:`calc(100vh - 64px)`}},children:(0,H.jsx)(t4,{...e})})}function a4(){let e=L(yr),t=L(CI),[n,r]=PI(),i=L(UO),[a,o]=z(bI);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,H.jsx)(X,{title:l,placement:`top`,children:(0,H.jsx)(`div`,{children:(0,H.jsx)(Y,{color:`primary`,disabled:!0,children:`Close Out`})})}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Y,{color:`primary`,disabled:r,onClick:()=>u(!0),children:`Fail Close Out`}),(0,H.jsx)(Y,{color:`primary`,disabled:r,onClick:()=>u(!1),children:`Pass Close Out`})]})}function o4(){let e=WI(),t=L(CI),n=L(UO),r=L(jI)?.process;if(t===null||t.partName===``)return null;let i=Qt(t.partName,`closeout`,t.materialID,null,r,n);return e?(0,H.jsx)(Y,{color:`primary`,children:`Instructions`}):(0,H.jsx)(Y,{href:i,target:`bms-instructions`,color:`primary`,children:`Instructions`})}function s4(){let e=R(D0);return L(CI)===null?null:(0,H.jsx)(Y,{color:`primary`,onClick:()=>e(!0),children:`Assign Workorder`})}var c4=(0,I.memo)(function(){return(0,H.jsx)(dW,{allowNote:!0,buttons:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(o4,{}),(0,H.jsx)(HY,{}),(0,H.jsx)(s4,{}),(0,H.jsx)(a4,{})]})})}),l4=P(new Date);l4.onMount=e=>{e(new Date);let t=setInterval(()=>{e(new Date)},1e3*60);return()=>clearInterval(t)};function u4({forceSingleColumn:e}){let t=L(lL),n=L(l4),r=(0,I.useMemo)(()=>{let e=iE(n,-48),r=iE(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,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(J,{sx:{display:e?void 0:{md:`flex`}},children:[(0,H.jsxs)(J,{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,H.jsx)(q,{variant:`h4`,children:`Recently Completed`}),(0,H.jsx)(J,{sx:{display:`flex`,justifyContent:`flex-start`,flexWrap:`wrap`},children:r.uncompleted.map((e,t)=>(0,H.jsx)(ZU,{mat:e},t))})]}),(0,H.jsxs)(J,{sx:{padding:`8px`,width:e?`100%`:{md:`50vw`}},children:[(0,H.jsx)(q,{variant:`h4`,children:`Recently Closed Out`}),(0,H.jsx)(J,{sx:{display:`flex`,justifyContent:`flex-start`,flexWrap:`wrap`},children:r.closed.map((e,t)=>(0,H.jsx)(ZU,{mat:e},t))})]})]}),(0,H.jsx)(M0,{}),(0,H.jsx)(c4,{})]})}function d4(){return GI(`Close Out`),(0,H.jsx)(J,{component:`main`,sx:{backgroundColor:`#F8F8F8`,minHeight:{sm:`calc(100vh - 64px - 40px)`,md:`calc(100vh - 64px)`}},children:(0,H.jsx)(u4,{})})}function f4(e,t){return e.mapValues(e=>{let n=Q.of(e.recentCycles).flatMap(e=>e.tools).filter(e=>!e.toolChangedDuringMiddleOfCycle).groupBy(e=>e.toolName).map(([e,t])=>({toolName:e,cycleUsageMinutes:Q.of(t).sumBy(e=>e.cycleUsageMinutes)/t.length,cycleUsageCnt:Q.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 p4=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 jD(this.statGroup,this.operation)}toString(){return`{statGroup: ${this.statGroup}, operation: ${this.operation}}`}};function m4(e,t){let n=0,r=0;for(let i of Q.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 h4(e,t,n){let r=gO.empty();for(let[t,n]of Q.ofObject(e.jobs)){let i=n.cycles??0;for(let a=0;a<n.procsAndPaths.length;a++){let o=0,s=gO.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=Q.of(e.material).filter(e=>e.jobUnique===t&&e.process==a+1&&e.path===r+1&&(e.action.type===V.UnloadToCompletedMaterial||e.action.type===V.UnloadToInProcess||e.lastCompletedMachiningRouteStopIndex!==void 0&&e.lastCompletedMachiningRouteStopIndex>n)).length();o.program!==void 0&&o.program!==``&&(s=s.modify(new p4(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=Q.of(f4(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??uO.empty()}})):[]}).sortBy(e=>e.part.partAndProg.part,e=>e.part.partAndProg.operation).toLookup(e=>e.toolName,e=>e.part);return Q.of(t).orderedGroupBy(e=>e.toolName).map(([e,t])=>{let n=!1;return{toolName:e,machines:Q.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=m4(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 g4=P(null),_4=P(e=>e(g4)?.time??null,async(e,t,n)=>{t(g4,{tools:await Wt.getToolsInMachines(),time:n})}),v4=P(e=>{let t=e(g4);return t===null?[]:Q.of(t.tools).toOrderedSet(e=>wk(e.machineGroupName,e.machineNum)).toAscLazySeq().toRArray()}),y4=P(e=>{let t=e(g4);if(t===null)return null;let n=e(GO),r=e(FL);return h4(n,t.tools,r)}),b4=P(e=>{let t=e(y4);return t?Q.of(t).flatMap(e=>e.machines).some(e=>e.serial!=null&&e.serial!==``):!1}),x4=P(e=>{let t=e(y4);return t?Q.of(t).some(e=>e.estimatedToolCounts):!1});function S4(e){let t=Q.of(e).flatMap(e=>e.machines).some(e=>e.currentUseMinutes!=null),n=Q.of(e).flatMap(e=>e.machines).some(e=>e.currentUseCnt!=null),r=`<table>
|
|
351
|
+
<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>
|
|
352
|
+
<tbody>
|
|
353
|
+
`;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=Q.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=Q.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>
|
|
354
|
+
`}return r+=`</tbody></table>`,r}function C4(){let e=_e();return(0,I.useCallback)(()=>{let t=e.get(y4);t&&oA(S4(t))},[e])}function w4(e,t,n,r,i){let a=f4(e,!0),o=e.keysToLazySeq().toRMap(e=>[e.operation,e],(e,t)=>t),s=Q.of(r);i!=null&&(s=s.filter(e=>i.has(e.programName)));let c=n?.valuesToLazySeq().flatMap(e=>Q.of(e.procsAndPaths).flatMap(e=>e.paths).flatMap(t=>Q.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 T4=P(`AllPrograms`),E4=P(null),D4=P(e=>e(E4)?.time??null,async(e,t,n)=>{t(E4,{progs:await Wt.getProgramsInCellController(),time:n})}),O4=P(e=>{if(e(D4)===null)return null;let t=e(T4),n=null;if(t===`ActivePrograms`){let t=e(GO);n=new Set(Q.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(E4);return r===null?null:w4(e(FL),e(ak),e(yO),r.progs,n)}),k4=P(null),A4=P(async e=>{let t=e(k4);return t===null?``:t.revision===null?await Wt.getLatestProgramRevisionContent(t.programName):await Wt.getProgramRevisionContent(t.programName,t.revision)}),j4=P(null),M4=new Intl.NumberFormat(`en-US`,{minimumFractionDigits:0,maximumFractionDigits:1}),N4=G(dw,{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})),P4=G(dw,{shouldForwardProp:e=>e.toString()[0]!==`$`})(({$borderBottom:e})=>({...e&&{"&:not(:last-child)":{borderBottom:`2px solid black`}}})),F4=G(`span`)({fontSize:`x-large`,fontWeight:`lighter`});function I4({min:e,cnt:t,showZero:n,extraMin:r,extraCnt:i}){e??=0,t??=0;let a=r?(0,H.jsx)(X,{title:r,children:(0,H.jsxs)(`span`,{children:[e.toFixed(1),` min`]})}):e.toFixed(1)+` min`,o=i?(0,H.jsx)(X,{title:i,children:(0,H.jsxs)(`span`,{children:[M4.format(t),` cnt`]})}):M4.format(t)+` cnt`;return e===0&&t===0?n?`0`:``:e>0&&t===0?a:e===0&&t>0?o:(0,H.jsxs)(`span`,{children:[a,` `,(0,H.jsx)(F4,{children:`|`}),` `,o]})}function L4({tool:e,machine:t}){let n=t?Q.of(e.parts).filter(e=>e.machines.has(t)):Q.of(e.parts);return(0,H.jsxs)(AC,{size:`small`,sx:{width:`auto`,ml:`10em`,mb:`1em`},children:[(0,H.jsx)($C,{children:(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{children:`Part`}),(0,H.jsx)(Z,{children:`Program`}),t?void 0:(0,H.jsx)(Z,{children:`Machines`}),(0,H.jsx)(Z,{align:`right`,children:`Quantity`}),(0,H.jsx)(Z,{align:`right`,children:`Use/Cycle (min)`}),(0,H.jsx)(Z,{align:`right`,children:`Use/Cycle (cnt)`})]})}),(0,H.jsx)(LC,{children:n.isEmpty()?(0,H.jsx)(dw,{children:(0,H.jsx)(Z,{colSpan:5,children:`No programs use this machine`})}):n.map((e,n)=>(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{children:(0,H.jsxs)(J,{sx:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(LU,{part:e.partAndProg.part,size:20}),(0,H.jsx)(`span`,{children:e.partAndProg.part})]})}),(0,H.jsx)(Z,{children:e.partAndProg.operation}),t?void 0:(0,H.jsx)(Z,{children:e.machines.foldl((e,t)=>(e.length>0?e+`, `:``)+t,``)}),(0,H.jsx)(Z,{align:`right`,children:e.quantity}),(0,H.jsx)(Z,{align:`right`,children:e.scheduledUseMinutes>0?e.scheduledUseMinutes.toFixed(1):``}),(0,H.jsx)(Z,{align:`right`,children:e.scheduledUseCnt>0?M4.format(e.scheduledUseCnt):``})]},n))})]})}function R4({machines:e}){let t=L(b4),n=Q.of(e).toLookupOrderedMap(e=>e.machineName,e=>e.pocket),r=n.size>1&&n.valuesToAscLazySeq().some(e=>e.size>1);return(0,H.jsxs)(AC,{size:`small`,sx:{width:`auto`,ml:`10em`,mb:`1em`},children:[(0,H.jsx)($C,{children:(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{children:`Machine`}),(0,H.jsx)(Z,{align:`right`,children:`Pocket`}),t?(0,H.jsx)(Z,{children:`Serial`}):void 0,(0,H.jsx)(Z,{align:`right`,children:`Current Use `}),(0,H.jsx)(Z,{align:`right`,children:`Lifetime `}),(0,H.jsx)(Z,{align:`right`,children:`Remaining Use `})]})}),(0,H.jsxs)(LC,{children:[n.toAscLazySeq().map(([e,i])=>(0,H.jsxs)(I.Fragment,{children:[i.valuesToAscLazySeq().map((e,n)=>(0,H.jsxs)(P4,{$borderBottom:r&&i.size===1,children:[(0,H.jsx)(Z,{children:e.machineName}),(0,H.jsx)(Z,{align:`right`,children:e.pocket}),t?(0,H.jsx)(Z,{children:e.serial??``}):void 0,(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(I4,{min:e.currentUseMinutes,cnt:e.currentUseCnt})}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(I4,{min:e.lifetimeMinutes,cnt:e.lifetimeCnt})}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(I4,{min:e.remainingMinutes,cnt:e.remainingCnt,showZero:!0})})]},n)),n.size>1&&i.size>1?(0,H.jsxs)(P4,{$borderBottom:!0,children:[(0,H.jsx)(Z,{colSpan:t?4:3}),(0,H.jsx)(Z,{children:`Subtotal`}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(I4,{min:i.valuesToAscLazySeq().sumBy(e=>e.remainingMinutes??0),cnt:i.valuesToAscLazySeq().sumBy(e=>e.remainingCnt??0)})})]}):void 0]},e)),(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{colSpan:t?4:3}),(0,H.jsx)(Z,{children:`Total`}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(I4,{min:Q.of(e).sumBy(e=>e.remainingMinutes??0),cnt:Q.of(e).sumBy(e=>e.remainingCnt??0)})})]})]})]})}function z4(){let e=L(x4);return(0,H.jsxs)(N4,{children:[(0,H.jsx)(Z,{}),(0,H.jsx)(Z,{children:`Tool`}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(X,{title:`Expected use for all currently scheduled parts.`+(e?` Counts are estimates.`:``),children:(0,H.jsx)(`span`,{children:`Scheduled Use`})})}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(X,{title:`Remaining use summed over all machines which have a scheduled part.`+(e?` Counts are estimates.`:``),children:(0,H.jsx)(`span`,{children:`Total Remaining Use`})})}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(X,{title:`Machine with the least remaining use.`+(e?` Counts are estimates.`:``),children:(0,H.jsx)(`span`,{children:`Smallest Remaining Use`})})}),(0,H.jsx)(Z,{})]})}function B4({tool:e}){let[t,n]=(0,I.useState)(!1),r=Q.of(e.machines).filter(t=>e.parts.some(e=>e.machines.has(t.machineName))),i=Q.of(e.parts).sumBy(e=>e.scheduledUseMinutes*e.quantity),a=Q.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:Q.of(t).sumBy(e=>e.remainingMinutes??0)})).minBy(({remainMin:e})=>e),l=r.groupBy(e=>e.machineName).map(([e,t])=>({mach:e,remainCnt:Q.of(t).sumBy(e=>e.remainingCnt??0)})).minBy(({remainCnt:e})=>e);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(N4,{$noBorderBottom:!0,$highlightedRow:i>o||a>s,$noticeRow:i<=o&&a<=s&&(c&&i>c.remainMin||l&&a>l.remainCnt),children:[(0,H.jsx)(Z,{children:(0,H.jsx)(Gm,{size:`small`,onClick:()=>n(!t),children:t?(0,H.jsx)(LT,{}):(0,H.jsx)(PT,{})})}),(0,H.jsx)(Z,{children:e.toolName}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(I4,{min:i,cnt:a})}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(I4,{min:o,cnt:s})}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(I4,{min:c?.remainMin,cnt:l?.remainCnt,showZero:!0,extraMin:c?.mach,extraCnt:l?.mach})}),(0,H.jsx)(Z,{})]}),(0,H.jsx)(dw,{children:(0,H.jsx)(Z,{sx:{pb:`0`,pt:`0`},colSpan:6,children:(0,H.jsx)(Rp,{in:t,timeout:`auto`,unmountOnExit:!0,children:(0,H.jsxs)(J,{sx:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-around`,ml:`1em`,mr:`1em`},children:[(0,H.jsx)(`div`,{children:(0,H.jsx)(R4,{machines:e.machines})}),e.parts.length===0?void 0:(0,H.jsx)(`div`,{children:(0,H.jsx)(L4,{tool:e})})]})})})})]})}function V4({machine:e}){let t=L(x4),n=L(b4);return(0,H.jsxs)(N4,{children:[(0,H.jsx)(Z,{}),(0,H.jsxs)(Z,{children:[`Tool In `,e]}),(0,H.jsx)(Z,{align:`right`,children:`Pocket`}),n?(0,H.jsx)(Z,{children:`Serial`}):void 0,(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(X,{title:`Expected use for all currently scheduled parts.`+(t?` Counts are estimates.`:``),children:(0,H.jsx)(`span`,{children:`Scheduled Use`})})}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(X,{title:`Current recorded usage of this tool.`+(t?` Counts are estimates.`:``),children:(0,H.jsx)(`span`,{children:`Current Use`})})}),(0,H.jsxs)(Z,{align:`right`,children:[(0,H.jsx)(X,{title:`Current configured lifetime of this tool.`+(t?` Counts are estimates.`:``),children:(0,H.jsx)(`span`,{children:`Lifetime`})}),` `]}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(X,{title:`Lifetime minus current use.`+(t?` Counts are estimates.`:``),children:(0,H.jsx)(`span`,{children:`Remaining Use`})})}),(0,H.jsx)(Z,{})]})}function H4({report:e,pocket:t}){let[n,r]=(0,I.useState)(!1),i=L(b4),a=i?9:8,o=Q.of(e.parts).filter(e=>e.machines.has(t.machineName)).sumBy(e=>e.scheduledUseMinutes*e.quantity),s=Q.of(e.parts).filter(e=>e.machines.has(t.machineName)).sumBy(e=>e.scheduledUseCnt*e.quantity);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(N4,{$noBorderBottom:!0,children:[(0,H.jsx)(Z,{children:(0,H.jsx)(Gm,{size:`small`,onClick:()=>r(!n),children:n?(0,H.jsx)(LT,{}):(0,H.jsx)(PT,{})})}),(0,H.jsx)(Z,{children:e.toolName}),(0,H.jsx)(Z,{align:`right`,children:t.pocket}),i?(0,H.jsx)(Z,{children:t.serial??``}):void 0,(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(I4,{min:o,cnt:s})}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(I4,{min:t.currentUseMinutes,cnt:t.currentUseCnt})}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(I4,{min:t.lifetimeMinutes,cnt:t.lifetimeCnt})}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(I4,{min:t.remainingMinutes,cnt:t.remainingCnt})}),(0,H.jsx)(Z,{})]}),(0,H.jsx)(dw,{children:(0,H.jsx)(Z,{sx:{pb:`0`,pt:`0`},colSpan:a,children:(0,H.jsx)(Rp,{in:n,timeout:`auto`,unmountOnExit:!0,children:(0,H.jsx)(L4,{tool:e,machine:t.machineName})})})})]})}var U4=`__Insight__FilterAnyMachine__`,W4=P(null);function G4(){let e=L(W4),t=L(y4);return t===null?(0,H.jsx)(`div`,{}):(0,H.jsxs)(AC,{stickyHeader:!0,children:[(0,H.jsx)($C,{children:e===null?(0,H.jsx)(z4,{}):(0,H.jsx)(V4,{machine:e})}),(0,H.jsx)(LC,{children:t.map(t=>e===null?(0,H.jsx)(B4,{tool:t},t.toolName):(0,H.jsx)(I.Fragment,{children:t.machines.filter(t=>t.machineName===e).map(e=>(0,H.jsx)(H4,{report:t,pocket:e},e.pocket))},t.toolName))})]})}function K4(){let[e,t]=z(W4),[n,r]=z(_4),[i,a]=(0,I.useState)(!1),o=L(v4),s=C4(),c=WI();function l(){a(!0),r(new Date).catch(console.log).finally(()=>a(!1))}return c?(0,H.jsx)(`div`,{}):n===null?(0,H.jsx)(`main`,{style:{margin:`2em`,display:`flex`,justifyContent:`center`},children:(0,H.jsx)(Iy,{color:`secondary`,size:`large`,variant:`extended`,style:{margin:`2em`},onClick:l,disabled:i,children:(0,H.jsxs)(H.Fragment,{children:[i?(0,H.jsx)(zm,{size:10,style:{marginRight:`1em`}}):(0,H.jsx)(VT,{fontSize:`inherit`,style:{marginRight:`1em`}}),`Load Tools`]})})}):(0,H.jsxs)(J,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,H.jsx)(X,{title:`Refresh Tools`,children:(0,H.jsx)(`div`,{children:(0,H.jsx)(Gm,{onClick:l,disabled:i,size:`small`,children:i?(0,H.jsx)(zm,{size:10}):(0,H.jsx)(VT,{fontSize:`inherit`})})})}),(0,H.jsxs)(`span`,{style:{marginLeft:`1em`},children:[`Tools from `,(0,H.jsx)(Uz,{date:n})]}),(0,H.jsx)(`div`,{style:{flexGrow:`1`}}),(0,H.jsx)(Ry,{size:`small`,children:(0,H.jsxs)(oS,{autoWidth:!0,displayEmpty:!0,value:e??U4,style:{marginLeft:`1em`},onChange:e=>{e.target.value===U4?t(null):t(e.target.value)},children:[(0,H.jsx)(wx,{value:U4,children:(0,H.jsx)(`em`,{children:`All Machines`})}),o.map(e=>(0,H.jsx)(wx,{value:e,children:(0,H.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,H.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(Gm,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:s,size:`large`,children:(0,H.jsx)(jT,{})})})]})}function q4(){return GI(`Tool Report`),(0,H.jsxs)(J,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,H.jsx)(K4,{}),(0,H.jsx)(`main`,{children:(0,H.jsx)(IU,{children:(0,H.jsx)(G4,{})})})]})}var J4=G(dw)(()=>({"& > *":{borderBottom:`unset`}}));function Y4(e){if(e.length===0)return``;let t=e.lastIndexOf(`\\`);return t>=0&&t<e.length-2?e.substr(t+1):e}var X4=new Intl.NumberFormat(`en-US`,{maximumFractionDigits:2});function Z4(e){let[t,n]=(0,I.useState)(!1),r=R(k4),i=R(j4),a=8+ +!!e.showCellCtrlCol+ +!!e.showRevCol,o=e.program.toolUse!==null&&e.program.toolUse.tools.length>0&&Q.of(e.program.toolUse.tools).some(e=>e.cycleUsageMinutes>0),s=e.program.toolUse!==null&&e.program.toolUse.tools.length>0&&Q.of(e.program.toolUse.tools).some(e=>e.cycleUsageCnt>0);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(J4,{children:[(0,H.jsx)(Z,{children:e.program.toolUse===null||e.program.toolUse.tools.length===0?void 0:(0,H.jsx)(Gm,{size:`small`,onClick:()=>n(!t),children:t?(0,H.jsx)(LT,{}):(0,H.jsx)(PT,{})})}),(0,H.jsx)(Z,{children:Y4(e.program.programName)}),e.showCellCtrlCol?(0,H.jsx)(Z,{children:e.program.cellControllerProgramName}):void 0,(0,H.jsx)(Z,{children:e.program.partName===null?void 0:(0,H.jsxs)(J,{sx:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(LU,{part:e.program.partName,size:20}),(0,H.jsx)(`span`,{children:e.program.partName})]})}),(0,H.jsx)(Z,{children:e.program.comment??``}),e.showRevCol?(0,H.jsx)(Z,{children:e.program.revision===null?``:e.program.revision.toFixed()}):void 0,(0,H.jsx)(Z,{align:`right`,children:e.program.statisticalCycleTime===null?``:e.program.statisticalCycleTime.medianMinutesForSingleMat.toFixed(2)}),(0,H.jsx)(Z,{align:`right`,children:e.program.statisticalCycleTime===null?``:e.program.statisticalCycleTime.MAD_aboveMinutes.toFixed(2)}),(0,H.jsx)(Z,{align:`right`,children:e.program.statisticalCycleTime===null?``:e.program.statisticalCycleTime.MAD_belowMinutes.toFixed(2)}),(0,H.jsx)(Z,{align:`right`,children:e.program.plannedMins===null?``:X4.format(e.program.plannedMins)}),(0,H.jsxs)(Z,{children:[(0,H.jsx)(X,{title:`Load Program Content`,children:(0,H.jsx)(Gm,{size:`small`,onClick:()=>r(e.program),children:(0,H.jsx)(mT,{})})}),e.program.revision===null?void 0:(0,H.jsx)(X,{title:`Revision History`,children:(0,H.jsx)(Gm,{size:`small`,onClick:()=>i(e.program),children:(0,H.jsx)(kT,{})})})]})]}),(0,H.jsx)(dw,{children:(0,H.jsx)(Z,{sx:{pb:`0`,pt:`0`},colSpan:a,children:(0,H.jsx)(Rp,{in:t,timeout:`auto`,unmountOnExit:!0,children:(0,H.jsx)(J,{sx:{mr:`1em`,ml:`3em`},children:e.program.toolUse===null||e.program.toolUse.tools.length===0?void 0:(0,H.jsxs)(AC,{size:`small`,sx:{width:`auto`,ml:`10em`,mr:`1em`},children:[(0,H.jsx)($C,{children:(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{children:`Tool`}),o?(0,H.jsx)(Z,{align:`right`,children:`Estimated Usage (min)`}):void 0,s?(0,H.jsx)(Z,{align:`right`,children:`Estimated Usage (count)`}):void 0]})}),(0,H.jsx)(LC,{children:Q.of(e.program.toolUse.tools).map((e,t)=>(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{children:e.toolName}),o?(0,H.jsx)(Z,{align:`right`,children:e.cycleUsageMinutes===0?``:e.cycleUsageMinutes.toFixed(1)}):void 0,s?(0,H.jsx)(Z,{align:`right`,children:e.cycleUsageCnt===0?``:e.cycleUsageCnt.toFixed(1)}):void 0]},t))})]})})})})})]})}function Q4(){let e=L(O4),[t,n]=(0,I.useState)(`ProgramName`),[r,i]=(0,I.useState)(`asc`);if(e===null)return(0,H.jsx)(`div`,{});let a=Q.of(e.programs).sortWith((e,n)=>{let i=0;switch(t){case`ProgramName`:i=Y4(e.programName).localeCompare(Y4(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,H.jsxs)(AC,{stickyHeader:!0,children:[(0,H.jsx)($C,{children:(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{}),(0,H.jsx)(Z,{sortDirection:t===`ProgramName`&&r,children:(0,H.jsx)(vw,{active:t===`ProgramName`,direction:r,onClick:()=>o(`ProgramName`),children:`Program Name`})}),e.cellNameDifferentFromProgName?(0,H.jsx)(Z,{sortDirection:t===`CellProgName`&&r,children:(0,H.jsx)(vw,{active:t===`CellProgName`,direction:r,onClick:()=>o(`CellProgName`),children:`Cell Controller Program`})}):void 0,(0,H.jsx)(Z,{sortDirection:t===`PartName`&&r,children:(0,H.jsx)(vw,{active:t===`PartName`,direction:r,onClick:()=>o(`PartName`),children:`Part`})}),(0,H.jsx)(Z,{sortDirection:t===`Comment`&&r,children:(0,H.jsx)(vw,{active:t===`Comment`,direction:r,onClick:()=>o(`Comment`),children:`Comment`})}),e.hasRevisions?(0,H.jsx)(Z,{sortDirection:t===`Revision`&&r,children:(0,H.jsx)(vw,{active:t===`Revision`,direction:r,onClick:()=>o(`Revision`),children:`Revision`})}):void 0,(0,H.jsx)(Z,{sortDirection:t===`MedianTime`&&r,align:`right`,children:(0,H.jsx)(vw,{active:t===`MedianTime`,direction:r,onClick:()=>o(`MedianTime`),children:`Median Time / Material (min)`})}),(0,H.jsx)(Z,{sortDirection:t===`DeviationAbove`&&r,align:`right`,children:(0,H.jsx)(vw,{active:t===`DeviationAbove`,direction:r,onClick:()=>o(`DeviationAbove`),children:`Deviation Above Median`})}),(0,H.jsx)(Z,{sortDirection:t===`DeviationBelow`&&r,align:`right`,children:(0,H.jsx)(vw,{active:t===`DeviationBelow`,direction:r,onClick:()=>o(`DeviationBelow`),children:`Deviation Below Median`})}),(0,H.jsx)(Z,{sortDirection:t===`Planned`&&r,align:`right`,children:(0,H.jsx)(vw,{active:t===`Planned`,direction:r,onClick:()=>o(`Planned`),children:`Planned Time (min)`})}),(0,H.jsx)(Z,{})]})}),(0,H.jsx)(LC,{children:Q.of(a).map((t,n)=>(0,H.jsx)(Z4,{program:t,showCellCtrlCol:e.cellNameDifferentFromProgName,showRevCol:e.hasRevisions},n))})]})}function $4(){let e=L(A4),[t,n]=(0,I.useState)(null),r=(0,I.useMemo)(()=>new Worker(new URL(`/assets/ProgramHighlight-DPTeZ8Si.js`,``+import.meta.url),{type:`module`}),[]);return(0,I.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,I.useEffect)(()=>{e&&e!==``&&r.postMessage(e,[])},[e,r]),(0,H.jsx)(`pre`,{children:t===null?(0,H.jsx)(`code`,{className:`gcode`,children:e}):(0,H.jsx)(`code`,{className:`gcode`,dangerouslySetInnerHTML:{__html:t}})})}function e3(){let[e,t]=z(k4),n=L(j4);return(0,H.jsxs)(ky,{open:e!==null&&n===null,onClose:()=>t(null),maxWidth:`lg`,children:[(0,H.jsx)(My,{children:e?.partName?(0,H.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,alignItems:`center`},children:[(0,H.jsx)(LU,{part:e.partName}),(0,H.jsxs)(`div`,{style:{marginLeft:`10px`,marginRight:`3em`},children:[e?.programName??`Program`,` `,e?.revision?` rev`+e.revision.toFixed():``,` `,(0,H.jsxs)(q,{variant:`subtitle1`,component:`span`,children:[`(`,e.partName,`)`]})]})]}):(0,H.jsxs)(H.Fragment,{children:[e?.programName??`Program`,` `,e?.revision?` rev`+e.revision.toFixed():``]})}),(0,H.jsx)(jy,{children:e===null||n!==null?(0,H.jsx)(`div`,{}):(0,H.jsx)(IU,{children:(0,H.jsx)($4,{})})}),(0,H.jsx)(Ay,{children:(0,H.jsx)(Y,{onClick:()=>t(null),children:`Close`})})]})}var t3=10;function n3(e){let t=L(j4),n=R(k4);return(0,H.jsxs)(AC,{children:[(0,H.jsx)($C,{children:(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{children:`Revision`}),(0,H.jsx)(Z,{children:`Comment`}),(0,H.jsx)(Z,{children:`Cell Controller Program`}),(0,H.jsx)(Z,{})]})}),(0,H.jsx)(LC,{children:e.loading?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(dw,{children:(0,H.jsx)(Z,{colSpan:4,children:(0,H.jsx)(zm,{})})}),Q.ofRange(0,t3-1).map(e=>(0,H.jsx)(dw,{children:(0,H.jsx)(Z,{colSpan:4})},e))]}):Q.of(e.revisions).drop(e.page*t3).take(t3).map(e=>(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{children:e.revision}),(0,H.jsx)(Z,{children:e.comment??``}),(0,H.jsx)(Z,{children:e.cellControllerProgramName??``}),(0,H.jsx)(Z,{children:(0,H.jsx)(X,{title:`Load Program Content`,children:(0,H.jsx)(Gm,{size:`small`,onClick:()=>n({...e,partName:t?.partName??null}),children:(0,H.jsx)(mT,{})})})})]},e.revision))})]})}function r3(){let[e,t]=z(j4),[n,r]=z(k4),[i,a]=(0,I.useState)(null),[o,s]=(0,I.useState)({page:0,hasMore:!1}),[c,l]=(0,I.useState)(0),[u,d]=(0,I.useState)(!1),[f,p]=(0,I.useState)(null);(0,I.useEffect)(()=>{e===null?(a(null),l(0),s({page:0,hasMore:!1})):e!==null&&i===null&&(d(!0),p(null),Wt.getProgramRevisionsInDescendingOrderOfRevision(e.programName,t3,void 0).then(e=>{a(e),s({page:0,hasMore:e.length===t3})}).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];Wt.getProgramRevisionsInDescendingOrderOfRevision(e.programName,t3,t?t.revision-1:void 0).then(e=>{a(t=>t===null?e:t.concat(e)),s({page:c+1,hasMore:e.length===t3}),l(c+1)}).catch(p).finally(()=>d(!1))}}return(0,H.jsxs)(ky,{open:e!==null,onClose:()=>t(null),maxWidth:`lg`,children:[(0,H.jsx)(My,{children:e?.partName?(0,H.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,alignItems:`center`},children:[(0,H.jsx)(LU,{part:e.partName}),(0,H.jsxs)(`div`,{style:{marginLeft:`10px`,marginRight:`3em`},children:[e.programName??`Program`,` `,(0,H.jsxs)(q,{variant:`subtitle1`,component:`span`,children:[`(`,e.partName,`)`]})]})]}):(0,H.jsx)(H.Fragment,{children:e?.programName??`Program`})}),(0,H.jsxs)(jy,{children:[f===null?void 0:(0,H.jsx)(Av,{children:(0,H.jsx)(Pv,{children:typeof f==`string`?f:f.message})}),n===null?i===null?u?(0,H.jsx)(zm,{}):void 0:(0,H.jsx)(n3,{page:c,revisions:i,loading:u}):(0,H.jsx)(IU,{children:(0,H.jsx)($4,{})})]}),(0,H.jsx)(Ay,{children:(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,width:`100%`},children:[n===null?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(X,{title:`Latest Revisions`,children:(0,H.jsx)(`span`,{children:(0,H.jsx)(Gm,{onClick:()=>l(0),disabled:u||c===0,size:`large`,children:(0,H.jsx)(ET,{})})})}),(0,H.jsx)(X,{title:`Previous Page`,children:(0,H.jsx)(`span`,{children:(0,H.jsx)(Gm,{onClick:()=>l(c-1),disabled:u||c===0,size:`large`,children:(0,H.jsx)(FT,{})})})}),(0,H.jsx)(X,{title:`Next Page`,children:(0,H.jsx)(`span`,{children:(0,H.jsx)(Gm,{onClick:()=>m(),disabled:u||c===o.page&&!o.hasMore,size:`large`,children:(0,H.jsx)(IT,{})})})})]}):void 0,(0,H.jsx)(`div`,{style:{flexGrow:1}}),n===null?void 0:(0,H.jsx)(Y,{onClick:()=>r(null),children:`Back to History`}),(0,H.jsx)(Y,{onClick:()=>t(null),children:`Close`})]})})]})}function i3(){let[e,t]=z(D4),[n,r]=(0,I.useState)(!1),i=WI(),[a,o]=z(T4);function s(){r(!0),t(new Date).catch(console.log).finally(()=>r(!1))}return i?(0,H.jsx)(`div`,{}):e===null?(0,H.jsx)(`main`,{style:{margin:`2em`,display:`flex`,justifyContent:`center`},children:(0,H.jsx)(Iy,{color:`secondary`,size:`large`,variant:`extended`,style:{margin:`2em`},onClick:s,disabled:n,children:(0,H.jsxs)(H.Fragment,{children:[n?(0,H.jsx)(zm,{size:10,style:{marginRight:`1em`}}):(0,H.jsx)(VT,{fontSize:`inherit`,style:{marginRight:`1em`}}),`Load Programs`]})})}):(0,H.jsxs)(J,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,H.jsx)(X,{title:`Refresh Programs`,children:(0,H.jsx)(`div`,{children:(0,H.jsx)(Gm,{onClick:s,disabled:n,size:`small`,children:n?(0,H.jsx)(zm,{size:10}):(0,H.jsx)(VT,{fontSize:`inherit`})})})}),(0,H.jsxs)(`span`,{style:{marginLeft:`1em`},children:[`Programs from `,(0,H.jsx)(Uz,{date:e})]}),(0,H.jsx)(`div`,{style:{flexGrow:1}}),(0,H.jsx)(Ry,{size:`small`,children:(0,H.jsxs)(oS,{autoWidth:!0,value:a,onChange:e=>o(e.target.value),children:[(0,H.jsx)(wx,{value:`AllPrograms`,children:`All Programs`},`AllPrograms`),(0,H.jsx)(wx,{value:`ActivePrograms`,children:`Active Programs`},`ActivePrograms`)]})})]})}function a3(){return GI(`Programs`),(0,H.jsxs)(J,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,H.jsx)(i3,{}),(0,H.jsx)(`main`,{children:(0,H.jsx)(IU,{children:(0,H.jsx)(Q4,{})})}),(0,H.jsx)(e3,{}),(0,H.jsx)(r3,{})]})}var o3=P(!1),s3=o3,c3=P(null),l3=c3;function u3(e){let t=new Date,n=tE(t,-30),r=Ht.currentStatus().then(t=>e(LR,t)),i=Ht.recent(n,[]).then(t=>e(FR,t)),a=Ut.get(n,t).then(t=>e(IR,t));Promise.all([r,i,a]).catch(t=>e(c3,t.message??`Error`)).finally(()=>e(o3,!1))}function d3(e,t,n){let r=new Date,i=Ht.currentStatus().then(e=>n(LR,e)),a=Ht.recent(tE(r,-30),t?Array.from(t):[]).then(e=>n(FR,e)),o=Ut.recent(e,void 0).then(e=>n(IR,e));Promise.all([i,a,o]).catch(e=>n(c3,e.message??`Error`)).finally(()=>n(o3,!1))}var f3=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)})}},p3=P(null,(e,t)=>{let n=e(NR),r=e(xO);t(o3,!0),t(c3,null),n==null?u3(t):d3(n,r,t)}),m3=P(null,(e,t,n)=>{t(PR,{evt:Ae.fromJS(JSON.parse(n.data)),now:new Date,expire:!0})});function h3(){let e=R(p3),t=R(o3),n=(0,I.useCallback)(()=>t(!0),[t]),r=R(m3),i=L(yr),a=(0,I.useRef)(null);return(0,I.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 f3(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 g3=[{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 _3({job:e}){let[t,n]=(0,I.useState)(!1);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(fX,{children:[g3.map(t=>(0,H.jsx)(Z,{align:t.numeric?`right`:`left`,children:t.id===1?(0,H.jsxs)(J,{sx:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(J,{sx:{mr:`0.2em`},children:(0,H.jsx)(LU,{part:e.partName,size:25})}),(0,H.jsx)(`div`,{children:e.partName})]}):t.getDisplay(e)},t.id)),(0,H.jsx)(Z,{children:(0,H.jsx)(X,{title:`Show Details`,children:(0,H.jsx)(Gm,{size:`small`,onClick:()=>n(!t),children:t?(0,H.jsx)(LT,{}):(0,H.jsx)(PT,{})})})})]}),(0,H.jsx)(pX,{children:(0,H.jsx)(Z,{sx:{pb:`0`,pt:`0`},colSpan:g3.length+1,children:(0,H.jsx)(Rp,{in:t,timeout:`auto`,unmountOnExit:!0,children:(0,H.jsx)(Xq,{job:e.inProcJob?e.inProcJob:e.historicJob,checkAnalysisMonth:!0})})})})]})}function v3(){let e=L(UR),t=G1(),n=W1(e),r=K1(0,g3),i=L(e.type===`Last30`?lL:dL),a=L(e.type===`Last30`?yO:CO),o=(0,I.useMemo)(()=>jq(n.zoomRange,i.matsById,a,null),[n,i.matsById,a]),s=(0,I.useMemo)(()=>Q.of(o).sortBy(r.sortOn).drop(t.page*t.rowsPerPage).take(t.rowsPerPage),[o,r,t]);return(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(AC,{stickyHeader:!0,children:[(0,H.jsx)(L1,{columns:g3,sort:r,showDetailsCol:!0,copyToClipboardRows:o}),(0,H.jsx)(LC,{children:s.map((e,t)=>(0,H.jsx)(_3,{job:e},e.historicJob?.unique??e.inProcJob?.unique??t))})]}),(0,H.jsx)(H1,{tpage:t,zoom:n.zoom,count:o.length})]})}function y3(){return GI(`Scheduled Jobs`),(0,H.jsx)(H.Fragment,{children:(0,H.jsx)(`main`,{style:{padding:`24px`},children:(0,H.jsx)(v3,{})})})}function b3(){GI(`Quality`);let e=L(UR);return(0,H.jsx)(u0,{subtitle:`Inspection decisions grouped by path`,inspectionlogs:L(e.type===`Last30`?aL:Yie),zoomType:e.type===`Last30`?`Last30Days`:`ZoomIntoRange`,default_date_range:e.type===`Last30`?[tE(bE(),-29),tE(bE(),1)]:[e.month,nE(e.month,1)]})}var x3={display:`flex`,backgroundColor:`#E0E0E0`,paddingLeft:`24px`,paddingRight:`24px`,paddingBottom:`4px`,height:`2.5em`,alignItems:`flex-end`},S3={display:`flex`,alignSelf:`center`,alignItems:`flex-end`},C3=`@@all_inspection_display@@`,w3=`@@recent_completed_material@@`;function T3(e){return typeof e==`string`?e.split(`,`):e}function E3(){let[e,t]=z(Pq);return(0,H.jsx)(zy,{control:(0,H.jsx)(Jv,{size:`small`,checked:e,onChange:e=>t(e.target.checked)}),label:`Hide Non-Loading Material`,sx:{pl:2,pr:2}})}function D3(){let[e,t]=z(UI),n=L(EL),r=Q.of(Object.keys(L(GO).queues)).toSortedArray(e=>e),i=L(yr),a=Yw(Dd().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===C3?{route:$.Station_InspectionMonitor}:{route:$.Station_InspectionMonitorWithType,inspType:e})}function c(n){let r=n.includes(w3);n=n.filter(e=>e!==w3).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(w3));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,H.jsxs)(J,{component:`nav`,sx:a?x3:S3,children:[u===`LoadUnload`?i.loadStationNames&&Object.keys(i.loadStationNames).length>0?(0,H.jsx)(oS,{value:d,onChange:e=>o(e.target.value.toString()),variant:`standard`,style:{marginLeft:`1em`,minWidth:`8em`},children:Q.of(Object.entries(i.loadStationNames)).sortBy(([e])=>parseInt(e)).map(([e,t])=>(0,H.jsx)(wx,{value:parseInt(e),children:t},e))},`loadnumselect`):(0,H.jsx)(Uy,{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,H.jsxs)(oS,{value:f||C3,onChange:e=>s(e.target.value),variant:`standard`,style:{marginLeft:`1em`},children:[(0,H.jsx)(wx,{value:C3,children:(0,H.jsx)(`em`,{children:`All`})},C3),Q.of(n).sortBy(e=>e).map(e=>(0,H.jsx)(wx,{value:e,children:e},e))]},`inspselect`):void 0,u===`LoadUnload`?(0,H.jsxs)(Ry,{style:{marginLeft:`1em`},children:[p.length===0?(0,H.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,H.jsxs)(oS,{multiple:!0,displayEmpty:!0,variant:`standard`,value:p,inputProps:{id:`queueselect`},style:{minWidth:`10em`,marginTop:`0`},onChange:e=>c(T3(e.target.value)),children:[r.map((e,t)=>(0,H.jsx)(wx,{value:e,children:e},t)),(0,H.jsx)(wx,{value:w3,children:(0,H.jsx)(`i`,{children:`Completed`})}),(0,H.jsx)(Py,{}),(0,H.jsx)(E3,{})]})]}):void 0,u===`Queues`?(0,H.jsxs)(Ry,{style:{marginLeft:`1em`,minWidth:`10em`},children:[p.length===0?(0,H.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,H.jsx)(oS,{multiple:!0,displayEmpty:!0,variant:`standard`,value:p,inputProps:{id:`queueselect`},style:{marginTop:`0`},onChange:e=>l(T3(e.target.value)),children:r.map((e,t)=>(0,H.jsx)(wx,{value:e,children:e},t))})]}):void 0]})}function O3(){let e=Yw(Dd().breakpoints.down(`md`));return(0,H.jsx)(J,{sx:{display:`flex`,alignItems:`center`,height:`100%`,bgcolor:e?`#E0E0E0`:void 0},children:(0,H.jsx)(w2,{full:e})})}var k3=PO(`shift-starts`,[[1,360],[2,840],[3,1320]]),A3=P(e=>new Map(e(k3)),(e,t,n)=>{let r=new Map(e(k3));n(r),t(k3,Array.from(r.entries()))});function j3(e){let t=L(A3);return(0,I.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:tE(e,1)}];let r=lE(tE(e,1),n[0]),i=[];for(let t=0;t<n.length;t++)i.push({start:lE(e,n[t]),end:t===n.length-1?r:lE(e,n[t+1])});return i},[t,e])}function M3(e){let[t,n]=e.split(`:`);return parseInt(t,10)*60+parseInt(n,10)}function N3(e){let t=Math.floor(e/60),n=e%60;return`${t.toString().padStart(2,`0`)}:${n.toString().padStart(2,`0`)}`}function P3(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 F3({shiftNum:e}){let[t,n]=z(A3),r=t.get(e);return(0,H.jsx)(Hw,{type:`time`,label:`Shift ${e} Start`,error:P3(e,t),value:r===void 0?``:N3(r),onChange:t=>{let r=t.target.value;n(r===``?t=>t.delete(e):t=>t.set(e,M3(r)))},variant:`standard`,size:`small`,slotProps:{inputLabel:{shrink:!0},input:e===1?void 0:{endAdornment:(0,H.jsx)(X,{title:`Clear/Disable Shift`,children:(0,H.jsx)(gm,{sx:{mb:`4px`},onClick:()=>n(t=>t.delete(e)),children:(0,H.jsx)(fT,{fontSize:`small`})})})}}})}function I3(){return(0,H.jsxs)(MS,{direction:`row`,spacing:2,children:[(0,H.jsx)(F3,{shiftNum:1}),(0,H.jsx)(F3,{shiftNum:2}),(0,H.jsx)(F3,{shiftNum:3})]})}function L3(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 R3(e,t){return Q.of(e).filter(e=>e.finalProcess).collect(L3(e=>e.completeTime,t)).toLookupOrderedMap(e=>e.val.partName,e=>e.shift,e=>e.val.quantity,(e,t)=>e+t)}function z3(e,t){return e.valuesToLazySeq().filter(e=>vk(e)&&e.operation===`UNLOAD`&&Q.of(e.material).some(e=>e.proc===e.numproc)).collect(L3(e=>e.endTime,t)).toLookupOrderedMap(e=>e.val.part,e=>e.shift,e=>Q.of(e.val.material).sumBy(e=>+(e.proc===e.numproc)),(e,t)=>e+t)}function B3(e){let t=L(Mk),n=L(YI),r=j3(e);return(0,I.useMemo)(()=>{let e=R3(n,r),i=z3(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??fO.empty(),completed:n??fO.empty()})).toRArray()},[t,n,r])}var V3=new Intl.DateTimeFormat(void 0,{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`});function H3({row:e}){return(0,H.jsxs)(MS,{direction:`row`,spacing:1,sx:{alignItems:`center`},children:[(0,H.jsx)(LU,{part:e.part,size:25}),(0,H.jsx)(`span`,{children:e.part})]})}function U3(e){let t=j3(e).length;return(0,I.useMemo)(()=>{let e=[{id:0,numeric:!1,label:`Part`,getDisplay:e=>e.part,getForTotal:()=>0,Cell:H3},{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 W3({columns:e,rows:t}){return(0,H.jsx)(dw,{children:e.map(e=>(0,H.jsx)(Z,{align:e.numeric?`right`:`left`,children:e.id===0?`Total`:Q.of(t).sumBy(e.getForTotal)},e.id))})}var G3=(0,I.memo)(function({columns:e,rows:t}){let n=K1(0,e);return(0,H.jsx)(J,{sx:{overflowX:`auto`},children:(0,H.jsxs)(AC,{stickyHeader:!0,children:[(0,H.jsx)(L1,{columns:e,sort:n,showDetailsCol:!1}),(0,H.jsx)(U1,{columns:e,pageData:Q.of(t).toSortedArray(n.sortOn,e=>e.part)}),(0,H.jsx)(qC,{children:(0,H.jsx)(W3,{columns:e,rows:t})})]})})});function K3({day:e,setDay:t}){let n=bE();return(0,H.jsxs)(MS,{direction:`row`,spacing:2,sx:{alignItems:`center`},children:[(0,H.jsx)(X,{title:`Previous Day`,children:(0,H.jsx)(`div`,{children:(0,H.jsx)(Gm,{disabled:e<=tE(n,-28),onClick:()=>t(e=>tE(e,-1)),children:(0,H.jsx)(KT,{})})})}),(0,H.jsx)(q,{sx:{minWidth:`14em`,textAlign:`center`},children:V3.format(e)}),(0,H.jsx)(X,{title:`Next Day`,children:(0,H.jsx)(`div`,{children:(0,H.jsx)(Gm,{disabled:e>=n,onClick:()=>t(e=>tE(e,1)),children:(0,H.jsx)(GT,{})})})})]})}var q3=`"shifts day export" auto / 1fr 1fr 1fr`,J3=`"shifts export" auto
|
|
355
|
+
"day day" auto / 1fr auto`,Y3=function({day:e,setDay:t,columns:n,rows:r}){return(0,H.jsxs)(J,{component:`nav`,sx:{display:`grid`,gridTemplate:{md:q3,xs:J3},minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,H.jsx)(J,{sx:{gridArea:`shifts`,justifySelf:`flex-start`},children:(0,H.jsx)(I3,{})}),(0,H.jsx)(J,{sx:{gridArea:`day`,justifySelf:`center`},children:(0,H.jsx)(K3,{day:e,setDay:t})}),(0,H.jsx)(J,{sx:{gridArea:`export`,justifySelf:`flex-end`},children:(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(Gm,{onClick:()=>J1(n,r),children:(0,H.jsx)(jT,{})})})})]})};function X3(){GI(`Recent Completed Parts`);let[e,t]=(0,I.useState)(bE),n=U3(e),r=B3(e);return(0,H.jsxs)(J,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,H.jsx)(Y3,{day:e,setDay:t,rows:r,columns:n}),(0,H.jsx)(`main`,{children:(0,H.jsx)(G3,{rows:r,columns:n})})]})}function Z3(){let[e,t]=(0,I.useState)(!1);function n(){t(!0),Vt.enableVerboseLoggingForFiveMinutes(),setTimeout(()=>t(!1),300*1e3)}return(0,H.jsx)(`main`,{style:{marginTop:`4em`},children:(0,H.jsxs)(`div`,{style:{maxWidth:`50em`,marginLeft:`auto`,marginRight:`auto`,textAlign:`center`},children:[(0,H.jsx)(`p`,{style:{marginBottom:`1em`},children:`Verbose logging generates a large amount of additional data in the FMS Insight Server debug log file.`}),(0,H.jsx)(Y,{disabled:e,onClick:n,variant:`contained`,children:e?(0,H.jsx)(`span`,{children:`Verbose Logging is Enabled`}):(0,H.jsx)(`span`,{children:`Enable Verbose Logging For 5 minutes`})})]})})}function Q3(){return(0,H.jsxs)(`svg`,{width:`30px`,height:`30px`,viewBox:`0 0 170 170`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,H.jsxs)(`defs`,{children:[(0,H.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,H.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,H.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,H.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,H.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,H.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,H.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,H.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,H.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,H.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,H.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,H.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,H.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,H.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,H.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,H.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,H.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,H.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,H.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,H.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,H.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,H.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,H.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,H.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,H.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,H.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,H.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,H.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,H.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,H.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,H.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,H.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,H.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,H.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,H.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,H.jsx)(`g`,{transform:`translate(-219.32 -33)`,visibility:`inherit`,children:(0,H.jsxs)(`g`,{visibility:`inherit`,children:[(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#t`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#t`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#ag`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#ag`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#m`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#m`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#x`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#x`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#k`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#k`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#ae`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#ae`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#l`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#l`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#u`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#u`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#a`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#a`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#f`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#f`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#b`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#b`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#s`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#s`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#n`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#n`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#ah`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#y`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#y`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#aa`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#aa`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#af`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#af`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#z`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#z`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#h`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#h`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#ab`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#ab`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#ac`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#ac`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#c`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#c`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#p`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#p`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#o`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#o`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#j`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#j`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#w`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#w`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#i`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#i`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#r`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#r`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#ad`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#ad`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#ai`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#d`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#d`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#q`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#q`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#v`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#v`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#g`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#g`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#e`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#e`})]})})]})}var $3=`__FMS_INSIGHT_NEW_OPERATOR__`,e6=(0,I.memo)(function(){let e=L(yr),[t,n]=z(UO),[r,i]=z(HO),[a,o]=(0,I.useState)(!1),[s,c]=(0,I.useState)(``);function l(e){e.target.value===$3?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,H.jsx)(`div`,{children:e.user.profile.name||e.user.profile.sub}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(oS,{value:t||``,onChange:l,variant:`standard`,renderValue:e=>e,children:[Q.of(r).sortBy(e=>e).map((e,t)=>(0,H.jsxs)(wx,{value:e,children:[(0,H.jsx)(Tb,{primary:e}),(0,H.jsx)(ub,{children:(0,H.jsx)(Gm,{edge:`end`,onClick:()=>u(e),size:`large`,children:(0,H.jsx)(hT,{})})})]},t)),(0,H.jsx)(wx,{value:$3,children:(0,H.jsx)(`em`,{children:`Create New Operator`})},`new`)]}),(0,H.jsxs)(ky,{open:a,onClose:()=>{o(!1),c(``)},children:[(0,H.jsx)(My,{children:`Create New Operator`}),(0,H.jsx)(jy,{children:(0,H.jsx)(Hw,{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,H.jsxs)(Ay,{children:[(0,H.jsxs)(Y,{disabled:s===``,onClick:d,children:[`Create `,s]}),(0,H.jsx)(Y,{onClick:()=>{c(``),o(!1)},children:`Cancel`})]})]})]})}),t6=(0,I.memo)(function(){let e=L(s3),t=L(KR),n=L(l3),r=L(JR),[i,a]=(0,I.useState)(!1);return(0,H.jsxs)(H.Fragment,{children:[n!=null||r!=null?(0,H.jsx)(X,{title:`Error`,children:(0,H.jsx)(Gm,{onClick:()=>a(!0),size:`large`,children:(0,H.jsx)(xT,{})})}):void 0,e||t?(0,H.jsx)(X,{title:`Loading`,children:(0,H.jsx)(zm,{"data-testid":`loading-icon`,color:`secondary`})}):void 0,(0,H.jsxs)(ky,{open:i,onClose:()=>a(!1),children:[(0,H.jsx)(My,{children:`Error`}),(0,H.jsxs)(jy,{children:[n===null?void 0:(0,H.jsx)(`p`,{children:n}),r===null?void 0:(0,H.jsx)(`p`,{children:r})]}),(0,H.jsx)(Ay,{children:(0,H.jsx)(Y,{onClick:()=>a(!1),children:`Close`})})]})]})}),n6=(0,I.memo)(function(){let e=L(yr)?.customStationMonitorDialogUrl,[t,n]=(0,I.useState)(!1);if(!e)return null;let r=e.split(`/`),i=r[r.length-1];return i=i[0].toUpperCase()+i.substr(1),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(X,{title:i,children:(0,H.jsx)(Gm,{onClick:()=>n(!0),size:`large`,children:(0,H.jsx)(lre,{})})}),(0,H.jsxs)(ky,{open:t,onClose:()=>n(!1),fullWidth:!0,maxWidth:`md`,children:[(0,H.jsx)(My,{children:i}),(0,H.jsx)(jy,{children:(0,H.jsx)(`iframe`,{width:`100%`,src:e,sandbox:`allow-scripts`,style:{border:0,height:`calc(100vh - 250px)`}})}),(0,H.jsx)(Ay,{children:(0,H.jsx)(Y,{color:`primary`,onClick:()=>n(!1),children:`Close`})})]})]})});function r6({d:e}){let t=pE(e,bE());return t>7?null:t>=0?(0,H.jsxs)(q,{variant:`subtitle1`,children:[`License expires on `,e.toDateString()]}):(0,H.jsxs)(q,{variant:`h6`,children:[`License expired on `,e.toDateString()]})}function i6(){let e=L(yr),t=``;return t=e.name?(e.name||``)+` `+(e.version||``):`SeedTactic FMS Insight`,(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(X,{title:t,children:(0,H.jsx)(`div`,{children:(0,H.jsx)(Q3,{})})}),(0,H.jsx)(q,{variant:`h6`,style:{marginLeft:`1em`,marginRight:`2em`},children:`Insight`}),e?.licenseExpires?(0,H.jsx)(r6,{d:e.licenseExpires}):void 0]})}function $ie(){let e=L(GO).alarms,t=e&&e.length>0;return(0,H.jsx)(X,{title:t?e.join(`. `):`No Alarms`,children:(0,H.jsx)(mv,{badgeContent:t?e.length:0,children:(0,H.jsx)(are,{color:t?`error`:void 0})})})}function eae(){return(0,H.jsx)(X,{title:`Help`,children:(0,H.jsx)(Gm,{"aria-label":`Help`,href:Pie(L(UI)),target:`_help`,size:`large`,children:(0,H.jsx)(OT,{})})})}function tae(){return(0,H.jsx)(X,{title:`Logout`,children:(0,H.jsx)(Gm,{"aria-label":`Logout`,onClick:xr,size:`large`,children:(0,H.jsx)(nre,{})})})}function a6({showAlarms:e,showLogout:t,showSearch:n}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(t6,{}),(0,H.jsx)(n6,{}),n?(0,H.jsx)(Oq,{}):void 0,n?(0,H.jsx)(OY,{}):void 0,(0,H.jsx)(eae,{}),t?(0,H.jsx)(tae,{}):void 0,e?(0,H.jsx)($ie,{}):void 0]})}function nae({menuNavs:e}){let t=L(yr),[n,r]=z(UI),[i,a]=(0,I.useTransition)();return(0,H.jsx)(Ry,{size:`small`,children:(0,H.jsx)(oS,{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,H.jsxs)(J,{sx:{display:`flex`,alignItems:`center`},children:[r.icon,(0,H.jsxs)(q,{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,H.jsx)(y_,{children:e.separator},e.separator):e.hidden?.(t)?void 0:(0,H.jsxs)(wx,{value:e.route.route,children:[(0,H.jsx)(bb,{children:e.icon}),(0,H.jsx)(Tb,{primary:typeof e.name==`string`?e.name:e.name(t)})]},n))})})}function rae({showAlarms:e,showLogout:t,showSearch:n,showOperator:r,Nav1:i,Nav2:a,menuNavs:o}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(ph,{position:`static`,sx:{display:{xs:`none`,md:`block`}},children:(0,H.jsx)(rw,{children:(0,H.jsxs)(J,{sx:{display:`grid`,gridTemplateColumns:a?`1fr auto 1fr`:`minmax(200px, 1fr) auto`,width:`100vw`,gridTemplateAreas:a?`"nav navCenter tools"`:`"nav tools"`},children:[(0,H.jsxs)(J,{sx:{gridArea:`nav`,display:`flex`,alignItems:`center`},children:[(0,H.jsx)(i6,{}),i?(0,H.jsx)(i,{}):void 0]}),a?(0,H.jsx)(J,{sx:{gridArea:`navCenter`},children:(0,H.jsx)(a,{})}):void 0,(0,H.jsxs)(J,{sx:{gridArea:`tools`,display:`flex`,alignItems:`center`,justifyContent:`flex-end`},children:[r?(0,H.jsx)(e6,{}):void 0,(0,H.jsx)(a6,{showAlarms:e,showLogout:t,showSearch:n})]})]})})}),(0,H.jsxs)(ph,{position:`static`,sx:{display:{xs:`block`,md:`none`}},children:[(0,H.jsxs)(rw,{children:[(0,H.jsx)(i6,{}),(0,H.jsx)(`div`,{style:{flexGrow:1}}),(0,H.jsx)(a6,{showAlarms:e,showLogout:t,showSearch:n})]}),(0,H.jsxs)(J,{sx:{display:`grid`,gridTemplateColumns:`minmax(200px, 1fr) auto`},children:[(0,H.jsx)(J,{sx:{gridColumn:`1`},children:i?(0,H.jsx)(i,{}):void 0}),(0,H.jsx)(J,{sx:{gridColumn:`2`},children:a?(0,H.jsx)(a,{}):void 0})]})]}),o&&o.length>0?(0,H.jsx)(Hp,{elevation:4,square:!0,component:`nav`,sx:{display:{xs:`block`,xl:`none`},padding:`2px`},children:(0,H.jsx)(nae,{menuNavs:o})}):void 0]})}function iae({menuItems:e}){let t=L(yr),[n,r]=z(UI),[i,a]=(0,I.useTransition)();return!e||e.length===0?null:(0,H.jsx)(Hp,{elevation:3,square:!0,sx:{flexShrink:0,display:{xs:`none`,xl:`block`},minHeight:`calc(100vh - 64px)`,zIndex:1},children:(0,H.jsx)(sb,{dense:!0,children:e?.map((e,o)=>`separator`in e?(0,H.jsx)(y_,{children:e.separator},e.separator):e.hidden?.(t)?void 0:(0,H.jsx)(hb,{children:(0,H.jsxs)(cb,{selected:n.route===e.route.route,onClick:()=>a(()=>r(e.route)),children:[(0,H.jsx)(bb,{children:e.icon}),(0,H.jsx)(Tb,{primary:typeof e.name==`string`?e.name:e.name(t),sx:i?e=>({color:e.palette.grey[700]}):void 0})]})},o))})})}function aae(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+`-`+Q.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=>Q.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 oae(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=Q.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 sae(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:tE(t,-e),end:iE(t,1)}})}else n({zoom:void 0})}}:{type:`ZoomIntoRange`,default_date_range:[e.period.month,nE(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 o6=(0,I.memo)(function(e){let t=L(yr),n=aae(e.matsById,t.loadStationNames,Dk(t.basketName)),r=K1(0,n),i=G1(),a=sae(e),[o,s]=(0,I.useState)(null),c=R(bI),l=oae(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,H.jsxs)(`div`,{children:[(0,H.jsxs)(AC,{children:[(0,H.jsx)(L1,{columns:f,sort:r,showDetailsCol:!0}),(0,H.jsx)(U1,{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,H.jsx)(H1,{zoom:a.zoom,tpage:i,count:u}),(0,H.jsx)(bx,{anchorEl:o?.anchorEl,keepMounted:!0,open:o!==null,onClose:()=>s(null),children:o?.material.map((e,t)=>(0,H.jsx)(wx,{onClick:()=>{c({type:`LogMat`,logMat:e}),s(null)},children:e.serial||`Material`},t))})]})});function s6({outlierTy:e}){GI(e===`machine`?`Machine Outliers`:`L/U Outliers`);let t=L(lL),n=L(yr),r=bE(),i=L(Mk),a=(0,I.useMemo)(()=>{let t=bE(),n=tE(t,-4),r=tE(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,H.jsxs)(J,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,H.jsxs)(J,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,H.jsxs)(q,{variant:`subtitle1`,children:[e===`labor`?`Load/Unload`:`Machine`,` cycles from the past 5 days statistically outside expected range`]}),(0,H.jsx)(J,{sx:{flexGrow:1}}),(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(Gm,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>vA(a,t.matsById,void 0,void 0,n.loadStationNames,n.basketName),size:`large`,children:(0,H.jsx)(jT,{})})})]}),(0,H.jsx)(`main`,{children:(0,H.jsx)(o6,{points:a.data,matsById:t.matsById,current_date_zoom:{start:tE(r,-4),end:tE(r,1)},set_date_zoom_range:void 0,period:{type:`Last30`},showWorkorderAndInspect:!1,defaultSortDesc:!0})})]})}var c6=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 jD(this.day,this.station)}toString(){return`{day: ${this.day.toISOString()}}, station: ${this.station}}`}adjustDay(t){return new e(t(this.day),this.station)}};function l6(e,t,n){let r=cE(e),i=cE(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=tE(s,1)){let r=fE([s,e]),i=(xre([tE(s,1),t]).getTime()-r.getTime())/o;a.push({day:s,value:n*i})}return a}}function u6(e,t){return fk(Q.of(e),e=>e.stationLabel,e=>e.endTime).flatMap(([e,n])=>n.flatMap(e=>{let n=Q.of(e).sumBy(e=>e.elapsedMinsPerMaterial*e.material.length),r=uE(e[0].endTime,-n*60),i=Q.of(e).sumBy(e=>t(e));return l6(r,e[0].endTime,i)}).map(t=>({...t,statNameAndNum:e}))).buildHashMap(e=>new c6(e.day,e.statNameAndNum),(e,t)=>t.value+(e??0))}function d6(e){return u6(e,e=>e.activeMinutes)}function cae(e){return u6(e,e=>e.elapsedMinsPerMaterial*e.material.length)}function f6(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:fE([e.end,n.end])}:t.push(n)}return t}function p6(e){return Q.of(e).filter(e=>e.plannedDown).toLookupOrderedMap(e=>e.stationLabel,e=>e.start).toAscLazySeq().flatMap(([e,t])=>f6(t.valuesToAscLazySeq()).flatMap(t=>l6(t.start,t.end,_E(t.end,t.start)).map(t=>({...t,station:e})))).toHashMap(e=>[new c6(e.day,e.station),e.value],(e,t)=>e+t)}function m6(e){let t=Q.of(e).filter(e=>e.plannedDown).toLookupOrderedMap(e=>e.stationLabel,e=>e.start).mapValues(e=>f6(e.valuesToAscLazySeq()));return Q.of(e).filter(e=>!e.plannedDown).toLookupOrderedMap(e=>e.stationLabel,e=>e.start).toAscLazySeq().flatMap(([e,n])=>{let r=f6(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=>l6(t.start,t.end,_E(t.end,t.start)).map(t=>({...t,station:e})))}).toHashMap(e=>[new c6(e.day,e.station),e.value],(e,t)=>e+t)}function lae(e,t,n,r,i){let a=d6(Q.of(r).filter(r=>n===`labor`===vk(r)&&r.endTime>=e&&r.endTime<=t)),o=Q.of(i).filter(r=>n===`labor`===r.station.startsWith(`L/U`)&&r.end>=e&&r.start<=t),s=p6(o),c=m6(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=tE(i,1)){let e=new c6(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 h6=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 jD(this.x,this.y)}toString(){return`{x: ${new Date(this.x).toISOString()}, y: ${this.y}}`}};function uae(e,t){let n=Q.of(t).toHashMap(e=>[new h6(e.x.getTime(),e.y),e],(e,t)=>t),r=Q.of(t).map(e=>e.x.getTime()).distinct().toSortedArray(e=>e),i=Q.of(t).map(e=>e.y).distinct().toSortedArray(e=>e),a=`<table>
|
|
356
|
+
<thead><tr><th>`+e+`</th>`;for(let e of r)a+=`<th>`+new Date(e).toDateString()+`</th>`;a+=`</tr></thead>
|
|
357
|
+
<tbody>
|
|
358
|
+
`;for(let e of i){a+=`<tr><th>`+e+`</th>`;for(let t of r){let r=n.get(new h6(t,e));r===void 0?a+=`<td></td>`:a+=`<td>`+r.label+`</td>`}a+=`</tr>
|
|
359
|
+
`}return a+=`</tbody>
|
|
360
|
+
</table>`,a}function dae(e,t){oA(uae(e,t))}function fae(e){let t=`<table>
|
|
361
|
+
<thead><tr>`;t+=`<th>Day</th><th>Station</th><th>Actual Hours</th><th>Planned Hours</th>`,t+=`</tr></thead>
|
|
362
|
+
<tbody>
|
|
363
|
+
`;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>
|
|
364
|
+
`;return t+=`</tbody>
|
|
365
|
+
</table>`,t}function pae(e){oA(fae(e))}var g6=[[`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`]],_6=`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 v6(e,t){return t<=g6.length?`#`+g6[t-1][e]:`#`+_6[e%_6.length]}var y6=v6(0,2),b6=v6(1,2),x6=50,mae=30,S6=10,C6=10;function hae({width:e,height:t,points:n,setTooltip:r}){let i=t-S6-mae,a=(0,I.useMemo)(()=>_N().domain([0,24]).range([i,0]),[i]),o=(0,I.useMemo)(()=>kj().domain(Q.of(n).map(e=>e.x).distinct()).range([0,e-x6-C6]).padding(.1),[n,e]),s=(0,I.useMemo)(()=>kj().domain([`Actual`,`Planned`]).range([0,o.bandwidth()]).padding(.05),[o]);return(0,H.jsx)(`svg`,{width:e,height:t,children:(0,H.jsxs)(`g`,{transform:`translate(${x6},${S6})`,children:[(0,H.jsx)(rj,{scale:o,top:i}),(0,H.jsx)(ij,{scale:a,left:0,label:`Hours`}),(0,H.jsx)(QA,{scale:a,width:e-x6-C6}),n.map((e,t)=>(0,H.jsxs)(`g`,{transform:`translate(${o(e.x)},0)`,children:[(0,H.jsx)(`rect`,{x:s(`Actual`),y:a(e.y),width:s.bandwidth(),height:i-a(e.y),fill:y6,onMouseEnter:t=>{let n=NA(t);r({left:n?.x??0,top:n?.y??0,datum:e})},onMouseLeave:()=>r(null)}),(0,H.jsx)(`rect`,{x:s(`Planned`),y:a(e.plannedHours),width:s.bandwidth(),height:i-a(e.plannedHours),fill:b6,onMouseEnter:t=>{let n=NA(t);r({left:n?.x??0,top:n?.y??0,datum:e})},onMouseLeave:()=>r(null)})]},t))]})})}function gae({station:e}){return(0,H.jsxs)(`div`,{style:{marginTop:`1em`,display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(`div`,{style:{width:`14px`,height:`14px`,backgroundColor:y6}}),(0,H.jsxs)(`div`,{style:{marginLeft:`1em`},children:[e,` Actual`]})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(`div`,{style:{width:`14px`,height:`14px`,backgroundColor:b6}}),(0,H.jsxs)(`div`,{style:{marginLeft:`1em`},children:[e,` Planned`]})]})]})}function _ae({tooltip:e}){return(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{children:e.datum.x}),(0,H.jsxs)(`div`,{children:[`Actual Hours: `,e.datum.y?.toFixed(1)]}),(0,H.jsxs)(`div`,{children:[`Planned Hours: `,e.datum?.plannedHours?.toFixed(1)]})]})}function vae({series:e}){let t=(0,I.useMemo)(()=>P(null),[]),n=R(t);return(0,H.jsxs)(By,{size:{xs:12,md:6},onMouseLeave:()=>n(null),children:[(0,H.jsx)(KA,{sx:{height:`calc(100vh / 2 - 200px)`},chart:({width:t,height:r})=>(0,H.jsx)(hae,{width:t,height:r,points:e.points,setTooltip:n}),tooltipAtom:t,TooltipContent:_ae}),(0,H.jsx)(gae,{station:e.station})]})}function yae({points:e}){return(0,H.jsx)(By,{container:!0,children:e.map((e,t)=>(0,H.jsx)(vae,{series:e},t))})}var w6=[{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 bae(e,t){return Q.of(e).flatMap(e=>e.points).toSortedArray(t)}var xae=(0,I.memo)(function({points:e}){let t=K1(0,w6);return(0,H.jsxs)(AC,{children:[(0,H.jsx)(L1,{columns:w6,sort:t,showDetailsCol:!1}),(0,H.jsx)(U1,{columns:w6,pageData:bae(e,t.sortOn)})]})}),Sae=P(!0),Cae=P(!0);function T6({ty:e}){GI(e===`labor`?`L/U OEE`:`Machine OEE`);let[t,n]=z(e===`labor`?Sae:Cae),r=tE(bE(),-6),i=tE(bE(),1),a=L(Mk),o=L(EA),s=(0,I.useMemo)(()=>lae(r,i,e,a.valuesToLazySeq(),o),[r,i,e,a,o]);return(0,H.jsxs)(J,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,H.jsxs)(J,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,H.jsxs)(q,{variant:`subtitle1`,children:[e===`labor`?`Load/Unload`:`Machine`,` OEE: comparing flexplan hours between actual and simulated production`]}),(0,H.jsx)(J,{sx:{flexGrow:1}}),(0,H.jsx)(Ry,{size:`small`,children:(0,H.jsxs)(oS,{autoWidth:!0,value:t?`chart`:`table`,onChange:e=>n(e.target.value===`chart`),children:[(0,H.jsx)(wx,{value:`chart`,children:`Chart`},`chart`),(0,H.jsx)(wx,{value:`table`,children:`Table`},`table`)]})}),(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(Gm,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>pae(s),size:`large`,children:(0,H.jsx)(jT,{})})})]}),(0,H.jsx)(`main`,{children:t?(0,H.jsx)(yae,{points:s}):(0,H.jsx)(xae,{points:s})})]})}var E6=Object.defineProperty,wae=(e,t)=>{let n={};for(var r in e)E6(n,r,{get:e[r],enumerable:!0});return t||E6(n,Symbol.toStringTag,{value:`Module`}),n},D6=U6(),O6=e=>z6(e,D6),k6=U6();O6.write=e=>z6(e,k6);var A6=U6();O6.onStart=e=>z6(e,A6);var j6=U6();O6.onFrame=e=>z6(e,j6);var M6=U6();O6.onFinish=e=>z6(e,M6);var N6=[];O6.setTimeout=(e,t)=>{let n=O6.now()+t,r=()=>{let e=N6.findIndex(e=>e.cancel==r);~e&&N6.splice(e,1),L6-=+!!~e},i={time:n,handler:e,cancel:r};return N6.splice(P6(n),0,i),L6+=1,B6(),i};var P6=e=>~(~N6.findIndex(t=>t.time>e)||~N6.length);O6.cancel=e=>{A6.delete(e),j6.delete(e),M6.delete(e),D6.delete(e),k6.delete(e)},O6.sync=e=>{R6=!0,O6.batchedUpdates(e),R6=!1},O6.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,O6.onStart(n)}return r.handler=e,r.cancel=()=>{A6.delete(n),t=null},r};var F6=typeof window<`u`?window.requestAnimationFrame:()=>{};O6.use=e=>F6=e,O6.now=typeof performance<`u`?()=>performance.now():Date.now,O6.batchedUpdates=e=>e(),O6.catch=console.error,O6.frameLoop=`always`,O6.onDemand=()=>{},O6.advance=()=>{O6.frameLoop===`demand`?H6():console.warn(`Cannot call the manual advancement of rafz whilst frameLoop is not set as demand`)};var I6=-1,L6=0,R6=!1;function z6(e,t){R6?(t.delete(e),e(0)):(t.add(e),B6(),O6.frameLoop===`demand`&&O6.onDemand())}function B6(){I6<0&&(I6=0,O6.frameLoop!==`demand`&&F6(V6))}function Tae(){I6=-1}function V6(){~I6&&(F6(V6),O6.batchedUpdates(H6))}function H6(){let e=I6;I6=O6.now();let t=P6(I6);if(t&&(W6(N6.splice(0,t),e=>e.handler()),L6-=t),!L6){Tae();return}A6.flush(),D6.flush(e?Math.min(64,I6-e):16.667),j6.flush(),k6.flush(),M6.flush(),O6.frameLoop===`demand`&&L6>0&&O6.onDemand()}function U6(){let e=new Set,t=e;return{add(n){L6+=+(t==e&&!e.has(n)),e.add(n)},delete(n){return L6-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,L6-=t.size,W6(t,t=>t(n)&&e.add(t)),L6+=e.size,t=e)}}}function W6(e,t){e.forEach(e=>{try{t(e)}catch(e){O6.catch(e)}})}function G6(){}var Eae=(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=wae({assign:()=>Dae,colors:()=>r8,createStringInterpolator:()=>t8,skipAnimation:()=>i8,to:()=>n8,willAdvance:()=>a8}),t8,n8,r8=null,i8=!1,a8=G6,Dae=e=>{e.to&&(n8=e.to),e.now&&(O6.now=e.now),e.colors!==void 0&&(r8=e.colors),e.skipAnimation!=null&&(i8=e.skipAnimation),e.createStringInterpolator&&(t8=e.createStringInterpolator),e.requestAnimationFrame&&O6.use(e.requestAnimationFrame),e.batchedUpdates&&(O6.batchedUpdates=e.batchedUpdates),e.willAdvance&&(a8=e.willAdvance),e.frameLoop&&(O6.frameLoop=e.frameLoop),e.onDemand&&(O6.onDemand=e.onDemand)},o8=new Set,s8=[],c8=[],l8=0,u8={get idle(){return!o8.size&&!s8.length},start(e){l8>e.priority?(o8.add(e),O6.onStart(Oae)):(d8(e),O6(p8))},advance:p8,sort(e){if(l8)O6.onFrame(()=>u8.sort(e));else{let t=s8.indexOf(e);~t&&(s8.splice(t,1),f8(e))}},clear(){s8=[],o8.clear()}};function Oae(){o8.forEach(d8),o8.clear(),O6(p8)}function d8(e){s8.includes(e)||f8(e)}function f8(e){s8.splice(kae(s8,t=>t.priority>e.priority),0,e)}function p8(e){let t=c8;for(let n=0;n<s8.length;n++){let r=s8[n];l8=r.priority,r.idle||(a8(r),r.advance(e),r.idle||t.push(r))}return l8=0,c8=s8,c8.length=0,s8=t,s8.length>0}function kae(e,t){let n=e.findIndex(t);return n<0?e.length:n}var Aae=(e,t,n)=>Math.min(Math.max(n,e),t),jae={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},m8=`[-+]?\\d*\\.?\\d+`,h8=`[-+]?\\d*\\.?\\d+%`;function g8(...e){return`\\(\\s*(`+e.join(`)\\s*,\\s*(`)+`)\\s*\\)`}var Mae=RegExp(`rgb`+g8(m8,m8,m8)),Nae=RegExp(`rgba`+g8(m8,m8,m8,m8)),Pae=RegExp(`hsl`+g8(m8,h8,h8)),Fae=RegExp(`hsla`+g8(m8,h8,h8,m8)),Iae=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Lae=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Rae=/^#([0-9a-fA-F]{6})$/,zae=/^#([0-9a-fA-F]{8})$/;function Bae(e){let t;return typeof e==`number`?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Rae.exec(e))?parseInt(t[1]+`ff`,16)>>>0:r8&&r8[e]!==void 0?r8[e]:(t=Mae.exec(e))?(y8(t[1])<<24|y8(t[2])<<16|y8(t[3])<<8|255)>>>0:(t=Nae.exec(e))?(y8(t[1])<<24|y8(t[2])<<16|y8(t[3])<<8|x8(t[4]))>>>0:(t=Iae.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+`ff`,16)>>>0:(t=zae.exec(e))?parseInt(t[1],16)>>>0:(t=Lae.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Pae.exec(e))?(v8(b8(t[1]),S8(t[2]),S8(t[3]))|255)>>>0:(t=Fae.exec(e))?(v8(b8(t[1]),S8(t[2]),S8(t[3]))|x8(t[4]))>>>0:null}function _8(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 v8(e,t,n){let r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=_8(i,r,e+1/3),o=_8(i,r,e),s=_8(i,r,e-1/3);return Math.round(a*255)<<24|Math.round(o*255)<<16|Math.round(s*255)<<8}function y8(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function b8(e){return(parseFloat(e)%360+360)%360/360}function x8(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function S8(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function C8(e){let t=Bae(e);return t===null?e:(t||=0,`rgba(${(t&4278190080)>>>24}, ${(t&16711680)>>>16}, ${(t&65280)>>>8}, ${(t&255)/255})`)}var w8=(e,t,n)=>{if(K6.fun(e))return e;if(K6.arr(e))return w8({range:e,output:t,extrapolate:n});if(K6.str(e.output[0]))return t8(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=Hae(e,a);return Vae(e,a[t],a[t+1],i[t],i[t+1],c,o,s,r.map)}};function Vae(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 Hae(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var Uae=(e,t=`end`)=>n=>{n=t===`end`?Math.min(n,.999):Math.max(n,.001);let r=n*e;return Aae(0,1,(t===`end`?Math.floor(r):Math.ceil(r))/e)},T8=1.70158,E8=T8*1.525,D8=2.70158,O8=2*Math.PI/3,k8=2*Math.PI/4.5,A8=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},Wae={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=>D8*e*e*e-T8*e*e,easeOutBack:e=>1+D8*(e-1)**3+T8*(e-1)**2,easeInOutBack:e=>e<.5?(2*e)**2*(3.5949095*2*e-E8)/2:((2*e-2)**2*(3.5949095*(e*2-2)+E8)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-(2**(10*e-10))*Math.sin((e*10-10.75)*O8),easeOutElastic:e=>e===0?0:e===1?1:2**(-10*e)*Math.sin((e*10-.75)*O8)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(2**(20*e-10)*Math.sin((20*e-11.125)*k8))/2:2**(-20*e+10)*Math.sin((20*e-11.125)*k8)/2+1,easeInBounce:e=>1-A8(1-e),easeOutBounce:A8,easeInOutBounce:e=>e<.5?(1-A8(1-2*e))/2:(1+A8(2*e-1))/2,steps:Uae},j8=Symbol.for(`FluidValue.get`),M8=Symbol.for(`FluidValue.observers`),N8=e=>!!(e&&e[j8]),P8=e=>e&&e[j8]?e[j8]():e,F8=e=>e[M8]||null;function Gae(e,t){e.eventObserved?e.eventObserved(t):e(t)}function I8(e,t){let n=e[M8];n&&n.forEach(e=>{Gae(e,t)})}var L8=class{constructor(e){if(!e&&!(e=this.get))throw Error(`Unknown getter`);Kae(this,e)}},Kae=(e,t)=>B8(e,j8,t);function R8(e,t){if(e[j8]){let n=e[M8];n||B8(e,M8,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function z8(e,t){let n=e[M8];if(n&&n.has(t)){let r=n.size-1;r?n.delete(t):e[M8]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var B8=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),V8=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,qae=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,H8=RegExp(`(${V8.source})(%|[a-z]+)`,`i`),Jae=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,U8=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,W8=e=>{let[t,n]=Yae(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&&U8.test(n)?W8(n):n||e},Yae=e=>{let t=U8.exec(e);if(!t)return[,];let[,n,r]=t;return[n,r]},G8,Xae=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,K8=e=>e.match(V8)??[],q8=e=>{G8||=r8?RegExp(`(${Object.keys(r8).join(`|`)})(?!\\w)`,`g`):/^\b$/;let t=e.output.map(e=>P8(e).replace(U8,W8).replace(qae,C8).replace(G8,C8)),n=t.map(e=>K8(e).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=>w8({...e,output:t})),i=e.range||[0,1],a=t.map(e=>K8(e)),o=a[0].map((e,t)=>{let n=a.map(e=>{let n=e[t],r=n.indexOf(`.`);return r===-1?0:n.length-r-1});return n.every(e=>e===n[0])&&n[0]>0?n[0]:null});return e=>{let n=i.indexOf(e);if(n!==-1)return t[n];let a=!H8.test(t[0])&&t.find(e=>H8.test(e))?.replace(V8,``),s=0;return t[0].replace(V8,()=>{let t=s++,n=r[t](e),i=o[t];return`${i==null?n:n.toFixed(i)}${a||``}`}).replace(Jae,Xae)}},J8=`react-spring: `,Y8=e=>{let t=e,n=!1;if(typeof t!=`function`)throw TypeError(`${J8}once requires a function parameter`);return(...e)=>{n||=(t(...e),!0)}},Zae=Y8(console.warn);function Qae(){Zae(`${J8}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var $ae=Y8(console.warn);function eoe(){$ae(`${J8}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 X8(e){return K6.str(e)&&(e[0]==`#`||/\d/.test(e)||!$6()&&U8.test(e)||e in(r8||{}))}var Z8=$6()?I.useEffect:I.useLayoutEffect,toe=()=>{let e=(0,I.useRef)(!1);return Z8(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Q8(){let e=(0,I.useState)()[1],t=toe();return()=>{t.current&&e(Math.random())}}var $8=e=>(0,I.useEffect)(e,noe),noe=[];function e5(e){let t=(0,I.useRef)(void 0);return(0,I.useEffect)(()=>{t.current=e}),t.current}var t5=Symbol.for(`Animated:node`),roe=e=>!!e&&e[t5]===e,n5=e=>e&&e[t5],r5=(e,t)=>Eae(e,t5,t),i5=e=>e&&e[t5]&&e[t5].getPayload(),a5=class{constructor(){r5(this,this)}getPayload(){return this.payload||[]}},o5=class e extends a5{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)}},s5=class e extends o5{constructor(e){super(0),this._string=null,this._toString=w8({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=w8({output:[this.getValue(),e]})),this._value=0,super.reset()}},c5={dependencies:null},l5=class extends a5{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return Y6(this.source,(n,r)=>{roe(n)?t[r]=n.getValue(e):N8(n)?t[r]=P8(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){c5.dependencies&&N8(e)&&c5.dependencies.add(e);let t=i5(e);t&&J6(t,e=>this.add(e))}},ioe=class e extends l5{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(aoe)),!0)}};function aoe(e){return(X8(e)?s5:o5).create(e)}function u5(e){let t=n5(e);return t?t.constructor:K6.arr(e)?ioe:X8(e)?s5:o5}var d5=(e,t)=>{let n=!K6.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,I.forwardRef)((r,i)=>{let a=(0,I.useRef)(null),o=n&&(0,I.useCallback)(e=>{a.current=coe(i,e)},[i]),[s,c]=soe(r,t),l=Q8(),u=()=>{let e=a.current;n&&!e||(e?t.applyAnimatedValues(e,s.getValue(!0)):!1)===!1&&l()},d=new ooe(u,c),f=(0,I.useRef)(void 0);Z8(()=>(f.current=d,J6(c,e=>R8(e,d)),()=>{f.current&&(J6(f.current.deps,e=>z8(e,f.current)),O6.cancel(f.current.update))})),(0,I.useEffect)(u,[]),$8(()=>()=>{let e=f.current;J6(e.deps,t=>z8(t,e))});let p=t.getComponentProps(s.getValue());return I.createElement(e,{...p,ref:o})})},ooe=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type==`change`&&O6.write(this.update)}};function soe(e,t){let n=new Set;return c5.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new l5(e),c5.dependencies=null,[e,n]}function coe(e,t){return e&&(K6.fun(e)?e(t):e.current=t),t}var f5=Symbol.for(`AnimatedComponent`),p5=new WeakMap,loe=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new l5(e),getComponentProps:r=e=>e}={})=>{let i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},a=e=>{let t=m5(e)||`Anonymous`;if(K6.str(e))e=a[e]||(a[e]=d5(e,i));else{let t=e[f5]??p5.get(e);if(!t){t=d5(e,i);try{e[f5]=t}catch{}p5.set(e,t)}e=t}return e.displayName=`Animated(${t})`,e};return Y6(e,(t,n)=>{K6.arr(e)&&(n=m5(t)),a[n]=a(t)}),{animated:a}},m5=e=>K6.str(e)?e:e&&K6.str(e.displayName)?e.displayName:K6.fun(e)&&e.name||null;function h5(e,...t){return K6.fun(e)?e(...t):e}var g5=(e,t)=>e===!0||!!(t&&e&&(K6.fun(e)?e(t):X6(e).includes(t))),_5=(e,t)=>K6.obj(e)?t&&e[t]:e,v5=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,uoe=e=>e,y5=(e,t=uoe)=>{let n=doe;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},doe=[`config`,`onProps`,`onStart`,`onChange`,`onPause`,`onResume`,`onRest`],foe={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 poe(e){let t={},n=0;if(Y6(e,(e,r)=>{foe[r]||(t[r]=e,n++)}),n)return t}function b5(e){let t=poe(e);if(t){let n={to:t};return Y6(e,(e,r)=>r in t||(n[r]=e)),n}return{...e}}function x5(e){let t=P8(e);return K6.arr(t)?t.map(x5):X8(t)?e8.createStringInterpolator({range:[0,1],output:[t,t]})(1):t}function moe(e){for(let t in e)return!0;return!1}function S5(e){return K6.fun(e)||K6.arr(e)&&K6.obj(e[0])}function hoe(e,t){e.ref?.delete(e),t?.delete(e)}function goe(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var C5={...{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:Wae.linear,clamp:!1},_oe=class{constructor(){this.velocity=0,Object.assign(this,C5)}};function voe(e,t,n){n&&(n={...n},w5(n,t),t={...n,...t}),w5(e,t),Object.assign(e,t);for(let t in C5)e[t]??(e[t]=C5[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 w5(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 T5=[],yoe=class{constructor(){this.changed=!1,this.values=T5,this.toValues=null,this.fromValues=T5,this.config=new _oe,this.immediate=!1}};function E5(e,{key:t,props:n,defaultProps:r,state:i,actions:a}){return new Promise((o,s)=>{let c,l,u=g5(n.cancel??r?.cancel,t);if(u)p();else{K6.und(n.pause)||(i.paused=g5(n.pause,t));let e=r?.pause;e!==!0&&(e=i.paused||g5(e,t)),c=h5(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-O6.now()}function f(){c>0&&!e8.skipAnimation?(i.delayed=!0,l=O6.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 D5=(e,t)=>t.length==1?t[0]:t.some(e=>e.cancelled)?A5(e.get()):t.every(e=>e.noop)?O5(e.get()):k5(e.get(),t.every(e=>e.finished)),O5=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),k5=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),A5=e=>({value:e,cancelled:!0,finished:!1});function j5(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=y5(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)&&A5(r)||i!==n.asyncId&&k5(r,!1);if(t)throw e.result=t,d(e),e},m=0,h=(e,t)=>{let a=new N5,o=new P5;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)}),e8.skipAnimation){if(++m>1024)throw M5(n),o.result=k5(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=k5(r.get(),!0,!1)}catch(e){if(e instanceof N5)g=e.result;else if(e instanceof P5)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)&&O6.batchedUpdates(()=>{o(g,r,r.item)}),g})()}function M5(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 N5=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.")}},P5=class extends Error{constructor(){super(`SkipAnimationSignal`)}},F5=e=>e instanceof I5,boe=1,I5=class extends L8{constructor(...e){super(...e),this.id=boe++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=n5(this);return e&&e.getValue()}to(...e){return e8.to(this,e)}interpolate(...e){return Qae(),e8.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){I8(this,{type:`change`,parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||u8.sort(this),I8(this,{type:`priority`,parent:this,priority:e})}},L5=Symbol.for(`SpringPhase`),xoe=1,Soe=2,R5=4,z5=e=>(e[L5]&xoe)>0,B5=e=>(e[L5]&Soe)>0,V5=e=>(e[L5]&R5)>0,H5=(e,t)=>t?e[L5]|=3:e[L5]&=-3,U5=(e,t)=>t?e[L5]|=R5:e[L5]&=-5,Coe=class extends I5{constructor(e,t){if(super(),this.animation=new yoe,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!(B5(this)||this._state.asyncTo)||V5(this)}get goal(){return P8(this.animation.to)}get velocity(){let e=n5(this);return e instanceof o5?e.lastVelocity||0:e.getPayload().map(e=>e.lastVelocity||0)}get hasAnimated(){return z5(this)}get isAnimating(){return B5(this)}get isPaused(){return V5(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,r=this.animation,{toValues:i}=r,{config:a}=r,o=i5(r.to);!o&&N8(r.to)&&(i=X6(P8(r.to))),r.values.forEach((s,c)=>{if(s.done)return;let l=s.constructor==s5?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.max(Math.max(Math.abs(l),Math.abs(n),1)*2**-52,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=n5(this),c=s.getValue();if(t){let e=P8(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 O6.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(B5(this)){let{to:e,config:t}=this.animation;O6.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=>D5(this,e))}stop(e){let{to:t}=this.animation;return K6.und(t)||this._focus(this.get()),M5(this._state,e&&this._lastCallId),O6.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||S5(n))&&(n=void 0),r=K6.obj(r)?r[t]:r,r??=void 0;let i={to:n,from:r};return z5(this)||(e.reverse&&([n,r]=[r,n]),r=P8(r),K6.und(r)?n5(this)||this._set(n):this._set(r)),i}_update({...e},t){let{key:n,defaultProps:r}=this;e.default&&Object.assign(r,y5(e,(e,t)=>/^on/.test(t)?_5(e,n):e)),J5(this,e,`onProps`),Y5(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 E5(++this._lastCallId,{key:n,props:e,defaultProps:r,state:a,actions:{pause:()=>{V5(this)||(U5(this,!0),Q6(a.pauseQueue),Y5(this,`onPause`,k5(this,W5(this,this.animation.to)),this))},resume:()=>{V5(this)&&(U5(this,!1),B5(this)&&this._resume(),Q6(a.resumeQueue),Y5(this,`onResume`,k5(this,W5(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(n=>{if(e.loop&&n.finished&&!(t&&n.noop)){let t=G5(e);if(t)return this._update(t,!0)}return n})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(A5(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(A5(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=P8(d);let p=!q6(u,c);p&&this._focus(u);let m=S5(t.to),{config:h}=s,{decay:g,velocity:_}=h;(r||i)&&!h.decay&&(h.velocity=0),t.config&&!m&&voe(h,h5(t.config,a),t.config===o.config?void 0:h5(o.config,a));let v=n5(this);if(!v||K6.und(u))return n(k5(this,!0));let y=K6.und(t.reset)?i&&!t.default:!K6.und(d)&&g5(t.reset,a),b=y?d:this.get(),x=x5(u),S=K6.num(x)||K6.arr(x)||X8(x),C=!m&&(!S||g5(o.immediate||t.immediate,a));if(p){let e=u5(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=N8(u),E=!1;if(!T){let e=y||!z5(this)&&f;(p||e)&&(E=q6(x5(b),x),T=!E),(!q6(s.immediate,C)&&!C||!q6(h.decay,g)||!q6(h.velocity,_))&&(T=!0)}if(E&&B5(this)&&(s.changed&&!y?T=!0:T||this._stop(c)),!m&&((T||N8(c))&&(s.values=v.getPayload(),s.toValues=N8(u)?null:w==s5?[1]:X6(x)),s.immediate!=C&&(s.immediate=C,!C&&!y&&this._set(c)),T)){let{onRest:e}=s;J6(Toe,e=>J5(this,t,e));let r=k5(this,W5(this,c));Q6(this._pendingCalls,r),this._pendingCalls.add(n),s.changed&&O6.batchedUpdates(()=>{s.changed=!y,e?.(r,this),y?h5(o.onRest,r):s.onStart?.(r,this)})}y&&this._set(b),m?n(j5(t.to,t,this._state,this)):T?this._start():B5(this)&&!p?this._pendingCalls.add(n):n(O5(b))}_focus(e){let t=this.animation;e!==t.to&&(F8(this)&&this._detach(),t.to=e,F8(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;N8(t)&&(R8(t,this),F5(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;N8(e)&&z8(e,this)}_set(e,t=!0){let n=P8(e);if(!K6.und(n)){let e=n5(this);if(!e||!q6(n,e.getValue())){let r=u5(n);!e||e.constructor!=r?r5(this,r.create(n)):e.setValue(n),e&&O6.batchedUpdates(()=>{this._onChange(n,t)})}}return n5(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,Y5(this,`onStart`,k5(this,W5(this,e.to)),this))}_onChange(e,t){let n=k5(e,!1);t||(this._onStart(),h5(this.animation.onChange,n,this)),h5(this.defaultProps.onChange,n,this),super._onChange(e,t)}_start(){let e=this.animation;n5(this).reset(P8(e.to)),e.immediate||(e.fromValues=e.values.map(e=>e.lastPosition)),B5(this)||(H5(this,!0),V5(this)||this._resume())}_resume(){e8.skipAnimation?this.finish():u8.start(this)}_stop(e,t){if(B5(this)){H5(this,!1);let n=this.animation;J6(n.values,e=>{e.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),I8(this,{type:`idle`,parent:this});let r=t?A5(this.get()):k5(this.get(),W5(this,e??n.to));Q6(this._pendingCalls,r),n.changed=!1,Y5(this,`onRest`,r,this)}}};function W5(e,t){let n=x5(t);return q6(x5(e.get()),n)}function G5(e,t=e.loop,n=e.to){let r=h5(t);if(r){let i=r!==!0&&b5(r),a=(i||e).reverse,o=!i||i.reset;return K5({...e,loop:t,default:!1,pause:void 0,to:!a||S5(n)?n:void 0,from:o?e.from:void 0,reset:o,...i})}}function K5(e){let{to:t,from:n}=e=b5(e),r=new Set;return K6.obj(t)&&q5(t,r),K6.obj(n)&&q5(n,r),e.keys=r.size?Array.from(r):null,e}function woe(e){let t=K5(e);return K6.und(t.default)&&(t.default=y5(t)),t}function q5(e,t){Y6(e,(e,n)=>e!=null&&t.add(n))}var Toe=[`onStart`,`onRest`,`onChange`,`onPause`,`onResume`];function J5(e,t,n){e.animation[n]=t[n]===v5(t,n)?void 0:_5(t[n],e.key)}function Y5(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var Eoe=[`onStart`,`onChange`,`onRest`],Doe=1,Ooe=class{constructor(e,t){this.id=Doe++,this.springs={},this.queue=[],this._lastAsyncId=0,this._lastLoopId=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(K5(e)),this}start(e){let{queue:t}=this;return e?t=X6(e).map(K5):this.queue=[],this._flush?this._flush(this,t):(n7(this,t),X5(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;J6(X6(t),t=>n[t].stop(!!e))}else M5(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;O6.onFrame(this._onFrame)}};function X5(e,t){return Promise.all(t.map(t=>Z5(e,t))).then(t=>D5(e,t))}async function Z5(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);let u=t,d=!n&&!u.parentId&&`loop`in t?++e._lastLoopId:n?u.loopId:e._lastLoopId;i===!1&&(t.to=null),a===!1&&(t.from=null);let f=K6.arr(i)||K6.fun(i)?i:void 0;f?(t.to=void 0,t.onRest=void 0,l&&(l.onRest=void 0)):J6(Eoe,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 p=e._state;t.pause===!p.paused?(p.paused=t.pause,Q6(t.pause?p.pauseQueue:p.resumeQueue)):p.paused&&(t.pause=!0);let m=(r||Object.keys(e.springs)).map(n=>e.springs[n].start(t)),h=t.cancel===!0||v5(t,`cancel`)===!0;(f||h&&p.asyncId)&&m.push(E5(++e._lastAsyncId,{props:t,state:p,actions:{pause:G6,resume:G6,start(t,n){h?(M5(p,e._lastAsyncId),n(A5(e))):(t.onRest=s,n(j5(f,t,p,e)))}}})),p.paused&&await new Promise(e=>{p.resumeQueue.add(e)});let g=D5(e,await Promise.all(m));if(o&&g.finished&&!(n&&g.noop)&&d===e._lastLoopId){let n=G5(t,o,i);if(n)return n.loopId=d,e._onLoopReset?.forEach(e=>e()),n7(e,[n]),Z5(e,n,!0)}return c&&O6.batchedUpdates(()=>c(g,e,e.item)),g}function Q5(e,t){let n={...e.springs};return t&&J6(X6(t),e=>{K6.und(e.keys)&&(e=K5(e)),K6.obj(e.to)||(e={...e,to:void 0}),t7(n,e,e=>e7(e))}),$5(e,n),n}function $5(e,t){Y6(t,(t,n)=>{e.springs[n]||(e.springs[n]=t,R8(t,e))})}function e7(e,t){let n=new Coe;return n.key=e,t&&R8(n,t),n}function t7(e,t,n){t.keys&&J6(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function n7(e,t){J6(t,t=>{t7(e.springs,t,t=>e7(t,e))})}var koe=I.createContext({pause:!1,immediate:!1}),Aoe=()=>{let e=[],t=function(t){eoe();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 r7(e,t,n){let r=K6.fun(t)&&t;r&&!n&&(n=[]);let i=(0,I.useMemo)(()=>r||arguments.length==3?Aoe():void 0,[]),a=(0,I.useRef)(0),o=Q8(),s=(0,I.useMemo)(()=>({ctrls:[],queue:[],flush(e,t){let n=Q5(e,t);return a.current>0&&!s.queue.length&&!Object.keys(n).some(t=>!e.springs[t])?X5(e,t):new Promise(r=>{$5(e,n),s.queue.push(()=>{r(X5(e,t))}),o()})}}),[]),c=(0,I.useRef)([...s.ctrls]),l=(0,I.useRef)([]),u=(0,I.useRef)([]);u.current=[];let d=e5(e)||0;(0,I.useMemo)(()=>{J6(c.current.slice(e,d),e=>{hoe(e,i),e.stop(!0)}),c.current.length=e,f(d,e)},[e]),(0,I.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 Ooe(null,s.flush)),n=r?r(i,e):t[i];n&&(l.current[i]=woe(n))}}let p=c.current.map((e,t)=>Q5(e,l.current[t])),m=(0,I.useContext)(koe),h=m!==e5(m)&&moe(m);Z8(()=>{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&&(goe(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=[]}),$8(()=>()=>{J6(s.ctrls,e=>e.stop(!0))});let g=p.map(e=>({...e}));return i?[g,i]:g}function i7(e,t){let n=K6.fun(e),[[r],i]=r7(1,n?e:[e],n?t||[]:t);return n||arguments.length==2?[r,i]:r}var joe=class extends I5{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=w8(...t);let n=this._get(),r=u5(n);r5(this,r.create(n))}advance(e){let t=this._get();q6(t,this.get())||(n5(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&a7(this._active)&&o7(this)}_get(){let e=K6.arr(this.source)?this.source.map(P8):X6(P8(this.source));return this.calc(...e)}_start(){this.idle&&!a7(this._active)&&(this.idle=!1,J6(i5(this),e=>{e.done=!1}),e8.skipAnimation?(O6.batchedUpdates(()=>this.advance()),o7(this)):u8.start(this))}_attach(){let e=1;J6(X6(this.source),t=>{N8(t)&&R8(t,this),F5(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=>{N8(e)&&z8(e,this)}),this._active.clear(),o7(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,(F5(t)?t.priority:0)+1),0))}};function Moe(e){return e.idle!==!1}function a7(e){return!e.size||Array.from(e).every(Moe)}function o7(e){e.idle||(e.idle=!0,J6(i5(e),e=>{e.done=!0}),I8(e,{type:`idle`,parent:e}))}e8.assign({createStringInterpolator:q8,to:(e,t)=>new joe(e,t)}),u8.advance;var s7=/^--/;function Noe(e,t){return t==null||typeof t==`boolean`||t===``?``:typeof t==`number`&&t!==0&&!s7.test(e)&&!(l7.hasOwnProperty(e)&&l7[e])?t+`px`:(``+t).trim()}var c7={};function Poe(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:c7[t]||(c7[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=Noe(t,i[t]);s7.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 l7={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},Foe=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),Ioe=[`Webkit`,`Ms`,`Moz`,`O`];l7=Object.keys(l7).reduce((e,t)=>(Ioe.forEach(n=>e[Foe(n,t)]=e[t]),e),l7);var Loe=/^(matrix3d|matrix|translate3d|translate[XYZ]?|scale3d|scale[XYZ]?|rotate3d|rotate[XYZ]?|skew[XY]?)$/,Roe=/^(translate)/,zoe=/^(rotate|skew)/,u7=(e,t)=>K6.num(e)&&e!==0?e+t:e,d7=(e,t)=>K6.arr(e)?e.every(e=>d7(e,t)):K6.num(e)?e===t:parseFloat(e)===t,Boe=class extends l5{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=>u7(e,`px`)).join(`,`)})`,d7(e,0)])),Y6(r,(e,t)=>{if(t===`transform`)i.push([e||``]),a.push(e=>[e,e===``]);else if(Loe.test(t)){if(delete r[t],K6.und(e))return;let n=Roe.test(t)?`px`:zoe.test(t)?`deg`:``;i.push(X6(e)),a.push(t===`rotate3d`?([e,t,r,i])=>[`rotate3d(${e},${t},${r},${u7(i,n)})`,d7(i,0)]:e=>[`${t}(${e.map(e=>u7(e,n)).join(`,`)})`,d7(e,+!!t.startsWith(`scale`))])}}),i.length&&(r.transform=new Voe(i,a)),super(r)}},Voe=class extends L8{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=P8(n[0]),[a,o]=this.transforms[r](K6.arr(i)?i:n.map(P8));e+=` `+a,t&&=o}),t?`none`:e}observerAdded(e){e==1&&J6(this.inputs,e=>J6(e,e=>N8(e)&&R8(e,this)))}observerRemoved(e){e==0&&J6(this.inputs,e=>J6(e,e=>N8(e)&&z8(e,this)))}eventObserved(e){e.type==`change`&&(this._value=null),I8(this,e)}},Hoe=`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(`.`);e8.assign({batchedUpdates:i_.unstable_batchedUpdates,createStringInterpolator:q8,colors:jae});var f7=loe(Hoe,{applyAnimatedValues:Poe,createAnimatedStyle:e=>new Boe(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}).animated;function Uoe({points:e,stats:t,partCntPerPoint:n}){return{series:(0,I.useMemo)(()=>Q.of(e).toSortedArray(([e])=>e).map(([t,n],r)=>({name:t,color:v6(r,e.size),points:n??[]})),[e]),median:(0,I.useMemo)(()=>t?{low:(n??1)*(t.medianMinutesForSingleMat-t.MAD_belowMinutes),high:(n??1)*(t.medianMinutesForSingleMat+t.MAD_aboveMinutes)}:null,[t,n])}}var p7=50,Woe=30,m7=10,Goe=2;function Koe({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-p7-Goe,l=s-m7-Woe,u=(0,I.useMemo)(()=>r?lF().domain([r.start,r.end]).range([0,c]):lF().domain([n[0],n[1]]).range([0,c]),[r,n,c]),d=(0,I.useMemo)(()=>{if(e.size===0)return 60;let t=Q.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,I.useMemo)(()=>t?_N().domain([t.y_low,t.y_high]).range([l,0]):_N().domain([0,d]).range([l,0]),[l,t,d])}}var qoe=(0,I.memo)(function({xScale:e,yScale:t}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(rj,{scale:e,top:t.range()[0]}),(0,H.jsx)(ij,{scale:t,left:e.range()[0],label:`Minutes`}),(0,H.jsx)(ej,{width:e.range()[1]-e.range()[0],height:t.range()[0]-t.range()[1],xScale:e,yScale:t})]})}),h7=(0,I.memo)(function(e){let[t,n]=(0,I.useState)(),[r,i]=(0,I.useState)(),[a,o]=(0,I.useState)(!1);function s(){o(!1),n(void 0),i(void 0)}return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Gm,{size:`small`,onClick:()=>o(!0),children:(0,H.jsx)(YT,{fontSize:`inherit`})}),(0,H.jsxs)(ky,{open:a,onClose:s,children:[(0,H.jsxs)(jy,{children:[(0,H.jsx)(`div`,{style:{marginBottom:`1em`},children:(0,H.jsx)(Hw,{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,H.jsx)(`div`,{style:{marginBottom:`1em`},children:(0,H.jsx)(Hw,{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,H.jsx)(Ay,{children:(0,H.jsx)(Y,{onClick:s,children:`Close`})})]})]})}),Joe=(0,I.memo)(function({median:e,plannedMinutes:t,xScale:n,yScale:r}){let i=i7({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=i7({to:{y:t?r(t):r.range()[0]},from:{y:r.range()[0]}});return(0,H.jsxs)(`g`,{children:[e?(0,H.jsx)(f7.rect,{x:i.x,y:i.y,width:i.width,height:i.height,fill:Ir[700],opacity:.2,pointerEvents:`none`}):void 0,t?(0,H.jsx)(f7.line,{stroke:`black`,x1:n.range()[0],x2:n.range()[1],y1:a.y,y2:a.y}):void 0]})}),Yoe=(0,I.memo)(function({seriesName:e,points:t,color:n,xScale:r,yScale:i,showTooltip:a}){let o=(0,I.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,H.jsx)(`g`,{children:r7(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,H.jsx)(f7.circle,{className:`bms-cycle-chart-pt`,fill:n,r:5,cx:e.x,cy:e.y,"data-idx":t,onClick:o},t))})}),Xoe=(0,I.memo)(function({series:e,xScale:t,yScale:n,showTooltip:r,disabledSeries:i}){return(0,H.jsx)(`g`,{children:e.filter(e=>!i.has(e.name)).map(e=>(0,H.jsx)(Yoe,{points:e.points,seriesName:e.name,color:e.color,xScale:t,yScale:n,showTooltip:r},e.name))})}),Zoe=(0,I.memo)(function({series:e,disabledSeries:t,adjustDisabled:n}){return(0,H.jsx)(`div`,{style:{marginTop:`1em`,display:`flex`,flexWrap:`wrap`,justifyContent:`space-around`},children:e.map(e=>(0,H.jsx)(Jw,{selected:!t.has(e.name),value:e,onChange:()=>n(t=>t.has(e.name)?t.delete(e.name):t.add(e.name)),children:(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(`div`,{style:{width:`14px`,height:`14px`,backgroundColor:e.color}}),(0,H.jsx)(`div`,{style:{marginLeft:`1em`},children:e.name})]})},e.name))})}),Qoe=G(`g`,{shouldForwardProp:e=>e.toString()[0]!==`$`})(({$noPtrEvents:e})=>e?{"& .bms-cycle-chart-pt":{pointerevents:`none`}}:void 0),$oe=(0,I.memo)(function({setYZoom:e,setXZoom:t,setTooltip:n,xScale:r,yScale:i,highlightStart:a,setHighlightStart:o}){let[s,c]=(0,I.useState)(null),l=(0,I.useCallback)(e=>{let t=NA(e);t!==null&&(c(null),o({x:t.x-p7,y:t.y-m7,nowMS:Date.now()}),n(null))},[o,n]),u=(0,I.useCallback)(e=>{let t=NA(e);t!==null&&c({x:t.x-p7,y:t.y-m7})},[c]),d=(0,I.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-p7),c=i.invert(a.y),l=i.invert(o.y-m7);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,H.jsxs)(`g`,{children:[(0,H.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,H.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]})}),ese=(0,I.memo)(function({set_date_zoom_range:e,current_date_zoom:t,yZoom:n,setYZoom:r,median:i}){return(0,H.jsxs)(`div`,{children:[e&&(t||n)?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Y,{size:`small`,onClick:()=>{e?.({zoom:void 0}),r(null)},children:`Reset Zoom`}),(0,H.jsx)(h7,{yZoom:n,setZoom:r})]}):void 0,e&&!t&&!n?(0,H.jsxs)(`span`,{style:{color:`#6b6b76`},children:[`Zoom via mouse drag`,i?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`span`,{children:` or `}),(0,H.jsx)(Y,{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,H.jsx)(h7,{yZoom:n,setZoom:r})]}):void 0]})}),tse=(0,I.memo)(function({tooltip:e,extraTooltip:t,seriesLabel:n}){return e===null?null:(0,H.jsxs)(MS,{direction:`column`,spacing:.6,children:[(0,H.jsxs)(`div`,{children:[`Time:`,` `,e.pt.x.toLocaleString(void 0,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`})]}),(0,H.jsxs)(`div`,{children:[n,`: `,e.seriesName]}),(0,H.jsxs)(`div`,{children:[`Cycle Time: `,e.pt.y.toFixed(1),` minutes`]}),t?t(e.pt).map((e,t)=>(0,H.jsxs)(`div`,{children:[e.title,`:`,` `,e.link?(0,H.jsx)(`a`,{style:{color:`white`,pointerEvents:`auto`,cursor:`pointer`,borderBottom:`1px solid`},onClick:e.link,children:e.value}):(0,H.jsx)(`span`,{children:`e.value`})]},t)):void 0]})});function nse(e){let{width:t,height:n,xScale:r,yScale:i}=Koe({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,H.jsx)(`svg`,{width:t,height:n,children:(0,H.jsxs)(`g`,{transform:`translate(${p7}, ${m7})`,children:[(0,H.jsx)(qoe,{xScale:r,yScale:i}),(0,H.jsx)(Joe,{median:e.median,plannedMinutes:e.plannedTimeMinutes,xScale:r,yScale:i}),(0,H.jsx)($oe,{setYZoom:e.setYZoom,setXZoom:e.set_date_zoom_range,xScale:r,setTooltip:e.showTooltip,yScale:i,highlightStart:e.highlightStart,setHighlightStart:e.setHighlightStart}),(0,H.jsx)(Qoe,{$noPtrEvents:e.highlightStart!==null,children:(0,H.jsx)(Xoe,{series:e.series,disabledSeries:e.disabledSeries,xScale:r,yScale:i,showTooltip:e.showTooltip})})]})})}var g7=(0,I.memo)(function(e){let t=(0,I.useMemo)(()=>P(null),[]),n=R(t),[r,i]=(0,I.useState)(sO.empty()),[a,o]=(0,I.useState)(null),{series:s,median:c}=Uoe({points:e.points,stats:e.stats,partCntPerPoint:e.partCntPerPoint});return(0,H.jsxs)(`div`,{onPointerLeave:(0,I.useCallback)(()=>{n(null),o(null)},[n,o]),children:[(0,H.jsx)(KA,{sx:{height:{xs:`calc(100vh - 320px)`,md:`calc(100vh - 280px)`,xl:`calc(100vh - 220px)`}},tooltipAtom:t,TooltipContent:({tooltip:t})=>(0,H.jsx)(tse,{tooltip:t,seriesLabel:e.series_label,extraTooltip:e.extra_tooltip}),chart:({width:t,height:i})=>(0,H.jsx)(nse,{...e,containerHeight:i,containerWidth:t,series:s,median:c,yZoom:e.yZoom,setYZoom:e.setYZoom,highlightStart:a,setHighlightStart:o,showTooltip:n,disabledSeries:r})}),(0,H.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`},children:[(0,H.jsx)(`div`,{style:{color:`#6b6b76`},children:`Click on a point for details`}),(0,H.jsx)(`div`,{style:{flexGrow:1}}),(0,H.jsx)(ese,{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,H.jsx)(Zoe,{series:s,disabledSeries:r,adjustDisabled:i})]})});function rse(e){return`operations`in e&&(e.operations===void 0||Array.isArray(e.operations))}var ise=P(!0),ase=P(!0),ose=P(void 0),sse=P(void 0),cse=P(void 0),lse=P(`Any`),use=P(void 0),dse=P(void 0),fse=P({}),pse=P({}),mse=P(null),hse=P(null);function _7({ty:e}){GI(e===`labor`?`L/U Cycles`:`Machine Cycles`);let t=R(bI),n=(0,I.useCallback)(function(e){if(!rse(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]=z(e===`labor`?ise:ase),[a,o]=z(e===`labor`?fse:pse),[s,c]=z(e===`labor`?ose:sse),[l,u]=z(cse),[d,f]=z(lse),[p,m]=z(e===`labor`?use:dse),[h,g]=z(e===`labor`?mse:hse),_=L(yr),v=Dk(_.basketName),y=L(Nk),b=sA(d,e!==`labor`||y),x=L(ak),S=[tE(bE(),-4),tE(bE(),1)],C=L(Mk),w=L(lL),T=(0,I.useMemo)(()=>{let t=bE();return l?fA(C.valuesToLazySeq(),{zoom:{start:tE(t,-4),end:tE(t,1)},partAndProc:s,pallet:p,operation:l,carrierKind:b}):e===`labor`&&r?pA(C.valuesToLazySeq(),{zoom:{start:tE(t,-4),end:tE(t,1)},partAndProc:s,pallet:p,carrierKind:b}):fA(C.valuesToLazySeq(),{zoom:{start:tE(t,-4),end:tE(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,I.useMemo)(()=>{if(E&&e===`machine`)return mA(T,!1)},[T,e,E]);return(0,H.jsxs)(J,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,H.jsxs)(J,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,H.jsxs)(q,{variant:`subtitle1`,children:[`Recent `,e===`labor`?`Load/Unload Occupancy`:`Machine Cycles`]}),(0,H.jsx)(J,{sx:{flexGrow:1}}),(0,H.jsx)(Ry,{size:`small`,children:(0,H.jsxs)(oS,{name:`Station-Cycles-chart-or-table-select`,autoWidth:!0,value:r?`graph`:`table`,onChange:e=>i(e.target.value===`graph`),children:[(0,H.jsx)(wx,{value:`graph`,children:`Graph`},`graph`),(0,H.jsx)(wx,{value:`table`,children:`Table`},`table`)]})}),(0,H.jsx)(Ry,{size:`small`,children:(0,H.jsxs)(oS,{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,H.jsx)(wx,{value:-1,children:(0,H.jsx)(`em`,{children:`Any Part`})},0),T.allPartAndProcNames.map((e,t)=>(0,H.jsx)(wx,{value:t,children:(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(LU,{part:e.part,size:20}),(0,H.jsxs)(`span`,{style:{marginRight:`1em`},children:[e.part,`-`,e.proc]})]})},t))]})}),e===`machine`?(0,H.jsx)(Ry,{size:`small`,children:(0,H.jsx)(oS,{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,H.jsx)(wx,{value:-1,children:(0,H.jsx)(`em`,{children:`Any Operation`})},-1)],...T.allMachineOperations.map((e,t)=>(0,H.jsxs)(wx,{value:t,children:[e.statGroup,` `,e.operation]},t))]})}):void 0,e===`labor`&&y?(0,H.jsx)(Ry,{size:`small`,children:(0,H.jsxs)(oS,{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,H.jsx)(wx,{value:`Any`,children:(0,H.jsx)(`em`,{children:`Any Carrier`})}),(0,H.jsx)(wx,{value:`Pallet`,children:`Pallet`}),(0,H.jsx)(wx,{value:`Basket`,children:v})]})}):void 0,e!==`labor`||b!==`Basket`?(0,H.jsx)(Ry,{size:`small`,children:(0,H.jsxs)(oS,{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,H.jsx)(wx,{value:``,children:(0,H.jsx)(`em`,{children:`Any Pallet`})},0),T.allPalletNames.map(e=>(0,H.jsx)(wx,{value:e,children:(0,H.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,H.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}):void 0,(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(Gm,{onClick:()=>vA(T,w.matsById,void 0,e===`labor`,_.loadStationNames,v),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,H.jsx)(jT,{})})})]}),(0,H.jsx)(`main`,{children:r?(0,H.jsx)(g7,{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?Q.of(T.data).head()?.[1]?.[0]?.material?.length:void 0,plannedTimeMinutes:D}):(0,H.jsx)(o6,{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 gse=Q.ofRange(0,12,1).map(e=>new Date(2019,e,1)).chunk(3).toRArray(),_se=(0,I.memo)(function(e){let[t,n]=(0,I.useState)(!1),[r,i]=(0,I.useState)(void 0);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Uy,{type:`text`,value:(r||e.curMonth).toLocaleDateString(void 0,{month:`long`,year:`numeric`}),readOnly:!0,endAdornment:(0,H.jsx)(Gy,{position:`end`,children:(0,H.jsx)(Gm,{"aria-label":`Open month select`,"data-testid":`open-month-select`,onClick:()=>{i(yE(e.curMonth)),n(!0)},size:`large`,children:(0,H.jsx)(aT,{})})})}),(0,H.jsx)(ky,{open:t,onClose:()=>{n(!1),i(void 0)},children:(0,H.jsxs)(jy,{children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(Gm,{"data-testid":`select-month-dialog-previous-year`,onClick:()=>i(dE(r||e.curMonth,-1)),size:`large`,children:(0,H.jsx)(FT,{})}),(0,H.jsx)(`div`,{style:{flexGrow:1},children:(0,H.jsx)(q,{variant:`h5`,align:`center`,"data-testid":`select-month-dialog-current-year`,children:(r||e.curMonth).toLocaleDateString(void 0,{year:`numeric`})})}),(0,H.jsx)(Gm,{onClick:()=>i(dE(r||e.curMonth,1)),size:`large`,children:(0,H.jsx)(IT,{})})]}),(0,H.jsx)(`div`,{"data-testid":`select-month-dialog-choose-month`,children:gse.map((t,a)=>(0,H.jsx)(`div`,{style:a>0?{marginTop:`1.2em`}:void 0,children:t.map((t,a)=>(0,H.jsx)(Y,{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))})]})})]})}),v7=(0,I.memo)(function(){let e=L(UR),[t,n]=z(HR),r=ZR(),i=XR();return(0,H.jsxs)(MS,{component:`nav`,direction:`row`,spacing:3,sx:{paddingLeft:`24px`,paddingRight:`24px`,alignItems:`center`},children:[(0,H.jsx)(zy,{control:(0,H.jsx)(Xx,{checked:e.type===`Last30`,color:`secondary`,onChange:(e,t)=>t?i():null}),label:`Last 30 days`}),(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(zy,{control:(0,H.jsx)(Xx,{checked:e.type===`SpecificMonth`,color:`secondary`,onChange:(e,r)=>r?n(t):null}),label:`Select Month`}),(0,H.jsx)(_se,{curMonth:t,onSelectMonth:t=>{e.type===`SpecificMonth`?n(t):r(t)}})]})]})});function y7(e){return function(){return e}}var b7=Math.PI;b7/2,2*b7;var x7=Math.PI,S7=2*x7,C7=1e-6,vse=S7-C7;function w7(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function yse(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return w7;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 T7=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?w7:yse(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>C7)if(!(Math.abs(u*s-c*l)>C7)||!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((x7-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>C7&&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)>C7||Math.abs(this._y1-l)>C7)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%S7+S7),d>vse?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>C7&&this._append`A${n},${n},0,${+(d>=x7)},${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 bse(){return new T7}bse.prototype=T7.prototype;function xse(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 T7(t)}Array.prototype.slice;function Sse(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function E7(e){this._context=e}E7.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 Cse(e){return new E7(e)}function wse(e){return e[0]}function Tse(e){return e[1]}function Ese(e,t){var n=y7(!0),r=null,i=Cse,a=null,o=xse(s);e=typeof e==`function`?e:e===void 0?wse:y7(e),t=typeof t==`function`?t:t===void 0?Tse:y7(t);function s(s){var c,l=(s=Sse(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:y7(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:y7(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:y7(!!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 D7(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 O7(e,t){this._context=e,this._k=(1-t)/6}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._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:D7(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:D7(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 O7(e,t)}return n.tension=function(t){return e(+t)},n})(0);function Dse(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 k7(e,t){this._context=e,this._alpha=t}k7.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:Dse(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 Ose=(function e(t){function n(e){return t?new k7(e,t):new O7(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function kse(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 A7=150;function Ase(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 jse(e,t,n,r){let i=new Date(e.getTime()+n),a=new Date(t.getTime()-n),o=(a.getTime()-i.getTime())/(A7-1),s=[];for(let e=0;e<A7-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(A7-1,Math.floor((e.endTime.getTime()+n-i.getTime())/o));for(let i=t;i<=r;i++)Ase(n,s[i],e)}return s}function Mse(e,t,n,r,i){let a=n*60*60*1e3;return Q.of(i).filter(e=>e.buffer.type!==`Queue`||!r.has(e.buffer.queue)).groupBy(e=>kse(e.buffer)).map(([n,r])=>({label:n,points:jse(e,t,a,r)})).toSortedArray(e=>e.label)}function j7(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 Nse(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?j7(Object(n),!0).forEach(function(t){Pse(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j7(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function M7(e){"@babel/helpers - typeof";return M7=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},M7(e)}function Pse(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N7(){return N7=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},N7.apply(this,arguments)}function Fse(e,t){if(e){if(typeof e==`string`)return P7(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 P7(e,t)}}function P7(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 F7(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=Fse(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.
|
|
366
|
+
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 Ise(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 Lse(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 Rse(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=Ise(r,o);n.push(s.left),r=s.right}return n.push(r),n}function zse(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]),Rse(r,n).map(Lse)}var Bse=/[MLCSTQAHVZmlcstqahv]|-?[\d.e+-]+/g,I7={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(I7).forEach(function(e){I7[e.toLowerCase()]=I7[e]});function L7(e,t){for(var n=Array(e),r=0;r<e;r++)n[r]=t;return n}function Vse(e){return`${e.type}${I7[e.type].map(function(t){return e[t]}).join(`,`)}`}function Hse(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 Use(e,t,n){var r=[];if(t.type===`L`||t.type===`Q`||t.type===`C`)r=r.concat(zse(e,t,n));else{var i=N7({},e);i.type===`M`&&(i.type=`L`),r=r.concat(L7(n-1).map(function(){return i})),r.push(t)}return r}function R7(e,t,n){var r=e.length-1,i=t.length-1,a=r/i,o=L7(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=L7(n,N7({},e[e.length-1]));return i[0].type===`M`&&i.forEach(function(e){e.type=`L`}),t.concat(i)}return t.concat(Use(e[r],e[r+1],n))},[]);return o.unshift(e[0]),o}function z7(e){for(var t=(e||``).match(Bse)||[],n=[],r,i,a=0;a<t.length;++a)if(r=I7[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 Wse(e,t,n){var r=e==null?[]:e.slice(),i=t==null?[]:t.slice(),a=M7(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=R7(r,i,o):i.length<r.length&&(i=R7(i,r,o))),r=r.map(function(e,t){return Hse(e,i[t])});var l=r.map(function(e){return Nse({},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=F7(I7[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 Gse(e,t,n){var r=z7(e),i=z7(t),a=M7(n)===`object`?n:{excludeSegment:n,snapEndsToInput:!0},o=a.excludeSegment,s=a.snapEndsToInput;if(!r.length&&!i.length)return function(){return``};var c=Wse(r,i,{excludeSegment:o,snapEndsToInput:s});return function(e){if(e===1&&s)return t??``;var n=c(e),r=``,i=F7(n),a;try{for(i.s();!(a=i.n()).done;){var o=a.value;r+=Vse(o)}}catch(e){i.e(e)}finally{i.f()}return r}}var Kse=(0,I.memo)(function({series:e,xScale:t,yScale:n,color:r}){let i=Ese().curve(Ose).x(e=>t(e.x)).y(e=>n(e.y))(e.points)??``,a=(0,I.useRef)(i),o=(0,I.useCallback)(Xf(e=>{a.current=e},50),[]),s=Gse(a.current,i);o(i);let{t:c}=i7({from:{t:0},to:{t:1},reset:!0,delay:0});return(0,H.jsx)(f7.path,{d:c.to(s),stroke:r,strokeWidth:2,strokeLinecap:`round`,fill:`transparent`})}),B7=60,qse=50,V7=20,H7=20;function Jse({width:e,height:t,series:n,disabled:r}){let[i,a]=(0,I.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,I.useMemo)(()=>lF().range([0,e-B7-H7]).domain([i,a]),[e,i,a]),s=t-qse-V7,c=(0,I.useMemo)(()=>_N().domain([0,Q.of(n).flatMap(e=>e.points).map(e=>e.y).maxBy(e=>e)??1]).range([s,0]),[n,s]);return(0,H.jsx)(`svg`,{width:e,height:t,children:(0,H.jsxs)(`g`,{transform:`translate(${B7},${V7})`,children:[(0,H.jsx)(rj,{scale:o,top:s}),(0,H.jsx)(ij,{scale:c,left:0,label:`Buffer Size`}),(0,H.jsx)(ej,{xScale:o,yScale:c,width:e-B7-H7,height:s}),n.map((e,t)=>r.has(e.label)?void 0:(0,H.jsx)(Kse,{series:e,xScale:o,yScale:c,color:v6(t,n.length)},e.label))]})})}var Yse=(0,I.memo)(function(e){let t=L(UR),n=t.type===`Last30`?[tE(bE(),-29),tE(bE(),1)]:[t.month,nE(t.month,1)],r=L(t.type===`Last30`?Uie:Wie),i=L(bL),[a,o]=(0,I.useState)(sO.empty()),s=n[0],c=n[1],l=(0,I.useMemo)(()=>Mse(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,H.jsxs)(`div`,{children:[(0,H.jsx)(J,{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,H.jsx)(Jse,{width:u,height:d,series:l,disabled:a})}),(0,H.jsx)(`div`,{style:{marginTop:`1em`,display:`flex`,flexWrap:`wrap`,justifyContent:`space-around`},children:l.map((e,t)=>(0,H.jsx)(Jw,{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,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(`div`,{style:{width:`14px`,height:`14px`,backgroundColor:v6(t,l.length)}}),(0,H.jsx)(`div`,{style:{marginLeft:`1em`},children:e.label})]})},e.label))})]})}),Xse=bS;function Zse(){GI(`Buffer Occupancy`);let[e,t]=(0,I.useState)(12);return(0,H.jsxs)(J,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,H.jsxs)(J,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,H.jsx)(q,{variant:`subtitle1`,children:`Average material occupancy of rotary tables and stocker positions over time`}),(0,H.jsx)(J,{sx:{flexGrow:1}}),(0,H.jsx)(`span`,{style:{fontSize:`small`,marginRight:`1em`},children:`Moving Average Window: `}),(0,H.jsx)(Xse,{style:{width:`10em`},min:1,max:36,steps:.2,valueLabelDisplay:`off`,value:e,onChange:(e,n)=>t(n)})]}),(0,H.jsx)(`main`,{children:(0,H.jsx)(Yse,{movingAverageDistanceInHours:e})})]})}function Qse(e,t){return e.some(e=>e===t)}var $se=20,U7=10,ece=2,W7=`#E8F5E9`,G7=`#1B5E20`;function tce({yType:e,dateRange:t,containerWidth:n,points:r}){let i=n==null||n===0?400:n,a=(0,I.useMemo)(()=>Q.of(r).map(e=>e.y).distinct().map(FA).maxBy(e=>e??0)??20,[r])+5,o=i-a-ece,s=t[0],c=t[1],l=(0,I.useMemo)(()=>{let e=[];if(c<s)e.push(s);else{let t=s;for(;t<c;)e.push(t),t=tE(t,1)}return kj().domain(e).range([0,o]).align(0).padding(.05)},[s,c,o]),{yScale:u,height:d,colorScale:f}=(0,I.useMemo)(()=>{let t=new Set;for(let e of r)t.add(e.y);let n=60*t.size,i=n+U7+$se,a=kj().domain(Q.of(t).toSortedArray(e=>e)).range([0,n]).align(0).padding(.05),o;if(e===`Station`)o=_N().domain([0,1]).range([W7,G7]);else{let e=Q.of(r).maxBy(e=>e.color)?.color??1;o=_N().domain([0,e]).range([W7,G7])}return{yScale:a,height:i,colorScale:o}},[r,e]);return{height:d,width:i,xScale:l,yScale:u,colorScale:f,marginLeft:a}}var nce=(0,I.memo)(function({xScale:e,yScale:t}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(rj,{scale:e,top:t.range()[1],tickFormat:e=>e.toLocaleDateString(void 0,{month:`short`,day:`numeric`})}),(0,H.jsx)(ij,{scale:t,left:e.range()[0]})]})}),rce=(0,I.memo)(function({points:e,xScale:t,yScale:n,colorScale:r,setTooltip:i}){let a=(0,I.useRef)(null),o=(0,I.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,I.useCallback)(()=>{a.current===null&&(a.current=window.setTimeout(()=>{a.current=null,i(null)},100))},[i]);return(0,H.jsx)(`g`,{children:e.map((e,i)=>(0,H.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))})}),ice=(0,I.memo)(function({yType:e,seriesLabel:t,tooltip:n}){return n===null?null:(0,H.jsxs)(MS,{direction:`column`,spacing:.6,children:[(0,H.jsxs)(`div`,{children:[e,`: `,n.data.y]}),(0,H.jsxs)(`div`,{children:[`Day: `,n.data.x.toDateString()]}),(0,H.jsxs)(`div`,{children:[t,`: `,n.data.label]})]})});function ace(e){let{width:t,height:n,xScale:r,yScale:i,colorScale:a,marginLeft:o}=tce({yType:e.y_title,points:e.points,dateRange:e.dateRange,containerWidth:e.parentWidth});return(0,H.jsx)(`svg`,{width:t,height:n,children:(0,H.jsxs)(`g`,{transform:`translate(${o}, ${U7})`,children:[(0,H.jsx)(rce,{points:e.points,xScale:r,yScale:i,colorScale:a,setTooltip:e.setTooltip}),(0,H.jsx)(nce,{xScale:r,yScale:i,colorScale:a})]})})}function oce(e){let t=e.setSelected;return(0,H.jsxs)(J,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,H.jsx)(q,{variant:`subtitle1`,children:e.label}),(0,H.jsx)(J,{sx:{flexGrow:1}}),t?(0,H.jsx)(Ry,{size:`small`,children:(0,H.jsx)(oS,{autoWidth:!0,displayEmpty:!0,value:e.cur_selected,onChange:n=>{Qse(e.options,n.target.value)&&t(n.target.value)},children:e.options.map((e,t)=>(0,H.jsx)(wx,{value:e,children:e},t))})}):void 0,(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(Gm,{onClick:e.onExport,style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,H.jsx)(jT,{})})})]})}function K7(e){let t=(0,I.useMemo)(()=>P(null),[]),n=R(t),r=(0,I.useCallback)(()=>{n(null)},[n]);return(0,H.jsxs)(J,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,H.jsx)(oce,{label:e.label,setSelected:e.setSelected,cur_selected:e.cur_selected,onExport:e.onExport,options:e.options}),(0,H.jsx)(`main`,{onPointerLeave:r,children:(0,H.jsx)(KA,{sx:{width:`100%`},tooltipAtom:t,autoHeight:!0,chart:({width:t})=>(0,H.jsx)(ace,{points:e.points,y_title:e.y_title,dateRange:e.dateRange,parentWidth:t,setTooltip:n}),TooltipContent:({tooltip:t})=>(0,H.jsx)(ice,{yType:e.y_title,seriesLabel:e.label_title,tooltip:t})})})]})}var q7=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 jD(this.day,this.part)}toString(){return`{day: ${this.day.toISOString()}}, part: ${this.part}}`}adjustDay(t){return new e(t(this.day),this.part)}},J7=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 jD(this.matId,this.proc)}toString(){return this.matId.toString()+`-`+this.proc.toString()}};function sce(e,t,n,r){let i=Q.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 J7(e.matId,e.proc),e.active],(e,t)=>e+t);return Q.of(t).flatMap(([e,t])=>Q.ofObject(t.unloaded_processes??{}).filter(([e,t])=>t>=n&&t<=r).map(([n,r])=>({day:cE(r),part:t.partName+`-`+n,value:{count:1,activeMachineMins:i.get(new J7(e,parseInt(n)))??0}}))).toHashMap(e=>[new q7(e.day,e.part),e.value],(e,t)=>({count:e.count+t.count,activeMachineMins:e.activeMachineMins+t.activeMachineMins}))}function cce(e){return Q.of(e).toHashMap(e=>[new q7(cE(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 Y7=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 jD(this.x,this.y)}toString(){return`{x: ${new Date(this.x).toISOString()}, y: ${this.y}}`}};function lce(e){let t=Q.of(e).toHashMap(e=>[new Y7(e.x.getTime(),e.y),e],(e,t)=>t),n=Q.of(e).map(e=>e.x.getTime()).distinct().toSortedArray(e=>e),r=Q.of(e).aggregate(e=>e.y,e=>e.activeMachineMins/e.count,(e,t)=>isNaN(e)?t:e).sortBy(([e,t])=>e),i=`<table>
|
|
367
|
+
<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>
|
|
368
|
+
<tbody>
|
|
369
|
+
`;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 Y7(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>
|
|
370
|
+
`}return i+=`</tbody>
|
|
371
|
+
</table>`,i}function uce(e){oA(lce(e))}function dce(e,t){return Q.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 fce=P(`Standard OEE`);function pce(){GI(`Station OEE`);let[e,t]=z(fce),n=L(UR),r=n.type===`Last30`?[tE(bE(),-29),tE(bE(),1)]:[n.month,nE(n.month,1)],i=L(n.type===`Last30`?Mk:Fk),a=L(n.type===`Last30`?EA:OA),o=(0,I.useMemo)(()=>{let t=p6(a);return dce(e===`Standard OEE`?d6(i.valuesToLazySeq()):e===`Occupied`?cae(i.valuesToLazySeq()):m6(a),t)},[e,i,a]);return(0,H.jsx)(K7,{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:()=>dae(`Station`,o)})}var mce=P(`Completed`);function hce(e,t,n,r){let i=sce(e,t,n,r);return Q.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 gce(e){let t=cce(e);return Q.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 _ce(){GI(`Part Production`);let[e,t]=z(mce),n=L(UR),r=n.type===`Last30`?[tE(bE(),-29),tE(bE(),1)]:[n.month,nE(n.month,1)],i=L(n.type===`Last30`?Mk:Fk),a=L(n.type===`Last30`?YI:zie),o=L(n.type===`Last30`?lL:dL),s=(0,I.useMemo)(()=>{if(e===`Completed`){let e=bE(),t=n.type===`Last30`?tE(e,-30):n.month,r=n.type===`Last30`?tE(e,1):nE(n.month,1);return hce(i.valuesToLazySeq(),o.matsById,t,r)}else return gce(a)},[e,i,o,a,n]);return(0,H.jsx)(K7,{label:`Part Production Per Day`,y_title:`Part`,label_title:e,dateRange:r,cur_selected:e,options:[`Completed`,`Planned`],setSelected:t,points:s,onExport:()=>uce(s)})}var X7=new Intl.DateTimeFormat(void 0,{weekday:`short`,month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`});function vce(e){return`material`in e&&Array.isArray(e.material)}function yce(e){return`operations`in e&&(e.operations===void 0||Array.isArray(e.operations))}function Z7({range:e}){let t=L(UR);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():X7.format(n)+` to `+X7.format(r)}var bce=P(!0),xce=AO(e=>e(HI)?{part:`aaa`,proc:2}:void 0),Sce=P(lA),Cce=P(void 0),wce=P(void 0),Q7=P(void 0),$7=P(fO.empty()),Tce=P(e=>{let t=e(UR);return t.type===`Last30`?e(Q7):e($7).get(t.month)},(e,t,n)=>{let r=e(UR);r.type===`Last30`?t(Q7,n):t($7,e=>e.alter(r.month,()=>n))}),Ece=P(null);function Dce(){GI(`Machine Cycles`);let e=R(bI),t=(0,I.useCallback)(function(t){if(!vce(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=L(UR),r=L(n.type===`Last30`?ak:sk),i=L(n.type===`Last30`?lL:dL),[a,o]=z(bce),[s,c]=z(xce),[l,u]=z(Sce),[d,f]=z(Cce),[p,m]=z(wce),[h,g]=z(Tce),[_,v]=z(Ece),y=n.type===`Last30`?[tE(bE(),-29),tE(bE(),1)]:[n.month,nE(n.month,1)],b=L(n.type===`Last30`?Mk:Fk),x=(0,I.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,I.useMemo)(()=>{if(S)return mA(x,!1)},[x,S]);return(0,H.jsxs)(J,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,H.jsxs)(J,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,H.jsxs)(q,{variant:`subtitle1`,children:[`Machine Cycles for `,(0,H.jsx)(Z7,{range:h??y})]}),(0,H.jsx)(J,{sx:{flexGrow:1}}),(0,H.jsx)(Ry,{size:`small`,children:(0,H.jsxs)(oS,{autoWidth:!0,value:a?`graph`:`table`,onChange:e=>o(e.target.value===`graph`),children:[(0,H.jsx)(wx,{value:`graph`,children:`Graph`},`graph`),(0,H.jsx)(wx,{value:`table`,children:`Table`},`table`)]})}),(0,H.jsx)(Ry,{size:`small`,children:(0,H.jsxs)(oS,{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,H.jsx)(wx,{value:-1,children:(0,H.jsx)(`em`,{children:`Any Part`})},0),x.allPartAndProcNames.map((e,t)=>(0,H.jsx)(wx,{value:t,children:(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(LU,{part:e.part,size:20}),(0,H.jsxs)(`span`,{style:{marginRight:`1em`},children:[e.part,`-`,e.proc]})]})},t))]})}),(0,H.jsx)(Ry,{size:`small`,children:(0,H.jsx)(oS,{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,H.jsx)(wx,{value:-1,children:(0,H.jsx)(`em`,{children:`Any Operation`})},-1)],...x.allMachineOperations.map((e,t)=>(0,H.jsxs)(wx,{value:t,children:[e.statGroup,` `,e.operation]},t))]:[(0,H.jsx)(wx,{value:lA,children:(0,H.jsx)(`em`,{children:`Any Machine`})},-1),x.allMachineNames.map(e=>(0,H.jsx)(wx,{value:e,children:(0,H.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,H.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),(0,H.jsx)(Ry,{size:`small`,children:(0,H.jsxs)(oS,{autoWidth:!0,displayEmpty:!0,value:p||``,style:{marginLeft:`1em`},onChange:e=>m(e.target.value===``?void 0:e.target.value),children:[(0,H.jsx)(wx,{value:``,children:(0,H.jsx)(`em`,{children:`Any Pallet`})},0),x.allPalletNames.map(e=>(0,H.jsx)(wx,{value:e,children:(0,H.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,H.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),x.data.size>0?(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(Gm,{onClick:()=>vA(x,i.matsById,h),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,H.jsx)(jT,{})})}):void 0]}),(0,H.jsx)(`main`,{children:a?(0,H.jsx)(g7,{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?Q.of(x.data).head()?.[1]?.[0]?.material?.length:void 0,plannedTimeMinutes:C}):(0,H.jsx)(o6,{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 Oce=P(!0),kce=AO(e=>e(HI)?{part:`aaa`,proc:2}:void 0),Ace=AO(e=>e(HI)?`LoadOp`:`LULOccupancy`),jce=P(uA),Mce=P(`Any`),Nce=P(void 0),e9=P(void 0),t9=P(fO.empty()),Pce=P(e=>{let t=e(UR);return t.type===`Last30`?e(e9):e(t9).get(t.month)},(e,t,n)=>{let r=e(UR);r.type===`Last30`?t(e9,n):t(t9,e=>e.alter(r.month,()=>n))}),Fce=P(null);function Ice(){GI(`L/U Cycles`);let e=R(bI),t=(0,I.useCallback)(function(t){if(!yce(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=L(UR),[r,i]=z(Oce),[a,o]=z(kce),[s,c]=z(Ace),[l,u]=z(jce),[d,f]=z(Mce),[p,m]=z(Nce),[h,g]=z(Pce),[_,v]=z(Fce),y=L(yr),b=Dk(y.basketName),x=L(n.type===`Last30`?Nk:Ik),S=sA(d,x),C=(0,I.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`?[tE(bE(),-29),tE(bE(),1)]:[n.month,nE(n.month,1)],T=L(n.type===`Last30`?Mk:Fk),E=L(n.type===`Last30`?lL:dL),D=L(n.type===`Last30`?ak:sk),O=(0,I.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,I.useMemo)(()=>{if(s===`LoadOp`||s===`UnloadOp`)return mA(O,!0)},[O,s]);return(0,H.jsxs)(J,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,H.jsxs)(J,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,H.jsxs)(q,{variant:`subtitle1`,children:[`Load/Unload Cycles for `,(0,H.jsx)(Z7,{range:h??w})]}),(0,H.jsx)(J,{sx:{flexGrow:1}}),(0,H.jsx)(Ry,{size:`small`,children:(0,H.jsxs)(oS,{autoWidth:!0,value:r?`graph`:`table`,onChange:e=>i(e.target.value===`graph`),children:[(0,H.jsx)(wx,{value:`graph`,children:`Graph`},`graph`),(0,H.jsx)(wx,{value:`table`,children:`Table`},`table`)]})}),(0,H.jsx)(Ry,{size:`small`,children:(0,H.jsxs)(oS,{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,H.jsx)(wx,{value:-1,children:(0,H.jsx)(`em`,{children:`Any Part`})},0),O.allPartAndProcNames.map((e,t)=>(0,H.jsx)(wx,{value:t,children:(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(LU,{part:e.part,size:20}),(0,H.jsxs)(`span`,{style:{marginRight:`1em`},children:[e.part,`-`,e.proc]})]})},t))]})}),(0,H.jsx)(Ry,{size:`small`,children:(0,H.jsxs)(oS,{autoWidth:!0,displayEmpty:!0,value:s,style:{marginLeft:`1em`},onChange:e=>c(e.target.value),children:[(0,H.jsx)(wx,{value:`LULOccupancy`,children:`L/U Occupancy`}),a?(0,H.jsx)(wx,{value:`LoadOp`,children:`Load Operation (estimated)`}):void 0,a?(0,H.jsx)(wx,{value:`UnloadOp`,children:`Unload Operation (estimated)`}):void 0]})}),(0,H.jsx)(Ry,{size:`small`,children:(0,H.jsxs)(oS,{autoWidth:!0,displayEmpty:!0,value:l,style:{marginLeft:`1em`},onChange:e=>{u(e.target.value)},children:[(0,H.jsx)(wx,{value:uA,children:(0,H.jsx)(`em`,{children:`Any Station`})},-1),O.allLoadStationNames.map(e=>(0,H.jsx)(wx,{value:e,children:(0,H.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,H.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),x?(0,H.jsx)(Ry,{size:`small`,children:(0,H.jsxs)(oS,{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,H.jsx)(wx,{value:`Any`,children:(0,H.jsx)(`em`,{children:`Any Carrier`})}),(0,H.jsx)(wx,{value:`Pallet`,children:`Pallet`}),(0,H.jsx)(wx,{value:`Basket`,children:b})]})}):void 0,S===`Basket`?void 0:(0,H.jsx)(Ry,{size:`small`,children:(0,H.jsxs)(oS,{autoWidth:!0,displayEmpty:!0,value:p||``,style:{marginLeft:`1em`},onChange:e=>m(e.target.value===``?void 0:e.target.value),children:[(0,H.jsx)(wx,{value:``,children:(0,H.jsx)(`em`,{children:`Any Pallet`})},0),O.allPalletNames.map(e=>(0,H.jsx)(wx,{value:e,children:(0,H.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,H.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),O.data.size>0?(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(Gm,{onClick:()=>vA(O,E.matsById,h,s===`LULOccupancy`,y.loadStationNames,b),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,H.jsx)(jT,{})})}):void 0]}),(0,H.jsx)(`main`,{children:r?(0,H.jsx)(g7,{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,H.jsx)(o6,{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 n9=AO(e=>e(HI)?3:void 0),r9=P(void 0),Lce=P(void 0),Rce=P(null);function zce(e){return`mats`in e&&Array.isArray(e.mats)}var Bce=P(e=>{let t=e(n9),n=e(r9);if(!t&&!n)return new Map;let r=e(e(UR).type===`Last30`?BL:HL);if(t){let e=r.get(t)?.valuesToLazySeq()??Q.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 Q.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}),Vce=P(e=>{let t=e(e(UR).type===`Last30`?BL:HL);return Q.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 Hce(){GI(`Pallet Cycles`);let[e,t]=z(n9),[n,r]=z(r9),[i,a]=z(Lce),[o,s]=z(Rce),c=L(UR),l=c.type===`Last30`?[tE(bE(),-29),tE(bE(),1)]:[c.month,nE(c.month,1)],u=L(c.type===`Last30`?BL:HL),d=L(Bce),f=L(Vce),p=R(bI),m=(0,I.useCallback)(function(e){return zce(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,H.jsxs)(J,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,H.jsxs)(J,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,H.jsx)(q,{variant:`subtitle1`,children:`Pallet Cycles`}),(0,H.jsx)(J,{sx:{flexGrow:1}}),(0,H.jsx)(Ry,{size:`small`,children:(0,H.jsxs)(oS,{autoWidth:!0,displayEmpty:!0,value:e??-1,onChange:e=>t(e.target.value===-1?void 0:e.target.value),children:[(0,H.jsx)(wx,{value:-1,children:(0,H.jsx)(`em`,{children:`Any Pallet`})},0),u.keysToLazySeq().sortBy(e=>e).map(e=>(0,H.jsx)(wx,{value:e,children:(0,H.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,H.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),f.length>0?(0,H.jsx)(Ry,{size:`small`,children:(0,H.jsxs)(oS,{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,H.jsx)(wx,{value:-1,children:(0,H.jsx)(`em`,{children:`Any Part`})},0),f.map((e,t)=>(0,H.jsx)(wx,{value:t,children:(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(LU,{part:e.part,size:20}),(0,H.jsxs)(`span`,{style:{marginRight:`1em`},children:[e.part,`-`,e.proc]})]})},t))]})}):void 0,(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(Gm,{onClick:()=>bA(u),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,H.jsx)(jT,{})})})]}),(0,H.jsx)(`main`,{children:(0,H.jsx)(g7,{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 i9=P(void 0),a9=P(void 0),Uce=P(void 0);function Wce(e){return`mats`in e&&Array.isArray(e.mats)}var Gce=P(null),Kce=P(e=>{let t=e(i9),n=e(a9);if(!t&&!n)return new Map;let r=e(e(UR).type===`Last30`?JL:ZL);if(t){let e=r.get(t)?.valuesToLazySeq()??Q.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 Q.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}),qce=P(e=>{let t=e(e(UR).type===`Last30`?JL:ZL);return Q.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 Jce(){let e=Dk(L(yr).basketName);GI(`${e} Cycles`);let[t,n]=z(i9),[r,i]=z(a9),[a,o]=z(Uce),[s,c]=z(Gce),l=L(UR),u=l.type===`Last30`?[tE(bE(),-29),tE(bE(),1)]:[l.month,nE(l.month,1)],d=L(l.type===`Last30`?JL:ZL),f=L(Kce),p=L(qce),m=R(bI),h=(0,I.useCallback)(function(e){return Wce(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,H.jsxs)(J,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,H.jsxs)(J,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,H.jsxs)(q,{variant:`subtitle1`,children:[e,` Cycles`]}),(0,H.jsx)(J,{sx:{flexGrow:1}}),(0,H.jsx)(Ry,{size:`small`,children:(0,H.jsxs)(oS,{autoWidth:!0,displayEmpty:!0,value:t??-1,onChange:e=>n(e.target.value===-1?void 0:e.target.value),children:[(0,H.jsx)(wx,{value:-1,children:(0,H.jsxs)(`em`,{children:[`Any `,e]})},0),d.keysToLazySeq().sortBy(e=>e).map(e=>(0,H.jsx)(wx,{value:e,children:(0,H.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,H.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),p.length>0?(0,H.jsx)(Ry,{size:`small`,children:(0,H.jsxs)(oS,{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,H.jsx)(wx,{value:-1,children:(0,H.jsx)(`em`,{children:`Any Part`})},0),p.map((e,t)=>(0,H.jsx)(wx,{value:t,children:(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(LU,{part:e.part,size:20}),(0,H.jsxs)(`span`,{style:{marginRight:`1em`},children:[e.part,`-`,e.proc]})]})},t))]})}):void 0,(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(Gm,{onClick:()=>bA(d,e),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,H.jsx)(jT,{})})})]}),(0,H.jsx)(`main`,{children:(0,H.jsx)(g7,{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 o9(e,t,n){let r=e?.zoomRange;return n?(t.get(n)??fO.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 s9(e,t,n,r){return o9(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 Yce(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 c9=Intl.NumberFormat(void 0,{maximumFractionDigits:1}),l9=(0,I.createContext)({start:new Date,end:new Date});function Xce({tooltip:e}){return(0,H.jsxs)(MS,{spacing:.5,children:[(0,H.jsxs)(`div`,{children:[`Tool: `,e.r.tool]}),(0,H.jsxs)(`div`,{children:[`Pocket: `,e.r.pocket]}),(0,H.jsxs)(`div`,{children:[`Time: `,e.r.time.toLocaleString()]}),(0,H.jsxs)(`div`,{children:[`Station: `,e.r.station.group,` #`,e.r.station.num]}),e.r.type===`ReplaceBeforeCycleStart`?(0,H.jsxs)(H.Fragment,{children:[e.r.useAtReplacement===null?void 0:(0,H.jsxs)(`div`,{children:[`Minutes at replacement: `,c9.format(e.r.useAtReplacement)]}),e.r.cntAtReplacement===null?void 0:(0,H.jsxs)(`div`,{children:[`Count at replacement: `,c9.format(e.r.cntAtReplacement)]})]}):(0,H.jsxs)(H.Fragment,{children:[e.r.totalUseAtBeginningOfCycle===null?void 0:(0,H.jsxs)(`div`,{children:[`Minutes at beginning of cycle:`,` `,c9.format(e.r.totalUseAtBeginningOfCycle)]}),e.r.totalUseAtEndOfCycle===null?void 0:(0,H.jsxs)(`div`,{children:[`Minutes at end of cycle: `,c9.format(e.r.totalUseAtEndOfCycle)]}),e.r.totalCntAtBeginningOfCycle===null?void 0:(0,H.jsxs)(`div`,{children:[`Count at beginning of cycle:`,` `,c9.format(e.r.totalCntAtBeginningOfCycle)]}),e.r.totalCntAtEndOfCycle===null?void 0:(0,H.jsxs)(`div`,{children:[`Count at end of cycle: `,c9.format(e.r.totalCntAtEndOfCycle)]})]})]})}function Zce({row:e,tooltip:t,timeScale:n,yScale:r}){let[i,a]=z(t);return(0,H.jsx)(`g`,{children:e.replacements.map((t,o)=>(0,H.jsx)(`circle`,{cx:n(t.time),cy:r(Yce(e,t)),r:t===i?.r?4:2,onMouseEnter:e=>a({top:0,left:NA(e)?.x??0,r:t}),fill:`black`},o))})}var u9=[{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=>c9.format(e.totalUseOfAllReplacements/e.numReplacements),getForSort:e=>e.totalUseOfAllReplacements/e.numReplacements},{id:3,numeric:!0,label:`Avg Use (count) at Replacement`,getDisplay:e=>c9.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,I.memo)(function({row:e}){let t=(0,I.useContext)(l9),n=(0,I.useMemo)(()=>P(null),[]),r=R(n),{ref:i,width:a}=UA({refreshMode:`debounce`,refreshRate:100,handleHeight:!1}),o=lF().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,H.jsxs)(`div`,{ref:i,style:{position:`relative`,width:`100%`,height:`35px`},children:[(0,H.jsxs)(`svg`,{height:`35`,width:a??1e3,onMouseLeave:()=>r(null),children:[c===null?void 0:(0,H.jsx)(`line`,{x1:`0`,y1:c,x2:a??1e3,y2:c,stroke:`red`,strokeWidth:.5}),(0,H.jsx)(Zce,{row:e,tooltip:n,timeScale:o,yScale:s})]}),(0,H.jsx)(GA,{atom:n,TooltipContent:Xce,chartHeight:35,chartWidth:a??1e3})]})})}],Qce=(0,I.memo)(function(e){let t=L(UR),n=G1(),r=W1(t),i=K1(0,u9),a=L(t.type===`Last30`?oR:cR),o=(0,I.useMemo)(()=>s9(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:tE(bE(),-29),end:tE(bE(),1)}:{start:t.month,end:nE(t.month,1)});return(0,H.jsx)(`div`,{children:(0,H.jsxs)(l9.Provider,{value:c,children:[(0,H.jsxs)(AC,{children:[(0,H.jsx)(L1,{columns:u9,sort:i,showDetailsCol:!1}),(0,H.jsx)(U1,{columns:u9,pageData:s,rowsPerPage:n.rowsPerPage})]}),(0,H.jsx)(H1,{tpage:n,zoom:r.zoom,count:o.length})]})})}),d9=[{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?``:c9.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?``:c9.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?``:c9.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?``:c9.format(t)},getForSort:e=>e.type===`ReplaceBeforeCycleStart`?0:e.totalCntAtEndOfCycle}],$ce=(0,I.memo)(function(e){let t=L(UR),n=G1(),r=W1(t),i=K1(0,d9),a=L(t.type===`Last30`?oR:cR),o=(0,I.useMemo)(()=>o9(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,H.jsxs)(`div`,{children:[(0,H.jsxs)(AC,{children:[(0,H.jsx)(L1,{columns:d9,sort:i,showDetailsCol:!1}),(0,H.jsx)(U1,{columns:d9,pageData:s})]}),(0,H.jsx)(H1,{tpage:n,zoom:r.zoom,count:o.length})]})});function ele(e,t){t===`summary`?J1(u9,s9(void 0,e,void 0,e=>e.tool)):J1(d9,o9(void 0,e,void 0).toSortedArray(e=>e.tool,e=>e.time))}var tle=(0,I.memo)(function(e){let t=L(L(UR).type===`Last30`?oR:cR),n=Array.from(t.keys());return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Ry,{size:`small`,children:(0,H.jsxs)(oS,{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,H.jsx)(wx,{value:-1,children:(0,H.jsx)(`em`,{children:`Any Machine`})}),n.map((e,t)=>(0,H.jsx)(wx,{value:t,children:(0,H.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,H.jsxs)(`span`,{style:{marginRight:`1em`},children:[e.group,` #`,e.num]})})},t))]})}),(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(Gm,{onClick:()=>ele(t,e.displayType),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,H.jsx)(jT,{})})})]})}),nle=P(null),rle=P(`summary`),ile=(0,I.memo)(function(){GI(`Tool Replacements`);let[e,t]=z(nle),[n,r]=z(rle);return(0,H.jsxs)(J,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,H.jsxs)(J,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,H.jsx)(q,{variant:`subtitle1`,children:`Tool Replacements`}),(0,H.jsx)(J,{sx:{flexGrow:1}}),(0,H.jsx)(Ry,{size:`small`,children:(0,H.jsxs)(oS,{autoWidth:!0,value:n,style:{marginLeft:`1em`},onChange:e=>r(e.target.value),children:[(0,H.jsx)(wx,{value:`summary`,children:`Summary`}),(0,H.jsx)(wx,{value:`details`,children:`Details`})]})}),(0,H.jsx)(tle,{station:e,setSelectedStation:t,displayType:n})]}),(0,H.jsx)(`main`,{children:n===`summary`?(0,H.jsx)(Qce,{station:e}):(0,H.jsx)($ce,{station:e})})]})}),f9=P(null),ale=150,p9=40,m9=10,h9=20,g9=10,_9=80;function v9(e){return`${e.workorderId}-${e.part}`}function y9(e){return e?new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()):null}function ole(e){let t=e.map(v9),n=Q.of(e).flatMap(e=>{let t=y9(e.simulatedFilled);return[y9(e.simulatedStart),t?tE(t,2):null]}).collect(e=>e),r=n.minBy(e=>e)??new Date,i=n.maxBy(e=>e)??tE(new Date,7),a=Math.max(pE(i,r)*50,30),o=Math.max(t.length*_9,_9);return{xScale:lF().domain([r,i]).range([0,a]),yScale:kj().domain(t).range([0,o])}}function sle({tooltip:e}){return(0,H.jsxs)(MS,{children:[(0,H.jsxs)(`div`,{children:[`Workorder: `,e.data.workorderId]}),(0,H.jsxs)(`div`,{children:[`Part: `,e.data.part]}),(0,H.jsxs)(`div`,{children:[`Due Date: `,e.data.dueDate.toLocaleDateString()]}),(0,H.jsxs)(`div`,{children:[`Priority: `,e.data.priority]}),(0,H.jsxs)(`div`,{children:[`Planned Quantity: `,e.data.plannedQuantity]}),(0,H.jsxs)(`div`,{children:[`Completed Quantity: `,e.data.completedQuantity]}),(0,H.jsxs)(`div`,{children:[`Projected Start: `,y9(e.data.simulatedStart)?.toLocaleDateString()]}),(0,H.jsxs)(`div`,{children:[`Projected Filled: `,y9(e.data.simulatedFilled)?.toLocaleDateString()]})]})}function cle({workorders:e}){return(0,H.jsx)(`div`,{children:e.map(e=>(0,H.jsxs)(MS,{direction:`column`,sx:{height:_9,alignItems:`flex-end`,paddingRight:`10px`,justifyContent:`center`},children:[(0,H.jsx)(J,{children:e.workorderId}),(0,H.jsxs)(J,{sx:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(LU,{part:e.part,size:18}),(0,H.jsx)(J,{sx:{ml:`3px`},children:e.part})]})]},v9(e)))})}function lle({xScale:e,yScale:t}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(aj,{scale:e,top:0}),(0,H.jsx)($A,{scale:e,height:t.range()[1]-t.range()[0]})]})}function ule({workorders:e,xScale:t,yScale:n}){let r=R(f9),i=(0,I.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,I.useCallback)(()=>{i.current=setTimeout(()=>{r(null)},300)},[i,r]);return(0,H.jsx)(`g`,{children:e.map(e=>{let r=v9(e);return(0,H.jsx)(`g`,{onMouseOver:a(e),onMouseLeave:o,children:e.simulatedStart&&e.simulatedFilled?(0,H.jsx)(`rect`,{x:t(y9(e.simulatedStart)),y:(n(r)??0)+20,width:t(tE(y9(e.simulatedFilled),1))-t(y9(e.simulatedStart)),height:_9-40,fill:Nr[600]}):void 0},r)})})}function dle(){let e=L(GO),t=(0,I.useMemo)(()=>Q.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}=ole(t);return(0,H.jsxs)(J,{sx:{display:`flex`},children:[(0,H.jsx)(J,{sx:{height:r.range()[1]+p9+m9,width:ale,paddingTop:`${p9}px`},children:(0,H.jsx)(cle,{workorders:t})}),(0,H.jsxs)(J,{sx:{flexGrow:1,width:0,position:`relative`},children:[(0,H.jsx)(`div`,{style:{overflowX:`visible`},children:(0,H.jsx)(`svg`,{height:r.range()[1]+p9+m9,width:n.range()[1]+g9+h9,children:(0,H.jsxs)(`g`,{transform:`translate(${h9}, ${p9})`,children:[(0,H.jsx)(lle,{yScale:r,xScale:n}),(0,H.jsx)(ule,{workorders:t,xScale:n,yScale:r})]})})}),(0,H.jsx)(GA,{atom:f9,TooltipContent:sle,chartHeight:r.range()[1]+p9+m9,chartWidth:n.range()[1]+g9+h9})]})]})}var b9=P(e=>{let t=e(UI);return t.route===$.Operations_CurrentWorkorders?t.workorder??null:null},(e,t,n)=>{e(UI).route===$.Operations_CurrentWorkorders&&(n===``&&(n=null),t(UI,{route:$.Operations_CurrentWorkorders,workorder:n??void 0}))}),fle=PO(`recentSearchedWorkorders`,[]),ple=P(async(e,{signal:t})=>{let n=e(b9);return n===null?null:await Ut.getActiveWorkorder(n,t)??[]}),mle=G(dw)({"& > *":{borderBottom:`unset !important`}}),x9=new Intl.NumberFormat(void 0,{maximumFractionDigits:1}),hle=(0,I.memo)(function({workorder:e}){let t=R(bI),n=R(E9),r=Q.ofObject(e.activeStationTime??{}).concat(Q.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,H.jsxs)(MS,{direction:`row`,sx:{flexWrap:`wrap`,justifyContent:`space-around`,ml:`1em`,mr:`1em`},children:[(0,H.jsx)(`div`,{children:(0,H.jsxs)(AC,{size:`small`,stickyHeader:!0,children:[(0,H.jsx)($C,{children:(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{children:`Serial`}),(0,H.jsx)(Z,{children:`Quarantine?`}),(0,H.jsx)(Z,{sx:{whiteSpace:`nowrap`},children:`Inspect Failed?`}),(0,H.jsx)(Z,{sx:{whiteSpace:`nowrap`},children:`Close Out`}),(0,H.jsx)(Z,{padding:`checkbox`})]})}),(0,H.jsx)(LC,{children:(e.material??[]).map(e=>(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{children:e.serial??``}),(0,H.jsx)(Z,{sx:{textAlign:`center`},padding:`checkbox`,children:e.quarantined?(0,H.jsx)(HT,{fontSize:`inherit`}):``}),(0,H.jsx)(Z,{sx:{textAlign:`center`},padding:`checkbox`,children:e.inspectionFailed?(0,H.jsx)(ST,{fontSize:`inherit`}):``}),(0,H.jsx)(Z,{sx:{textAlign:`center`},padding:`checkbox`,children:e.closeout===mt.None?``:e.closeout===mt.ClosedOut?(0,H.jsx)(lT,{fontSize:`inherit`}):(0,H.jsx)(ST,{fontSize:`inherit`})}),(0,H.jsx)(Z,{padding:`checkbox`,children:(0,H.jsx)(Gm,{onClick:()=>i(e),size:`large`,children:(0,H.jsx)(zT,{fontSize:`inherit`})})})]},e.materialID))})]})}),(0,H.jsx)(`div`,{children:(0,H.jsxs)(AC,{size:`small`,children:[(0,H.jsx)($C,{children:(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{children:`Station`}),(0,H.jsx)(Z,{children:`Active Minutes`}),(0,H.jsx)(Z,{children:`Elapsed Minutes`})]})}),(0,H.jsx)(LC,{children:r.map(t=>(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{children:t}),(0,H.jsx)(Z,{children:x9.format(nk(e.activeStationTime?.[t]??0))}),(0,H.jsx)(Z,{children:x9.format(nk(e.elapsedStationTime?.[t]??0))})]},t))})]})}),(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(AC,{size:`small`,children:[(0,H.jsx)($C,{children:(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{children:`Time`}),(0,H.jsx)(Z,{children:`Comment`})]})}),(0,H.jsx)(LC,{children:(e.comments??[]).map((e,t)=>(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{children:e.timeUTC.toLocaleString(void 0,{year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`})}),(0,H.jsx)(Z,{children:e.comment})]},t))})]}),(0,H.jsx)(Y,{sx:{mt:`0.5em`},onClick:()=>n(e),children:`Add Comment`})]})]})});function S9(e){return e?new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())).toLocaleDateString():``}function C9(e){return e.closeout===mt.ClosedOut?!1:e.quarantined||e.inspectionFailed||e.closeout===mt.CloseOutFailed}function gle({workorder:e,showSim:t}){let[n,r]=(0,I.useState)(!1),i=t?10:8;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(mle,{children:[(0,H.jsx)(Z,{children:e.workorderId}),(0,H.jsx)(Z,{children:(0,H.jsxs)(J,{sx:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(J,{sx:{mr:`0.2em`},children:(0,H.jsx)(LU,{part:e.part,size:25})}),(0,H.jsx)(`div`,{children:(0,H.jsx)(q,{variant:`body2`,component:`span`,sx:{display:`block`},children:e.part})})]})}),(0,H.jsx)(Z,{children:e.dueDate===null?``:e.dueDate.toLocaleDateString()}),(0,H.jsx)(Z,{align:`right`,children:e.priority}),(0,H.jsx)(Z,{align:`right`,children:e.plannedQuantity}),(0,H.jsx)(Z,{align:`right`,children:e.material?.length??0}),(0,H.jsx)(Z,{align:`right`,children:e.material?.filter(C9).length??0}),(0,H.jsx)(Z,{align:`right`,children:e.completedQuantity}),t?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Z,{align:`right`,children:S9(e.simulatedStart)}),(0,H.jsx)(Z,{align:`right`,children:S9(e.simulatedFilled)})]}):void 0,(0,H.jsx)(Z,{children:(0,H.jsx)(X,{title:`Show Details`,children:(0,H.jsx)(Gm,{size:`small`,onClick:()=>r(!n),children:n?(0,H.jsx)(LT,{}):(0,H.jsx)(PT,{})})})})]}),(0,H.jsx)(dw,{children:(0,H.jsx)(Z,{sx:{pb:`0`,pt:`0`},colSpan:i,children:(0,H.jsx)(Rp,{in:n,timeout:`auto`,unmountOnExit:!0,children:(0,H.jsx)(hle,{workorder:e})})})})]})}function _le(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(C9).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 Q.of(e).toSortedArray(n===`asc`?{asc:r}:{desc:r})}function vle({sortBy:e,order:t,showSim:n}){let r=L(GO),i=L(ple),a=(0,I.useMemo)(()=>_le(i??r.workorders??[],e,t),[r.workorders,e,t,i]);return i&&i.length===0?(0,H.jsx)(dw,{children:(0,H.jsx)(Z,{colSpan:n?10:8,children:`No workorders found`})}):(0,H.jsx)(H.Fragment,{children:a.map(e=>(0,H.jsx)(gle,{workorder:e,showSim:n},`${e.workorderId}-${e.part}`))})}function yle(e,t){let n=`<table>
|
|
372
|
+
<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>
|
|
373
|
+
<tbody>
|
|
374
|
+
`;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>${S9(r.simulatedStart)}</td>`,n+=`<td>${S9(r.simulatedFilled)}</td>`),n+=`<td>${(r.material??[]).map(e=>e.serial??``).join(`;`)}</td>`,n+=`<td>${Q.ofObject(r.activeStationTime??{}).map(([e,t])=>`${e}: ${nk(t)}`).toRArray().join(`;`)}</td>`,n+=`<td>${Q.ofObject(r.elapsedStationTime??{}).map(([e,t])=>`${e}: ${nk(t)}`).toRArray().join(`;`)}</td>`,n+=`</tr>
|
|
375
|
+
`;n+=`</tbody></table>
|
|
376
|
+
`,oA(n)}function w9(e){return(0,H.jsxs)(Z,{align:e.align,sortDirection:e.sortBy===e.col&&e.order,children:[(0,H.jsx)(X,{title:`Sort`,enterDelay:300,children:(0,H.jsx)(vw,{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 T9=P(`table`),ble=(0,I.memo)(function({showSim:e}){let[t,n]=z(T9);return(0,H.jsxs)(MS,{direction:`row`,spacing:2,sx:{justifyContent:`flex-end`,alignItems:`center`},children:[e?(0,H.jsxs)(MS,{direction:`row`,spacing:2,sx:{alignItems:`center`,flexGrow:1},children:[(0,H.jsx)(JT,{fontSize:`small`}),(0,H.jsx)(q,{variant:`caption`,children:`Projected dates are estimates`})]}):void 0,(0,H.jsx)(Ry,{size:`small`,children:(0,H.jsxs)(oS,{variant:`outlined`,value:t,onChange:e=>n(e.target.value),children:[(0,H.jsx)(wx,{value:`table`,children:`Table`}),(0,H.jsx)(wx,{value:`gantt`,children:`Gantt`})]})})]})}),xle=Pa`
|
|
377
|
+
0% {
|
|
378
|
+
transform: rotate(0deg);
|
|
379
|
+
}
|
|
380
|
+
100% {
|
|
381
|
+
transform: rotate(360deg);
|
|
382
|
+
}
|
|
383
|
+
`,Sle=G(rre)(()=>({animation:`${xle} 1.5s linear infinite`}));function Cle(){let[e,t]=(0,I.useState)(!1),[n,r]=(0,I.useTransition)(),[i,a]=z(b9),[o,s]=(0,I.useState)(null),[c,l]=z(fle);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,H.jsxs)(H.Fragment,{children:[n?(0,H.jsx)(X,{title:`Searching.... Click to cancel`,children:(0,H.jsx)(Gm,{size:`small`,onClick:()=>a(null),children:(0,H.jsx)(Sle,{fontSize:`inherit`})})}):i?(0,H.jsx)(X,{title:`Clear Search`,children:(0,H.jsx)(Gm,{size:`small`,onClick:()=>a(null),children:(0,H.jsx)(fT,{fontSize:`inherit`})})}):(0,H.jsx)(X,{title:`Search`,children:(0,H.jsx)(Gm,{size:`small`,onClick:e=>{t(!0),e.currentTarget.blur()},children:(0,H.jsx)(UT,{fontSize:`inherit`})})}),(0,H.jsxs)(ky,{open:e,onClose:()=>t(!1),children:[(0,H.jsx)(My,{children:`Search Workorder`}),(0,H.jsxs)(jy,{children:[(0,H.jsx)(Hw,{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,H.jsx)(H.Fragment,{children:(0,H.jsx)(sb,{dense:!0,sx:{mt:`1em`},subheader:(0,H.jsx)(y_,{children:`Previous Searches`}),children:c.map(e=>(0,H.jsx)(hb,{onClick:()=>u(e),children:(0,H.jsx)(cb,{children:(0,H.jsx)(Tb,{primary:e})})},e))})}):void 0]}),(0,H.jsxs)(Ay,{children:[(0,H.jsx)(Y,{color:`primary`,onClick:()=>u(o),children:`Search`}),(0,H.jsx)(Y,{color:`secondary`,onClick:()=>t(!1),children:`Cancel`})]})]})]})}var wle=(0,I.memo)(function(e){let t={sortBy:e.sortBy,setSortBy:e.setSortBy,order:e.order,setOrder:e.setOrder};return(0,H.jsx)($C,{children:(0,H.jsxs)(dw,{children:[(0,H.jsx)(w9,{align:`left`,col:0,...t,extraIcon:e.disableSearch?void 0:(0,H.jsx)(Cle,{}),children:`Workorder`}),(0,H.jsx)(w9,{align:`left`,col:1,...t,children:`Part`}),(0,H.jsx)(w9,{align:`left`,col:3,...t,children:`Due Date`}),(0,H.jsx)(w9,{align:`right`,col:4,...t,children:`Priority`}),(0,H.jsx)(w9,{align:`right`,col:2,...t,children:`Planned Quantity`}),(0,H.jsx)(w9,{align:`right`,col:6,...t,children:`Started Quantity`}),(0,H.jsx)(w9,{align:`right`,col:7,...t,children:`Abnormal Quantity`}),(0,H.jsx)(w9,{align:`right`,col:5,...t,children:`Completed Quantity`}),e.showSim?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(w9,{align:`right`,col:8,...t,children:`Projected Start`}),(0,H.jsx)(w9,{align:`right`,col:9,...t,children:`Projected Filled`})]}):void 0,(0,H.jsx)(Z,{children:(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(Gm,{style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,onClick:()=>yle(e.workorders,e.showSim),children:(0,H.jsx)(jT,{})})})})]})})}),E9=P(null);function Tle(){let[e,t]=z(E9),[n,r]=(0,I.useState)(null),i=R(JO);function a(){t(null),r(null)}function o(){e&&n&&n!==``&&i({workorder:e.workorderId,comment:n}),a()}return(0,H.jsx)(ky,{open:e!==null,onClose:a,children:e===null?void 0:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(My,{children:(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(`div`,{children:(0,H.jsx)(LU,{part:e.part,size:40})}),(0,H.jsxs)(`div`,{style:{marginLeft:`1em`,flexGrow:1},children:[`Add Comment For `,e.workorderId]})]})}),(0,H.jsx)(jy,{children:(0,H.jsx)(Hw,{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,H.jsxs)(Ay,{children:[(0,H.jsx)(Y,{color:`primary`,onClick:o,children:`Save Comment`}),(0,H.jsx)(Y,{color:`primary`,onClick:a,children:`Cancel`})]})]})})}function Ele(){let[e,t]=z(b9);return(0,H.jsx)(dw,{children:(0,H.jsx)(Z,{colSpan:10,children:(0,H.jsxs)(MS,{direction:`column`,sx:{mt:`3em`,flex:`flex`,alignItems:`center`,width:`100%`},children:[(0,H.jsxs)(MS,{direction:`row`,spacing:`3`,children:[(0,H.jsx)(zm,{}),e&&e!==``?(0,H.jsxs)(q,{variant:`h6`,children:[`Searching for workorder `,e]}):(0,H.jsx)(q,{variant:`h6`,children:`Searching`})]}),(0,H.jsx)(Y,{onClick:()=>t(null),children:`Cancel`})]})})})}function Dle({showSim:e,disableSearch:t}){let[n,r]=(0,I.useState)(0),[i,a]=(0,I.useState)(`asc`),o=L(GO);return(0,H.jsxs)(AC,{stickyHeader:!0,children:[(0,H.jsx)(wle,{workorders:o?.workorders??[],sortBy:n,setSortBy:r,showSim:e,order:i,setOrder:a,disableSearch:t}),(0,H.jsx)(LC,{children:(0,H.jsx)(I.Suspense,{fallback:(0,H.jsx)(Ele,{}),children:(0,H.jsx)(vle,{sortBy:n,order:i,showSim:e})})})]})}function Ole(){let e=R(D0),t=L(CI),[n,r]=PI(),i=R(bI);if(t===null||t.materialID<0)return null;function a(e){t!==null&&(n({mat:t,operator:`Manager`,failed:e}),i(null))}return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Y,{color:`primary`,disabled:r,onClick:()=>a(!0),children:`Fail CloseOut`}),(0,H.jsx)(Y,{color:`primary`,disabled:r,onClick:()=>a(!1),children:`Pass CloseOut`}),(0,H.jsx)(Y,{color:`primary`,onClick:()=>e(!0),children:`Change Workorder`})]})}var kle=(0,I.memo)(function(){return(0,H.jsx)(dW,{buttons:(0,H.jsx)(Ole,{})})}),D9=(0,I.memo)(function({disableSearch:e}){GI(`Workorders`);let t=L(GO),n=L(T9),r=(0,I.useMemo)(()=>t.workorders?.some(e=>!!e.simulatedStart||!!e.simulatedFilled)??!1,[t.workorders]);return(0,H.jsxs)(J,{component:`main`,sx:{padding:`24px`},children:[r?(0,H.jsx)(ble,{showSim:r}):void 0,n===`table`?(0,H.jsx)(Dle,{showSim:r,disableSearch:e}):(0,H.jsx)(dle,{}),(0,H.jsx)(Tle,{}),(0,H.jsx)(kle,{}),(0,H.jsx)(M0,{})]})}),Ale=Nr[50],jle=Nr[600],Mle=Ir[100],O9=`3em`,Nle=`calc(${O9} * 7)`,Ple=P(e=>{let t=e(mR);return t===null?null:Q.of(t.usage).toLookupOrderedMap(e=>e.machineGroup,e=>new Date(e.day.getUTCFullYear(),e.day.getUTCMonth(),e.day.getUTCDate()))}),Fle=P(e=>{let t=e(mR);return t===null?uO.empty():uO.build(t.usage,e=>e.machineGroup)}),Ile=P(e=>{let t=e(mR);return t===null?uO.empty():uO.build(t.usage,e=>new Date(e.day.getUTCFullYear(),e.day.getUTCMonth(),1))}),Lle=P(e=>{let t=e(mR);return t===null?0:Q.of(t.usage).map(e=>Math.ceil(e.usage)).maxBy(e=>e)??1}),Rle=P(e=>{let t=e(mR);return t===null?[null,null]:[Q.of(t.usage).map(e=>new Date(e.day.getUTCFullYear(),e.day.getUTCMonth(),e.day.getUTCDate())).minBy(e=>e)??null,Q.of(t.usage).map(e=>new Date(e.day.getUTCFullYear(),e.day.getUTCMonth(),e.day.getUTCDate())).maxBy(e=>e)??null]});function zle({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,H.jsxs)(J,{sx:{width:Nle},children:[(0,H.jsx)(q,{variant:`h6`,sx:{textAlign:`center`},children:e.toLocaleString(`default`,{month:`long`,year:`numeric`})}),(0,H.jsxs)(J,{sx:{display:`flex`,flexWrap:`wrap`},children:[Q.ofRange(0,r).map((e,t)=>(0,H.jsx)(J,{sx:{height:O9,width:O9}},t)),Q.ofRange(1,i+1).map((r,i)=>(0,H.jsx)(`div`,{style:{width:O9,height:O9,cursor:`default`,backgroundColor:t(new Date(e.getFullYear(),e.getMonth(),r))},children:(0,H.jsx)(X,{title:n(new Date(e.getFullYear(),e.getMonth(),r)),children:(0,H.jsx)(J,{sx:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100%`},children:r})})},i))]})]})}function Ble(){return(0,H.jsxs)(MS,{direction:`row`,spacing:2,sx:{alignItems:`center`},children:[(0,H.jsx)(JT,{fontSize:`small`}),(0,H.jsx)(q,{variant:`caption`,children:`Projected dates are estimates`})]})}function Vle({group:e,month:t}){let n=L(Ple),[r,i]=L(Rle),a=L(Lle),o=(0,I.useMemo)(()=>{let t=_N().domain([0,a]).range([Ale,jle]);return a=>{if(i&&a>i||r&&a<r)return`white`;let o=n?.get(e)?.get(a);return o?t(o.usage):Mle}},[n,a,r,i,e]);function s(t){let a=n?.get(e)?.get(t);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{children:t.toLocaleDateString(void 0,{month:`short`,day:`numeric`,year:`numeric`})}),i&&t>i?(0,H.jsx)(`div`,{children:`Not Simulated`}):r&&t<r?(0,H.jsx)(`div`,{}):a?(0,H.jsxs)(`div`,{children:[`Usage: `,a.usage.toFixed(2)]}):(0,H.jsx)(`div`,{children:`Downtime`})]})}return(0,H.jsx)(zle,{date:t,dayColor:o,tooltip:s})}function Hle(){GI(`Projected Machine Usage`);let e=L(Fle),t=L(Ile);return(0,H.jsx)(J,{component:`main`,sx:{padding:`24px`},children:(0,H.jsxs)(MS,{direction:`column`,spacing:5,children:[(0,H.jsx)(Ble,{}),e.toAscLazySeq().map(e=>(0,H.jsxs)(`div`,{children:[(0,H.jsx)(q,{variant:`h4`,children:e}),(0,H.jsx)(J,{sx:{display:`flex`,flexWrap:`wrap`,columnGap:`50px`},children:t.toAscLazySeq().map(t=>(0,H.jsx)(Vle,{group:e,month:t},t.getTime()))})]},e))]})})}function Ule(){let e=R(D0),t=L(CI),[n,r]=PI(),i=R(bI);if(t===null||t.materialID<0)return null;function a(e){t!==null&&(n({mat:t,operator:`Manager`,failed:e}),i(null))}return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Y,{color:`primary`,disabled:r,onClick:()=>a(!0),children:`Fail CloseOut`}),(0,H.jsx)(Y,{color:`primary`,disabled:r,onClick:()=>a(!1),children:`Pass CloseOut`}),(0,H.jsx)(Y,{color:`primary`,onClick:()=>e(!0),children:`Change Workorder`})]})}var Wle=(0,I.memo)(function(){return(0,H.jsx)(dW,{buttons:(0,H.jsx)(Ule,{})})}),Gle=new Intl.DateTimeFormat(void 0,{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`});function Kle({day:e,setDay:t}){let n=bE();return(0,H.jsxs)(MS,{direction:`row`,spacing:2,sx:{alignItems:`center`},children:[(0,H.jsx)(X,{title:`Previous Day`,children:(0,H.jsx)(`div`,{children:(0,H.jsx)(Gm,{disabled:e<=tE(n,-28),onClick:()=>t(e=>tE(e,-1)),children:(0,H.jsx)(KT,{})})})}),(0,H.jsx)(q,{sx:{minWidth:`14em`,textAlign:`center`},children:Gle.format(e)}),(0,H.jsx)(X,{title:`Next Day`,children:(0,H.jsx)(`div`,{children:(0,H.jsx)(Gm,{disabled:e>=n,onClick:()=>t(e=>tE(e,1)),children:(0,H.jsx)(GT,{})})})})]})}function qle(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 Q.of(e).toSortedArray(n===`asc`?{asc:r}:{desc:r},{asc:e=>e.last_unload_time??null})}function Jle({sortBy:e,setSortBy:t,sortOrder:n,setSortOrder:r}){function i(i){i===e?r(n===`asc`?`desc`:`asc`):(t(i),r(`asc`))}return(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{sortDirection:e===0&&n,children:(0,H.jsx)(vw,{active:e===0,direction:n,onClick:()=>i(0),children:`Completed Time`})}),(0,H.jsx)(Z,{sortDirection:e===1&&n,children:(0,H.jsx)(vw,{active:e===1,direction:n,onClick:()=>i(1),children:`Serial`})}),(0,H.jsx)(Z,{sortDirection:e===2&&n,children:(0,H.jsx)(vw,{active:e===2,direction:n,onClick:()=>i(2),children:`Part`})}),(0,H.jsx)(Z,{sortDirection:e===3&&n,children:(0,H.jsx)(vw,{active:e===3,direction:n,onClick:()=>i(3),children:`Workorder`})}),(0,H.jsx)(Z,{sortDirection:e===4&&n,children:(0,H.jsx)(vw,{active:e===4,direction:n,onClick:()=>i(4),children:`Closeout`})}),(0,H.jsx)(Z,{sortDirection:e===5&&n,children:(0,H.jsx)(vw,{active:e===5,direction:n,onClick:()=>i(5),children:`Closeout Time`})}),(0,H.jsx)(Z,{})]})}var Yle=new Intl.DateTimeFormat(void 0,{hour:`2-digit`,minute:`numeric`,second:`numeric`}),Xle=new Intl.DateTimeFormat(void 0,{year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`}),Zle=(0,I.memo)(function({mat:e}){let t=R(bI);return(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{children:e.last_unload_time?Yle.format(e.last_unload_time):``}),(0,H.jsx)(Z,{children:e.serial}),(0,H.jsx)(Z,{children:(0,H.jsxs)(MS,{direction:`row`,spacing:`2`,sx:{alignItems:`center`},children:[(0,H.jsx)(LU,{part:e.partName,size:25}),(0,H.jsx)(q,{variant:`body2`,children:e.partName})]})}),(0,H.jsx)(Z,{children:e.workorderId}),(0,H.jsx)(Z,{children:e.closeout_completed===null||e.closeout_completed===void 0?``:e.closeout_failed?(0,H.jsx)(ST,{fontSize:`inherit`}):(0,H.jsx)(lT,{fontSize:`inherit`})}),(0,H.jsx)(Z,{children:e.closeout_completed?Xle.format(e.closeout_completed):``}),(0,H.jsx)(Z,{padding:`checkbox`,children:e.serial!==null&&e.serial!==``?(0,H.jsx)(Gm,{onClick:()=>{e.serial&&t({type:`ManuallyEnteredSerial`,serial:e.serial})},size:`large`,children:(0,H.jsx)(zT,{fontSize:`inherit`})}):void 0})]})});function Qle({day:e}){let t=L(lL),n=(0,I.useMemo)(()=>{let n=tE(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,I.useState)(0),[a,o]=(0,I.useState)(`asc`),s=(0,I.useMemo)(()=>qle(n,r,a),[n,r,a]);return(0,H.jsxs)(AC,{stickyHeader:!0,children:[(0,H.jsx)($C,{children:(0,H.jsx)(Jle,{sortBy:r,setSortBy:i,sortOrder:a,setSortOrder:o})}),(0,H.jsx)(LC,{children:s.map(e=>(0,H.jsx)(Zle,{mat:e},e.materialID))})]})}function $le(){GI(`Close Out`);let[e,t]=(0,I.useState)(bE());return(0,H.jsxs)(J,{sx:{padding:`24px`},children:[(0,H.jsx)(J,{component:`nav`,sx:{display:`flex`,justifyContent:`center`},children:(0,H.jsx)(Kle,{day:e,setDay:t})}),(0,H.jsx)(`main`,{children:(0,H.jsx)(Qle,{day:e})}),(0,H.jsx)(M0,{}),(0,H.jsx)(Wle,{})]})}var k9=P(!1),A9=P(!1),j9=P(!1),M9=[{id:0,numeric:!1,label:`ID`,getDisplay:e=>e.bookingId,Cell:({row:e})=>e.canceled?(0,H.jsx)(q,{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,H.jsxs)(MS,{direction:`row`,spacing:1,sx:{alignItems:`center`},children:[(0,H.jsx)(LU,{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:k9},{id:7,numeric:!1,label:`Scheduled Job`,getDisplay:e=>e.job??``,openFilterDialog:k9},{id:8,numeric:!1,label:`Scheduled Time`,getDisplay:e=>e.schTime?e.schTime.toLocaleString():``,getForSort:e=>e.schTime?e.schTime.getTime():0}],eue=(0,I.memo)(function({setRebookingToShow:e}){let t=K1(3,M9,`desc`),n=G1(),r=L(bR),i=L(SR),a=L(wR),o=L(A9),s=L(j9),c=(0,I.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,H.jsxs)(`div`,{children:[(0,H.jsxs)(AC,{children:[(0,H.jsx)(L1,{columns:M9,sort:t,showDetailsCol:!0,copyToClipboardRows:c}),(0,H.jsx)(U1,{columns:M9,pageData:c,rowsPerPage:n.rowsPerPage,onClickDetails:(t,n)=>e(n)})]}),(0,H.jsx)(H1,{tpage:n,count:c.length})]})}),N9=new Intl.DateTimeFormat(void 0,{year:`numeric`,month:`short`,day:`numeric`,hour:`numeric`,minute:`numeric`}),tue=(0,I.memo)(function({rebooking:e,close:t}){let[n,r]=AR();function i(){e&&n(e.bookingId).then(()=>t(void 0)).catch(console.log)}return(0,H.jsxs)(ky,{open:e!==void 0,onClose:()=>t(void 0),children:[(0,H.jsx)(My,{children:e?.canceled?(0,H.jsx)(q,{sx:{textDecoration:`line-through`},children:e?.bookingId}):e?.bookingId}),(0,H.jsx)(jy,{children:(0,H.jsxs)(MS,{direction:`column`,spacing:1,children:[e?.canceled&&(0,H.jsxs)(q,{variant:`h5`,children:[`Canceled at `,N9.format(e.canceled)]}),(0,H.jsxs)(MS,{direction:`row`,spacing:1,children:[(0,H.jsx)(`span`,{children:`Part:`}),e?.partName&&(0,H.jsx)(LU,{part:e?.partName,size:25}),(0,H.jsx)(`span`,{children:e?.partName})]}),(0,H.jsxs)(q,{children:[`Quantity: `,e?.quantity]}),(0,H.jsxs)(q,{children:[`Request Time: `,N9.format(e?.timeUTC)]}),(0,H.jsxs)(q,{children:[`Priority: `,e?.priority]}),e?.workorder&&(0,H.jsxs)(q,{children:[`Workorder: `,e?.workorder]}),(0,H.jsxs)(q,{children:[`Note: `,e?.notes]}),e?.job&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Py,{}),(0,H.jsxs)(q,{children:[`Scheduled Job: `,e?.job]}),(0,H.jsxs)(q,{children:[`Scheduled Time: `,e?.schTime?.toLocaleString()]})]})]})}),(0,H.jsxs)(Ay,{children:[!e?.canceled&&!e?.job&&(0,H.jsxs)(Y,{onClick:i,color:`secondary`,disabled:r,children:[r?(0,H.jsx)(zm,{size:24}):void 0,`Cancel Rebooking Request`]}),(0,H.jsx)(Y,{onClick:()=>t(void 0),children:`Close`})]})]})}),nue=P(e=>Q.ofObject(e(GO).jobs).map(([e,t])=>t.partName).concat(e(yO).valuesToLazySeq().map(e=>e.partName)).distinctAndSortBy(e=>e).toRArray()),rue=(0,I.memo)(function(){let[e,t]=(0,I.useState)(!1),[n,r]=(0,I.useState)({part:``}),i=L(nue),[a,o]=jR(),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,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(ky,{open:e,onClose:c,children:[(0,H.jsx)(My,{children:`Create New`}),(0,H.jsx)(jy,{children:(0,H.jsxs)(MS,{direction:`column`,spacing:2,sx:{mt:`0.5em`,minWidth:`25em`},children:[(0,H.jsx)(U_,{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,H.jsx)(Hw,{...e,label:`Part Name`,slotProps:{input:{...e.slotProps.input,startAdornment:(0,H.jsxs)(H.Fragment,{children:[n.part===``?void 0:(0,H.jsx)(Gy,{position:`start`,children:(0,H.jsx)(LU,{part:n.part,size:25})}),e.slotProps.input?.startAdornment]})}}}),renderOption:(e,t)=>(0,H.jsx)(`li`,{...e,children:(0,H.jsxs)(MS,{direction:`row`,spacing:`1`,sx:{alignItems:`center`},children:[(0,H.jsx)(LU,{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,H.jsx)(Hw,{label:`Quantity`,type:`number`,value:n.qty&&!isNaN(n.qty)?n.qty:``,onChange:e=>r(t=>({...t,qty:parseInt(e.target.value)}))}),(0,H.jsx)(Hw,{label:`Priority (optional)`,type:`number`,value:n.priority&&!isNaN(n.priority)?n.priority:``,onChange:e=>r(t=>({...t,priority:parseInt(e.target.value)}))}),(0,H.jsx)(Hw,{label:`Workorder (optional)`,value:n.workorder??``,onChange:e=>r(t=>({...t,workorder:e.target.value}))}),(0,H.jsx)(Hw,{label:`Notes (optional)`,multiline:!0,minRows:2,value:n.notes??``,onChange:e=>r(t=>({...t,notes:e.target.value}))})]})}),(0,H.jsxs)(Ay,{children:[(0,H.jsxs)(Y,{color:`secondary`,onClick:l,disabled:!s||o,children:[o?(0,H.jsx)(zm,{size:24}):void 0,`Create`]}),(0,H.jsx)(Y,{onClick:c,children:`Cancel`})]})]}),(0,H.jsx)(X,{title:`Add Rebooking`,children:(0,H.jsx)(Iy,{onClick:()=>t(!0),sx:{position:`fixed`,bottom:`24px`,right:`24px`},color:`primary`,children:(0,H.jsx)(Qw,{})})})]})}),iue=(0,I.memo)(function(){let[e,t]=z(k9),[n,r]=z(A9),[i,a]=z(j9);return(0,H.jsxs)(ky,{open:e,onClose:()=>t(!1),children:[(0,H.jsx)(My,{children:`Filter`}),(0,H.jsx)(jy,{children:(0,H.jsxs)(MS,{direction:`column`,spacing:2,children:[(0,H.jsx)(zy,{control:(0,H.jsx)(Jv,{checked:n,onChange:e=>r(e.target.checked)}),label:`Hide scheduled`}),(0,H.jsx)(zy,{control:(0,H.jsx)(Jv,{checked:i,onChange:e=>a(e.target.checked)}),label:`Hide canceled`})]})}),(0,H.jsx)(Ay,{children:(0,H.jsx)(Y,{onClick:()=>t(!1),children:`Close`})})]})});function aue(){GI(L(yr).supportsRebookings??`Rebookings`);let[e,t]=(0,I.useState)(void 0);return(0,H.jsxs)(J,{component:`main`,sx:{padding:`24px`},children:[(0,H.jsx)(eue,{setRebookingToShow:t}),(0,H.jsx)(tue,{rebooking:e,close:t}),(0,H.jsx)(rue,{}),(0,H.jsx)(iue,{})]})}var P9=P(Math.floor(Date.now()/6e4));P9.onMount=e=>{let t=setInterval(()=>{e(Math.floor(Date.now()/6e4))},6e4);return()=>clearInterval(t)};var F9=PO(`charts_last30WeekdayStartIdx`,0),I9=PO(`charts_last30WeekdayStartMinuteOffset`,360),L9=_O(e=>P(t=>{let n=t(F9),r=t(I9),i=new Date(t(P9)*6e4),a=lE(cE(i),r),o=lE(aE(i,{weekStartsOn:n}),r);switch(e){case`StartOfToday`:return a;case`StartOfYesterday`:return tE(a,-1);case`StartOfWeek`:return o;case`StartOfLastWeek`:return tE(o,-7);case`Last30`:return tE(i,-30)}})),R9=_O(e=>P(t=>{if(e===`Now`)return null;let n=t(F9),r=t(I9),i=new Date(t(P9)*6e4);switch(e){case`EndOfYesterday`:return lE(cE(i),r);case`EndOfLastWeek`:return lE(aE(i,{weekStartsOn:n}),r)}}));function oue(e){let t=PO(`charts_${e}_start`,`StartOfWeek`),n=PO(`charts_${e}_end`,`Now`);return P(e=>{let r=e(t),i=e(n);return{startType:r,endType:i,startDate:r instanceof Date?r:e(L9(r)),endDate:i instanceof Date?i:e(R9(i))}},(e,r,i)=>{`start`in i&&r(t,i.start),`end`in i&&r(n,i.end)})}function sue(e){return e.closeout_completed===void 0?!!(Q.ofObject(e.completedInspections??{}).some(([,e])=>!e.success)||e.currently_quarantined):e.closeout_failed!==!1}var z9=oue(`part-summary`),cue=P(e=>{let t=e(lL),n=e(Mk),r=e(z9),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:Q.of(e).sumBy(e=>+!!sue(e)),mats:e,stationMins:fO.empty(),workorders:Q.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:uO.empty()}).valuesToAscLazySeq().toRArray()});function lue(e){return e===`CustomDate`||e===`StartOfToday`||e===`StartOfYesterday`||e===`StartOfWeek`||e===`StartOfLastWeek`||e===`Last30`}function uue(e){return e===`CustomDate`||e===`Now`||e===`EndOfYesterday`||e===`EndOfLastWeek`}function due(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 B9({label:e,date:t}){return(0,H.jsxs)(J,{children:[(0,H.jsx)(q,{children:e}),t?(0,H.jsxs)(q,{variant:`subtitle2`,children:[`(`,t.toLocaleString(),`)`]}):void 0]})}function V9({date:e,setDate:t,enabled:n}){let r=L(L9(`Last30`));return(0,H.jsx)(Hw,{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 fue({chartAtom:e}){let[t,n]=z(e),r=L(I9),[i,a]=(0,I.useState)(t.startType instanceof Date?t.startType:lE(bE(),r));function o(e){n(e===`CustomDate`?{start:i??new Date}:{start:e})}function s(e){a(e),n({start:e})}let c=L(L9(`StartOfToday`)),l=L(L9(`StartOfYesterday`)),u=L(L9(`StartOfWeek`)),d=L(L9(`StartOfLastWeek`)),f=L(L9(`Last30`));return(0,H.jsxs)(J,{children:[(0,H.jsx)(q,{variant:`h6`,children:`Range Start`}),(0,H.jsx)(Zx,{value:t.startType instanceof Date?`CustomDate`:t.startType,onChange:e=>{lue(e.target.value)&&o(e.target.value)},children:(0,H.jsxs)(MS,{direction:`column`,spacing:2,children:[(0,H.jsxs)(MS,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,H.jsx)(Xx,{value:`StartOfToday`}),(0,H.jsx)(B9,{label:`Start of Today`,date:c})]}),(0,H.jsxs)(MS,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,H.jsx)(Xx,{value:`StartOfYesterday`}),(0,H.jsx)(B9,{label:`Start of Yesterday`,date:l})]}),(0,H.jsxs)(MS,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,H.jsx)(Xx,{value:`StartOfWeek`}),(0,H.jsx)(B9,{label:`Start of This Week`,date:u})]}),(0,H.jsxs)(MS,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,H.jsx)(Xx,{value:`StartOfLastWeek`}),(0,H.jsx)(B9,{label:`Start of Last Week`,date:d})]}),(0,H.jsxs)(MS,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,H.jsx)(Xx,{value:`Last30`}),(0,H.jsx)(B9,{label:`Last 30 Days`,date:f})]}),(0,H.jsxs)(MS,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,H.jsx)(Xx,{value:`CustomDate`}),(0,H.jsx)(V9,{enabled:t.startType instanceof Date,date:i,setDate:s})]})]})})]})}function pue({chartAtom:e}){let[t,n]=z(e),r=L(I9),[i,a]=(0,I.useState)(t.endType instanceof Date?t.endType:lE(bE(),r));function o(e){n(e===`CustomDate`?{end:i??new Date}:{end:e})}function s(e){a(e),n({end:e})}let c=L(R9(`EndOfYesterday`)),l=L(R9(`EndOfLastWeek`));return(0,H.jsxs)(J,{children:[(0,H.jsx)(q,{variant:`h6`,children:`Range End`}),(0,H.jsx)(Zx,{value:t.endType instanceof Date?`CustomDate`:t.endType,onChange:e=>{uue(e.target.value)&&o(e.target.value)},children:(0,H.jsxs)(MS,{direction:`column`,spacing:2,children:[(0,H.jsxs)(MS,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,H.jsx)(Xx,{value:`Now`}),(0,H.jsx)(q,{children:`Now`})]}),(0,H.jsxs)(MS,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,H.jsx)(Xx,{value:`EndOfYesterday`}),(0,H.jsx)(B9,{label:`End of Yesterday`,date:c})]}),(0,H.jsx)(J,{sx:{height:`3em`}}),(0,H.jsxs)(MS,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,H.jsx)(Xx,{value:`EndOfLastWeek`}),(0,H.jsx)(B9,{label:`End of Last Week`,date:l})]}),(0,H.jsx)(J,{sx:{height:`3em`}}),(0,H.jsxs)(MS,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,H.jsx)(Xx,{value:`CustomDate`}),(0,H.jsx)(V9,{enabled:t.endType instanceof Date,date:i,setDate:s})]})]})})]})}function mue(e){let t=Math.floor(e/60),n=e%60;return`${t.toString().padStart(2,`0`)}:${n.toString().padStart(2,`0`)}`}function hue({chartAtom:e,open:t,setOpen:n}){let[r,i]=z(F9),[a,o]=z(I9);return(0,H.jsxs)(ky,{open:t,onClose:()=>n(!1),maxWidth:`md`,children:[(0,H.jsx)(jy,{children:(0,H.jsxs)(MS,{direction:`column`,spacing:2,divider:(0,H.jsx)(Py,{orientation:`horizontal`,flexItem:!0}),children:[(0,H.jsxs)(MS,{direction:`row`,spacing:2,divider:(0,H.jsx)(Py,{orientation:`vertical`,flexItem:!0}),children:[(0,H.jsx)(fue,{chartAtom:e}),(0,H.jsx)(pue,{chartAtom:e})]}),(0,H.jsxs)(MS,{direction:`row`,sx:{justifyContent:`space-around`},children:[(0,H.jsxs)(Hw,{select:!0,label:`First Day Of Week`,sx:{minWidth:`10em`},value:r,onChange:e=>{let t=due(e.target.value);t!==null&&i(t)},children:[(0,H.jsx)(wx,{value:0,children:`Sunday`}),(0,H.jsx)(wx,{value:1,children:`Monday`}),(0,H.jsx)(wx,{value:2,children:`Tuesday`}),(0,H.jsx)(wx,{value:3,children:`Wednesday`}),(0,H.jsx)(wx,{value:4,children:`Thursday`}),(0,H.jsx)(wx,{value:5,children:`Friday`}),(0,H.jsx)(wx,{value:6,children:`Saturday`})]}),(0,H.jsx)(Hw,{type:`time`,label:`Day Start Time`,sx:{minWidth:`10em`},value:mue(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,H.jsx)(Ay,{children:(0,H.jsx)(Y,{onClick:()=>n(!1),children:`Close`})})]})}function gue(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 _ue(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 vue=(0,I.memo)(function({chartAtom:e}){let t=L(e),[n,r]=(0,I.useState)(!1);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(MS,{direction:`row`,spacing:2,sx:{alignItems:`center`},children:[(0,H.jsxs)(q,{variant:`body2`,color:`textSecondary`,children:[`Range: `,gue(t.startType,t.startDate),` -`,` `,_ue(t.endType,t.endDate)]}),(0,H.jsx)(X,{title:`Edit Range`,children:(0,H.jsx)(Gm,{onClick:()=>r(!0),children:(0,H.jsx)(bT,{})})})]}),(0,H.jsx)(hue,{open:n,setOpen:r,chartAtom:e})]})}),H9=new Intl.NumberFormat(void 0,{maximumFractionDigits:1});function yue(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(WE(n===`asc`?{asc:r}:{desc:r})),i}var bue=new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`});function xue(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=>Q.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(WE(n===`asc`?{asc:r}:{desc:r})),i}function U9(e){return(0,H.jsxs)(Z,{align:e.align,sortDirection:e.sortBy===e.col&&e.order,sx:e.noWhitespaceWrap?{whiteSpace:`nowrap`}:void 0,children:[(0,H.jsx)(X,{title:`Sort`,enterDelay:300,children:(0,H.jsx)(vw,{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=(0,I.memo)(function({workorderId:e}){return!e||e===``?(0,H.jsx)(`span`,{}):(0,H.jsx)(Mie,{to:{route:$.Operations_CurrentWorkorders,workorder:e},children:e})});function Sue({material:e}){let t=R(bI),[n,r]=(0,I.useState)(`Serial`),[i,a]=(0,I.useState)(`asc`),o=(0,I.useMemo)(()=>xue(e,n,i),[e,n,i]),s={sortBy:n,setSortBy:r,order:i,setOrder:a},[c,l]=(0,I.useState)(10),[u,d]=(0,I.useState)(0),f=o.slice(u*c,(u+1)*c);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(AC,{size:`small`,children:[(0,H.jsx)($C,{children:(0,H.jsxs)(dw,{children:[(0,H.jsx)(U9,{col:`Serial`,...s,children:`Serial`}),(0,H.jsx)(U9,{col:`CompletedDate`,...s,children:`Completed`}),(0,H.jsx)(U9,{col:`Workorder`,...s,children:`Workorder`}),(0,H.jsx)(U9,{col:`Quarantined`,...s,children:`Quarantine?`}),(0,H.jsx)(U9,{col:`InspectFailed`,noWhitespaceWrap:!0,...s,children:`Inspect Failed?`}),(0,H.jsx)(U9,{col:`CloseOut`,noWhitespaceWrap:!0,...s,children:`Close Out`}),(0,H.jsx)(Z,{padding:`checkbox`})]})}),(0,H.jsxs)(LC,{children:[f.map(e=>(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{children:e.serial??``}),(0,H.jsx)(Z,{children:e.last_unload_time?bue.format(e.last_unload_time):``}),(0,H.jsx)(Z,{children:(0,H.jsx)(W9,{workorderId:e.workorderId})}),(0,H.jsx)(Z,{sx:{textAlign:`center`},padding:`checkbox`,children:e.currently_quarantined?(0,H.jsx)(HT,{fontSize:`inherit`}):``}),(0,H.jsx)(Z,{sx:{textAlign:`center`},padding:`checkbox`,children:Q.ofObject(e.completedInspections??{}).some(([,e])=>!e.success)?(0,H.jsx)(ST,{fontSize:`inherit`}):``}),(0,H.jsx)(Z,{sx:{textAlign:`center`},padding:`checkbox`,children:e.closeout_completed===void 0?``:e.closeout_failed===!1?(0,H.jsx)(lT,{fontSize:`inherit`}):(0,H.jsx)(ST,{fontSize:`inherit`})}),(0,H.jsx)(Z,{padding:`checkbox`,children:(0,H.jsx)(Gm,{onClick:()=>t({type:`MatSummary`,summary:e}),size:`large`,children:(0,H.jsx)(zT,{fontSize:`inherit`})})})]},e.materialID)),Q.ofRange(0,c-f.length).map(e=>(0,H.jsx)(dw,{children:(0,H.jsx)(Z,{colSpan:7,children:`\xA0`})},e))]})]}),(0,H.jsxs)(rw,{variant:`dense`,sx:{mb:`0.5em`},children:[(0,H.jsx)(q,{color:`textSecondary`,variant:`caption`,children:`Rows per page:`}),(0,H.jsx)(oS,{style:{marginLeft:8,marginRight:`1em`},value:c,SelectDisplayProps:{style:{color:`rgba(0, 0, 0, 0.54)`}},input:(0,H.jsx)(df,{}),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,H.jsx)(wx,{value:e,children:e},e))}),(0,H.jsx)(q,{color:`textSecondary`,variant:`caption`,children:`${e.length===0?0:u*c+1}-${Math.min(e.length,(u+1)*c)} of ${e.length}`}),(0,H.jsx)(Gm,{onClick:()=>d(0),disabled:u===0,"aria-label":`First Page`,size:`large`,children:(0,H.jsx)(ET,{})}),(0,H.jsx)(Gm,{onClick:()=>d(u-1),disabled:u===0,"aria-label":`Previous Page`,size:`large`,children:(0,H.jsx)(FT,{})}),(0,H.jsx)(Gm,{onClick:()=>d(u+1),disabled:u>=Math.ceil(e.length/c)-1,"aria-label":`Next Page`,size:`large`,children:(0,H.jsx)(IT,{})}),(0,H.jsx)(Gm,{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,H.jsx)(RT,{})})]})]})}var Cue=(0,I.memo)(function({part:e}){return(0,H.jsxs)(MS,{direction:`row`,sx:{flexWrap:`wrap`,justifyContent:`space-around`,ml:`1em`,mr:`1em`},children:[(0,H.jsx)(J,{sx:{width:`60em`,overflow:`auto`},children:(0,H.jsx)(Sue,{material:e.mats})}),(0,H.jsx)(J,{sx:{width:`40em`,overflow:`auto`},children:(0,H.jsxs)(AC,{size:`small`,children:[(0,H.jsx)($C,{children:(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{children:`Station`}),(0,H.jsx)(Z,{children:`Active Hours`}),(0,H.jsx)(Z,{children:`Elapsed Hours`}),(0,H.jsx)(Z,{children:`Total Median Hours`})]})}),(0,H.jsx)(LC,{children:e.stationMins.toAscLazySeq().map(([e,t])=>(0,H.jsxs)(dw,{children:[(0,H.jsx)(Z,{children:e}),(0,H.jsx)(Z,{children:H9.format(t.active/60)}),(0,H.jsx)(Z,{children:H9.format(t.elapsed/60)}),(0,H.jsx)(Z,{children:H9.format(t.medianElapsed/60)})]},e))})]})})]})}),wue=G(dw)({"& > *":{borderBottom:`unset !important`}}),Tue=(0,I.memo)(function({part:e}){let[t,n]=(0,I.useState)(!1);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(wue,{children:[(0,H.jsx)(Z,{children:(0,H.jsxs)(J,{sx:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(J,{sx:{mr:`0.2em`},children:(0,H.jsx)(LU,{part:e.part,size:25})}),(0,H.jsx)(`div`,{children:(0,H.jsx)(q,{variant:`body2`,component:`span`,sx:{display:`block`},children:e.part})})]})}),(0,H.jsx)(Z,{align:`right`,children:e.completedQty}),(0,H.jsx)(Z,{align:`right`,children:e.abnormalQty}),(0,H.jsx)(Z,{align:`right`,children:H9.format(e.stationMins.toAscLazySeq().filter(([e,t])=>!t.isLoadUnload).sumBy(([e,t])=>t.active)/60)}),(0,H.jsx)(Z,{align:`right`,children:H9.format(e.stationMins.toAscLazySeq().filter(([e,t])=>!t.isLoadUnload).sumBy(([,e])=>e.elapsed)/60)}),(0,H.jsx)(Z,{align:`right`,children:H9.format(e.stationMins.toAscLazySeq().filter(([e,t])=>!t.isLoadUnload).sumBy(([,e])=>e.medianElapsed)/60)}),(0,H.jsx)(Z,{align:`left`,children:e.workorders.size<=1?(0,H.jsx)(W9,{workorderId:e.workorders.lookupMin()??null}):e.workorders.size===2?(0,H.jsxs)(`span`,{children:[(0,H.jsx)(W9,{workorderId:e.workorders.lookupMin()}),` &`,` `,(0,H.jsx)(W9,{workorderId:e.workorders.lookupMax()})]}):`${e.workorders.size} workorders`}),(0,H.jsx)(Z,{children:(0,H.jsx)(X,{title:`Show Details`,children:(0,H.jsx)(Gm,{size:`small`,onClick:()=>n(!t),children:t?(0,H.jsx)(LT,{}):(0,H.jsx)(PT,{})})})})]}),(0,H.jsx)(dw,{children:(0,H.jsx)(Z,{sx:{pb:`0`,pt:`0`},colSpan:7,children:(0,H.jsx)(Rp,{in:t,timeout:`auto`,unmountOnExit:!0,children:(0,H.jsx)(Cue,{part:e})})})})]})});function Eue({partsAtom:e}){let t=L(e);return(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(Gm,{style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,onClick:()=>Pue(t),children:(0,H.jsx)(jT,{})})})}function Due(){return(0,H.jsx)(X,{title:`Total Median Hours are calculated by taking the median cycle time (excluding outliers) and adding up for each piece of material.`,children:(0,H.jsx)(`span`,{style:{verticalAlign:`middle`,marginLeft:`0.5em`,fontSize:16},children:(0,H.jsx)(OT,{fontSize:`inherit`})})})}function G9(){return(0,H.jsx)(X,{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,H.jsx)(`span`,{style:{verticalAlign:`middle`,marginLeft:`0.5em`,fontSize:16},children:(0,H.jsx)(OT,{fontSize:`inherit`})})})}function Oue(){return(0,H.jsx)(X,{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,H.jsx)(`span`,{style:{verticalAlign:`middle`,marginLeft:`0.5em`,fontSize:16},children:(0,H.jsx)(OT,{fontSize:`inherit`})})})}var kue=(0,I.memo)(function({partsAtom:e,order:t,setOrder:n,sortBy:r,setSortBy:i}){let a={sortBy:r,setSortBy:i,order:t,setOrder:n};return(0,H.jsx)($C,{children:(0,H.jsxs)(dw,{children:[(0,H.jsx)(U9,{align:`left`,col:`PartName`,...a,children:`Part`}),(0,H.jsx)(U9,{align:`right`,col:`CompletedQty`,...a,children:`Completed Quantity`}),(0,H.jsx)(U9,{align:`right`,col:`AbnormalQty`,...a,extraIcon:(0,H.jsx)(Oue,{}),children:`Abnormal Quantity`}),(0,H.jsx)(U9,{align:`right`,col:`Active`,...a,extraIcon:(0,H.jsx)(G9,{}),children:`Active Hours`}),(0,H.jsx)(U9,{align:`right`,col:`Elapsed`,...a,extraIcon:(0,H.jsx)(G9,{}),children:`Elapsed Hours`}),(0,H.jsx)(U9,{align:`right`,col:`Median`,...a,extraIcon:(0,H.jsx)(Due,{}),children:`Total Median Hours`}),(0,H.jsx)(U9,{align:`left`,col:`Workorders`,...a,children:`Workorders`}),(0,H.jsx)(Z,{children:(0,H.jsx)(Eue,{partsAtom:e})})]})})}),Aue=(0,I.memo)(function({partsAtom:e}){let t=L(e),[n,r]=(0,I.useState)(`PartName`),[i,a]=(0,I.useState)(`asc`),o=yue(t,n,i);return(0,H.jsxs)(AC,{stickyHeader:!0,children:[(0,H.jsx)(kue,{partsAtom:e,sortBy:n,setSortBy:r,order:i,setOrder:a}),(0,H.jsx)(LC,{children:o.map(e=>(0,H.jsx)(Tue,{part:e},e.part))})]})});function jue(){let e=R(D0),t=L(CI),[n,r]=PI(),i=R(bI);if(t===null||t.materialID<0)return null;function a(e){t!==null&&(n({mat:t,operator:`Manager`,failed:e}),i(null))}return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Y,{color:`primary`,disabled:r,onClick:()=>a(!0),children:`Fail CloseOut`}),(0,H.jsx)(Y,{color:`primary`,disabled:r,onClick:()=>a(!1),children:`Pass CloseOut`}),(0,H.jsx)(Y,{color:`primary`,onClick:()=>e(!0),children:`Change Workorder`})]})}var Mue=(0,I.memo)(function(){return(0,H.jsx)(dW,{buttons:(0,H.jsx)(jue,{})})});function Nue(){return GI(`Completed Parts`),(0,H.jsxs)(J,{component:`main`,sx:{padding:`24px`},children:[(0,H.jsxs)(MS,{direction:`row`,spacing:2,sx:{alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{children:`Completed Parts`}),(0,H.jsx)(vue,{chartAtom:z9})]}),(0,H.jsx)(Aue,{partsAtom:cue}),(0,H.jsx)(Mue,{}),(0,H.jsx)(M0,{})]})}function Pue(e){let t=`<table>
|
|
384
|
+
<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>
|
|
385
|
+
<tbody>
|
|
386
|
+
`;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>
|
|
387
|
+
`}t+=`</tbody></table>
|
|
388
|
+
`,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,H.jsx)(nT,{})},{name:`L/U Hours`,route:{route:$.Operations_LoadHours},icon:(0,H.jsx)(AT,{})},{name:`L/U Cycles`,route:{route:$.Operations_LoadCycles},icon:(0,H.jsx)(qT,{})},{separator:`Machines`},{name:`MC Outliers`,route:{route:$.Operations_MachineOutliers},icon:(0,H.jsx)(nT,{})},{name:`MC Hours`,route:{route:$.Operations_MachineHours},icon:(0,H.jsx)(AT,{})},{name:`MC Cycles`,route:{route:$.Operations_MachineCycles},icon:(0,H.jsx)(qT,{})},{name:`Tools`,route:{route:$.Operations_Tools},icon:(0,H.jsx)(_T,{})},{name:`Programs`,route:{route:$.Operations_Programs},icon:(0,H.jsx)(sre,{})},{separator:`Material`},{name:`Quality`,route:{route:$.Operations_Quality},icon:(0,H.jsx)(rT,{})},{name:`Inspections`,route:{route:$.Operations_Inspections},icon:(0,H.jsx)($w,{})},{name:`Close Out`,route:{route:$.Operations_CloseoutReport},icon:(0,H.jsx)(BT,{})},{separator:`Cell`},{name:`Schedules`,route:{route:$.Operations_RecentSchedules},icon:(0,H.jsx)(iT,{})},{name:`Workorders`,route:{route:$.Operations_CurrentWorkorders},icon:(0,H.jsx)(wT,{})},{name:`Production`,route:{route:$.Operations_Production},icon:(0,H.jsx)(uT,{})},{name:`Part Summary`,route:{route:$.Operations_Parts},icon:(0,H.jsx)(dre,{})},{name:e=>e.supportsRebookings??`Rebooking`,route:{route:$.Operations_Rebookings},icon:(0,H.jsx)(cre,{}),hidden:e=>e.supportsRebookings===null||e.supportsRebookings===``}];function Fue(e){return[{separator:`Efficiency`},{name:`Buffers`,route:{route:$.Analysis_Buffers},icon:(0,H.jsx)(vT,{})},{name:`Station OEE`,route:{route:$.Analysis_StationOEE},icon:(0,H.jsx)(AT,{})},{name:`Completed Parts`,route:{route:$.Analysis_PartsCompleted},icon:(0,H.jsx)(wT,{})},{separator:`Cycles`},{name:`Machine Cycles`,route:{route:$.Analysis_MachineCycles},icon:(0,H.jsx)(qT,{})},{name:`L/U Cycles`,route:{route:$.Analysis_LoadCycles},icon:(0,H.jsx)(Zw,{})},{name:`Pallet Cycles`,route:{route:$.Analysis_PalletCycles},icon:(0,H.jsx)(WT,{})},{name:e=>Dk(e.basketName)+` Cycles`,route:{route:$.Analysis_BasketCycles},icon:(0,H.jsx)(WT,{}),hidden:()=>!e},{separator:`Cell`},{name:`Quality`,route:{route:$.Analysis_Quality},icon:(0,H.jsx)(rT,{})},{name:`Tool Replacements`,route:{route:$.Analysis_ToolReplacements},icon:(0,H.jsx)(_T,{})},{name:`Schedules`,route:{route:$.Analysis_Schedules},icon:(0,H.jsx)(iT,{})},{separator:`Costs`},{name:`Percentages`,route:{route:$.Analysis_CostPercents},icon:(0,H.jsx)(sT,{})},{name:`Cost/Piece`,route:{route:$.Analysis_CostPerPiece},icon:(0,H.jsx)(tT,{})}]}function Iue(e){return typeof e==`string`&&Object.values($).includes(e)}function Lue(e){return Iue(e)&&e!==$.Client_Custom&&e!==$.Operations_CurrentWorkorders&&e!==$.Station_InspectionMonitorWithType&&e!==$.Station_LoadMonitor&&e!==$.Station_Queues}function Rue(e){return{route:e}}function J9({children:e}){let[t,n]=z(UI),r=Yw(Dd().breakpoints.down(`md`)),[,i]=(0,I.useTransition)(),a=q9.some(e=>`separator`in e?!1:e.route.route===t.route);return(0,H.jsx)(Lw,{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}):Lue(t)&&n(Rue(t))}),textColor:`inherit`,scrollButtons:!0,allowScrollButtonsMobile:!0,indicatorColor:`secondary`,children:e})}function Y9(){return(0,H.jsxs)(J9,{children:[(0,H.jsx)(wC,{label:`Operations`,value:$.Operations_Dashboard}),(0,H.jsx)(wC,{label:`Cell`,value:$.Operations_SystemOverview}),(0,H.jsx)(wC,{label:`Material`,value:$.Operations_AllMaterial}),(0,H.jsx)(wC,{label:`Reports`,value:K9})]})}function X9(){return(0,H.jsxs)(J9,{children:[(0,H.jsx)(wC,{label:`Material`,value:$.Quality_Dashboard}),(0,H.jsx)(wC,{label:`Paths`,value:$.Quality_Paths}),(0,H.jsx)(wC,{label:`Quarantine Material`,value:$.Quality_Quarantine})]})}function Z9(){return(0,H.jsxs)(J9,{children:[(0,H.jsx)(wC,{label:`Tools`,value:$.Tools_Dashboard}),(0,H.jsx)(wC,{label:`Programs`,value:$.Tools_Programs})]})}function Q9(){return(0,H.jsxs)(J9,{children:[(0,H.jsx)(wC,{label:`Cycles`,value:$.Engineering_Cycles}),(0,H.jsx)(wC,{label:`Hours`,value:$.Engineering_Hours}),(0,H.jsx)(wC,{label:`Outliers`,value:$.Engineering_Outliers})]})}function $9(){return L(mR)===null?null:(0,H.jsxs)(J9,{children:[(0,H.jsx)(wC,{label:`Workorders`,value:$.Sales_Dashboard}),(0,H.jsx)(wC,{label:`Projections`,value:$.Sales_ProjectedUsage})]})}var zue=(0,I.memo)(function(e){Nie();let t=L(yr),n=L(YL),r=L(QL),[i,a]=z(UI),o=Fue(n||r),s=t.user!==null&&t.user!==void 0,c,l,u,d,f=!0,p=!0,m=!1,h=!0;if(_r(t)&&!t.user)c=(0,H.jsxs)(`div`,{style:{textAlign:`center`,marginTop:`4em`},children:[(0,H.jsx)(`h3`,{children:`Please Login`}),(0,H.jsx)(Y,{variant:`contained`,color:`primary`,onClick:()=>br(t),children:`Login`})]}),f=!1,p=!1;else switch(i.route){case $.Station_LoadMonitor:c=(0,H.jsx)(X2,{loadNum:i.loadNum,queues:i.queues,completed:i.completed,submitBasketLoadStationCommand:e.submitBasketLoadStationCommand}),l=D3,u=O3,m=!0,h=!1;break;case $.Station_InspectionMonitor:c=(0,H.jsx)(i4,{focusInspectionType:null}),l=D3,u=O3,m=!0,h=!1;break;case $.Station_InspectionMonitorWithType:c=(0,H.jsx)(i4,{focusInspectionType:i.inspType}),l=D3,u=O3,m=!0,h=!1;break;case $.Station_Closeout:c=(0,H.jsx)(d4,{}),l=D3,u=O3,m=!0,h=!1;break;case $.Station_Queues:c=(0,H.jsx)(dX,{queues:i.queues}),l=D3,u=O3,m=!0,h=!1;break;case $.Station_Overview:c=(0,H.jsx)(v2,{}),h=!1;break;case $.Analysis_Quality:c=(0,H.jsx)(b3,{}),l=v7,d=o,f=!1;break;case $.Analysis_ToolReplacements:c=(0,H.jsx)(ile,{}),l=v7,d=o,f=!1;break;case $.Analysis_Schedules:c=(0,H.jsx)(y3,{}),l=v7,d=o,f=!1;break;case $.Analysis_Buffers:c=(0,H.jsx)(Zse,{}),l=v7,d=o,f=!1;break;case $.Analysis_StationOEE:c=(0,H.jsx)(pce,{}),l=v7,d=o,f=!1;break;case $.Analysis_PartsCompleted:c=(0,H.jsx)(_ce,{}),l=v7,d=o,f=!1;break;case $.Analysis_MachineCycles:c=(0,H.jsx)(Dce,{}),l=v7,d=o,f=!1;break;case $.Analysis_LoadCycles:c=(0,H.jsx)(Ice,{}),l=v7,d=o,f=!1;break;case $.Analysis_PalletCycles:c=(0,H.jsx)(Hce,{}),l=v7,d=o,f=!1;break;case $.Analysis_BasketCycles:c=(0,H.jsx)(Jce,{}),l=v7,d=o,f=!1;break;case $.Analysis_CostPercents:c=(0,H.jsx)(TW,{}),l=v7,d=o,f=!1;break;case $.Analysis_CostPerPiece:c=(0,H.jsx)(DW,{}),l=v7,d=o,f=!1;break;case $.Operations_Dashboard:c=(0,H.jsx)(Rie,{}),l=Y9;break;case $.Operations_SystemOverview:c=(0,H.jsx)(v2,{ignoreOperator:!0}),l=Y9,h=!1;break;case $.Operations_AllMaterial:c=(0,H.jsx)(KX,{displaySystemBins:!0}),l=Y9,h=!1;break;case $.Operations_LoadOutliers:c=(0,H.jsx)(s6,{outlierTy:`labor`}),l=Y9,d=q9;break;case $.Operations_LoadHours:c=(0,H.jsx)(T6,{ty:`labor`}),l=Y9,d=q9;break;case $.Operations_LoadCycles:c=(0,H.jsx)(_7,{ty:`labor`}),l=Y9,d=q9;break;case $.Operations_MachineOutliers:c=(0,H.jsx)(s6,{outlierTy:`machine`}),l=Y9,d=q9;break;case $.Operations_MachineHours:c=(0,H.jsx)(T6,{ty:`machine`}),l=Y9,d=q9;break;case $.Operations_MachineCycles:c=(0,H.jsx)(_7,{ty:`machine`}),l=Y9,d=q9;break;case $.Operations_RecentSchedules:c=(0,H.jsx)(yX,{}),l=Y9,d=q9;break;case $.Operations_CurrentWorkorders:c=(0,H.jsx)(D9,{}),l=Y9,d=q9,h=!1;break;case $.Operations_Production:c=(0,H.jsx)(X3,{}),l=Y9,d=q9;break;case $.Operations_Quality:c=(0,H.jsx)(T0,{}),l=Y9,d=q9,h=!1;break;case $.Operations_Inspections:c=(0,H.jsx)(E0,{}),l=Y9,d=q9;break;case $.Operations_CloseoutReport:c=(0,H.jsx)($le,{}),l=Y9,d=q9,h=!1;break;case $.Operations_Tools:c=(0,H.jsx)(q4,{}),l=Y9,d=q9;break;case $.Operations_Programs:c=(0,H.jsx)(a3,{}),l=Y9,d=q9;break;case $.Operations_Rebookings:c=(0,H.jsx)(aue,{}),l=Y9,d=q9;break;case $.Operations_Parts:c=(0,H.jsx)(Nue,{}),l=Y9,d=q9,h=!1;break;case $.Engineering_Cycles:c=(0,H.jsx)(_7,{ty:`machine`}),f=!1,l=Q9;break;case $.Engineering_Hours:c=(0,H.jsx)(T6,{ty:`machine`}),f=!1,l=Q9;break;case $.Engineering_Outliers:c=(0,H.jsx)(s6,{outlierTy:`machine`}),f=!1,l=Q9;break;case $.Quality_Dashboard:c=(0,H.jsx)(T0,{}),l=X9,f=!1,h=!1;break;case $.Quality_Paths:c=(0,H.jsx)(E0,{}),l=X9,f=!1;break;case $.Quality_Quarantine:c=(0,H.jsx)(KX,{displaySystemBins:!1}),l=X9,f=!1,h=!1;break;case $.Tools_Dashboard:c=(0,H.jsx)(q4,{}),l=Z9;break;case $.Tools_Programs:c=(0,H.jsx)(a3,{}),l=Z9;break;case $.Sales_Dashboard:c=(0,H.jsx)(D9,{disableSearch:!0}),l=$9,f=!1;break;case $.Sales_ProjectedUsage:c=(0,H.jsx)(Hle,{}),l=$9,f=!1;break;case $.VerboseLogging:c=(0,H.jsx)(Z3,{}),p=!1,f=!1;break;case $.Client_Custom:{let n=e.renderCustomPage?.(i.custom);l=n?.nav,c=n?.page??(0,H.jsx)(kW,{setRoute:a,modes:e.chooseModes?.(t)}),f=!1;break}case $.ChooseMode:default:c=(0,H.jsx)(kW,{setRoute:a,modes:e.chooseModes?.(t)}),p=!1,f=!1}return(0,H.jsxs)(`div`,{id:`App`,children:[(0,H.jsx)(rae,{showAlarms:f,showSearch:p,showLogout:s,showOperator:m,Nav1:l,Nav2:u,menuNavs:d}),(0,H.jsxs)(`div`,{style:{display:`flex`},children:[(0,H.jsx)(iae,{menuItems:d}),(0,H.jsx)(`div`,{style:{flexGrow:1},children:c})]}),h?(0,H.jsx)(dW,{}):void 0,(0,H.jsx)(h3,{}),(0,H.jsx)(Dq,{})]})});function Bue(e,t,n){let r=ad({palette:{primary:Nr,secondary:Fr}});(0,Xw.createRoot)(t).render((0,H.jsxs)(Hf,{theme:r,children:[(0,H.jsx)(ny,{}),(0,H.jsx)(I.StrictMode,{children:(0,H.jsx)(ve,{store:n,children:(0,H.jsx)(zue,{...e})})})]}))}async function Vue(e={},t){let n=t??document.getElementById(`root`);if(!n)throw Error(`Unable to start FMS Insight: no root element was provided or found`);Jt();let r=F();r.set(yr,await vr()),Bue(e,n,r),`serviceWorker`in navigator&&navigator.serviceWorker.getRegistrations().then(e=>{for(let t of e)t.unregister()})}async function Hue(){await Vue({})}Hue().catch(e=>{console.log(e);let t=`Error loading Insight`;e instanceof zt&&(t=`Error loading Insight: `+e.message+` `+e.response);let n=document.createElement(`p`);n.textContent=t,(document.getElementById(`loading`)??document.body).appendChild(n)});
|