function CN(e,t){for(var n=0;nr[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();var os=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Me(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var uw={exports:{}},kf={};/** * @license React * react-jsx-runtime.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var $N=Symbol.for("react.transitional.element"),PN=Symbol.for("react.fragment");function sw(e,t,n){var r=null;if(n!==void 0&&(r=""+n),t.key!==void 0&&(r=""+t.key),"key"in t){n={};for(var a in t)a!=="key"&&(n[a]=t[a])}else n=t;return t=n.ref,{$$typeof:$N,type:e,key:r,ref:t!==void 0?t:null,props:n}}kf.Fragment=PN;kf.jsx=sw;kf.jsxs=sw;uw.exports=kf;var p=uw.exports,cw={exports:{}},ne={};/** * @license React * react.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Zm=Symbol.for("react.transitional.element"),DN=Symbol.for("react.portal"),RN=Symbol.for("react.fragment"),zN=Symbol.for("react.strict_mode"),BN=Symbol.for("react.profiler"),LN=Symbol.for("react.consumer"),kN=Symbol.for("react.context"),UN=Symbol.for("react.forward_ref"),IN=Symbol.for("react.suspense"),HN=Symbol.for("react.memo"),fw=Symbol.for("react.lazy"),qN=Symbol.for("react.activity"),xg=Symbol.iterator;function GN(e){return e===null||typeof e!="object"?null:(e=xg&&e[xg]||e["@@iterator"],typeof e=="function"?e:null)}var dw={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},hw=Object.assign,pw={};function Al(e,t,n){this.props=e,this.context=t,this.refs=pw,this.updater=n||dw}Al.prototype.isReactComponent={};Al.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")};Al.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function yw(){}yw.prototype=Al.prototype;function Jm(e,t,n){this.props=e,this.context=t,this.refs=pw,this.updater=n||dw}var ev=Jm.prototype=new yw;ev.constructor=Jm;hw(ev,Al.prototype);ev.isPureReactComponent=!0;var Sg=Array.isArray;function _p(){}var Ue={H:null,A:null,T:null,S:null},mw=Object.prototype.hasOwnProperty;function tv(e,t,n){var r=n.ref;return{$$typeof:Zm,type:e,key:t,ref:r!==void 0?r:null,props:n}}function YN(e,t){return tv(e.type,t,e.props)}function nv(e){return typeof e=="object"&&e!==null&&e.$$typeof===Zm}function XN(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Og=/\/+/g;function ah(e,t){return typeof e=="object"&&e!==null&&e.key!=null?XN(""+e.key):t.toString(36)}function VN(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(_p,_p):(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 pi(e,t,n,r,a){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(i){case"bigint":case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case Zm:case DN:l=!0;break;case fw:return l=e._init,pi(l(e._payload),t,n,r,a)}}if(l)return a=a(e),l=r===""?"."+ah(e,0):r,Sg(a)?(n="",l!=null&&(n=l.replace(Og,"$&/")+"/"),pi(a,t,n,"",function(s){return s})):a!=null&&(nv(a)&&(a=YN(a,n+(a.key==null||e&&e.key===a.key?"":(""+a.key).replace(Og,"$&/")+"/")+l)),t.push(a)),1;l=0;var o=r===""?".":r+":";if(Sg(e))for(var u=0;u>>1,q=N[U];if(0>>1;Ua(W,D))oea(_e,W)?(N[U]=_e,N[oe]=D,U=oe):(N[U]=W,N[G]=D,U=G);else if(oea(_e,D))N[U]=_e,N[oe]=D,U=oe;else break e}}return R}function a(N,R){var D=N.sortIndex-R.sortIndex;return D!==0?D:N.id-R.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,o=l.now();e.unstable_now=function(){return l.now()-o}}var u=[],s=[],f=1,c=null,d=3,h=!1,x=!1,g=!1,v=!1,y=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;function O(N){for(var R=n(s);R!==null;){if(R.callback===null)r(s);else if(R.startTime<=N)r(s),R.sortIndex=R.expirationTime,t(u,R);else break;R=n(s)}}function S(N){if(g=!1,O(N),!x)if(n(u)!==null)x=!0,w||(w=!0,M());else{var R=n(s);R!==null&&B(S,R.startTime-N)}}var w=!1,A=-1,E=5,j=-1;function $(){return v?!0:!(e.unstable_now()-jN&&$());){var U=c.callback;if(typeof U=="function"){c.callback=null,d=c.priorityLevel;var q=U(c.expirationTime<=N);if(N=e.unstable_now(),typeof q=="function"){c.callback=q,O(N),R=!0;break t}c===n(u)&&r(u),O(N)}else r(u);c=n(u)}if(c!==null)R=!0;else{var X=n(s);X!==null&&B(S,X.startTime-N),R=!1}}break e}finally{c=null,d=D,h=!1}R=void 0}}finally{R?M():w=!1}}}var M;if(typeof b=="function")M=function(){b(P)};else if(typeof MessageChannel<"u"){var k=new MessageChannel,z=k.port2;k.port1.onmessage=P,M=function(){z.postMessage(null)}}else M=function(){y(P,0)};function B(N,R){A=y(function(){N(e.unstable_now())},R)}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(N){N.callback=null},e.unstable_forceFrameRate=function(N){0>N||125U?(N.sortIndex=D,t(s,N),n(u)===null&&N===n(s)&&(g?(m(A),A=-1):g=!0,B(S,D-U))):(N.sortIndex=q,t(u,N),x||h||(x=!0,w||(w=!0,M()))),N},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(N){var R=d;return function(){var D=d;d=R;try{return N.apply(this,arguments)}finally{d=D}}}})(bw);gw.exports=bw;var WN=gw.exports,xw={exports:{}},Rt={};/** * @license React * react-dom.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var ZN=_;function Sw(e){var t="https://react.dev/errors/"+e;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ow)}catch(e){console.error(e)}}Ow(),xw.exports=Rt;var tM=xw.exports;/** * @license React * react-dom-client.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var st=WN,ww=_,nM=tM;function I(e){var t="https://react.dev/errors/"+e;if(1gi||(e.current=Cp[gi],Cp[gi]=null,gi--)}function De(e,t){gi++,Cp[gi]=e.current,e.current=t}var In=Xn(null),Lo=Xn(null),Yr=Xn(null),ac=Xn(null);function ic(e,t){switch(De(Yr,t),De(Lo,e),De(In,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Cb(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Cb(t),e=F2(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}mt(In),De(In,e)}function qi(){mt(In),mt(Lo),mt(Yr)}function $p(e){e.memoizedState!==null&&De(ac,e);var t=In.current,n=F2(t,e.type);t!==n&&(De(Lo,e),De(In,n))}function lc(e){Lo.current===e&&(mt(In),mt(Lo)),ac.current===e&&(mt(ac),Fo._currentValue=Ma)}var ih,Eg;function ga(e){if(ih===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ih=t&&t[1]||"",Eg=-1)":-1a||u[r]!==s[a]){var f=` `+u[r].replace(" at new "," at ");return e.displayName&&f.includes("")&&(f=f.replace("",e.displayName)),f}while(1<=r&&0<=a);break}}}finally{lh=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?ga(n):""}function oM(e,t){switch(e.tag){case 26:case 27:case 5:return ga(e.type);case 16:return ga("Lazy");case 13:return e.child!==t&&t!==null?ga("Suspense Fallback"):ga("Suspense");case 19:return ga("SuspenseList");case 0:case 15:return oh(e.type,!1);case 11:return oh(e.type.render,!1);case 1:return oh(e.type,!0);case 31:return ga("Activity");default:return""}}function jg(e){try{var t="",n=null;do t+=oM(e,n),n=e,e=e.return;while(e);return t}catch(r){return` Error generating stack: `+r.message+` `+r.stack}}var Pp=Object.prototype.hasOwnProperty,iv=st.unstable_scheduleCallback,uh=st.unstable_cancelCallback,uM=st.unstable_shouldYield,sM=st.unstable_requestPaint,tn=st.unstable_now,cM=st.unstable_getCurrentPriorityLevel,Mw=st.unstable_ImmediatePriority,Cw=st.unstable_UserBlockingPriority,oc=st.unstable_NormalPriority,fM=st.unstable_LowPriority,$w=st.unstable_IdlePriority,dM=st.log,hM=st.unstable_setDisableYieldValue,Lu=null,nn=null;function Lr(e){if(typeof dM=="function"&&hM(e),nn&&typeof nn.setStrictMode=="function")try{nn.setStrictMode(Lu,e)}catch{}}var rn=Math.clz32?Math.clz32:mM,pM=Math.log,yM=Math.LN2;function mM(e){return e>>>=0,e===0?32:31-(pM(e)/yM|0)|0}var cs=256,fs=262144,ds=4194304;function ba(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 Hf(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var a=0,i=e.suspendedLanes,l=e.pingedLanes;e=e.warmLanes;var o=r&134217727;return o!==0?(r=o&~i,r!==0?a=ba(r):(l&=o,l!==0?a=ba(l):n||(n=o&~e,n!==0&&(a=ba(n))))):(o=r&~i,o!==0?a=ba(o):l!==0?a=ba(l):n||(n=r&~e,n!==0&&(a=ba(n)))),a===0?0:t!==0&&t!==a&&!(t&i)&&(i=a&-a,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:a}function ku(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function vM(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 Pw(){var e=ds;return ds<<=1,!(ds&62914560)&&(ds=4194304),e}function sh(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Uu(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function gM(e,t,n,r,a,i){var l=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 o=e.entanglements,u=e.expirationTimes,s=e.hiddenUpdates;for(n=l&~n;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var AM=/[\n"\\]/g;function yn(e){return e.replace(AM,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function zp(e,t,n,r,a,i,l,o){e.name="",l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.type=l:e.removeAttribute("type"),t!=null?l==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+dn(t)):e.value!==""+dn(t)&&(e.value=""+dn(t)):l!=="submit"&&l!=="reset"||e.removeAttribute("value"),t!=null?Bp(e,l,dn(t)):n!=null?Bp(e,l,dn(n)):r!=null&&e.removeAttribute("value"),a==null&&i!=null&&(e.defaultChecked=!!i),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.name=""+dn(o):e.removeAttribute("name")}function Hw(e,t,n,r,a,i,l,o){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Rp(e);return}n=n!=null?""+dn(n):"",t=t!=null?""+dn(t):n,o||t===e.value||(e.value=t),e.defaultValue=t}r=r??a,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=o?e.checked:!!r,e.defaultChecked=!!r,l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"&&(e.name=l),Rp(e)}function Bp(e,t,n){t==="number"&&uc(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Pi(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),kp=!1;if(mr)try{var Ql={};Object.defineProperty(Ql,"passive",{get:function(){kp=!0}}),window.addEventListener("test",Ql,Ql),window.removeEventListener("test",Ql,Ql)}catch{kp=!1}var kr=null,fv=null,Hs=null;function Vw(){if(Hs)return Hs;var e,t=fv,n=t.length,r,a="value"in kr?kr.value:kr.textContent,i=a.length;for(e=0;e=So),Lg=" ",kg=!1;function Fw(e,t){switch(e){case"keyup":return ZM.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Si=!1;function eC(e,t){switch(e){case"compositionend":return Qw(t);case"keypress":return t.which!==32?null:(kg=!0,Lg);case"textInput":return e=t.data,e===Lg&&kg?null:e;default:return null}}function tC(e,t){if(Si)return e==="compositionend"||!hv&&Fw(e,t)?(e=Vw(),Hs=fv=kr=null,Si=!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)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Gg(n)}}function eA(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?eA(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function tA(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=uc(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=uc(e.document)}return t}function pv(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 sC=mr&&"documentMode"in document&&11>=document.documentMode,Oi=null,Up=null,wo=null,Ip=!1;function Xg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ip||Oi==null||Oi!==uc(r)||(r=Oi,"selectionStart"in r&&pv(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}),wo&&Io(wo,r)||(wo=r,r=Ec(Up,"onSelect"),0>=l,a-=l,Bn=1<<32-rn(t)+a|n<E?(j=A,A=null):j=A.sibling;var $=d(y,A,b[E],O);if($===null){A===null&&(A=j);break}e&&A&&$.alternate===null&&t(y,A),m=i($,m,E),w===null?S=$:w.sibling=$,w=$,A=j}if(E===b.length)return n(y,A),he&&nr(y,E),S;if(A===null){for(;EE?(j=A,A=null):j=A.sibling;var P=d(y,A,$.value,O);if(P===null){A===null&&(A=j);break}e&&A&&P.alternate===null&&t(y,A),m=i(P,m,E),w===null?S=P:w.sibling=P,w=P,A=j}if($.done)return n(y,A),he&&nr(y,E),S;if(A===null){for(;!$.done;E++,$=b.next())$=c(y,$.value,O),$!==null&&(m=i($,m,E),w===null?S=$:w.sibling=$,w=$);return he&&nr(y,E),S}for(A=r(A);!$.done;E++,$=b.next())$=h(A,y,E,$.value,O),$!==null&&(e&&$.alternate!==null&&A.delete($.key===null?E:$.key),m=i($,m,E),w===null?S=$:w.sibling=$,w=$);return e&&A.forEach(function(M){return t(y,M)}),he&&nr(y,E),S}function v(y,m,b,O){if(typeof b=="object"&&b!==null&&b.type===vi&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case ss:e:{for(var S=b.key;m!==null;){if(m.key===S){if(S=b.type,S===vi){if(m.tag===7){n(y,m.sibling),O=a(m,b.props.children),O.return=y,y=O;break e}}else if(m.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Mr&&xa(S)===m.type){n(y,m.sibling),O=a(m,b.props),Zl(O,b),O.return=y,y=O;break e}n(y,m);break}else t(y,m);m=m.sibling}b.type===vi?(O=Ca(b.props.children,y.mode,O,b.key),O.return=y,y=O):(O=Gs(b.type,b.key,b.props,null,y.mode,O),Zl(O,b),O.return=y,y=O)}return l(y);case po:e:{for(S=b.key;m!==null;){if(m.key===S)if(m.tag===4&&m.stateNode.containerInfo===b.containerInfo&&m.stateNode.implementation===b.implementation){n(y,m.sibling),O=a(m,b.children||[]),O.return=y,y=O;break e}else{n(y,m);break}else t(y,m);m=m.sibling}O=gh(b,y.mode,O),O.return=y,y=O}return l(y);case Mr:return b=xa(b),v(y,m,b,O)}if(yo(b))return x(y,m,b,O);if(Fl(b)){if(S=Fl(b),typeof S!="function")throw Error(I(150));return b=S.call(b),g(y,m,b,O)}if(typeof b.then=="function")return v(y,m,ms(b),O);if(b.$$typeof===ar)return v(y,m,ys(y,b),O);vs(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint"?(b=""+b,m!==null&&m.tag===6?(n(y,m.sibling),O=a(m,b),O.return=y,y=O):(n(y,m),O=vh(b,y.mode,O),O.return=y,y=O),l(y)):n(y,m)}return function(y,m,b,O){try{Go=0;var S=v(y,m,b,O);return zi=null,S}catch(A){if(A===Tl||A===Kf)throw A;var w=Zt(29,A,null,y.mode);return w.lanes=O,w.return=y,w}finally{}}}var Ia=mA(!0),vA=mA(!1),Cr=!1;function wv(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Kp(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 Vr(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Kr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,me&2){var a=r.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),r.pending=t,t=cc(e),uA(e,null,n),t}return Vf(e,r,t,n),cc(e)}function _o(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Rw(e,n)}}function xh(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var a=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var l={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?a=i=l:i=i.next=l,n=n.next}while(n!==null);i===null?a=i=t:i=i.next=t}else a=i=t;n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:i,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 Fp=!1;function Eo(){if(Fp){var e=Ri;if(e!==null)throw e}}function jo(e,t,n,r){Fp=!1;var a=e.updateQueue;Cr=!1;var i=a.firstBaseUpdate,l=a.lastBaseUpdate,o=a.shared.pending;if(o!==null){a.shared.pending=null;var u=o,s=u.next;u.next=null,l===null?i=s:l.next=s,l=u;var f=e.alternate;f!==null&&(f=f.updateQueue,o=f.lastBaseUpdate,o!==l&&(o===null?f.firstBaseUpdate=s:o.next=s,f.lastBaseUpdate=u))}if(i!==null){var c=a.baseState;l=0,f=s=u=null,o=i;do{var d=o.lane&-536870913,h=d!==o.lane;if(h?(de&d)===d:(r&d)===d){d!==0&&d===Xi&&(Fp=!0),f!==null&&(f=f.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var x=e,g=o;d=t;var v=n;switch(g.tag){case 1:if(x=g.payload,typeof x=="function"){c=x.call(v,c,d);break e}c=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=g.payload,d=typeof x=="function"?x.call(v,c,d):x,d==null)break e;c=Ie({},c,d);break e;case 2:Cr=!0}}d=o.callback,d!==null&&(e.flags|=64,h&&(e.flags|=8192),h=a.callbacks,h===null?a.callbacks=[d]:h.push(d))}else h={lane:d,tag:o.tag,payload:o.payload,callback:o.callback,next:null},f===null?(s=f=h,u=c):f=f.next=h,l|=d;if(o=o.next,o===null){if(o=a.shared.pending,o===null)break;h=o,o=h.next,h.next=null,a.lastBaseUpdate=h,a.shared.pending=null}}while(!0);f===null&&(u=c),a.baseState=u,a.firstBaseUpdate=s,a.lastBaseUpdate=f,i===null&&(a.shared.lanes=0),ia|=l,e.lanes=l,e.memoizedState=c}}function gA(e,t){if(typeof e!="function")throw Error(I(191,e));e.call(t)}function bA(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ei?i:8;var l=J.T,o={};J.T=o,zv(e,!1,t,n);try{var u=a(),s=J.S;if(s!==null&&s(o,u),u!==null&&typeof u=="object"&&typeof u.then=="function"){var f=gC(u,r);To(e,t,f,an(e))}else To(e,t,r,an(e))}catch(c){To(e,t,{then:function(){},status:"rejected",reason:c},an())}finally{be.p=i,l!==null&&o.types!==null&&(l.types=o.types),J.T=l}}function AC(){}function ey(e,t,n,r){if(e.tag!==5)throw Error(I(476));var a=GA(e).queue;qA(e,a,t,Ma,n===null?AC:function(){return YA(e),n(r)})}function GA(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Ma,baseState:Ma,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gr,lastRenderedState:Ma},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gr,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function YA(e){var t=GA(e);t.next===null&&(t=e.alternate.memoizedState),To(e,t.next.queue,{},an())}function Rv(){return At(Fo)}function XA(){return Qe().memoizedState}function VA(){return Qe().memoizedState}function _C(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=an();e=Vr(n);var r=Kr(t,e,n);r!==null&&(Ht(r,t,n),_o(r,t,n)),t={cache:xv()},e.payload=t;return}t=t.return}}function EC(e,t,n){var r=an();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Zf(e)?FA(t,n):(n=mv(e,t,n,r),n!==null&&(Ht(n,e,r),QA(n,t,r)))}function KA(e,t,n){var r=an();To(e,t,n,r)}function To(e,t,n,r){var a={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Zf(e))FA(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,o=i(l,n);if(a.hasEagerState=!0,a.eagerState=o,ln(o,l))return Vf(e,t,a,0),$e===null&&Xf(),!1}catch{}finally{}if(n=mv(e,t,a,r),n!==null)return Ht(n,e,r),QA(n,t,r),!0}return!1}function zv(e,t,n,r){if(r={lane:2,revertLane:Yv(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Zf(e)){if(t)throw Error(I(479))}else t=mv(e,n,r,2),t!==null&&Ht(t,e,2)}function Zf(e){var t=e.alternate;return e===ie||t!==null&&t===ie}function FA(e,t){Bi=mc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function QA(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Rw(e,n)}}var Xo={readContext:At,use:Qf,useCallback:Xe,useContext:Xe,useEffect:Xe,useImperativeHandle:Xe,useLayoutEffect:Xe,useInsertionEffect:Xe,useMemo:Xe,useReducer:Xe,useRef:Xe,useState:Xe,useDebugValue:Xe,useDeferredValue:Xe,useTransition:Xe,useSyncExternalStore:Xe,useId:Xe,useHostTransitionStatus:Xe,useFormState:Xe,useActionState:Xe,useOptimistic:Xe,useMemoCache:Xe,useCacheRefresh:Xe};Xo.useEffectEvent=Xe;var WA={readContext:At,use:Qf,useCallback:function(e,t){return $t().memoizedState=[e,t===void 0?null:t],e},useContext:At,useEffect:ob,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Vs(4194308,4,LA.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Vs(4194308,4,e,t)},useInsertionEffect:function(e,t){Vs(4,2,e,t)},useMemo:function(e,t){var n=$t();t=t===void 0?null:t;var r=e();if(Ha){Lr(!0);try{e()}finally{Lr(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=$t();if(n!==void 0){var a=n(t);if(Ha){Lr(!0);try{n(t)}finally{Lr(!1)}}}else a=t;return r.memoizedState=r.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},r.queue=e,e=e.dispatch=EC.bind(null,ie,e),[r.memoizedState,e]},useRef:function(e){var t=$t();return e={current:e},t.memoizedState=e},useState:function(e){e=Zp(e);var t=e.queue,n=KA.bind(null,ie,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Pv,useDeferredValue:function(e,t){var n=$t();return Dv(n,e,t)},useTransition:function(){var e=Zp(!1);return e=qA.bind(null,ie,e.queue,!0,!1),$t().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=ie,a=$t();if(he){if(n===void 0)throw Error(I(407));n=n()}else{if(n=t(),$e===null)throw Error(I(349));de&127||AA(r,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,ob(EA.bind(null,r,i,e),[e]),r.flags|=2048,Ki(9,{destroy:void 0},_A.bind(null,r,i,n,t),null),n},useId:function(){var e=$t(),t=$e.identifierPrefix;if(he){var n=Ln,r=Bn;n=(r&~(1<<32-rn(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=vc++,0<\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof r.is=="string"?l.createElement("select",{is:r.is}):l.createElement("select"),r.multiple?i.multiple=!0:r.size&&(i.size=r.size);break;default:i=typeof r.is=="string"?l.createElement(a,{is:r.is}):l.createElement(a)}}i[St]=t,i[Gt]=r;e:for(l=t.child;l!==null;){if(l.tag===5||l.tag===6)i.appendChild(l.stateNode);else if(l.tag!==4&&l.tag!==27&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===t)break e;for(;l.sibling===null;){if(l.return===null||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}t.stateNode=i;e:switch(Et(i,a,r),a){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Wn(t)}}return ze(t),Th(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Wn(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(I(166));if(e=Yr.current,oi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ot,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[St]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||K2(e.nodeValue,n)),e||ra(t,!0)}else e=jc(e).createTextNode(r),e[St]=t,t.stateNode=e}return ze(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=oi(t),n!==null){if(e===null){if(!r)throw Error(I(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(I(557));e[St]=t}else ka(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ze(t),e=!1}else n=bh(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Wt(t),t):(Wt(t),null);if(t.flags&128)throw Error(I(558))}return ze(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=oi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(I(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(I(317));a[St]=t}else ka(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ze(t),a=!1}else a=bh(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Wt(t),t):(Wt(t),null)}return Wt(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),i=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),i!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),gs(t,t.updateQueue),ze(t),null);case 4:return qi(),e===null&&Xv(t.stateNode.containerInfo),ze(t),null;case 10:return fr(t.type),ze(t),null;case 19:if(mt(Fe),r=t.memoizedState,r===null)return ze(t),null;if(a=(t.flags&128)!==0,i=r.rendering,i===null)if(a)Jl(r,!1);else{if(Ke!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=yc(e),i!==null){for(t.flags|=128,Jl(r,!1),e=i.updateQueue,t.updateQueue=e,gs(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)sA(n,e),n=n.sibling;return De(Fe,Fe.current&1|2),he&&nr(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&tn()>Sc&&(t.flags|=128,a=!0,Jl(r,!1),t.lanes=4194304)}else{if(!a)if(e=yc(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,gs(t,e),Jl(r,!0),r.tail===null&&r.tailMode==="hidden"&&!i.alternate&&!he)return ze(t),null}else 2*tn()-r.renderingStartTime>Sc&&n!==536870912&&(t.flags|=128,a=!0,Jl(r,!1),t.lanes=4194304);r.isBackwards?(i.sibling=t.child,t.child=i):(e=r.last,e!==null?e.sibling=i:t.child=i,r.last=i)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=tn(),e.sibling=null,n=Fe.current,De(Fe,a?n&1|2:n&1),he&&nr(t,r.treeForkCount),e):(ze(t),null);case 22:case 23:return Wt(t),Av(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(ze(t),t.subtreeFlags&6&&(t.flags|=8192)):ze(t),n=t.updateQueue,n!==null&&gs(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&&mt($a),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),fr(tt),ze(t),null;case 25:return null;case 30:return null}throw Error(I(156,t.tag))}function CC(e,t){switch(bv(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return fr(tt),qi(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return lc(t),null;case 31:if(t.memoizedState!==null){if(Wt(t),t.alternate===null)throw Error(I(340));ka()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Wt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(I(340));ka()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return mt(Fe),null;case 4:return qi(),null;case 10:return fr(t.type),null;case 22:case 23:return Wt(t),Av(),e!==null&&mt($a),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return fr(tt),null;case 25:return null;default:return null}}function s2(e,t){switch(bv(t),t.tag){case 3:fr(tt),qi();break;case 26:case 27:case 5:lc(t);break;case 4:qi();break;case 31:t.memoizedState!==null&&Wt(t);break;case 13:Wt(t);break;case 19:mt(Fe);break;case 10:fr(t.type);break;case 22:case 23:Wt(t),Av(),e!==null&&mt($a);break;case 24:fr(tt)}}function Yu(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var a=r.next;n=a;do{if((n.tag&e)===e){r=void 0;var i=n.create,l=n.inst;r=i(),l.destroy=r}n=n.next}while(n!==a)}}catch(o){we(t,t.return,o)}}function aa(e,t,n){try{var r=t.updateQueue,a=r!==null?r.lastEffect:null;if(a!==null){var i=a.next;r=i;do{if((r.tag&e)===e){var l=r.inst,o=l.destroy;if(o!==void 0){l.destroy=void 0,a=t;var u=n,s=o;try{s()}catch(f){we(a,u,f)}}}r=r.next}while(r!==i)}}catch(f){we(t,t.return,f)}}function c2(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{bA(t,n)}catch(r){we(e,e.return,r)}}}function f2(e,t,n){n.props=qa(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){we(e,t,r)}}function No(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(a){we(e,t,a)}}function kn(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{r()}catch(a){we(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){we(e,t,a)}else n.current=null}function d2(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(a){we(e,e.return,a)}}function Nh(e,t,n){try{var r=e.stateNode;JC(r,e.type,n,t),r[Gt]=t}catch(a){we(e,e.return,a)}}function h2(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ua(e.type)||e.tag===4}function Mh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||h2(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&&ua(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function iy(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=ir));else if(r!==4&&(r===27&&ua(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(iy(e,t,n),e=e.sibling;e!==null;)iy(e,t,n),e=e.sibling}function xc(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&&ua(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(xc(e,t,n),e=e.sibling;e!==null;)xc(e,t,n),e=e.sibling}function p2(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);Et(t,r,n),t[St]=e,t[Gt]=n}catch(i){we(e,e.return,i)}}var rr=!1,et=!1,Ch=!1,xb=typeof WeakSet=="function"?WeakSet:Set,ht=null;function $C(e,t){if(e=e.containerInfo,dy=Cc,e=tA(e),pv(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{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,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,o=-1,u=-1,s=0,f=0,c=e,d=null;t:for(;;){for(var h;c!==n||a!==0&&c.nodeType!==3||(o=l+a),c!==i||r!==0&&c.nodeType!==3||(u=l+r),c.nodeType===3&&(l+=c.nodeValue.length),(h=c.firstChild)!==null;)d=c,c=h;for(;;){if(c===e)break t;if(d===n&&++s===a&&(o=l),d===i&&++f===r&&(u=l),(h=c.nextSibling)!==null)break;c=d,d=c.parentNode}c=h}n=o===-1||u===-1?null:{start:o,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(hy={focusedElem:e,selectionRange:n},Cc=!1,ht=t;ht!==null;)if(t=ht,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ht=e;else for(;ht!==null;){switch(t=ht,i=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n title"))),Et(i,r,n),i[St]=e,pt(i),r=i;break e;case"link":var l=Ub("link","href",a).get(r+(n.href||""));if(l){for(var o=0;ov&&(l=v,v=g,g=l);var y=Yg(o,g),m=Yg(o,v);if(y&&m&&(h.rangeCount!==1||h.anchorNode!==y.node||h.anchorOffset!==y.offset||h.focusNode!==m.node||h.focusOffset!==m.offset)){var b=c.createRange();b.setStart(y.node,y.offset),h.removeAllRanges(),g>v?(h.addRange(b),h.extend(m.node,m.offset)):(b.setEnd(m.node,m.offset),h.addRange(b))}}}}for(c=[],h=o;h=h.parentNode;)h.nodeType===1&&c.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;on?32:n,J.T=null,n=uy,uy=null;var i=Qr,l=dr;if(ot=0,Qi=Qr=null,dr=0,me&6)throw Error(I(331));var o=me;if(me|=4,_2(i.current),O2(i,i.current,l,n),me=o,Xu(0,!1),nn&&typeof nn.onPostCommitFiberRoot=="function")try{nn.onPostCommitFiberRoot(Lu,i)}catch{}return!0}finally{be.p=a,J.T=r,U2(e,t)}}function Ab(e,t,n){t=mn(n,t),t=ny(e.stateNode,t,2),e=Kr(e,t,2),e!==null&&(Uu(e,2),Vn(e))}function we(e,t,n){if(e.tag===3)Ab(e,e,n);else for(;t!==null;){if(t.tag===3){Ab(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Fr===null||!Fr.has(r))){e=mn(n,e),n=n2(2),r=Kr(t,n,2),r!==null&&(r2(n,r,t,e),Uu(r,2),Vn(r));break}}t=t.return}}function Ph(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new RC;var a=new Set;r.set(t,a)}else a=r.get(t),a===void 0&&(a=new Set,r.set(t,a));a.has(n)||(Hv=!0,a.add(n),e=UC.bind(null,e,t,n),t.then(e,e))}function UC(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,$e===e&&(de&n)===n&&(Ke===4||Ke===3&&(de&62914560)===de&&300>tn()-Jf?!(me&2)&&Wi(e,0):qv|=n,Fi===de&&(Fi=0)),Vn(e)}function H2(e,t){t===0&&(t=Pw()),e=ei(e,t),e!==null&&(Uu(e,t),Vn(e))}function IC(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),H2(e,n)}function HC(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),H2(e,n)}function qC(e,t){return iv(e,t)}var Ac=null,mi=null,cy=!1,_c=!1,Dh=!1,Hr=0;function Vn(e){e!==mi&&e.next===null&&(mi===null?Ac=mi=e:mi=mi.next=e),_c=!0,cy||(cy=!0,YC())}function Xu(e,t){if(!Dh&&_c){Dh=!0;do for(var n=!1,r=Ac;r!==null;){if(e!==0){var a=r.pendingLanes;if(a===0)var i=0;else{var l=r.suspendedLanes,o=r.pingedLanes;i=(1<<31-rn(42|e)+1)-1,i&=a&~(l&~o),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,_b(r,i))}else i=de,i=Hf(r,r===$e?i:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(i&3)||ku(r,i)||(n=!0,_b(r,i));r=r.next}while(n);Dh=!1}}function GC(){q2()}function q2(){_c=cy=!1;var e=0;Hr!==0&&t3()&&(e=Hr);for(var t=tn(),n=null,r=Ac;r!==null;){var a=r.next,i=G2(r,t);i===0?(r.next=null,n===null?Ac=a:n.next=a,a===null&&(mi=n)):(n=r,(e!==0||i&3)&&(_c=!0)),r=a}ot!==0&&ot!==5||Xu(e),Hr!==0&&(Hr=0)}function G2(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes&-62914561;0o)break;var f=u.transferSize,c=u.initiatorType;f&&Mb(c)&&(u=u.responseEnd,l+=f*(u"u"?null:document;function J2(e,t,n){var r=Ml;if(r&&typeof t=="string"&&t){var a=yn(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),Bb.has(a)||(Bb.add(a),e={rel:e,crossOrigin:n,href:t},r.querySelector(a)===null&&(t=r.createElement("link"),Et(t,"link",e),pt(t),r.head.appendChild(t)))}}function c3(e){Ar.D(e),J2("dns-prefetch",e,null)}function f3(e,t){Ar.C(e,t),J2("preconnect",e,t)}function d3(e,t,n){Ar.L(e,t,n);var r=Ml;if(r&&e&&t){var a='link[rel="preload"][as="'+yn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+yn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+yn(n.imageSizes)+'"]')):a+='[href="'+yn(e)+'"]';var i=a;switch(t){case"style":i=Zi(e);break;case"script":i=Cl(e)}On.has(i)||(e=Ie({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),On.set(i,e),r.querySelector(a)!==null||t==="style"&&r.querySelector(Vu(i))||t==="script"&&r.querySelector(Ku(i))||(t=r.createElement("link"),Et(t,"link",e),pt(t),r.head.appendChild(t)))}}function h3(e,t){Ar.m(e,t);var n=Ml;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+yn(r)+'"][href="'+yn(e)+'"]',i=a;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Cl(e)}if(!On.has(i)&&(e=Ie({rel:"modulepreload",href:e},t),On.set(i,e),n.querySelector(a)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Ku(i)))return}r=n.createElement("link"),Et(r,"link",e),pt(r),n.head.appendChild(r)}}}function p3(e,t,n){Ar.S(e,t,n);var r=Ml;if(r&&e){var a=$i(r).hoistableStyles,i=Zi(e);t=t||"default";var l=a.get(i);if(!l){var o={loading:0,preload:null};if(l=r.querySelector(Vu(i)))o.loading=5;else{e=Ie({rel:"stylesheet",href:e,"data-precedence":t},n),(n=On.get(i))&&Vv(e,n);var u=l=r.createElement("link");pt(u),Et(u,"link",e),u._p=new Promise(function(s,f){u.onload=s,u.onerror=f}),u.addEventListener("load",function(){o.loading|=1}),u.addEventListener("error",function(){o.loading|=2}),o.loading|=4,Ws(l,t,r)}l={type:"stylesheet",instance:l,count:1,state:o},a.set(i,l)}}}function y3(e,t){Ar.X(e,t);var n=Ml;if(n&&e){var r=$i(n).hoistableScripts,a=Cl(e),i=r.get(a);i||(i=n.querySelector(Ku(a)),i||(e=Ie({src:e,async:!0},t),(t=On.get(a))&&Kv(e,t),i=n.createElement("script"),pt(i),Et(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}}function m3(e,t){Ar.M(e,t);var n=Ml;if(n&&e){var r=$i(n).hoistableScripts,a=Cl(e),i=r.get(a);i||(i=n.querySelector(Ku(a)),i||(e=Ie({src:e,async:!0,type:"module"},t),(t=On.get(a))&&Kv(e,t),i=n.createElement("script"),pt(i),Et(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}}function Lb(e,t,n,r){var a=(a=Yr.current)?Tc(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=Zi(n.href),n=$i(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=Zi(n.href);var i=$i(a).hoistableStyles,l=i.get(e);if(l||(a=a.ownerDocument||a,l={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,l),(i=a.querySelector(Vu(e)))&&!i._p&&(l.instance=i,l.state.loading=5),On.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},On.set(e,n),i||v3(a,e,n,l.state))),t&&r===null)throw Error(I(528,""));return l}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=Cl(n),n=$i(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 Zi(e){return'href="'+yn(e)+'"'}function Vu(e){return'link[rel="stylesheet"]['+e+"]"}function e_(e){return Ie({},e,{"data-precedence":e.precedence,precedence:null})}function v3(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}),Et(t,"link",n),pt(t),e.head.appendChild(t))}function Cl(e){return'[src="'+yn(e)+'"]'}function Ku(e){return"script[async]"+e}function kb(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+yn(n.href)+'"]');if(r)return t.instance=r,pt(r),r;var a=Ie({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),pt(r),Et(r,"style",a),Ws(r,n.precedence,e),t.instance=r;case"stylesheet":a=Zi(n.href);var i=e.querySelector(Vu(a));if(i)return t.state.loading|=4,t.instance=i,pt(i),i;r=e_(n),(a=On.get(a))&&Vv(r,a),i=(e.ownerDocument||e).createElement("link"),pt(i);var l=i;return l._p=new Promise(function(o,u){l.onload=o,l.onerror=u}),Et(i,"link",r),t.state.loading|=4,Ws(i,n.precedence,e),t.instance=i;case"script":return i=Cl(n.src),(a=e.querySelector(Ku(i)))?(t.instance=a,pt(a),a):(r=n,(a=On.get(i))&&(r=Ie({},n),Kv(r,a)),e=e.ownerDocument||e,a=e.createElement("script"),pt(a),Et(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,Ws(r,n.precedence,e));return t.instance}function Ws(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=r.length?r[r.length-1]:null,i=a,l=0;l title"):null)}function g3(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 t_(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function b3(e,t,n,r){if(n.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var a=Zi(r.href),i=t.querySelector(Vu(a));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Nc.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,pt(i);return}i=t.ownerDocument||t,r=e_(r),(a=On.get(a))&&Vv(r,a),i=i.createElement("link"),pt(i);var l=i;l._p=new Promise(function(o,u){l.onload=o,l.onerror=u}),Et(i,"link",r),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Nc.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Uh=0;function x3(e,t){return e.stylesheets&&e.count===0&&Js(e,e.stylesheets),0Uh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(a)}}:null}function Nc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Js(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Mc=null;function Js(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Mc=new Map,t.forEach(S3,e),Mc=null,Nc.call(e))}function S3(e,t){if(!(t.state.loading&4)){var n=Mc.get(e);if(n)var r=n.get(null);else{n=new Map,Mc.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s_)}catch(e){console.error(e)}}s_(),vw.exports=Uf;var N3=vw.exports;const M3=Me(N3);/** * @remix-run/router v1.23.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Zo(){return Zo=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Jv(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function $3(){return Math.random().toString(36).substr(2,8)}function Fb(e,t){return{usr:e.state,key:e.key,idx:t}}function Sy(e,t,n,r){return n===void 0&&(n=null),Zo({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?$l(t):t,{state:n,key:t&&t.key||r||$3()})}function Pc(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function $l(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function P3(e,t,n,r){r===void 0&&(r={});let{window:a=document.defaultView,v5Compat:i=!1}=r,l=a.history,o=qr.Pop,u=null,s=f();s==null&&(s=0,l.replaceState(Zo({},l.state,{idx:s}),""));function f(){return(l.state||{idx:null}).idx}function c(){o=qr.Pop;let v=f(),y=v==null?null:v-s;s=v,u&&u({action:o,location:g.location,delta:y})}function d(v,y){o=qr.Push;let m=Sy(g.location,v,y);s=f()+1;let b=Fb(m,s),O=g.createHref(m);try{l.pushState(b,"",O)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;a.location.assign(O)}i&&u&&u({action:o,location:g.location,delta:1})}function h(v,y){o=qr.Replace;let m=Sy(g.location,v,y);s=f();let b=Fb(m,s),O=g.createHref(m);l.replaceState(b,"",O),i&&u&&u({action:o,location:g.location,delta:0})}function x(v){let y=a.location.origin!=="null"?a.location.origin:a.location.href,m=typeof v=="string"?v:Pc(v);return m=m.replace(/ $/,"%20"),Ye(y,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,y)}let g={get action(){return o},get location(){return e(a,l)},listen(v){if(u)throw new Error("A history only accepts one active listener");return a.addEventListener(Kb,c),u=v,()=>{a.removeEventListener(Kb,c),u=null}},createHref(v){return t(a,v)},createURL:x,encodeLocation(v){let y=x(v);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:d,replace:h,go(v){return l.go(v)}};return g}var Qb;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Qb||(Qb={}));function D3(e,t,n){return n===void 0&&(n="/"),R3(e,t,n)}function R3(e,t,n,r){let a=typeof t=="string"?$l(t):t,i=el(a.pathname||"/",n);if(i==null)return null;let l=c_(e);z3(l);let o=null,u=V3(i);for(let s=0;o==null&&s{let u={relativePath:o===void 0?i.path||"":o,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};u.relativePath.startsWith("/")&&(Ye(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let s=ea([r,u.relativePath]),f=n.concat(u);i.children&&i.children.length>0&&(Ye(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+s+'".')),c_(i.children,t,f,s)),!(i.path==null&&!i.index)&&t.push({path:s,score:q3(s,i.index),routesMeta:f})};return e.forEach((i,l)=>{var o;if(i.path===""||!((o=i.path)!=null&&o.includes("?")))a(i,l);else for(let u of f_(i.path))a(i,l,u)}),t}function f_(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return a?[i,""]:[i];let l=f_(r.join("/")),o=[];return o.push(...l.map(u=>u===""?i:[i,u].join("/"))),a&&o.push(...l),o.map(u=>e.startsWith("/")&&u===""?"/":u)}function z3(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:G3(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const B3=/^:[\w-]+$/,L3=3,k3=2,U3=1,I3=10,H3=-2,Wb=e=>e==="*";function q3(e,t){let n=e.split("/"),r=n.length;return n.some(Wb)&&(r+=H3),t&&(r+=k3),n.filter(a=>!Wb(a)).reduce((a,i)=>a+(B3.test(i)?L3:i===""?U3:I3),r)}function G3(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function Y3(e,t,n){let{routesMeta:r}=e,a={},i="/",l=[];for(let o=0;o{let{paramName:d,isOptional:h}=f;if(d==="*"){let g=o[c]||"";l=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const x=o[c];return h&&!x?s[d]=void 0:s[d]=(x||"").replace(/%2F/g,"/"),s},{}),pathname:i,pathnameBase:l,pattern:e}}function X3(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Jv(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,o,u)=>(r.push({paramName:o,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function V3(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Jv(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function el(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const K3=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,F3=e=>K3.test(e);function Q3(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?$l(e):e,i;if(n)if(F3(n))i=n;else{if(n.includes("//")){let l=n;n=d_(n),Jv(!1,"Pathnames cannot have embedded double slashes - normalizing "+(l+" -> "+n))}n.startsWith("/")?i=Zb(n.substring(1),"/"):i=Zb(n,t)}else i=t;return{pathname:i,search:J3(r),hash:e4(a)}}function Zb(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function Ih(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function W3(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function e0(e,t){let n=W3(e);return t?n.map((r,a)=>a===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function t0(e,t,n,r){r===void 0&&(r=!1);let a;typeof e=="string"?a=$l(e):(a=Zo({},e),Ye(!a.pathname||!a.pathname.includes("?"),Ih("?","pathname","search",a)),Ye(!a.pathname||!a.pathname.includes("#"),Ih("#","pathname","hash",a)),Ye(!a.search||!a.search.includes("#"),Ih("#","search","hash",a)));let i=e===""||a.pathname==="",l=i?"/":a.pathname,o;if(l==null)o=n;else{let c=t.length-1;if(!r&&l.startsWith("..")){let d=l.split("/");for(;d[0]==="..";)d.shift(),c-=1;a.pathname=d.join("/")}o=c>=0?t[c]:"/"}let u=Q3(a,o),s=l&&l!=="/"&&l.endsWith("/"),f=(i||l===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(s||f)&&(u.pathname+="/"),u}const d_=e=>e.replace(/\/\/+/g,"/"),ea=e=>d_(e.join("/")),Z3=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),J3=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,e4=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function t4(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const h_=["post","put","patch","delete"];new Set(h_);const n4=["get",...h_];new Set(n4);/** * React Router v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Jo(){return Jo=Object.assign?Object.assign.bind():function(e){for(var t=1;t{o.current=!0}),_.useCallback(function(s,f){if(f===void 0&&(f={}),!o.current)return;if(typeof s=="number"){r.go(s);return}let c=t0(s,JSON.parse(l),i,f.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:ea([t,c.pathname])),(f.replace?r.replace:r.push)(c,f.state,f)},[t,r,l,i,e])}function ld(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=_.useContext(_r),{matches:a}=_.useContext(sa),{pathname:i}=Dl(),l=JSON.stringify(e0(a,r.v7_relativeSplatPath));return _.useMemo(()=>t0(e,JSON.parse(l),i,n==="path"),[e,l,i,n])}function i4(e,t){return l4(e,t)}function l4(e,t,n,r){Pl()||Ye(!1);let{navigator:a}=_.useContext(_r),{matches:i}=_.useContext(sa),l=i[i.length-1],o=l?l.params:{};l&&l.pathname;let u=l?l.pathnameBase:"/";l&&l.route;let s=Dl(),f;if(t){var c;let v=typeof t=="string"?$l(t):t;u==="/"||(c=v.pathname)!=null&&c.startsWith(u)||Ye(!1),f=v}else f=s;let d=f.pathname||"/",h=d;if(u!=="/"){let v=u.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(v.length).join("/")}let x=D3(e,{pathname:h}),g=f4(x&&x.map(v=>Object.assign({},v,{params:Object.assign({},o,v.params),pathname:ea([u,a.encodeLocation?a.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?u:ea([u,a.encodeLocation?a.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),i,n,r);return t&&g?_.createElement(id.Provider,{value:{location:Jo({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:qr.Pop}},g):g}function o4(){let e=y4(),t=t4(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return _.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},t),n?_.createElement("pre",{style:a},n):null,null)}const u4=_.createElement(o4,null);class s4 extends _.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?_.createElement(sa.Provider,{value:this.props.routeContext},_.createElement(y_.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function c4(e){let{routeContext:t,match:n,children:r}=e,a=_.useContext(ad);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),_.createElement(sa.Provider,{value:t},r)}function f4(e,t,n,r){var a;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let l=e,o=(a=n)==null?void 0:a.errors;if(o!=null){let f=l.findIndex(c=>c.route.id&&(o==null?void 0:o[c.route.id])!==void 0);f>=0||Ye(!1),l=l.slice(0,Math.min(l.length,f+1))}let u=!1,s=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f=0?l=l.slice(0,s+1):l=[l[0]];break}}}return l.reduceRight((f,c,d)=>{let h,x=!1,g=null,v=null;n&&(h=o&&c.route.id?o[c.route.id]:void 0,g=c.route.errorElement||u4,u&&(s<0&&d===0?(v4("route-fallback"),x=!0,v=null):s===d&&(x=!0,v=c.route.hydrateFallbackElement||null)));let y=t.concat(l.slice(0,d+1)),m=()=>{let b;return h?b=g:x?b=v:c.route.Component?b=_.createElement(c.route.Component,null):c.route.element?b=c.route.element:b=f,_.createElement(c4,{match:c,routeContext:{outlet:f,matches:y,isDataRoute:n!=null},children:b})};return n&&(c.route.ErrorBoundary||c.route.errorElement||d===0)?_.createElement(s4,{location:n.location,revalidation:n.revalidation,component:g,error:h,children:m(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):m()},null)}var v_=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(v_||{}),g_=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(g_||{});function d4(e){let t=_.useContext(ad);return t||Ye(!1),t}function h4(e){let t=_.useContext(p_);return t||Ye(!1),t}function p4(e){let t=_.useContext(sa);return t||Ye(!1),t}function b_(e){let t=p4(),n=t.matches[t.matches.length-1];return n.route.id||Ye(!1),n.route.id}function y4(){var e;let t=_.useContext(y_),n=h4(),r=b_();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function m4(){let{router:e}=d4(v_.UseNavigateStable),t=b_(g_.UseNavigateStable),n=_.useRef(!1);return m_(()=>{n.current=!0}),_.useCallback(function(a,i){i===void 0&&(i={}),n.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,Jo({fromRouteId:t},i)))},[e,t])}const Jb={};function v4(e,t,n){Jb[e]||(Jb[e]=!0)}function g4(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function x_(e){let{to:t,replace:n,state:r,relative:a}=e;Pl()||Ye(!1);let{future:i,static:l}=_.useContext(_r),{matches:o}=_.useContext(sa),{pathname:u}=Dl(),s=n0(),f=t0(t,e0(o,i.v7_relativeSplatPath),u,a==="path"),c=JSON.stringify(f);return _.useEffect(()=>s(JSON.parse(c),{replace:n,state:r,relative:a}),[s,c,a,n,r]),null}function ft(e){Ye(!1)}function b4(e){let{basename:t="/",children:n=null,location:r,navigationType:a=qr.Pop,navigator:i,static:l=!1,future:o}=e;Pl()&&Ye(!1);let u=t.replace(/^\/*/,"/"),s=_.useMemo(()=>({basename:u,navigator:i,static:l,future:Jo({v7_relativeSplatPath:!1},o)}),[u,o,i,l]);typeof r=="string"&&(r=$l(r));let{pathname:f="/",search:c="",hash:d="",state:h=null,key:x="default"}=r,g=_.useMemo(()=>{let v=el(f,u);return v==null?null:{location:{pathname:v,search:c,hash:d,state:h,key:x},navigationType:a}},[u,f,c,d,h,x,a]);return g==null?null:_.createElement(_r.Provider,{value:s},_.createElement(id.Provider,{children:n,value:g}))}function ex(e){let{children:t,location:n}=e;return i4(wy(t),n)}new Promise(()=>{});function wy(e,t){t===void 0&&(t=[]);let n=[];return _.Children.forEach(e,(r,a)=>{if(!_.isValidElement(r))return;let i=[...t,a];if(r.type===_.Fragment){n.push.apply(n,wy(r.props.children,i));return}r.type!==ft&&Ye(!1),!r.props.index||!r.props.children||Ye(!1);let l={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=wy(r.props.children,i)),n.push(l)}),n}/** * React Router DOM v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Dc(){return Dc=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s&&tx?tx(()=>u(c)):u(c)},[u,s]);return _.useLayoutEffect(()=>l.listen(f),[l,f]),_.useEffect(()=>g4(r),[r]),_.createElement(b4,{basename:t,children:n,location:o.location,navigationType:o.action,navigator:l,future:r})}const T4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",N4=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,M4=_.forwardRef(function(t,n){let{onClick:r,relative:a,reloadDocument:i,replace:l,state:o,target:u,to:s,preventScrollReset:f,viewTransition:c}=t,d=S_(t,O4),{basename:h}=_.useContext(_r),x,g=!1;if(typeof s=="string"&&N4.test(s)&&(x=s,T4))try{let b=new URL(window.location.href),O=s.startsWith("//")?new URL(b.protocol+s):new URL(s),S=el(O.pathname,h);O.origin===b.origin&&S!=null?s=S+O.search+O.hash:g=!0}catch{}let v=r4(s,{relative:a}),y=$4(s,{replace:l,state:o,target:u,preventScrollReset:f,relative:a,viewTransition:c});function m(b){r&&r(b),b.defaultPrevented||y(b)}return _.createElement("a",Dc({},d,{href:x||v,onClick:g||i?r:m,ref:n,target:u}))}),Hh=_.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:a=!1,className:i="",end:l=!1,style:o,to:u,viewTransition:s,children:f}=t,c=S_(t,w4),d=ld(u,{relative:c.relative}),h=Dl(),x=_.useContext(p_),{navigator:g,basename:v}=_.useContext(_r),y=x!=null&&P4(d)&&s===!0,m=g.encodeLocation?g.encodeLocation(d).pathname:d.pathname,b=h.pathname,O=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;a||(b=b.toLowerCase(),O=O?O.toLowerCase():null,m=m.toLowerCase()),O&&v&&(O=el(O,v)||O);const S=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let w=b===m||!l&&b.startsWith(m)&&b.charAt(S)==="/",A=O!=null&&(O===m||!l&&O.startsWith(m)&&O.charAt(m.length)==="/"),E={isActive:w,isPending:A,isTransitioning:y},j=w?r:void 0,$;typeof i=="function"?$=i(E):$=[i,w?"active":null,A?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let P=typeof o=="function"?o(E):o;return _.createElement(M4,Dc({},c,{"aria-current":j,className:$,ref:n,style:P,to:u,viewTransition:s}),typeof f=="function"?f(E):f)});var Ay;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ay||(Ay={}));var nx;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(nx||(nx={}));function C4(e){let t=_.useContext(ad);return t||Ye(!1),t}function $4(e,t){let{target:n,replace:r,state:a,preventScrollReset:i,relative:l,viewTransition:o}=t===void 0?{}:t,u=n0(),s=Dl(),f=ld(e,{relative:l});return _.useCallback(c=>{if(S4(c,n)){c.preventDefault();let d=r!==void 0?r:Pc(s)===Pc(f);u(e,{replace:d,state:a,preventScrollReset:i,relative:l,viewTransition:o})}},[s,u,f,r,a,n,e,i,l,o])}function P4(e,t){t===void 0&&(t={});let n=_.useContext(_4);n==null&&Ye(!1);let{basename:r}=C4(Ay.useViewTransitionState),a=ld(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=el(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=el(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Oy(a.pathname,l)!=null||Oy(a.pathname,i)!=null}/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const D4=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),O_=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var R4={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const z4=_.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:i,iconNode:l,...o},u)=>_.createElement("svg",{ref:u,...R4,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:O_("lucide",a),...o},[...l.map(([s,f])=>_.createElement(s,f)),...Array.isArray(i)?i:[i]]));/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const le=(e,t)=>{const n=_.forwardRef(({className:r,...a},i)=>_.createElement(z4,{ref:i,iconNode:t,className:O_(`lucide-${D4(e)}`,r),...a}));return n.displayName=`${e}`,n};/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const B4=le("Battery",[["rect",{width:"16",height:"10",x:"2",y:"7",rx:"2",ry:"2",key:"1w10f2"}],["line",{x1:"22",x2:"22",y1:"11",y2:"13",key:"4dh1rd"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const L4=le("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const eu=le("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const w_=le("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const k4=le("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const U4=le("CircleUser",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Rc=le("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const I4=le("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const H4=le("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const q4=le("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const G4=le("KeyRound",[["path",{d:"M2 18v3c0 .6.4 1 1 1h4v-3h3v-3h2l1.4-1.4a6.5 6.5 0 1 0-4-4Z",key:"167ctg"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Y4=le("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const X4=le("LockOpen",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const V4=le("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const K4=le("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const F4=le("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Q4=le("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const A_=le("Package",[["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const W4=le("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Z4=le("PlugZap",[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const J4=le("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const __=le("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const e$=le("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const E_=le("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const t$=le("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const n$=le("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const r$=le("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const j_=le("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const a$=le("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const r0=le("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const i$=le("ShieldOff",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const T_=le("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const l$=le("ThumbsDown",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const o$=le("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const u$=le("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const od=le("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const s$=le("UserCheck",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const N_=le("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const c$=le("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/** * @license lucide-react v0.400.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const M_=le("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);function C_(e,t){return function(){return e.apply(t,arguments)}}const{toString:f$}=Object.prototype,{getPrototypeOf:tl}=Object,{iterator:Fu,toStringTag:$_}=Symbol,zc=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),tu=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),zc(n,t))return!0;n=tl(n)}return!1},d$=(e,t)=>e!=null&&tu(e,t)?e[t]:void 0,a0=(e=>t=>{const n=f$.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Dn=e=>(e=e.toLowerCase(),t=>a0(t)===e),ud=e=>t=>typeof t===e,{isArray:Ga}=Array,nl=ud("undefined");function Rl(e){return e!==null&&!nl(e)&&e.constructor!==null&&!nl(e.constructor)&&qt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const P_=Dn("ArrayBuffer");function h$(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&P_(e.buffer),t}const p$=ud("string"),qt=ud("function"),D_=ud("number"),zl=e=>e!==null&&typeof e=="object",y$=e=>e===!0||e===!1,tc=e=>{if(!zl(e))return!1;const t=tl(e);return(t===null||t===Object.prototype||tl(t)===null)&&!tu(e,$_)&&!tu(e,Fu)},m$=e=>{if(!zl(e)||Rl(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},v$=Dn("Date"),g$=Dn("File"),b$=e=>!!(e&&typeof e.uri<"u"),x$=e=>e&&typeof e.getParts<"u",S$=Dn("Blob"),O$=Dn("FileList"),w$=e=>zl(e)&&qt(e.pipe);function A$(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const rx=A$(),ax=typeof rx.FormData<"u"?rx.FormData:void 0,_$=e=>{if(!e)return!1;if(ax&&e instanceof ax)return!0;const t=tl(e);if(!t||t===Object.prototype||!qt(e.append))return!1;const n=a0(e);return n==="formdata"||n==="object"&&qt(e.toString)&&e.toString()==="[object FormData]"},E$=Dn("URLSearchParams"),[j$,T$,N$,M$]=["ReadableStream","Request","Response","Headers"].map(Dn),C$=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Qu(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,a;if(typeof e!="object"&&(e=[e]),Ga(e))for(r=0,a=e.length;r0;)if(a=n[r],t===a.toLowerCase())return a;return null}const _a=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,z_=e=>!nl(e)&&e!==_a;function _y(...e){const{caseless:t,skipUndefined:n}=z_(this)&&this||{},r={},a=(i,l)=>{if(l==="__proto__"||l==="constructor"||l==="prototype")return;const o=t&&typeof l=="string"&&R_(r,l)||l,u=zc(r,o)?r[o]:void 0;tc(u)&&tc(i)?r[o]=_y(u,i):tc(i)?r[o]=_y({},i):Ga(i)?r[o]=i.slice():(!n||!nl(i))&&(r[o]=i)};for(let i=0,l=e.length;i(Qu(t,(a,i)=>{n&&qt(a)?Object.defineProperty(e,i,{__proto__:null,value:C_(a,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{__proto__:null,value:a,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),P$=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),D$=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},R$=(e,t,n,r)=>{let a,i,l;const o={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)l=a[i],(!r||r(l,e,t))&&!o[l]&&(t[l]=e[l],o[l]=!0);e=n!==!1&&tl(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},z$=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},B$=e=>{if(!e)return null;if(Ga(e))return e;let t=e.length;if(!D_(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},L$=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&tl(Uint8Array)),k$=(e,t)=>{const r=(e&&e[Fu]).call(e);let a;for(;(a=r.next())&&!a.done;){const i=a.value;t.call(e,i[0],i[1])}},U$=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},I$=Dn("HTMLFormElement"),H$=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,a){return r.toUpperCase()+a}),{propertyIsEnumerable:q$}=Object.prototype,G$=Dn("RegExp"),B_=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Qu(n,(a,i)=>{let l;(l=t(a,i,e))!==!1&&(r[i]=l||a)}),Object.defineProperties(e,r)},Y$=e=>{B_(e,(t,n)=>{if(qt(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(qt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},X$=(e,t)=>{const n={},r=a=>{a.forEach(i=>{n[i]=!0})};return Ga(e)?r(e):r(String(e).split(t)),n},V$=()=>{},K$=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function F$(e){return!!(e&&qt(e.append)&&e[$_]==="FormData"&&e[Fu])}const Q$=e=>{const t=new WeakSet,n=r=>{if(zl(r)){if(t.has(r))return;if(Rl(r))return r;if(!("toJSON"in r)){t.add(r);const a=Ga(r)?[]:{};return Qu(r,(i,l)=>{const o=n(i);!nl(o)&&(a[l]=o)}),t.delete(r),a}}return r};return n(e)},W$=Dn("AsyncFunction"),Z$=e=>e&&(zl(e)||qt(e))&&qt(e.then)&&qt(e.catch),L_=((e,t)=>e?setImmediate:t?((n,r)=>(_a.addEventListener("message",({source:a,data:i})=>{a===_a&&i===n&&r.length&&r.shift()()},!1),a=>{r.push(a),_a.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",qt(_a.postMessage)),J$=typeof queueMicrotask<"u"?queueMicrotask.bind(_a):typeof process<"u"&&process.nextTick||L_,k_=e=>e!=null&&qt(e[Fu]),eP=e=>e!=null&&tu(e,Fu)&&k_(e),T={isArray:Ga,isArrayBuffer:P_,isBuffer:Rl,isFormData:_$,isArrayBufferView:h$,isString:p$,isNumber:D_,isBoolean:y$,isObject:zl,isPlainObject:tc,isEmptyObject:m$,isReadableStream:j$,isRequest:T$,isResponse:N$,isHeaders:M$,isUndefined:nl,isDate:v$,isFile:g$,isReactNativeBlob:b$,isReactNative:x$,isBlob:S$,isRegExp:G$,isFunction:qt,isStream:w$,isURLSearchParams:E$,isTypedArray:L$,isFileList:O$,forEach:Qu,merge:_y,extend:$$,trim:C$,stripBOM:P$,inherits:D$,toFlatObject:R$,kindOf:a0,kindOfTest:Dn,endsWith:z$,toArray:B$,forEachEntry:k$,matchAll:U$,isHTMLForm:I$,hasOwnProperty:zc,hasOwnProp:zc,hasOwnInPrototypeChain:tu,getSafeProp:d$,reduceDescriptors:B_,freezeMethods:Y$,toObjectSet:X$,toCamelCase:H$,noop:V$,toFiniteNumber:K$,findKey:R_,global:_a,isContextDefined:z_,isSpecCompliantForm:F$,toJSONObject:Q$,isAsyncFn:W$,isThenable:Z$,setImmediate:L_,asap:J$,isIterable:k_,isSafeIterable:eP},tP=T.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),nP=e=>{const t={};let n,r,a;return e&&e.split(` `).forEach(function(l){a=l.indexOf(":"),n=l.substring(0,a).trim().toLowerCase(),r=l.substring(a+1).trim(),!(!n||t[n]&&tP[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function rP(e){let t=0,n=e.length;for(;tt;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const aP=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),iP=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function i0(e,t){return T.isArray(e)?e.map(n=>i0(n,t)):rP(String(e).replace(t,""))}const lP=e=>i0(e,aP),oP=e=>i0(e,iP);function U_(e){const t=Object.create(null);return T.forEach(e.toJSON(),(n,r)=>{t[r]=oP(n)}),t}const ix=Symbol("internals");function no(e){return e&&String(e).trim().toLowerCase()}function nc(e){return e===!1||e==null?e:T.isArray(e)?e.map(nc):lP(String(e))}function uP(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const sP=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function qh(e,t,n,r,a){if(T.isFunction(r))return r.call(this,t,n);if(a&&(t=n),!!T.isString(t)){if(T.isString(r))return t.indexOf(r)!==-1;if(T.isRegExp(r))return r.test(t)}}function cP(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function fP(e,t){const n=T.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(a,i,l){return this[r].call(this,t,a,i,l)},configurable:!0})})}let Ct=class{constructor(t){t&&this.set(t)}set(t,n,r){const a=this;function i(o,u,s){const f=no(u);if(!f)return;const c=T.findKey(a,f);(!c||a[c]===void 0||s===!0||s===void 0&&a[c]!==!1)&&(a[c||u]=nc(o))}const l=(o,u)=>T.forEach(o,(s,f)=>i(s,f,u));if(T.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(T.isString(t)&&(t=t.trim())&&!sP(t))l(nP(t),n);else if(T.isObject(t)&&T.isSafeIterable(t)){let o=Object.create(null),u,s;for(const f of t){if(!T.isArray(f))throw new TypeError("Object iterator must return a key-value pair");s=f[0],T.hasOwnProp(o,s)?(u=o[s],o[s]=T.isArray(u)?[...u,f[1]]:[u,f[1]]):o[s]=f[1]}l(o,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=no(t),t){const r=T.findKey(this,t);if(r){const a=this[r];if(!n)return a;if(n===!0)return uP(a);if(T.isFunction(n))return n.call(this,a,r);if(T.isRegExp(n))return n.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=no(t),t){const r=T.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||qh(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let a=!1;function i(l){if(l=no(l),l){const o=T.findKey(r,l);o&&(!n||qh(r,r[o],o,n))&&(delete r[o],a=!0)}}return T.isArray(t)?t.forEach(i):i(t),a}clear(t){const n=Object.keys(this);let r=n.length,a=!1;for(;r--;){const i=n[r];(!t||qh(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){const n=this,r={};return T.forEach(this,(a,i)=>{const l=T.findKey(r,i);if(l){n[l]=nc(a),delete n[i];return}const o=t?cP(i):String(i).trim();o!==i&&delete n[i],n[o]=nc(a),r[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return T.forEach(this,(r,a)=>{r!=null&&r!==!1&&(n[a]=t&&T.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(a=>r.set(a)),r}static accessor(t){const r=(this[ix]=this[ix]={accessors:{}}).accessors,a=this.prototype;function i(l){const o=no(l);r[o]||(fP(a,l),r[o]=!0)}return T.isArray(t)?t.forEach(i):i(t),this}};Ct.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);T.reduceDescriptors(Ct.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});T.freezeMethods(Ct);const dP="[REDACTED ****]";function hP(e){if(T.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(T.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function pP(e,t){const n=new Set(t.map(i=>String(i).toLowerCase())),r=[],a=i=>{if(i===null||typeof i!="object"||T.isBuffer(i))return i;if(r.indexOf(i)!==-1)return;i instanceof Ct&&(i=i.toJSON()),r.push(i);let l;if(T.isArray(i))l=[],i.forEach((o,u)=>{const s=a(o);T.isUndefined(s)||(l[u]=s)});else{if(!T.isPlainObject(i)&&hP(i))return r.pop(),i;l=Object.create(null);for(const[o,u]of Object.entries(i)){const s=n.has(o.toLowerCase())?dP:a(u);T.isUndefined(s)||(l[o]=s)}}return r.pop(),l};return a(e)}let V=class I_ extends Error{static from(t,n,r,a,i,l){const o=new I_(t.message,n||t.code,r,a,i);return Object.defineProperty(o,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),o.name=t.name,t.status!=null&&o.status==null&&(o.status=t.status),l&&Object.assign(o,l),o}constructor(t,n,r,a,i){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),a&&(this.request=a),i&&(this.response=i,this.status=i.status)}toJSON(){const t=this.config,n=t&&T.hasOwnProp(t,"redact")?t.redact:void 0,r=T.isArray(n)&&n.length>0?pP(t,n):T.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};V.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";V.ERR_BAD_OPTION="ERR_BAD_OPTION";V.ECONNABORTED="ECONNABORTED";V.ETIMEDOUT="ETIMEDOUT";V.ECONNREFUSED="ECONNREFUSED";V.ERR_NETWORK="ERR_NETWORK";V.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";V.ERR_DEPRECATED="ERR_DEPRECATED";V.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";V.ERR_BAD_REQUEST="ERR_BAD_REQUEST";V.ERR_CANCELED="ERR_CANCELED";V.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";V.ERR_INVALID_URL="ERR_INVALID_URL";V.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const yP=null,H_=100;function Ey(e){return T.isPlainObject(e)||T.isArray(e)}function q_(e){return T.endsWith(e,"[]")?e.slice(0,-2):e}function Gh(e,t,n){return e?e.concat(t).map(function(a,i){return a=q_(a),!n&&i?"["+a+"]":a}).join(n?".":""):t}function mP(e){return T.isArray(e)&&!e.some(Ey)}const vP=T.toFlatObject(T,{},null,function(t){return/^is[A-Z]/.test(t)});function sd(e,t,n){if(!T.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=T.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,b){return!T.isUndefined(b[m])});const r=n.metaTokens,a=n.visitor||x,i=n.dots,l=n.indexes,o=n.Blob||typeof Blob<"u"&&Blob,u=n.maxDepth===void 0?H_:n.maxDepth,s=o&&T.isSpecCompliantForm(t),f=[];if(!T.isFunction(a))throw new TypeError("visitor must be a function");function c(y){if(y===null)return"";if(T.isDate(y))return y.toISOString();if(T.isBoolean(y))return y.toString();if(!s&&T.isBlob(y))throw new V("Blob is not supported. Use a Buffer instead.");if(T.isArrayBuffer(y)||T.isTypedArray(y)){if(s&&typeof o=="function")return new o([y]);if(typeof Buffer<"u")return Buffer.from(y);throw new V("Blob is not supported. Use a Buffer instead.",V.ERR_NOT_SUPPORT)}return y}function d(y){if(y>u)throw new V("Object is too deeply nested ("+y+" levels). Max depth: "+u,V.ERR_FORM_DATA_DEPTH_EXCEEDED)}function h(y,m){if(u===1/0)return JSON.stringify(y);const b=[];return JSON.stringify(y,function(S,w){if(!T.isObject(w))return w;for(;b.length&&b[b.length-1]!==this;)b.pop();return b.push(w),d(m+b.length-1),w})}function x(y,m,b){let O=y;if(T.isReactNative(t)&&T.isReactNativeBlob(y))return t.append(Gh(b,m,i),c(y)),!1;if(y&&!b&&typeof y=="object"){if(T.endsWith(m,"{}"))m=r?m:m.slice(0,-2),y=h(y,1);else if(T.isArray(y)&&mP(y)||(T.isFileList(y)||T.endsWith(m,"[]"))&&(O=T.toArray(y)))return m=q_(m),O.forEach(function(w,A){!(T.isUndefined(w)||w===null)&&t.append(l===!0?Gh([m],A,i):l===null?m:m+"[]",c(w))}),!1}return Ey(y)?!0:(t.append(Gh(b,m,i),c(y)),!1)}const g=Object.assign(vP,{defaultVisitor:x,convertValue:c,isVisitable:Ey});function v(y,m,b=0){if(!T.isUndefined(y)){if(d(b),f.indexOf(y)!==-1)throw new Error("Circular reference detected in "+m.join("."));f.push(y),T.forEach(y,function(S,w){(!(T.isUndefined(S)||S===null)&&a.call(t,S,T.isString(w)?w.trim():w,m,g))===!0&&v(S,m?m.concat(w):[w],b+1)}),f.pop()}}if(!T.isObject(e))throw new TypeError("data must be an object");return v(e),t}function lx(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function l0(e,t){this._pairs=[],e&&sd(e,this,t)}const G_=l0.prototype;G_.append=function(t,n){this._pairs.push([t,n])};G_.toString=function(t){const n=t?r=>t.call(this,r,lx):lx;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};function gP(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Y_(e,t,n){if(!t)return e;e=e||"";const r=T.isFunction(n)?{serialize:n}:n,a=T.getSafeProp(r,"encode")||gP,i=T.getSafeProp(r,"serialize");let l;if(i?l=i(t,r):l=T.isURLSearchParams(t)?t.toString():new l0(t,r).toString(a),l){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+l}return e}class ox{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){T.forEach(this.handlers,function(r){r!==null&&t(r)})}}const o0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},bP=typeof URLSearchParams<"u"?URLSearchParams:l0,xP=typeof FormData<"u"?FormData:null,SP=typeof Blob<"u"?Blob:null,OP={isBrowser:!0,classes:{URLSearchParams:bP,FormData:xP,Blob:SP},protocols:["http","https","file","blob","url","data"]},u0=typeof window<"u"&&typeof document<"u",jy=typeof navigator=="object"&&navigator||void 0,wP=u0&&(!jy||["ReactNative","NativeScript","NS"].indexOf(jy.product)<0),AP=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_P=u0&&window.location.href||"http://localhost",EP=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:u0,hasStandardBrowserEnv:wP,hasStandardBrowserWebWorkerEnv:AP,navigator:jy,origin:_P},Symbol.toStringTag,{value:"Module"})),wt={...EP,...OP};function jP(e,t){return sd(e,new wt.classes.URLSearchParams,{visitor:function(n,r,a,i){return wt.isNode&&T.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}const ux=H_;function X_(e){if(e>ux)throw new V("FormData field is too deeply nested ("+e+" levels). Max depth: "+ux,V.ERR_FORM_DATA_DEPTH_EXCEEDED)}function TP(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)X_(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function NP(e){const t={},n=Object.keys(e);let r;const a=n.length;let i;for(r=0;r=n.length;return l=!l&&T.isArray(a)?a.length:l,u?(T.hasOwnProp(a,l)?a[l]=T.isArray(a[l])?a[l].concat(r):[a[l],r]:a[l]=r,!o):((!T.hasOwnProp(a,l)||!T.isObject(a[l]))&&(a[l]=[]),t(n,r,a[l],i)&&T.isArray(a[l])&&(a[l]=NP(a[l])),!o)}if(T.isFormData(e)&&T.isFunction(e.entries)){const n={};return T.forEachEntry(e,(r,a)=>{t(TP(r),a,n,0)}),n}return null}const si=(e,t)=>e!=null&&T.hasOwnProp(e,t)?e[t]:void 0;function MP(e,t,n){if(T.isString(e))try{return(t||JSON.parse)(e),T.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Wu={transitional:o0,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",a=r.indexOf("application/json")>-1,i=T.isObject(t);if(i&&T.isHTMLForm(t)&&(t=new FormData(t)),T.isFormData(t))return a?JSON.stringify(V_(t)):t;if(T.isArrayBuffer(t)||T.isBuffer(t)||T.isStream(t)||T.isFile(t)||T.isBlob(t)||T.isReadableStream(t))return t;if(T.isArrayBufferView(t))return t.buffer;if(T.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){const u=si(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return jP(t,u).toString();if((o=T.isFileList(t))||r.indexOf("multipart/form-data")>-1){const s=si(this,"env"),f=s&&s.FormData;return sd(o?{"files[]":t}:t,f&&new f,u)}}return i||a?(n.setContentType("application/json",!1),MP(t)):t}],transformResponse:[function(t){const n=si(this,"transitional")||Wu.transitional,r=n&&n.forcedJSONParsing,a=si(this,"responseType"),i=a==="json";if(T.isResponse(t)||T.isReadableStream(t))return t;if(t&&T.isString(t)&&(r&&!a||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,si(this,"parseReviver"))}catch(u){if(o)throw u.name==="SyntaxError"?V.from(u,V.ERR_BAD_RESPONSE,this,null,si(this,"response")):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:wt.classes.FormData,Blob:wt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};T.forEach(["delete","get","head","post","put","patch","query"],e=>{Wu.headers[e]={}});function Yh(e,t){const n=this||Wu,r=t||n,a=Ct.from(r.headers);let i=r.data;return T.forEach(e,function(o){i=o.call(n,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function K_(e){return!!(e&&e.__CANCEL__)}let Zu=class extends V{constructor(t,n,r){super(t??"canceled",V.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function F_(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new V("Request failed with status code "+n.status,n.status>=400&&n.status<500?V.ERR_BAD_REQUEST:V.ERR_BAD_RESPONSE,n.config,n.request,n))}function CP(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function $P(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a=0,i=0,l;return t=t!==void 0?t:1e3,function(u){const s=Date.now(),f=r[i];l||(l=s),n[a]=u,r[a]=s;let c=i,d=0;for(;c!==a;)d+=n[c++],c=c%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),s-l{n=f,a=null,i&&(clearTimeout(i),i=null),e(...s)};return[(...s)=>{const f=Date.now(),c=f-n;c>=r?l(s,f):(a=s,i||(i=setTimeout(()=>{i=null,l(a)},r-c)))},()=>a&&l(a)]}const Bc=(e,t,n=3)=>{let r=0;const a=$P(50,250);return PP(i=>{if(!i||typeof i.loaded!="number")return;const l=i.loaded,o=i.lengthComputable?i.total:void 0,u=o!=null?Math.min(l,o):l,s=Math.max(0,u-r),f=a(s);r=Math.max(r,u);const c={loaded:u,total:o,progress:o?u/o:void 0,bytes:s,rate:f||void 0,estimated:f&&o?(o-u)/f:void 0,event:i,lengthComputable:o!=null,[t?"download":"upload"]:!0};e(c)},n)},sx=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},cx=e=>(...t)=>T.asap(()=>e(...t)),DP=wt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,wt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(wt.origin),wt.navigator&&/(msie|trident)/i.test(wt.navigator.userAgent)):()=>!0,RP=wt.hasStandardBrowserEnv?{write(e,t,n,r,a,i,l){if(typeof document>"u")return;const o=[`${e}=${encodeURIComponent(t)}`];T.isNumber(n)&&o.push(`expires=${new Date(n).toUTCString()}`),T.isString(r)&&o.push(`path=${r}`),T.isString(a)&&o.push(`domain=${a}`),i===!0&&o.push("secure"),T.isString(l)&&o.push(`SameSite=${l}`),document.cookie=o.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;ne instanceof Ct?{...e}:e;function Ya(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(f,c,d,h){return T.isPlainObject(f)&&T.isPlainObject(c)?T.merge.call({caseless:h},f,c):T.isPlainObject(c)?T.merge({},c):T.isArray(c)?c.slice():c}function a(f,c,d,h){if(T.isUndefined(c)){if(!T.isUndefined(f))return r(void 0,f,d,h)}else return r(f,c,d,h)}function i(f,c){if(!T.isUndefined(c))return r(void 0,c)}function l(f,c){if(T.isUndefined(c)){if(!T.isUndefined(f))return r(void 0,f)}else return r(void 0,c)}function o(f){const c=T.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!T.isUndefined(c))if(T.isPlainObject(c)){if(T.hasOwnProp(c,f))return c[f]}else return;const d=T.hasOwnProp(e,"transitional")?e.transitional:void 0;if(T.isPlainObject(d)&&T.hasOwnProp(d,f))return d[f]}function u(f,c,d){if(T.hasOwnProp(t,d))return r(f,c);if(T.hasOwnProp(e,d))return r(void 0,f)}const s={url:i,method:i,data:i,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,allowedSocketPaths:l,responseEncoding:l,validateStatus:u,headers:(f,c,d)=>a(dx(f),dx(c),d,!0)};return T.forEach(Object.keys({...e,...t}),function(c){if(c==="__proto__"||c==="constructor"||c==="prototype")return;const d=T.hasOwnProp(s,c)?s[c]:a,h=T.hasOwnProp(e,c)?e[c]:void 0,x=T.hasOwnProp(t,c)?t[c]:void 0,g=d(h,x,c);T.isUndefined(g)&&d!==u||(n[c]=g)}),T.hasOwnProp(t,"validateStatus")&&T.isUndefined(t.validateStatus)&&o("validateStatusUndefinedResolves")===!1&&(T.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const HP=["content-type","content-length"];function qP(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,a])=>{HP.includes(r.toLowerCase())&&e.set(r,a)})}const GP=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function W_(e){const t=Ya({},e),n=d=>T.hasOwnProp(t,d)?t[d]:void 0,r=n("data");let a=n("withXSRFToken");const i=n("xsrfHeaderName"),l=n("xsrfCookieName");let o=n("headers");const u=n("auth"),s=n("baseURL"),f=n("allowAbsoluteUrls"),c=n("url");if(t.headers=o=Ct.from(o),t.url=Y_(Q_(s,c,f,t),n("params"),n("paramsSerializer")),u){const d=T.getSafeProp(u,"username")||"",h=T.getSafeProp(u,"password")||"";try{o.set("Authorization","Basic "+btoa(d+":"+(h?GP(h):"")))}catch(x){throw V.from(x,V.ERR_BAD_OPTION_VALUE,e)}}if(T.isFormData(r)&&(wt.hasStandardBrowserEnv||wt.hasStandardBrowserWebWorkerEnv||T.isReactNative(r)?o.setContentType(void 0):T.isFunction(r.getHeaders)&&qP(o,r.getHeaders(),n("formDataHeaderPolicy"))),wt.hasStandardBrowserEnv&&(T.isFunction(a)&&(a=a(t)),a===!0||a==null&&DP(t.url))){const h=i&&l&&RP.read(l);h&&o.set(i,h)}return t}const YP=typeof XMLHttpRequest<"u",XP=YP&&function(e){return new Promise(function(n,r){const a=W_(e);let i=a.data;const l=Ct.from(a.headers).normalize();let{responseType:o,onUploadProgress:u,onDownloadProgress:s}=a,f,c,d,h,x;function g(){h&&h(),x&&x(),a.cancelToken&&a.cancelToken.unsubscribe(f),a.signal&&a.signal.removeEventListener("abort",f)}let v=new XMLHttpRequest;v.open(a.method.toUpperCase(),a.url,!0),v.timeout=a.timeout;function y(){if(!v)return;const b=Ct.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),S={data:!o||o==="text"||o==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:b,config:e,request:v};F_(function(A){n(A),g()},function(A){r(A),g()},S),v=null}"onloadend"in v?v.onloadend=y:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.startsWith("file:"))||setTimeout(y)},v.onabort=function(){v&&(r(new V("Request aborted",V.ECONNABORTED,e,v)),g(),v=null)},v.onerror=function(O){const S=O&&O.message?O.message:"Network Error",w=new V(S,V.ERR_NETWORK,e,v);w.event=O||null,r(w),g(),v=null},v.ontimeout=function(){let O=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const S=a.transitional||o0;a.timeoutErrorMessage&&(O=a.timeoutErrorMessage),r(new V(O,S.clarifyTimeoutError?V.ETIMEDOUT:V.ECONNABORTED,e,v)),g(),v=null},i===void 0&&l.setContentType(null),"setRequestHeader"in v&&T.forEach(U_(l),function(O,S){v.setRequestHeader(S,O)}),T.isUndefined(a.withCredentials)||(v.withCredentials=!!a.withCredentials),o&&o!=="json"&&(v.responseType=a.responseType),s&&([d,x]=Bc(s,!0),v.addEventListener("progress",d)),u&&v.upload&&([c,h]=Bc(u),v.upload.addEventListener("progress",c),v.upload.addEventListener("loadend",h)),(a.cancelToken||a.signal)&&(f=b=>{v&&(r(!b||b.type?new Zu(null,e,v):b),v.abort(),g(),v=null)},a.cancelToken&&a.cancelToken.subscribe(f),a.signal&&(a.signal.aborted?f():a.signal.addEventListener("abort",f)));const m=CP(a.url);if(m&&!wt.protocols.includes(m)){r(new V("Unsupported protocol "+m+":",V.ERR_BAD_REQUEST,e)),g();return}v.send(i||null)})},VP=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const a=function(u){if(!r){r=!0,l();const s=u instanceof Error?u:this.reason;n.abort(s instanceof V?s:new Zu(s instanceof Error?s.message:s))}};let i=t&&setTimeout(()=>{i=null,a(new V(`timeout of ${t}ms exceeded`,V.ETIMEDOUT))},t);const l=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(a):u.removeEventListener("abort",a)}),e=null)};e.forEach(u=>u.addEventListener("abort",a,{once:!0}));const{signal:o}=n;return o.unsubscribe=()=>T.asap(l),o},KP=function*(e,t){let n=e.byteLength;if(n{const a=FP(e,t);let i=0,l,o=u=>{l||(l=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:s,value:f}=await a.next();if(s){o(),u.close();return}let c=f.byteLength;if(n){let d=i+=c;n(d)}u.enqueue(new Uint8Array(f))}catch(s){throw o(s),s}},cancel(u){return o(u),a.return()}},{highWaterMark:2})},Lc=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,WP=(e,t,n)=>t+2h>=2&&r.charCodeAt(h-2)===37&&r.charCodeAt(h-1)===51&&(r.charCodeAt(h)===68||r.charCodeAt(h)===100);s>=0&&(r.charCodeAt(s)===61?(u++,s--):f(s)&&(u++,s-=3)),u===1&&s>=0&&(r.charCodeAt(s)===61||f(s))&&u++;const d=Math.floor(l/4)*3-(u||0);return d>0?d:0}let i=0;for(let l=0,o=r.length;l=55296&&u<=56319&&l+1=56320&&s<=57343?(i+=4,l++):i+=3}else i+=3}return i}const s0="1.18.1",px=64*1024,{isFunction:As}=T,JP=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),yx=e=>{if(!T.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},mx=(e,...t)=>{try{return!!e(...t)}catch{return!1}},eD=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},tD=e=>{const t=T.global!==void 0&&T.global!==null?T.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=T.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:a,Request:i,Response:l}=e,o=a?As(a):typeof fetch=="function",u=As(i),s=As(l);if(!o)return!1;const f=o&&As(n),c=o&&(typeof r=="function"?(y=>m=>y.encode(m))(new r):async y=>new Uint8Array(await new i(y).arrayBuffer())),d=u&&f&&mx(()=>{let y=!1;const m=new i(wt.origin,{body:new n,method:"POST",get duplex(){return y=!0,"half"}}),b=m.headers.has("Content-Type");return m.body!=null&&m.body.cancel(),y&&!b}),h=s&&f&&mx(()=>T.isReadableStream(new l("").body)),x={stream:h&&(y=>y.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!x[y]&&(x[y]=(m,b)=>{let O=m&&m[y];if(O)return O.call(m);throw new V(`Response type '${y}' is not supported`,V.ERR_NOT_SUPPORT,b)})});const g=async y=>{if(y==null)return 0;if(T.isBlob(y))return y.size;if(T.isSpecCompliantForm(y))return(await new i(wt.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(T.isArrayBufferView(y)||T.isArrayBuffer(y))return y.byteLength;if(T.isURLSearchParams(y)&&(y=y+""),T.isString(y))return(await c(y)).byteLength},v=async(y,m)=>{const b=T.toFiniteNumber(y.getContentLength());return b??g(m)};return async y=>{let{url:m,method:b,data:O,signal:S,cancelToken:w,timeout:A,onDownloadProgress:E,onUploadProgress:j,responseType:$,headers:P,withCredentials:M="same-origin",fetchOptions:k,maxContentLength:z,maxBodyLength:B}=W_(y);const N=T.isNumber(z)&&z>-1,R=T.isNumber(B)&&B>-1,D=re=>T.hasOwnProp(y,re)?y[re]:void 0;let U=a||fetch;$=$?($+"").toLowerCase():"text";let q=VP([S,w&&w.toAbortSignal()],A),X=null;const G=q&&q.unsubscribe&&(()=>{q.unsubscribe()});let W,oe=null;const _e=()=>new V("Request body larger than maxBodyLength limit",V.ERR_BAD_REQUEST,y,X);try{let re;const We=D("auth");if(We){const Q=T.getSafeProp(We,"username")||"",Ee=T.getSafeProp(We,"password")||"";re={username:Q,password:Ee}}if(eD(m)){const Q=new URL(m,wt.origin);if(!re&&(Q.username||Q.password)){const Ee=yx(Q.username),gt=yx(Q.password);re={username:Ee,password:gt}}(Q.username||Q.password)&&(Q.username="",Q.password="",m=Q.href)}if(re&&(P.delete("authorization"),P.set("Authorization","Basic "+btoa(JP((re.username||"")+":"+(re.password||""))))),N&&typeof m=="string"&&m.startsWith("data:")&&ZP(m)>z)throw new V("maxContentLength size of "+z+" exceeded",V.ERR_BAD_RESPONSE,y,X);if(R&&b!=="get"&&b!=="head"){const Q=await g(O);if(typeof Q=="number"&&isFinite(Q)&&(W=Q,Q>B))throw _e()}const at=R&&(T.isReadableStream(O)||T.isStream(O)),K=(Q,Ee,gt)=>hx(Q,px,zt=>{if(R&&zt>B)throw oe=_e();Ee&&Ee(zt)},gt);if(d&&b!=="get"&&b!=="head"&&(j||at)){if(W=W??await v(P,O),W!==0||at){let Q=new i(m,{method:"POST",body:O,duplex:"half"}),Ee;if(T.isFormData(O)&&(Ee=Q.headers.get("content-type"))&&P.setContentType(Ee),Q.body){const[gt,zt]=j&&sx(W,Bc(cx(j)))||[];O=K(Q.body,gt,zt)}}}else if(at&&!u&&f&&b!=="get"&&b!=="head")O=K(O);else if(at&&u&&!d&&b!=="get"&&b!=="head")throw new V("Stream request bodies are not supported by the current fetch implementation",V.ERR_NOT_SUPPORT,y,X);T.isString(M)||(M=M?"include":"omit");const ee=u&&"credentials"in i.prototype;if(T.isFormData(O)){const Q=P.getContentType();Q&&/^multipart\/form-data/i.test(Q)&&!/boundary=/i.test(Q)&&P.delete("content-type")}P.set("User-Agent","axios/"+s0,!1);const ae={...k,signal:q,method:b.toUpperCase(),headers:U_(P.normalize()),body:O,duplex:"half",credentials:ee?M:void 0};X=u&&new i(m,ae);let H=await(u?U(X,k):U(m,ae));const Re=Ct.from(H.headers);if(N){const Q=T.toFiniteNumber(Re.getContentLength());if(Q!=null&&Q>z)throw new V("maxContentLength size of "+z+" exceeded",V.ERR_BAD_RESPONSE,y,X)}const se=h&&($==="stream"||$==="response");if(h&&H.body&&(E||N||se&&G)){const Q={};["status","statusText","headers"].forEach(Vt=>{Q[Vt]=H[Vt]});const Ee=T.toFiniteNumber(Re.getContentLength()),[gt,zt]=E&&sx(Ee,Bc(cx(E),!0))||[];let ya=0;const Fn=Vt=>{if(N&&(ya=Vt,ya>z))throw new V("maxContentLength size of "+z+" exceeded",V.ERR_BAD_RESPONSE,y,X);gt&>(Vt)};H=new l(hx(H.body,px,Fn,()=>{zt&&zt(),G&&G()}),Q)}$=$||"text";let Se=await x[T.findKey(x,$)||"text"](H,y);if(N&&!h&&!se){let Q;if(Se!=null&&(typeof Se.byteLength=="number"?Q=Se.byteLength:typeof Se.size=="number"?Q=Se.size:typeof Se=="string"&&(Q=typeof r=="function"?new r().encode(Se).byteLength:Se.length)),typeof Q=="number"&&Q>z)throw new V("maxContentLength size of "+z+" exceeded",V.ERR_BAD_RESPONSE,y,X)}return!se&&G&&G(),await new Promise((Q,Ee)=>{F_(Q,Ee,{data:Se,headers:Ct.from(H.headers),status:H.status,statusText:H.statusText,config:y,request:X})})}catch(re){if(G&&G(),q&&q.aborted&&q.reason instanceof V){const We=q.reason;throw We.config=y,X&&(We.request=X),re!==We&&Object.defineProperty(We,"cause",{__proto__:null,value:re,writable:!0,enumerable:!1,configurable:!0}),We}if(oe)throw X&&!oe.request&&(oe.request=X),oe;if(re instanceof V)throw X&&!re.request&&(re.request=X),re;if(re&&re.name==="TypeError"&&/Load failed|fetch/i.test(re.message)){const We=new V("Network Error",V.ERR_NETWORK,y,X,re&&re.response);throw Object.defineProperty(We,"cause",{__proto__:null,value:re.cause||re,writable:!0,enumerable:!1,configurable:!0}),We}throw V.from(re,re&&re.code,y,X,re&&re.response)}}},nD=new Map,Z_=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:a}=t,i=[r,a,n];let l=i.length,o=l,u,s,f=nD;for(;o--;)u=i[o],s=f.get(u),s===void 0&&f.set(u,s=o?new Map:tD(t)),f=s;return s};Z_();const c0={http:yP,xhr:XP,fetch:{get:Z_}};T.forEach(c0,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const vx=e=>`- ${e}`,rD=e=>T.isFunction(e)||e===null||e===!1;function aD(e,t){e=T.isArray(e)?e:[e];const{length:n}=e;let r,a;const i={};for(let l=0;l`adapter ${u} `+(s===!1?"is not supported by the environment":"is not available in the build"));let o=n?l.length>1?`since : `+l.map(vx).join(` `):" "+vx(l[0]):"as no adapter specified";throw new V("There is no suitable adapter to dispatch the request "+o,V.ERR_NOT_SUPPORT)}return a}const J_={getAdapter:aD,adapters:c0};function Xh(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Zu(null,e)}function gx(e){return Xh(e),e.headers=Ct.from(e.headers),e.data=Yh.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),J_.getAdapter(e.adapter||Wu.adapter,e)(e).then(function(r){Xh(e),e.response=r;try{r.data=Yh.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=Ct.from(r.headers),r},function(r){if(!K_(r)&&(Xh(e),r&&r.response)){e.response=r.response;try{r.response.data=Yh.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=Ct.from(r.response.headers)}return Promise.reject(r)})}const cd={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{cd[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const bx={};cd.transitional=function(t,n,r){function a(i,l){return"[Axios v"+s0+"] Transitional option '"+i+"'"+l+(r?". "+r:"")}return(i,l,o)=>{if(t===!1)throw new V(a(l," has been removed"+(n?" in "+n:"")),V.ERR_DEPRECATED);return n&&!bx[l]&&(bx[l]=!0,console.warn(a(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,l,o):!0}};cd.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function iD(e,t,n){if(typeof e!="object"||e===null)throw new V("options must be an object",V.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const i=r[a],l=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(l){const o=e[i],u=o===void 0||l(o,i,e);if(u!==!0)throw new V("option "+i+" must be "+u,V.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new V("Unknown option "+i,V.ERR_BAD_OPTION)}}const rc={assertOptions:iD,validators:cd},jt=rc.validators;let Ra=class{constructor(t){this.defaults=t||{},this.interceptors={request:new ox,response:new ox}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const i=(()=>{if(!a.stack)return"";const l=a.stack.indexOf(` `);return l===-1?"":a.stack.slice(l+1)})();try{if(!r.stack)r.stack=i;else if(i){const l=i.indexOf(` `),o=l===-1?-1:i.indexOf(` `,l+1),u=o===-1?"":i.slice(o+1);String(r.stack).endsWith(u)||(r.stack+=` `+i)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ya(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:i}=n;r!==void 0&&rc.assertOptions(r,{silentJSONParsing:jt.transitional(jt.boolean),forcedJSONParsing:jt.transitional(jt.boolean),clarifyTimeoutError:jt.transitional(jt.boolean),legacyInterceptorReqResOrdering:jt.transitional(jt.boolean),advertiseZstdAcceptEncoding:jt.transitional(jt.boolean),validateStatusUndefinedResolves:jt.transitional(jt.boolean)},!1),a!=null&&(T.isFunction(a)?n.paramsSerializer={serialize:a}:rc.assertOptions(a,{encode:jt.function,serialize:jt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),rc.assertOptions(n,{baseUrl:jt.spelling("baseURL"),withXsrfToken:jt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=i&&T.merge(i.common,i[n.method]);i&&T.forEach(["delete","get","head","post","put","patch","query","common"],x=>{delete i[x]}),n.headers=Ct.concat(l,i);const o=[];let u=!0;this.interceptors.request.forEach(function(g){if(typeof g.runWhen=="function"&&g.runWhen(n)===!1)return;u=u&&g.synchronous;const v=n.transitional||o0;v&&v.legacyInterceptorReqResOrdering?o.unshift(g.fulfilled,g.rejected):o.push(g.fulfilled,g.rejected)});const s=[];this.interceptors.response.forEach(function(g){s.push(g.fulfilled,g.rejected)});let f,c=0,d;if(!u){const x=[gx.bind(this),void 0];for(x.unshift(...o),x.push(...s),d=x.length,f=Promise.resolve(n);c{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](a);r._listeners=null}),this.promise.then=a=>{let i;const l=new Promise(o=>{r.subscribe(o),i=o}).then(a);return l.cancel=function(){r.unsubscribe(i)},l},t(function(i,l,o){r.reason||(r.reason=new Zu(i,l,o),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new eE(function(a){t=a}),cancel:t}}};function oD(e){return function(n){return e.apply(null,n)}}function uD(e){return T.isObject(e)&&e.isAxiosError===!0}const Ty={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ty).forEach(([e,t])=>{Ty[t]=e});function tE(e){const t=new Ra(e),n=C_(Ra.prototype.request,t);return T.extend(n,Ra.prototype,t,{allOwnKeys:!0}),T.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return tE(Ya(e,a))},n}const He=tE(Wu);He.Axios=Ra;He.CanceledError=Zu;He.CancelToken=lD;He.isCancel=K_;He.VERSION=s0;He.toFormData=sd;He.AxiosError=V;He.Cancel=He.CanceledError;He.all=function(t){return Promise.all(t)};He.spread=oD;He.isAxiosError=uD;He.mergeConfig=Ya;He.AxiosHeaders=Ct;He.formToJSON=e=>V_(T.isHTMLForm(e)?new FormData(e):e);He.getAdapter=J_.getAdapter;He.HttpStatusCode=Ty;He.default=He;const{Axios:Nre,AxiosError:Mre,CanceledError:Cre,isCancel:$re,CancelToken:Pre,VERSION:Dre,all:Rre,Cancel:zre,isAxiosError:Bre,spread:Lre,toFormData:kre,AxiosHeaders:Ure,HttpStatusCode:Ire,formToJSON:Hre,getAdapter:qre,mergeConfig:Gre,create:Yre}=He,te=He.create({baseURL:"/api/fa",timeout:15e3});te.interceptors.request.use(e=>{const t=localStorage.getItem("fa_token");return t&&(e.headers.Authorization=`Bearer ${t}`),e});te.interceptors.response.use(e=>e,e=>{var t;return((t=e.response)==null?void 0:t.status)===401&&(localStorage.removeItem("fa_token"),localStorage.removeItem("fa_user"),window.location.href="/login"),Promise.reject(e)});const sD=(e,t)=>te.post("/auth/login",{username:e,password:t}),cD=(e,t)=>te.post("/auth/verify-otp",{verifyToken:e,code:t}),fD=()=>te.get("/auth/me"),dD=()=>te.post("/auth/otp/setup"),hD=e=>te.post("/auth/otp/confirm",{code:e}),pD=()=>te.post("/auth/otp/disable"),yD=(e,t)=>te.post("/auth/change-password",{currentPassword:e,newPassword:t});function mD(){const[e,t]=_.useState("login"),[n,r]=_.useState(""),[a,i]=_.useState(""),[l,o]=_.useState(""),[u,s]=_.useState(""),[f,c]=_.useState("OTP"),[d,h]=_.useState(""),[x,g]=_.useState(""),[v,y]=_.useState(""),[m,b]=_.useState(!1),O=n0(),S=f==="OTP_SETUP",w=P=>{localStorage.setItem("fa_token",P.token),localStorage.setItem("fa_user",JSON.stringify({username:P.username,role:P.role,workstationCode:P.workstationCode})),O("/dashboard")},A=async P=>{var M,k,z,B;P.preventDefault(),b(!0),y("");try{const R=(await sD(n,a)).data||{};if(R.twofa==="true"){s(R.verifyToken||""),c(R.verifyMethod||"OTP"),h(R.qrImage||""),g(R.secret||""),o(""),t("verify");return}if(!R.token)throw new Error("no token");w(R)}catch(N){y(((k=(M=N.response)==null?void 0:M.data)==null?void 0:k.error)||((B=(z=N.response)==null?void 0:z.data)==null?void 0:B.message)||"로그인 실패")}finally{b(!1)}},E=async P=>{var M,k,z,B;P.preventDefault(),b(!0),y("");try{const R=(await cD(u,l)).data||{};if(!R.token)throw new Error("no token");w(R)}catch(N){y(((k=(M=N.response)==null?void 0:M.data)==null?void 0:k.error)||((B=(z=N.response)==null?void 0:z.data)==null?void 0:B.message)||"인증 실패 — 코드를 확인하세요.")}finally{b(!1)}},j=()=>{t("login"),o(""),y(""),h(""),g("")},$="w-full bg-slate-700 border border-slate-600 rounded-lg px-3 py-2 text-white text-sm focus:outline-none focus:border-blue-500";return p.jsx("div",{className:"min-h-screen bg-slate-900 flex items-center justify-center",children:p.jsxs("div",{className:"bg-slate-800 rounded-xl p-8 w-96 border border-slate-700",children:[p.jsxs("div",{className:"text-center mb-8",children:[p.jsx("div",{className:"text-blue-400 text-3xl font-bold mb-2",children:"GUARDiA FA"}),p.jsx("div",{className:"text-slate-400 text-sm",children:"Factory Automation Platform"}),p.jsx("div",{className:"text-slate-500 text-xs mt-1",children:"e-Paper · QR WIP · MES 통합 플랫폼"})]}),e==="login"?p.jsxs("form",{onSubmit:A,className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx("label",{className:"block text-sm text-slate-300 mb-1",children:"사용자명"}),p.jsx("input",{type:"text",value:n,onChange:P=>r(P.target.value),className:$,placeholder:"username",autoComplete:"username",required:!0})]}),p.jsxs("div",{children:[p.jsx("label",{className:"block text-sm text-slate-300 mb-1",children:"비밀번호"}),p.jsx("input",{type:"password",value:a,onChange:P=>i(P.target.value),className:$,placeholder:"password",autoComplete:"current-password",required:!0})]}),v&&p.jsx("div",{className:"text-red-400 text-sm",children:v}),p.jsx("button",{type:"submit",disabled:m,className:"w-full bg-blue-600 hover:bg-blue-700 disabled:opacity-50 text-white rounded-lg py-2.5 text-sm font-medium transition-colors",children:m?"로그인 중...":"로그인"})]}):p.jsxs("form",{onSubmit:E,className:"space-y-4",children:[p.jsxs("div",{className:"text-center",children:[p.jsx("div",{className:"text-white text-lg font-semibold mb-1",children:"2차 인증"}),S?p.jsx("p",{className:"text-slate-400 text-xs",children:"최초 로그인입니다. 아래 QR을 Authenticator 앱(Google·Microsoft)으로 스캔해 등록한 뒤 6자리 코드를 입력하세요."}):p.jsx("p",{className:"text-slate-400 text-xs",children:"Authenticator 앱에 표시된 6자리 코드를 입력하세요."})]}),S&&d&&p.jsx("div",{className:"flex justify-center",children:p.jsx("img",{src:d,alt:"OTP QR",width:176,height:176,style:{background:"#fff",padding:8,borderRadius:8}})}),S&&x&&p.jsxs("div",{children:[p.jsx("div",{className:"text-[11px] text-slate-500 mb-1",children:"QR 스캔이 안 되면 수동 입력 키"}),p.jsx("code",{className:"block text-xs text-blue-300 bg-slate-900 border border-slate-700 rounded-md px-2 py-1.5 break-all select-all",children:x})]}),p.jsxs("div",{children:[p.jsx("label",{className:"block text-sm text-slate-300 mb-1",children:"인증 코드"}),p.jsx("input",{value:l,onChange:P=>o(P.target.value.replace(/\D/g,"").slice(0,6)),inputMode:"numeric",autoComplete:"one-time-code",maxLength:6,autoFocus:!0,placeholder:"000000",className:$+" tracking-[0.4em] text-center"})]}),v&&p.jsx("div",{className:"text-red-400 text-sm",children:v}),p.jsx("button",{type:"submit",disabled:m||l.length!==6,className:"w-full bg-blue-600 hover:bg-blue-700 disabled:opacity-50 text-white rounded-lg py-2.5 text-sm font-medium transition-colors",children:m?"인증 중...":S?"등록하고 로그인":"로그인"}),p.jsx("button",{type:"button",onClick:j,className:"w-full border border-slate-600 text-slate-300 hover:bg-slate-700 rounded-lg py-2 text-sm transition-colors",children:"이전 단계로"})]}),e==="login"&&p.jsx("div",{className:"mt-4 text-xs text-slate-500 text-center",children:"기본 계정: admin / admin123"})]})})}function vD(){const[e,t]=_.useState({}),[n,r]=_.useState({}),[a,i]=_.useState({}),[l,o]=_.useState({});_.useEffect(()=>{Promise.all([te.get("/dashboard/overview"),te.get("/dashboard/oee-summary"),te.get("/dashboard/andon-summary"),te.get("/dashboard/epaper-status")]).then(([f,c,d,h])=>{t(f.data),r(c.data),i(d.data),o(h.data)}).catch(console.error)},[]);const u=[{name:"가동률",value:Math.round((n.availability||.92)*100),fill:"#3b82f6"},{name:"성능률",value:Math.round((n.performance||.88)*100),fill:"#10b981"},{name:"품질률",value:Math.round((n.quality||.97)*100),fill:"#f59e0b"}],s=({title:f,value:c,sub:d,color:h})=>p.jsxs("div",{className:"bg-slate-800 rounded-xl p-5 border border-slate-700",children:[p.jsx("div",{className:"text-slate-400 text-sm mb-1",children:f}),p.jsx("div",{className:`text-3xl font-bold ${h||"text-white"}`,children:c??"-"}),d&&p.jsx("div",{className:"text-slate-500 text-xs mt-1",children:d})]});return p.jsxs("div",{className:"space-y-6",children:[p.jsx("h1",{className:"text-xl font-bold text-white",children:"공장 전체 현황 대시보드"}),p.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[p.jsx(s,{title:"총 작업장",value:e.workstations,color:"text-blue-400",sub:"운영 중"}),p.jsx(s,{title:"오늘 생산 오더",value:e.todayOrders,color:"text-green-400",sub:"건"}),p.jsx(s,{title:"활성 안돈",value:e.activeAndon,color:"text-red-400",sub:"건 대응 필요"}),p.jsx(s,{title:"e-Paper 온라인",value:l.online,color:"text-emerald-400",sub:`전체 ${l.total}대`})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[p.jsxs("div",{className:"bg-slate-800 rounded-xl p-5 border border-slate-700",children:[p.jsx("h2",{className:"text-sm font-medium text-slate-300 mb-4",children:"OEE 지표 (종합 설비 효율)"}),p.jsxs("div",{className:"flex items-center gap-4",children:[p.jsxs("div",{className:"text-center",children:[p.jsxs("div",{className:"text-4xl font-bold text-blue-400",children:[Math.round((n.availability||.92)*(n.performance||.88)*(n.quality||.97)*100),"%"]}),p.jsx("div",{className:"text-slate-500 text-xs mt-1",children:"종합 OEE"})]}),p.jsx("div",{className:"flex-1",children:u.map(f=>p.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[p.jsx("div",{className:"text-xs text-slate-400 w-16",children:f.name}),p.jsx("div",{className:"flex-1 bg-slate-700 rounded-full h-2",children:p.jsx("div",{className:"h-2 rounded-full",style:{width:`${f.value}%`,backgroundColor:f.fill}})}),p.jsxs("div",{className:"text-xs text-slate-300 w-8 text-right",children:[f.value,"%"]})]},f.name))})]})]}),p.jsxs("div",{className:"bg-slate-800 rounded-xl p-5 border border-slate-700",children:[p.jsx("h2",{className:"text-sm font-medium text-slate-300 mb-4",children:"e-Paper 디스플레이 현황"}),p.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[p.jsxs("div",{className:"bg-slate-700 rounded-lg p-3 text-center",children:[p.jsx("div",{className:"text-2xl font-bold text-emerald-400",children:l.online||0}),p.jsx("div",{className:"text-xs text-slate-400",children:"온라인"})]}),p.jsxs("div",{className:"bg-slate-700 rounded-lg p-3 text-center",children:[p.jsx("div",{className:"text-2xl font-bold text-slate-400",children:l.offline||0}),p.jsx("div",{className:"text-xs text-slate-400",children:"오프라인"})]}),p.jsxs("div",{className:"bg-slate-700 rounded-lg p-3 text-center",children:[p.jsx("div",{className:"text-2xl font-bold text-yellow-400",children:l.batteryLow||0}),p.jsx("div",{className:"text-xs text-slate-400",children:"배터리 부족"})]}),p.jsxs("div",{className:"bg-slate-700 rounded-lg p-3 text-center",children:[p.jsx("div",{className:"text-2xl font-bold text-blue-400",children:l.total||0}),p.jsx("div",{className:"text-xs text-slate-400",children:"전체"})]})]})]})]}),p.jsxs("div",{className:"bg-slate-800 rounded-xl p-5 border border-slate-700",children:[p.jsx("h2",{className:"text-sm font-medium text-slate-300 mb-4",children:"안돈 통계 (오늘)"}),p.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[p.jsxs("div",{className:"text-center",children:[p.jsx("div",{className:"text-2xl font-bold text-white",children:(a==null?void 0:a.total_today)||0}),p.jsx("div",{className:"text-xs text-slate-400",children:"총 발생"})]}),p.jsxs("div",{className:"text-center",children:[p.jsx("div",{className:"text-2xl font-bold text-green-400",children:(a==null?void 0:a.resolved)||0}),p.jsx("div",{className:"text-xs text-slate-400",children:"해결"})]}),p.jsxs("div",{className:"text-center",children:[p.jsx("div",{className:"text-2xl font-bold text-red-400",children:(a==null?void 0:a.active)||0}),p.jsx("div",{className:"text-xs text-slate-400",children:"활성"})]}),p.jsxs("div",{className:"text-center",children:[p.jsxs("div",{className:"text-2xl font-bold text-yellow-400",children:[Math.round((a==null?void 0:a.avg_response_time)||0),"초"]}),p.jsx("div",{className:"text-xs text-slate-400",children:"평균 응답시간"})]})]})]})]})}const gD={GREEN:"bg-green-600 border-green-500",YELLOW:"bg-yellow-600 border-yellow-500",RED:"bg-red-600 border-red-500",BLUE:"bg-blue-600 border-blue-500"};function bD(){const[e,t]=_.useState([]);_.useEffect(()=>{te.get("/workstations/floor-map").then(r=>t(r.data)).catch(console.error)},[]);const n=Array.from(new Set(e.map(r=>r.lineCode||"DEFAULT")));return p.jsxs("div",{className:"space-y-6",children:[p.jsx("h1",{className:"text-xl font-bold text-white",children:"공장 배치도 (Floor Map)"}),p.jsxs("div",{className:"bg-slate-800 rounded-xl p-6 border border-slate-700",children:[p.jsxs("div",{className:"text-sm text-slate-400 mb-4",children:["안돈 상태:",p.jsx("span",{className:"ml-2 px-2 py-0.5 bg-green-600 rounded text-xs",children:"GREEN 정상"}),p.jsx("span",{className:"ml-2 px-2 py-0.5 bg-yellow-600 rounded text-xs",children:"YELLOW 주의"}),p.jsx("span",{className:"ml-2 px-2 py-0.5 bg-red-600 rounded text-xs",children:"RED 긴급"}),p.jsx("span",{className:"ml-2 px-2 py-0.5 bg-blue-600 rounded text-xs",children:"BLUE 도움요청"})]}),n.map(r=>p.jsxs("div",{className:"mb-6",children:[p.jsx("h3",{className:"text-slate-300 text-sm font-medium mb-3 border-b border-slate-700 pb-2",children:r}),p.jsx("div",{className:"flex flex-wrap gap-4",children:e.filter(a=>(a.lineCode||"DEFAULT")===r).map(a=>p.jsxs("div",{className:`border-2 rounded-xl p-4 w-48 ${gD[a.andonStatus]||"bg-slate-700 border-slate-600"}`,children:[p.jsx("div",{className:"font-bold text-white text-sm",children:a.workstationCode}),p.jsx("div",{className:"text-xs text-white/80 mt-1",children:a.workstationName}),p.jsxs("div",{className:"mt-3 space-y-1",children:[p.jsxs("div",{className:"text-xs text-white/70",children:["공정: ",a.processCode]}),p.jsxs("div",{className:"text-xs text-white/70",children:["상태: ",a.status]}),p.jsxs("div",{className:"flex justify-between mt-2",children:[p.jsx("span",{className:"text-xs text-white/70",children:"목표"}),p.jsx("span",{className:"text-xs font-bold text-white",children:a.targetCount||0})]}),p.jsxs("div",{className:"flex justify-between",children:[p.jsx("span",{className:"text-xs text-white/70",children:"실적"}),p.jsx("span",{className:"text-xs font-bold text-white",children:a.actualCount||0})]}),a.oee&&p.jsxs("div",{className:"mt-2",children:[p.jsxs("div",{className:"flex justify-between text-xs text-white/70 mb-1",children:[p.jsx("span",{children:"OEE"}),p.jsxs("span",{children:[Math.round(a.oee*100),"%"]})]}),p.jsx("div",{className:"bg-white/20 rounded-full h-1.5",children:p.jsx("div",{className:"bg-white h-1.5 rounded-full",style:{width:`${a.oee*100}%`}})})]})]})]},a.id))})]},r)),e.length===0&&p.jsx("div",{className:"text-center text-slate-500 py-8",children:"작업장 데이터가 없습니다."})]})]})}const xD={ONLINE:"text-green-400",OFFLINE:"text-slate-500",UPDATING:"text-yellow-400",ERROR:"text-red-400"};function SD(){const[e,t]=_.useState([]),[n,r]=_.useState({}),[a,i]=_.useState(""),l=()=>{te.get("/epaper",{params:a?{status:a}:{}}).then(s=>t(s.data)),te.get("/epaper/dashboard").then(s=>r(s.data))};_.useEffect(()=>{l()},[a]);const o=async s=>{const f=prompt("푸시할 내용 (JSON 형식):");f&&(await te.post(`/epaper/${s}/push`,{content:f,templateId:"default"}),l())},u=async s=>{await te.post(`/epaper/${s}/refresh`),alert("갱신 요청 완료")};return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("h1",{className:"text-xl font-bold text-white",children:"e-Paper 표시기 관리"}),p.jsx("div",{className:"flex gap-2",children:["","ONLINE","OFFLINE","ERROR"].map(s=>p.jsx("button",{onClick:()=>i(s),className:`px-3 py-1.5 rounded text-xs transition-colors ${a===s?"bg-blue-600 text-white":"bg-slate-700 text-slate-300 hover:bg-slate-600"}`,children:s||"전체"},s))})]}),p.jsx("div",{className:"grid grid-cols-4 gap-4",children:[{label:"전체",value:n.total,color:"text-white"},{label:"온라인",value:n.online,color:"text-green-400"},{label:"오프라인",value:n.offline,color:"text-slate-400"},{label:"배터리 부족",value:n.batteryLow,color:"text-yellow-400"}].map(({label:s,value:f,color:c})=>p.jsxs("div",{className:"bg-slate-800 rounded-xl p-4 border border-slate-700 text-center",children:[p.jsx("div",{className:`text-2xl font-bold ${c}`,children:f??"-"}),p.jsx("div",{className:"text-xs text-slate-400 mt-1",children:s})]},s))}),p.jsxs("div",{className:"bg-slate-800 rounded-xl border border-slate-700 overflow-hidden",children:[p.jsxs("table",{className:"w-full text-sm",children:[p.jsx("thead",{children:p.jsxs("tr",{className:"border-b border-slate-700",children:[p.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"디스플레이 ID"}),p.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"작업장"}),p.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"크기/타입"}),p.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"배터리"}),p.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"신호"}),p.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"상태"}),p.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"프로토콜"}),p.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"작업"})]})}),p.jsx("tbody",{children:e.map(s=>{var f;return p.jsxs("tr",{className:"border-b border-slate-700/50 hover:bg-slate-700/30",children:[p.jsx("td",{className:"px-4 py-3 font-mono text-blue-400",children:s.displayId}),p.jsx("td",{className:"px-4 py-3 text-slate-300",children:s.workstationId||"-"}),p.jsxs("td",{className:"px-4 py-3 text-slate-300",children:[s.displaySize," / ",s.displayType]}),p.jsx("td",{className:"px-4 py-3",children:p.jsxs("span",{className:`flex items-center gap-1 ${(s.batteryLevel||0)<20?"text-red-400":"text-green-400"}`,children:[p.jsx(B4,{size:12}),((f=s.batteryLevel)==null?void 0:f.toFixed(0))||0,"%"]})}),p.jsx("td",{className:"px-4 py-3",children:p.jsxs("span",{className:"flex items-center gap-1 text-slate-300",children:[p.jsx(c$,{size:12}),s.signalStrength||"-"," dBm"]})}),p.jsx("td",{className:"px-4 py-3",children:p.jsx("span",{className:`font-medium ${xD[s.status]||"text-slate-400"}`,children:s.status})}),p.jsx("td",{className:"px-4 py-3 text-slate-400 text-xs",children:s.protocol}),p.jsx("td",{className:"px-4 py-3",children:p.jsxs("div",{className:"flex gap-2",children:[p.jsxs("button",{onClick:()=>o(s.id),className:"flex items-center gap-1 px-2 py-1 bg-blue-700 hover:bg-blue-600 rounded text-xs text-white transition-colors",children:[p.jsx(j_,{size:10})," 푸시"]}),p.jsxs("button",{onClick:()=>u(s.id),className:"flex items-center gap-1 px-2 py-1 bg-slate-600 hover:bg-slate-500 rounded text-xs text-white transition-colors",children:[p.jsx(E_,{size:10})," 갱신"]})]})})]},s.id)})})]}),e.length===0&&p.jsx("div",{className:"text-center text-slate-500 py-8",children:"등록된 e-Paper 표시기가 없습니다."})]})]})}function OD(){const[e,t]=_.useState(""),[n,r]=_.useState(null),[a,i]=_.useState([]),[l,o]=_.useState([]),[u,s]=_.useState(""),[f,c]=_.useState([]),d=async()=>{if(e.trim())try{const[g,v,y]=await Promise.all([te.get(`/qr/${e}`),te.get(`/qr/${e}/history`),te.get(`/qr/${e}/route`)]);r(g.data),i(v.data),o(y.data)}catch{r(null)}},h=async()=>{const g=prompt("제품 코드:");if(!g)return;const v=prompt("LOT 번호:"),y=prompt("수량:"),m=await te.post("/qr/generate",{codeType:"WIP",productCode:g,lotNumber:v,quantity:parseInt(y||"1"),currentProcess:"START"});alert(`QR 코드 생성: ${m.data.qrCode}`)},x={IN_PROCESS:"bg-blue-700 text-blue-200",WAITING:"bg-yellow-700 text-yellow-200",COMPLETED:"bg-green-700 text-green-200",HOLD:"bg-orange-700 text-orange-200",REJECTED:"bg-red-700 text-red-200"};return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("h1",{className:"text-xl font-bold text-white",children:"QR WIP 추적"}),p.jsxs("button",{onClick:h,className:"flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg text-sm transition-colors",children:[p.jsx(J4,{size:14})," QR 생성"]})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[p.jsxs("div",{className:"bg-slate-800 rounded-xl p-5 border border-slate-700",children:[p.jsx("h2",{className:"text-sm font-medium text-slate-300 mb-3",children:"QR 코드 조회"}),p.jsxs("div",{className:"flex gap-2 mb-4",children:[p.jsx("input",{value:e,onChange:g=>t(g.target.value),placeholder:"QR 코드 입력...",className:"flex-1 bg-slate-700 border border-slate-600 rounded-lg px-3 py-2 text-sm text-white focus:outline-none focus:border-blue-500"}),p.jsx("button",{onClick:d,className:"px-3 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg transition-colors",children:p.jsx(r$,{size:16})})]}),n&&p.jsxs("div",{className:"space-y-2 text-sm",children:[p.jsxs("div",{className:"flex justify-between",children:[p.jsx("span",{className:"text-slate-400",children:"제품코드"}),p.jsx("span",{className:"text-white font-mono",children:n.productCode})]}),p.jsxs("div",{className:"flex justify-between",children:[p.jsx("span",{className:"text-slate-400",children:"LOT 번호"}),p.jsx("span",{className:"text-white font-mono",children:n.lotNumber})]}),p.jsxs("div",{className:"flex justify-between",children:[p.jsx("span",{className:"text-slate-400",children:"현재 공정"}),p.jsx("span",{className:"text-white",children:n.currentProcess})]}),p.jsxs("div",{className:"flex justify-between",children:[p.jsx("span",{className:"text-slate-400",children:"현재 작업장"}),p.jsx("span",{className:"text-white",children:n.currentWorkstation})]}),p.jsxs("div",{className:"flex justify-between",children:[p.jsx("span",{className:"text-slate-400",children:"상태"}),p.jsx("span",{className:`px-2 py-0.5 rounded text-xs ${x[n.status]||"bg-slate-600 text-slate-200"}`,children:n.status})]})]})]}),p.jsxs("div",{className:"bg-slate-800 rounded-xl p-5 border border-slate-700",children:[p.jsx("h2",{className:"text-sm font-medium text-slate-300 mb-3",children:"공정 경로"}),l.length>0?p.jsx("div",{className:"space-y-2",children:l.map((g,v)=>p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("div",{className:"w-6 h-6 rounded-full bg-blue-600 text-white text-xs flex items-center justify-center font-bold",children:g.sequence||v+1}),p.jsxs("div",{children:[p.jsx("div",{className:"text-sm text-white",children:g.processName}),p.jsxs("div",{className:"text-xs text-slate-400",children:[g.workstationCode," · ",g.standardTime,"분"]})]})]},g.id))}):p.jsx("div",{className:"text-slate-500 text-sm",children:"QR 코드를 조회하면 공정 경로가 표시됩니다."})]})]}),p.jsxs("div",{className:"bg-slate-800 rounded-xl p-5 border border-slate-700",children:[p.jsx("h2",{className:"text-sm font-medium text-slate-300 mb-3",children:"스캔 이력"}),p.jsxs("div",{className:"overflow-x-auto",children:[p.jsxs("table",{className:"w-full text-sm",children:[p.jsx("thead",{children:p.jsxs("tr",{className:"border-b border-slate-700",children:[p.jsx("th",{className:"px-3 py-2 text-left text-slate-400",children:"시간"}),p.jsx("th",{className:"px-3 py-2 text-left text-slate-400",children:"작업장"}),p.jsx("th",{className:"px-3 py-2 text-left text-slate-400",children:"스캔 타입"}),p.jsx("th",{className:"px-3 py-2 text-left text-slate-400",children:"결과"}),p.jsx("th",{className:"px-3 py-2 text-left text-slate-400",children:"작업자"})]})}),p.jsx("tbody",{children:a.map(g=>{var v;return p.jsxs("tr",{className:"border-b border-slate-700/50",children:[p.jsx("td",{className:"px-3 py-2 text-slate-300 text-xs",children:(v=g.scannedAt)==null?void 0:v.replace("T"," ").slice(0,16)}),p.jsx("td",{className:"px-3 py-2 text-slate-300",children:g.workstationId}),p.jsx("td",{className:"px-3 py-2 text-slate-300",children:g.scanType}),p.jsx("td",{className:"px-3 py-2",children:p.jsx("span",{className:g.result==="OK"?"text-green-400":"text-red-400",children:g.result})}),p.jsx("td",{className:"px-3 py-2 text-slate-400",children:g.operatorId})]},g.id)})})]}),a.length===0&&p.jsx("div",{className:"text-center text-slate-500 py-4",children:"스캔 이력이 없습니다."})]})]})]})}const wD={PLANNED:"bg-slate-600 text-slate-200",RELEASED:"bg-blue-700 text-blue-200",IN_PROGRESS:"bg-yellow-700 text-yellow-200",COMPLETED:"bg-green-700 text-green-200"};function AD(){const[e,t]=_.useState([]),[n,r]=_.useState({}),[a,i]=_.useState(""),l=()=>{te.get("/orders",{params:a?{status:a}:{}}).then(s=>t(s.data)),te.get("/orders/dashboard").then(s=>r(s.data))};_.useEffect(()=>{l()},[a]);const o=async s=>{await te.post(`/orders/${s}/release`),l()},u=async s=>{await te.post(`/orders/${s}/complete`),l()};return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("h1",{className:"text-xl font-bold text-white",children:"생산 오더"}),p.jsx("div",{className:"flex gap-2",children:["","PLANNED","RELEASED","IN_PROGRESS","COMPLETED"].map(s=>p.jsx("button",{onClick:()=>i(s),className:`px-3 py-1.5 rounded text-xs transition-colors ${a===s?"bg-blue-600 text-white":"bg-slate-700 text-slate-300 hover:bg-slate-600"}`,children:s||"전체"},s))})]}),p.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[p.jsxs("div",{className:"bg-slate-800 rounded-xl p-4 border border-slate-700 text-center",children:[p.jsx("div",{className:"text-2xl font-bold text-white",children:n.todayTotal||0}),p.jsx("div",{className:"text-xs text-slate-400",children:"오늘 오더"})]}),p.jsxs("div",{className:"bg-slate-800 rounded-xl p-4 border border-slate-700 text-center",children:[p.jsx("div",{className:"text-2xl font-bold text-yellow-400",children:n.inProgress||0}),p.jsx("div",{className:"text-xs text-slate-400",children:"진행 중"})]}),p.jsxs("div",{className:"bg-slate-800 rounded-xl p-4 border border-slate-700 text-center",children:[p.jsx("div",{className:"text-2xl font-bold text-green-400",children:n.completed||0}),p.jsx("div",{className:"text-xs text-slate-400",children:"완료"})]}),p.jsxs("div",{className:"bg-slate-800 rounded-xl p-4 border border-slate-700 text-center",children:[p.jsxs("div",{className:"text-2xl font-bold text-blue-400",children:[Math.round(n.completionRate||0),"%"]}),p.jsx("div",{className:"text-xs text-slate-400",children:"완료율"})]})]}),p.jsxs("div",{className:"bg-slate-800 rounded-xl border border-slate-700 overflow-hidden",children:[p.jsxs("table",{className:"w-full text-sm",children:[p.jsx("thead",{children:p.jsxs("tr",{className:"border-b border-slate-700",children:[p.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"오더 번호"}),p.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"제품"}),p.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"라인"}),p.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"계획 수량"}),p.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"진행 수량"}),p.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"진척률"}),p.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"상태"}),p.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"작업"})]})}),p.jsx("tbody",{children:e.map(s=>{var c,d;const f=s.plannedQty?Math.round((s.completedQty||0)*100/s.plannedQty):0;return p.jsxs("tr",{className:"border-b border-slate-700/50 hover:bg-slate-700/30",children:[p.jsx("td",{className:"px-4 py-3 font-mono text-blue-400",children:s.orderNumber}),p.jsx("td",{className:"px-4 py-3 text-white",children:s.productName}),p.jsx("td",{className:"px-4 py-3 text-slate-300",children:s.lineCode}),p.jsx("td",{className:"px-4 py-3 text-slate-300",children:(c=s.plannedQty)==null?void 0:c.toLocaleString()}),p.jsx("td",{className:"px-4 py-3 text-slate-300",children:((d=s.completedQty)==null?void 0:d.toLocaleString())||0}),p.jsx("td",{className:"px-4 py-3 w-32",children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"flex-1 bg-slate-700 rounded-full h-1.5",children:p.jsx("div",{className:"bg-blue-500 h-1.5 rounded-full",style:{width:`${f}%`}})}),p.jsxs("span",{className:"text-xs text-slate-400",children:[f,"%"]})]})}),p.jsx("td",{className:"px-4 py-3",children:p.jsx("span",{className:`px-2 py-0.5 rounded text-xs ${wD[s.status]||""}`,children:s.status})}),p.jsx("td",{className:"px-4 py-3",children:p.jsxs("div",{className:"flex gap-1",children:[s.status==="PLANNED"&&p.jsxs("button",{onClick:()=>o(s.id),className:"flex items-center gap-1 px-2 py-1 bg-blue-700 hover:bg-blue-600 text-white rounded text-xs",children:[p.jsx(W4,{size:10})," 릴리즈"]}),s.status==="IN_PROGRESS"&&p.jsxs("button",{onClick:()=>u(s.id),className:"flex items-center gap-1 px-2 py-1 bg-green-700 hover:bg-green-600 text-white rounded text-xs",children:[p.jsx(w_,{size:10})," 완료"]})]})})]},s.id)})})]}),e.length===0&&p.jsx("div",{className:"text-center text-slate-500 py-8",children:"생산 오더가 없습니다."})]})]})}const _D={QUALITY:"bg-yellow-800 border-yellow-600",MATERIAL:"bg-orange-800 border-orange-600",MACHINE:"bg-red-800 border-red-600",SAFETY:"bg-red-900 border-red-500",HELP:"bg-blue-800 border-blue-600"},xx={INFO:"text-blue-400",WARNING:"text-yellow-400",CRITICAL:"text-red-400"};function ED(){const[e,t]=_.useState([]),[n,r]=_.useState([]),[a,i]=_.useState({}),l=()=>{te.get("/andon/board").then(s=>t(s.data)),te.get("/andon/events").then(s=>r(s.data)),te.get("/andon/stats").then(s=>i(s.data))};_.useEffect(()=>{l();const s=setInterval(l,1e4);return()=>clearInterval(s)},[]);const o=async s=>{const f=JSON.parse(localStorage.getItem("fa_user")||"{}");await te.put(`/andon/${s}/respond`,{responseBy:f.username}),l()},u=async s=>{await te.put(`/andon/${s}/resolve`),l()};return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("h1",{className:"text-xl font-bold text-white",children:"안돈 현황판"}),p.jsx("div",{className:"text-xs text-slate-500",children:"10초마다 자동 갱신"})]}),p.jsx("div",{className:"grid grid-cols-4 gap-4",children:[{label:"오늘 발생",value:a.total_today,color:"text-white"},{label:"해결 완료",value:a.resolved,color:"text-green-400"},{label:"현재 활성",value:a.active,color:"text-red-400"},{label:"평균 응답",value:`${Math.round(a.avg_response_time||0)}초`,color:"text-yellow-400"}].map(({label:s,value:f,color:c})=>p.jsxs("div",{className:"bg-slate-800 rounded-xl p-4 border border-slate-700 text-center",children:[p.jsx("div",{className:`text-2xl font-bold ${c}`,children:f??"-"}),p.jsx("div",{className:"text-xs text-slate-400 mt-1",children:s})]},s))}),e.length>0&&p.jsxs("div",{children:[p.jsxs("h2",{className:"text-sm font-medium text-red-400 mb-3",children:["활성 안돈 (",e.length,"건)"]}),p.jsx("div",{className:"grid grid-cols-3 gap-4",children:e.map(s=>{var f;return p.jsxs("div",{className:`border-2 rounded-xl p-4 ${_D[s.andonType]||"bg-slate-800 border-slate-600"}`,children:[p.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[p.jsx(od,{size:16,className:xx[s.severity]||"text-yellow-400"}),p.jsx("span",{className:"font-bold text-white",children:s.workstationCode}),p.jsx("span",{className:"text-xs text-white/60",children:s.andonType})]}),p.jsx("div",{className:"text-sm text-white/80 mb-3",children:s.description}),p.jsxs("div",{className:"text-xs text-white/60 mb-3",children:["호출: ",s.calledBy," · ",(f=s.calledAt)==null?void 0:f.replace("T"," ").slice(0,16)]}),p.jsxs("div",{className:"flex gap-2",children:[!s.respondedAt&&p.jsxs("button",{onClick:()=>o(s.id),className:"flex items-center gap-1 px-2 py-1 bg-white/20 hover:bg-white/30 text-white rounded text-xs",children:[p.jsx(s$,{size:10})," 응답"]}),p.jsxs("button",{onClick:()=>u(s.id),className:"flex items-center gap-1 px-2 py-1 bg-green-700 hover:bg-green-600 text-white rounded text-xs",children:[p.jsx(w_,{size:10})," 해결"]})]})]},s.id)})})]}),p.jsxs("div",{className:"bg-slate-800 rounded-xl border border-slate-700 overflow-hidden",children:[p.jsx("div",{className:"px-4 py-3 border-b border-slate-700",children:p.jsx("h2",{className:"text-sm font-medium text-slate-300",children:"안돈 이벤트 이력"})}),p.jsxs("table",{className:"w-full text-sm",children:[p.jsx("thead",{children:p.jsxs("tr",{className:"border-b border-slate-700",children:[p.jsx("th",{className:"px-4 py-2 text-left text-slate-400",children:"작업장"}),p.jsx("th",{className:"px-4 py-2 text-left text-slate-400",children:"타입"}),p.jsx("th",{className:"px-4 py-2 text-left text-slate-400",children:"심각도"}),p.jsx("th",{className:"px-4 py-2 text-left text-slate-400",children:"설명"}),p.jsx("th",{className:"px-4 py-2 text-left text-slate-400",children:"호출 시각"}),p.jsx("th",{className:"px-4 py-2 text-left text-slate-400",children:"상태"}),p.jsx("th",{className:"px-4 py-2 text-left text-slate-400",children:"응답시간"})]})}),p.jsx("tbody",{children:n.slice(0,20).map(s=>{var f;return p.jsxs("tr",{className:"border-b border-slate-700/50 hover:bg-slate-700/30",children:[p.jsx("td",{className:"px-4 py-2 font-bold text-white",children:s.workstationCode}),p.jsx("td",{className:"px-4 py-2 text-slate-300",children:s.andonType}),p.jsx("td",{className:"px-4 py-2",children:p.jsx("span",{className:xx[s.severity]||"text-slate-400",children:s.severity})}),p.jsx("td",{className:"px-4 py-2 text-slate-300 max-w-xs truncate",children:s.description}),p.jsx("td",{className:"px-4 py-2 text-slate-400 text-xs",children:(f=s.calledAt)==null?void 0:f.replace("T"," ").slice(0,16)}),p.jsx("td",{className:"px-4 py-2",children:p.jsx("span",{className:s.resolvedAt?"text-green-400":s.respondedAt?"text-yellow-400":"text-red-400",children:s.resolvedAt?"RESOLVED":s.respondedAt?"IN_PROGRESS":"OPEN"})}),p.jsx("td",{className:"px-4 py-2 text-slate-400",children:s.responseTimeSeconds?`${s.responseTimeSeconds}초`:"-"})]},s.id)})})]})]})]})}function nE(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t-1}var _5=A5,E5=dd;function j5(e,t){var n=this.__data__,r=E5(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var T5=j5,N5=f5,M5=b5,C5=O5,$5=_5,P5=T5;function Ul(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0?1:-1},Ea=function(t){return Xa(t)&&t.indexOf("%")===t.length-1},Y=function(t){return J6(t)&&!es(t)},rz=function(t){return ge(t)},ut=function(t){return Y(t)||Xa(t)},az=0,Ed=function(t){var n=++az;return"".concat(t||"").concat(n)},Va=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Y(t)&&!Xa(t))return r;var i;if(Ea(t)){var l=t.indexOf("%");i=n*parseFloat(t.slice(0,l))/100}else i=+t;return es(i)&&(i=r),a&&i>n&&(i=n),i},Br=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},iz=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function dz(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var $x={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},hr=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},Px=null,Fh=null,O0=function e(t){if(t===Px&&Array.isArray(Fh))return Fh;var n=[];return _.Children.forEach(t,function(r){ge(r)||(K6.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),Fh=n,Px=t,n};function $n(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(a){return hr(a)}):r=[hr(t)],O0(e).forEach(function(a){var i=Sn(a,"type.displayName")||Sn(a,"type.name");r.indexOf(i)!==-1&&n.push(a)}),n}function Qt(e,t){var n=$n(e,t);return n&&n[0]}var Dx=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,a=n.height;return!(!Y(r)||r<=0||!Y(a)||a<=0)},hz=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],pz=function(t){return t&&t.type&&Xa(t.type)&&hz.indexOf(t.type)>=0},yz=function(t,n,r,a){var i,l=(i=Kh==null?void 0:Kh[a])!==null&&i!==void 0?i:[];return n.startsWith("data-")||!ue(t)&&(a&&l.includes(n)||uz.includes(n))||r&&S0.includes(n)},ye=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(_.isValidElement(t)&&(a=t.props),!Ll(a))return null;var i={};return Object.keys(a).forEach(function(l){var o;yz((o=a)===null||o===void 0?void 0:o[l],l,n,r)&&(i[l]=a[l])}),i},Cy=function e(t,n){if(t===n)return!0;var r=_.Children.count(t);if(r!==_.Children.count(n))return!1;if(r===0)return!0;if(r===1)return Rx(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function xz(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Py(e){var t=e.children,n=e.width,r=e.height,a=e.viewBox,i=e.className,l=e.style,o=e.title,u=e.desc,s=bz(e,gz),f=a||{width:n,height:r,x:0,y:0},c=ve("recharts-surface",i);return C.createElement("svg",$y({},ye(s,!0,"svg"),{className:c,width:n,height:r,style:l,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),C.createElement("title",null,o),C.createElement("desc",null,u),t)}var Sz=["children","className"];function Dy(){return Dy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wz(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var yt=C.forwardRef(function(e,t){var n=e.children,r=e.className,a=Oz(e,Sz),i=ve("recharts-layer",r);return C.createElement("g",Dy({className:i},ye(a,!0),{ref:t}),n)}),pr=function(t,n){for(var r=arguments.length,a=new Array(r>2?r-2:0),i=2;ia?0:a+t),n=n>a?a:n,n<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(a);++r=r?e:Ez(e,t,n)}var Tz=jz,Nz="\\ud800-\\udfff",Mz="\\u0300-\\u036f",Cz="\\ufe20-\\ufe2f",$z="\\u20d0-\\u20ff",Pz=Mz+Cz+$z,Dz="\\ufe0e\\ufe0f",Rz="\\u200d",zz=RegExp("["+Rz+Nz+Pz+Dz+"]");function Bz(e){return zz.test(e)}var yE=Bz;function Lz(e){return e.split("")}var kz=Lz,mE="\\ud800-\\udfff",Uz="\\u0300-\\u036f",Iz="\\ufe20-\\ufe2f",Hz="\\u20d0-\\u20ff",qz=Uz+Iz+Hz,Gz="\\ufe0e\\ufe0f",Yz="["+mE+"]",Ry="["+qz+"]",zy="\\ud83c[\\udffb-\\udfff]",Xz="(?:"+Ry+"|"+zy+")",vE="[^"+mE+"]",gE="(?:\\ud83c[\\udde6-\\uddff]){2}",bE="[\\ud800-\\udbff][\\udc00-\\udfff]",Vz="\\u200d",xE=Xz+"?",SE="["+Gz+"]?",Kz="(?:"+Vz+"(?:"+[vE,gE,bE].join("|")+")"+SE+xE+")*",Fz=SE+xE+Kz,Qz="(?:"+[vE+Ry+"?",Ry,gE,bE,Yz].join("|")+")",Wz=RegExp(zy+"(?="+zy+")|"+Qz+Fz,"g");function Zz(e){return e.match(Wz)||[]}var Jz=Zz,e8=kz,t8=yE,n8=Jz;function r8(e){return t8(e)?n8(e):e8(e)}var a8=r8,i8=Tz,l8=yE,o8=a8,u8=sE;function s8(e){return function(t){t=u8(t);var n=l8(t)?o8(t):void 0,r=n?n[0]:t.charAt(0),a=n?i8(n,1).join(""):t.slice(1);return r[e]()+a}}var c8=s8,f8=c8,d8=f8("toUpperCase"),h8=d8;const jd=Me(h8);function Pe(e){return function(){return e}}const OE=Math.cos,Ic=Math.sin,Rn=Math.sqrt,Hc=Math.PI,Td=2*Hc,By=Math.PI,Ly=2*By,Oa=1e-6,p8=Ly-Oa;function wE(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return wE;const n=10**t;return function(r){this._+=r[0];for(let a=1,i=r.length;aOa)if(!(Math.abs(c*u-s*f)>Oa)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let h=r-l,x=a-o,g=u*u+s*s,v=h*h+x*x,y=Math.sqrt(g),m=Math.sqrt(d),b=i*Math.tan((By-Math.acos((g+d-v)/(2*y*m)))/2),O=b/m,S=b/y;Math.abs(O-1)>Oa&&this._append`L${t+O*f},${n+O*c}`,this._append`A${i},${i},0,0,${+(c*h>f*x)},${this._x1=t+S*u},${this._y1=n+S*s}`}}arc(t,n,r,a,i,l){if(t=+t,n=+n,r=+r,l=!!l,r<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(a),u=r*Math.sin(a),s=t+o,f=n+u,c=1^l,d=l?a-i:i-a;this._x1===null?this._append`M${s},${f}`:(Math.abs(this._x1-s)>Oa||Math.abs(this._y1-f)>Oa)&&this._append`L${s},${f}`,r&&(d<0&&(d=d%Ly+Ly),d>p8?this._append`A${r},${r},0,1,${c},${t-o},${n-u}A${r},${r},0,1,${c},${this._x1=s},${this._y1=f}`:d>Oa&&this._append`A${r},${r},0,${+(d>=By)},${c},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+a}h${-r}Z`}toString(){return this._}}function w0(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new m8(t)}function A0(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function AE(e){this._context=e}AE.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 Nd(e){return new AE(e)}function _E(e){return e[0]}function EE(e){return e[1]}function jE(e,t){var n=Pe(!0),r=null,a=Nd,i=null,l=w0(o);e=typeof e=="function"?e:e===void 0?_E:Pe(e),t=typeof t=="function"?t:t===void 0?EE:Pe(t);function o(u){var s,f=(u=A0(u)).length,c,d=!1,h;for(r==null&&(i=a(h=l())),s=0;s<=f;++s)!(s=h;--x)o.point(b[x],O[x]);o.lineEnd(),o.areaEnd()}y&&(b[d]=+e(v,d,c),O[d]=+t(v,d,c),o.point(r?+r(v,d,c):b[d],n?+n(v,d,c):O[d]))}if(m)return o=null,m+""||null}function f(){return jE().defined(a).curve(l).context(i)}return s.x=function(c){return arguments.length?(e=typeof c=="function"?c:Pe(+c),r=null,s):e},s.x0=function(c){return arguments.length?(e=typeof c=="function"?c:Pe(+c),s):e},s.x1=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:Pe(+c),s):r},s.y=function(c){return arguments.length?(t=typeof c=="function"?c:Pe(+c),n=null,s):t},s.y0=function(c){return arguments.length?(t=typeof c=="function"?c:Pe(+c),s):t},s.y1=function(c){return arguments.length?(n=c==null?null:typeof c=="function"?c:Pe(+c),s):n},s.lineX0=s.lineY0=function(){return f().x(e).y(t)},s.lineY1=function(){return f().x(e).y(n)},s.lineX1=function(){return f().x(r).y(t)},s.defined=function(c){return arguments.length?(a=typeof c=="function"?c:Pe(!!c),s):a},s.curve=function(c){return arguments.length?(l=c,i!=null&&(o=l(i)),s):l},s.context=function(c){return arguments.length?(c==null?i=o=null:o=l(i=c),s):i},s}class TE{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function v8(e){return new TE(e,!0)}function g8(e){return new TE(e,!1)}const _0={draw(e,t){const n=Rn(t/Hc);e.moveTo(n,0),e.arc(0,0,n,0,Td)}},b8={draw(e,t){const n=Rn(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},NE=Rn(1/3),x8=NE*2,S8={draw(e,t){const n=Rn(t/x8),r=n*NE;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},O8={draw(e,t){const n=Rn(t),r=-n/2;e.rect(r,r,n,n)}},w8=.8908130915292852,ME=Ic(Hc/10)/Ic(7*Hc/10),A8=Ic(Td/10)*ME,_8=-OE(Td/10)*ME,E8={draw(e,t){const n=Rn(t*w8),r=A8*n,a=_8*n;e.moveTo(0,-n),e.lineTo(r,a);for(let i=1;i<5;++i){const l=Td*i/5,o=OE(l),u=Ic(l);e.lineTo(u*n,-o*n),e.lineTo(o*r-u*a,u*r+o*a)}e.closePath()}},Qh=Rn(3),j8={draw(e,t){const n=-Rn(t/(Qh*3));e.moveTo(0,n*2),e.lineTo(-Qh*n,-n),e.lineTo(Qh*n,-n),e.closePath()}},un=-.5,sn=Rn(3)/2,ky=1/Rn(12),T8=(ky/2+1)*3,N8={draw(e,t){const n=Rn(t/T8),r=n/2,a=n*ky,i=r,l=n*ky+n,o=-i,u=l;e.moveTo(r,a),e.lineTo(i,l),e.lineTo(o,u),e.lineTo(un*r-sn*a,sn*r+un*a),e.lineTo(un*i-sn*l,sn*i+un*l),e.lineTo(un*o-sn*u,sn*o+un*u),e.lineTo(un*r+sn*a,un*a-sn*r),e.lineTo(un*i+sn*l,un*l-sn*i),e.lineTo(un*o+sn*u,un*u-sn*o),e.closePath()}};function M8(e,t){let n=null,r=w0(a);e=typeof e=="function"?e:Pe(e||_0),t=typeof t=="function"?t:Pe(t===void 0?64:+t);function a(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:Pe(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:Pe(+i),a):t},a.context=function(i){return arguments.length?(n=i??null,a):n},a}function qc(){}function Gc(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function CE(e){this._context=e}CE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Gc(this,this._x1,this._y1);case 2:this._context.lineTo(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;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Gc(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function C8(e){return new CE(e)}function $E(e){this._context=e}$E.prototype={areaStart:qc,areaEnd:qc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Gc(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function $8(e){return new $E(e)}function PE(e){this._context=e}PE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Gc(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function P8(e){return new PE(e)}function DE(e){this._context=e}DE.prototype={areaStart:qc,areaEnd:qc,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function D8(e){return new DE(e)}function Bx(e){return e<0?-1:1}function Lx(e,t,n){var r=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(r||a<0&&-0),l=(n-e._y1)/(a||r<0&&-0),o=(i*a+l*r)/(r+a);return(Bx(i)+Bx(l))*Math.min(Math.abs(i),Math.abs(l),.5*Math.abs(o))||0}function kx(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Wh(e,t,n){var r=e._x0,a=e._y0,i=e._x1,l=e._y1,o=(i-r)/3;e._context.bezierCurveTo(r+o,a+o*t,i-o,l-o*n,i,l)}function Yc(e){this._context=e}Yc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Wh(this,this._t0,kx(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){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,Wh(this,kx(this,n=Lx(this,e,t)),n);break;default:Wh(this,this._t0,n=Lx(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function RE(e){this._context=new zE(e)}(RE.prototype=Object.create(Yc.prototype)).point=function(e,t){Yc.prototype.point.call(this,t,e)};function zE(e){this._context=e}zE.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,a,i){this._context.bezierCurveTo(t,e,r,n,i,a)}};function R8(e){return new Yc(e)}function z8(e){return new RE(e)}function BE(e){this._context=e}BE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Ux(e),a=Ux(t),i=0,l=1;l=0;--t)a[t]=(l[t]-a[t+1])/i[t];for(i[n-1]=(e[n]+a[n-1])/2,t=0;t=0&&(this._t=1-this._t,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:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function L8(e){return new Md(e,.5)}function k8(e){return new Md(e,0)}function U8(e){return new Md(e,1)}function rl(e,t){if((l=e.length)>1)for(var n=1,r,a,i=e[t[0]],l,o=i.length;n=0;)n[t]=t;return n}function I8(e,t){return e[t]}function H8(e){const t=[];return t.key=e,t}function q8(){var e=Pe([]),t=Uy,n=rl,r=I8;function a(i){var l=Array.from(e.apply(this,arguments),H8),o,u=l.length,s=-1,f;for(const c of i)for(o=0,++s;o0){for(var n,r,a=0,i=e[0].length,l;a0){for(var n=0,r=e[t[0]],a,i=r.length;n0)||!((i=(a=e[t[0]]).length)>0))){for(var n=0,r=1,a,i,l;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Z8(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var LE={symbolCircle:_0,symbolCross:b8,symbolDiamond:S8,symbolSquare:O8,symbolStar:E8,symbolTriangle:j8,symbolWye:N8},J8=Math.PI/180,eB=function(t){var n="symbol".concat(jd(t));return LE[n]||_0},tB=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*J8;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},nB=function(t,n){LE["symbol".concat(jd(t))]=n},E0=function(t){var n=t.type,r=n===void 0?"circle":n,a=t.size,i=a===void 0?64:a,l=t.sizeType,o=l===void 0?"area":l,u=W8(t,V8),s=Hx(Hx({},u),{},{type:r,size:i,sizeType:o}),f=function(){var v=eB(r),y=M8().type(v).size(tB(i,o,r));return y()},c=s.className,d=s.cx,h=s.cy,x=ye(s,!0);return d===+d&&h===+h&&i===+i?C.createElement("path",Iy({},x,{className:ve("recharts-symbols",c),transform:"translate(".concat(d,", ").concat(h,")"),d:f()})):null};E0.registerSymbol=nB;function al(e){"@babel/helpers - typeof";return al=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},al(e)}function Hy(){return Hy=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var m=h.inactive?s:h.color;return C.createElement("li",Hy({className:v,style:c,key:"legend-item-".concat(x)},Uc(r.props,h,x)),C.createElement(Py,{width:l,height:l,viewBox:f,style:d},r.renderIcon(h)),C.createElement("span",{className:"recharts-legend-item-text",style:{color:m}},g?g(y,h,x):y))})}},{key:"render",value:function(){var r=this.props,a=r.payload,i=r.layout,l=r.align;if(!a||!a.length)return null;var o={padding:0,margin:0,textAlign:i==="horizontal"?l:"left"};return C.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}])}(_.PureComponent);ru(j0,"displayName","Legend");ru(j0,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var dB=hd;function hB(){this.__data__=new dB,this.size=0}var pB=hB;function yB(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var mB=yB;function vB(e){return this.__data__.get(e)}var gB=vB;function bB(e){return this.__data__.has(e)}var xB=bB,SB=hd,OB=p0,wB=y0,AB=200;function _B(e,t){var n=this.__data__;if(n instanceof SB){var r=n.__data__;if(!OB||r.lengtho))return!1;var s=i.get(e),f=i.get(t);if(s&&f)return s==t&&f==e;var c=-1,d=!0,h=n&VB?new qB:void 0;for(i.set(e,t),i.set(t,e);++c-1&&e%1==0&&e-1&&e%1==0&&e<=WL}var C0=ZL,JL=Er,ek=C0,tk=jr,nk="[object Arguments]",rk="[object Array]",ak="[object Boolean]",ik="[object Date]",lk="[object Error]",ok="[object Function]",uk="[object Map]",sk="[object Number]",ck="[object Object]",fk="[object RegExp]",dk="[object Set]",hk="[object String]",pk="[object WeakMap]",yk="[object ArrayBuffer]",mk="[object DataView]",vk="[object Float32Array]",gk="[object Float64Array]",bk="[object Int8Array]",xk="[object Int16Array]",Sk="[object Int32Array]",Ok="[object Uint8Array]",wk="[object Uint8ClampedArray]",Ak="[object Uint16Array]",_k="[object Uint32Array]",Be={};Be[vk]=Be[gk]=Be[bk]=Be[xk]=Be[Sk]=Be[Ok]=Be[wk]=Be[Ak]=Be[_k]=!0;Be[nk]=Be[rk]=Be[yk]=Be[ak]=Be[mk]=Be[ik]=Be[lk]=Be[ok]=Be[uk]=Be[sk]=Be[ck]=Be[fk]=Be[dk]=Be[hk]=Be[pk]=!1;function Ek(e){return tk(e)&&ek(e.length)&&!!Be[JL(e)]}var jk=Ek;function Tk(e){return function(t){return e(t)}}var FE=Tk,Fc={exports:{}};Fc.exports;(function(e,t){var n=rE,r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===r,l=i&&n.process,o=function(){try{var u=a&&a.require&&a.require("util").types;return u||l&&l.binding&&l.binding("util")}catch{}}();e.exports=o})(Fc,Fc.exports);var Nk=Fc.exports,Mk=jk,Ck=FE,Fx=Nk,Qx=Fx&&Fx.isTypedArray,$k=Qx?Ck(Qx):Mk,QE=$k,Pk=zL,Dk=N0,Rk=Xt,zk=KE,Bk=M0,Lk=QE,kk=Object.prototype,Uk=kk.hasOwnProperty;function Ik(e,t){var n=Rk(e),r=!n&&Dk(e),a=!n&&!r&&zk(e),i=!n&&!r&&!a&&Lk(e),l=n||r||a||i,o=l?Pk(e.length,String):[],u=o.length;for(var s in e)(t||Uk.call(e,s))&&!(l&&(s=="length"||a&&(s=="offset"||s=="parent")||i&&(s=="buffer"||s=="byteLength"||s=="byteOffset")||Bk(s,u)))&&o.push(s);return o}var Hk=Ik,qk=Object.prototype;function Gk(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||qk;return e===n}var Yk=Gk;function Xk(e,t){return function(n){return e(t(n))}}var WE=Xk,Vk=WE,Kk=Vk(Object.keys,Object),Fk=Kk,Qk=Yk,Wk=Fk,Zk=Object.prototype,Jk=Zk.hasOwnProperty;function e7(e){if(!Qk(e))return Wk(e);var t=[];for(var n in Object(e))Jk.call(e,n)&&n!="constructor"&&t.push(n);return t}var t7=e7,n7=d0,r7=C0;function a7(e){return e!=null&&r7(e.length)&&!n7(e)}var ts=a7,i7=Hk,l7=t7,o7=ts;function u7(e){return o7(e)?i7(e):l7(e)}var Cd=u7,s7=AL,c7=DL,f7=Cd;function d7(e){return s7(e,f7,c7)}var h7=d7,Wx=h7,p7=1,y7=Object.prototype,m7=y7.hasOwnProperty;function v7(e,t,n,r,a,i){var l=n&p7,o=Wx(e),u=o.length,s=Wx(t),f=s.length;if(u!=f&&!l)return!1;for(var c=u;c--;){var d=o[c];if(!(l?d in t:m7.call(t,d)))return!1}var h=i.get(e),x=i.get(t);if(h&&x)return h==t&&x==e;var g=!0;i.set(e,t),i.set(t,e);for(var v=l;++c-1}var y9=p9;function m9(e,t,n){for(var r=-1,a=e==null?0:e.length;++r=C9){var s=t?null:N9(e);if(s)return M9(s);l=!1,a=T9,u=new _9}else u=t?[]:o;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function V9(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function K9(e){return e.value}function F9(e,t){if(C.isValidElement(e))return C.cloneElement(e,t);if(typeof e=="function")return C.createElement(e,t);t.ref;var n=X9(t,L9);return C.createElement(j0,n)}var h1=1,Ui=function(e){function t(){var n;k9(this,t);for(var r=arguments.length,a=new Array(r),i=0;ih1||Math.abs(a.height-this.lastBoundingBox.height)>h1)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,r&&r(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?er({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var a=this.props,i=a.layout,l=a.align,o=a.verticalAlign,u=a.margin,s=a.chartWidth,f=a.chartHeight,c,d;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(l==="center"&&i==="vertical"){var h=this.getBBoxSnapshot();c={left:((s||0)-h.width)/2}}else c=l==="right"?{right:u&&u.right||0}:{left:u&&u.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(o==="middle"){var x=this.getBBoxSnapshot();d={top:((f||0)-x.height)/2}}else d=o==="bottom"?{bottom:u&&u.bottom||0}:{top:u&&u.top||0};return er(er({},c),d)}},{key:"render",value:function(){var r=this,a=this.props,i=a.content,l=a.width,o=a.height,u=a.wrapperStyle,s=a.payloadUniqBy,f=a.payload,c=er(er({position:"absolute",width:l||"auto",height:o||"auto"},this.getDefaultPosition(u)),u);return C.createElement("div",{className:"recharts-legend-wrapper",style:c,ref:function(h){r.wrapperNode=h}},F9(i,er(er({},this.props),{},{payload:aj(f,s,K9)})))}}],[{key:"getWithHeight",value:function(r,a){var i=er(er({},this.defaultProps),r.props),l=i.layout;return l==="vertical"&&Y(r.props.height)?{height:r.props.height}:l==="horizontal"?{width:r.props.width||a}:null}}])}(_.PureComponent);$d(Ui,"displayName","Legend");$d(Ui,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var p1=Ju,Q9=N0,W9=Xt,y1=p1?p1.isConcatSpreadable:void 0;function Z9(e){return W9(e)||Q9(e)||!!(y1&&e&&e[y1])}var J9=Z9,eI=XE,tI=J9;function oj(e,t,n,r,a){var i=-1,l=e.length;for(n||(n=tI),a||(a=[]);++i0&&n(o)?t>1?oj(o,t-1,n,r,a):eI(a,o):r||(a[a.length]=o)}return a}var uj=oj;function nI(e){return function(t,n,r){for(var a=-1,i=Object(t),l=r(t),o=l.length;o--;){var u=l[e?o:++a];if(n(i[u],u,i)===!1)break}return t}}var rI=nI,aI=rI,iI=aI(),lI=iI,oI=lI,uI=Cd;function sI(e,t){return e&&oI(e,t,uI)}var sj=sI,cI=ts;function fI(e,t){return function(n,r){if(n==null)return n;if(!cI(n))return e(n,r);for(var a=n.length,i=t?a:-1,l=Object(n);(t?i--:++it||i&&l&&u&&!o&&!s||r&&l&&u||!n&&u||!a)return 1;if(!r&&!i&&!s&&e=o)return u;var s=n[r];return u*(s=="desc"?-1:1)}}return e.index-t.index}var _I=AI,tp=v0,EI=g0,jI=fa,TI=cj,NI=xI,MI=FE,CI=_I,$I=Gl,PI=Xt;function DI(e,t,n){t.length?t=tp(t,function(i){return PI(i)?function(l){return EI(l,i.length===1?i[0]:i)}:i}):t=[$I];var r=-1;t=tp(t,MI(jI));var a=TI(e,function(i,l,o){var u=tp(t,function(s){return s(i)});return{criteria:u,index:++r,value:i}});return NI(a,function(i,l){return CI(i,l,n)})}var RI=DI;function zI(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var BI=zI,LI=BI,v1=Math.max;function kI(e,t,n){return t=v1(t===void 0?e.length-1:t,0),function(){for(var r=arguments,a=-1,i=v1(r.length-t,0),l=Array(i);++a0){if(++t>=FI)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var JI=ZI,eH=KI,tH=JI,nH=tH(eH),rH=nH,aH=Gl,iH=UI,lH=rH;function oH(e,t){return lH(iH(e,t,aH),e+"")}var uH=oH,sH=h0,cH=ts,fH=M0,dH=ca;function hH(e,t,n){if(!dH(n))return!1;var r=typeof t;return(r=="number"?cH(n)&&fH(t,n.length):r=="string"&&t in n)?sH(n[t],e):!1}var Pd=hH,pH=uj,yH=RI,mH=uH,b1=Pd,vH=mH(function(e,t){if(e==null)return[];var n=t.length;return n>1&&b1(e,t[0],t[1])?t=[]:n>2&&b1(t[0],t[1],t[2])&&(t=[t[0]]),yH(e,pH(t,1),[])}),gH=vH;const D0=Me(gH);function au(e){"@babel/helpers - typeof";return au=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},au(e)}function Qy(){return Qy=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(ao,"-left"),Y(n)&&t&&Y(t.x)&&n=t.y),"".concat(ao,"-top"),Y(r)&&t&&Y(t.y)&&rg?Math.max(f,u[r]):Math.max(c,u[r])}function PH(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function DH(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,a=e.position,i=e.reverseDirection,l=e.tooltipBox,o=e.useTranslate3d,u=e.viewBox,s,f,c;return l.height>0&&l.width>0&&n?(f=O1({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:a,reverseDirection:i,tooltipDimension:l.width,viewBox:u,viewBoxDimension:u.width}),c=O1({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:a,reverseDirection:i,tooltipDimension:l.height,viewBox:u,viewBoxDimension:u.height}),s=PH({translateX:f,translateY:c,useTranslate3d:o})):s=CH,{cssProperties:s,cssClasses:$H({translateX:f,translateY:c,coordinate:n})}}function ll(e){"@babel/helpers - typeof";return ll=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ll(e)}function w1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function A1(e){for(var t=1;t_1||Math.abs(r.height-this.state.lastBoundingBox.height)>_1)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,a=this.props,i=a.active,l=a.allowEscapeViewBox,o=a.animationDuration,u=a.animationEasing,s=a.children,f=a.coordinate,c=a.hasPayload,d=a.isAnimationActive,h=a.offset,x=a.position,g=a.reverseDirection,v=a.useTranslate3d,y=a.viewBox,m=a.wrapperStyle,b=DH({allowEscapeViewBox:l,coordinate:f,offsetTopLeft:h,position:x,reverseDirection:g,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:y}),O=b.cssClasses,S=b.cssProperties,w=A1(A1({transition:d&&i?"transform ".concat(o,"ms ").concat(u):void 0},S),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&c?"visible":"hidden",position:"absolute",top:0,left:0},m);return C.createElement("div",{tabIndex:-1,className:O,style:w,ref:function(E){r.wrapperNode=E}},s)}}])}(_.PureComponent),GH=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},ns={isSsr:GH()};function ol(e){"@babel/helpers - typeof";return ol=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ol(e)}function E1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function j1(e){for(var t=1;t0;return C.createElement(qH,{allowEscapeViewBox:l,animationDuration:o,animationEasing:u,isAnimationActive:d,active:i,coordinate:f,hasPayload:w,offset:h,position:v,reverseDirection:y,useTranslate3d:m,viewBox:b,wrapperStyle:O},eq(s,j1(j1({},this.props),{},{payload:S})))}}])}(_.PureComponent);R0(zn,"displayName","Tooltip");R0(zn,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!ns.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var tq=Kn,nq=function(){return tq.Date.now()},rq=nq,aq=/\s/;function iq(e){for(var t=e.length;t--&&aq.test(e.charAt(t)););return t}var lq=iq,oq=lq,uq=/^\s+/;function sq(e){return e&&e.slice(0,oq(e)+1).replace(uq,"")}var cq=sq,fq=cq,T1=ca,dq=Bl,N1=NaN,hq=/^[-+]0x[0-9a-f]+$/i,pq=/^0b[01]+$/i,yq=/^0o[0-7]+$/i,mq=parseInt;function vq(e){if(typeof e=="number")return e;if(dq(e))return N1;if(T1(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=T1(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=fq(e);var n=pq.test(e);return n||yq.test(e)?mq(e.slice(2),n?2:8):hq.test(e)?N1:+e}var mj=vq,gq=ca,rp=rq,M1=mj,bq="Expected a function",xq=Math.max,Sq=Math.min;function Oq(e,t,n){var r,a,i,l,o,u,s=0,f=!1,c=!1,d=!0;if(typeof e!="function")throw new TypeError(bq);t=M1(t)||0,gq(n)&&(f=!!n.leading,c="maxWait"in n,i=c?xq(M1(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function h(w){var A=r,E=a;return r=a=void 0,s=w,l=e.apply(E,A),l}function x(w){return s=w,o=setTimeout(y,t),f?h(w):l}function g(w){var A=w-u,E=w-s,j=t-A;return c?Sq(j,i-E):j}function v(w){var A=w-u,E=w-s;return u===void 0||A>=t||A<0||c&&E>=i}function y(){var w=rp();if(v(w))return m(w);o=setTimeout(y,g(w))}function m(w){return o=void 0,d&&r?h(w):(r=a=void 0,l)}function b(){o!==void 0&&clearTimeout(o),s=0,r=u=a=o=void 0}function O(){return o===void 0?l:m(rp())}function S(){var w=rp(),A=v(w);if(r=arguments,a=this,u=w,A){if(o===void 0)return x(u);if(c)return clearTimeout(o),o=setTimeout(y,t),h(u)}return o===void 0&&(o=setTimeout(y,t)),l}return S.cancel=b,S.flush=O,S}var wq=Oq,Aq=wq,_q=ca,Eq="Expected a function";function jq(e,t,n){var r=!0,a=!0;if(typeof e!="function")throw new TypeError(Eq);return _q(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),Aq(e,t,{leading:r,maxWait:t,trailing:a})}var Tq=jq;const vj=Me(Tq);function lu(e){"@babel/helpers - typeof";return lu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lu(e)}function C1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ts(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(k=vj(k,g,{trailing:!0,leading:!1}));var z=new ResizeObserver(k),B=S.current.getBoundingClientRect(),N=B.width,R=B.height;return P(N,R),z.observe(S.current),function(){z.disconnect()}},[P,g]);var M=_.useMemo(function(){var k=j.containerWidth,z=j.containerHeight;if(k<0||z<0)return null;pr(Ea(l)||Ea(u),`The width(%s) and height(%s) are both fixed numbers, maybe you don't need to use a ResponsiveContainer.`,l,u),pr(!n||n>0,"The aspect(%s) must be greater than zero.",n);var B=Ea(l)?k:l,N=Ea(u)?z:u;n&&n>0&&(B?N=B/n:N&&(B=N*n),d&&N>d&&(N=d)),pr(B>0||N>0,`The width(%s) and height(%s) of chart should be greater than 0, please check the style of container, or the props width(%s) and height(%s), or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the height and width.`,B,N,l,u,f,c,n);var R=!Array.isArray(h)&&hr(h.type).endsWith("Chart");return C.Children.map(h,function(D){return C.isValidElement(D)?_.cloneElement(D,Ts({width:B,height:N},R?{style:Ts({height:"100%",width:"100%",maxHeight:N,maxWidth:B},D.props.style)}:{})):D})},[n,h,u,d,c,f,j,l]);return C.createElement("div",{id:v?"".concat(v):void 0,className:ve("recharts-responsive-container",y),style:Ts(Ts({},O),{},{width:l,height:u,minWidth:f,minHeight:c,maxHeight:d}),ref:S},M)}),gj=function(t){return null};gj.displayName="Cell";function ou(e){"@babel/helpers - typeof";return ou=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ou(e)}function P1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function em(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||ns.isSsr)return{width:0,height:0};var r=qq(n),a=JSON.stringify({text:t,copyStyle:r});if(fi.widthCache[a])return fi.widthCache[a];try{var i=document.getElementById(D1);i||(i=document.createElement("span"),i.setAttribute("id",D1),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var l=em(em({},Hq),r);Object.assign(i.style,l),i.textContent="".concat(t);var o=i.getBoundingClientRect(),u={width:o.width,height:o.height};return fi.widthCache[a]=u,++fi.cacheCount>Iq&&(fi.cacheCount=0,fi.widthCache={}),u}catch{return{width:0,height:0}}},Gq=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function uu(e){"@babel/helpers - typeof";return uu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uu(e)}function Jc(e,t){return Kq(e)||Vq(e,t)||Xq(e,t)||Yq()}function Yq(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xq(e,t){if(e){if(typeof e=="string")return R1(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 R1(e,t)}}function R1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function uG(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function I1(e,t){return dG(e)||fG(e,t)||cG(e,t)||sG()}function sG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cG(e,t){if(e){if(typeof e=="string")return H1(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 H1(e,t)}}function H1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return B.reduce(function(N,R){var D=R.word,U=R.width,q=N[N.length-1];if(q&&(a==null||i||q.width+U+rR.width?N:R})};if(!f)return h;for(var g="…",v=function(B){var N=c.slice(0,B),R=Oj({breakAll:s,style:u,children:N+g}).wordsWithComputedWidth,D=d(R),U=D.length>l||x(D).width>Number(a);return[U,D]},y=0,m=c.length-1,b=0,O;y<=m&&b<=c.length-1;){var S=Math.floor((y+m)/2),w=S-1,A=v(w),E=I1(A,2),j=E[0],$=E[1],P=v(S),M=I1(P,1),k=M[0];if(!j&&!k&&(y=S+1),j&&k&&(m=S-1),!j&&k){O=$;break}b++}return O||h},q1=function(t){var n=ge(t)?[]:t.toString().split(Sj);return[{words:n}]},pG=function(t){var n=t.width,r=t.scaleToFit,a=t.children,i=t.style,l=t.breakAll,o=t.maxLines;if((n||r)&&!ns.isSsr){var u,s,f=Oj({breakAll:l,children:a,style:i});if(f){var c=f.wordsWithComputedWidth,d=f.spaceWidth;u=c,s=d}else return q1(a);return hG({breakAll:l,children:a,maxLines:o,style:i},u,s,n,r)}return q1(a)},G1="#808080",ef=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,i=a===void 0?0:a,l=t.lineHeight,o=l===void 0?"1em":l,u=t.capHeight,s=u===void 0?"0.71em":u,f=t.scaleToFit,c=f===void 0?!1:f,d=t.textAnchor,h=d===void 0?"start":d,x=t.verticalAnchor,g=x===void 0?"end":x,v=t.fill,y=v===void 0?G1:v,m=U1(t,lG),b=_.useMemo(function(){return pG({breakAll:m.breakAll,children:m.children,maxLines:m.maxLines,scaleToFit:c,style:m.style,width:m.width})},[m.breakAll,m.children,m.maxLines,c,m.style,m.width]),O=m.dx,S=m.dy,w=m.angle,A=m.className,E=m.breakAll,j=U1(m,oG);if(!ut(r)||!ut(i))return null;var $=r+(Y(O)?O:0),P=i+(Y(S)?S:0),M;switch(g){case"start":M=ap("calc(".concat(s,")"));break;case"middle":M=ap("calc(".concat((b.length-1)/2," * -").concat(o," + (").concat(s," / 2))"));break;default:M=ap("calc(".concat(b.length-1," * -").concat(o,")"));break}var k=[];if(c){var z=b[0].width,B=m.width;k.push("scale(".concat((Y(B)?B/z:1)/z,")"))}return w&&k.push("rotate(".concat(w,", ").concat($,", ").concat(P,")")),k.length&&(j.transform=k.join(" ")),C.createElement("text",tm({},ye(j,!0),{x:$,y:P,className:ve("recharts-text",A),textAnchor:h,fill:y.includes("url")?G1:y}),b.map(function(N,R){var D=N.words.join(E?"":" ");return C.createElement("tspan",{x:$,dy:R===0?M:o,key:"".concat(D,"-").concat(R)},D)}))};function ta(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function yG(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function z0(e){let t,n,r;e.length!==2?(t=ta,n=(o,u)=>ta(e(o),u),r=(o,u)=>e(o)-u):(t=e===ta||e===yG?e:mG,n=e,r=e);function a(o,u,s=0,f=o.length){if(s>>1;n(o[c],u)<0?s=c+1:f=c}while(s>>1;n(o[c],u)<=0?s=c+1:f=c}while(ss&&r(o[c-1],u)>-r(o[c],u)?c-1:c}return{left:a,center:l,right:i}}function mG(){return 0}function wj(e){return e===null?NaN:+e}function*vG(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const gG=z0(ta),rs=gG.right;z0(wj).center;class Y1 extends Map{constructor(t,n=SG){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,a]of t)this.set(r,a)}get(t){return super.get(X1(this,t))}has(t){return super.has(X1(this,t))}set(t,n){return super.set(bG(this,t),n)}delete(t){return super.delete(xG(this,t))}}function X1({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function bG({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function xG({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function SG(e){return e!==null&&typeof e=="object"?e.valueOf():e}function OG(e=ta){if(e===ta)return Aj;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function Aj(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const wG=Math.sqrt(50),AG=Math.sqrt(10),_G=Math.sqrt(2);function tf(e,t,n){const r=(t-e)/Math.max(0,n),a=Math.floor(Math.log10(r)),i=r/Math.pow(10,a),l=i>=wG?10:i>=AG?5:i>=_G?2:1;let o,u,s;return a<0?(s=Math.pow(10,-a)/l,o=Math.round(e*s),u=Math.round(t*s),o/st&&--u,s=-s):(s=Math.pow(10,a)*l,o=Math.round(e/s),u=Math.round(t/s),o*st&&--u),u0))return[];if(e===t)return[e];const r=t=a))return[];const o=i-a+1,u=new Array(o);if(r)if(l<0)for(let s=0;s=r)&&(n=r);return n}function K1(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function _j(e,t,n=0,r=1/0,a){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(a=a===void 0?Aj:OG(a);r>n;){if(r-n>600){const u=r-n+1,s=t-n+1,f=Math.log(u),c=.5*Math.exp(2*f/3),d=.5*Math.sqrt(f*c*(u-c)/u)*(s-u/2<0?-1:1),h=Math.max(n,Math.floor(t-s*c/u+d)),x=Math.min(r,Math.floor(t+(u-s)*c/u+d));_j(e,t,h,x,a)}const i=e[t];let l=n,o=r;for(io(e,n,t),a(e[r],i)>0&&io(e,n,r);l0;)--o}a(e[n],i)===0?io(e,n,o):(++o,io(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function io(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function EG(e,t,n){if(e=Float64Array.from(vG(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return K1(e);if(t>=1)return V1(e);var r,a=(r-1)*t,i=Math.floor(a),l=V1(_j(e,i).subarray(0,i+1)),o=K1(e.subarray(i+1));return l+(o-l)*(a-i)}}function jG(e,t,n=wj){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,a=(r-1)*t,i=Math.floor(a),l=+n(e[i],i,e),o=+n(e[i+1],i+1,e);return l+(o-l)*(a-i)}}function TG(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var r=-1,a=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(a);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ms(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ms(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=MG.exec(e))?new It(t[1],t[2],t[3],1):(t=CG.exec(e))?new It(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=$G.exec(e))?Ms(t[1],t[2],t[3],t[4]):(t=PG.exec(e))?Ms(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=DG.exec(e))?tS(t[1],t[2]/100,t[3]/100,1):(t=RG.exec(e))?tS(t[1],t[2]/100,t[3]/100,t[4]):F1.hasOwnProperty(e)?Z1(F1[e]):e==="transparent"?new It(NaN,NaN,NaN,0):null}function Z1(e){return new It(e>>16&255,e>>8&255,e&255,1)}function Ms(e,t,n,r){return r<=0&&(e=t=n=NaN),new It(e,t,n,r)}function LG(e){return e instanceof as||(e=du(e)),e?(e=e.rgb(),new It(e.r,e.g,e.b,e.opacity)):new It}function lm(e,t,n,r){return arguments.length===1?LG(e):new It(e,t,n,r??1)}function It(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}L0(It,lm,jj(as,{brighter(e){return e=e==null?nf:Math.pow(nf,e),new It(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?cu:Math.pow(cu,e),new It(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new It(za(this.r),za(this.g),za(this.b),rf(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:J1,formatHex:J1,formatHex8:kG,formatRgb:eS,toString:eS}));function J1(){return`#${ja(this.r)}${ja(this.g)}${ja(this.b)}`}function kG(){return`#${ja(this.r)}${ja(this.g)}${ja(this.b)}${ja((isNaN(this.opacity)?1:this.opacity)*255)}`}function eS(){const e=rf(this.opacity);return`${e===1?"rgb(":"rgba("}${za(this.r)}, ${za(this.g)}, ${za(this.b)}${e===1?")":`, ${e})`}`}function rf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function za(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ja(e){return e=za(e),(e<16?"0":"")+e.toString(16)}function tS(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Mn(e,t,n,r)}function Tj(e){if(e instanceof Mn)return new Mn(e.h,e.s,e.l,e.opacity);if(e instanceof as||(e=du(e)),!e)return new Mn;if(e instanceof Mn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),l=NaN,o=i-a,u=(i+a)/2;return o?(t===i?l=(n-r)/o+(n0&&u<1?0:l,new Mn(l,o,u,e.opacity)}function UG(e,t,n,r){return arguments.length===1?Tj(e):new Mn(e,t,n,r??1)}function Mn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}L0(Mn,UG,jj(as,{brighter(e){return e=e==null?nf:Math.pow(nf,e),new Mn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?cu:Math.pow(cu,e),new Mn(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,a=2*n-r;return new It(ip(e>=240?e-240:e+120,a,r),ip(e,a,r),ip(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new Mn(nS(this.h),Cs(this.s),Cs(this.l),rf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=rf(this.opacity);return`${e===1?"hsl(":"hsla("}${nS(this.h)}, ${Cs(this.s)*100}%, ${Cs(this.l)*100}%${e===1?")":`, ${e})`}`}}));function nS(e){return e=(e||0)%360,e<0?e+360:e}function Cs(e){return Math.max(0,Math.min(1,e||0))}function ip(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const k0=e=>()=>e;function IG(e,t){return function(n){return e+n*t}}function HG(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function qG(e){return(e=+e)==1?Nj:function(t,n){return n-t?HG(t,n,e):k0(isNaN(t)?n:t)}}function Nj(e,t){var n=t-e;return n?IG(e,n):k0(isNaN(e)?t:e)}const rS=function e(t){var n=qG(t);function r(a,i){var l=n((a=lm(a)).r,(i=lm(i)).r),o=n(a.g,i.g),u=n(a.b,i.b),s=Nj(a.opacity,i.opacity);return function(f){return a.r=l(f),a.g=o(f),a.b=u(f),a.opacity=s(f),a+""}}return r.gamma=e,r}(1);function GG(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(i){for(a=0;an&&(i=t.slice(n,i),o[l]?o[l]+=i:o[++l]=i),(r=r[0])===(a=a[0])?o[l]?o[l]+=a:o[++l]=a:(o[++l]=null,u.push({i:l,x:af(r,a)})),n=lp.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function tY(e,t,n){var r=e[0],a=e[1],i=t[0],l=t[1];return a2?nY:tY,u=s=null,c}function c(d){return d==null||isNaN(d=+d)?i:(u||(u=o(e.map(r),t,n)))(r(l(d)))}return c.invert=function(d){return l(a((s||(s=o(t,e.map(r),af)))(d)))},c.domain=function(d){return arguments.length?(e=Array.from(d,lf),f()):e.slice()},c.range=function(d){return arguments.length?(t=Array.from(d),f()):t.slice()},c.rangeRound=function(d){return t=Array.from(d),n=U0,f()},c.clamp=function(d){return arguments.length?(l=d?!0:Dt,f()):l!==Dt},c.interpolate=function(d){return arguments.length?(n=d,f()):n},c.unknown=function(d){return arguments.length?(i=d,c):i},function(d,h){return r=d,a=h,f()}}function I0(){return Dd()(Dt,Dt)}function rY(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function of(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 ul(e){return e=of(Math.abs(e)),e?e[1]:NaN}function aY(e,t){return function(n,r){for(var a=n.length,i=[],l=0,o=e[0],u=0;a>0&&o>0&&(u+o+1>r&&(o=Math.max(1,r-u)),i.push(n.substring(a-=o,a+o)),!((u+=o+1)>r));)o=e[l=(l+1)%e.length];return i.reverse().join(t)}}function iY(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var lY=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function hu(e){if(!(t=lY.exec(e)))throw new Error("invalid format: "+e);var t;return new H0({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]})}hu.prototype=H0.prototype;function H0(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+""}H0.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 oY(e){e:for(var t=e.length,n=1,r=-1,a;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(a+1):e}var uf;function uY(e,t){var n=of(e,t);if(!n)return uf=void 0,e.toPrecision(t);var r=n[0],a=n[1],i=a-(uf=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,l=r.length;return i===l?r:i>l?r+new Array(i-l+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+of(e,Math.max(0,t+i-1))[0]}function iS(e,t){var n=of(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}const lS={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:rY,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)=>iS(e*100,t),r:iS,s:uY,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function oS(e){return e}var uS=Array.prototype.map,sS=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function sY(e){var t=e.grouping===void 0||e.thousands===void 0?oS:aY(uS.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?oS:iY(uS.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function s(c,d){c=hu(c);var h=c.fill,x=c.align,g=c.sign,v=c.symbol,y=c.zero,m=c.width,b=c.comma,O=c.precision,S=c.trim,w=c.type;w==="n"?(b=!0,w="g"):lS[w]||(O===void 0&&(O=12),S=!0,w="g"),(y||h==="0"&&x==="=")&&(y=!0,h="0",x="=");var A=(d&&d.prefix!==void 0?d.prefix:"")+(v==="$"?n:v==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():""),E=(v==="$"?r:/[%p]/.test(w)?l:"")+(d&&d.suffix!==void 0?d.suffix:""),j=lS[w],$=/[defgprs%]/.test(w);O=O===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,O)):Math.max(0,Math.min(20,O));function P(M){var k=A,z=E,B,N,R;if(w==="c")z=j(M)+z,M="";else{M=+M;var D=M<0||1/M<0;if(M=isNaN(M)?u:j(Math.abs(M),O),S&&(M=oY(M)),D&&+M==0&&g!=="+"&&(D=!1),k=(D?g==="("?g:o:g==="-"||g==="("?"":g)+k,z=(w==="s"&&!isNaN(M)&&uf!==void 0?sS[8+uf/3]:"")+z+(D&&g==="("?")":""),$){for(B=-1,N=M.length;++BR||R>57){z=(R===46?a+M.slice(B+1):M.slice(B))+z,M=M.slice(0,B);break}}}b&&!y&&(M=t(M,1/0));var U=k.length+M.length+z.length,q=U>1)+k+M+z+q.slice(U);break;default:M=q+k+M+z;break}return i(M)}return P.toString=function(){return c+""},P}function f(c,d){var h=Math.max(-8,Math.min(8,Math.floor(ul(d)/3)))*3,x=Math.pow(10,-h),g=s((c=hu(c),c.type="f",c),{suffix:sS[8+h/3]});return function(v){return g(x*v)}}return{format:s,formatPrefix:f}}var $s,q0,Mj;cY({thousands:",",grouping:[3],currency:["$",""]});function cY(e){return $s=sY(e),q0=$s.format,Mj=$s.formatPrefix,$s}function fY(e){return Math.max(0,-ul(Math.abs(e)))}function dY(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ul(t)/3)))*3-ul(Math.abs(e)))}function hY(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ul(t)-ul(e))+1}function Cj(e,t,n,r){var a=am(e,t,n),i;switch(r=hu(r??",f"),r.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=dY(a,l))&&(r.precision=i),Mj(r,l)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=hY(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=fY(a))&&(r.precision=i-(r.type==="%")*2);break}}return q0(r)}function da(e){var t=e.domain;return e.ticks=function(n){var r=t();return nm(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return Cj(a[0],a[a.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),a=0,i=r.length-1,l=r[a],o=r[i],u,s,f=10;for(o0;){if(s=rm(l,o,n),s===u)return r[a]=l,r[i]=o,t(r);if(s>0)l=Math.floor(l/s)*s,o=Math.ceil(o/s)*s;else if(s<0)l=Math.ceil(l*s)/s,o=Math.floor(o*s)/s;else break;u=s}return e},e}function sf(){var e=I0();return e.copy=function(){return is(e,sf())},_n.apply(e,arguments),da(e)}function $j(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,lf),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return $j(e).unknown(t)},e=arguments.length?Array.from(e,lf):[0,1],da(n)}function Pj(e,t){e=e.slice();var n=0,r=e.length-1,a=e[n],i=e[r],l;return iMath.pow(e,t)}function gY(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function dS(e){return(t,n)=>-e(-t,n)}function G0(e){const t=e(cS,fS),n=t.domain;let r=10,a,i;function l(){return a=gY(r),i=vY(r),n()[0]<0?(a=dS(a),i=dS(i),e(pY,yY)):e(cS,fS),t}return t.base=function(o){return arguments.length?(r=+o,l()):r},t.domain=function(o){return arguments.length?(n(o),l()):n()},t.ticks=o=>{const u=n();let s=u[0],f=u[u.length-1];const c=f0){for(;d<=h;++d)for(x=1;xf)break;y.push(g)}}else for(;d<=h;++d)for(x=r-1;x>=1;--x)if(g=d>0?x/i(-d):x*i(d),!(gf)break;y.push(g)}y.length*2{if(o==null&&(o=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=hu(u)).precision==null&&(u.trim=!0),u=q0(u)),o===1/0)return u;const s=Math.max(1,r*o/t.ticks().length);return f=>{let c=f/i(Math.round(a(f)));return c*rn(Pj(n(),{floor:o=>i(Math.floor(a(o))),ceil:o=>i(Math.ceil(a(o)))})),t}function Dj(){const e=G0(Dd()).domain([1,10]);return e.copy=()=>is(e,Dj()).base(e.base()),_n.apply(e,arguments),e}function hS(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function pS(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Y0(e){var t=1,n=e(hS(t),pS(t));return n.constant=function(r){return arguments.length?e(hS(t=+r),pS(t)):t},da(n)}function Rj(){var e=Y0(Dd());return e.copy=function(){return is(e,Rj()).constant(e.constant())},_n.apply(e,arguments)}function yS(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function bY(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function xY(e){return e<0?-e*e:e*e}function X0(e){var t=e(Dt,Dt),n=1;function r(){return n===1?e(Dt,Dt):n===.5?e(bY,xY):e(yS(n),yS(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},da(t)}function V0(){var e=X0(Dd());return e.copy=function(){return is(e,V0()).exponent(e.exponent())},_n.apply(e,arguments),e}function SY(){return V0.apply(null,arguments).exponent(.5)}function mS(e){return Math.sign(e)*e*e}function OY(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function zj(){var e=I0(),t=[0,1],n=!1,r;function a(i){var l=OY(e(i));return isNaN(l)?r:n?Math.round(l):l}return a.invert=function(i){return e.invert(mS(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,lf)).map(mS)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(n=!!i,a):n},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return zj(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},_n.apply(a,arguments),da(a)}function Bj(){var e=[],t=[],n=[],r;function a(){var l=0,o=Math.max(1,t.length);for(n=new Array(o-1);++l0?n[o-1]:e[0],o=n?[r[n-1],t]:[r[s-1],r[s]]},l.unknown=function(u){return arguments.length&&(i=u),l},l.thresholds=function(){return r.slice()},l.copy=function(){return Lj().domain([e,t]).range(a).unknown(i)},_n.apply(da(l),arguments)}function kj(){var e=[.5],t=[0,1],n,r=1;function a(i){return i!=null&&i<=i?t[rs(e,i,0,r)]:n}return a.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var l=t.indexOf(i);return[e[l-1],e[l]]},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return kj().domain(e).range(t).unknown(n)},_n.apply(a,arguments)}const op=new Date,up=new Date;function ct(e,t,n,r){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const l=a(i),o=a.ceil(i);return i-l(t(i=new Date(+i),l==null?1:Math.floor(l)),i),a.range=(i,l,o)=>{const u=[];if(i=a.ceil(i),o=o==null?1:Math.floor(o),!(i0))return u;let s;do u.push(s=new Date(+i)),t(i,o),e(i);while(sct(l=>{if(l>=l)for(;e(l),!i(l);)l.setTime(l-1)},(l,o)=>{if(l>=l)if(o<0)for(;++o<=0;)for(;t(l,-1),!i(l););else for(;--o>=0;)for(;t(l,1),!i(l););}),n&&(a.count=(i,l)=>(op.setTime(+i),up.setTime(+l),e(op),e(up),Math.floor(n(op,up))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(r?l=>r(l)%i===0:l=>a.count(0,l)%i===0):a)),a}const cf=ct(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);cf.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?ct(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):cf);cf.range;const or=1e3,gn=or*60,ur=gn*60,Sr=ur*24,K0=Sr*7,vS=Sr*30,sp=Sr*365,Ta=ct(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*or)},(e,t)=>(t-e)/or,e=>e.getUTCSeconds());Ta.range;const F0=ct(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*or)},(e,t)=>{e.setTime(+e+t*gn)},(e,t)=>(t-e)/gn,e=>e.getMinutes());F0.range;const Q0=ct(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*gn)},(e,t)=>(t-e)/gn,e=>e.getUTCMinutes());Q0.range;const W0=ct(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*or-e.getMinutes()*gn)},(e,t)=>{e.setTime(+e+t*ur)},(e,t)=>(t-e)/ur,e=>e.getHours());W0.range;const Z0=ct(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ur)},(e,t)=>(t-e)/ur,e=>e.getUTCHours());Z0.range;const ls=ct(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*gn)/Sr,e=>e.getDate()-1);ls.range;const Rd=ct(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Sr,e=>e.getUTCDate()-1);Rd.range;const Uj=ct(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Sr,e=>Math.floor(e/Sr));Uj.range;function ri(e){return ct(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*gn)/K0)}const zd=ri(0),ff=ri(1),wY=ri(2),AY=ri(3),sl=ri(4),_Y=ri(5),EY=ri(6);zd.range;ff.range;wY.range;AY.range;sl.range;_Y.range;EY.range;function ai(e){return ct(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/K0)}const Bd=ai(0),df=ai(1),jY=ai(2),TY=ai(3),cl=ai(4),NY=ai(5),MY=ai(6);Bd.range;df.range;jY.range;TY.range;cl.range;NY.range;MY.range;const J0=ct(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());J0.range;const eg=ct(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());eg.range;const Or=ct(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Or.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ct(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)});Or.range;const wr=ct(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());wr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ct(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)});wr.range;function Ij(e,t,n,r,a,i){const l=[[Ta,1,or],[Ta,5,5*or],[Ta,15,15*or],[Ta,30,30*or],[i,1,gn],[i,5,5*gn],[i,15,15*gn],[i,30,30*gn],[a,1,ur],[a,3,3*ur],[a,6,6*ur],[a,12,12*ur],[r,1,Sr],[r,2,2*Sr],[n,1,K0],[t,1,vS],[t,3,3*vS],[e,1,sp]];function o(s,f,c){const d=fv).right(l,d);if(h===l.length)return e.every(am(s/sp,f/sp,c));if(h===0)return cf.every(Math.max(am(s,f,c),1));const[x,g]=l[d/l[h-1][2]53)return null;"w"in H||(H.w=1),"Z"in H?(se=fp(lo(H.y,0,1)),Se=se.getUTCDay(),se=Se>4||Se===0?df.ceil(se):df(se),se=Rd.offset(se,(H.V-1)*7),H.y=se.getUTCFullYear(),H.m=se.getUTCMonth(),H.d=se.getUTCDate()+(H.w+6)%7):(se=cp(lo(H.y,0,1)),Se=se.getDay(),se=Se>4||Se===0?ff.ceil(se):ff(se),se=ls.offset(se,(H.V-1)*7),H.y=se.getFullYear(),H.m=se.getMonth(),H.d=se.getDate()+(H.w+6)%7)}else("W"in H||"U"in H)&&("w"in H||(H.w="u"in H?H.u%7:"W"in H?1:0),Se="Z"in H?fp(lo(H.y,0,1)).getUTCDay():cp(lo(H.y,0,1)).getDay(),H.m=0,H.d="W"in H?(H.w+6)%7+H.W*7-(Se+5)%7:H.w+H.U*7-(Se+6)%7);return"Z"in H?(H.H+=H.Z/100|0,H.M+=H.Z%100,fp(H)):cp(H)}}function E(K,ee,ae,H){for(var Re=0,se=ee.length,Se=ae.length,Q,Ee;Re=Se)return-1;if(Q=ee.charCodeAt(Re++),Q===37){if(Q=ee.charAt(Re++),Ee=S[Q in gS?ee.charAt(Re++):Q],!Ee||(H=Ee(K,ae,H))<0)return-1}else if(Q!=ae.charCodeAt(H++))return-1}return H}function j(K,ee,ae){var H=s.exec(ee.slice(ae));return H?(K.p=f.get(H[0].toLowerCase()),ae+H[0].length):-1}function $(K,ee,ae){var H=h.exec(ee.slice(ae));return H?(K.w=x.get(H[0].toLowerCase()),ae+H[0].length):-1}function P(K,ee,ae){var H=c.exec(ee.slice(ae));return H?(K.w=d.get(H[0].toLowerCase()),ae+H[0].length):-1}function M(K,ee,ae){var H=y.exec(ee.slice(ae));return H?(K.m=m.get(H[0].toLowerCase()),ae+H[0].length):-1}function k(K,ee,ae){var H=g.exec(ee.slice(ae));return H?(K.m=v.get(H[0].toLowerCase()),ae+H[0].length):-1}function z(K,ee,ae){return E(K,t,ee,ae)}function B(K,ee,ae){return E(K,n,ee,ae)}function N(K,ee,ae){return E(K,r,ee,ae)}function R(K){return l[K.getDay()]}function D(K){return i[K.getDay()]}function U(K){return u[K.getMonth()]}function q(K){return o[K.getMonth()]}function X(K){return a[+(K.getHours()>=12)]}function G(K){return 1+~~(K.getMonth()/3)}function W(K){return l[K.getUTCDay()]}function oe(K){return i[K.getUTCDay()]}function _e(K){return u[K.getUTCMonth()]}function re(K){return o[K.getUTCMonth()]}function We(K){return a[+(K.getUTCHours()>=12)]}function at(K){return 1+~~(K.getUTCMonth()/3)}return{format:function(K){var ee=w(K+="",b);return ee.toString=function(){return K},ee},parse:function(K){var ee=A(K+="",!1);return ee.toString=function(){return K},ee},utcFormat:function(K){var ee=w(K+="",O);return ee.toString=function(){return K},ee},utcParse:function(K){var ee=A(K+="",!0);return ee.toString=function(){return K},ee}}}var gS={"-":"",_:" ",0:"0"},vt=/^\s*\d+/,zY=/^%/,BY=/[\\^$*+?|[\]().{}]/g;function pe(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i[t.toLowerCase(),n]))}function kY(e,t,n){var r=vt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function UY(e,t,n){var r=vt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function IY(e,t,n){var r=vt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function HY(e,t,n){var r=vt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function qY(e,t,n){var r=vt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function bS(e,t,n){var r=vt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function xS(e,t,n){var r=vt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function GY(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 YY(e,t,n){var r=vt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function XY(e,t,n){var r=vt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function SS(e,t,n){var r=vt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function VY(e,t,n){var r=vt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function OS(e,t,n){var r=vt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function KY(e,t,n){var r=vt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function FY(e,t,n){var r=vt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function QY(e,t,n){var r=vt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function WY(e,t,n){var r=vt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function ZY(e,t,n){var r=zY.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function JY(e,t,n){var r=vt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function eX(e,t,n){var r=vt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function wS(e,t){return pe(e.getDate(),t,2)}function tX(e,t){return pe(e.getHours(),t,2)}function nX(e,t){return pe(e.getHours()%12||12,t,2)}function rX(e,t){return pe(1+ls.count(Or(e),e),t,3)}function Hj(e,t){return pe(e.getMilliseconds(),t,3)}function aX(e,t){return Hj(e,t)+"000"}function iX(e,t){return pe(e.getMonth()+1,t,2)}function lX(e,t){return pe(e.getMinutes(),t,2)}function oX(e,t){return pe(e.getSeconds(),t,2)}function uX(e){var t=e.getDay();return t===0?7:t}function sX(e,t){return pe(zd.count(Or(e)-1,e),t,2)}function qj(e){var t=e.getDay();return t>=4||t===0?sl(e):sl.ceil(e)}function cX(e,t){return e=qj(e),pe(sl.count(Or(e),e)+(Or(e).getDay()===4),t,2)}function fX(e){return e.getDay()}function dX(e,t){return pe(ff.count(Or(e)-1,e),t,2)}function hX(e,t){return pe(e.getFullYear()%100,t,2)}function pX(e,t){return e=qj(e),pe(e.getFullYear()%100,t,2)}function yX(e,t){return pe(e.getFullYear()%1e4,t,4)}function mX(e,t){var n=e.getDay();return e=n>=4||n===0?sl(e):sl.ceil(e),pe(e.getFullYear()%1e4,t,4)}function vX(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+pe(t/60|0,"0",2)+pe(t%60,"0",2)}function AS(e,t){return pe(e.getUTCDate(),t,2)}function gX(e,t){return pe(e.getUTCHours(),t,2)}function bX(e,t){return pe(e.getUTCHours()%12||12,t,2)}function xX(e,t){return pe(1+Rd.count(wr(e),e),t,3)}function Gj(e,t){return pe(e.getUTCMilliseconds(),t,3)}function SX(e,t){return Gj(e,t)+"000"}function OX(e,t){return pe(e.getUTCMonth()+1,t,2)}function wX(e,t){return pe(e.getUTCMinutes(),t,2)}function AX(e,t){return pe(e.getUTCSeconds(),t,2)}function _X(e){var t=e.getUTCDay();return t===0?7:t}function EX(e,t){return pe(Bd.count(wr(e)-1,e),t,2)}function Yj(e){var t=e.getUTCDay();return t>=4||t===0?cl(e):cl.ceil(e)}function jX(e,t){return e=Yj(e),pe(cl.count(wr(e),e)+(wr(e).getUTCDay()===4),t,2)}function TX(e){return e.getUTCDay()}function NX(e,t){return pe(df.count(wr(e)-1,e),t,2)}function MX(e,t){return pe(e.getUTCFullYear()%100,t,2)}function CX(e,t){return e=Yj(e),pe(e.getUTCFullYear()%100,t,2)}function $X(e,t){return pe(e.getUTCFullYear()%1e4,t,4)}function PX(e,t){var n=e.getUTCDay();return e=n>=4||n===0?cl(e):cl.ceil(e),pe(e.getUTCFullYear()%1e4,t,4)}function DX(){return"+0000"}function _S(){return"%"}function ES(e){return+e}function jS(e){return Math.floor(+e/1e3)}var di,Xj,Vj;RX({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 RX(e){return di=RY(e),Xj=di.format,di.parse,Vj=di.utcFormat,di.utcParse,di}function zX(e){return new Date(e)}function BX(e){return e instanceof Date?+e:+new Date(+e)}function tg(e,t,n,r,a,i,l,o,u,s){var f=I0(),c=f.invert,d=f.domain,h=s(".%L"),x=s(":%S"),g=s("%I:%M"),v=s("%I %p"),y=s("%a %d"),m=s("%b %d"),b=s("%B"),O=s("%Y");function S(w){return(u(w)t(a/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(a,i)=>EG(e,i/r))},n.copy=function(){return Wj(t).domain(e)},Tr.apply(n,arguments)}function kd(){var e=0,t=.5,n=1,r=1,a,i,l,o,u,s=Dt,f,c=!1,d;function h(g){return isNaN(g=+g)?d:(g=.5+((g=+f(g))-i)*(r*gt}var YX=GX,XX=tT,VX=YX,KX=Gl;function FX(e){return e&&e.length?XX(e,KX,VX):void 0}var QX=FX;const Ud=Me(QX);function WX(e,t){return ee.e^i.s<0?1:-1;for(r=i.d.length,a=e.d.length,t=0,n=re.d[t]^i.s<0?1:-1;return r===a?0:r>a^i.s<0?1:-1};F.decimalPlaces=F.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Le;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};F.dividedBy=F.div=function(e){return yr(this,new this.constructor(e))};F.dividedToIntegerBy=F.idiv=function(e){var t=this,n=t.constructor;return Ce(yr(t,new n(e),0,1),n.precision)};F.equals=F.eq=function(e){return!this.cmp(e)};F.exponent=function(){return rt(this)};F.greaterThan=F.gt=function(e){return this.cmp(e)>0};F.greaterThanOrEqualTo=F.gte=function(e){return this.cmp(e)>=0};F.isInteger=F.isint=function(){return this.e>this.d.length-2};F.isNegative=F.isneg=function(){return this.s<0};F.isPositive=F.ispos=function(){return this.s>0};F.isZero=function(){return this.s===0};F.lessThan=F.lt=function(e){return this.cmp(e)<0};F.lessThanOrEqualTo=F.lte=function(e){return this.cmp(e)<1};F.logarithm=F.log=function(e){var t,n=this,r=n.constructor,a=r.precision,i=a+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Jt))throw Error(wn+"NaN");if(n.s<1)throw Error(wn+(n.s?"NaN":"-Infinity"));return n.eq(Jt)?new r(0):(Ge=!1,t=yr(pu(n,i),pu(e,i),i),Ge=!0,Ce(t,a))};F.minus=F.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?iT(t,e):rT(t,(e.s=-e.s,e))};F.modulo=F.mod=function(e){var t,n=this,r=n.constructor,a=r.precision;if(e=new r(e),!e.s)throw Error(wn+"NaN");return n.s?(Ge=!1,t=yr(n,e,0,1).times(e),Ge=!0,n.minus(t)):Ce(new r(n),a)};F.naturalExponential=F.exp=function(){return aT(this)};F.naturalLogarithm=F.ln=function(){return pu(this)};F.negated=F.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};F.plus=F.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?rT(t,e):iT(t,(e.s=-e.s,e))};F.precision=F.sd=function(e){var t,n,r,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ba+e);if(t=rt(a)+1,r=a.d.length-1,n=r*Le+1,r=a.d[r],r){for(;r%10==0;r/=10)n--;for(r=a.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};F.squareRoot=F.sqrt=function(){var e,t,n,r,a,i,l,o=this,u=o.constructor;if(o.s<1){if(!o.s)return new u(0);throw Error(wn+"NaN")}for(e=rt(o),Ge=!1,a=Math.sqrt(+o),a==0||a==1/0?(t=Un(o.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Vl((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new u(t)):r=new u(a.toString()),n=u.precision,a=l=n+3;;)if(i=r,r=i.plus(yr(o,i,l+2)).times(.5),Un(i.d).slice(0,l)===(t=Un(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),a==l&&t=="4999"){if(Ce(i,n+1,0),i.times(i).eq(o)){r=i;break}}else if(t!="9999")break;l+=4}return Ge=!0,Ce(r,n)};F.times=F.mul=function(e){var t,n,r,a,i,l,o,u,s,f=this,c=f.constructor,d=f.d,h=(e=new c(e)).d;if(!f.s||!e.s)return new c(0);for(e.s*=f.s,n=f.e+e.e,u=d.length,s=h.length,u=0;){for(t=0,a=u+r;a>r;)o=i[a]+h[r]*d[a-r-1]+t,i[a--]=o%dt|0,t=o/dt|0;i[a]=(i[a]+t)%dt|0}for(;!i[--l];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,Ge?Ce(e,c.precision):e};F.toDecimalPlaces=F.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Gn(e,0,Xl),t===void 0?t=r.rounding:Gn(t,0,8),Ce(n,e+rt(n)+1,t))};F.toExponential=function(e,t){var n,r=this,a=r.constructor;return e===void 0?n=Ka(r,!0):(Gn(e,0,Xl),t===void 0?t=a.rounding:Gn(t,0,8),r=Ce(new a(r),e+1,t),n=Ka(r,!0,e+1)),n};F.toFixed=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?Ka(a):(Gn(e,0,Xl),t===void 0?t=i.rounding:Gn(t,0,8),r=Ce(new i(a),e+rt(a)+1,t),n=Ka(r.abs(),!1,e+rt(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)};F.toInteger=F.toint=function(){var e=this,t=e.constructor;return Ce(new t(e),rt(e)+1,t.rounding)};F.toNumber=function(){return+this};F.toPower=F.pow=function(e){var t,n,r,a,i,l,o=this,u=o.constructor,s=12,f=+(e=new u(e));if(!e.s)return new u(Jt);if(o=new u(o),!o.s){if(e.s<1)throw Error(wn+"Infinity");return o}if(o.eq(Jt))return o;if(r=u.precision,e.eq(Jt))return Ce(o,r);if(t=e.e,n=e.d.length-1,l=t>=n,i=o.s,l){if((n=f<0?-f:f)<=nT){for(a=new u(Jt),t=Math.ceil(r/Le+4),Ge=!1;n%2&&(a=a.times(o),MS(a.d,t)),n=Vl(n/2),n!==0;)o=o.times(o),MS(o.d,t);return Ge=!0,e.s<0?new u(Jt).div(a):Ce(a,r)}}else if(i<0)throw Error(wn+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,o.s=1,Ge=!1,a=e.times(pu(o,r+s)),Ge=!0,a=aT(a),a.s=i,a};F.toPrecision=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?(n=rt(a),r=Ka(a,n<=i.toExpNeg||n>=i.toExpPos)):(Gn(e,1,Xl),t===void 0?t=i.rounding:Gn(t,0,8),a=Ce(new i(a),e,t),n=rt(a),r=Ka(a,e<=n||n<=i.toExpNeg,e)),r};F.toSignificantDigits=F.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Gn(e,1,Xl),t===void 0?t=r.rounding:Gn(t,0,8)),Ce(new r(n),e,t)};F.toString=F.valueOf=F.val=F.toJSON=F[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=rt(e),n=e.constructor;return Ka(e,t<=n.toExpNeg||t>=n.toExpPos)};function rT(e,t){var n,r,a,i,l,o,u,s,f=e.constructor,c=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),Ge?Ce(t,c):t;if(u=e.d,s=t.d,l=e.e,a=t.e,u=u.slice(),i=l-a,i){for(i<0?(r=u,i=-i,o=s.length):(r=s,a=l,o=u.length),l=Math.ceil(c/Le),o=l>o?l+1:o+1,i>o&&(i=o,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(o=u.length,i=s.length,o-i<0&&(i=o,r=s,s=u,u=r),n=0;i;)n=(u[--i]=u[i]+s[i]+n)/dt|0,u[i]%=dt;for(n&&(u.unshift(n),++a),o=u.length;u[--o]==0;)u.pop();return t.d=u,t.e=a,Ge?Ce(t,c):t}function Gn(e,t,n){if(e!==~~e||en)throw Error(Ba+e)}function Un(e){var t,n,r,a=e.length-1,i="",l=e[0];if(a>0){for(i+=l,t=1;tl?1:-1;else for(o=u=0;oa[o]?1:-1;break}return u}function n(r,a,i){for(var l=0;i--;)r[i]-=l,l=r[i]1;)r.shift()}return function(r,a,i,l){var o,u,s,f,c,d,h,x,g,v,y,m,b,O,S,w,A,E,j=r.constructor,$=r.s==a.s?1:-1,P=r.d,M=a.d;if(!r.s)return new j(r);if(!a.s)throw Error(wn+"Division by zero");for(u=r.e-a.e,A=M.length,S=P.length,h=new j($),x=h.d=[],s=0;M[s]==(P[s]||0);)++s;if(M[s]>(P[s]||0)&&--u,i==null?m=i=j.precision:l?m=i+(rt(r)-rt(a))+1:m=i,m<0)return new j(0);if(m=m/Le+2|0,s=0,A==1)for(f=0,M=M[0],m++;(s1&&(M=e(M,f),P=e(P,f),A=M.length,S=P.length),O=A,g=P.slice(0,A),v=g.length;v=dt/2&&++w;do f=0,o=t(M,g,A,v),o<0?(y=g[0],A!=v&&(y=y*dt+(g[1]||0)),f=y/w|0,f>1?(f>=dt&&(f=dt-1),c=e(M,f),d=c.length,v=g.length,o=t(c,g,d,v),o==1&&(f--,n(c,A16)throw Error(ig+rt(e));if(!e.s)return new f(Jt);for(Ge=!1,o=c,l=new f(.03125);e.abs().gte(.1);)e=e.times(l),s+=5;for(r=Math.log(Aa(2,s))/Math.LN10*2+5|0,o+=r,n=a=i=new f(Jt),f.precision=o;;){if(a=Ce(a.times(e),o),n=n.times(++u),l=i.plus(yr(a,n,o)),Un(l.d).slice(0,o)===Un(i.d).slice(0,o)){for(;s--;)i=Ce(i.times(i),o);return f.precision=c,t==null?(Ge=!0,Ce(i,c)):i}i=l}}function rt(e){for(var t=e.e*Le,n=e.d[0];n>=10;n/=10)t++;return t}function dp(e,t,n){if(t>e.LN10.sd())throw Ge=!0,n&&(e.precision=n),Error(wn+"LN10 precision limit exceeded");return Ce(new e(e.LN10),t)}function $r(e){for(var t="";e--;)t+="0";return t}function pu(e,t){var n,r,a,i,l,o,u,s,f,c=1,d=10,h=e,x=h.d,g=h.constructor,v=g.precision;if(h.s<1)throw Error(wn+(h.s?"NaN":"-Infinity"));if(h.eq(Jt))return new g(0);if(t==null?(Ge=!1,s=v):s=t,h.eq(10))return t==null&&(Ge=!0),dp(g,s);if(s+=d,g.precision=s,n=Un(x),r=n.charAt(0),i=rt(h),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)h=h.times(e),n=Un(h.d),r=n.charAt(0),c++;i=rt(h),r>1?(h=new g("0."+n),i++):h=new g(r+"."+n.slice(1))}else return u=dp(g,s+2,v).times(i+""),h=pu(new g(r+"."+n.slice(1)),s-d).plus(u),g.precision=v,t==null?(Ge=!0,Ce(h,v)):h;for(o=l=h=yr(h.minus(Jt),h.plus(Jt),s),f=Ce(h.times(h),s),a=3;;){if(l=Ce(l.times(f),s),u=o.plus(yr(l,new g(a),s)),Un(u.d).slice(0,s)===Un(o.d).slice(0,s))return o=o.times(2),i!==0&&(o=o.plus(dp(g,s+2,v).times(i+""))),o=yr(o,new g(c),s),g.precision=v,t==null?(Ge=!0,Ce(o,v)):o;o=u,a+=2}}function NS(e,t){var n,r,a;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=Vl(n/Le),e.d=[],r=(n+1)%Le,n<0&&(r+=Le),rhf||e.e<-hf))throw Error(ig+n)}else e.s=0,e.e=0,e.d=[0];return e}function Ce(e,t,n){var r,a,i,l,o,u,s,f,c=e.d;for(l=1,i=c[0];i>=10;i/=10)l++;if(r=t-l,r<0)r+=Le,a=t,s=c[f=0];else{if(f=Math.ceil((r+1)/Le),i=c.length,f>=i)return e;for(s=i=c[f],l=1;i>=10;i/=10)l++;r%=Le,a=r-Le+l}if(n!==void 0&&(i=Aa(10,l-a-1),o=s/i%10|0,u=t<0||c[f+1]!==void 0||s%i,u=n<4?(o||u)&&(n==0||n==(e.s<0?3:2)):o>5||o==5&&(n==4||u||n==6&&(r>0?a>0?s/Aa(10,l-a):0:c[f-1])%10&1||n==(e.s<0?8:7))),t<1||!c[0])return u?(i=rt(e),c.length=1,t=t-i-1,c[0]=Aa(10,(Le-t%Le)%Le),e.e=Vl(-t/Le)||0):(c.length=1,c[0]=e.e=e.s=0),e;if(r==0?(c.length=f,i=1,f--):(c.length=f+1,i=Aa(10,Le-r),c[f]=a>0?(s/Aa(10,l-a)%Aa(10,a)|0)*i:0),u)for(;;)if(f==0){(c[0]+=i)==dt&&(c[0]=1,++e.e);break}else{if(c[f]+=i,c[f]!=dt)break;c[f--]=0,i=1}for(r=c.length;c[--r]===0;)c.pop();if(Ge&&(e.e>hf||e.e<-hf))throw Error(ig+rt(e));return e}function iT(e,t){var n,r,a,i,l,o,u,s,f,c,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),Ge?Ce(t,h):t;if(u=e.d,c=t.d,r=t.e,s=e.e,u=u.slice(),l=s-r,l){for(f=l<0,f?(n=u,l=-l,o=c.length):(n=c,r=s,o=u.length),a=Math.max(Math.ceil(h/Le),o)+2,l>a&&(l=a,n.length=1),n.reverse(),a=l;a--;)n.push(0);n.reverse()}else{for(a=u.length,o=c.length,f=a0;--a)u[o++]=0;for(a=c.length;a>l;){if(u[--a]0?i=i.charAt(0)+"."+i.slice(1)+$r(r):l>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+$r(-a-1)+i,n&&(r=n-l)>0&&(i+=$r(r))):a>=l?(i+=$r(a+1-l),n&&(r=n-a-1)>0&&(i=i+"."+$r(r))):((r=a+1)0&&(a+1===l&&(i+="."),i+=$r(r))),e.s<0?"-"+i:i}function MS(e,t){if(e.length>t)return e.length=t,!0}function lT(e){var t,n,r;function a(i){var l=this;if(!(l instanceof a))return new a(i);if(l.constructor=a,i instanceof a){l.s=i.s,l.e=i.e,l.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(Ba+i);if(i>0)l.s=1;else if(i<0)i=-i,l.s=-1;else{l.s=0,l.e=0,l.d=[0];return}if(i===~~i&&i<1e7){l.e=0,l.d=[i];return}return NS(l,i.toString())}else if(typeof i!="string")throw Error(Ba+i);if(i.charCodeAt(0)===45?(i=i.slice(1),l.s=-1):l.s=1,bV.test(i))NS(l,i);else throw Error(Ba+i)}if(a.prototype=F,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=lT,a.config=a.set=xV,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=a[t+1]&&r<=a[t+2])this[n]=r;else throw Error(Ba+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Ba+n+": "+r);return this}var lg=lT(gV);Jt=new lg(1);const Te=lg;function SV(e){return _V(e)||AV(e)||wV(e)||OV()}function OV(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wV(e,t){if(e){if(typeof e=="string")return sm(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 sm(e,t)}}function AV(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function _V(e){if(Array.isArray(e))return sm(e)}function sm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?n.apply(void 0,a):e(t-l,CS(function(){for(var o=arguments.length,u=new Array(o),s=0;se.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,a=!1,i=void 0;try{for(var l=e[Symbol.iterator](),o;!(r=(o=l.next()).done)&&(n.push(o.value),!(t&&n.length===t));r=!0);}catch(u){a=!0,i=u}finally{try{!r&&l.return!=null&&l.return()}finally{if(a)throw i}}return n}}function UV(e){if(Array.isArray(e))return e}function fT(e){var t=yu(e,2),n=t[0],r=t[1],a=n,i=r;return n>r&&(a=r,i=n),[a,i]}function dT(e,t,n){if(e.lte(0))return new Te(0);var r=qd.getDigitCount(e.toNumber()),a=new Te(10).pow(r),i=e.div(a),l=r!==1?.05:.1,o=new Te(Math.ceil(i.div(l).toNumber())).add(n).mul(l),u=o.mul(a);return t?u:new Te(Math.ceil(u))}function IV(e,t,n){var r=1,a=new Te(e);if(!a.isint()&&n){var i=Math.abs(e);i<1?(r=new Te(10).pow(qd.getDigitCount(e)-1),a=new Te(Math.floor(a.div(r).toNumber())).mul(r)):i>1&&(a=new Te(Math.floor(e)))}else e===0?a=new Te(Math.floor((t-1)/2)):n||(a=new Te(Math.floor(e)));var l=Math.floor((t-1)/2),o=NV(TV(function(u){return a.add(new Te(u-l).mul(r)).toNumber()}),cm);return o(0,t)}function hT(e,t,n,r){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new Te(0),tickMin:new Te(0),tickMax:new Te(0)};var i=dT(new Te(t).sub(e).div(n-1),r,a),l;e<=0&&t>=0?l=new Te(0):(l=new Te(e).add(t).div(2),l=l.sub(new Te(l).mod(i)));var o=Math.ceil(l.sub(e).div(i).toNumber()),u=Math.ceil(new Te(t).sub(l).div(i).toNumber()),s=o+u+1;return s>n?hT(e,t,n,r,a+1):(s0?u+(n-s):u,o=t>0?o:o+(n-s)),{step:i,tickMin:l.sub(new Te(o).mul(i)),tickMax:l.add(new Te(u).mul(i))})}function HV(e){var t=yu(e,2),n=t[0],r=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=Math.max(a,2),o=fT([n,r]),u=yu(o,2),s=u[0],f=u[1];if(s===-1/0||f===1/0){var c=f===1/0?[s].concat(dm(cm(0,a-1).map(function(){return 1/0}))):[].concat(dm(cm(0,a-1).map(function(){return-1/0})),[f]);return n>r?fm(c):c}if(s===f)return IV(s,a,i);var d=hT(s,f,l,i),h=d.step,x=d.tickMin,g=d.tickMax,v=qd.rangeStep(x,g.add(new Te(.1).mul(h)),h);return n>r?fm(v):v}function qV(e,t){var n=yu(e,2),r=n[0],a=n[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=fT([r,a]),o=yu(l,2),u=o[0],s=o[1];if(u===-1/0||s===1/0)return[r,a];if(u===s)return[u];var f=Math.max(t,2),c=dT(new Te(s).sub(u).div(f-1),i,0),d=[].concat(dm(qd.rangeStep(new Te(u),new Te(s).sub(new Te(.99).mul(c)),c)),[s]);return r>a?fm(d):d}var GV=sT(HV),YV=sT(qV),XV="Invariant failed";function Fa(e,t){throw new Error(XV)}var VV=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function fl(e){"@babel/helpers - typeof";return fl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fl(e)}function pf(){return pf=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function eK(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function tK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nK(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,l=-1,o=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(o<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var u=i.range,s=0;s0?a[s-1].coordinate:a[o-1].coordinate,c=a[s].coordinate,d=s>=o-1?a[0].coordinate:a[s+1].coordinate,h=void 0;if(Cn(c-f)!==Cn(d-c)){var x=[];if(Cn(d-c)===Cn(u[1]-u[0])){h=d;var g=c+u[1]-u[0];x[0]=Math.min(g,(g+f)/2),x[1]=Math.max(g,(g+f)/2)}else{h=f;var v=d+u[1]-u[0];x[0]=Math.min(c,(v+c)/2),x[1]=Math.max(c,(v+c)/2)}var y=[Math.min(c,(h+c)/2),Math.max(c,(h+c)/2)];if(t>y[0]&&t<=y[1]||t>=x[0]&&t<=x[1]){l=a[s].index;break}}else{var m=Math.min(f,d),b=Math.max(f,d);if(t>(m+c)/2&&t<=(b+c)/2){l=a[s].index;break}}}else for(var O=0;O0&&O(r[O].coordinate+r[O-1].coordinate)/2&&t<=(r[O].coordinate+r[O+1].coordinate)/2||O===o-1&&t>(r[O].coordinate+r[O-1].coordinate)/2){l=r[O].index;break}return l},og=function(t){var n,r=t,a=r.type.displayName,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Ve(Ve({},t.type.defaultProps),t.props):t.props,l=i.stroke,o=i.fill,u;switch(a){case"Line":u=l;break;case"Area":case"Radar":u=l&&l!=="none"?l:o;break;default:u=o;break}return u},bK=function(t){var n=t.barSize,r=t.totalSize,a=t.stackGroups,i=a===void 0?{}:a;if(!i)return{};for(var l={},o=Object.keys(i),u=0,s=o.length;u=0});if(y&&y.length){var m=y[0].type.defaultProps,b=m!==void 0?Ve(Ve({},m),y[0].props):y[0].props,O=b.barSize,S=b[v];l[S]||(l[S]=[]);var w=ge(O)?n:O;l[S].push({item:y[0],stackList:y.slice(1),barSize:ge(w)?void 0:Va(w,r,0)})}}return l},xK=function(t){var n=t.barGap,r=t.barCategoryGap,a=t.bandSize,i=t.sizeList,l=i===void 0?[]:i,o=t.maxBarSize,u=l.length;if(u<1)return null;var s=Va(n,a,0,!0),f,c=[];if(l[0].barSize===+l[0].barSize){var d=!1,h=a/u,x=l.reduce(function(O,S){return O+S.barSize||0},0);x+=(u-1)*s,x>=a&&(x-=(u-1)*s,s=0),x>=a&&h>0&&(d=!0,h*=.9,x=u*h);var g=(a-x)/2>>0,v={offset:g-s,size:0};f=l.reduce(function(O,S){var w={item:S.item,position:{offset:v.offset+v.size+s,size:d?h:S.barSize}},A=[].concat(DS(O),[w]);return v=A[A.length-1].position,S.stackList&&S.stackList.length&&S.stackList.forEach(function(E){A.push({item:E,position:v})}),A},c)}else{var y=Va(r,a,0,!0);a-2*y-(u-1)*s<=0&&(s=0);var m=(a-2*y-(u-1)*s)/u;m>1&&(m>>=0);var b=o===+o?Math.min(m,o):m;f=l.reduce(function(O,S,w){var A=[].concat(DS(O),[{item:S.item,position:{offset:y+(m+s)*w+(m-b)/2,size:b}}]);return S.stackList&&S.stackList.length&&S.stackList.forEach(function(E){A.push({item:E,position:A[A.length-1].position})}),A},c)}return f},SK=function(t,n,r,a){var i=r.children,l=r.width,o=r.margin,u=l-(o.left||0)-(o.right||0),s=vT({children:i,legendWidth:u});if(s){var f=a||{},c=f.width,d=f.height,h=s.align,x=s.verticalAlign,g=s.layout;if((g==="vertical"||g==="horizontal"&&x==="middle")&&h!=="center"&&Y(t[h]))return Ve(Ve({},t),{},Hi({},h,t[h]+(c||0)));if((g==="horizontal"||g==="vertical"&&h==="center")&&x!=="middle"&&Y(t[x]))return Ve(Ve({},t),{},Hi({},x,t[x]+(d||0)))}return t},OK=function(t,n,r){return ge(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},gT=function(t,n,r,a,i){var l=n.props.children,o=$n(l,Gd).filter(function(s){return OK(a,i,s.props.direction)});if(o&&o.length){var u=o.map(function(s){return s.props.dataKey});return t.reduce(function(s,f){var c=Yn(f,r);if(ge(c))return s;var d=Array.isArray(c)?[Id(c),Ud(c)]:[c,c],h=u.reduce(function(x,g){var v=Yn(f,g,0),y=d[0]-Math.abs(Array.isArray(v)?v[0]:v),m=d[1]+Math.abs(Array.isArray(v)?v[1]:v);return[Math.min(y,x[0]),Math.max(m,x[1])]},[1/0,-1/0]);return[Math.min(h[0],s[0]),Math.max(h[1],s[1])]},[1/0,-1/0])}return null},wK=function(t,n,r,a,i){var l=n.map(function(o){return gT(t,o,r,i,a)}).filter(function(o){return!ge(o)});return l&&l.length?l.reduce(function(o,u){return[Math.min(o[0],u[0]),Math.max(o[1],u[1])]},[1/0,-1/0]):null},bT=function(t,n,r,a,i){var l=n.map(function(u){var s=u.props.dataKey;return r==="number"&&s&&gT(t,u,s,a)||zo(t,s,r,i)});if(r==="number")return l.reduce(function(u,s){return[Math.min(u[0],s[0]),Math.max(u[1],s[1])]},[1/0,-1/0]);var o={};return l.reduce(function(u,s){for(var f=0,c=s.length;f=2?Cn(o[0]-o[1])*2*s:s,n&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(c){var d=i?i.indexOf(c):c;return{coordinate:a(d)+s,value:c,offset:s}});return f.filter(function(c){return!es(c.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(c,d){return{coordinate:a(c)+s,value:c,index:d,offset:s}}):a.ticks&&!r?a.ticks(t.tickCount).map(function(c){return{coordinate:a(c)+s,value:c,offset:s}}):a.domain().map(function(c,d){return{coordinate:a(c)+s,value:i?i[c]:c,index:d,offset:s}})},hp=new WeakMap,Ps=function(t,n){if(typeof n!="function")return t;hp.has(t)||hp.set(t,new WeakMap);var r=hp.get(t);if(r.has(n))return r.get(n);var a=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,a),a},AK=function(t,n,r){var a=t.scale,i=t.type,l=t.layout,o=t.axisType;if(a==="auto")return l==="radial"&&o==="radiusAxis"?{scale:su(),realScaleType:"band"}:l==="radial"&&o==="angleAxis"?{scale:sf(),realScaleType:"linear"}:i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Ro(),realScaleType:"point"}:i==="category"?{scale:su(),realScaleType:"band"}:{scale:sf(),realScaleType:"linear"};if(Xa(a)){var u="scale".concat(jd(a));return{scale:(TS[u]||Ro)(),realScaleType:TS[u]?u:"point"}}return ue(a)?{scale:a}:{scale:Ro(),realScaleType:"point"}},zS=1e-4,_K=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,a=t.range(),i=Math.min(a[0],a[1])-zS,l=Math.max(a[0],a[1])+zS,o=t(n[0]),u=t(n[r-1]);(ol||ul)&&t.domain([n[0],n[r-1]])}},EK=function(t,n){if(!t)return null;for(var r=0,a=t.length;ra)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]=0?(t[o][r][0]=i,t[o][r][1]=i+u,i=t[o][r][1]):(t[o][r][0]=l,t[o][r][1]=l+u,l=t[o][r][1])}},NK=function(t){var n=t.length;if(!(n<=0))for(var r=0,a=t[0].length;r=0?(t[l][r][0]=i,t[l][r][1]=i+o,i=t[l][r][1]):(t[l][r][0]=0,t[l][r][1]=0)}},MK={sign:TK,expand:G8,none:rl,silhouette:Y8,wiggle:X8,positive:NK},CK=function(t,n,r){var a=n.map(function(o){return o.props.dataKey}),i=MK[r],l=q8().keys(a).value(function(o,u){return+Yn(o,u,0)}).order(Uy).offset(i);return l(t)},$K=function(t,n,r,a,i,l){if(!t)return null;var o=l?n.reverse():n,u={},s=o.reduce(function(c,d){var h,x=(h=d.type)!==null&&h!==void 0&&h.defaultProps?Ve(Ve({},d.type.defaultProps),d.props):d.props,g=x.stackId,v=x.hide;if(v)return c;var y=x[r],m=c[y]||{hasStack:!1,stackGroups:{}};if(ut(g)){var b=m.stackGroups[g]||{numericAxisId:r,cateAxisId:a,items:[]};b.items.push(d),m.hasStack=!0,m.stackGroups[g]=b}else m.stackGroups[Ed("_stackId_")]={numericAxisId:r,cateAxisId:a,items:[d]};return Ve(Ve({},c),{},Hi({},y,m))},u),f={};return Object.keys(s).reduce(function(c,d){var h=s[d];if(h.hasStack){var x={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(g,v){var y=h.stackGroups[v];return Ve(Ve({},g),{},Hi({},v,{numericAxisId:r,cateAxisId:a,items:y.items,stackedData:CK(t,y.items,i)}))},x)}return Ve(Ve({},c),{},Hi({},d,h))},f)},PK=function(t,n){var r=n.realScaleType,a=n.type,i=n.tickCount,l=n.originalDomain,o=n.allowDecimals,u=r||n.scale;if(u!=="auto"&&u!=="linear")return null;if(i&&a==="number"&&l&&(l[0]==="auto"||l[1]==="auto")){var s=t.domain();if(!s.length)return null;var f=GV(s,i,o);return t.domain([Id(f),Ud(f)]),{niceTicks:f}}if(i&&a==="number"){var c=t.domain(),d=YV(c,i,o);return{niceTicks:d}}return null},BS=function(t){var n=t.axis,r=t.ticks,a=t.offset,i=t.bandSize,l=t.entry,o=t.index;if(n.type==="category")return r[o]?r[o].coordinate+a:null;var u=Yn(l,n.dataKey,n.domain[o]);return ge(u)?null:n.scale(u)-i/2+a},DK=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var a=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return a<=0&&i>=0?0:i<0?i:a}return r[0]},RK=function(t,n){var r,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Ve(Ve({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(ut(i)){var l=n[i];if(l){var o=l.items.indexOf(t);return o>=0?l.stackedData[o]:null}}return null},zK=function(t){return t.reduce(function(n,r){return[Id(r.concat([n[0]]).filter(Y)),Ud(r.concat([n[1]]).filter(Y))]},[1/0,-1/0])},OT=function(t,n,r){return Object.keys(t).reduce(function(a,i){var l=t[i],o=l.stackedData,u=o.reduce(function(s,f){var c=zK(f.slice(n,r+1));return[Math.min(s[0],c[0]),Math.max(s[1],c[1])]},[1/0,-1/0]);return[Math.min(u[0],a[0]),Math.max(u[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},LS=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,kS=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,mm=function(t,n,r){if(ue(t))return t(n,r);if(!Array.isArray(t))return n;var a=[];if(Y(t[0]))a[0]=r?t[0]:Math.min(t[0],n[0]);else if(LS.test(t[0])){var i=+LS.exec(t[0])[1];a[0]=n[0]-i}else ue(t[0])?a[0]=t[0](n[0]):a[0]=n[0];if(Y(t[1]))a[1]=r?t[1]:Math.max(t[1],n[1]);else if(kS.test(t[1])){var l=+kS.exec(t[1])[1];a[1]=n[1]+l}else ue(t[1])?a[1]=t[1](n[1]):a[1]=n[1];return a},mf=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!r||a>0)return a}if(t&&n&&n.length>=2){for(var i=D0(n,function(c){return c.coordinate}),l=1/0,o=1,u=i.length;ol&&(s=2*Math.PI-s),{radius:o,angle:UK(s),angleInRadian:s}},qK=function(t){var n=t.startAngle,r=t.endAngle,a=Math.floor(n/360),i=Math.floor(r/360),l=Math.min(a,i);return{startAngle:n-l*360,endAngle:r-l*360}},GK=function(t,n){var r=n.startAngle,a=n.endAngle,i=Math.floor(r/360),l=Math.floor(a/360),o=Math.min(i,l);return t+o*360},qS=function(t,n){var r=t.x,a=t.y,i=HK({x:r,y:a},n),l=i.radius,o=i.angle,u=n.innerRadius,s=n.outerRadius;if(ls)return!1;if(l===0)return!0;var f=qK(n),c=f.startAngle,d=f.endAngle,h=o,x;if(c<=d){for(;h>d;)h-=360;for(;h=c&&h<=d}else{for(;h>c;)h-=360;for(;h=d&&h<=c}return x?HS(HS({},n),{},{radius:l,angle:GK(h,n)}):null};function bu(e){"@babel/helpers - typeof";return bu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bu(e)}var YK=["offset"];function XK(e){return QK(e)||FK(e)||KK(e)||VK()}function VK(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KK(e,t){if(e){if(typeof e=="string")return vm(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 vm(e,t)}}function FK(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function QK(e){if(Array.isArray(e))return vm(e)}function vm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ZK(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function GS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function lt(e){for(var t=1;t=0?1:-1,b,O;a==="insideStart"?(b=h+m*l,O=g):a==="insideEnd"?(b=x-m*l,O=!g):a==="end"&&(b=x+m*l,O=g),O=y<=0?O:!O;var S=_t(s,f,v,b),w=_t(s,f,v,b+(O?1:-1)*359),A="M".concat(S.x,",").concat(S.y,` A`).concat(v,",").concat(v,",0,1,").concat(O?0:1,`, `).concat(w.x,",").concat(w.y),E=ge(t.id)?Ed("recharts-radial-line-"):t.id;return C.createElement("text",xu({},r,{dominantBaseline:"central",className:ve("recharts-radial-bar-label",o)}),C.createElement("defs",null,C.createElement("path",{id:E,d:A})),C.createElement("textPath",{xlinkHref:"#".concat(E)},n))},iF=function(t){var n=t.viewBox,r=t.offset,a=t.position,i=n,l=i.cx,o=i.cy,u=i.innerRadius,s=i.outerRadius,f=i.startAngle,c=i.endAngle,d=(f+c)/2;if(a==="outside"){var h=_t(l,o,s+r,d),x=h.x,g=h.y;return{x,y:g,textAnchor:x>=l?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:l,y:o,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:l,y:o,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:l,y:o,textAnchor:"middle",verticalAnchor:"end"};var v=(u+s)/2,y=_t(l,o,v,d),m=y.x,b=y.y;return{x:m,y:b,textAnchor:"middle",verticalAnchor:"middle"}},lF=function(t){var n=t.viewBox,r=t.parentViewBox,a=t.offset,i=t.position,l=n,o=l.x,u=l.y,s=l.width,f=l.height,c=f>=0?1:-1,d=c*a,h=c>0?"end":"start",x=c>0?"start":"end",g=s>=0?1:-1,v=g*a,y=g>0?"end":"start",m=g>0?"start":"end";if(i==="top"){var b={x:o+s/2,y:u-c*a,textAnchor:"middle",verticalAnchor:h};return lt(lt({},b),r?{height:Math.max(u-r.y,0),width:s}:{})}if(i==="bottom"){var O={x:o+s/2,y:u+f+d,textAnchor:"middle",verticalAnchor:x};return lt(lt({},O),r?{height:Math.max(r.y+r.height-(u+f),0),width:s}:{})}if(i==="left"){var S={x:o-v,y:u+f/2,textAnchor:y,verticalAnchor:"middle"};return lt(lt({},S),r?{width:Math.max(S.x-r.x,0),height:f}:{})}if(i==="right"){var w={x:o+s+v,y:u+f/2,textAnchor:m,verticalAnchor:"middle"};return lt(lt({},w),r?{width:Math.max(r.x+r.width-w.x,0),height:f}:{})}var A=r?{width:s,height:f}:{};return i==="insideLeft"?lt({x:o+v,y:u+f/2,textAnchor:m,verticalAnchor:"middle"},A):i==="insideRight"?lt({x:o+s-v,y:u+f/2,textAnchor:y,verticalAnchor:"middle"},A):i==="insideTop"?lt({x:o+s/2,y:u+d,textAnchor:"middle",verticalAnchor:x},A):i==="insideBottom"?lt({x:o+s/2,y:u+f-d,textAnchor:"middle",verticalAnchor:h},A):i==="insideTopLeft"?lt({x:o+v,y:u+d,textAnchor:m,verticalAnchor:x},A):i==="insideTopRight"?lt({x:o+s-v,y:u+d,textAnchor:y,verticalAnchor:x},A):i==="insideBottomLeft"?lt({x:o+v,y:u+f-d,textAnchor:m,verticalAnchor:h},A):i==="insideBottomRight"?lt({x:o+s-v,y:u+f-d,textAnchor:y,verticalAnchor:h},A):Ll(i)&&(Y(i.x)||Ea(i.x))&&(Y(i.y)||Ea(i.y))?lt({x:o+Va(i.x,s),y:u+Va(i.y,f),textAnchor:"end",verticalAnchor:"end"},A):lt({x:o+s/2,y:u+f/2,textAnchor:"middle",verticalAnchor:"middle"},A)},oF=function(t){return"cx"in t&&Y(t.cx)};function Nt(e){var t=e.offset,n=t===void 0?5:t,r=WK(e,YK),a=lt({offset:n},r),i=a.viewBox,l=a.position,o=a.value,u=a.children,s=a.content,f=a.className,c=f===void 0?"":f,d=a.textBreakAll;if(!i||ge(o)&&ge(u)&&!_.isValidElement(s)&&!ue(s))return null;if(_.isValidElement(s))return _.cloneElement(s,a);var h;if(ue(s)){if(h=_.createElement(s,a),_.isValidElement(h))return h}else h=nF(a);var x=oF(i),g=ye(a,!0);if(x&&(l==="insideStart"||l==="insideEnd"||l==="end"))return aF(a,h,g);var v=x?iF(a):lF(a);return C.createElement(ef,xu({className:ve("recharts-label",c)},g,v,{breakAll:d}),h)}Nt.displayName="Label";var AT=function(t){var n=t.cx,r=t.cy,a=t.angle,i=t.startAngle,l=t.endAngle,o=t.r,u=t.radius,s=t.innerRadius,f=t.outerRadius,c=t.x,d=t.y,h=t.top,x=t.left,g=t.width,v=t.height,y=t.clockWise,m=t.labelViewBox;if(m)return m;if(Y(g)&&Y(v)){if(Y(c)&&Y(d))return{x:c,y:d,width:g,height:v};if(Y(h)&&Y(x))return{x:h,y:x,width:g,height:v}}return Y(c)&&Y(d)?{x:c,y:d,width:0,height:0}:Y(n)&&Y(r)?{cx:n,cy:r,startAngle:i||a||0,endAngle:l||a||0,innerRadius:s||0,outerRadius:f||u||o||0,clockWise:y}:t.viewBox?t.viewBox:{}},uF=function(t,n){return t?t===!0?C.createElement(Nt,{key:"label-implicit",viewBox:n}):ut(t)?C.createElement(Nt,{key:"label-implicit",viewBox:n,value:t}):_.isValidElement(t)?t.type===Nt?_.cloneElement(t,{key:"label-implicit",viewBox:n}):C.createElement(Nt,{key:"label-implicit",content:t,viewBox:n}):ue(t)?C.createElement(Nt,{key:"label-implicit",content:t,viewBox:n}):Ll(t)?C.createElement(Nt,xu({viewBox:n},t,{key:"label-implicit"})):null:null},sF=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var a=t.children,i=AT(t),l=$n(a,Nt).map(function(u,s){return _.cloneElement(u,{viewBox:n||i,key:"label-".concat(s)})});if(!r)return l;var o=uF(t.label,n||i);return[o].concat(XK(l))};Nt.parseViewBox=AT;Nt.renderCallByParent=sF;function cF(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var fF=cF;const dF=Me(fF);function Su(e){"@babel/helpers - typeof";return Su=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Su(e)}var hF=["valueAccessor"],pF=["data","dataKey","clockWise","id","textBreakAll"];function yF(e){return bF(e)||gF(e)||vF(e)||mF()}function mF(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vF(e,t){if(e){if(typeof e=="string")return gm(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 gm(e,t)}}function gF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function bF(e){if(Array.isArray(e))return gm(e)}function gm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wF(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var AF=function(t){return Array.isArray(t.value)?dF(t.value):t.value};function La(e){var t=e.valueAccessor,n=t===void 0?AF:t,r=VS(e,hF),a=r.data,i=r.dataKey,l=r.clockWise,o=r.id,u=r.textBreakAll,s=VS(r,pF);return!a||!a.length?null:C.createElement(yt,{className:"recharts-label-list"},a.map(function(f,c){var d=ge(i)?n(f,c):Yn(f&&f.payload,i),h=ge(o)?{}:{id:"".concat(o,"-").concat(c)};return C.createElement(Nt,gf({},ye(f,!0),s,h,{parentViewBox:f.parentViewBox,value:d,textBreakAll:u,viewBox:Nt.parseViewBox(ge(l)?f:XS(XS({},f),{},{clockWise:l})),key:"label-".concat(c),index:c}))}))}La.displayName="LabelList";function _F(e,t){return e?e===!0?C.createElement(La,{key:"labelList-implicit",data:t}):C.isValidElement(e)||ue(e)?C.createElement(La,{key:"labelList-implicit",data:t,content:e}):Ll(e)?C.createElement(La,gf({data:t},e,{key:"labelList-implicit"})):null:null}function EF(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,a=$n(r,La).map(function(l,o){return _.cloneElement(l,{data:t,key:"labelList-".concat(o)})});if(!n)return a;var i=_F(e.label,t);return[i].concat(yF(a))}La.renderCallByParent=EF;function Ou(e){"@babel/helpers - typeof";return Ou=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ou(e)}function bm(){return bm=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(l>s),`, `).concat(c.x,",").concat(c.y,` `);if(a>0){var h=_t(n,r,a,l),x=_t(n,r,a,s);d+="L ".concat(x.x,",").concat(x.y,` A `).concat(a,",").concat(a,`,0, `).concat(+(Math.abs(u)>180),",").concat(+(l<=s),`, `).concat(h.x,",").concat(h.y," Z")}else d+="L ".concat(n,",").concat(r," Z");return d},CF=function(t){var n=t.cx,r=t.cy,a=t.innerRadius,i=t.outerRadius,l=t.cornerRadius,o=t.forceCornerRadius,u=t.cornerIsExternal,s=t.startAngle,f=t.endAngle,c=Cn(f-s),d=Ds({cx:n,cy:r,radius:i,angle:s,sign:c,cornerRadius:l,cornerIsExternal:u}),h=d.circleTangency,x=d.lineTangency,g=d.theta,v=Ds({cx:n,cy:r,radius:i,angle:f,sign:-c,cornerRadius:l,cornerIsExternal:u}),y=v.circleTangency,m=v.lineTangency,b=v.theta,O=u?Math.abs(s-f):Math.abs(s-f)-g-b;if(O<0)return o?"M ".concat(x.x,",").concat(x.y,` a`).concat(l,",").concat(l,",0,0,1,").concat(l*2,`,0 a`).concat(l,",").concat(l,",0,0,1,").concat(-l*2,`,0 `):_T({cx:n,cy:r,innerRadius:a,outerRadius:i,startAngle:s,endAngle:f});var S="M ".concat(x.x,",").concat(x.y,` A`).concat(l,",").concat(l,",0,0,").concat(+(c<0),",").concat(h.x,",").concat(h.y,` A`).concat(i,",").concat(i,",0,").concat(+(O>180),",").concat(+(c<0),",").concat(y.x,",").concat(y.y,` A`).concat(l,",").concat(l,",0,0,").concat(+(c<0),",").concat(m.x,",").concat(m.y,` `);if(a>0){var w=Ds({cx:n,cy:r,radius:a,angle:s,sign:c,isExternal:!0,cornerRadius:l,cornerIsExternal:u}),A=w.circleTangency,E=w.lineTangency,j=w.theta,$=Ds({cx:n,cy:r,radius:a,angle:f,sign:-c,isExternal:!0,cornerRadius:l,cornerIsExternal:u}),P=$.circleTangency,M=$.lineTangency,k=$.theta,z=u?Math.abs(s-f):Math.abs(s-f)-j-k;if(z<0&&l===0)return"".concat(S,"L").concat(n,",").concat(r,"Z");S+="L".concat(M.x,",").concat(M.y,` A`).concat(l,",").concat(l,",0,0,").concat(+(c<0),",").concat(P.x,",").concat(P.y,` A`).concat(a,",").concat(a,",0,").concat(+(z>180),",").concat(+(c>0),",").concat(A.x,",").concat(A.y,` A`).concat(l,",").concat(l,",0,0,").concat(+(c<0),",").concat(E.x,",").concat(E.y,"Z")}else S+="L".concat(n,",").concat(r,"Z");return S},$F={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},ET=function(t){var n=FS(FS({},$F),t),r=n.cx,a=n.cy,i=n.innerRadius,l=n.outerRadius,o=n.cornerRadius,u=n.forceCornerRadius,s=n.cornerIsExternal,f=n.startAngle,c=n.endAngle,d=n.className;if(l0&&Math.abs(f-c)<360?v=CF({cx:r,cy:a,innerRadius:i,outerRadius:l,cornerRadius:Math.min(g,x/2),forceCornerRadius:u,cornerIsExternal:s,startAngle:f,endAngle:c}):v=_T({cx:r,cy:a,innerRadius:i,outerRadius:l,startAngle:f,endAngle:c}),C.createElement("path",bm({},ye(n,!0),{className:h,d:v,role:"img"}))};function wu(e){"@babel/helpers - typeof";return wu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wu(e)}function xm(){return xm=Object.assign?Object.assign.bind():function(e){for(var t=1;tYF.call(e,t));function ii(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const KF="__v",FF="__o",QF="_owner",{getOwnPropertyDescriptor:tO,keys:nO}=Object;function WF(e,t){return e.byteLength===t.byteLength&&bf(new Uint8Array(e),new Uint8Array(t))}function ZF(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function JF(e,t){return e.byteLength===t.byteLength&&bf(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function eQ(e,t){return ii(e.getTime(),t.getTime())}function tQ(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function nQ(e,t){return e===t}function rO(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const a=new Array(r),i=e.entries();let l,o,u=0;for(;(l=i.next())&&!l.done;){const s=t.entries();let f=!1,c=0;for(;(o=s.next())&&!o.done;){if(a[c]){c++;continue}const d=l.value,h=o.value;if(n.equals(d[0],h[0],u,c,e,t,n)&&n.equals(d[1],h[1],d[0],h[0],e,t,n)){f=a[c]=!0;break}c++}if(!f)return!1;u++}return!0}const rQ=ii;function aQ(e,t,n){const r=nO(e);let a=r.length;if(nO(t).length!==a)return!1;for(;a-- >0;)if(!MT(e,t,n,r[a]))return!1;return!0}function fo(e,t,n){const r=eO(e);let a=r.length;if(eO(t).length!==a)return!1;let i,l,o;for(;a-- >0;)if(i=r[a],!MT(e,t,n,i)||(l=tO(e,i),o=tO(t,i),(l||o)&&(!l||!o||l.configurable!==o.configurable||l.enumerable!==o.enumerable||l.writable!==o.writable)))return!1;return!0}function iQ(e,t){return ii(e.valueOf(),t.valueOf())}function lQ(e,t){return e.source===t.source&&e.flags===t.flags}function aO(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const a=new Array(r),i=e.values();let l,o;for(;(l=i.next())&&!l.done;){const u=t.values();let s=!1,f=0;for(;(o=u.next())&&!o.done;){if(!a[f]&&n.equals(l.value,o.value,l.value,o.value,e,t,n)){s=a[f]=!0;break}f++}if(!s)return!1}return!0}function bf(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function oQ(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function MT(e,t,n,r){return(r===QF||r===FF||r===KF)&&(e.$$typeof||t.$$typeof)?!0:VF(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const uQ="[object ArrayBuffer]",sQ="[object Arguments]",cQ="[object Boolean]",fQ="[object DataView]",dQ="[object Date]",hQ="[object Error]",pQ="[object Map]",yQ="[object Number]",mQ="[object Object]",vQ="[object RegExp]",gQ="[object Set]",bQ="[object String]",xQ={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},SQ="[object URL]",OQ=Object.prototype.toString;function wQ({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:a,areFunctionsEqual:i,areMapsEqual:l,areNumbersEqual:o,areObjectsEqual:u,arePrimitiveWrappersEqual:s,areRegExpsEqual:f,areSetsEqual:c,areTypedArraysEqual:d,areUrlsEqual:h,unknownTagComparators:x}){return function(v,y,m){if(v===y)return!0;if(v==null||y==null)return!1;const b=typeof v;if(b!==typeof y)return!1;if(b!=="object")return b==="number"?o(v,y,m):b==="function"?i(v,y,m):!1;const O=v.constructor;if(O!==y.constructor)return!1;if(O===Object)return u(v,y,m);if(Array.isArray(v))return t(v,y,m);if(O===Date)return r(v,y,m);if(O===RegExp)return f(v,y,m);if(O===Map)return l(v,y,m);if(O===Set)return c(v,y,m);const S=OQ.call(v);if(S===dQ)return r(v,y,m);if(S===vQ)return f(v,y,m);if(S===pQ)return l(v,y,m);if(S===gQ)return c(v,y,m);if(S===mQ)return typeof v.then!="function"&&typeof y.then!="function"&&u(v,y,m);if(S===SQ)return h(v,y,m);if(S===hQ)return a(v,y,m);if(S===sQ)return u(v,y,m);if(xQ[S])return d(v,y,m);if(S===uQ)return e(v,y,m);if(S===fQ)return n(v,y,m);if(S===cQ||S===yQ||S===bQ)return s(v,y,m);if(x){let w=x[S];if(!w){const A=XF(v);A&&(w=x[A])}if(w)return w(v,y,m)}return!1}}function AQ({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:WF,areArraysEqual:n?fo:ZF,areDataViewsEqual:JF,areDatesEqual:eQ,areErrorsEqual:tQ,areFunctionsEqual:nQ,areMapsEqual:n?pp(rO,fo):rO,areNumbersEqual:rQ,areObjectsEqual:n?fo:aQ,arePrimitiveWrappersEqual:iQ,areRegExpsEqual:lQ,areSetsEqual:n?pp(aO,fo):aO,areTypedArraysEqual:n?pp(bf,fo):bf,areUrlsEqual:oQ,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const a=zs(r.areArraysEqual),i=zs(r.areMapsEqual),l=zs(r.areObjectsEqual),o=zs(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:a,areMapsEqual:i,areObjectsEqual:l,areSetsEqual:o})}return r}function _Q(e){return function(t,n,r,a,i,l,o){return e(t,n,o)}}function EQ({circular:e,comparator:t,createState:n,equals:r,strict:a}){if(n)return function(o,u){const{cache:s=e?new WeakMap:void 0,meta:f}=n();return t(o,u,{cache:s,equals:r,meta:f,strict:a})};if(e)return function(o,u){return t(o,u,{cache:new WeakMap,equals:r,meta:void 0,strict:a})};const i={cache:void 0,equals:r,meta:void 0,strict:a};return function(o,u){return t(o,u,i)}}const jQ=pa();pa({strict:!0});pa({circular:!0});pa({circular:!0,strict:!0});pa({createInternalComparator:()=>ii});pa({strict:!0,createInternalComparator:()=>ii});pa({circular:!0,createInternalComparator:()=>ii});pa({circular:!0,createInternalComparator:()=>ii,strict:!0});function pa(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:a=!1}=e,i=AQ(e),l=wQ(i),o=n?n(l):_Q(l);return EQ({circular:t,comparator:l,createState:r,equals:o,strict:a})}function TQ(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function iO(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function a(i){n<0&&(n=i),i-n>t?(e(i),n=-1):TQ(a)};requestAnimationFrame(r)}function Sm(e){"@babel/helpers - typeof";return Sm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sm(e)}function NQ(e){return PQ(e)||$Q(e)||CQ(e)||MQ()}function MQ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CQ(e,t){if(e){if(typeof e=="string")return lO(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 lO(e,t)}}function lO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?1:y<0?0:y},g=function(y){for(var m=y>1?1:y,b=m,O=0;O<8;++O){var S=c(b)-m,w=h(b);if(Math.abs(S-m)0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,a=t.damping,i=a===void 0?8:a,l=t.dt,o=l===void 0?17:l,u=function(f,c,d){var h=-(f-c)*r,x=d*i,g=d+(h-x)*o/1e3,v=d*o/1e3+f;return Math.abs(v-c)e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cW(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i=0)&&(n[a]=e[a]);return n}function yp(e){return pW(e)||hW(e)||dW(e)||fW()}function fW(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dW(e,t){if(e){if(typeof e=="string")return Em(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 Em(e,t)}}function hW(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function pW(e){if(Array.isArray(e))return Em(e)}function Em(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Of(e){return Of=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Of(e)}var la=function(e){bW(n,e);var t=xW(n);function n(r,a){var i;yW(this,n),i=t.call(this,r,a);var l=i.props,o=l.isActive,u=l.attributeName,s=l.from,f=l.to,c=l.steps,d=l.children,h=l.duration;if(i.handleStyleChange=i.handleStyleChange.bind(Nm(i)),i.changeStyle=i.changeStyle.bind(Nm(i)),!o||h<=0)return i.state={style:{}},typeof d=="function"&&(i.state={style:f}),Tm(i);if(c&&c.length)i.state={style:c[0].style};else if(s){if(typeof d=="function")return i.state={style:s},Tm(i);i.state={style:u?bo({},u,s):s}}else i.state={style:{}};return i}return vW(n,[{key:"componentDidMount",value:function(){var a=this.props,i=a.isActive,l=a.canBegin;this.mounted=!0,!(!i||!l)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var i=this.props,l=i.isActive,o=i.canBegin,u=i.attributeName,s=i.shouldReAnimate,f=i.to,c=i.from,d=this.state.style;if(o){if(!l){var h={style:u?bo({},u,f):f};this.state&&d&&(u&&d[u]!==f||!u&&d!==f)&&this.setState(h);return}if(!(jQ(a.to,f)&&a.canBegin&&a.isActive)){var x=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var g=x||s?c:a.to;if(this.state&&d){var v={style:u?bo({},u,g):g};(u&&d[u]!==g||!u&&d!==g)&&this.setState(v)}this.runAnimation(jn(jn({},this.props),{},{from:g,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var i=this,l=a.from,o=a.to,u=a.duration,s=a.easing,f=a.begin,c=a.onAnimationEnd,d=a.onAnimationStart,h=oW(l,o,QQ(s),u,this.changeStyle),x=function(){i.stopJSAnimation=h()};this.manager.start([d,f,x,u,c])}},{key:"runStepAnimation",value:function(a){var i=this,l=a.steps,o=a.begin,u=a.onAnimationStart,s=l[0],f=s.style,c=s.duration,d=c===void 0?0:c,h=function(g,v,y){if(y===0)return g;var m=v.duration,b=v.easing,O=b===void 0?"ease":b,S=v.style,w=v.properties,A=v.onAnimationEnd,E=y>0?l[y-1]:v,j=w||Object.keys(S);if(typeof O=="function"||O==="spring")return[].concat(yp(g),[i.runJSAnimation.bind(i,{from:E.style,to:S,duration:m,easing:O}),m]);var $=sO(j,m,O),P=jn(jn(jn({},E.style),S),{},{transition:$});return[].concat(yp(g),[P,m,A]).filter(LQ)};return this.manager.start([u].concat(yp(l.reduce(h,[f,Math.max(d,o)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=DQ());var i=a.begin,l=a.duration,o=a.attributeName,u=a.to,s=a.easing,f=a.onAnimationStart,c=a.onAnimationEnd,d=a.steps,h=a.children,x=this.manager;if(this.unSubscribe=x.subscribe(this.handleStyleChange),typeof s=="function"||typeof h=="function"||s==="spring"){this.runJSAnimation(a);return}if(d.length>1){this.runStepAnimation(a);return}var g=o?bo({},o,u):u,v=sO(Object.keys(g),l,s);x.start([f,i,jn(jn({},g),{},{transition:v}),l,c])}},{key:"render",value:function(){var a=this.props,i=a.children;a.begin;var l=a.duration;a.attributeName,a.easing;var o=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var u=sW(a,uW),s=_.Children.count(i),f=this.state.style;if(typeof i=="function")return i(f);if(!o||s===0||l<=0)return i;var c=function(h){var x=h.props,g=x.style,v=g===void 0?{}:g,y=x.className,m=_.cloneElement(h,jn(jn({},u),{},{style:jn(jn({},v),f),className:y}));return m};return s===1?c(_.Children.only(i)):C.createElement("div",null,_.Children.map(i,function(d){return c(d)}))}}]),n}(_.PureComponent);la.displayName="Animate";la.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};la.propTypes={from:xe.oneOfType([xe.object,xe.string]),to:xe.oneOfType([xe.object,xe.string]),attributeName:xe.string,duration:xe.number,begin:xe.number,easing:xe.oneOfType([xe.string,xe.func]),steps:xe.arrayOf(xe.shape({duration:xe.number.isRequired,style:xe.object.isRequired,easing:xe.oneOfType([xe.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),xe.func]),properties:xe.arrayOf("string"),onAnimationEnd:xe.func})),children:xe.oneOfType([xe.node,xe.func]),isActive:xe.bool,canBegin:xe.bool,onAnimationEnd:xe.func,shouldReAnimate:xe.bool,onAnimationStart:xe.func,onAnimationReStart:xe.func};function Eu(e){"@babel/helpers - typeof";return Eu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Eu(e)}function wf(){return wf=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?1:-1,u=r>=0?1:-1,s=a>=0&&r>=0||a<0&&r<0?1:0,f;if(l>0&&i instanceof Array){for(var c=[0,0,0,0],d=0,h=4;dl?l:i[d];f="M".concat(t,",").concat(n+o*c[0]),c[0]>0&&(f+="A ".concat(c[0],",").concat(c[0],",0,0,").concat(s,",").concat(t+u*c[0],",").concat(n)),f+="L ".concat(t+r-u*c[1],",").concat(n),c[1]>0&&(f+="A ".concat(c[1],",").concat(c[1],",0,0,").concat(s,`, `).concat(t+r,",").concat(n+o*c[1])),f+="L ".concat(t+r,",").concat(n+a-o*c[2]),c[2]>0&&(f+="A ".concat(c[2],",").concat(c[2],",0,0,").concat(s,`, `).concat(t+r-u*c[2],",").concat(n+a)),f+="L ".concat(t+u*c[3],",").concat(n+a),c[3]>0&&(f+="A ".concat(c[3],",").concat(c[3],",0,0,").concat(s,`, `).concat(t,",").concat(n+a-o*c[3])),f+="Z"}else if(l>0&&i===+i&&i>0){var x=Math.min(l,i);f="M ".concat(t,",").concat(n+o*x,` A `).concat(x,",").concat(x,",0,0,").concat(s,",").concat(t+u*x,",").concat(n,` L `).concat(t+r-u*x,",").concat(n,` A `).concat(x,",").concat(x,",0,0,").concat(s,",").concat(t+r,",").concat(n+o*x,` L `).concat(t+r,",").concat(n+a-o*x,` A `).concat(x,",").concat(x,",0,0,").concat(s,",").concat(t+r-u*x,",").concat(n+a,` L `).concat(t+u*x,",").concat(n+a,` A `).concat(x,",").concat(x,",0,0,").concat(s,",").concat(t,",").concat(n+a-o*x," Z")}else f="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(a," h ").concat(-r," Z");return f},MW=function(t,n){if(!t||!n)return!1;var r=t.x,a=t.y,i=n.x,l=n.y,o=n.width,u=n.height;if(Math.abs(o)>0&&Math.abs(u)>0){var s=Math.min(i,i+o),f=Math.max(i,i+o),c=Math.min(l,l+u),d=Math.max(l,l+u);return r>=s&&r<=f&&a>=c&&a<=d}return!1},CW={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},ug=function(t){var n=vO(vO({},CW),t),r=_.useRef(),a=_.useState(-1),i=OW(a,2),l=i[0],o=i[1];_.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var O=r.current.getTotalLength();O&&o(O)}catch{}},[]);var u=n.x,s=n.y,f=n.width,c=n.height,d=n.radius,h=n.className,x=n.animationEasing,g=n.animationDuration,v=n.animationBegin,y=n.isAnimationActive,m=n.isUpdateAnimationActive;if(u!==+u||s!==+s||f!==+f||c!==+c||f===0||c===0)return null;var b=ve("recharts-rectangle",h);return m?C.createElement(la,{canBegin:l>0,from:{width:f,height:c,x:u,y:s},to:{width:f,height:c,x:u,y:s},duration:g,animationEasing:x,isActive:m},function(O){var S=O.width,w=O.height,A=O.x,E=O.y;return C.createElement(la,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:g,isActive:y,easing:x},C.createElement("path",wf({},ye(n,!0),{className:b,d:gO(A,E,S,w,d),ref:r})))}):C.createElement("path",wf({},ye(n,!0),{className:b,d:gO(u,s,f,c,d)}))};function Mm(){return Mm=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function LW(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var kW=function(t,n,r,a,i,l){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(l,",").concat(n,"h").concat(r)},UW=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,i=a===void 0?0:a,l=t.top,o=l===void 0?0:l,u=t.left,s=u===void 0?0:u,f=t.width,c=f===void 0?0:f,d=t.height,h=d===void 0?0:d,x=t.className,g=BW(t,$W),v=PW({x:r,y:i,top:o,left:s,width:c,height:h},g);return!Y(r)||!Y(i)||!Y(c)||!Y(h)||!Y(o)||!Y(s)?null:C.createElement("path",Cm({},ye(v,!0),{className:ve("recharts-cross",x),d:kW(r,i,c,h,o,s)}))},IW=WE,HW=IW(Object.getPrototypeOf,Object),qW=HW,GW=Er,YW=qW,XW=jr,VW="[object Object]",KW=Function.prototype,FW=Object.prototype,LT=KW.toString,QW=FW.hasOwnProperty,WW=LT.call(Object);function ZW(e){if(!XW(e)||GW(e)!=VW)return!1;var t=YW(e);if(t===null)return!0;var n=QW.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&<.call(n)==WW}var JW=ZW;const eZ=Me(JW);var tZ=Er,nZ=jr,rZ="[object Boolean]";function aZ(e){return e===!0||e===!1||nZ(e)&&tZ(e)==rZ}var iZ=aZ;const lZ=Me(iZ);function Tu(e){"@babel/helpers - typeof";return Tu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tu(e)}function Af(){return Af=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:d,x:u,y:s},to:{upperWidth:f,lowerWidth:c,height:d,x:u,y:s},duration:g,animationEasing:x,isActive:y},function(b){var O=b.upperWidth,S=b.lowerWidth,w=b.height,A=b.x,E=b.y;return C.createElement(la,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:g,easing:x},C.createElement("path",Af({},ye(n,!0),{className:m,d:wO(A,E,O,S,w),ref:r})))}):C.createElement("g",null,C.createElement("path",Af({},ye(n,!0),{className:m,d:wO(u,s,f,c,d)})))},vZ=["option","shapeType","propTransformer","activeClassName","isActive"];function Nu(e){"@babel/helpers - typeof";return Nu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nu(e)}function gZ(e,t){if(e==null)return{};var n=bZ(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bZ(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function AO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function _f(e){for(var t=1;t0&&r.handleDrag(a.changedTouches[0])}),Kt(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=r.props,i=a.endIndex,l=a.onDragEnd,o=a.startIndex;l==null||l({endIndex:i,startIndex:o})}),r.detachDragEndListener()}),Kt(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Kt(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Kt(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Kt(r,"handleSlideDragStart",function(a){var i=CO(a)?a.changedTouches[0]:a;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return rJ(t,e),JZ(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var a=r.startX,i=r.endX,l=this.state.scaleValues,o=this.props,u=o.gap,s=o.data,f=s.length-1,c=Math.min(a,i),d=Math.max(a,i),h=t.getIndexInRange(l,c),x=t.getIndexInRange(l,d);return{startIndex:h-h%u,endIndex:x===f?f:x-x%u}}},{key:"getTextOfTick",value:function(r){var a=this.props,i=a.data,l=a.tickFormatter,o=a.dataKey,u=Yn(i[r],o,r);return ue(l)?l(u,r):u}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var a=this.state,i=a.slideMoveStartX,l=a.startX,o=a.endX,u=this.props,s=u.x,f=u.width,c=u.travellerWidth,d=u.startIndex,h=u.endIndex,x=u.onChange,g=r.pageX-i;g>0?g=Math.min(g,s+f-c-o,s+f-c-l):g<0&&(g=Math.max(g,s-l,s-o));var v=this.getIndex({startX:l+g,endX:o+g});(v.startIndex!==d||v.endIndex!==h)&&x&&x(v),this.setState({startX:l+g,endX:o+g,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,a){var i=CO(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var a=this.state,i=a.brushMoveStartX,l=a.movingTravellerId,o=a.endX,u=a.startX,s=this.state[l],f=this.props,c=f.x,d=f.width,h=f.travellerWidth,x=f.onChange,g=f.gap,v=f.data,y={startX:this.state.startX,endX:this.state.endX},m=r.pageX-i;m>0?m=Math.min(m,c+d-h-s):m<0&&(m=Math.max(m,c-s)),y[l]=s+m;var b=this.getIndex(y),O=b.startIndex,S=b.endIndex,w=function(){var E=v.length-1;return l==="startX"&&(o>u?O%g===0:S%g===0)||ou?S%g===0:O%g===0)||o>u&&S===E};this.setState(Kt(Kt({},l,s+m),"brushMoveStartX",r.pageX),function(){x&&w()&&x(b)})}},{key:"handleTravellerMoveKeyboard",value:function(r,a){var i=this,l=this.state,o=l.scaleValues,u=l.startX,s=l.endX,f=this.state[a],c=o.indexOf(f);if(c!==-1){var d=c+r;if(!(d===-1||d>=o.length)){var h=o[d];a==="startX"&&h>=s||a==="endX"&&h<=u||this.setState(Kt({},a,h),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,a=r.x,i=r.y,l=r.width,o=r.height,u=r.fill,s=r.stroke;return C.createElement("rect",{stroke:s,fill:u,x:a,y:i,width:l,height:o})}},{key:"renderPanorama",value:function(){var r=this.props,a=r.x,i=r.y,l=r.width,o=r.height,u=r.data,s=r.children,f=r.padding,c=_.Children.only(s);return c?C.cloneElement(c,{x:a,y:i,width:l,height:o,margin:f,compact:!0,data:u}):null}},{key:"renderTravellerLayer",value:function(r,a){var i,l,o=this,u=this.props,s=u.y,f=u.travellerWidth,c=u.height,d=u.traveller,h=u.ariaLabel,x=u.data,g=u.startIndex,v=u.endIndex,y=Math.max(r,this.props.x),m=vp(vp({},ye(this.props,!1)),{},{x:y,y:s,width:f,height:c}),b=h||"Min value: ".concat((i=x[g])===null||i===void 0?void 0:i.name,", Max value: ").concat((l=x[v])===null||l===void 0?void 0:l.name);return C.createElement(yt,{tabIndex:0,role:"slider","aria-label":b,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(S){["ArrowLeft","ArrowRight"].includes(S.key)&&(S.preventDefault(),S.stopPropagation(),o.handleTravellerMoveKeyboard(S.key==="ArrowRight"?1:-1,a))},onFocus:function(){o.setState({isTravellerFocused:!0})},onBlur:function(){o.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,m))}},{key:"renderSlide",value:function(r,a){var i=this.props,l=i.y,o=i.height,u=i.stroke,s=i.travellerWidth,f=Math.min(r,a)+s,c=Math.max(Math.abs(a-r)-s,0);return C.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:u,fillOpacity:.2,x:f,y:l,width:c,height:o})}},{key:"renderText",value:function(){var r=this.props,a=r.startIndex,i=r.endIndex,l=r.y,o=r.height,u=r.travellerWidth,s=r.stroke,f=this.state,c=f.startX,d=f.endX,h=5,x={pointerEvents:"none",fill:s};return C.createElement(yt,{className:"recharts-brush-texts"},C.createElement(ef,jf({textAnchor:"end",verticalAnchor:"middle",x:Math.min(c,d)-h,y:l+o/2},x),this.getTextOfTick(a)),C.createElement(ef,jf({textAnchor:"start",verticalAnchor:"middle",x:Math.max(c,d)+u+h,y:l+o/2},x),this.getTextOfTick(i)))}},{key:"render",value:function(){var r=this.props,a=r.data,i=r.className,l=r.children,o=r.x,u=r.y,s=r.width,f=r.height,c=r.alwaysShowText,d=this.state,h=d.startX,x=d.endX,g=d.isTextActive,v=d.isSlideMoving,y=d.isTravellerMoving,m=d.isTravellerFocused;if(!a||!a.length||!Y(o)||!Y(u)||!Y(s)||!Y(f)||s<=0||f<=0)return null;var b=ve("recharts-brush",i),O=C.Children.count(l)===1,S=WZ("userSelect","none");return C.createElement(yt,{className:b,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:S},this.renderBackground(),O&&this.renderPanorama(),this.renderSlide(h,x),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(x,"endX"),(g||v||y||m||c)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var a=r.x,i=r.y,l=r.width,o=r.height,u=r.stroke,s=Math.floor(i+o/2)-1;return C.createElement(C.Fragment,null,C.createElement("rect",{x:a,y:i,width:l,height:o,fill:u,stroke:"none"}),C.createElement("line",{x1:a+1,y1:s,x2:a+l-1,y2:s,fill:"none",stroke:"#fff"}),C.createElement("line",{x1:a+1,y1:s+2,x2:a+l-1,y2:s+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,a){var i;return C.isValidElement(r)?i=C.cloneElement(r,a):ue(r)?i=r(a):i=t.renderDefaultTraveller(a),i}},{key:"getDerivedStateFromProps",value:function(r,a){var i=r.data,l=r.width,o=r.x,u=r.travellerWidth,s=r.updateId,f=r.startIndex,c=r.endIndex;if(i!==a.prevData||s!==a.prevUpdateId)return vp({prevData:i,prevTravellerWidth:u,prevUpdateId:s,prevX:o,prevWidth:l},i&&i.length?iJ({data:i,width:l,x:o,travellerWidth:u,startIndex:f,endIndex:c}):{scale:null,scaleValues:null});if(a.scale&&(l!==a.prevWidth||o!==a.prevX||u!==a.prevTravellerWidth)){a.scale.range([o,o+l-u]);var d=a.scale.domain().map(function(h){return a.scale(h)});return{prevData:i,prevTravellerWidth:u,prevUpdateId:s,prevX:o,prevWidth:l,startX:a.scale(r.startIndex),endX:a.scale(r.endIndex),scaleValues:d}}return null}},{key:"getIndexInRange",value:function(r,a){for(var i=r.length,l=0,o=i-1;o-l>1;){var u=Math.floor((l+o)/2);r[u]>a?o=u:l=u}return a>=r[o]?o:l}}])}(_.PureComponent);Kt(pl,"displayName","Brush");Kt(pl,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var lJ=P0;function oJ(e,t){var n;return lJ(e,function(r,a,i){return n=t(r,a,i),!n}),!!n}var uJ=oJ,sJ=qE,cJ=fa,fJ=uJ,dJ=Xt,hJ=Pd;function pJ(e,t,n){var r=dJ(e)?sJ:fJ;return n&&hJ(e,t,n)&&(t=void 0),r(e,cJ(t))}var yJ=pJ;const mJ=Me(yJ);var qn=function(t,n){var r=t.alwaysShow,a=t.ifOverflow;return r&&(a="extendDomain"),a===n},$O=fj;function vJ(e,t,n){t=="__proto__"&&$O?$O(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var gJ=vJ,bJ=gJ,xJ=sj,SJ=fa;function OJ(e,t){var n={};return t=SJ(t),xJ(e,function(r,a,i){bJ(n,a,t(r,a,i))}),n}var wJ=OJ;const AJ=Me(wJ);function _J(e,t){for(var n=-1,r=e==null?0:e.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function HJ(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function qJ(e,t){var n=e.x,r=e.y,a=IJ(e,BJ),i="".concat(n),l=parseInt(i,10),o="".concat(r),u=parseInt(o,10),s="".concat(t.height||a.height),f=parseInt(s,10),c="".concat(t.width||a.width),d=parseInt(c,10);return ho(ho(ho(ho(ho({},t),a),l?{x:l}:{}),u?{y:u}:{}),{},{height:f,width:d,name:t.name,radius:t.radius})}function DO(e){return C.createElement(EZ,Pm({shapeType:"rectangle",propTransformer:qJ,activeClassName:"recharts-active-bar"},e))}var GJ=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,a){if(typeof t=="number")return t;var i=Y(r)||rz(r);return i?t(r,a):(i||Fa(),n)}},YJ=["value","background"],GT;function yl(e){"@babel/helpers - typeof";return yl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yl(e)}function XJ(e,t){if(e==null)return{};var n=VJ(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function VJ(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Nf(){return Nf=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(B)0&&Math.abs(z)0&&(k=Math.min((oe||0)-(z[_e-1]||0),k))}),Number.isFinite(k)){var B=k/M,N=g.layout==="vertical"?r.height:r.width;if(g.padding==="gap"&&(A=B*N/2),g.padding==="no-gap"){var R=Va(t.barCategoryGap,B*N),D=B*N/2;A=D-R-(D-R)/N*R}}}a==="xAxis"?E=[r.left+(b.left||0)+(A||0),r.left+r.width-(b.right||0)-(A||0)]:a==="yAxis"?E=u==="horizontal"?[r.top+r.height-(b.bottom||0),r.top+(b.top||0)]:[r.top+(b.top||0)+(A||0),r.top+r.height-(b.bottom||0)-(A||0)]:E=g.range,S&&(E=[E[1],E[0]]);var U=AK(g,i,d),q=U.scale,X=U.realScaleType;q.domain(y).range(E),_K(q);var G=PK(q,Nn(Nn({},g),{},{realScaleType:X}));a==="xAxis"?(P=v==="top"&&!O||v==="bottom"&&O,j=r.left,$=c[w]-P*g.height):a==="yAxis"&&(P=v==="left"&&!O||v==="right"&&O,j=c[w]-P*g.width,$=r.top);var W=Nn(Nn(Nn({},g),G),{},{realScaleType:X,x:j,y:$,scale:q,width:a==="xAxis"?r.width:g.width,height:a==="yAxis"?r.height:g.height});return W.bandSize=mf(W,G),!g.hide&&a==="xAxis"?c[w]+=(P?-1:1)*W.height:g.hide||(c[w]+=(P?-1:1)*W.width),Nn(Nn({},h),{},Vd({},x,W))},{})},KT=function(t,n){var r=t.x,a=t.y,i=n.x,l=n.y;return{x:Math.min(r,i),y:Math.min(a,l),width:Math.abs(i-r),height:Math.abs(l-a)}},iee=function(t){var n=t.x1,r=t.y1,a=t.x2,i=t.y2;return KT({x:n,y:r},{x:a,y:i})},FT=function(){function e(t){tee(this,e),this.scale=t}return nee(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=r.bandAware,i=r.position;if(n!==void 0){if(i)switch(i){case"start":return this.scale(n);case"middle":{var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}case"end":{var o=this.bandwidth?this.bandwidth():0;return this.scale(n)+o}default:return this.scale(n)}if(a){var u=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+u}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),a=r[0],i=r[r.length-1];return a<=i?n>=a&&n<=i:n>=i&&n<=a}}],[{key:"create",value:function(n){return new e(n)}}])}();Vd(FT,"EPS",1e-4);var sg=function(t){var n=Object.keys(t).reduce(function(r,a){return Nn(Nn({},r),{},Vd({},a,FT.create(t[a])))},{});return Nn(Nn({},n),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=i.bandAware,o=i.position;return AJ(a,function(u,s){return n[s].apply(u,{bandAware:l,position:o})})},isInRange:function(a){return qT(a,function(i,l){return n[l].isInRange(i)})}})};function lee(e){return(e%180+180)%180}var oee=function(t){var n=t.width,r=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=lee(a),l=i*Math.PI/180,o=Math.atan(r/n),u=l>o&&l-1?a[i?t[l]:l]:void 0}}var dee=fee,hee=kT;function pee(e){var t=hee(e),n=t%1;return t===t?n?t-n:t:0}var yee=pee,mee=rj,vee=fa,gee=yee,bee=Math.max;function xee(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var a=n==null?0:gee(n);return a<0&&(a=bee(r+a,0)),mee(e,vee(t),a)}var See=xee,Oee=dee,wee=See,Aee=Oee(wee),_ee=Aee;const Eee=Me(_ee);var jee=s6(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),cg=_.createContext(void 0),fg=_.createContext(void 0),QT=_.createContext(void 0),WT=_.createContext({}),ZT=_.createContext(void 0),JT=_.createContext(0),eN=_.createContext(0),kO=function(t){var n=t.state,r=n.xAxisMap,a=n.yAxisMap,i=n.offset,l=t.clipPathId,o=t.children,u=t.width,s=t.height,f=jee(i);return C.createElement(cg.Provider,{value:r},C.createElement(fg.Provider,{value:a},C.createElement(WT.Provider,{value:i},C.createElement(QT.Provider,{value:f},C.createElement(ZT.Provider,{value:l},C.createElement(JT.Provider,{value:s},C.createElement(eN.Provider,{value:u},o)))))))},Tee=function(){return _.useContext(ZT)},tN=function(t){var n=_.useContext(cg);n==null&&Fa();var r=n[t];return r==null&&Fa(),r},Nee=function(){var t=_.useContext(cg);return Br(t)},Mee=function(){var t=_.useContext(fg),n=Eee(t,function(r){return qT(r.domain,Number.isFinite)});return n||Br(t)},nN=function(t){var n=_.useContext(fg);n==null&&Fa();var r=n[t];return r==null&&Fa(),r},Cee=function(){var t=_.useContext(QT);return t},$ee=function(){return _.useContext(WT)},dg=function(){return _.useContext(eN)},hg=function(){return _.useContext(JT)};function ml(e){"@babel/helpers - typeof";return ml=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ml(e)}function Pee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dee(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*a)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-a)<=0}function yte(e,t){return sN(e,t+1)}function mte(e,t,n,r,a){for(var i=(r||[]).slice(),l=t.start,o=t.end,u=0,s=1,f=l,c=function(){var x=r==null?void 0:r[u];if(x===void 0)return{v:sN(r,s)};var g=u,v,y=function(){return v===void 0&&(v=n(x,g)),v},m=x.coordinate,b=u===0||Df(e,m,y,f,o);b||(u=0,f=l,s+=1),b&&(f=m+e*(y()/2+a),u+=s)},d;s<=i.length;)if(d=c(),d)return d.v;return[]}function Du(e){"@babel/helpers - typeof";return Du=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Du(e)}function VO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Tt(e){for(var t=1;t0?h.coordinate-v*e:h.coordinate})}else i[d]=h=Tt(Tt({},h),{},{tickCoord:h.coordinate});var y=Df(e,h.tickCoord,g,o,u);y&&(u=h.tickCoord-e*(g()/2+a),i[d]=Tt(Tt({},h),{},{isShow:!0}))},f=l-1;f>=0;f--)s(f);return i}function Ste(e,t,n,r,a,i){var l=(r||[]).slice(),o=l.length,u=t.start,s=t.end;if(i){var f=r[o-1],c=n(f,o-1),d=e*(f.coordinate+e*c/2-s);l[o-1]=f=Tt(Tt({},f),{},{tickCoord:d>0?f.coordinate-d*e:f.coordinate});var h=Df(e,f.tickCoord,function(){return c},u,s);h&&(s=f.tickCoord-e*(c/2+a),l[o-1]=Tt(Tt({},f),{},{isShow:!0}))}for(var x=i?o-1:o,g=function(m){var b=l[m],O,S=function(){return O===void 0&&(O=n(b,m)),O};if(m===0){var w=e*(b.coordinate-e*S()/2-u);l[m]=b=Tt(Tt({},b),{},{tickCoord:w<0?b.coordinate-w*e:b.coordinate})}else l[m]=b=Tt(Tt({},b),{},{tickCoord:b.coordinate});var A=Df(e,b.tickCoord,S,u,s);A&&(u=b.tickCoord+e*(S()/2+a),l[m]=Tt(Tt({},b),{},{isShow:!0}))},v=0;v=2?Cn(a[1].coordinate-a[0].coordinate):1,y=pte(i,v,h);return u==="equidistantPreserveStart"?mte(v,y,g,a,l):(u==="preserveStart"||u==="preserveStartEnd"?d=Ste(v,y,g,a,l,u==="preserveStartEnd"):d=xte(v,y,g,a,l),d.filter(function(m){return m.isShow}))}var Ote=["viewBox"],wte=["viewBox"],Ate=["ticks"];function bl(e){"@babel/helpers - typeof";return bl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bl(e)}function Mi(){return Mi=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _te(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Ete(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FO(e,t){for(var n=0;n0?u(this.props):u(h)),l<=0||o<=0||!x||!x.length?null:C.createElement(yt,{className:ve("recharts-cartesian-axis",s),ref:function(v){r.layerReference=v}},i&&this.renderAxisLine(),this.renderTicks(x,this.state.fontSize,this.state.letterSpacing),Nt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,a,i){var l,o=ve(a.className,"recharts-cartesian-axis-tick-value");return C.isValidElement(r)?l=C.cloneElement(r,it(it({},a),{},{className:o})):ue(r)?l=r(it(it({},a),{},{className:o})):l=C.createElement(ef,Mi({},a,{className:"recharts-cartesian-axis-tick-value"}),i),l}}])}(_.Component);vg(Kl,"displayName","CartesianAxis");vg(Kl,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var Pte=["x1","y1","x2","y2","key"],Dte=["offset"];function Qa(e){"@babel/helpers - typeof";return Qa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qa(e)}function QO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Mt(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Lte(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var kte=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,a=t.x,i=t.y,l=t.width,o=t.height,u=t.ry;return C.createElement("rect",{x:a,y:i,ry:u,width:l,height:o,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function dN(e,t){var n;if(C.isValidElement(e))n=C.cloneElement(e,t);else if(ue(e))n=e(t);else{var r=t.x1,a=t.y1,i=t.x2,l=t.y2,o=t.key,u=WO(t,Pte),s=ye(u,!1);s.offset;var f=WO(s,Dte);n=C.createElement("line",Na({},f,{x1:r,y1:a,x2:i,y2:l,fill:"none",key:o}))}return n}function Ute(e){var t=e.x,n=e.width,r=e.horizontal,a=r===void 0?!0:r,i=e.horizontalPoints;if(!a||!i||!i.length)return null;var l=i.map(function(o,u){var s=Mt(Mt({},e),{},{x1:t,y1:o,x2:t+n,y2:o,key:"line-".concat(u),index:u});return dN(a,s)});return C.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function Ite(e){var t=e.y,n=e.height,r=e.vertical,a=r===void 0?!0:r,i=e.verticalPoints;if(!a||!i||!i.length)return null;var l=i.map(function(o,u){var s=Mt(Mt({},e),{},{x1:o,y1:t,x2:o,y2:t+n,key:"line-".concat(u),index:u});return dN(a,s)});return C.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function Hte(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,a=e.y,i=e.width,l=e.height,o=e.horizontalPoints,u=e.horizontal,s=u===void 0?!0:u;if(!s||!t||!t.length)return null;var f=o.map(function(d){return Math.round(d+a-a)}).sort(function(d,h){return d-h});a!==f[0]&&f.unshift(0);var c=f.map(function(d,h){var x=!f[h+1],g=x?a+l-d:f[h+1]-d;if(g<=0)return null;var v=h%t.length;return C.createElement("rect",{key:"react-".concat(h),y:d,x:r,height:g,width:i,stroke:"none",fill:t[v],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return C.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},c)}function qte(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,a=e.fillOpacity,i=e.x,l=e.y,o=e.width,u=e.height,s=e.verticalPoints;if(!n||!r||!r.length)return null;var f=s.map(function(d){return Math.round(d+i-i)}).sort(function(d,h){return d-h});i!==f[0]&&f.unshift(0);var c=f.map(function(d,h){var x=!f[h+1],g=x?i+o-d:f[h+1]-d;if(g<=0)return null;var v=h%r.length;return C.createElement("rect",{key:"react-".concat(h),x:d,y:l,width:g,height:u,stroke:"none",fill:r[v],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return C.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},c)}var Gte=function(t,n){var r=t.xAxis,a=t.width,i=t.height,l=t.offset;return ST(mg(Mt(Mt(Mt({},Kl.defaultProps),r),{},{ticks:sr(r,!0),viewBox:{x:0,y:0,width:a,height:i}})),l.left,l.left+l.width,n)},Yte=function(t,n){var r=t.yAxis,a=t.width,i=t.height,l=t.offset;return ST(mg(Mt(Mt(Mt({},Kl.defaultProps),r),{},{ticks:sr(r,!0),viewBox:{x:0,y:0,width:a,height:i}})),l.top,l.top+l.height,n)},hi={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function hN(e){var t,n,r,a,i,l,o=dg(),u=hg(),s=$ee(),f=Mt(Mt({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:hi.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:hi.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:hi.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:hi.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:hi.vertical,verticalFill:(l=e.verticalFill)!==null&&l!==void 0?l:hi.verticalFill,x:Y(e.x)?e.x:s.left,y:Y(e.y)?e.y:s.top,width:Y(e.width)?e.width:s.width,height:Y(e.height)?e.height:s.height}),c=f.x,d=f.y,h=f.width,x=f.height,g=f.syncWithTicks,v=f.horizontalValues,y=f.verticalValues,m=Nee(),b=Mee();if(!Y(h)||h<=0||!Y(x)||x<=0||!Y(c)||c!==+c||!Y(d)||d!==+d)return null;var O=f.verticalCoordinatesGenerator||Gte,S=f.horizontalCoordinatesGenerator||Yte,w=f.horizontalPoints,A=f.verticalPoints;if((!w||!w.length)&&ue(S)){var E=v&&v.length,j=S({yAxis:b?Mt(Mt({},b),{},{ticks:E?v:b.ticks}):void 0,width:o,height:u,offset:s},E?!0:g);pr(Array.isArray(j),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Qa(j),"]")),Array.isArray(j)&&(w=j)}if((!A||!A.length)&&ue(O)){var $=y&&y.length,P=O({xAxis:m?Mt(Mt({},m),{},{ticks:$?y:m.ticks}):void 0,width:o,height:u,offset:s},$?!0:g);pr(Array.isArray(P),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Qa(P),"]")),Array.isArray(P)&&(A=P)}return C.createElement("g",{className:"recharts-cartesian-grid"},C.createElement(kte,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),C.createElement(Ute,Na({},f,{offset:s,horizontalPoints:w,xAxis:m,yAxis:b})),C.createElement(Ite,Na({},f,{offset:s,verticalPoints:A,xAxis:m,yAxis:b})),C.createElement(Hte,Na({},f,{horizontalPoints:w})),C.createElement(qte,Na({},f,{verticalPoints:A})))}hN.displayName="CartesianGrid";function xl(e){"@babel/helpers - typeof";return xl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xl(e)}function Xte(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vte(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pne(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Dne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rne(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?l:t&&t.length&&Y(a)&&Y(i)?t.slice(a,i+1):[]};function jN(e){return e==="number"?[0,"auto"]:void 0}var Qm=function(t,n,r,a){var i=t.graphicalItems,l=t.tooltipAxis,o=eh(n,t);return r<0||!i||!i.length||r>=o.length?null:i.reduce(function(u,s){var f,c=(f=s.props.data)!==null&&f!==void 0?f:n;c&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(c=c.slice(t.dataStartIndex,t.dataEndIndex+1));var d;if(l.dataKey&&!l.allowDuplicatedCategory){var h=c===void 0?o:c;d=Ny(h,l.dataKey,a)}else d=c&&c[r]||o[r];return d?[].concat(wl(u),[wT(s,d)]):u},[])},rw=function(t,n,r,a){var i=a||{x:t.chartX,y:t.chartY},l=Vne(i,r),o=t.orderedTooltipTicks,u=t.tooltipAxis,s=t.tooltipTicks,f=gK(l,o,s,u);if(f>=0&&s){var c=s[f]&&s[f].value,d=Qm(t,n,f,c),h=Kne(r,o,f,i);return{activeTooltipIndex:f,activeLabel:c,activePayload:d,activeCoordinate:h}}return null},Fne=function(t,n){var r=n.axes,a=n.graphicalItems,i=n.axisType,l=n.axisIdKey,o=n.stackGroups,u=n.dataStartIndex,s=n.dataEndIndex,f=t.layout,c=t.children,d=t.stackOffset,h=xT(f,i);return r.reduce(function(x,g){var v,y=g.type.defaultProps!==void 0?L(L({},g.type.defaultProps),g.props):g.props,m=y.type,b=y.dataKey,O=y.allowDataOverflow,S=y.allowDuplicatedCategory,w=y.scale,A=y.ticks,E=y.includeHidden,j=y[l];if(x[j])return x;var $=eh(t.data,{graphicalItems:a.filter(function(G){var W,oe=l in G.props?G.props[l]:(W=G.type.defaultProps)===null||W===void 0?void 0:W[l];return oe===j}),dataStartIndex:u,dataEndIndex:s}),P=$.length,M,k,z;Sne(y.domain,O,m)&&(M=mm(y.domain,null,O),h&&(m==="number"||w!=="auto")&&(z=zo($,b,"category")));var B=jN(m);if(!M||M.length===0){var N,R=(N=y.domain)!==null&&N!==void 0?N:B;if(b){if(M=zo($,b,m),m==="category"&&h){var D=iz(M);S&&D?(k=M,M=Ef(0,P)):S||(M=US(R,M,g).reduce(function(G,W){return G.indexOf(W)>=0?G:[].concat(wl(G),[W])},[]))}else if(m==="category")S?M=M.filter(function(G){return G!==""&&!ge(G)}):M=US(R,M,g).reduce(function(G,W){return G.indexOf(W)>=0||W===""||ge(W)?G:[].concat(wl(G),[W])},[]);else if(m==="number"){var U=wK($,a.filter(function(G){var W,oe,_e=l in G.props?G.props[l]:(W=G.type.defaultProps)===null||W===void 0?void 0:W[l],re="hide"in G.props?G.props.hide:(oe=G.type.defaultProps)===null||oe===void 0?void 0:oe.hide;return _e===j&&(E||!re)}),b,i,f);U&&(M=U)}h&&(m==="number"||w!=="auto")&&(z=zo($,b,"category"))}else h?M=Ef(0,P):o&&o[j]&&o[j].hasStack&&m==="number"?M=d==="expand"?[0,1]:OT(o[j].stackGroups,u,s):M=bT($,a.filter(function(G){var W=l in G.props?G.props[l]:G.type.defaultProps[l],oe="hide"in G.props?G.props.hide:G.type.defaultProps.hide;return W===j&&(E||!oe)}),m,f,!0);if(m==="number")M=Vm(c,M,j,i,A),R&&(M=mm(R,M,O));else if(m==="category"&&R){var q=R,X=M.every(function(G){return q.indexOf(G)>=0});X&&(M=q)}}return L(L({},x),{},Z({},j,L(L({},y),{},{axisType:i,domain:M,categoricalDomain:z,duplicateDomain:k,originalDomain:(v=y.domain)!==null&&v!==void 0?v:B,isCategorical:h,layout:f})))},{})},Qne=function(t,n){var r=n.graphicalItems,a=n.Axis,i=n.axisType,l=n.axisIdKey,o=n.stackGroups,u=n.dataStartIndex,s=n.dataEndIndex,f=t.layout,c=t.children,d=eh(t.data,{graphicalItems:r,dataStartIndex:u,dataEndIndex:s}),h=d.length,x=xT(f,i),g=-1;return r.reduce(function(v,y){var m=y.type.defaultProps!==void 0?L(L({},y.type.defaultProps),y.props):y.props,b=m[l],O=jN("number");if(!v[b]){g++;var S;return x?S=Ef(0,h):o&&o[b]&&o[b].hasStack?(S=OT(o[b].stackGroups,u,s),S=Vm(c,S,b,i)):(S=mm(O,bT(d,r.filter(function(w){var A,E,j=l in w.props?w.props[l]:(A=w.type.defaultProps)===null||A===void 0?void 0:A[l],$="hide"in w.props?w.props.hide:(E=w.type.defaultProps)===null||E===void 0?void 0:E.hide;return j===b&&!$}),"number",f),a.defaultProps.allowDataOverflow),S=Vm(c,S,b,i)),L(L({},v),{},Z({},b,L(L({axisType:i},a.defaultProps),{},{hide:!0,orientation:Sn(Yne,"".concat(i,".").concat(g%2),null),domain:S,originalDomain:O,isCategorical:x,layout:f})))}return v},{})},Wne=function(t,n){var r=n.axisType,a=r===void 0?"xAxis":r,i=n.AxisComp,l=n.graphicalItems,o=n.stackGroups,u=n.dataStartIndex,s=n.dataEndIndex,f=t.children,c="".concat(a,"Id"),d=$n(f,i),h={};return d&&d.length?h=Fne(t,{axes:d,graphicalItems:l,axisType:a,axisIdKey:c,stackGroups:o,dataStartIndex:u,dataEndIndex:s}):l&&l.length&&(h=Qne(t,{Axis:i,graphicalItems:l,axisType:a,axisIdKey:c,stackGroups:o,dataStartIndex:u,dataEndIndex:s})),h},Zne=function(t){var n=Br(t),r=sr(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:D0(r,function(a){return a.coordinate}),tooltipAxis:n,tooltipAxisBandSize:mf(n,r)}},aw=function(t){var n=t.children,r=t.defaultShowTooltip,a=Qt(n,pl),i=0,l=0;return t.data&&t.data.length!==0&&(l=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(i=a.props.startIndex),a.props.endIndex>=0&&(l=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:l,activeTooltipIndex:-1,isTooltipActive:!!r}},Jne=function(t){return!t||!t.length?!1:t.some(function(n){var r=hr(n&&n.type);return r&&r.indexOf("Bar")>=0})},iw=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},ere=function(t,n){var r=t.props,a=t.graphicalItems,i=t.xAxisMap,l=i===void 0?{}:i,o=t.yAxisMap,u=o===void 0?{}:o,s=r.width,f=r.height,c=r.children,d=r.margin||{},h=Qt(c,pl),x=Qt(c,Ui),g=Object.keys(u).reduce(function(S,w){var A=u[w],E=A.orientation;return!A.mirror&&!A.hide?L(L({},S),{},Z({},E,S[E]+A.width)):S},{left:d.left||0,right:d.right||0}),v=Object.keys(l).reduce(function(S,w){var A=l[w],E=A.orientation;return!A.mirror&&!A.hide?L(L({},S),{},Z({},E,Sn(S,"".concat(E))+A.height)):S},{top:d.top||0,bottom:d.bottom||0}),y=L(L({},v),g),m=y.bottom;h&&(y.bottom+=h.props.height||pl.defaultProps.height),x&&n&&(y=SK(y,a,r,n));var b=s-y.left-y.right,O=f-y.top-y.bottom;return L(L({brushBottom:m},y),{},{width:Math.max(b,0),height:Math.max(O,0)})},tre=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},nre=function(t){var n=t.chartName,r=t.GraphicalChild,a=t.defaultTooltipEventType,i=a===void 0?"axis":a,l=t.validateTooltipEventTypes,o=l===void 0?["axis"]:l,u=t.axisComponents,s=t.legendContent,f=t.formatAxisMap,c=t.defaultProps,d=function(y,m){var b=m.graphicalItems,O=m.stackGroups,S=m.offset,w=m.updateId,A=m.dataStartIndex,E=m.dataEndIndex,j=y.barSize,$=y.layout,P=y.barGap,M=y.barCategoryGap,k=y.maxBarSize,z=iw($),B=z.numericAxisName,N=z.cateAxisName,R=Jne(b),D=[];return b.forEach(function(U,q){var X=eh(y.data,{graphicalItems:[U],dataStartIndex:A,dataEndIndex:E}),G=U.type.defaultProps!==void 0?L(L({},U.type.defaultProps),U.props):U.props,W=G.dataKey,oe=G.maxBarSize,_e=G["".concat(B,"Id")],re=G["".concat(N,"Id")],We={},at=u.reduce(function(Fn,Vt){var rh=m["".concat(Vt.axisType,"Map")],gg=G["".concat(Vt.axisType,"Id")];rh&&rh[gg]||Vt.axisType==="zAxis"||Fa();var bg=rh[gg];return L(L({},Fn),{},Z(Z({},Vt.axisType,bg),"".concat(Vt.axisType,"Ticks"),sr(bg)))},We),K=at[N],ee=at["".concat(N,"Ticks")],ae=O&&O[_e]&&O[_e].hasStack&&RK(U,O[_e].stackGroups),H=hr(U.type).indexOf("Bar")>=0,Re=mf(K,ee),se=[],Se=R&&bK({barSize:j,stackGroups:O,totalSize:tre(at,N)});if(H){var Q,Ee,gt=ge(oe)?k:oe,zt=(Q=(Ee=mf(K,ee,!0))!==null&&Ee!==void 0?Ee:gt)!==null&&Q!==void 0?Q:0;se=xK({barGap:P,barCategoryGap:M,bandSize:zt!==Re?zt:Re,sizeList:Se[re],maxBarSize:gt}),zt!==Re&&(se=se.map(function(Fn){return L(L({},Fn),{},{position:L(L({},Fn.position),{},{offset:Fn.position.offset-zt/2})})}))}var ya=U&&U.type&&U.type.getComposedData;ya&&D.push({props:L(L({},ya(L(L({},at),{},{displayedData:X,props:y,dataKey:W,item:U,bandSize:Re,barPosition:se,offset:S,stackedData:ae,layout:$,dataStartIndex:A,dataEndIndex:E}))),{},Z(Z(Z({key:U.key||"item-".concat(q)},B,at[B]),N,at[N]),"animationId",w)),childIndex:vz(U,y.children),item:U})}),D},h=function(y,m){var b=y.props,O=y.dataStartIndex,S=y.dataEndIndex,w=y.updateId;if(!Dx({props:b}))return null;var A=b.children,E=b.layout,j=b.stackOffset,$=b.data,P=b.reverseStackOrder,M=iw(E),k=M.numericAxisName,z=M.cateAxisName,B=$n(A,r),N=$K($,B,"".concat(k,"Id"),"".concat(z,"Id"),j,P),R=u.reduce(function(G,W){var oe="".concat(W.axisType,"Map");return L(L({},G),{},Z({},oe,Wne(b,L(L({},W),{},{graphicalItems:B,stackGroups:W.axisType===k&&N,dataStartIndex:O,dataEndIndex:S}))))},{}),D=ere(L(L({},R),{},{props:b,graphicalItems:B}),m==null?void 0:m.legendBBox);Object.keys(R).forEach(function(G){R[G]=f(b,R[G],D,G.replace("Map",""),n)});var U=R["".concat(z,"Map")],q=Zne(U),X=d(b,L(L({},R),{},{dataStartIndex:O,dataEndIndex:S,updateId:w,graphicalItems:B,stackGroups:N,offset:D}));return L(L({formattedGraphicalItems:X,graphicalItems:B,offset:D,stackGroups:N},q),R)},x=function(v){function y(m){var b,O,S;return Dne(this,y),S=Bne(this,y,[m]),Z(S,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Z(S,"accessibilityManager",new xne),Z(S,"handleLegendBBoxUpdate",function(w){if(w){var A=S.state,E=A.dataStartIndex,j=A.dataEndIndex,$=A.updateId;S.setState(L({legendBBox:w},h({props:S.props,dataStartIndex:E,dataEndIndex:j,updateId:$},L(L({},S.state),{},{legendBBox:w}))))}}),Z(S,"handleReceiveSyncEvent",function(w,A,E){if(S.props.syncId===w){if(E===S.eventEmitterSymbol&&typeof S.props.syncMethod!="function")return;S.applySyncEvent(A)}}),Z(S,"handleBrushChange",function(w){var A=w.startIndex,E=w.endIndex;if(A!==S.state.dataStartIndex||E!==S.state.dataEndIndex){var j=S.state.updateId;S.setState(function(){return L({dataStartIndex:A,dataEndIndex:E},h({props:S.props,dataStartIndex:A,dataEndIndex:E,updateId:j},S.state))}),S.triggerSyncEvent({dataStartIndex:A,dataEndIndex:E})}}),Z(S,"handleMouseEnter",function(w){var A=S.getMouseInfo(w);if(A){var E=L(L({},A),{},{isTooltipActive:!0});S.setState(E),S.triggerSyncEvent(E);var j=S.props.onMouseEnter;ue(j)&&j(E,w)}}),Z(S,"triggeredAfterMouseMove",function(w){var A=S.getMouseInfo(w),E=A?L(L({},A),{},{isTooltipActive:!0}):{isTooltipActive:!1};S.setState(E),S.triggerSyncEvent(E);var j=S.props.onMouseMove;ue(j)&&j(E,w)}),Z(S,"handleItemMouseEnter",function(w){S.setState(function(){return{isTooltipActive:!0,activeItem:w,activePayload:w.tooltipPayload,activeCoordinate:w.tooltipPosition||{x:w.cx,y:w.cy}}})}),Z(S,"handleItemMouseLeave",function(){S.setState(function(){return{isTooltipActive:!1}})}),Z(S,"handleMouseMove",function(w){w.persist(),S.throttleTriggeredAfterMouseMove(w)}),Z(S,"handleMouseLeave",function(w){S.throttleTriggeredAfterMouseMove.cancel();var A={isTooltipActive:!1};S.setState(A),S.triggerSyncEvent(A);var E=S.props.onMouseLeave;ue(E)&&E(A,w)}),Z(S,"handleOuterEvent",function(w){var A=mz(w),E=Sn(S.props,"".concat(A));if(A&&ue(E)){var j,$;/.*touch.*/i.test(A)?$=S.getMouseInfo(w.changedTouches[0]):$=S.getMouseInfo(w),E((j=$)!==null&&j!==void 0?j:{},w)}}),Z(S,"handleClick",function(w){var A=S.getMouseInfo(w);if(A){var E=L(L({},A),{},{isTooltipActive:!0});S.setState(E),S.triggerSyncEvent(E);var j=S.props.onClick;ue(j)&&j(E,w)}}),Z(S,"handleMouseDown",function(w){var A=S.props.onMouseDown;if(ue(A)){var E=S.getMouseInfo(w);A(E,w)}}),Z(S,"handleMouseUp",function(w){var A=S.props.onMouseUp;if(ue(A)){var E=S.getMouseInfo(w);A(E,w)}}),Z(S,"handleTouchMove",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&S.throttleTriggeredAfterMouseMove(w.changedTouches[0])}),Z(S,"handleTouchStart",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&S.handleMouseDown(w.changedTouches[0])}),Z(S,"handleTouchEnd",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&S.handleMouseUp(w.changedTouches[0])}),Z(S,"handleDoubleClick",function(w){var A=S.props.onDoubleClick;if(ue(A)){var E=S.getMouseInfo(w);A(E,w)}}),Z(S,"handleContextMenu",function(w){var A=S.props.onContextMenu;if(ue(A)){var E=S.getMouseInfo(w);A(E,w)}}),Z(S,"triggerSyncEvent",function(w){S.props.syncId!==void 0&&bp.emit(xp,S.props.syncId,w,S.eventEmitterSymbol)}),Z(S,"applySyncEvent",function(w){var A=S.props,E=A.layout,j=A.syncMethod,$=S.state.updateId,P=w.dataStartIndex,M=w.dataEndIndex;if(w.dataStartIndex!==void 0||w.dataEndIndex!==void 0)S.setState(L({dataStartIndex:P,dataEndIndex:M},h({props:S.props,dataStartIndex:P,dataEndIndex:M,updateId:$},S.state)));else if(w.activeTooltipIndex!==void 0){var k=w.chartX,z=w.chartY,B=w.activeTooltipIndex,N=S.state,R=N.offset,D=N.tooltipTicks;if(!R)return;if(typeof j=="function")B=j(D,w);else if(j==="value"){B=-1;for(var U=0;U=0){var ae,H;if(k.dataKey&&!k.allowDuplicatedCategory){var Re=typeof k.dataKey=="function"?ee:"payload.".concat(k.dataKey.toString());ae=Ny(U,Re,B),H=q&&X&&Ny(X,Re,B)}else ae=U==null?void 0:U[z],H=q&&X&&X[z];if(re||_e){var se=w.props.activeIndex!==void 0?w.props.activeIndex:z;return[_.cloneElement(w,L(L(L({},j.props),at),{},{activeIndex:se})),null,null]}if(!ge(ae))return[K].concat(wl(S.renderActivePoints({item:j,activePoint:ae,basePoint:H,childIndex:z,isRange:q})))}else{var Se,Q=(Se=S.getItemByXY(S.state.activeCoordinate))!==null&&Se!==void 0?Se:{graphicalItem:K},Ee=Q.graphicalItem,gt=Ee.item,zt=gt===void 0?w:gt,ya=Ee.childIndex,Fn=L(L(L({},j.props),at),{},{activeIndex:ya});return[_.cloneElement(zt,Fn),null,null]}return q?[K,null,null]:[K,null]}),Z(S,"renderCustomized",function(w,A,E){return _.cloneElement(w,L(L({key:"recharts-customized-".concat(E)},S.props),S.state))}),Z(S,"renderMap",{CartesianGrid:{handler:Ls,once:!0},ReferenceArea:{handler:S.renderReferenceElement},ReferenceLine:{handler:Ls},ReferenceDot:{handler:S.renderReferenceElement},XAxis:{handler:Ls},YAxis:{handler:Ls},Brush:{handler:S.renderBrush,once:!0},Bar:{handler:S.renderGraphicChild},Line:{handler:S.renderGraphicChild},Area:{handler:S.renderGraphicChild},Radar:{handler:S.renderGraphicChild},RadialBar:{handler:S.renderGraphicChild},Scatter:{handler:S.renderGraphicChild},Pie:{handler:S.renderGraphicChild},Funnel:{handler:S.renderGraphicChild},Tooltip:{handler:S.renderCursor,once:!0},PolarGrid:{handler:S.renderPolarGrid,once:!0},PolarAngleAxis:{handler:S.renderPolarAxis},PolarRadiusAxis:{handler:S.renderPolarAxis},Customized:{handler:S.renderCustomized}}),S.clipPathId="".concat((b=m.id)!==null&&b!==void 0?b:Ed("recharts"),"-clip"),S.throttleTriggeredAfterMouseMove=vj(S.triggeredAfterMouseMove,(O=m.throttleDelay)!==null&&O!==void 0?O:1e3/60),S.state={},S}return Une(y,v),zne(y,[{key:"componentDidMount",value:function(){var b,O;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(b=this.props.margin.left)!==null&&b!==void 0?b:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var b=this.props,O=b.children,S=b.data,w=b.height,A=b.layout,E=Qt(O,zn);if(E){var j=E.props.defaultIndex;if(!(typeof j!="number"||j<0||j>this.state.tooltipTicks.length-1)){var $=this.state.tooltipTicks[j]&&this.state.tooltipTicks[j].value,P=Qm(this.state,S,j,$),M=this.state.tooltipTicks[j].coordinate,k=(this.state.offset.top+w)/2,z=A==="horizontal",B=z?{x:M,y:k}:{y:M,x:k},N=this.state.formattedGraphicalItems.find(function(D){var U=D.item;return U.type.name==="Scatter"});N&&(B=L(L({},B),N.props.points[j].tooltipPosition),P=N.props.points[j].tooltipPayload);var R={activeTooltipIndex:j,isTooltipActive:!0,activeLabel:$,activePayload:P,activeCoordinate:B};this.setState(R),this.renderCursor(E),this.accessibilityManager.setIndex(j)}}}},{key:"getSnapshotBeforeUpdate",value:function(b,O){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==O.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==b.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==b.margin){var S,w;this.accessibilityManager.setDetails({offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(w=this.props.margin.top)!==null&&w!==void 0?w:0}})}return null}},{key:"componentDidUpdate",value:function(b){Cy([Qt(b.children,zn)],[Qt(this.props.children,zn)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var b=Qt(this.props.children,zn);if(b&&typeof b.props.shared=="boolean"){var O=b.props.shared?"axis":"item";return o.indexOf(O)>=0?O:i}return i}},{key:"getMouseInfo",value:function(b){if(!this.container)return null;var O=this.container,S=O.getBoundingClientRect(),w=Gq(S),A={chartX:Math.round(b.pageX-w.left),chartY:Math.round(b.pageY-w.top)},E=S.width/O.offsetWidth||1,j=this.inRange(A.chartX,A.chartY,E);if(!j)return null;var $=this.state,P=$.xAxisMap,M=$.yAxisMap,k=this.getTooltipEventType(),z=rw(this.state,this.props.data,this.props.layout,j);if(k!=="axis"&&P&&M){var B=Br(P).scale,N=Br(M).scale,R=B&&B.invert?B.invert(A.chartX):null,D=N&&N.invert?N.invert(A.chartY):null;return L(L({},A),{},{xValue:R,yValue:D},z)}return z?L(L({},A),z):null}},{key:"inRange",value:function(b,O){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,w=this.props.layout,A=b/S,E=O/S;if(w==="horizontal"||w==="vertical"){var j=this.state.offset,$=A>=j.left&&A<=j.left+j.width&&E>=j.top&&E<=j.top+j.height;return $?{x:A,y:E}:null}var P=this.state,M=P.angleAxisMap,k=P.radiusAxisMap;if(M&&k){var z=Br(M);return qS({x:A,y:E},z)}return null}},{key:"parseEventsOfWrapper",value:function(){var b=this.props.children,O=this.getTooltipEventType(),S=Qt(b,zn),w={};S&&O==="axis"&&(S.props.trigger==="click"?w={onClick:this.handleClick}:w={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var A=kc(this.props,this.handleOuterEvent);return L(L({},A),w)}},{key:"addListener",value:function(){bp.on(xp,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){bp.removeListener(xp,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(b,O,S){for(var w=this.state.formattedGraphicalItems,A=0,E=w.length;A{te.get("/quality/inspections").then(c=>t(c.data)),te.get("/quality/defects/pareto").then(c=>r(c.data)),te.get("/quality/dashboard").then(c=>i(c.data))},[]);const f=async()=>{s(!0);try{const c=await te.post("/quality/ai-analyze",{productCode:"PROD-001",defectDescription:"표면 스크래치 및 치수 불량 다수 발생"});o(c.data.analysis)}catch{o("AI 분석 일시 중단")}s(!1)};return p.jsxs("div",{className:"space-y-6",children:[p.jsx("h1",{className:"text-xl font-bold text-white",children:"품질 관리"}),p.jsx("div",{className:"grid grid-cols-4 gap-4",children:[{label:"오늘 검사",value:a.total_inspections,color:"text-white"},{label:"합격",value:a.passed,color:"text-green-400"},{label:"불합격",value:a.failed,color:"text-red-400"},{label:"불량률",value:`${parseFloat(a.defect_rate||0).toFixed(2)}%`,color:"text-yellow-400"}].map(({label:c,value:d,color:h})=>p.jsxs("div",{className:"bg-slate-800 rounded-xl p-4 border border-slate-700 text-center",children:[p.jsx("div",{className:`text-2xl font-bold ${h}`,children:d??"-"}),p.jsx("div",{className:"text-xs text-slate-400 mt-1",children:c})]},c))}),p.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[p.jsxs("div",{className:"bg-slate-800 rounded-xl p-5 border border-slate-700",children:[p.jsx("h2",{className:"text-sm font-medium text-slate-300 mb-4",children:"불량 파레토 차트"}),p.jsx(Bq,{width:"100%",height:200,children:p.jsxs(rre,{data:n.slice(0,8),children:[p.jsx(hN,{strokeDasharray:"3 3",stroke:"#334155"}),p.jsx(Zd,{dataKey:"defect_code",tick:{fill:"#94a3b8",fontSize:10}}),p.jsx(Jd,{tick:{fill:"#94a3b8",fontSize:10}}),p.jsx(zn,{contentStyle:{backgroundColor:"#1e293b",border:"1px solid #334155"}}),p.jsx(li,{dataKey:"count",fill:"#ef4444"})]})})]}),p.jsxs("div",{className:"bg-slate-800 rounded-xl p-5 border border-slate-700",children:[p.jsxs("div",{className:"flex items-center justify-between mb-3",children:[p.jsx("h2",{className:"text-sm font-medium text-slate-300",children:"AI 불량 원인 분석"}),p.jsxs("button",{onClick:f,disabled:u,className:"flex items-center gap-1 px-3 py-1.5 bg-purple-700 hover:bg-purple-600 text-white rounded text-xs disabled:opacity-50",children:[p.jsx(eu,{size:12})," ",u?"분석 중...":"AI 분석"]})]}),l?p.jsx("div",{className:"bg-slate-700 rounded-lg p-3 text-sm text-slate-200 leading-relaxed",children:l}):p.jsx("div",{className:"text-slate-500 text-sm",children:"AI 분석 버튼을 클릭하면 Ollama가 불량 원인을 분석합니다."})]})]}),p.jsxs("div",{className:"bg-slate-800 rounded-xl border border-slate-700 overflow-hidden",children:[p.jsx("div",{className:"px-4 py-3 border-b border-slate-700",children:p.jsx("h2",{className:"text-sm font-medium text-slate-300",children:"검사 목록"})}),p.jsxs("table",{className:"w-full text-sm",children:[p.jsx("thead",{children:p.jsxs("tr",{className:"border-b border-slate-700",children:[p.jsx("th",{className:"px-4 py-2 text-left text-slate-400",children:"검사 번호"}),p.jsx("th",{className:"px-4 py-2 text-left text-slate-400",children:"제품"}),p.jsx("th",{className:"px-4 py-2 text-left text-slate-400",children:"검사 유형"}),p.jsx("th",{className:"px-4 py-2 text-left text-slate-400",children:"LOT"}),p.jsx("th",{className:"px-4 py-2 text-left text-slate-400",children:"샘플/불량"}),p.jsx("th",{className:"px-4 py-2 text-left text-slate-400",children:"결과"}),p.jsx("th",{className:"px-4 py-2 text-left text-slate-400",children:"검사일시"})]})}),p.jsx("tbody",{children:e.map(c=>{var d;return p.jsxs("tr",{className:"border-b border-slate-700/50 hover:bg-slate-700/30",children:[p.jsx("td",{className:"px-4 py-2 font-mono text-blue-400",children:c.inspectionNumber}),p.jsx("td",{className:"px-4 py-2 text-slate-300",children:c.productCode}),p.jsx("td",{className:"px-4 py-2 text-slate-300",children:c.inspectionType}),p.jsx("td",{className:"px-4 py-2 text-slate-400",children:c.lotNumber}),p.jsxs("td",{className:"px-4 py-2 text-slate-300",children:[c.sampleSize," / ",c.defectCount||0]}),p.jsx("td",{className:"px-4 py-2",children:p.jsx("span",{className:c.result==="PASS"?"text-green-400":c.result==="FAIL"?"text-red-400":"text-yellow-400",children:c.result||"-"})}),p.jsx("td",{className:"px-4 py-2 text-slate-400 text-xs",children:((d=c.inspectedAt)==null?void 0:d.replace("T"," ").slice(0,16))||"-"})]},c.id)})})]}),e.length===0&&p.jsx("div",{className:"text-center text-slate-500 py-8",children:"검사 이력이 없습니다."})]})]})}const ire={RUNNING:"text-green-400",IDLE:"text-slate-400",MAINTENANCE:"text-yellow-400",BREAKDOWN:"text-red-400"};function lre(){const[e,t]=_.useState([]),[n,r]=_.useState([]),[a,i]=_.useState(""),[l,o]=_.useState(!1);_.useEffect(()=>{te.get("/equipment").then(s=>t(s.data)),te.get("/equipment/breakdown-risk").then(s=>r(s.data))},[]);const u=async()=>{o(!0);try{const s=await te.post("/equipment/ai-predict",{equipmentCode:"EQ-001",oeeTrend:"0.85→0.78→0.71 (3일 하락 추세)"});i(s.data.prediction)}catch{i("예지보전 AI 일시 중단")}o(!1)};return p.jsxs("div",{className:"space-y-6",children:[p.jsx("h1",{className:"text-xl font-bold text-white",children:"설비 현황"}),n.length>0&&p.jsxs("div",{className:"bg-red-900/30 border border-red-700 rounded-xl p-4",children:[p.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[p.jsx(od,{size:16,className:"text-red-400"}),p.jsxs("span",{className:"text-sm font-medium text-red-300",children:["고장 위험 설비 (",n.length,"대)"]})]}),p.jsx("div",{className:"flex flex-wrap gap-2",children:n.map(s=>p.jsxs("span",{className:"px-2 py-1 bg-red-800 text-red-200 rounded text-xs",children:[s.equipmentCode," (OEE ",Math.round((s.oee||0)*100),"%)"]},s.id))})]}),p.jsxs("div",{className:"bg-slate-800 rounded-xl p-5 border border-slate-700",children:[p.jsxs("div",{className:"flex items-center justify-between mb-3",children:[p.jsx("h2",{className:"text-sm font-medium text-slate-300",children:"AI 예지보전"}),p.jsxs("button",{onClick:u,disabled:l,className:"flex items-center gap-1 px-3 py-1.5 bg-purple-700 hover:bg-purple-600 text-white rounded text-xs disabled:opacity-50",children:[p.jsx(eu,{size:12})," ",l?"분석 중...":"AI 예측"]})]}),a?p.jsx("div",{className:"bg-slate-700 rounded-lg p-3 text-sm text-slate-200 leading-relaxed",children:a}):p.jsx("div",{className:"text-slate-500 text-sm",children:"AI 예측 버튼으로 Ollama 기반 설비 예지보전 분석을 시작합니다."})]}),p.jsxs("div",{className:"bg-slate-800 rounded-xl border border-slate-700 overflow-hidden",children:[p.jsxs("table",{className:"w-full text-sm",children:[p.jsx("thead",{children:p.jsxs("tr",{className:"border-b border-slate-700",children:[p.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"설비 코드"}),p.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"설비명"}),p.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"작업장"}),p.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"제조사"}),p.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"OEE"}),p.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"상태"}),p.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"다음 점검"})]})}),p.jsx("tbody",{children:e.map(s=>{var f;return p.jsxs("tr",{className:"border-b border-slate-700/50 hover:bg-slate-700/30",children:[p.jsx("td",{className:"px-4 py-3 font-mono text-blue-400",children:s.equipmentCode}),p.jsx("td",{className:"px-4 py-3 text-white",children:s.equipmentName}),p.jsx("td",{className:"px-4 py-3 text-slate-300",children:s.workstationCode}),p.jsx("td",{className:"px-4 py-3 text-slate-400",children:s.manufacturer}),p.jsx("td",{className:"px-4 py-3",children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"w-16 bg-slate-700 rounded-full h-1.5",children:p.jsx("div",{className:`h-1.5 rounded-full ${(s.oee||0)>=.85?"bg-green-500":(s.oee||0)>=.7?"bg-yellow-500":"bg-red-500"}`,style:{width:`${(s.oee||0)*100}%`}})}),p.jsxs("span",{className:"text-xs text-slate-300",children:[Math.round((s.oee||0)*100),"%"]})]})}),p.jsx("td",{className:"px-4 py-3",children:p.jsx("span",{className:`font-medium ${ire[s.status]||"text-slate-400"}`,children:s.status})}),p.jsx("td",{className:"px-4 py-3 text-slate-400 text-xs",children:((f=s.nextMaintenanceAt)==null?void 0:f.slice(0,10))||"-"})]},s.id)})})]}),e.length===0&&p.jsx("div",{className:"text-center text-slate-500 py-8",children:"등록된 설비가 없습니다."})]})]})}const TN=He.create({timeout:15e3});TN.interceptors.request.use(e=>{const t=localStorage.getItem("fa_token");return t&&(e.headers.Authorization=`Bearer ${t}`),e});const ore=e=>TN.post("/api/ai/feedback",e).then(t=>{var n;return(n=t.data)==null?void 0:n.data});function ure({feature:e,answer:t}){const[n,r]=_.useState(null),[a,i]=_.useState(!1),[l,o]=_.useState(""),[u,s]=_.useState(!1),f=async(c,d)=>{s(!0);try{await ore({feature:e,answer:t,verdict:c,correction:d}),r(c),i(!1)}catch{}s(!1)};return n?p.jsxs("div",{className:"mt-2 text-[11px] text-emerald-400",children:["피드백 감사합니다",n==="down"?" — 학습에 반영됩니다.":"."]}):p.jsxs("div",{className:"mt-2 space-y-2",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"text-[11px] text-slate-500",children:"이 답변이 도움이 되었나요?"}),p.jsx("button",{disabled:u,onClick:()=>f("up"),className:"p-1 rounded text-slate-400 hover:text-emerald-400 disabled:opacity-40",title:"도움됨",children:p.jsx(o$,{size:13})}),p.jsx("button",{disabled:u,onClick:()=>i(c=>!c),className:"p-1 rounded text-slate-400 hover:text-rose-400 disabled:opacity-40",title:"개선 필요",children:p.jsx(l$,{size:13})})]}),a&&p.jsxs("div",{className:"space-y-1.5",children:[p.jsx("textarea",{value:l,onChange:c=>o(c.target.value),placeholder:"어떻게 개선하면 좋을지 알려주세요(선택)",className:"w-full text-xs bg-slate-900 border border-slate-700 rounded p-2 text-slate-200 outline-none focus:border-blue-500",rows:2}),p.jsx("button",{disabled:u,onClick:()=>f("down",l),className:"px-3 py-1 bg-slate-700 hover:bg-slate-600 text-white rounded text-xs disabled:opacity-40",children:"피드백 보내기"})]})]})}function lw(){const[e,t]=_.useState({}),[n,r]=_.useState({}),[a,i]=_.useState([]),[l,o]=_.useState(!1),u=async(c,d)=>{r(h=>({...h,[c]:!0}));try{const h=await d();t(x=>({...x,[c]:h}))}catch{t(h=>({...h,[c]:"AI 분석 일시 중단. 온프레미스 Ollama 연결을 확인하세요."}))}r(h=>({...h,[c]:!1}))},s=async()=>{const c=await te.get("/inventory");i(c.data),o(!0)},f=[{title:"생산 수요 예측",feature:"demand_forecast",desc:"과거 생산 데이터 기반 AI 수요/생산 예측 (Claude→Ollama 폴백)",icon:p.jsx(u$,{size:18}),color:"text-blue-400 border-blue-700",action:async()=>(await te.post("/quality/ai-analyze",{productCode:"ALL",defectDescription:"최근 생산 트렌드 분석 및 다음 주 수요 예측"})).data.analysis},{title:"설비 이상 감지",feature:"equipment_predict",desc:"OEE 하락 패턴 분석 및 예지보전 AI 권고",icon:p.jsx(M_,{size:18}),color:"text-yellow-400 border-yellow-700",action:async()=>(await te.post("/equipment/ai-predict",{equipmentCode:"ALL",oeeTrend:"전체 설비 OEE 분석 및 이상 감지 요청"})).data.prediction},{title:"재고 최적화",feature:"inventory_optimize",desc:"안전재고 분석 및 발주 최적화 AI 권고",icon:p.jsx(A_,{size:18}),color:"text-green-400 border-green-700",action:async()=>(await te.post("/inventory/ai-optimize",{lowStockItems:"재고 부족 품목 자동 감지 및 최적 발주량 계산"})).data.optimization},{title:"품질 불량 분석",feature:"quality_defect",desc:"공정별 불량 패턴 AI 분석 및 개선 방안",icon:p.jsx(eu,{size:18}),color:"text-purple-400 border-purple-700",action:async()=>(await te.post("/quality/ai-analyze",{productCode:"ALL",defectDescription:"전체 공정 불량 패턴 분석 및 개선 방안 도출"})).data.analysis}];return p.jsxs("div",{className:"space-y-6",children:[p.jsx("h1",{className:"text-xl font-bold text-white",children:"AI 공장 분석 (Ollama 온프레미스)"}),p.jsx("div",{className:"bg-blue-900/30 border border-blue-700 rounded-xl p-4 text-sm text-blue-300",children:"모든 AI 분석은 온프레미스 Ollama(localhost:11434)를 사용합니다. 외부 AI API는 절대 사용하지 않습니다."}),p.jsx("div",{className:"grid grid-cols-2 gap-6",children:f.map(c=>p.jsxs("div",{className:`bg-slate-800 rounded-xl p-5 border ${c.color.split(" ")[1]}`,children:[p.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[p.jsx("span",{className:c.color.split(" ")[0],children:c.icon}),p.jsx("h2",{className:"text-sm font-medium text-white",children:c.title})]}),p.jsx("p",{className:"text-xs text-slate-400 mb-4",children:c.desc}),p.jsxs("button",{onClick:()=>u(c.title,c.action),disabled:n[c.title],className:"flex items-center gap-1 px-3 py-1.5 bg-slate-700 hover:bg-slate-600 text-white rounded text-xs disabled:opacity-50 mb-3 transition-colors",children:[p.jsx(eu,{size:12})," ",n[c.title]?"분석 중...":"AI 분석 실행"]}),e[c.title]&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"bg-slate-700/50 rounded-lg p-3 text-xs text-slate-200 leading-relaxed max-h-48 overflow-y-auto",children:e[c.title]}),p.jsx(ure,{feature:c.feature,answer:e[c.title]})]})]},c.title))}),p.jsxs("div",{className:"bg-slate-800 rounded-xl p-5 border border-slate-700",children:[p.jsxs("div",{className:"flex items-center justify-between mb-4",children:[p.jsx("h2",{className:"text-sm font-medium text-slate-300",children:"재고 현황"}),p.jsx("button",{onClick:s,className:"px-3 py-1.5 bg-slate-700 hover:bg-slate-600 text-white rounded text-xs transition-colors",children:"재고 조회"})]}),l&&p.jsxs("table",{className:"w-full text-sm",children:[p.jsx("thead",{children:p.jsxs("tr",{className:"border-b border-slate-700",children:[p.jsx("th",{className:"px-3 py-2 text-left text-slate-400",children:"품목코드"}),p.jsx("th",{className:"px-3 py-2 text-left text-slate-400",children:"품목명"}),p.jsx("th",{className:"px-3 py-2 text-left text-slate-400",children:"위치"}),p.jsx("th",{className:"px-3 py-2 text-left text-slate-400",children:"현재고"}),p.jsx("th",{className:"px-3 py-2 text-left text-slate-400",children:"안전재고"}),p.jsx("th",{className:"px-3 py-2 text-left text-slate-400",children:"상태"})]})}),p.jsx("tbody",{children:a.map(c=>p.jsxs("tr",{className:"border-b border-slate-700/50",children:[p.jsx("td",{className:"px-3 py-2 font-mono text-blue-400",children:c.itemCode}),p.jsx("td",{className:"px-3 py-2 text-white",children:c.itemName}),p.jsx("td",{className:"px-3 py-2 text-slate-400",children:c.locationCode}),p.jsx("td",{className:"px-3 py-2 text-slate-300",children:c.quantity}),p.jsx("td",{className:"px-3 py-2 text-slate-400",children:c.safetyStock}),p.jsx("td",{className:"px-3 py-2",children:p.jsx("span",{className:(c.quantity||0)<=(c.safetyStock||0)?"text-red-400":"text-green-400",children:(c.quantity||0)<=(c.safetyStock||0)?"부족":"정상"})})]},c.id))})]}),l&&a.length===0&&p.jsx("div",{className:"text-center text-slate-500 py-4",children:"재고 데이터가 없습니다."})]})]})}const NN=He.create({timeout:25e4});NN.interceptors.request.use(e=>{const t=localStorage.getItem("fa_token");return t&&(e.headers.Authorization=`Bearer ${t}`),e});const sre=e=>NN.post("/api/wise/ask",{query:e}).then(t=>{var n;return((n=t.data)==null?void 0:n.data)??{}});function cre(){const[e,t]=_.useState(""),[n,r]=_.useState(!1),[a,i]=_.useState(null),l=async()=>{if(!(!e.trim()||n)){r(!0),i(null);try{i(await sre(e.trim()))}catch{i({degraded:!0,degraded_reason:"request_failed"})}finally{r(!1)}}},o=c=>{c.key==="Enter"&&(c.ctrlKey||c.metaKey)&&l()},u=(a==null?void 0:a.sources)||[],s=(a==null?void 0:a.abstained)===!0,f=(a==null?void 0:a.degraded)===!0;return p.jsxs("div",{className:"max-w-4xl",children:[p.jsxs("div",{className:"flex items-start justify-between mb-6",children:[p.jsxs("div",{children:[p.jsxs("h1",{className:"text-xl font-bold flex items-center gap-2 text-white",children:[p.jsx(T_,{className:"text-blue-400",size:20})," WISE AI"]}),p.jsx("p",{className:"text-sm text-slate-400 mt-0.5",children:"Enterprise AI for Trusted Knowledge"})]}),p.jsxs("span",{className:"flex items-center gap-1.5 text-xs px-3 py-1.5 rounded-full bg-slate-800 border border-slate-700 text-emerald-400",children:[p.jsx(Rc,{size:13})," 중앙 guardia-rag · 외부 API 미사용"]})]}),p.jsxs("div",{className:"bg-slate-800 border border-slate-700 rounded-xl p-5 mb-5",children:[p.jsx("textarea",{value:e,onChange:c=>t(c.target.value),onKeyDown:o,placeholder:"사내 문서·규정·업무 지식에 대해 질문하세요. 예) e-Paper 펌웨어 업데이트 절차 알려줘",rows:3,className:"w-full px-3 py-2 rounded-lg bg-slate-900 border border-slate-700 text-sm text-slate-100 outline-none focus:border-blue-500"}),p.jsxs("div",{className:"flex items-center justify-between mt-2",children:[p.jsx("span",{className:"text-[11px] text-slate-500",children:"Ctrl/⌘ + Enter 로 전송"}),p.jsx("button",{onClick:l,disabled:n||!e.trim(),className:"flex items-center gap-1.5 px-4 py-2 rounded-lg bg-blue-600 hover:bg-blue-500 text-white text-sm font-semibold disabled:opacity-50",children:n?p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"w-4 h-4 border-2 border-white/40 border-t-white rounded-full animate-spin"})," 검색 중…"]}):p.jsxs(p.Fragment,{children:[p.jsx(j_,{size:15})," 질문하기"]})})]})]}),a&&p.jsxs("div",{className:"bg-slate-800 border border-slate-700 rounded-xl p-5",children:[p.jsxs("div",{className:"flex flex-wrap gap-1.5 mb-3",children:[s&&p.jsxs("span",{className:"flex items-center gap-1.5 text-xs px-3 py-1.5 rounded-full bg-amber-500/10 border border-amber-500/40 text-amber-300",children:[p.jsx(a$,{size:13})," 근거가 부족해 답변을 보류했습니다"]}),f&&p.jsxs("span",{className:"text-xs px-3 py-1.5 rounded-full bg-slate-700 border border-slate-600 text-slate-300",children:["degraded",a.degraded_reason?` · ${a.degraded_reason}`:""]}),!s&&!f&&a.faithfulness!=null&&p.jsxs("span",{className:"text-xs px-3 py-1.5 rounded-full bg-emerald-500/10 border border-emerald-500/40 text-emerald-300",children:["신뢰도 ",Math.round(Number(a.faithfulness)*100),"%"]})]}),s?p.jsx("p",{className:"text-sm text-slate-400",children:"확인된 근거 문서가 충분하지 않아 답변을 제공하지 않았습니다. 질문을 더 구체화하거나 관련 문서 등록 후 다시 시도해 주세요."}):p.jsx("pre",{className:"whitespace-pre-wrap text-sm text-slate-100 leading-relaxed font-sans",children:a.answer||(f?"AI 서비스가 일시적으로 불가합니다. 잠시 후 다시 시도해 주세요.":"")}),!s&&p.jsxs("div",{className:"mt-4",children:[p.jsxs("div",{className:"text-xs text-slate-400 mb-1.5 flex items-center gap-1",children:[p.jsx(e$,{size:12})," 근거 인용"]}),u.length>0?p.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:u.map((c,d)=>p.jsxs("div",{className:"flex items-start gap-2 text-xs bg-slate-900 border border-slate-700 rounded-lg px-3 py-2",children:[p.jsx(q4,{size:14,className:"text-blue-400 mt-0.5 shrink-0"}),p.jsxs("div",{className:"min-w-0",children:[p.jsx("div",{className:"text-slate-200 truncate",children:c.source||c.chunk_id||`근거 ${d+1}`}),p.jsxs("div",{className:"text-slate-500",children:[c.page!=null&&`p.${c.page}`,c.support!=null&&`${c.page!=null?" · ":""}${Math.round(Number(c.support)*100)}%`]})]})]},d))}):p.jsx("div",{className:"text-xs text-slate-500",children:"근거 문서 없음"})]})]})]})}const th=He.create({timeout:13e4});th.interceptors.request.use(e=>{const t=localStorage.getItem("fa_token");return t&&(e.headers.Authorization=`Bearer ${t}`),e});const fre=()=>th.get("/api/admin/ai-config").then(e=>{var t;return(t=e.data)==null?void 0:t.data}),dre=e=>th.put("/api/admin/ai-config",e).then(t=>{var n;return(n=t.data)==null?void 0:n.data}),hre=()=>th.post("/api/admin/ai-config/test",{}).then(e=>{var t;return(t=e.data)==null?void 0:t.data}),pre=[{id:"ollama",label:"Ollama (기본)",hint:"온프레미스 · llama3.2:1b"},{id:"qwen3",label:"Qwen3",hint:"온프레미스 · qwen3:1.7b"},{id:"deepseek",label:"DeepSeek",hint:"온프레미스 · deepseek-r1:1.5b"},{id:"glm",label:"GLM",hint:"온프레미스 · glm4:9b",ram:!0},{id:"claude",label:"Claude (외부)",hint:"api.anthropic.com · 키 필요"}],MN=["claude-sonnet-4-6","claude-haiku-4-5","claude-opus-4-8"],Wm="claude-sonnet-4-6",ow=e=>MN.includes(e)?e:Wm;function Op(e){var n,r,a;const t=((r=(n=e==null?void 0:e.response)==null?void 0:n.data)==null?void 0:r.message)||"";return((a=e==null?void 0:e.response)==null?void 0:a.status)===403?"권한이 없습니다 (AI 설정은 ADMIN 전용).":t.includes("ERR-AI-400")?t.replace(/^ERR-AI-400:\s*/,""):"AI 설정을 처리하지 못했습니다."}function yre(){const[e,t]=_.useState("ollama"),[n,r]=_.useState(Wm),[a,i]=_.useState(!1),[l,o]=_.useState(""),[u,s]=_.useState(!0),[f,c]=_.useState(!1),[d,h]=_.useState(!1),[x,g]=_.useState(!1),[v,y]=_.useState(!1),[m,b]=_.useState(""),[O,S]=_.useState(!1),[w,A]=_.useState(null),E=D=>{t(D.provider),r(ow(D.claudeModel??Wm)),i(!!D.claudeKeySet),o(D.ollamaTextModel??""),s(!!D.aiEnabled),c(!!D.ramWarning)},j=()=>{h(!0),fre().then(D=>{E(D),b("")}).catch(D=>b(Op(D))).finally(()=>h(!1))};_.useEffect(()=>{j()},[]);const $=()=>{y(!1),A(null)},P=async()=>{g(!0),y(!1);try{const D=await dre({provider:e,claudeModel:n});E(D),y(!0),b("")}catch(D){b(Op(D))}finally{g(!1)}},M=async()=>{S(!0),A(null);try{A(await hre())}catch(D){A({ok:!1,degraded:!1,message:Op(D)})}finally{S(!1)}},k=e==="claude",z=k&&!a,B=!k&&!u,N=!k&&(f||e==="glm"),R=w?w.degraded?"text-amber-400":w.ok?"text-emerald-400":"text-rose-400":"";return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{children:[p.jsxs("h1",{className:"text-xl font-bold text-white flex items-center gap-2",children:[p.jsx(Rc,{size:20,className:"text-blue-400"})," AI 플랫폼 설정"]}),p.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"공장 AI 분석(불량·설비·재고) 텍스트 생성에 사용할 LLM 제공자와 모델을 선택합니다."})]}),p.jsx("button",{onClick:j,disabled:d,className:"px-3 py-1.5 rounded-lg bg-slate-800 border border-slate-700 text-sm text-slate-200 disabled:opacity-40",children:"새로고침"})]}),m&&p.jsx("div",{className:"bg-rose-500/10 border border-rose-500/40 text-rose-300 text-sm rounded-lg px-4 py-2.5",children:m}),(z||B||N)&&p.jsxs("div",{className:"bg-amber-500/10 border border-amber-500/40 text-amber-300 text-sm rounded-lg px-4 py-2.5 space-y-1",children:[z&&p.jsx("div",{children:"Claude API 키가 설정되지 않아 Ollama(온프레미스)로 폴백 동작합니다. 서버 환경변수 ANTHROPIC_API_KEY 설정 후 사용하세요."}),B&&p.jsx("div",{children:"AI 기능이 비활성 상태입니다. 모든 AI 결과는 규칙 기반(degraded)으로 동작합니다."}),N&&p.jsx("div",{children:"GLM(glm4:9b)은 서버 RAM 여유가 필요합니다. 콜드로드 실패 시 소형 모델(llama3.2:1b)로 자동 폴백합니다."})]}),p.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[p.jsxs("section",{className:"bg-slate-800 border border-slate-700 rounded-xl p-5",children:[p.jsxs("h2",{className:"text-sm font-semibold mb-4 flex items-center gap-2 text-slate-200",children:[p.jsx(Rc,{size:16,className:"text-blue-400"})," 제공자 & 모델"]}),p.jsx("div",{className:"grid grid-cols-2 gap-2 mb-4",children:pre.map(D=>p.jsxs("button",{onClick:()=>{t(D.id),$()},className:`text-left px-3 py-2.5 rounded-lg border text-sm transition-colors ${e===D.id?"bg-blue-600/15 border-blue-500 text-blue-300":"bg-slate-900 border-slate-700 text-slate-300 hover:border-blue-500/50"}`,children:[p.jsxs("div",{className:"font-semibold flex items-center gap-1",children:[D.label,D.ram&&p.jsx("span",{className:"text-[9px] px-1 py-0.5 rounded bg-amber-500/20 text-amber-300 border border-amber-500/40",children:"RAM"})]}),p.jsx("div",{className:"text-[11px] text-slate-500 mt-0.5",children:D.hint})]},D.id))}),!k&&p.jsxs("div",{className:"mb-4",children:[p.jsx("label",{className:"block text-xs text-slate-500 mb-1",children:"Ollama 텍스트 모델"}),p.jsx("div",{className:"px-3 py-2 rounded-lg bg-slate-900 border border-slate-700 text-sm font-mono text-slate-200",children:l||"llama3.2:1b"}),p.jsx("p",{className:"text-[11px] text-slate-500 mt-1",children:"온프레미스 소형 모델 — 서버 RAM 제약으로 고정. 외부 호출 없음."})]}),k&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"mb-4",children:[p.jsx("label",{className:"block text-xs text-slate-500 mb-1",children:"Claude 모델"}),p.jsx("select",{value:n,onChange:D=>{r(ow(D.target.value)),$()},className:"w-full px-3 py-2 rounded-lg bg-slate-900 border border-slate-700 text-sm text-slate-200 focus:border-blue-500 outline-none",children:MN.map(D=>p.jsx("option",{value:D,children:D},D))})]}),p.jsxs("div",{className:"mb-4",children:[p.jsxs("label",{className:"text-xs text-slate-500 mb-1 flex items-center gap-1",children:[p.jsx(G4,{size:13})," API 키"]}),p.jsx("span",{className:`inline-block px-3 py-1 rounded-lg text-xs font-semibold ${a?"bg-emerald-500/15 text-emerald-300 border border-emerald-500/40":"bg-rose-500/15 text-rose-300 border border-rose-500/40"}`,children:a?"설정됨":"미설정"}),p.jsx("p",{className:"text-[11px] text-slate-500 mt-1.5",children:"키는 서버 환경변수(ANTHROPIC_API_KEY)로만 주입되며 화면·응답·로그에 노출되지 않습니다."})]})]}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsxs("button",{onClick:P,disabled:x||d,className:"flex items-center gap-1.5 px-4 py-2 rounded-lg bg-blue-600 hover:bg-blue-500 text-white text-sm font-semibold disabled:opacity-40 transition-colors",children:[p.jsx(n$,{size:15})," ",x?"저장 중…":"저장"]}),v&&p.jsx("span",{className:"text-emerald-400 text-xs",children:"저장됨"})]})]}),p.jsxs("section",{className:"bg-slate-800 border border-slate-700 rounded-xl p-5",children:[p.jsxs("h2",{className:"text-sm font-semibold mb-2 flex items-center gap-2 text-slate-200",children:[p.jsx(Z4,{size:16,className:"text-blue-400"})," 연결 테스트"]}),p.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"저장된 설정 기준으로 선택한 제공자에 짧은 ping 을 보내 연결을 확인합니다(요약 결과만)."}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("button",{onClick:M,disabled:O,className:"px-4 py-2 rounded-lg bg-slate-900 border border-slate-700 text-sm text-slate-200 disabled:opacity-40 hover:border-blue-500/50 transition-colors",children:O?"테스트 중…":"테스트 실행"}),w&&p.jsx("span",{className:`text-sm ${R}`,role:"status","aria-live":"polite",children:w.message})]}),p.jsx("p",{className:"text-[11px] text-slate-500 mt-3",children:"먼저 변경 사항을 저장한 뒤 테스트하세요. Claude 실패 시 Ollama 로 자동 폴백합니다."})]})]})]})}const wp=8;function ks(e,t){var n,r,a,i,l;return((n=e==null?void 0:e.response)==null?void 0:n.status)===403?"권한이 없습니다.":((a=(r=e==null?void 0:e.response)==null?void 0:r.data)==null?void 0:a.error)||((l=(i=e==null?void 0:e.response)==null?void 0:i.data)==null?void 0:l.message)||t}function mre(){const[e,t]=_.useState(""),[n,r]=_.useState("idle"),[a,i]=_.useState(""),[l,o]=_.useState(""),[u,s]=_.useState(""),[f,c]=_.useState(!1),[d,h]=_.useState(null),[x,g]=_.useState(""),[v,y]=_.useState(""),[m,b]=_.useState(""),[O,S]=_.useState(!1),[w,A]=_.useState(!1),[E,j]=_.useState(null),$=()=>fD().then(U=>{const q=U.data||{};let X="";try{X=JSON.parse(localStorage.getItem("fa_user")||"{}").username||""}catch{}t(q.username||X||"")}).catch(()=>{});_.useEffect(()=>{$()},[]);const P=async()=>{h(null),c(!0);try{const q=(await dD()).data||{};i(q.qrImage||""),o(q.secret||""),s(""),r("setup")}catch(U){h({ok:!1,text:ks(U,"OTP 등록을 시작하지 못했습니다.")})}finally{c(!1)}},M=async()=>{h(null),c(!0);try{await hD(u),o(""),i(""),s(""),r("done"),h({ok:!0,text:"2차 인증이 활성화되었습니다."})}catch(U){h({ok:!1,text:ks(U,"코드가 일치하지 않거나 만료되었습니다.")})}finally{c(!1)}},k=()=>{r("idle"),o(""),i(""),s(""),h(null)},z=async()=>{if(window.confirm("Authenticator 2차 인증을 해제하시겠습니까?")){h(null),c(!0);try{await pD(),r("idle"),o(""),i(""),h({ok:!0,text:"2차 인증이 해제되었습니다."})}catch(U){h({ok:!1,text:ks(U,"OTP 해제에 실패했습니다.")})}finally{c(!1)}}},B=async()=>{if(j(null),!x){j({ok:!1,text:"현재 비밀번호를 입력하세요."});return}if(v.lengthU?p.jsxs("div",{className:`flex items-center gap-2 text-sm rounded-lg px-3 py-2 mb-3 border ${U.ok?"bg-emerald-500/10 border-emerald-500/40 text-emerald-300":"bg-rose-500/10 border-rose-500/40 text-rose-300"}`,children:[U.ok?p.jsx(k4,{size:16}):p.jsx(od,{size:16}),U.text]}):null;return p.jsxs("div",{className:"max-w-2xl",children:[p.jsx("h1",{className:"text-xl font-bold text-white mb-1",children:"마이페이지"}),p.jsx("p",{className:"text-sm text-slate-400 mb-6",children:e&&p.jsxs(p.Fragment,{children:["계정: ",p.jsx("span",{className:"text-slate-200",children:e})]})}),p.jsxs("section",{className:"bg-slate-800 border border-slate-700 rounded-xl p-5 mb-6",children:[p.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[p.jsx(r0,{size:18,className:"text-blue-400"}),p.jsx("h2",{className:"font-semibold text-slate-100",children:"2차 인증 — Authenticator(OTP)"})]}),p.jsx("p",{className:"text-xs text-slate-400 mb-4",children:"Google·Microsoft Authenticator 앱으로 6자리 코드를 사용하는 2차 인증을 설정합니다."}),p.jsx(D,{m:d}),n==="idle"&&p.jsxs("div",{className:"flex flex-wrap gap-2",children:[p.jsxs("button",{onClick:P,disabled:f,className:"flex items-center gap-1.5 px-3 py-2 rounded-lg bg-blue-600 hover:bg-blue-500 text-white text-sm font-semibold disabled:opacity-60 transition-colors",children:[p.jsx(__,{size:16})," ",f?"발급 중…":"OTP 등록 / 재설정 시작"]}),p.jsx("button",{onClick:z,disabled:f,className:"px-3 py-2 rounded-lg border border-rose-500/50 text-rose-300 text-sm hover:bg-rose-500/10 disabled:opacity-60 transition-colors",children:"Authenticator 해제"})]}),n==="setup"&&p.jsxs("div",{children:[p.jsxs("ol",{className:"list-decimal list-inside text-sm text-slate-300 leading-7 mb-3",children:[p.jsx("li",{children:"Authenticator 앱에서 아래 QR을 스캔하세요."}),p.jsx("li",{children:"스캔이 안 되면 수동 키를 직접 입력하세요."}),p.jsx("li",{children:"앱에 표시된 6자리 코드를 입력해 확인하세요."})]}),a&&p.jsx("div",{className:"flex justify-center mb-3",children:p.jsx("img",{src:a,alt:"OTP QR",width:200,height:200,style:{background:"#fff",padding:8,borderRadius:8}})}),l&&p.jsxs("div",{className:"mb-4",children:[p.jsx("div",{className:"text-[11px] text-slate-500 mb-1",children:"수동 입력 키"}),p.jsx("code",{className:"block text-xs text-blue-300 bg-slate-900 border border-slate-700 rounded-md px-2 py-1.5 break-all select-all",children:l})]}),p.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"앱에 표시된 6자리 코드"}),p.jsx("input",{value:u,onChange:U=>s(U.target.value.replace(/\D/g,"").slice(0,6)),inputMode:"numeric",autoComplete:"one-time-code",maxLength:6,placeholder:"000000",className:R+" mb-3"}),p.jsxs("div",{className:"flex gap-2",children:[p.jsx("button",{onClick:M,disabled:f||u.length!==6,className:"px-4 py-2 rounded-lg bg-blue-600 hover:bg-blue-500 text-white text-sm font-semibold disabled:opacity-60 transition-colors",children:f?"확인 중…":"코드 확인 · 활성화"}),p.jsx("button",{onClick:k,disabled:f,className:"px-4 py-2 rounded-lg border border-slate-600 text-sm text-slate-300 hover:bg-slate-700 transition-colors",children:"취소"})]})]}),n==="done"&&p.jsx("div",{className:"flex flex-wrap gap-2",children:p.jsx("button",{onClick:z,disabled:f,className:"px-3 py-2 rounded-lg border border-rose-500/50 text-rose-300 text-sm hover:bg-rose-500/10 disabled:opacity-60 transition-colors",children:"Authenticator 해제"})})]}),p.jsxs("section",{className:"bg-slate-800 border border-slate-700 rounded-xl p-5",children:[p.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[p.jsx(V4,{size:18,className:"text-blue-400"}),p.jsx("h2",{className:"font-semibold text-slate-100",children:"비밀번호 변경"})]}),p.jsx(D,{m:E}),p.jsxs("div",{className:"space-y-3",children:[p.jsxs("div",{children:[p.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"현재 비밀번호"}),p.jsx("input",{type:O?"text":"password",value:x,autoComplete:"current-password",onChange:U=>g(U.target.value),className:N})]}),p.jsxs("div",{children:[p.jsxs("label",{className:"block text-xs text-slate-400 mb-1",children:["새 비밀번호 (최소 ",wp,"자)"]}),p.jsx("input",{type:O?"text":"password",value:v,autoComplete:"new-password",onChange:U=>y(U.target.value),className:N})]}),p.jsxs("div",{children:[p.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"새 비밀번호 확인"}),p.jsx("input",{type:O?"text":"password",value:m,autoComplete:"new-password",onChange:U=>b(U.target.value),className:N})]}),p.jsxs("label",{className:"flex items-center gap-1.5 text-xs text-slate-400 cursor-pointer select-none",children:[p.jsx("button",{type:"button",onClick:()=>S(!O),className:"text-slate-400 hover:text-blue-400",children:O?p.jsx(I4,{size:15}):p.jsx(H4,{size:15})}),"비밀번호 표시"]}),p.jsx("button",{onClick:B,disabled:w,className:"px-4 py-2 rounded-lg bg-blue-600 hover:bg-blue-500 text-white text-sm font-semibold disabled:opacity-60 transition-colors",children:w?"변경 중…":"비밀번호 변경"})]})]})]})}const nh=He.create({timeout:3e4});nh.interceptors.request.use(e=>{const t=localStorage.getItem("fa_token");return t&&(e.headers.Authorization=`Bearer ${t}`),e});const vre=()=>nh.get("/api/admin/users").then(e=>{var t;return((t=e.data)==null?void 0:t.data)??[]}),gre=e=>nh.post(`/api/admin/users/${e}/otp-reset`).then(t=>t.data),bre=e=>nh.post(`/api/admin/users/${e}/unlock`).then(t=>t.data);function Ap(e,t){var n,r,a,i,l;return((n=e==null?void 0:e.response)==null?void 0:n.status)===403?"권한이 없습니다 (사용자 관리는 ADMIN 전용).":((a=(r=e==null?void 0:e.response)==null?void 0:r.data)==null?void 0:a.error)||((l=(i=e==null?void 0:e.response)==null?void 0:i.data)==null?void 0:l.message)||t}function xre(){const[e,t]=_.useState([]),[n,r]=_.useState(!1),[a,i]=_.useState(""),[l,o]=_.useState(null),[u,s]=_.useState(""),f=()=>{r(!0),i(""),vre().then(t).catch(g=>i(Ap(g,"사용자 목록을 불러오지 못했습니다."))).finally(()=>r(!1))};_.useEffect(()=>{f()},[]);const c=async g=>{if(window.confirm(`${g.username} 사용자의 OTP를 초기화하시겠습니까? (다음 로그인 시 재등록)`)){o(g.id),s(""),i("");try{await gre(g.id),s(`${g.username} OTP를 초기화했습니다.`),f()}catch(v){i(Ap(v,"OTP 초기화에 실패했습니다."))}finally{o(null)}}},d=async g=>{o(g.id),s(""),i("");try{await bre(g.id),s(`${g.username} 계정 잠금을 해제했습니다.`),f()}catch(v){i(Ap(v,"잠금 해제에 실패했습니다."))}finally{o(null)}},h="text-left text-xs font-semibold text-slate-400 px-3 py-2",x="text-sm text-slate-200 px-3 py-2 border-t border-slate-700";return p.jsxs("div",{className:"space-y-5",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{children:[p.jsxs("h1",{className:"text-xl font-bold text-white flex items-center gap-2",children:[p.jsx(N_,{size:20,className:"text-blue-400"})," 사용자 관리"]}),p.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"OTP 초기화 · 계정 잠금 해제 (ADMIN 전용)"})]}),p.jsxs("button",{onClick:f,disabled:n,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-slate-800 border border-slate-700 text-sm text-slate-200 disabled:opacity-40",children:[p.jsx(E_,{size:14})," 새로고침"]})]}),a&&p.jsx("div",{className:"bg-rose-500/10 border border-rose-500/40 text-rose-300 text-sm rounded-lg px-4 py-2.5",children:a}),u&&p.jsx("div",{className:"bg-emerald-500/10 border border-emerald-500/40 text-emerald-300 text-sm rounded-lg px-4 py-2.5",children:u}),p.jsx("div",{className:"bg-slate-800 border border-slate-700 rounded-xl overflow-x-auto",children:p.jsxs("table",{className:"w-full min-w-[720px]",children:[p.jsx("thead",{children:p.jsxs("tr",{className:"bg-slate-900/60",children:[p.jsx("th",{className:h,children:"사용자명"}),p.jsx("th",{className:h,children:"역할"}),p.jsx("th",{className:h,children:"워크스테이션"}),p.jsx("th",{className:h,children:"OTP"}),p.jsx("th",{className:h,children:"상태"}),p.jsx("th",{className:h+" text-right",children:"작업"})]})}),p.jsxs("tbody",{children:[e.map(g=>p.jsxs("tr",{children:[p.jsx("td",{className:x+" font-medium",children:g.username}),p.jsx("td",{className:x,children:g.role}),p.jsx("td",{className:x,children:g.workstationCode||"-"}),p.jsx("td",{className:x,children:g.otpEnabled?p.jsxs("span",{className:"inline-flex items-center gap-1 text-emerald-300",children:[p.jsx(r0,{size:14})," 사용"]}):p.jsxs("span",{className:"inline-flex items-center gap-1 text-slate-400",children:[p.jsx(i$,{size:14})," 미설정"]})}),p.jsx("td",{className:x,children:g.locked?p.jsx("span",{className:"text-rose-300",children:"잠금"}):p.jsx("span",{className:"text-slate-400",children:"정상"})}),p.jsxs("td",{className:x+" text-right whitespace-nowrap",children:[p.jsxs("button",{onClick:()=>c(g),disabled:l===g.id,className:"inline-flex items-center gap-1 px-2.5 py-1.5 mr-2 rounded-lg border border-slate-600 text-xs text-slate-200 hover:border-blue-500/50 disabled:opacity-50 transition-colors",children:[p.jsx(t$,{size:13})," OTP 초기화"]}),p.jsxs("button",{onClick:()=>d(g),disabled:l===g.id||!g.locked,className:"inline-flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-slate-600 text-xs text-slate-200 hover:border-blue-500/50 disabled:opacity-30 transition-colors",children:[p.jsx(X4,{size:13})," 잠금 해제"]})]})]},g.id)),!n&&e.length===0&&!a&&p.jsx("tr",{children:p.jsx("td",{className:x+" text-center text-slate-500",colSpan:6,children:"사용자가 없습니다."})})]})]})})]})}const Sre=[{to:"/dashboard",icon:Y4,label:"대시보드"},{to:"/floor-map",icon:F4,label:"공장 배치도"},{to:"/epaper",icon:Q4,label:"e-Paper 관리"},{to:"/qr",icon:__,label:"QR WIP 추적"},{to:"/orders",icon:A_,label:"생산 오더"},{to:"/andon",icon:od,label:"안돈 현황판"},{to:"/quality",icon:r0,label:"품질 관리"},{to:"/equipment",icon:M_,label:"설비 현황"},{to:"/inventory",icon:L4,label:"재고 관리"},{to:"/ai",icon:eu,label:"AI 공장 분석"},{to:"/wise",icon:T_,label:"WISE AI"},{to:"/ai-settings",icon:Rc,label:"AI 플랫폼 설정"}];function Ore(){const e=JSON.parse(localStorage.getItem("fa_user")||"{}"),t=e.role==="ADMIN",n=({isActive:r})=>`flex items-center gap-3 px-4 py-2.5 text-sm transition-colors ${r?"bg-blue-600 text-white":"text-slate-300 hover:bg-slate-800 hover:text-white"}`;return p.jsxs("aside",{className:"w-60 bg-slate-900 border-r border-slate-700 flex flex-col h-screen fixed",children:[p.jsxs("div",{className:"p-4 border-b border-slate-700",children:[p.jsx("div",{className:"text-blue-400 font-bold text-lg",children:"GUARDiA FA"}),p.jsx("div",{className:"text-slate-400 text-xs mt-1",children:"Factory Automation Platform"})]}),p.jsxs("nav",{className:"flex-1 overflow-y-auto py-2",children:[Sre.map(({to:r,icon:a,label:i})=>p.jsxs(Hh,{to:r,className:n,children:[p.jsx(a,{size:16}),i]},r)),t&&p.jsxs(Hh,{to:"/admin/users",className:n,children:[p.jsx(N_,{size:16}),"사용자 관리"]})]}),p.jsxs("div",{className:"p-4 border-t border-slate-700",children:[p.jsxs(Hh,{to:"/mypage",className:"flex items-center gap-2 text-xs text-slate-300 hover:text-blue-400 mb-2 transition-colors",children:[p.jsx(U4,{size:14})," ",e.username||"내 계정"," ",e.role?`(${e.role})`:""]}),p.jsxs("button",{onClick:()=>{localStorage.clear(),window.location.href="/login"},className:"flex items-center gap-2 text-xs text-slate-400 hover:text-red-400 transition-colors",children:[p.jsx(K4,{size:14})," 로그아웃"]})]})]})}function wre({children:e}){return localStorage.getItem("fa_token")?p.jsx(p.Fragment,{children:e}):p.jsx(x_,{to:"/login",replace:!0})}function Are({children:e}){return p.jsxs("div",{className:"flex",children:[p.jsx(Ore,{}),p.jsx("main",{className:"ml-60 flex-1 min-h-screen p-6",children:e})]})}function _re(){return p.jsx(j4,{children:p.jsxs(ex,{children:[p.jsx(ft,{path:"/login",element:p.jsx(mD,{})}),p.jsx(ft,{path:"/*",element:p.jsx(wre,{children:p.jsx(Are,{children:p.jsxs(ex,{children:[p.jsx(ft,{path:"/",element:p.jsx(x_,{to:"/dashboard",replace:!0})}),p.jsx(ft,{path:"/dashboard",element:p.jsx(vD,{})}),p.jsx(ft,{path:"/floor-map",element:p.jsx(bD,{})}),p.jsx(ft,{path:"/epaper",element:p.jsx(SD,{})}),p.jsx(ft,{path:"/qr",element:p.jsx(OD,{})}),p.jsx(ft,{path:"/orders",element:p.jsx(AD,{})}),p.jsx(ft,{path:"/andon",element:p.jsx(ED,{})}),p.jsx(ft,{path:"/quality",element:p.jsx(are,{})}),p.jsx(ft,{path:"/equipment",element:p.jsx(lre,{})}),p.jsx(ft,{path:"/inventory",element:p.jsx(lw,{})}),p.jsx(ft,{path:"/ai",element:p.jsx(lw,{})}),p.jsx(ft,{path:"/wise",element:p.jsx(cre,{})}),p.jsx(ft,{path:"/ai-settings",element:p.jsx(yre,{})}),p.jsx(ft,{path:"/mypage",element:p.jsx(mre,{})}),p.jsx(ft,{path:"/admin/users",element:p.jsx(xre,{})})]})})})})]})})}M3.createRoot(document.getElementById("root")).render(p.jsx(C.StrictMode,{children:p.jsx(_re,{})}));