var D1=e=>{throw TypeError(e)};var Qm=(e,t,n)=>t.has(e)||D1("Cannot "+n);var I=(e,t,n)=>(Qm(e,t,"read from private field"),n?n.call(e):t.get(e)),be=(e,t,n)=>t.has(e)?D1("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),fe=(e,t,n,r)=>(Qm(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Dt=(e,t,n)=>(Qm(e,t,"access private method"),n);var Af=(e,t,n,r)=>({set _(a){fe(e,t,a,n)},get _(){return I(e,t,r)}});(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 Nf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var hE={exports:{}},Sp={};/**
 * @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 R3=Symbol.for("react.transitional.element"),k3=Symbol.for("react.fragment");function pE(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:R3,type:e,key:r,ref:t!==void 0?t:null,props:n}}Sp.Fragment=k3;Sp.jsx=pE;Sp.jsxs=pE;hE.exports=Sp;var o=hE.exports,mE={exports:{}},he={};/**
 * @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 ib=Symbol.for("react.transitional.element"),D3=Symbol.for("react.portal"),L3=Symbol.for("react.fragment"),z3=Symbol.for("react.strict_mode"),B3=Symbol.for("react.profiler"),I3=Symbol.for("react.consumer"),U3=Symbol.for("react.context"),q3=Symbol.for("react.forward_ref"),H3=Symbol.for("react.suspense"),F3=Symbol.for("react.memo"),yE=Symbol.for("react.lazy"),G3=Symbol.for("react.activity"),L1=Symbol.iterator;function K3(e){return e===null||typeof e!="object"?null:(e=L1&&e[L1]||e["@@iterator"],typeof e=="function"?e:null)}var vE={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},gE=Object.assign,xE={};function ws(e,t,n){this.props=e,this.context=t,this.refs=xE,this.updater=n||vE}ws.prototype.isReactComponent={};ws.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")};ws.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function bE(){}bE.prototype=ws.prototype;function lb(e,t,n){this.props=e,this.context=t,this.refs=xE,this.updater=n||vE}var ob=lb.prototype=new bE;ob.constructor=lb;gE(ob,ws.prototype);ob.isPureReactComponent=!0;var z1=Array.isArray;function xv(){}var We={H:null,A:null,T:null,S:null},jE=Object.prototype.hasOwnProperty;function sb(e,t,n){var r=n.ref;return{$$typeof:ib,type:e,key:t,ref:r!==void 0?r:null,props:n}}function V3(e,t){return sb(e.type,t,e.props)}function cb(e){return typeof e=="object"&&e!==null&&e.$$typeof===ib}function Y3(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var B1=/\/+/g;function Wm(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Y3(""+e.key):t.toString(36)}function X3(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(xv,xv):(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 Gl(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 ib:case D3:l=!0;break;case yE:return l=e._init,Gl(l(e._payload),t,n,r,a)}}if(l)return a=a(e),l=r===""?"."+Wm(e,0):r,z1(a)?(n="",l!=null&&(n=l.replace(B1,"$&/")+"/"),Gl(a,t,n,"",function(u){return u})):a!=null&&(cb(a)&&(a=V3(a,n+(a.key==null||e&&e.key===a.key?"":(""+a.key).replace(B1,"$&/")+"/")+l)),t.push(a)),1;l=0;var s=r===""?".":r+":";if(z1(e))for(var c=0;c<e.length;c++)r=e[c],i=s+Wm(r,c),l+=Gl(r,t,n,i,a);else if(c=K3(e),typeof c=="function")for(e=c.call(e),c=0;!(r=e.next()).done;)r=r.value,i=s+Wm(r,c++),l+=Gl(r,t,n,i,a);else if(i==="object"){if(typeof e.then=="function")return Gl(X3(e),t,n,r,a);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return l}function Ef(e,t,n){if(e==null)return e;var r=[],a=0;return Gl(e,r,"","",function(i){return t.call(n,i,a++)}),r}function Q3(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var I1=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},W3={map:Ef,forEach:function(e,t,n){Ef(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ef(e,function(){t++}),t},toArray:function(e){return Ef(e,function(t){return t})||[]},only:function(e){if(!cb(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};he.Activity=G3;he.Children=W3;he.Component=ws;he.Fragment=L3;he.Profiler=B3;he.PureComponent=lb;he.StrictMode=z3;he.Suspense=H3;he.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=We;he.__COMPILER_RUNTIME={__proto__:null,c:function(e){return We.H.useMemoCache(e)}};he.cache=function(e){return function(){return e.apply(null,arguments)}};he.cacheSignal=function(){return null};he.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var r=gE({},e.props),a=e.key;if(t!=null)for(i in t.key!==void 0&&(a=""+t.key),t)!jE.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(r[i]=t[i]);var i=arguments.length-2;if(i===1)r.children=n;else if(1<i){for(var l=Array(i),s=0;s<i;s++)l[s]=arguments[s+2];r.children=l}return sb(e.type,a,r)};he.createContext=function(e){return e={$$typeof:U3,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:I3,_context:e},e};he.createElement=function(e,t,n){var r,a={},i=null;if(t!=null)for(r in t.key!==void 0&&(i=""+t.key),t)jE.call(t,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(a[r]=t[r]);var l=arguments.length-2;if(l===1)a.children=n;else if(1<l){for(var s=Array(l),c=0;c<l;c++)s[c]=arguments[c+2];a.children=s}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)a[r]===void 0&&(a[r]=l[r]);return sb(e,i,a)};he.createRef=function(){return{current:null}};he.forwardRef=function(e){return{$$typeof:q3,render:e}};he.isValidElement=cb;he.lazy=function(e){return{$$typeof:yE,_payload:{_status:-1,_result:e},_init:Q3}};he.memo=function(e,t){return{$$typeof:F3,type:e,compare:t===void 0?null:t}};he.startTransition=function(e){var t=We.T,n={};We.T=n;try{var r=e(),a=We.S;a!==null&&a(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(xv,I1)}catch(i){I1(i)}finally{t!==null&&n.types!==null&&(t.types=n.types),We.T=t}};he.unstable_useCacheRefresh=function(){return We.H.useCacheRefresh()};he.use=function(e){return We.H.use(e)};he.useActionState=function(e,t,n){return We.H.useActionState(e,t,n)};he.useCallback=function(e,t){return We.H.useCallback(e,t)};he.useContext=function(e){return We.H.useContext(e)};he.useDebugValue=function(){};he.useDeferredValue=function(e,t){return We.H.useDeferredValue(e,t)};he.useEffect=function(e,t){return We.H.useEffect(e,t)};he.useEffectEvent=function(e){return We.H.useEffectEvent(e)};he.useId=function(){return We.H.useId()};he.useImperativeHandle=function(e,t,n){return We.H.useImperativeHandle(e,t,n)};he.useInsertionEffect=function(e,t){return We.H.useInsertionEffect(e,t)};he.useLayoutEffect=function(e,t){return We.H.useLayoutEffect(e,t)};he.useMemo=function(e,t){return We.H.useMemo(e,t)};he.useOptimistic=function(e,t){return We.H.useOptimistic(e,t)};he.useReducer=function(e,t,n){return We.H.useReducer(e,t,n)};he.useRef=function(e){return We.H.useRef(e)};he.useState=function(e){return We.H.useState(e)};he.useSyncExternalStore=function(e,t,n){return We.H.useSyncExternalStore(e,t,n)};he.useTransition=function(){return We.H.useTransition()};he.version="19.2.7";mE.exports=he;var O=mE.exports;const T=_e(O);var SE={exports:{}},wp={},wE={exports:{}},OE={};/**
 * @license React
 * scheduler.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.
 */(function(e){function t($,L){var q=$.length;$.push(L);e:for(;0<q;){var V=q-1>>>1,X=$[V];if(0<a(X,L))$[V]=L,$[q]=X,q=V;else break e}}function n($){return $.length===0?null:$[0]}function r($){if($.length===0)return null;var L=$[0],q=$.pop();if(q!==L){$[0]=q;e:for(var V=0,X=$.length,J=X>>>1;V<J;){var Q=2*(V+1)-1,ie=$[Q],ae=Q+1,Se=$[ae];if(0>a(ie,q))ae<X&&0>a(Se,ie)?($[V]=Se,$[ae]=q,V=ae):($[V]=ie,$[Q]=q,V=Q);else if(ae<X&&0>a(Se,q))$[V]=Se,$[ae]=q,V=ae;else break e}}return L}function a($,L){var q=$.sortIndex-L.sortIndex;return q!==0?q:$.id-L.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,s=l.now();e.unstable_now=function(){return l.now()-s}}var c=[],u=[],f=1,d=null,h=3,m=!1,j=!1,v=!1,p=!1,y=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;function x($){for(var L=n(u);L!==null;){if(L.callback===null)r(u);else if(L.startTime<=$)r(u),L.sortIndex=L.expirationTime,t(c,L);else break;L=n(u)}}function w($){if(v=!1,x($),!j)if(n(c)!==null)j=!0,S||(S=!0,P());else{var L=n(u);L!==null&&E(w,L.startTime-$)}}var S=!1,A=-1,N=5,C=-1;function M(){return p?!0:!(e.unstable_now()-C<N)}function R(){if(p=!1,S){var $=e.unstable_now();C=$;var L=!0;try{e:{j=!1,v&&(v=!1,g(A),A=-1),m=!0;var q=h;try{t:{for(x($),d=n(c);d!==null&&!(d.expirationTime>$&&M());){var V=d.callback;if(typeof V=="function"){d.callback=null,h=d.priorityLevel;var X=V(d.expirationTime<=$);if($=e.unstable_now(),typeof X=="function"){d.callback=X,x($),L=!0;break t}d===n(c)&&r(c),x($)}else r(c);d=n(c)}if(d!==null)L=!0;else{var J=n(u);J!==null&&E(w,J.startTime-$),L=!1}}break e}finally{d=null,h=q,m=!1}L=void 0}}finally{L?P():S=!1}}}var P;if(typeof b=="function")P=function(){b(R)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,_=B.port2;B.port1.onmessage=R,P=function(){_.postMessage(null)}}else P=function(){y(R,0)};function E($,L){A=y(function(){$(e.unstable_now())},L)}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($){$.callback=null},e.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_next=function($){switch(h){case 1:case 2:case 3:var L=3;break;default:L=h}var q=h;h=L;try{return $()}finally{h=q}},e.unstable_requestPaint=function(){p=!0},e.unstable_runWithPriority=function($,L){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var q=h;h=$;try{return L()}finally{h=q}},e.unstable_scheduleCallback=function($,L,q){var V=e.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?V+q:V):q=V,$){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=q+X,$={id:f++,callback:L,priorityLevel:$,startTime:q,expirationTime:X,sortIndex:-1},q>V?($.sortIndex=q,t(u,$),n(c)===null&&$===n(u)&&(v?(g(A),A=-1):v=!0,E(w,q-V))):($.sortIndex=X,t(c,$),j||m||(j=!0,S||(S=!0,P()))),$},e.unstable_shouldYield=M,e.unstable_wrapCallback=function($){var L=h;return function(){var q=h;h=L;try{return $.apply(this,arguments)}finally{h=q}}}})(OE);wE.exports=OE;var Z3=wE.exports,AE={exports:{}},ln={};/**
 * @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 J3=O;function NE(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Ma(){}var Jt={d:{f:Ma,r:function(){throw Error(NE(522))},D:Ma,C:Ma,L:Ma,m:Ma,X:Ma,S:Ma,M:Ma},p:0,findDOMNode:null},eR=Symbol.for("react.portal");function tR(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:eR,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}var Sc=J3.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Op(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}ln.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Jt;ln.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(NE(299));return tR(e,t,null,n)};ln.flushSync=function(e){var t=Sc.T,n=Jt.p;try{if(Sc.T=null,Jt.p=2,e)return e()}finally{Sc.T=t,Jt.p=n,Jt.d.f()}};ln.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Jt.d.C(e,t))};ln.prefetchDNS=function(e){typeof e=="string"&&Jt.d.D(e)};ln.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,r=Op(n,t.crossOrigin),a=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?Jt.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:i}):n==="script"&&Jt.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};ln.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=Op(t.as,t.crossOrigin);Jt.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Jt.d.M(e)};ln.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,r=Op(n,t.crossOrigin);Jt.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};ln.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=Op(t.as,t.crossOrigin);Jt.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Jt.d.m(e)};ln.requestFormReset=function(e){Jt.d.r(e)};ln.unstable_batchedUpdates=function(e,t){return e(t)};ln.useFormState=function(e,t,n){return Sc.H.useFormState(e,t,n)};ln.useFormStatus=function(){return Sc.H.useHostTransitionStatus()};ln.version="19.2.7";function EE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(EE)}catch(e){console.error(e)}}EE(),AE.exports=ln;var nR=AE.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 Et=Z3,CE=O,rR=nR;function F(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function _E(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Vu(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function TE(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function PE(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function U1(e){if(Vu(e)!==e)throw Error(F(188))}function aR(e){var t=e.alternate;if(!t){if(t=Vu(e),t===null)throw Error(F(188));return t!==e?null:e}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var i=a.alternate;if(i===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===n)return U1(a),e;if(i===r)return U1(a),t;i=i.sibling}throw Error(F(188))}if(n.return!==r.return)n=a,r=i;else{for(var l=!1,s=a.child;s;){if(s===n){l=!0,n=a,r=i;break}if(s===r){l=!0,r=a,n=i;break}s=s.sibling}if(!l){for(s=i.child;s;){if(s===n){l=!0,n=i,r=a;break}if(s===r){l=!0,r=i,n=a;break}s=s.sibling}if(!l)throw Error(F(189))}}if(n.alternate!==r)throw Error(F(190))}if(n.tag!==3)throw Error(F(188));return n.stateNode.current===n?e:t}function ME(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=ME(e),t!==null)return t;e=e.sibling}return null}var Ze=Object.assign,iR=Symbol.for("react.element"),Cf=Symbol.for("react.transitional.element"),yc=Symbol.for("react.portal"),Yl=Symbol.for("react.fragment"),$E=Symbol.for("react.strict_mode"),bv=Symbol.for("react.profiler"),RE=Symbol.for("react.consumer"),aa=Symbol.for("react.context"),ub=Symbol.for("react.forward_ref"),jv=Symbol.for("react.suspense"),Sv=Symbol.for("react.suspense_list"),fb=Symbol.for("react.memo"),ka=Symbol.for("react.lazy"),wv=Symbol.for("react.activity"),lR=Symbol.for("react.memo_cache_sentinel"),q1=Symbol.iterator;function Ws(e){return e===null||typeof e!="object"?null:(e=q1&&e[q1]||e["@@iterator"],typeof e=="function"?e:null)}var oR=Symbol.for("react.client.reference");function Ov(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===oR?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Yl:return"Fragment";case bv:return"Profiler";case $E:return"StrictMode";case jv:return"Suspense";case Sv:return"SuspenseList";case wv:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case yc:return"Portal";case aa:return e.displayName||"Context";case RE:return(e._context.displayName||"Context")+".Consumer";case ub:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case fb:return t=e.displayName||null,t!==null?t:Ov(e.type)||"Memo";case ka:t=e._payload,e=e._init;try{return Ov(e(t))}catch{}}return null}var vc=Array.isArray,ue=CE.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ee=rR.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,al={pending:!1,data:null,method:null,action:null},Av=[],Xl=-1;function Ur(e){return{current:e}}function Rt(e){0>Xl||(e.current=Av[Xl],Av[Xl]=null,Xl--)}function qe(e,t){Xl++,Av[Xl]=e.current,e.current=t}var Lr=Ur(null),Gc=Ur(null),ri=Ur(null),Dd=Ur(null);function Ld(e,t){switch(qe(ri,t),qe(Gc,e),qe(Lr,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Yj(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Yj(t),e=e_(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Rt(Lr),qe(Lr,e)}function Ro(){Rt(Lr),Rt(Gc),Rt(ri)}function Nv(e){e.memoizedState!==null&&qe(Dd,e);var t=Lr.current,n=e_(t,e.type);t!==n&&(qe(Gc,e),qe(Lr,n))}function zd(e){Gc.current===e&&(Rt(Lr),Rt(Gc)),Dd.current===e&&(Rt(Dd),nu._currentValue=al)}var Zm,H1;function zi(e){if(Zm===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Zm=t&&t[1]||"",H1=-1<n.stack.indexOf(`
    at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Zm+e+H1}var Jm=!1;function ey(e,t){if(!e||Jm)return"";Jm=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(m){var h=m}Reflect.construct(e,[],d)}else{try{d.call()}catch(m){h=m}e.call(d.prototype)}}else{try{throw Error()}catch(m){h=m}(d=e())&&typeof d.catch=="function"&&d.catch(function(){})}}catch(m){if(m&&h&&typeof m.stack=="string")return[m.stack,h.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=r.DetermineComponentFrameRoot(),l=i[0],s=i[1];if(l&&s){var c=l.split(`
`),u=s.split(`
`);for(a=r=0;r<c.length&&!c[r].includes("DetermineComponentFrameRoot");)r++;for(;a<u.length&&!u[a].includes("DetermineComponentFrameRoot");)a++;if(r===c.length||a===u.length)for(r=c.length-1,a=u.length-1;1<=r&&0<=a&&c[r]!==u[a];)a--;for(;1<=r&&0<=a;r--,a--)if(c[r]!==u[a]){if(r!==1||a!==1)do if(r--,a--,0>a||c[r]!==u[a]){var f=`
`+c[r].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),f}while(1<=r&&0<=a);break}}}finally{Jm=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?zi(n):""}function sR(e,t){switch(e.tag){case 26:case 27:case 5:return zi(e.type);case 16:return zi("Lazy");case 13:return e.child!==t&&t!==null?zi("Suspense Fallback"):zi("Suspense");case 19:return zi("SuspenseList");case 0:case 15:return ey(e.type,!1);case 11:return ey(e.type.render,!1);case 1:return ey(e.type,!0);case 31:return zi("Activity");default:return""}}function F1(e){try{var t="",n=null;do t+=sR(e,n),n=e,e=e.return;while(e);return t}catch(r){return`
Error generating stack: `+r.message+`
`+r.stack}}var Ev=Object.prototype.hasOwnProperty,db=Et.unstable_scheduleCallback,ty=Et.unstable_cancelCallback,cR=Et.unstable_shouldYield,uR=Et.unstable_requestPaint,En=Et.unstable_now,fR=Et.unstable_getCurrentPriorityLevel,kE=Et.unstable_ImmediatePriority,DE=Et.unstable_UserBlockingPriority,Bd=Et.unstable_NormalPriority,dR=Et.unstable_LowPriority,LE=Et.unstable_IdlePriority,hR=Et.log,pR=Et.unstable_setDisableYieldValue,Yu=null,Cn=null;function Xa(e){if(typeof hR=="function"&&pR(e),Cn&&typeof Cn.setStrictMode=="function")try{Cn.setStrictMode(Yu,e)}catch{}}var _n=Math.clz32?Math.clz32:vR,mR=Math.log,yR=Math.LN2;function vR(e){return e>>>=0,e===0?32:31-(mR(e)/yR|0)|0}var _f=256,Tf=262144,Pf=4194304;function Bi(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 Ap(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 s=r&134217727;return s!==0?(r=s&~i,r!==0?a=Bi(r):(l&=s,l!==0?a=Bi(l):n||(n=s&~e,n!==0&&(a=Bi(n))))):(s=r&~i,s!==0?a=Bi(s):l!==0?a=Bi(l):n||(n=r&~e,n!==0&&(a=Bi(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 Xu(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function gR(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 zE(){var e=Pf;return Pf<<=1,!(Pf&62914560)&&(Pf=4194304),e}function ny(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Qu(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function xR(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 s=e.entanglements,c=e.expirationTimes,u=e.hiddenUpdates;for(n=l&~n;0<n;){var f=31-_n(n),d=1<<f;s[f]=0,c[f]=-1;var h=u[f];if(h!==null)for(u[f]=null,f=0;f<h.length;f++){var m=h[f];m!==null&&(m.lane&=-536870913)}n&=~d}r!==0&&BE(e,r,0),i!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=i&~(l&~t))}function BE(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-_n(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function IE(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-_n(n),a=1<<r;a&t|e[r]&t&&(e[r]|=t),n&=~a}}function UE(e,t){var n=t&-t;return n=n&42?1:hb(n),n&(e.suspendedLanes|t)?0:n}function hb(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function pb(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function qE(){var e=Ee.p;return e!==0?e:(e=window.event,e===void 0?32:f_(e.type))}function G1(e,t){var n=Ee.p;try{return Ee.p=e,t()}finally{Ee.p=n}}var wi=Math.random().toString(36).slice(2),Bt="__reactFiber$"+wi,mn="__reactProps$"+wi,Os="__reactContainer$"+wi,Cv="__reactEvents$"+wi,bR="__reactListeners$"+wi,jR="__reactHandles$"+wi,K1="__reactResources$"+wi,Wu="__reactMarker$"+wi;function mb(e){delete e[Bt],delete e[mn],delete e[Cv],delete e[bR],delete e[jR]}function Ql(e){var t=e[Bt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Os]||n[Bt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Jj(e);e!==null;){if(n=e[Bt])return n;e=Jj(e)}return t}e=n,n=e.parentNode}return null}function As(e){if(e=e[Bt]||e[Os]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function gc(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(F(33))}function po(e){var t=e[K1];return t||(t=e[K1]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Mt(e){e[Wu]=!0}var HE=new Set,FE={};function Nl(e,t){ko(e,t),ko(e+"Capture",t)}function ko(e,t){for(FE[e]=t,e=0;e<t.length;e++)HE.add(t[e])}var SR=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),V1={},Y1={};function wR(e){return Ev.call(Y1,e)?!0:Ev.call(V1,e)?!1:SR.test(e)?Y1[e]=!0:(V1[e]=!0,!1)}function md(e,t,n){if(wR(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Mf(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Kr(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+r)}}function Hn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function GE(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function OR(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(l){n=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(l){n=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _v(e){if(!e._valueTracker){var t=GE(e)?"checked":"value";e._valueTracker=OR(e,t,""+e[t])}}function KE(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=GE(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Id(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var AR=/[\n"\\]/g;function Kn(e){return e.replace(AR,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Tv(e,t,n,r,a,i,l,s){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=""+Hn(t)):e.value!==""+Hn(t)&&(e.value=""+Hn(t)):l!=="submit"&&l!=="reset"||e.removeAttribute("value"),t!=null?Pv(e,l,Hn(t)):n!=null?Pv(e,l,Hn(n)):r!=null&&e.removeAttribute("value"),a==null&&i!=null&&(e.defaultChecked=!!i),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.name=""+Hn(s):e.removeAttribute("name")}function VE(e,t,n,r,a,i,l,s){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)){_v(e);return}n=n!=null?""+Hn(n):"",t=t!=null?""+Hn(t):n,s||t===e.value||(e.value=t),e.defaultValue=t}r=r??a,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"&&(e.name=l),_v(e)}function Pv(e,t,n){t==="number"&&Id(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function mo(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Hn(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,r&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function YE(e,t,n){if(t!=null&&(t=""+Hn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Hn(n):""}function XE(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(F(92));if(vc(r)){if(1<r.length)throw Error(F(93));r=r[0]}n=r}n==null&&(n=""),t=n}n=Hn(t),e.defaultValue=n,r=e.textContent,r===n&&r!==""&&r!==null&&(e.value=r),_v(e)}function Do(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var NR=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function X1(e,t,n){var r=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,n):typeof n!="number"||n===0||NR.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function QE(e,t,n){if(t!=null&&typeof t!="object")throw Error(F(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&X1(e,a,r)}else for(var i in t)t.hasOwnProperty(i)&&X1(e,i,t[i])}function yb(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ER=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),CR=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function yd(e){return CR.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ia(){}var Mv=null;function vb(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wl=null,yo=null;function Q1(e){var t=As(e);if(t&&(e=t.stateNode)){var n=e[mn]||null;e:switch(e=t.stateNode,t.type){case"input":if(Tv(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Kn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[mn]||null;if(!a)throw Error(F(90));Tv(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&KE(r)}break e;case"textarea":YE(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&mo(e,!!n.multiple,t,!1)}}}var ry=!1;function WE(e,t,n){if(ry)return e(t,n);ry=!0;try{var r=e(t);return r}finally{if(ry=!1,(Wl!==null||yo!==null)&&(Lp(),Wl&&(t=Wl,e=yo,yo=Wl=null,Q1(t),e)))for(t=0;t<e.length;t++)Q1(e[t])}}function Kc(e,t){var n=e.stateNode;if(n===null)return null;var r=n[mn]||null;if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(F(231,t,typeof n));return n}var ma=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$v=!1;if(ma)try{var Zs={};Object.defineProperty(Zs,"passive",{get:function(){$v=!0}}),window.addEventListener("test",Zs,Zs),window.removeEventListener("test",Zs,Zs)}catch{$v=!1}var Qa=null,gb=null,vd=null;function ZE(){if(vd)return vd;var e,t=gb,n=t.length,r,a="value"in Qa?Qa.value:Qa.textContent,i=a.length;for(e=0;e<n&&t[e]===a[e];e++);var l=n-e;for(r=1;r<=l&&t[n-r]===a[i-r];r++);return vd=a.slice(e,1<r?1-r:void 0)}function gd(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function $f(){return!0}function W1(){return!1}function yn(e){function t(n,r,a,i,l){this._reactName=n,this._targetInst=a,this.type=r,this.nativeEvent=i,this.target=l,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(i):i[s]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?$f:W1,this.isPropagationStopped=W1,this}return Ze(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=$f)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=$f)},persist:function(){},isPersistent:$f}),t}var El={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Np=yn(El),Zu=Ze({},El,{view:0,detail:0}),_R=yn(Zu),ay,iy,Js,Ep=Ze({},Zu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xb,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Js&&(Js&&e.type==="mousemove"?(ay=e.screenX-Js.screenX,iy=e.screenY-Js.screenY):iy=ay=0,Js=e),ay)},movementY:function(e){return"movementY"in e?e.movementY:iy}}),Z1=yn(Ep),TR=Ze({},Ep,{dataTransfer:0}),PR=yn(TR),MR=Ze({},Zu,{relatedTarget:0}),ly=yn(MR),$R=Ze({},El,{animationName:0,elapsedTime:0,pseudoElement:0}),RR=yn($R),kR=Ze({},El,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),DR=yn(kR),LR=Ze({},El,{data:0}),J1=yn(LR),zR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},BR={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},IR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function UR(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=IR[e])?!!t[e]:!1}function xb(){return UR}var qR=Ze({},Zu,{key:function(e){if(e.key){var t=zR[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=gd(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?BR[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xb,charCode:function(e){return e.type==="keypress"?gd(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?gd(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),HR=yn(qR),FR=Ze({},Ep,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ej=yn(FR),GR=Ze({},Zu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xb}),KR=yn(GR),VR=Ze({},El,{propertyName:0,elapsedTime:0,pseudoElement:0}),YR=yn(VR),XR=Ze({},Ep,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),QR=yn(XR),WR=Ze({},El,{newState:0,oldState:0}),ZR=yn(WR),JR=[9,13,27,32],bb=ma&&"CompositionEvent"in window,wc=null;ma&&"documentMode"in document&&(wc=document.documentMode);var ek=ma&&"TextEvent"in window&&!wc,JE=ma&&(!bb||wc&&8<wc&&11>=wc),tj=" ",nj=!1;function e2(e,t){switch(e){case"keyup":return JR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function t2(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zl=!1;function tk(e,t){switch(e){case"compositionend":return t2(t);case"keypress":return t.which!==32?null:(nj=!0,tj);case"textInput":return e=t.data,e===tj&&nj?null:e;default:return null}}function nk(e,t){if(Zl)return e==="compositionend"||!bb&&e2(e,t)?(e=ZE(),vd=gb=Qa=null,Zl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return JE&&t.locale!=="ko"?null:t.data;default:return null}}var rk={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function rj(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!rk[e.type]:t==="textarea"}function n2(e,t,n,r){Wl?yo?yo.push(r):yo=[r]:Wl=r,t=ah(t,"onChange"),0<t.length&&(n=new Np("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Oc=null,Vc=null;function ak(e){WC(e,0)}function Cp(e){var t=gc(e);if(KE(t))return e}function aj(e,t){if(e==="change")return t}var r2=!1;if(ma){var oy;if(ma){var sy="oninput"in document;if(!sy){var ij=document.createElement("div");ij.setAttribute("oninput","return;"),sy=typeof ij.oninput=="function"}oy=sy}else oy=!1;r2=oy&&(!document.documentMode||9<document.documentMode)}function lj(){Oc&&(Oc.detachEvent("onpropertychange",a2),Vc=Oc=null)}function a2(e){if(e.propertyName==="value"&&Cp(Vc)){var t=[];n2(t,Vc,e,vb(e)),WE(ak,t)}}function ik(e,t,n){e==="focusin"?(lj(),Oc=t,Vc=n,Oc.attachEvent("onpropertychange",a2)):e==="focusout"&&lj()}function lk(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Cp(Vc)}function ok(e,t){if(e==="click")return Cp(t)}function sk(e,t){if(e==="input"||e==="change")return Cp(t)}function ck(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Mn=typeof Object.is=="function"?Object.is:ck;function Yc(e,t){if(Mn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var a=n[r];if(!Ev.call(t,a)||!Mn(e[a],t[a]))return!1}return!0}function oj(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function sj(e,t){var n=oj(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=oj(n)}}function i2(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?i2(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function l2(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Id(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=Id(e.document)}return t}function jb(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 uk=ma&&"documentMode"in document&&11>=document.documentMode,Jl=null,Rv=null,Ac=null,kv=!1;function cj(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;kv||Jl==null||Jl!==Id(r)||(r=Jl,"selectionStart"in r&&jb(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}),Ac&&Yc(Ac,r)||(Ac=r,r=ah(Rv,"onSelect"),0<r.length&&(t=new Np("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Jl)))}function $i(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var eo={animationend:$i("Animation","AnimationEnd"),animationiteration:$i("Animation","AnimationIteration"),animationstart:$i("Animation","AnimationStart"),transitionrun:$i("Transition","TransitionRun"),transitionstart:$i("Transition","TransitionStart"),transitioncancel:$i("Transition","TransitionCancel"),transitionend:$i("Transition","TransitionEnd")},cy={},o2={};ma&&(o2=document.createElement("div").style,"AnimationEvent"in window||(delete eo.animationend.animation,delete eo.animationiteration.animation,delete eo.animationstart.animation),"TransitionEvent"in window||delete eo.transitionend.transition);function Cl(e){if(cy[e])return cy[e];if(!eo[e])return e;var t=eo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in o2)return cy[e]=t[n];return e}var s2=Cl("animationend"),c2=Cl("animationiteration"),u2=Cl("animationstart"),fk=Cl("transitionrun"),dk=Cl("transitionstart"),hk=Cl("transitioncancel"),f2=Cl("transitionend"),d2=new Map,Dv="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Dv.push("scrollEnd");function jr(e,t){d2.set(e,t),Nl(t,[e])}var Ud=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},qn=[],to=0,Sb=0;function _p(){for(var e=to,t=Sb=to=0;t<e;){var n=qn[t];qn[t++]=null;var r=qn[t];qn[t++]=null;var a=qn[t];qn[t++]=null;var i=qn[t];if(qn[t++]=null,r!==null&&a!==null){var l=r.pending;l===null?a.next=a:(a.next=l.next,l.next=a),r.pending=a}i!==0&&h2(n,a,i)}}function Tp(e,t,n,r){qn[to++]=e,qn[to++]=t,qn[to++]=n,qn[to++]=r,Sb|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function wb(e,t,n,r){return Tp(e,t,n,r),qd(e)}function _l(e,t){return Tp(e,null,null,t),qd(e)}function h2(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var a=!1,i=e.return;i!==null;)i.childLanes|=n,r=i.alternate,r!==null&&(r.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(a=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,a&&t!==null&&(a=31-_n(n),e=i.hiddenUpdates,r=e[a],r===null?e[a]=[t]:r.push(t),t.lane=n|536870912),i):null}function qd(e){if(50<Rc)throw Rc=0,rg=null,Error(F(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var no={};function pk(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function On(e,t,n,r){return new pk(e,t,n,r)}function Ob(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ua(e,t){var n=e.alternate;return n===null?(n=On(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function p2(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function xd(e,t,n,r,a,i){var l=0;if(r=e,typeof e=="function")Ob(e)&&(l=1);else if(typeof e=="string")l=xD(e,n,Lr.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case wv:return e=On(31,n,t,a),e.elementType=wv,e.lanes=i,e;case Yl:return il(n.children,a,i,t);case $E:l=8,a|=24;break;case bv:return e=On(12,n,t,a|2),e.elementType=bv,e.lanes=i,e;case jv:return e=On(13,n,t,a),e.elementType=jv,e.lanes=i,e;case Sv:return e=On(19,n,t,a),e.elementType=Sv,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case aa:l=10;break e;case RE:l=9;break e;case ub:l=11;break e;case fb:l=14;break e;case ka:l=16,r=null;break e}l=29,n=Error(F(130,e===null?"null":typeof e,"")),r=null}return t=On(l,n,t,a),t.elementType=e,t.type=r,t.lanes=i,t}function il(e,t,n,r){return e=On(7,e,r,t),e.lanes=n,e}function uy(e,t,n){return e=On(6,e,null,t),e.lanes=n,e}function m2(e){var t=On(18,null,null,0);return t.stateNode=e,t}function fy(e,t,n){return t=On(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var uj=new WeakMap;function Vn(e,t){if(typeof e=="object"&&e!==null){var n=uj.get(e);return n!==void 0?n:(t={value:e,source:t,stack:F1(t)},uj.set(e,t),t)}return{value:e,source:t,stack:F1(t)}}var ro=[],ao=0,Hd=null,Xc=0,Fn=[],Gn=0,pi=null,Mr=1,$r="";function ea(e,t){ro[ao++]=Xc,ro[ao++]=Hd,Hd=e,Xc=t}function y2(e,t,n){Fn[Gn++]=Mr,Fn[Gn++]=$r,Fn[Gn++]=pi,pi=e;var r=Mr;e=$r;var a=32-_n(r)-1;r&=~(1<<a),n+=1;var i=32-_n(t)+a;if(30<i){var l=a-a%5;i=(r&(1<<l)-1).toString(32),r>>=l,a-=l,Mr=1<<32-_n(t)+a|n<<a|r,$r=i+e}else Mr=1<<i|n<<a|r,$r=e}function Ab(e){e.return!==null&&(ea(e,1),y2(e,1,0))}function Nb(e){for(;e===Hd;)Hd=ro[--ao],ro[ao]=null,Xc=ro[--ao],ro[ao]=null;for(;e===pi;)pi=Fn[--Gn],Fn[Gn]=null,$r=Fn[--Gn],Fn[Gn]=null,Mr=Fn[--Gn],Fn[Gn]=null}function v2(e,t){Fn[Gn++]=Mr,Fn[Gn++]=$r,Fn[Gn++]=pi,Mr=t.id,$r=t.overflow,pi=e}var It=null,Xe=null,we=!1,ai=null,Yn=!1,Lv=Error(F(519));function mi(e){var t=Error(F(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Qc(Vn(t,e)),Lv}function fj(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Bt]=e,t[mn]=r,n){case"dialog":ve("cancel",t),ve("close",t);break;case"iframe":case"object":case"embed":ve("load",t);break;case"video":case"audio":for(n=0;n<eu.length;n++)ve(eu[n],t);break;case"source":ve("error",t);break;case"img":case"image":case"link":ve("error",t),ve("load",t);break;case"details":ve("toggle",t);break;case"input":ve("invalid",t),VE(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":ve("invalid",t);break;case"textarea":ve("invalid",t),XE(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||r.suppressHydrationWarning===!0||JC(t.textContent,n)?(r.popover!=null&&(ve("beforetoggle",t),ve("toggle",t)),r.onScroll!=null&&ve("scroll",t),r.onScrollEnd!=null&&ve("scrollend",t),r.onClick!=null&&(t.onclick=ia),t=!0):t=!1,t||mi(e,!0)}function dj(e){for(It=e.return;It;)switch(It.tag){case 5:case 31:case 13:Yn=!1;return;case 27:case 3:Yn=!0;return;default:It=It.return}}function Ll(e){if(e!==It)return!1;if(!we)return dj(e),we=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||sg(e.type,e.memoizedProps)),n=!n),n&&Xe&&mi(e),dj(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(F(317));Xe=Zj(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(F(317));Xe=Zj(e)}else t===27?(t=Xe,Oi(e.type)?(e=dg,dg=null,Xe=e):Xe=t):Xe=It?Jn(e.stateNode.nextSibling):null;return!0}function pl(){Xe=It=null,we=!1}function dy(){var e=ai;return e!==null&&(fn===null?fn=e:fn.push.apply(fn,e),ai=null),e}function Qc(e){ai===null?ai=[e]:ai.push(e)}var zv=Ur(null),Tl=null,la=null;function za(e,t,n){qe(zv,t._currentValue),t._currentValue=n}function fa(e){e._currentValue=zv.current,Rt(zv)}function Bv(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Iv(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var i=a.dependencies;if(i!==null){var l=a.child;i=i.firstContext;e:for(;i!==null;){var s=i;i=a;for(var c=0;c<t.length;c++)if(s.context===t[c]){i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),Bv(i.return,n,e),r||(l=null);break e}i=s.next}}else if(a.tag===18){if(l=a.return,l===null)throw Error(F(341));l.lanes|=n,i=l.alternate,i!==null&&(i.lanes|=n),Bv(l,n,e),l=null}else l=a.child;if(l!==null)l.return=a;else for(l=a;l!==null;){if(l===e){l=null;break}if(a=l.sibling,a!==null){a.return=l.return,l=a;break}l=l.return}a=l}}function Ns(e,t,n,r){e=null;for(var a=t,i=!1;a!==null;){if(!i){if(a.flags&524288)i=!0;else if(a.flags&262144)break}if(a.tag===10){var l=a.alternate;if(l===null)throw Error(F(387));if(l=l.memoizedProps,l!==null){var s=a.type;Mn(a.pendingProps.value,l.value)||(e!==null?e.push(s):e=[s])}}else if(a===Dd.current){if(l=a.alternate,l===null)throw Error(F(387));l.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(nu):e=[nu])}a=a.return}e!==null&&Iv(t,e,n,r),t.flags|=262144}function Fd(e){for(e=e.firstContext;e!==null;){if(!Mn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ml(e){Tl=e,la=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function qt(e){return g2(Tl,e)}function Rf(e,t){return Tl===null&&ml(e),g2(e,t)}function g2(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},la===null){if(e===null)throw Error(F(308));la=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else la=la.next=t;return n}var mk=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},yk=Et.unstable_scheduleCallback,vk=Et.unstable_NormalPriority,bt={$$typeof:aa,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Eb(){return{controller:new mk,data:new Map,refCount:0}}function Ju(e){e.refCount--,e.refCount===0&&yk(vk,function(){e.controller.abort()})}var Nc=null,Uv=0,Lo=0,vo=null;function gk(e,t){if(Nc===null){var n=Nc=[];Uv=0,Lo=Zb(),vo={status:"pending",value:void 0,then:function(r){n.push(r)}}}return Uv++,t.then(hj,hj),t}function hj(){if(--Uv===0&&Nc!==null){vo!==null&&(vo.status="fulfilled");var e=Nc;Nc=null,Lo=0,vo=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function xk(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(a){n.push(a)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var a=0;a<n.length;a++)(0,n[a])(t)},function(a){for(r.status="rejected",r.reason=a,a=0;a<n.length;a++)(0,n[a])(void 0)}),r}var pj=ue.S;ue.S=function(e,t){MC=En(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&gk(e,t),pj!==null&&pj(e,t)};var ll=Ur(null);function Cb(){var e=ll.current;return e!==null?e:ze.pooledCache}function bd(e,t){t===null?qe(ll,ll.current):qe(ll,t.pool)}function x2(){var e=Cb();return e===null?null:{parent:bt._currentValue,pool:e}}var Es=Error(F(460)),_b=Error(F(474)),Pp=Error(F(542)),Gd={then:function(){}};function mj(e){return e=e.status,e==="fulfilled"||e==="rejected"}function b2(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(ia,ia),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,vj(e),e;default:if(typeof t.status=="string")t.then(ia,ia);else{if(e=ze,e!==null&&100<e.shellSuspendCounter)throw Error(F(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=r}},function(r){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,vj(e),e}throw ol=t,Es}}function Ii(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(ol=n,Es):n}}var ol=null;function yj(){if(ol===null)throw Error(F(459));var e=ol;return ol=null,e}function vj(e){if(e===Es||e===Pp)throw Error(F(483))}var go=null,Wc=0;function kf(e){var t=Wc;return Wc+=1,go===null&&(go=[]),b2(go,e,t)}function ec(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Df(e,t){throw t.$$typeof===iR?Error(F(525)):(e=Object.prototype.toString.call(t),Error(F(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function j2(e){function t(y,g){if(e){var b=y.deletions;b===null?(y.deletions=[g],y.flags|=16):b.push(g)}}function n(y,g){if(!e)return null;for(;g!==null;)t(y,g),g=g.sibling;return null}function r(y){for(var g=new Map;y!==null;)y.key!==null?g.set(y.key,y):g.set(y.index,y),y=y.sibling;return g}function a(y,g){return y=ua(y,g),y.index=0,y.sibling=null,y}function i(y,g,b){return y.index=b,e?(b=y.alternate,b!==null?(b=b.index,b<g?(y.flags|=67108866,g):b):(y.flags|=67108866,g)):(y.flags|=1048576,g)}function l(y){return e&&y.alternate===null&&(y.flags|=67108866),y}function s(y,g,b,x){return g===null||g.tag!==6?(g=uy(b,y.mode,x),g.return=y,g):(g=a(g,b),g.return=y,g)}function c(y,g,b,x){var w=b.type;return w===Yl?f(y,g,b.props.children,x,b.key):g!==null&&(g.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===ka&&Ii(w)===g.type)?(g=a(g,b.props),ec(g,b),g.return=y,g):(g=xd(b.type,b.key,b.props,null,y.mode,x),ec(g,b),g.return=y,g)}function u(y,g,b,x){return g===null||g.tag!==4||g.stateNode.containerInfo!==b.containerInfo||g.stateNode.implementation!==b.implementation?(g=fy(b,y.mode,x),g.return=y,g):(g=a(g,b.children||[]),g.return=y,g)}function f(y,g,b,x,w){return g===null||g.tag!==7?(g=il(b,y.mode,x,w),g.return=y,g):(g=a(g,b),g.return=y,g)}function d(y,g,b){if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return g=uy(""+g,y.mode,b),g.return=y,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Cf:return b=xd(g.type,g.key,g.props,null,y.mode,b),ec(b,g),b.return=y,b;case yc:return g=fy(g,y.mode,b),g.return=y,g;case ka:return g=Ii(g),d(y,g,b)}if(vc(g)||Ws(g))return g=il(g,y.mode,b,null),g.return=y,g;if(typeof g.then=="function")return d(y,kf(g),b);if(g.$$typeof===aa)return d(y,Rf(y,g),b);Df(y,g)}return null}function h(y,g,b,x){var w=g!==null?g.key:null;if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return w!==null?null:s(y,g,""+b,x);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Cf:return b.key===w?c(y,g,b,x):null;case yc:return b.key===w?u(y,g,b,x):null;case ka:return b=Ii(b),h(y,g,b,x)}if(vc(b)||Ws(b))return w!==null?null:f(y,g,b,x,null);if(typeof b.then=="function")return h(y,g,kf(b),x);if(b.$$typeof===aa)return h(y,g,Rf(y,b),x);Df(y,b)}return null}function m(y,g,b,x,w){if(typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint")return y=y.get(b)||null,s(g,y,""+x,w);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Cf:return y=y.get(x.key===null?b:x.key)||null,c(g,y,x,w);case yc:return y=y.get(x.key===null?b:x.key)||null,u(g,y,x,w);case ka:return x=Ii(x),m(y,g,b,x,w)}if(vc(x)||Ws(x))return y=y.get(b)||null,f(g,y,x,w,null);if(typeof x.then=="function")return m(y,g,b,kf(x),w);if(x.$$typeof===aa)return m(y,g,b,Rf(g,x),w);Df(g,x)}return null}function j(y,g,b,x){for(var w=null,S=null,A=g,N=g=0,C=null;A!==null&&N<b.length;N++){A.index>N?(C=A,A=null):C=A.sibling;var M=h(y,A,b[N],x);if(M===null){A===null&&(A=C);break}e&&A&&M.alternate===null&&t(y,A),g=i(M,g,N),S===null?w=M:S.sibling=M,S=M,A=C}if(N===b.length)return n(y,A),we&&ea(y,N),w;if(A===null){for(;N<b.length;N++)A=d(y,b[N],x),A!==null&&(g=i(A,g,N),S===null?w=A:S.sibling=A,S=A);return we&&ea(y,N),w}for(A=r(A);N<b.length;N++)C=m(A,y,N,b[N],x),C!==null&&(e&&C.alternate!==null&&A.delete(C.key===null?N:C.key),g=i(C,g,N),S===null?w=C:S.sibling=C,S=C);return e&&A.forEach(function(R){return t(y,R)}),we&&ea(y,N),w}function v(y,g,b,x){if(b==null)throw Error(F(151));for(var w=null,S=null,A=g,N=g=0,C=null,M=b.next();A!==null&&!M.done;N++,M=b.next()){A.index>N?(C=A,A=null):C=A.sibling;var R=h(y,A,M.value,x);if(R===null){A===null&&(A=C);break}e&&A&&R.alternate===null&&t(y,A),g=i(R,g,N),S===null?w=R:S.sibling=R,S=R,A=C}if(M.done)return n(y,A),we&&ea(y,N),w;if(A===null){for(;!M.done;N++,M=b.next())M=d(y,M.value,x),M!==null&&(g=i(M,g,N),S===null?w=M:S.sibling=M,S=M);return we&&ea(y,N),w}for(A=r(A);!M.done;N++,M=b.next())M=m(A,y,N,M.value,x),M!==null&&(e&&M.alternate!==null&&A.delete(M.key===null?N:M.key),g=i(M,g,N),S===null?w=M:S.sibling=M,S=M);return e&&A.forEach(function(P){return t(y,P)}),we&&ea(y,N),w}function p(y,g,b,x){if(typeof b=="object"&&b!==null&&b.type===Yl&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Cf:e:{for(var w=b.key;g!==null;){if(g.key===w){if(w=b.type,w===Yl){if(g.tag===7){n(y,g.sibling),x=a(g,b.props.children),x.return=y,y=x;break e}}else if(g.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===ka&&Ii(w)===g.type){n(y,g.sibling),x=a(g,b.props),ec(x,b),x.return=y,y=x;break e}n(y,g);break}else t(y,g);g=g.sibling}b.type===Yl?(x=il(b.props.children,y.mode,x,b.key),x.return=y,y=x):(x=xd(b.type,b.key,b.props,null,y.mode,x),ec(x,b),x.return=y,y=x)}return l(y);case yc:e:{for(w=b.key;g!==null;){if(g.key===w)if(g.tag===4&&g.stateNode.containerInfo===b.containerInfo&&g.stateNode.implementation===b.implementation){n(y,g.sibling),x=a(g,b.children||[]),x.return=y,y=x;break e}else{n(y,g);break}else t(y,g);g=g.sibling}x=fy(b,y.mode,x),x.return=y,y=x}return l(y);case ka:return b=Ii(b),p(y,g,b,x)}if(vc(b))return j(y,g,b,x);if(Ws(b)){if(w=Ws(b),typeof w!="function")throw Error(F(150));return b=w.call(b),v(y,g,b,x)}if(typeof b.then=="function")return p(y,g,kf(b),x);if(b.$$typeof===aa)return p(y,g,Rf(y,b),x);Df(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint"?(b=""+b,g!==null&&g.tag===6?(n(y,g.sibling),x=a(g,b),x.return=y,y=x):(n(y,g),x=uy(b,y.mode,x),x.return=y,y=x),l(y)):n(y,g)}return function(y,g,b,x){try{Wc=0;var w=p(y,g,b,x);return go=null,w}catch(A){if(A===Es||A===Pp)throw A;var S=On(29,A,null,y.mode);return S.lanes=x,S.return=y,S}finally{}}}var yl=j2(!0),S2=j2(!1),Da=!1;function Tb(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qv(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 ii(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function li(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ne&2){var a=r.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),r.pending=t,t=qd(e),h2(e,null,n),t}return Tp(e,r,t,n),qd(e)}function Ec(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,IE(e,n)}}function hy(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 Hv=!1;function Cc(){if(Hv){var e=vo;if(e!==null)throw e}}function _c(e,t,n,r){Hv=!1;var a=e.updateQueue;Da=!1;var i=a.firstBaseUpdate,l=a.lastBaseUpdate,s=a.shared.pending;if(s!==null){a.shared.pending=null;var c=s,u=c.next;c.next=null,l===null?i=u:l.next=u,l=c;var f=e.alternate;f!==null&&(f=f.updateQueue,s=f.lastBaseUpdate,s!==l&&(s===null?f.firstBaseUpdate=u:s.next=u,f.lastBaseUpdate=c))}if(i!==null){var d=a.baseState;l=0,f=u=c=null,s=i;do{var h=s.lane&-536870913,m=h!==s.lane;if(m?(je&h)===h:(r&h)===h){h!==0&&h===Lo&&(Hv=!0),f!==null&&(f=f.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var j=e,v=s;h=t;var p=n;switch(v.tag){case 1:if(j=v.payload,typeof j=="function"){d=j.call(p,d,h);break e}d=j;break e;case 3:j.flags=j.flags&-65537|128;case 0:if(j=v.payload,h=typeof j=="function"?j.call(p,d,h):j,h==null)break e;d=Ze({},d,h);break e;case 2:Da=!0}}h=s.callback,h!==null&&(e.flags|=64,m&&(e.flags|=8192),m=a.callbacks,m===null?a.callbacks=[h]:m.push(h))}else m={lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},f===null?(u=f=m,c=d):f=f.next=m,l|=h;if(s=s.next,s===null){if(s=a.shared.pending,s===null)break;m=s,s=m.next,m.next=null,a.lastBaseUpdate=m,a.shared.pending=null}}while(!0);f===null&&(c=d),a.baseState=c,a.firstBaseUpdate=u,a.lastBaseUpdate=f,i===null&&(a.shared.lanes=0),vi|=l,e.lanes=l,e.memoizedState=d}}function w2(e,t){if(typeof e!="function")throw Error(F(191,e));e.call(t)}function O2(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)w2(n[e],t)}var zo=Ur(null),Kd=Ur(0);function gj(e,t){e=xa,qe(Kd,e),qe(zo,t),xa=e|t.baseLanes}function Fv(){qe(Kd,xa),qe(zo,zo.current)}function Pb(){xa=Kd.current,Rt(zo),Rt(Kd)}var $n=Ur(null),Zn=null;function Ba(e){var t=e.alternate;qe(ht,ht.current&1),qe($n,e),Zn===null&&(t===null||zo.current!==null||t.memoizedState!==null)&&(Zn=e)}function Gv(e){qe(ht,ht.current),qe($n,e),Zn===null&&(Zn=e)}function A2(e){e.tag===22?(qe(ht,ht.current),qe($n,e),Zn===null&&(Zn=e)):Ia()}function Ia(){qe(ht,ht.current),qe($n,$n.current)}function wn(e){Rt($n),Zn===e&&(Zn=null),Rt(ht)}var ht=Ur(0);function Vd(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||ug(n)||fg(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ya=0,pe=null,De=null,gt=null,Yd=!1,xo=!1,vl=!1,Xd=0,Zc=0,bo=null,bk=0;function st(){throw Error(F(321))}function Mb(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Mn(e[n],t[n]))return!1;return!0}function $b(e,t,n,r,a,i){return ya=i,pe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ue.H=e===null||e.memoizedState===null?nC:Fb,vl=!1,i=n(r,a),vl=!1,xo&&(i=E2(t,n,r,a)),N2(e),i}function N2(e){ue.H=Jc;var t=De!==null&&De.next!==null;if(ya=0,gt=De=pe=null,Yd=!1,Zc=0,bo=null,t)throw Error(F(300));e===null||jt||(e=e.dependencies,e!==null&&Fd(e)&&(jt=!0))}function E2(e,t,n,r){pe=e;var a=0;do{if(xo&&(bo=null),Zc=0,xo=!1,25<=a)throw Error(F(301));if(a+=1,gt=De=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}ue.H=rC,i=t(n,r)}while(xo);return i}function jk(){var e=ue.H,t=e.useState()[0];return t=typeof t.then=="function"?ef(t):t,e=e.useState()[0],(De!==null?De.memoizedState:null)!==e&&(pe.flags|=1024),t}function Rb(){var e=Xd!==0;return Xd=0,e}function kb(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Db(e){if(Yd){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Yd=!1}ya=0,gt=De=pe=null,xo=!1,Zc=Xd=0,bo=null}function Qt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gt===null?pe.memoizedState=gt=e:gt=gt.next=e,gt}function pt(){if(De===null){var e=pe.alternate;e=e!==null?e.memoizedState:null}else e=De.next;var t=gt===null?pe.memoizedState:gt.next;if(t!==null)gt=t,De=e;else{if(e===null)throw pe.alternate===null?Error(F(467)):Error(F(310));De=e,e={memoizedState:De.memoizedState,baseState:De.baseState,baseQueue:De.baseQueue,queue:De.queue,next:null},gt===null?pe.memoizedState=gt=e:gt=gt.next=e}return gt}function Mp(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ef(e){var t=Zc;return Zc+=1,bo===null&&(bo=[]),e=b2(bo,e,t),t=pe,(gt===null?t.memoizedState:gt.next)===null&&(t=t.alternate,ue.H=t===null||t.memoizedState===null?nC:Fb),e}function $p(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ef(e);if(e.$$typeof===aa)return qt(e)}throw Error(F(438,String(e)))}function Lb(e){var t=null,n=pe.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=pe.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Mp(),pe.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=lR;return t.index++,n}function va(e,t){return typeof t=="function"?t(e):t}function jd(e){var t=pt();return zb(t,De,e)}function zb(e,t,n){var r=e.queue;if(r===null)throw Error(F(311));r.lastRenderedReducer=n;var a=e.baseQueue,i=r.pending;if(i!==null){if(a!==null){var l=a.next;a.next=i.next,i.next=l}t.baseQueue=a=i,r.pending=null}if(i=e.baseState,a===null)e.memoizedState=i;else{t=a.next;var s=l=null,c=null,u=t,f=!1;do{var d=u.lane&-536870913;if(d!==u.lane?(je&d)===d:(ya&d)===d){var h=u.revertLane;if(h===0)c!==null&&(c=c.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),d===Lo&&(f=!0);else if((ya&h)===h){u=u.next,h===Lo&&(f=!0);continue}else d={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(s=c=d,l=i):c=c.next=d,pe.lanes|=h,vi|=h;d=u.action,vl&&n(i,d),i=u.hasEagerState?u.eagerState:n(i,d)}else h={lane:d,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(s=c=h,l=i):c=c.next=h,pe.lanes|=d,vi|=d;u=u.next}while(u!==null&&u!==t);if(c===null?l=i:c.next=s,!Mn(i,e.memoizedState)&&(jt=!0,f&&(n=vo,n!==null)))throw n;e.memoizedState=i,e.baseState=l,e.baseQueue=c,r.lastRenderedState=i}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function py(e){var t=pt(),n=t.queue;if(n===null)throw Error(F(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,i=t.memoizedState;if(a!==null){n.pending=null;var l=a=a.next;do i=e(i,l.action),l=l.next;while(l!==a);Mn(i,t.memoizedState)||(jt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function C2(e,t,n){var r=pe,a=pt(),i=we;if(i){if(n===void 0)throw Error(F(407));n=n()}else n=t();var l=!Mn((De||a).memoizedState,n);if(l&&(a.memoizedState=n,jt=!0),a=a.queue,Bb(P2.bind(null,r,a,e),[e]),a.getSnapshot!==t||l||gt!==null&&gt.memoizedState.tag&1){if(r.flags|=2048,Bo(9,{destroy:void 0},T2.bind(null,r,a,n,t),null),ze===null)throw Error(F(349));i||ya&127||_2(r,t,n)}return n}function _2(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=pe.updateQueue,t===null?(t=Mp(),pe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function T2(e,t,n,r){t.value=n,t.getSnapshot=r,M2(t)&&$2(e)}function P2(e,t,n){return n(function(){M2(t)&&$2(e)})}function M2(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Mn(e,n)}catch{return!0}}function $2(e){var t=_l(e,2);t!==null&&hn(t,e,2)}function Kv(e){var t=Qt();if(typeof e=="function"){var n=e;if(e=n(),vl){Xa(!0);try{n()}finally{Xa(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:e},t}function R2(e,t,n,r){return e.baseState=n,zb(e,De,typeof r=="function"?r:va)}function Sk(e,t,n,r,a){if(kp(e))throw Error(F(485));if(e=t.action,e!==null){var i={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(l){i.listeners.push(l)}};ue.T!==null?n(!0):i.isTransition=!1,r(i),n=t.pending,n===null?(i.next=t.pending=i,k2(t,i)):(i.next=n.next,t.pending=n.next=i)}}function k2(e,t){var n=t.action,r=t.payload,a=e.state;if(t.isTransition){var i=ue.T,l={};ue.T=l;try{var s=n(a,r),c=ue.S;c!==null&&c(l,s),xj(e,t,s)}catch(u){Vv(e,t,u)}finally{i!==null&&l.types!==null&&(i.types=l.types),ue.T=i}}else try{i=n(a,r),xj(e,t,i)}catch(u){Vv(e,t,u)}}function xj(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(r){bj(e,t,r)},function(r){return Vv(e,t,r)}):bj(e,t,n)}function bj(e,t,n){t.status="fulfilled",t.value=n,D2(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,k2(e,n)))}function Vv(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=n,D2(t),t=t.next;while(t!==r)}e.action=null}function D2(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function L2(e,t){return t}function jj(e,t){if(we){var n=ze.formState;if(n!==null){e:{var r=pe;if(we){if(Xe){t:{for(var a=Xe,i=Yn;a.nodeType!==8;){if(!i){a=null;break t}if(a=Jn(a.nextSibling),a===null){a=null;break t}}i=a.data,a=i==="F!"||i==="F"?a:null}if(a){Xe=Jn(a.nextSibling),r=a.data==="F!";break e}}mi(r)}r=!1}r&&(t=n[0])}}return n=Qt(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:L2,lastRenderedState:t},n.queue=r,n=J2.bind(null,pe,r),r.dispatch=n,r=Kv(!1),i=Hb.bind(null,pe,!1,r.queue),r=Qt(),a={state:t,dispatch:null,action:e,pending:null},r.queue=a,n=Sk.bind(null,pe,a,i,n),a.dispatch=n,r.memoizedState=e,[t,n,!1]}function Sj(e){var t=pt();return z2(t,De,e)}function z2(e,t,n){if(t=zb(e,t,L2)[0],e=jd(va)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=ef(t)}catch(l){throw l===Es?Pp:l}else r=t;t=pt();var a=t.queue,i=a.dispatch;return n!==t.memoizedState&&(pe.flags|=2048,Bo(9,{destroy:void 0},wk.bind(null,a,n),null)),[r,i,e]}function wk(e,t){e.action=t}function wj(e){var t=pt(),n=De;if(n!==null)return z2(t,n,e);pt(),t=t.memoizedState,n=pt();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Bo(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=pe.updateQueue,t===null&&(t=Mp(),pe.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function B2(){return pt().memoizedState}function Sd(e,t,n,r){var a=Qt();pe.flags|=e,a.memoizedState=Bo(1|t,{destroy:void 0},n,r===void 0?null:r)}function Rp(e,t,n,r){var a=pt();r=r===void 0?null:r;var i=a.memoizedState.inst;De!==null&&r!==null&&Mb(r,De.memoizedState.deps)?a.memoizedState=Bo(t,i,n,r):(pe.flags|=e,a.memoizedState=Bo(1|t,i,n,r))}function Oj(e,t){Sd(8390656,8,e,t)}function Bb(e,t){Rp(2048,8,e,t)}function Ok(e){pe.flags|=4;var t=pe.updateQueue;if(t===null)t=Mp(),pe.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function I2(e){var t=pt().memoizedState;return Ok({ref:t,nextImpl:e}),function(){if(Ne&2)throw Error(F(440));return t.impl.apply(void 0,arguments)}}function U2(e,t){return Rp(4,2,e,t)}function q2(e,t){return Rp(4,4,e,t)}function H2(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function F2(e,t,n){n=n!=null?n.concat([e]):null,Rp(4,4,H2.bind(null,t,e),n)}function Ib(){}function G2(e,t){var n=pt();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Mb(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function K2(e,t){var n=pt();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Mb(t,r[1]))return r[0];if(r=e(),vl){Xa(!0);try{e()}finally{Xa(!1)}}return n.memoizedState=[r,t],r}function Ub(e,t,n){return n===void 0||ya&1073741824&&!(je&261930)?e.memoizedState=t:(e.memoizedState=n,e=RC(),pe.lanes|=e,vi|=e,n)}function V2(e,t,n,r){return Mn(n,t)?n:zo.current!==null?(e=Ub(e,n,r),Mn(e,t)||(jt=!0),e):!(ya&42)||ya&1073741824&&!(je&261930)?(jt=!0,e.memoizedState=n):(e=RC(),pe.lanes|=e,vi|=e,t)}function Y2(e,t,n,r,a){var i=Ee.p;Ee.p=i!==0&&8>i?i:8;var l=ue.T,s={};ue.T=s,Hb(e,!1,t,n);try{var c=a(),u=ue.S;if(u!==null&&u(s,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var f=xk(c,r);Tc(e,t,f,Tn(e))}else Tc(e,t,r,Tn(e))}catch(d){Tc(e,t,{then:function(){},status:"rejected",reason:d},Tn())}finally{Ee.p=i,l!==null&&s.types!==null&&(l.types=s.types),ue.T=l}}function Ak(){}function Yv(e,t,n,r){if(e.tag!==5)throw Error(F(476));var a=X2(e).queue;Y2(e,a,t,al,n===null?Ak:function(){return Q2(e),n(r)})}function X2(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:al,baseState:al,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:al},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Q2(e){var t=X2(e);t.next===null&&(t=e.alternate.memoizedState),Tc(e,t.next.queue,{},Tn())}function qb(){return qt(nu)}function W2(){return pt().memoizedState}function Z2(){return pt().memoizedState}function Nk(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Tn();e=ii(n);var r=li(t,e,n);r!==null&&(hn(r,t,n),Ec(r,t,n)),t={cache:Eb()},e.payload=t;return}t=t.return}}function Ek(e,t,n){var r=Tn();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},kp(e)?eC(t,n):(n=wb(e,t,n,r),n!==null&&(hn(n,e,r),tC(n,t,r)))}function J2(e,t,n){var r=Tn();Tc(e,t,n,r)}function Tc(e,t,n,r){var a={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(kp(e))eC(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,s=i(l,n);if(a.hasEagerState=!0,a.eagerState=s,Mn(s,l))return Tp(e,t,a,0),ze===null&&_p(),!1}catch{}finally{}if(n=wb(e,t,a,r),n!==null)return hn(n,e,r),tC(n,t,r),!0}return!1}function Hb(e,t,n,r){if(r={lane:2,revertLane:Zb(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},kp(e)){if(t)throw Error(F(479))}else t=wb(e,n,r,2),t!==null&&hn(t,e,2)}function kp(e){var t=e.alternate;return e===pe||t!==null&&t===pe}function eC(e,t){xo=Yd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function tC(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,IE(e,n)}}var Jc={readContext:qt,use:$p,useCallback:st,useContext:st,useEffect:st,useImperativeHandle:st,useLayoutEffect:st,useInsertionEffect:st,useMemo:st,useReducer:st,useRef:st,useState:st,useDebugValue:st,useDeferredValue:st,useTransition:st,useSyncExternalStore:st,useId:st,useHostTransitionStatus:st,useFormState:st,useActionState:st,useOptimistic:st,useMemoCache:st,useCacheRefresh:st};Jc.useEffectEvent=st;var nC={readContext:qt,use:$p,useCallback:function(e,t){return Qt().memoizedState=[e,t===void 0?null:t],e},useContext:qt,useEffect:Oj,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Sd(4194308,4,H2.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Sd(4194308,4,e,t)},useInsertionEffect:function(e,t){Sd(4,2,e,t)},useMemo:function(e,t){var n=Qt();t=t===void 0?null:t;var r=e();if(vl){Xa(!0);try{e()}finally{Xa(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Qt();if(n!==void 0){var a=n(t);if(vl){Xa(!0);try{n(t)}finally{Xa(!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=Ek.bind(null,pe,e),[r.memoizedState,e]},useRef:function(e){var t=Qt();return e={current:e},t.memoizedState=e},useState:function(e){e=Kv(e);var t=e.queue,n=J2.bind(null,pe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ib,useDeferredValue:function(e,t){var n=Qt();return Ub(n,e,t)},useTransition:function(){var e=Kv(!1);return e=Y2.bind(null,pe,e.queue,!0,!1),Qt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=pe,a=Qt();if(we){if(n===void 0)throw Error(F(407));n=n()}else{if(n=t(),ze===null)throw Error(F(349));je&127||_2(r,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,Oj(P2.bind(null,r,i,e),[e]),r.flags|=2048,Bo(9,{destroy:void 0},T2.bind(null,r,i,n,t),null),n},useId:function(){var e=Qt(),t=ze.identifierPrefix;if(we){var n=$r,r=Mr;n=(r&~(1<<32-_n(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Xd++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=bk++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:qb,useFormState:jj,useActionState:jj,useOptimistic:function(e){var t=Qt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Hb.bind(null,pe,!0,n),n.dispatch=t,[e,t]},useMemoCache:Lb,useCacheRefresh:function(){return Qt().memoizedState=Nk.bind(null,pe)},useEffectEvent:function(e){var t=Qt(),n={impl:e};return t.memoizedState=n,function(){if(Ne&2)throw Error(F(440));return n.impl.apply(void 0,arguments)}}},Fb={readContext:qt,use:$p,useCallback:G2,useContext:qt,useEffect:Bb,useImperativeHandle:F2,useInsertionEffect:U2,useLayoutEffect:q2,useMemo:K2,useReducer:jd,useRef:B2,useState:function(){return jd(va)},useDebugValue:Ib,useDeferredValue:function(e,t){var n=pt();return V2(n,De.memoizedState,e,t)},useTransition:function(){var e=jd(va)[0],t=pt().memoizedState;return[typeof e=="boolean"?e:ef(e),t]},useSyncExternalStore:C2,useId:W2,useHostTransitionStatus:qb,useFormState:Sj,useActionState:Sj,useOptimistic:function(e,t){var n=pt();return R2(n,De,e,t)},useMemoCache:Lb,useCacheRefresh:Z2};Fb.useEffectEvent=I2;var rC={readContext:qt,use:$p,useCallback:G2,useContext:qt,useEffect:Bb,useImperativeHandle:F2,useInsertionEffect:U2,useLayoutEffect:q2,useMemo:K2,useReducer:py,useRef:B2,useState:function(){return py(va)},useDebugValue:Ib,useDeferredValue:function(e,t){var n=pt();return De===null?Ub(n,e,t):V2(n,De.memoizedState,e,t)},useTransition:function(){var e=py(va)[0],t=pt().memoizedState;return[typeof e=="boolean"?e:ef(e),t]},useSyncExternalStore:C2,useId:W2,useHostTransitionStatus:qb,useFormState:wj,useActionState:wj,useOptimistic:function(e,t){var n=pt();return De!==null?R2(n,De,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Lb,useCacheRefresh:Z2};rC.useEffectEvent=I2;function my(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ze({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Xv={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Tn(),a=ii(r);a.payload=t,n!=null&&(a.callback=n),t=li(e,a,r),t!==null&&(hn(t,e,r),Ec(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Tn(),a=ii(r);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=li(e,a,r),t!==null&&(hn(t,e,r),Ec(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Tn(),r=ii(n);r.tag=2,t!=null&&(r.callback=t),t=li(e,r,n),t!==null&&(hn(t,e,n),Ec(t,e,n))}};function Aj(e,t,n,r,a,i,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,l):t.prototype&&t.prototype.isPureReactComponent?!Yc(n,r)||!Yc(a,i):!0}function Nj(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Xv.enqueueReplaceState(t,t.state,null)}function gl(e,t){var n=t;if("ref"in t){n={};for(var r in t)r!=="ref"&&(n[r]=t[r])}if(e=e.defaultProps){n===t&&(n=Ze({},n));for(var a in e)n[a]===void 0&&(n[a]=e[a])}return n}function aC(e){Ud(e)}function iC(e){console.error(e)}function lC(e){Ud(e)}function Qd(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function Ej(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function Qv(e,t,n){return n=ii(n),n.tag=3,n.payload={element:null},n.callback=function(){Qd(e,t)},n}function oC(e){return e=ii(e),e.tag=3,e}function sC(e,t,n,r){var a=n.type.getDerivedStateFromError;if(typeof a=="function"){var i=r.value;e.payload=function(){return a(i)},e.callback=function(){Ej(t,n,r)}}var l=n.stateNode;l!==null&&typeof l.componentDidCatch=="function"&&(e.callback=function(){Ej(t,n,r),typeof a!="function"&&(oi===null?oi=new Set([this]):oi.add(this));var s=r.stack;this.componentDidCatch(r.value,{componentStack:s!==null?s:""})})}function Ck(e,t,n,r,a){if(n.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=n.alternate,t!==null&&Ns(t,n,a,!0),n=$n.current,n!==null){switch(n.tag){case 31:case 13:return Zn===null?th():n.alternate===null&&ft===0&&(ft=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Gd?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Ny(e,r,a)),!1;case 22:return n.flags|=65536,r===Gd?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Ny(e,r,a)),!1}throw Error(F(435,n.tag))}return Ny(e,r,a),th(),!1}if(we)return t=$n.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Lv&&(e=Error(F(422),{cause:r}),Qc(Vn(e,n)))):(r!==Lv&&(t=Error(F(423),{cause:r}),Qc(Vn(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Vn(r,n),a=Qv(e.stateNode,r,a),hy(e,a),ft!==4&&(ft=2)),!1;var i=Error(F(520),{cause:r});if(i=Vn(i,n),$c===null?$c=[i]:$c.push(i),ft!==4&&(ft=2),t===null)return!0;r=Vn(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Qv(n.stateNode,r,e),hy(n,e),!1;case 1:if(t=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(oi===null||!oi.has(i))))return n.flags|=65536,a&=-a,n.lanes|=a,a=oC(a),sC(a,e,n,r),hy(n,a),!1}n=n.return}while(n!==null);return!1}var Gb=Error(F(461)),jt=!1;function zt(e,t,n,r){t.child=e===null?S2(t,null,n,r):yl(t,e.child,n,r)}function Cj(e,t,n,r,a){n=n.render;var i=t.ref;if("ref"in r){var l={};for(var s in r)s!=="ref"&&(l[s]=r[s])}else l=r;return ml(t),r=$b(e,t,n,l,i,a),s=Rb(),e!==null&&!jt?(kb(e,t,a),ga(e,t,a)):(we&&s&&Ab(t),t.flags|=1,zt(e,t,r,a),t.child)}function _j(e,t,n,r,a){if(e===null){var i=n.type;return typeof i=="function"&&!Ob(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,cC(e,t,i,r,a)):(e=xd(n.type,null,r,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Kb(e,a)){var l=i.memoizedProps;if(n=n.compare,n=n!==null?n:Yc,n(l,r)&&e.ref===t.ref)return ga(e,t,a)}return t.flags|=1,e=ua(i,r),e.ref=t.ref,e.return=t,t.child=e}function cC(e,t,n,r,a){if(e!==null){var i=e.memoizedProps;if(Yc(i,r)&&e.ref===t.ref)if(jt=!1,t.pendingProps=r=i,Kb(e,a))e.flags&131072&&(jt=!0);else return t.lanes=e.lanes,ga(e,t,a)}return Wv(e,t,n,r,a)}function uC(e,t,n,r){var a=r.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if(t.flags&128){if(i=i!==null?i.baseLanes|n:n,e!==null){for(r=t.child=e.child,a=0;r!==null;)a=a|r.lanes|r.childLanes,r=r.sibling;r=a&~i}else r=0,t.child=null;return Tj(e,t,i,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&bd(t,i!==null?i.cachePool:null),i!==null?gj(t,i):Fv(),A2(t);else return r=t.lanes=536870912,Tj(e,t,i!==null?i.baseLanes|n:n,n,r)}else i!==null?(bd(t,i.cachePool),gj(t,i),Ia(),t.memoizedState=null):(e!==null&&bd(t,null),Fv(),Ia());return zt(e,t,a,n),t.child}function xc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Tj(e,t,n,r,a){var i=Cb();return i=i===null?null:{parent:bt._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&bd(t,null),Fv(),A2(t),e!==null&&Ns(e,t,r,!0),t.childLanes=a,null}function wd(e,t){return t=Wd({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Pj(e,t,n){return yl(t,e.child,null,n),e=wd(t,t.pendingProps),e.flags|=2,wn(t),t.memoizedState=null,e}function _k(e,t,n){var r=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(we){if(r.mode==="hidden")return e=wd(t,r),t.lanes=536870912,xc(null,e);if(Gv(t),(e=Xe)?(e=n_(e,Yn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:pi!==null?{id:Mr,overflow:$r}:null,retryLane:536870912,hydrationErrors:null},n=m2(e),n.return=t,t.child=n,It=t,Xe=null)):e=null,e===null)throw mi(t);return t.lanes=536870912,null}return wd(t,r)}var i=e.memoizedState;if(i!==null){var l=i.dehydrated;if(Gv(t),a)if(t.flags&256)t.flags&=-257,t=Pj(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(F(558));else if(jt||Ns(e,t,n,!1),a=(n&e.childLanes)!==0,jt||a){if(r=ze,r!==null&&(l=UE(r,n),l!==0&&l!==i.retryLane))throw i.retryLane=l,_l(e,l),hn(r,e,l),Gb;th(),t=Pj(e,t,n)}else e=i.treeContext,Xe=Jn(l.nextSibling),It=t,we=!0,ai=null,Yn=!1,e!==null&&v2(t,e),t=wd(t,r),t.flags|=4096;return t}return e=ua(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Od(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(F(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Wv(e,t,n,r,a){return ml(t),n=$b(e,t,n,r,void 0,a),r=Rb(),e!==null&&!jt?(kb(e,t,a),ga(e,t,a)):(we&&r&&Ab(t),t.flags|=1,zt(e,t,n,a),t.child)}function Mj(e,t,n,r,a,i){return ml(t),t.updateQueue=null,n=E2(t,r,n,a),N2(e),r=Rb(),e!==null&&!jt?(kb(e,t,i),ga(e,t,i)):(we&&r&&Ab(t),t.flags|=1,zt(e,t,n,i),t.child)}function $j(e,t,n,r,a){if(ml(t),t.stateNode===null){var i=no,l=n.contextType;typeof l=="object"&&l!==null&&(i=qt(l)),i=new n(r,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Xv,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=r,i.state=t.memoizedState,i.refs={},Tb(t),l=n.contextType,i.context=typeof l=="object"&&l!==null?qt(l):no,i.state=t.memoizedState,l=n.getDerivedStateFromProps,typeof l=="function"&&(my(t,n,l,r),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(l=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),l!==i.state&&Xv.enqueueReplaceState(i,i.state,null),_c(t,r,i,a),Cc(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){i=t.stateNode;var s=t.memoizedProps,c=gl(n,s);i.props=c;var u=i.context,f=n.contextType;l=no,typeof f=="object"&&f!==null&&(l=qt(f));var d=n.getDerivedStateFromProps;f=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function",s=t.pendingProps!==s,f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s||u!==l)&&Nj(t,i,r,l),Da=!1;var h=t.memoizedState;i.state=h,_c(t,r,i,a),Cc(),u=t.memoizedState,s||h!==u||Da?(typeof d=="function"&&(my(t,n,d,r),u=t.memoizedState),(c=Da||Aj(t,n,c,r,h,u,l))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),i.props=r,i.state=u,i.context=l,r=c):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,qv(e,t),l=t.memoizedProps,f=gl(n,l),i.props=f,d=t.pendingProps,h=i.context,u=n.contextType,c=no,typeof u=="object"&&u!==null&&(c=qt(u)),s=n.getDerivedStateFromProps,(u=typeof s=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==d||h!==c)&&Nj(t,i,r,c),Da=!1,h=t.memoizedState,i.state=h,_c(t,r,i,a),Cc();var m=t.memoizedState;l!==d||h!==m||Da||e!==null&&e.dependencies!==null&&Fd(e.dependencies)?(typeof s=="function"&&(my(t,n,s,r),m=t.memoizedState),(f=Da||Aj(t,n,f,r,h,m,c)||e!==null&&e.dependencies!==null&&Fd(e.dependencies))?(u||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,m,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,m,c)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),i.props=r,i.state=m,i.context=c,r=f):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return i=r,Od(e,t),r=(t.flags&128)!==0,i||r?(i=t.stateNode,n=r&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&r?(t.child=yl(t,e.child,null,a),t.child=yl(t,null,n,a)):zt(e,t,n,a),t.memoizedState=i.state,e=t.child):e=ga(e,t,a),e}function Rj(e,t,n,r){return pl(),t.flags|=256,zt(e,t,n,r),t.child}var yy={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vy(e){return{baseLanes:e,cachePool:x2()}}function gy(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Nn),e}function fC(e,t,n){var r=t.pendingProps,a=!1,i=(t.flags&128)!==0,l;if((l=i)||(l=e!==null&&e.memoizedState===null?!1:(ht.current&2)!==0),l&&(a=!0,t.flags&=-129),l=(t.flags&32)!==0,t.flags&=-33,e===null){if(we){if(a?Ba(t):Ia(),(e=Xe)?(e=n_(e,Yn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:pi!==null?{id:Mr,overflow:$r}:null,retryLane:536870912,hydrationErrors:null},n=m2(e),n.return=t,t.child=n,It=t,Xe=null)):e=null,e===null)throw mi(t);return fg(e)?t.lanes=32:t.lanes=536870912,null}var s=r.children;return r=r.fallback,a?(Ia(),a=t.mode,s=Wd({mode:"hidden",children:s},a),r=il(r,a,n,null),s.return=t,r.return=t,s.sibling=r,t.child=s,r=t.child,r.memoizedState=vy(n),r.childLanes=gy(e,l,n),t.memoizedState=yy,xc(null,r)):(Ba(t),Zv(t,s))}var c=e.memoizedState;if(c!==null&&(s=c.dehydrated,s!==null)){if(i)t.flags&256?(Ba(t),t.flags&=-257,t=xy(e,t,n)):t.memoizedState!==null?(Ia(),t.child=e.child,t.flags|=128,t=null):(Ia(),s=r.fallback,a=t.mode,r=Wd({mode:"visible",children:r.children},a),s=il(s,a,n,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,yl(t,e.child,null,n),r=t.child,r.memoizedState=vy(n),r.childLanes=gy(e,l,n),t.memoizedState=yy,t=xc(null,r));else if(Ba(t),fg(s)){if(l=s.nextSibling&&s.nextSibling.dataset,l)var u=l.dgst;l=u,r=Error(F(419)),r.stack="",r.digest=l,Qc({value:r,source:null,stack:null}),t=xy(e,t,n)}else if(jt||Ns(e,t,n,!1),l=(n&e.childLanes)!==0,jt||l){if(l=ze,l!==null&&(r=UE(l,n),r!==0&&r!==c.retryLane))throw c.retryLane=r,_l(e,r),hn(l,e,r),Gb;ug(s)||th(),t=xy(e,t,n)}else ug(s)?(t.flags|=192,t.child=e.child,t=null):(e=c.treeContext,Xe=Jn(s.nextSibling),It=t,we=!0,ai=null,Yn=!1,e!==null&&v2(t,e),t=Zv(t,r.children),t.flags|=4096);return t}return a?(Ia(),s=r.fallback,a=t.mode,c=e.child,u=c.sibling,r=ua(c,{mode:"hidden",children:r.children}),r.subtreeFlags=c.subtreeFlags&65011712,u!==null?s=ua(u,s):(s=il(s,a,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,xc(null,r),r=t.child,s=e.child.memoizedState,s===null?s=vy(n):(a=s.cachePool,a!==null?(c=bt._currentValue,a=a.parent!==c?{parent:c,pool:c}:a):a=x2(),s={baseLanes:s.baseLanes|n,cachePool:a}),r.memoizedState=s,r.childLanes=gy(e,l,n),t.memoizedState=yy,xc(e.child,r)):(Ba(t),n=e.child,e=n.sibling,n=ua(n,{mode:"visible",children:r.children}),n.return=t,n.sibling=null,e!==null&&(l=t.deletions,l===null?(t.deletions=[e],t.flags|=16):l.push(e)),t.child=n,t.memoizedState=null,n)}function Zv(e,t){return t=Wd({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Wd(e,t){return e=On(22,e,null,t),e.lanes=0,e}function xy(e,t,n){return yl(t,e.child,null,n),e=Zv(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function kj(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Bv(e.return,t,n)}function by(e,t,n,r,a,i){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a,treeForkCount:i}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=a,l.treeForkCount=i)}function dC(e,t,n){var r=t.pendingProps,a=r.revealOrder,i=r.tail;r=r.children;var l=ht.current,s=(l&2)!==0;if(s?(l=l&1|2,t.flags|=128):l&=1,qe(ht,l),zt(e,t,r,n),r=we?Xc:0,!s&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&kj(e,n,t);else if(e.tag===19)kj(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&Vd(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),by(t,!1,a,n,i,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&Vd(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}by(t,!0,n,null,i,r);break;case"together":by(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function ga(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),vi|=t.lanes,!(n&t.childLanes))if(e!==null){if(Ns(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(F(153));if(t.child!==null){for(e=t.child,n=ua(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ua(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Kb(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&Fd(e)))}function Tk(e,t,n){switch(t.tag){case 3:Ld(t,t.stateNode.containerInfo),za(t,bt,e.memoizedState.cache),pl();break;case 27:case 5:Nv(t);break;case 4:Ld(t,t.stateNode.containerInfo);break;case 10:za(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Gv(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(Ba(t),t.flags|=128,null):n&t.child.childLanes?fC(e,t,n):(Ba(t),e=ga(e,t,n),e!==null?e.sibling:null);Ba(t);break;case 19:var a=(e.flags&128)!==0;if(r=(n&t.childLanes)!==0,r||(Ns(e,t,n,!1),r=(n&t.childLanes)!==0),a){if(r)return dC(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),qe(ht,ht.current),r)break;return null;case 22:return t.lanes=0,uC(e,t,n,t.pendingProps);case 24:za(t,bt,e.memoizedState.cache)}return ga(e,t,n)}function hC(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)jt=!0;else{if(!Kb(e,n)&&!(t.flags&128))return jt=!1,Tk(e,t,n);jt=!!(e.flags&131072)}else jt=!1,we&&t.flags&1048576&&y2(t,Xc,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=Ii(t.elementType),t.type=e,typeof e=="function")Ob(e)?(r=gl(e,r),t.tag=1,t=$j(null,t,e,r,n)):(t.tag=0,t=Wv(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===ub){t.tag=11,t=Cj(null,t,e,r,n);break e}else if(a===fb){t.tag=14,t=_j(null,t,e,r,n);break e}}throw t=Ov(e)||e,Error(F(306,t,""))}}return t;case 0:return Wv(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=gl(r,t.pendingProps),$j(e,t,r,a,n);case 3:e:{if(Ld(t,t.stateNode.containerInfo),e===null)throw Error(F(387));r=t.pendingProps;var i=t.memoizedState;a=i.element,qv(e,t),_c(t,r,null,n);var l=t.memoizedState;if(r=l.cache,za(t,bt,r),r!==i.cache&&Iv(t,[bt],n,!0),Cc(),r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=Rj(e,t,r,n);break e}else if(r!==a){a=Vn(Error(F(424)),t),Qc(a),t=Rj(e,t,r,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Xe=Jn(e.firstChild),It=t,we=!0,ai=null,Yn=!0,n=S2(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(pl(),r===a){t=ga(e,t,n);break e}zt(e,t,r,n)}t=t.child}return t;case 26:return Od(e,t),e===null?(n=tS(t.type,null,t.pendingProps,null))?t.memoizedState=n:we||(n=t.type,e=t.pendingProps,r=ih(ri.current).createElement(n),r[Bt]=t,r[mn]=e,Ht(r,n,e),Mt(r),t.stateNode=r):t.memoizedState=tS(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Nv(t),e===null&&we&&(r=t.stateNode=r_(t.type,t.pendingProps,ri.current),It=t,Yn=!0,a=Xe,Oi(t.type)?(dg=a,Xe=Jn(r.firstChild)):Xe=a),zt(e,t,t.pendingProps.children,n),Od(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&we&&((a=r=Xe)&&(r=lD(r,t.type,t.pendingProps,Yn),r!==null?(t.stateNode=r,It=t,Xe=Jn(r.firstChild),Yn=!1,a=!0):a=!1),a||mi(t)),Nv(t),a=t.type,i=t.pendingProps,l=e!==null?e.memoizedProps:null,r=i.children,sg(a,i)?r=null:l!==null&&sg(a,l)&&(t.flags|=32),t.memoizedState!==null&&(a=$b(e,t,jk,null,null,n),nu._currentValue=a),Od(e,t),zt(e,t,r,n),t.child;case 6:return e===null&&we&&((e=n=Xe)&&(n=oD(n,t.pendingProps,Yn),n!==null?(t.stateNode=n,It=t,Xe=null,e=!0):e=!1),e||mi(t)),null;case 13:return fC(e,t,n);case 4:return Ld(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=yl(t,null,r,n):zt(e,t,r,n),t.child;case 11:return Cj(e,t,t.type,t.pendingProps,n);case 7:return zt(e,t,t.pendingProps,n),t.child;case 8:return zt(e,t,t.pendingProps.children,n),t.child;case 12:return zt(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,za(t,t.type,r.value),zt(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ml(t),a=qt(a),r=r(a),t.flags|=1,zt(e,t,r,n),t.child;case 14:return _j(e,t,t.type,t.pendingProps,n);case 15:return cC(e,t,t.type,t.pendingProps,n);case 19:return dC(e,t,n);case 31:return _k(e,t,n);case 22:return uC(e,t,n,t.pendingProps);case 24:return ml(t),r=qt(bt),e===null?(a=Cb(),a===null&&(a=ze,i=Eb(),a.pooledCache=i,i.refCount++,i!==null&&(a.pooledCacheLanes|=n),a=i),t.memoizedState={parent:r,cache:a},Tb(t),za(t,bt,a)):(e.lanes&n&&(qv(e,t),_c(t,null,null,n),Cc()),a=e.memoizedState,i=t.memoizedState,a.parent!==r?(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),za(t,bt,r)):(r=i.cache,za(t,bt,r),r!==a.cache&&Iv(t,[bt],n,!0))),zt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(F(156,t.tag))}function Vr(e){e.flags|=4}function jy(e,t,n,r,a){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(LC())e.flags|=8192;else throw ol=Gd,_b}else e.flags&=-16777217}function Dj(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!l_(t))if(LC())e.flags|=8192;else throw ol=Gd,_b}function Lf(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?zE():536870912,e.lanes|=t,Io|=t)}function tc(e,t){if(!we)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ke(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags&65011712,r|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags,r|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Pk(e,t,n){var r=t.pendingProps;switch(Nb(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ke(t),null;case 1:return Ke(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),fa(bt),Ro(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ll(t)?Vr(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,dy())),Ke(t),null;case 26:var a=t.type,i=t.memoizedState;return e===null?(Vr(t),i!==null?(Ke(t),Dj(t,i)):(Ke(t),jy(t,a,null,r,n))):i?i!==e.memoizedState?(Vr(t),Ke(t),Dj(t,i)):(Ke(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&Vr(t),Ke(t),jy(t,a,e,r,n)),null;case 27:if(zd(t),n=ri.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Vr(t);else{if(!r){if(t.stateNode===null)throw Error(F(166));return Ke(t),null}e=Lr.current,Ll(t)?fj(t):(e=r_(a,r,n),t.stateNode=e,Vr(t))}return Ke(t),null;case 5:if(zd(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Vr(t);else{if(!r){if(t.stateNode===null)throw Error(F(166));return Ke(t),null}if(i=Lr.current,Ll(t))fj(t);else{var l=ih(ri.current);switch(i){case 1:i=l.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:i=l.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":i=l.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":i=l.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":i=l.createElement("div"),i.innerHTML="<script><\/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[Bt]=t,i[mn]=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(Ht(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&&Vr(t)}}return Ke(t),jy(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Vr(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(F(166));if(e=ri.current,Ll(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=It,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Bt]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||JC(e.nodeValue,n)),e||mi(t,!0)}else e=ih(e).createTextNode(r),e[Bt]=t,t.stateNode=e}return Ke(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ll(t),n!==null){if(e===null){if(!r)throw Error(F(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(F(557));e[Bt]=t}else pl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ke(t),e=!1}else n=dy(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(wn(t),t):(wn(t),null);if(t.flags&128)throw Error(F(558))}return Ke(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ll(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(F(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(F(317));a[Bt]=t}else pl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ke(t),a=!1}else a=dy(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(wn(t),t):(wn(t),null)}return wn(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),Lf(t,t.updateQueue),Ke(t),null);case 4:return Ro(),e===null&&Jb(t.stateNode.containerInfo),Ke(t),null;case 10:return fa(t.type),Ke(t),null;case 19:if(Rt(ht),r=t.memoizedState,r===null)return Ke(t),null;if(a=(t.flags&128)!==0,i=r.rendering,i===null)if(a)tc(r,!1);else{if(ft!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Vd(e),i!==null){for(t.flags|=128,tc(r,!1),e=i.updateQueue,t.updateQueue=e,Lf(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)p2(n,e),n=n.sibling;return qe(ht,ht.current&1|2),we&&ea(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&En()>Jd&&(t.flags|=128,a=!0,tc(r,!1),t.lanes=4194304)}else{if(!a)if(e=Vd(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Lf(t,e),tc(r,!0),r.tail===null&&r.tailMode==="hidden"&&!i.alternate&&!we)return Ke(t),null}else 2*En()-r.renderingStartTime>Jd&&n!==536870912&&(t.flags|=128,a=!0,tc(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=En(),e.sibling=null,n=ht.current,qe(ht,a?n&1|2:n&1),we&&ea(t,r.treeForkCount),e):(Ke(t),null);case 22:case 23:return wn(t),Pb(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Ke(t),t.subtreeFlags&6&&(t.flags|=8192)):Ke(t),n=t.updateQueue,n!==null&&Lf(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&&Rt(ll),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),fa(bt),Ke(t),null;case 25:return null;case 30:return null}throw Error(F(156,t.tag))}function Mk(e,t){switch(Nb(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return fa(bt),Ro(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return zd(t),null;case 31:if(t.memoizedState!==null){if(wn(t),t.alternate===null)throw Error(F(340));pl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(wn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(F(340));pl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Rt(ht),null;case 4:return Ro(),null;case 10:return fa(t.type),null;case 22:case 23:return wn(t),Pb(),e!==null&&Rt(ll),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return fa(bt),null;case 25:return null;default:return null}}function pC(e,t){switch(Nb(t),t.tag){case 3:fa(bt),Ro();break;case 26:case 27:case 5:zd(t);break;case 4:Ro();break;case 31:t.memoizedState!==null&&wn(t);break;case 13:wn(t);break;case 19:Rt(ht);break;case 10:fa(t.type);break;case 22:case 23:wn(t),Pb(),e!==null&&Rt(ll);break;case 24:fa(bt)}}function tf(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(s){Me(t,t.return,s)}}function yi(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,s=l.destroy;if(s!==void 0){l.destroy=void 0,a=t;var c=n,u=s;try{u()}catch(f){Me(a,c,f)}}}r=r.next}while(r!==i)}}catch(f){Me(t,t.return,f)}}function mC(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{O2(t,n)}catch(r){Me(e,e.return,r)}}}function yC(e,t,n){n.props=gl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Me(e,t,r)}}function Pc(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){Me(e,t,a)}}function Rr(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{r()}catch(a){Me(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){Me(e,t,a)}else n.current=null}function vC(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){Me(e,e.return,a)}}function Sy(e,t,n){try{var r=e.stateNode;eD(r,e.type,n,t),r[mn]=t}catch(a){Me(e,e.return,a)}}function gC(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Oi(e.type)||e.tag===4}function wy(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gC(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&&Oi(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 Jv(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=ia));else if(r!==4&&(r===27&&Oi(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Jv(e,t,n),e=e.sibling;e!==null;)Jv(e,t,n),e=e.sibling}function Zd(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&&Oi(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Zd(e,t,n),e=e.sibling;e!==null;)Zd(e,t,n),e=e.sibling}function xC(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);Ht(t,r,n),t[Bt]=e,t[mn]=n}catch(i){Me(e,e.return,i)}}var ra=!1,xt=!1,Oy=!1,Lj=typeof WeakSet=="function"?WeakSet:Set,Pt=null;function $k(e,t){if(e=e.containerInfo,lg=ch,e=l2(e),jb(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,s=-1,c=-1,u=0,f=0,d=e,h=null;t:for(;;){for(var m;d!==n||a!==0&&d.nodeType!==3||(s=l+a),d!==i||r!==0&&d.nodeType!==3||(c=l+r),d.nodeType===3&&(l+=d.nodeValue.length),(m=d.firstChild)!==null;)h=d,d=m;for(;;){if(d===e)break t;if(h===n&&++u===a&&(s=l),h===i&&++f===r&&(c=l),(m=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=m}n=s===-1||c===-1?null:{start:s,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(og={focusedElem:e,selectionRange:n},ch=!1,Pt=t;Pt!==null;)if(t=Pt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Pt=e;else for(;Pt!==null;){switch(t=Pt,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<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&i!==null){e=void 0,n=t,a=i.memoizedProps,i=i.memoizedState,r=n.stateNode;try{var j=gl(n.type,a);e=r.getSnapshotBeforeUpdate(j,i),r.__reactInternalSnapshotBeforeUpdate=e}catch(v){Me(n,n.return,v)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)cg(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":cg(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(F(163))}if(e=t.sibling,e!==null){e.return=t.return,Pt=e;break}Pt=t.return}}function bC(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Xr(e,n),r&4&&tf(5,n);break;case 1:if(Xr(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(l){Me(n,n.return,l)}else{var a=gl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(l){Me(n,n.return,l)}}r&64&&mC(n),r&512&&Pc(n,n.return);break;case 3:if(Xr(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{O2(e,t)}catch(l){Me(n,n.return,l)}}break;case 27:t===null&&r&4&&xC(n);case 26:case 5:Xr(e,n),t===null&&r&4&&vC(n),r&512&&Pc(n,n.return);break;case 12:Xr(e,n);break;case 31:Xr(e,n),r&4&&wC(e,n);break;case 13:Xr(e,n),r&4&&OC(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=qk.bind(null,n),sD(e,n))));break;case 22:if(r=n.memoizedState!==null||ra,!r){t=t!==null&&t.memoizedState!==null||xt,a=ra;var i=xt;ra=r,(xt=t)&&!i?Wr(e,n,(n.subtreeFlags&8772)!==0):Xr(e,n),ra=a,xt=i}break;case 30:break;default:Xr(e,n)}}function jC(e){var t=e.alternate;t!==null&&(e.alternate=null,jC(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&mb(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Je=null,un=!1;function Yr(e,t,n){for(n=n.child;n!==null;)SC(e,t,n),n=n.sibling}function SC(e,t,n){if(Cn&&typeof Cn.onCommitFiberUnmount=="function")try{Cn.onCommitFiberUnmount(Yu,n)}catch{}switch(n.tag){case 26:xt||Rr(n,t),Yr(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:xt||Rr(n,t);var r=Je,a=un;Oi(n.type)&&(Je=n.stateNode,un=!1),Yr(e,t,n),kc(n.stateNode),Je=r,un=a;break;case 5:xt||Rr(n,t);case 6:if(r=Je,a=un,Je=null,Yr(e,t,n),Je=r,un=a,Je!==null)if(un)try{(Je.nodeType===9?Je.body:Je.nodeName==="HTML"?Je.ownerDocument.body:Je).removeChild(n.stateNode)}catch(i){Me(n,t,i)}else try{Je.removeChild(n.stateNode)}catch(i){Me(n,t,i)}break;case 18:Je!==null&&(un?(e=Je,Qj(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Fo(e)):Qj(Je,n.stateNode));break;case 4:r=Je,a=un,Je=n.stateNode.containerInfo,un=!0,Yr(e,t,n),Je=r,un=a;break;case 0:case 11:case 14:case 15:yi(2,n,t),xt||yi(4,n,t),Yr(e,t,n);break;case 1:xt||(Rr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"&&yC(n,t,r)),Yr(e,t,n);break;case 21:Yr(e,t,n);break;case 22:xt=(r=xt)||n.memoizedState!==null,Yr(e,t,n),xt=r;break;default:Yr(e,t,n)}}function wC(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Fo(e)}catch(n){Me(t,t.return,n)}}}function OC(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Fo(e)}catch(n){Me(t,t.return,n)}}function Rk(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Lj),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Lj),t;default:throw Error(F(435,e.tag))}}function zf(e,t){var n=Rk(e);t.forEach(function(r){if(!n.has(r)){n.add(r);var a=Hk.bind(null,e,r);r.then(a,a)}})}function on(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],i=e,l=t,s=l;e:for(;s!==null;){switch(s.tag){case 27:if(Oi(s.type)){Je=s.stateNode,un=!1;break e}break;case 5:Je=s.stateNode,un=!1;break e;case 3:case 4:Je=s.stateNode.containerInfo,un=!0;break e}s=s.return}if(Je===null)throw Error(F(160));SC(i,l,a),Je=null,un=!1,i=a.alternate,i!==null&&(i.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)AC(t,e),t=t.sibling}var ur=null;function AC(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:on(t,e),sn(e),r&4&&(yi(3,e,e.return),tf(3,e),yi(5,e,e.return));break;case 1:on(t,e),sn(e),r&512&&(xt||n===null||Rr(n,n.return)),r&64&&ra&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=ur;if(on(t,e),sn(e),r&512&&(xt||n===null||Rr(n,n.return)),r&4){var i=n!==null?n.memoizedState:null;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){e:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;t:switch(r){case"title":i=a.getElementsByTagName("title")[0],(!i||i[Wu]||i[Bt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=a.createElement(r),a.head.insertBefore(i,a.querySelector("head > title"))),Ht(i,r,n),i[Bt]=e,Mt(i),r=i;break e;case"link":var l=rS("link","href",a).get(r+(n.href||""));if(l){for(var s=0;s<l.length;s++)if(i=l[s],i.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&i.getAttribute("rel")===(n.rel==null?null:n.rel)&&i.getAttribute("title")===(n.title==null?null:n.title)&&i.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){l.splice(s,1);break t}}i=a.createElement(r),Ht(i,r,n),a.head.appendChild(i);break;case"meta":if(l=rS("meta","content",a).get(r+(n.content||""))){for(s=0;s<l.length;s++)if(i=l[s],i.getAttribute("content")===(n.content==null?null:""+n.content)&&i.getAttribute("name")===(n.name==null?null:n.name)&&i.getAttribute("property")===(n.property==null?null:n.property)&&i.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&i.getAttribute("charset")===(n.charSet==null?null:n.charSet)){l.splice(s,1);break t}}i=a.createElement(r),Ht(i,r,n),a.head.appendChild(i);break;default:throw Error(F(468,r))}i[Bt]=e,Mt(i),r=i}e.stateNode=r}else aS(a,e.type,e.stateNode);else e.stateNode=nS(a,r,e.memoizedProps);else i!==r?(i===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):i.count--,r===null?aS(a,e.type,e.stateNode):nS(a,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Sy(e,e.memoizedProps,n.memoizedProps)}break;case 27:on(t,e),sn(e),r&512&&(xt||n===null||Rr(n,n.return)),n!==null&&r&4&&Sy(e,e.memoizedProps,n.memoizedProps);break;case 5:if(on(t,e),sn(e),r&512&&(xt||n===null||Rr(n,n.return)),e.flags&32){a=e.stateNode;try{Do(a,"")}catch(j){Me(e,e.return,j)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Sy(e,a,n!==null?n.memoizedProps:a)),r&1024&&(Oy=!0);break;case 6:if(on(t,e),sn(e),r&4){if(e.stateNode===null)throw Error(F(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(j){Me(e,e.return,j)}}break;case 3:if(Ed=null,a=ur,ur=lh(t.containerInfo),on(t,e),ur=a,sn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Fo(t.containerInfo)}catch(j){Me(e,e.return,j)}Oy&&(Oy=!1,NC(e));break;case 4:r=ur,ur=lh(e.stateNode.containerInfo),on(t,e),sn(e),ur=r;break;case 12:on(t,e),sn(e);break;case 31:on(t,e),sn(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,zf(e,r)));break;case 13:on(t,e),sn(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Dp=En()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,zf(e,r)));break;case 22:a=e.memoizedState!==null;var c=n!==null&&n.memoizedState!==null,u=ra,f=xt;if(ra=u||a,xt=f||c,on(t,e),xt=f,ra=u,sn(e),r&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||c||ra||xt||Ui(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){c=n=t;try{if(i=c.stateNode,a)l=i.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none";else{s=c.stateNode;var d=c.memoizedProps.style,h=d!=null&&d.hasOwnProperty("display")?d.display:null;s.style.display=h==null||typeof h=="boolean"?"":(""+h).trim()}}catch(j){Me(c,c.return,j)}}}else if(t.tag===6){if(n===null){c=t;try{c.stateNode.nodeValue=a?"":c.memoizedProps}catch(j){Me(c,c.return,j)}}}else if(t.tag===18){if(n===null){c=t;try{var m=c.stateNode;a?Wj(m,!0):Wj(c.stateNode,!1)}catch(j){Me(c,c.return,j)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,zf(e,n))));break;case 19:on(t,e),sn(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,zf(e,r)));break;case 30:break;case 21:break;default:on(t,e),sn(e)}}function sn(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(gC(r)){n=r;break}r=r.return}if(n==null)throw Error(F(160));switch(n.tag){case 27:var a=n.stateNode,i=wy(e);Zd(e,i,a);break;case 5:var l=n.stateNode;n.flags&32&&(Do(l,""),n.flags&=-33);var s=wy(e);Zd(e,s,l);break;case 3:case 4:var c=n.stateNode.containerInfo,u=wy(e);Jv(e,u,c);break;default:throw Error(F(161))}}catch(f){Me(e,e.return,f)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function NC(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;NC(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Xr(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)bC(e,t.alternate,t),t=t.sibling}function Ui(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:yi(4,t,t.return),Ui(t);break;case 1:Rr(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&yC(t,t.return,n),Ui(t);break;case 27:kc(t.stateNode);case 26:case 5:Rr(t,t.return),Ui(t);break;case 22:t.memoizedState===null&&Ui(t);break;case 30:Ui(t);break;default:Ui(t)}e=e.sibling}}function Wr(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,a=e,i=t,l=i.flags;switch(i.tag){case 0:case 11:case 15:Wr(a,i,n),tf(4,i);break;case 1:if(Wr(a,i,n),r=i,a=r.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(u){Me(r,r.return,u)}if(r=i,a=r.updateQueue,a!==null){var s=r.stateNode;try{var c=a.shared.hiddenCallbacks;if(c!==null)for(a.shared.hiddenCallbacks=null,a=0;a<c.length;a++)w2(c[a],s)}catch(u){Me(r,r.return,u)}}n&&l&64&&mC(i),Pc(i,i.return);break;case 27:xC(i);case 26:case 5:Wr(a,i,n),n&&r===null&&l&4&&vC(i),Pc(i,i.return);break;case 12:Wr(a,i,n);break;case 31:Wr(a,i,n),n&&l&4&&wC(a,i);break;case 13:Wr(a,i,n),n&&l&4&&OC(a,i);break;case 22:i.memoizedState===null&&Wr(a,i,n),Pc(i,i.return);break;case 30:break;default:Wr(a,i,n)}t=t.sibling}}function Vb(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Ju(n))}function Yb(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ju(e))}function lr(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)EC(e,t,n,r),t=t.sibling}function EC(e,t,n,r){var a=t.flags;switch(t.tag){case 0:case 11:case 15:lr(e,t,n,r),a&2048&&tf(9,t);break;case 1:lr(e,t,n,r);break;case 3:lr(e,t,n,r),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ju(e)));break;case 12:if(a&2048){lr(e,t,n,r),e=t.stateNode;try{var i=t.memoizedProps,l=i.id,s=i.onPostCommit;typeof s=="function"&&s(l,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(c){Me(t,t.return,c)}}else lr(e,t,n,r);break;case 31:lr(e,t,n,r);break;case 13:lr(e,t,n,r);break;case 23:break;case 22:i=t.stateNode,l=t.alternate,t.memoizedState!==null?i._visibility&2?lr(e,t,n,r):Mc(e,t):i._visibility&2?lr(e,t,n,r):(i._visibility|=2,Kl(e,t,n,r,(t.subtreeFlags&10256)!==0||!1)),a&2048&&Vb(l,t);break;case 24:lr(e,t,n,r),a&2048&&Yb(t.alternate,t);break;default:lr(e,t,n,r)}}function Kl(e,t,n,r,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,l=t,s=n,c=r,u=l.flags;switch(l.tag){case 0:case 11:case 15:Kl(i,l,s,c,a),tf(8,l);break;case 23:break;case 22:var f=l.stateNode;l.memoizedState!==null?f._visibility&2?Kl(i,l,s,c,a):Mc(i,l):(f._visibility|=2,Kl(i,l,s,c,a)),a&&u&2048&&Vb(l.alternate,l);break;case 24:Kl(i,l,s,c,a),a&&u&2048&&Yb(l.alternate,l);break;default:Kl(i,l,s,c,a)}t=t.sibling}}function Mc(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,a=r.flags;switch(r.tag){case 22:Mc(n,r),a&2048&&Vb(r.alternate,r);break;case 24:Mc(n,r),a&2048&&Yb(r.alternate,r);break;default:Mc(n,r)}t=t.sibling}}var bc=8192;function zl(e,t,n){if(e.subtreeFlags&bc)for(e=e.child;e!==null;)CC(e,t,n),e=e.sibling}function CC(e,t,n){switch(e.tag){case 26:zl(e,t,n),e.flags&bc&&e.memoizedState!==null&&bD(n,ur,e.memoizedState,e.memoizedProps);break;case 5:zl(e,t,n);break;case 3:case 4:var r=ur;ur=lh(e.stateNode.containerInfo),zl(e,t,n),ur=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=bc,bc=16777216,zl(e,t,n),bc=r):zl(e,t,n));break;default:zl(e,t,n)}}function _C(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function nc(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Pt=r,PC(r,e)}_C(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)TC(e),e=e.sibling}function TC(e){switch(e.tag){case 0:case 11:case 15:nc(e),e.flags&2048&&yi(9,e,e.return);break;case 3:nc(e);break;case 12:nc(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ad(e)):nc(e);break;default:nc(e)}}function Ad(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Pt=r,PC(r,e)}_C(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:yi(8,t,t.return),Ad(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ad(t));break;default:Ad(t)}e=e.sibling}}function PC(e,t){for(;Pt!==null;){var n=Pt;switch(n.tag){case 0:case 11:case 15:yi(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Ju(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,Pt=r;else e:for(n=e;Pt!==null;){r=Pt;var a=r.sibling,i=r.return;if(jC(r),r===n){Pt=null;break e}if(a!==null){a.return=i,Pt=a;break e}Pt=i}}}var kk={getCacheForType:function(e){var t=qt(bt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return qt(bt).controller.signal}},Dk=typeof WeakMap=="function"?WeakMap:Map,Ne=0,ze=null,ge=null,je=0,Pe=0,bn=null,Wa=!1,Cs=!1,Xb=!1,xa=0,ft=0,vi=0,sl=0,Qb=0,Nn=0,Io=0,$c=null,fn=null,eg=!1,Dp=0,MC=0,Jd=1/0,eh=null,oi=null,At=0,si=null,Uo=null,da=0,tg=0,ng=null,$C=null,Rc=0,rg=null;function Tn(){return Ne&2&&je!==0?je&-je:ue.T!==null?Zb():qE()}function RC(){if(Nn===0)if(!(je&536870912)||we){var e=Tf;Tf<<=1,!(Tf&3932160)&&(Tf=262144),Nn=e}else Nn=536870912;return e=$n.current,e!==null&&(e.flags|=32),Nn}function hn(e,t,n){(e===ze&&(Pe===2||Pe===9)||e.cancelPendingCommit!==null)&&(qo(e,0),Za(e,je,Nn,!1)),Qu(e,n),(!(Ne&2)||e!==ze)&&(e===ze&&(!(Ne&2)&&(sl|=n),ft===4&&Za(e,je,Nn,!1)),qr(e))}function kC(e,t,n){if(Ne&6)throw Error(F(327));var r=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Xu(e,t),a=r?Bk(e,t):Ay(e,t,!0),i=r;do{if(a===0){Cs&&!r&&Za(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!Lk(n)){a=Ay(e,t,!1),i=!1;continue}if(a===2){if(i=t,e.errorRecoveryDisabledLanes&i)var l=0;else l=e.pendingLanes&-536870913,l=l!==0?l:l&536870912?536870912:0;if(l!==0){t=l;e:{var s=e;a=$c;var c=s.current.memoizedState.isDehydrated;if(c&&(qo(s,l).flags|=256),l=Ay(s,l,!1),l!==2){if(Xb&&!c){s.errorRecoveryDisabledLanes|=i,sl|=i,a=4;break e}i=fn,fn=a,i!==null&&(fn===null?fn=i:fn.push.apply(fn,i))}a=l}if(i=!1,a!==2)continue}}if(a===1){qo(e,0),Za(e,t,0,!0);break}e:{switch(r=e,i=a,i){case 0:case 1:throw Error(F(345));case 4:if((t&4194048)!==t)break;case 6:Za(r,t,Nn,!Wa);break e;case 2:fn=null;break;case 3:case 5:break;default:throw Error(F(329))}if((t&62914560)===t&&(a=Dp+300-En(),10<a)){if(Za(r,t,Nn,!Wa),Ap(r,0,!0)!==0)break e;da=t,r.timeoutHandle=t_(zj.bind(null,r,n,fn,eh,eg,t,Nn,sl,Io,Wa,i,"Throttled",-0,0),a);break e}zj(r,n,fn,eh,eg,t,Nn,sl,Io,Wa,i,null,-0,0)}}break}while(!0);qr(e)}function zj(e,t,n,r,a,i,l,s,c,u,f,d,h,m){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)===16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ia},CC(t,i,d);var j=(i&62914560)===i?Dp-En():(i&4194048)===i?MC-En():0;if(j=jD(d,j),j!==null){da=i,e.cancelPendingCommit=j(Ij.bind(null,e,t,i,n,r,a,l,s,c,f,d,null,h,m)),Za(e,i,l,!u);return}}Ij(e,t,i,n,r,a,l,s,c)}function Lk(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var a=n[r],i=a.getSnapshot;a=a.value;try{if(!Mn(i(),a))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Za(e,t,n,r){t&=~Qb,t&=~sl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var a=t;0<a;){var i=31-_n(a),l=1<<i;r[i]=-1,a&=~l}n!==0&&BE(e,n,t)}function Lp(){return Ne&6?!0:(nf(0),!1)}function Wb(){if(ge!==null){if(Pe===0)var e=ge.return;else e=ge,la=Tl=null,Db(e),go=null,Wc=0,e=ge;for(;e!==null;)pC(e.alternate,e),e=e.return;ge=null}}function qo(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,rD(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),da=0,Wb(),ze=e,ge=n=ua(e.current,null),je=t,Pe=0,bn=null,Wa=!1,Cs=Xu(e,t),Xb=!1,Io=Nn=Qb=sl=vi=ft=0,fn=$c=null,eg=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var a=31-_n(r),i=1<<a;t|=e[a],r&=~i}return xa=t,_p(),n}function DC(e,t){pe=null,ue.H=Jc,t===Es||t===Pp?(t=yj(),Pe=3):t===_b?(t=yj(),Pe=4):Pe=t===Gb?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,bn=t,ge===null&&(ft=1,Qd(e,Vn(t,e.current)))}function LC(){var e=$n.current;return e===null?!0:(je&4194048)===je?Zn===null:(je&62914560)===je||je&536870912?e===Zn:!1}function zC(){var e=ue.H;return ue.H=Jc,e===null?Jc:e}function BC(){var e=ue.A;return ue.A=kk,e}function th(){ft=4,Wa||(je&4194048)!==je&&$n.current!==null||(Cs=!0),!(vi&134217727)&&!(sl&134217727)||ze===null||Za(ze,je,Nn,!1)}function Ay(e,t,n){var r=Ne;Ne|=2;var a=zC(),i=BC();(ze!==e||je!==t)&&(eh=null,qo(e,t)),t=!1;var l=ft;e:do try{if(Pe!==0&&ge!==null){var s=ge,c=bn;switch(Pe){case 8:Wb(),l=6;break e;case 3:case 2:case 9:case 6:$n.current===null&&(t=!0);var u=Pe;if(Pe=0,bn=null,io(e,s,c,u),n&&Cs){l=0;break e}break;default:u=Pe,Pe=0,bn=null,io(e,s,c,u)}}zk(),l=ft;break}catch(f){DC(e,f)}while(!0);return t&&e.shellSuspendCounter++,la=Tl=null,Ne=r,ue.H=a,ue.A=i,ge===null&&(ze=null,je=0,_p()),l}function zk(){for(;ge!==null;)IC(ge)}function Bk(e,t){var n=Ne;Ne|=2;var r=zC(),a=BC();ze!==e||je!==t?(eh=null,Jd=En()+500,qo(e,t)):Cs=Xu(e,t);e:do try{if(Pe!==0&&ge!==null){t=ge;var i=bn;t:switch(Pe){case 1:Pe=0,bn=null,io(e,t,i,1);break;case 2:case 9:if(mj(i)){Pe=0,bn=null,Bj(t);break}t=function(){Pe!==2&&Pe!==9||ze!==e||(Pe=7),qr(e)},i.then(t,t);break e;case 3:Pe=7;break e;case 4:Pe=5;break e;case 7:mj(i)?(Pe=0,bn=null,Bj(t)):(Pe=0,bn=null,io(e,t,i,7));break;case 5:var l=null;switch(ge.tag){case 26:l=ge.memoizedState;case 5:case 27:var s=ge;if(l?l_(l):s.stateNode.complete){Pe=0,bn=null;var c=s.sibling;if(c!==null)ge=c;else{var u=s.return;u!==null?(ge=u,zp(u)):ge=null}break t}}Pe=0,bn=null,io(e,t,i,5);break;case 6:Pe=0,bn=null,io(e,t,i,6);break;case 8:Wb(),ft=6;break e;default:throw Error(F(462))}}Ik();break}catch(f){DC(e,f)}while(!0);return la=Tl=null,ue.H=r,ue.A=a,Ne=n,ge!==null?0:(ze=null,je=0,_p(),ft)}function Ik(){for(;ge!==null&&!cR();)IC(ge)}function IC(e){var t=hC(e.alternate,e,xa);e.memoizedProps=e.pendingProps,t===null?zp(e):ge=t}function Bj(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Mj(n,t,t.pendingProps,t.type,void 0,je);break;case 11:t=Mj(n,t,t.pendingProps,t.type.render,t.ref,je);break;case 5:Db(t);default:pC(n,t),t=ge=p2(t,xa),t=hC(n,t,xa)}e.memoizedProps=e.pendingProps,t===null?zp(e):ge=t}function io(e,t,n,r){la=Tl=null,Db(t),go=null,Wc=0;var a=t.return;try{if(Ck(e,a,t,n,je)){ft=1,Qd(e,Vn(n,e.current)),ge=null;return}}catch(i){if(a!==null)throw ge=a,i;ft=1,Qd(e,Vn(n,e.current)),ge=null;return}t.flags&32768?(we||r===1?e=!0:Cs||je&536870912?e=!1:(Wa=e=!0,(r===2||r===9||r===3||r===6)&&(r=$n.current,r!==null&&r.tag===13&&(r.flags|=16384))),UC(t,e)):zp(t)}function zp(e){var t=e;do{if(t.flags&32768){UC(t,Wa);return}e=t.return;var n=Pk(t.alternate,t,xa);if(n!==null){ge=n;return}if(t=t.sibling,t!==null){ge=t;return}ge=t=e}while(t!==null);ft===0&&(ft=5)}function UC(e,t){do{var n=Mk(e.alternate,e);if(n!==null){n.flags&=32767,ge=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){ge=e;return}ge=e=n}while(e!==null);ft=6,ge=null}function Ij(e,t,n,r,a,i,l,s,c){e.cancelPendingCommit=null;do Bp();while(At!==0);if(Ne&6)throw Error(F(327));if(t!==null){if(t===e.current)throw Error(F(177));if(i=t.lanes|t.childLanes,i|=Sb,xR(e,n,i,l,s,c),e===ze&&(ge=ze=null,je=0),Uo=t,si=e,da=n,tg=i,ng=a,$C=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Fk(Bd,function(){return KC(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,t.subtreeFlags&13878||r){r=ue.T,ue.T=null,a=Ee.p,Ee.p=2,l=Ne,Ne|=4;try{$k(e,t,n)}finally{Ne=l,Ee.p=a,ue.T=r}}At=1,qC(),HC(),FC()}}function qC(){if(At===1){At=0;var e=si,t=Uo,n=(t.flags&13878)!==0;if(t.subtreeFlags&13878||n){n=ue.T,ue.T=null;var r=Ee.p;Ee.p=2;var a=Ne;Ne|=4;try{AC(t,e);var i=og,l=l2(e.containerInfo),s=i.focusedElem,c=i.selectionRange;if(l!==s&&s&&s.ownerDocument&&i2(s.ownerDocument.documentElement,s)){if(c!==null&&jb(s)){var u=c.start,f=c.end;if(f===void 0&&(f=u),"selectionStart"in s)s.selectionStart=u,s.selectionEnd=Math.min(f,s.value.length);else{var d=s.ownerDocument||document,h=d&&d.defaultView||window;if(h.getSelection){var m=h.getSelection(),j=s.textContent.length,v=Math.min(c.start,j),p=c.end===void 0?v:Math.min(c.end,j);!m.extend&&v>p&&(l=p,p=v,v=l);var y=sj(s,v),g=sj(s,p);if(y&&g&&(m.rangeCount!==1||m.anchorNode!==y.node||m.anchorOffset!==y.offset||m.focusNode!==g.node||m.focusOffset!==g.offset)){var b=d.createRange();b.setStart(y.node,y.offset),m.removeAllRanges(),v>p?(m.addRange(b),m.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),m.addRange(b))}}}}for(d=[],m=s;m=m.parentNode;)m.nodeType===1&&d.push({element:m,left:m.scrollLeft,top:m.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<d.length;s++){var x=d[s];x.element.scrollLeft=x.left,x.element.scrollTop=x.top}}ch=!!lg,og=lg=null}finally{Ne=a,Ee.p=r,ue.T=n}}e.current=t,At=2}}function HC(){if(At===2){At=0;var e=si,t=Uo,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=ue.T,ue.T=null;var r=Ee.p;Ee.p=2;var a=Ne;Ne|=4;try{bC(e,t.alternate,t)}finally{Ne=a,Ee.p=r,ue.T=n}}At=3}}function FC(){if(At===4||At===3){At=0,uR();var e=si,t=Uo,n=da,r=$C;t.subtreeFlags&10256||t.flags&10256?At=5:(At=0,Uo=si=null,GC(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(oi=null),pb(n),t=t.stateNode,Cn&&typeof Cn.onCommitFiberRoot=="function")try{Cn.onCommitFiberRoot(Yu,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=ue.T,a=Ee.p,Ee.p=2,ue.T=null;try{for(var i=e.onRecoverableError,l=0;l<r.length;l++){var s=r[l];i(s.value,{componentStack:s.stack})}}finally{ue.T=t,Ee.p=a}}da&3&&Bp(),qr(e),a=e.pendingLanes,n&261930&&a&42?e===rg?Rc++:(Rc=0,rg=e):Rc=0,nf(0)}}function GC(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ju(t)))}function Bp(){return qC(),HC(),FC(),KC()}function KC(){if(At!==5)return!1;var e=si,t=tg;tg=0;var n=pb(da),r=ue.T,a=Ee.p;try{Ee.p=32>n?32:n,ue.T=null,n=ng,ng=null;var i=si,l=da;if(At=0,Uo=si=null,da=0,Ne&6)throw Error(F(331));var s=Ne;if(Ne|=4,TC(i.current),EC(i,i.current,l,n),Ne=s,nf(0,!1),Cn&&typeof Cn.onPostCommitFiberRoot=="function")try{Cn.onPostCommitFiberRoot(Yu,i)}catch{}return!0}finally{Ee.p=a,ue.T=r,GC(e,t)}}function Uj(e,t,n){t=Vn(n,t),t=Qv(e.stateNode,t,2),e=li(e,t,2),e!==null&&(Qu(e,2),qr(e))}function Me(e,t,n){if(e.tag===3)Uj(e,e,n);else for(;t!==null;){if(t.tag===3){Uj(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(oi===null||!oi.has(r))){e=Vn(n,e),n=oC(2),r=li(t,n,2),r!==null&&(sC(n,r,t,e),Qu(r,2),qr(r));break}}t=t.return}}function Ny(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Dk;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)||(Xb=!0,a.add(n),e=Uk.bind(null,e,t,n),t.then(e,e))}function Uk(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ze===e&&(je&n)===n&&(ft===4||ft===3&&(je&62914560)===je&&300>En()-Dp?!(Ne&2)&&qo(e,0):Qb|=n,Io===je&&(Io=0)),qr(e)}function VC(e,t){t===0&&(t=zE()),e=_l(e,t),e!==null&&(Qu(e,t),qr(e))}function qk(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),VC(e,n)}function Hk(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(F(314))}r!==null&&r.delete(t),VC(e,n)}function Fk(e,t){return db(e,t)}var nh=null,Vl=null,ag=!1,rh=!1,Ey=!1,Ja=0;function qr(e){e!==Vl&&e.next===null&&(Vl===null?nh=Vl=e:Vl=Vl.next=e),rh=!0,ag||(ag=!0,Kk())}function nf(e,t){if(!Ey&&rh){Ey=!0;do for(var n=!1,r=nh;r!==null;){if(e!==0){var a=r.pendingLanes;if(a===0)var i=0;else{var l=r.suspendedLanes,s=r.pingedLanes;i=(1<<31-_n(42|e)+1)-1,i&=a&~(l&~s),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,qj(r,i))}else i=je,i=Ap(r,r===ze?i:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(i&3)||Xu(r,i)||(n=!0,qj(r,i));r=r.next}while(n);Ey=!1}}function Gk(){YC()}function YC(){rh=ag=!1;var e=0;Ja!==0&&nD()&&(e=Ja);for(var t=En(),n=null,r=nh;r!==null;){var a=r.next,i=XC(r,t);i===0?(r.next=null,n===null?nh=a:n.next=a,a===null&&(Vl=n)):(n=r,(e!==0||i&3)&&(rh=!0)),r=a}At!==0&&At!==5||nf(e),Ja!==0&&(Ja=0)}function XC(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var l=31-_n(i),s=1<<l,c=a[l];c===-1?(!(s&n)||s&r)&&(a[l]=gR(s,t)):c<=t&&(e.expiredLanes|=s),i&=~s}if(t=ze,n=je,n=Ap(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Pe===2||Pe===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&ty(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Xu(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&ty(r),pb(n)){case 2:case 8:n=DE;break;case 32:n=Bd;break;case 268435456:n=LE;break;default:n=Bd}return r=QC.bind(null,e),n=db(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&ty(r),e.callbackPriority=2,e.callbackNode=null,2}function QC(e,t){if(At!==0&&At!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Bp()&&e.callbackNode!==n)return null;var r=je;return r=Ap(e,e===ze?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(kC(e,r,t),XC(e,En()),e.callbackNode!=null&&e.callbackNode===n?QC.bind(null,e):null)}function qj(e,t){if(Bp())return null;kC(e,t,!0)}function Kk(){aD(function(){Ne&6?db(kE,Gk):YC()})}function Zb(){if(Ja===0){var e=Lo;e===0&&(e=_f,_f<<=1,!(_f&261888)&&(_f=256)),Ja=e}return Ja}function Hj(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:yd(""+e)}function Fj(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Vk(e,t,n,r,a){if(t==="submit"&&n&&n.stateNode===a){var i=Hj((a[mn]||null).action),l=r.submitter;l&&(t=(t=l[mn]||null)?Hj(t.formAction):l.getAttribute("formAction"),t!==null&&(i=t,l=null));var s=new Np("action","action",null,r,a);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Ja!==0){var c=l?Fj(a,l):new FormData(a);Yv(n,{pending:!0,data:c,method:a.method,action:i},null,c)}}else typeof i=="function"&&(s.preventDefault(),c=l?Fj(a,l):new FormData(a),Yv(n,{pending:!0,data:c,method:a.method,action:i},i,c))},currentTarget:a}]})}}for(var Cy=0;Cy<Dv.length;Cy++){var _y=Dv[Cy],Yk=_y.toLowerCase(),Xk=_y[0].toUpperCase()+_y.slice(1);jr(Yk,"on"+Xk)}jr(s2,"onAnimationEnd");jr(c2,"onAnimationIteration");jr(u2,"onAnimationStart");jr("dblclick","onDoubleClick");jr("focusin","onFocus");jr("focusout","onBlur");jr(fk,"onTransitionRun");jr(dk,"onTransitionStart");jr(hk,"onTransitionCancel");jr(f2,"onTransitionEnd");ko("onMouseEnter",["mouseout","mouseover"]);ko("onMouseLeave",["mouseout","mouseover"]);ko("onPointerEnter",["pointerout","pointerover"]);ko("onPointerLeave",["pointerout","pointerover"]);Nl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Nl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Nl("onBeforeInput",["compositionend","keypress","textInput","paste"]);Nl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Nl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Nl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var eu="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Qk=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(eu));function WC(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var l=r.length-1;0<=l;l--){var s=r[l],c=s.instance,u=s.currentTarget;if(s=s.listener,c!==i&&a.isPropagationStopped())break e;i=s,a.currentTarget=u;try{i(a)}catch(f){Ud(f)}a.currentTarget=null,i=c}else for(l=0;l<r.length;l++){if(s=r[l],c=s.instance,u=s.currentTarget,s=s.listener,c!==i&&a.isPropagationStopped())break e;i=s,a.currentTarget=u;try{i(a)}catch(f){Ud(f)}a.currentTarget=null,i=c}}}}function ve(e,t){var n=t[Cv];n===void 0&&(n=t[Cv]=new Set);var r=e+"__bubble";n.has(r)||(ZC(t,e,2,!1),n.add(r))}function Ty(e,t,n){var r=0;t&&(r|=4),ZC(n,e,r,t)}var Bf="_reactListening"+Math.random().toString(36).slice(2);function Jb(e){if(!e[Bf]){e[Bf]=!0,HE.forEach(function(n){n!=="selectionchange"&&(Qk.has(n)||Ty(n,!1,e),Ty(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Bf]||(t[Bf]=!0,Ty("selectionchange",!1,t))}}function ZC(e,t,n,r){switch(f_(t)){case 2:var a=OD;break;case 8:a=AD;break;default:a=r0}n=a.bind(null,t,n,e),a=void 0,!$v||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),r?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function Py(e,t,n,r,a){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var l=r.tag;if(l===3||l===4){var s=r.stateNode.containerInfo;if(s===a)break;if(l===4)for(l=r.return;l!==null;){var c=l.tag;if((c===3||c===4)&&l.stateNode.containerInfo===a)return;l=l.return}for(;s!==null;){if(l=Ql(s),l===null)return;if(c=l.tag,c===5||c===6||c===26||c===27){r=i=l;continue e}s=s.parentNode}}r=r.return}WE(function(){var u=i,f=vb(n),d=[];e:{var h=d2.get(e);if(h!==void 0){var m=Np,j=e;switch(e){case"keypress":if(gd(n)===0)break e;case"keydown":case"keyup":m=HR;break;case"focusin":j="focus",m=ly;break;case"focusout":j="blur",m=ly;break;case"beforeblur":case"afterblur":m=ly;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=Z1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=PR;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=KR;break;case s2:case c2:case u2:m=RR;break;case f2:m=YR;break;case"scroll":case"scrollend":m=_R;break;case"wheel":m=QR;break;case"copy":case"cut":case"paste":m=DR;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=ej;break;case"toggle":case"beforetoggle":m=ZR}var v=(t&4)!==0,p=!v&&(e==="scroll"||e==="scrollend"),y=v?h!==null?h+"Capture":null:h;v=[];for(var g=u,b;g!==null;){var x=g;if(b=x.stateNode,x=x.tag,x!==5&&x!==26&&x!==27||b===null||y===null||(x=Kc(g,y),x!=null&&v.push(tu(g,x,b))),p)break;g=g.return}0<v.length&&(h=new m(h,j,null,n,f),d.push({event:h,listeners:v}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",h&&n!==Mv&&(j=n.relatedTarget||n.fromElement)&&(Ql(j)||j[Os]))break e;if((m||h)&&(h=f.window===f?f:(h=f.ownerDocument)?h.defaultView||h.parentWindow:window,m?(j=n.relatedTarget||n.toElement,m=u,j=j?Ql(j):null,j!==null&&(p=Vu(j),v=j.tag,j!==p||v!==5&&v!==27&&v!==6)&&(j=null)):(m=null,j=u),m!==j)){if(v=Z1,x="onMouseLeave",y="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(v=ej,x="onPointerLeave",y="onPointerEnter",g="pointer"),p=m==null?h:gc(m),b=j==null?h:gc(j),h=new v(x,g+"leave",m,n,f),h.target=p,h.relatedTarget=b,x=null,Ql(f)===u&&(v=new v(y,g+"enter",j,n,f),v.target=b,v.relatedTarget=p,x=v),p=x,m&&j)t:{for(v=Wk,y=m,g=j,b=0,x=y;x;x=v(x))b++;x=0;for(var w=g;w;w=v(w))x++;for(;0<b-x;)y=v(y),b--;for(;0<x-b;)g=v(g),x--;for(;b--;){if(y===g||g!==null&&y===g.alternate){v=y;break t}y=v(y),g=v(g)}v=null}else v=null;m!==null&&Gj(d,h,m,v,!1),j!==null&&p!==null&&Gj(d,p,j,v,!0)}}e:{if(h=u?gc(u):window,m=h.nodeName&&h.nodeName.toLowerCase(),m==="select"||m==="input"&&h.type==="file")var S=aj;else if(rj(h))if(r2)S=sk;else{S=lk;var A=ik}else m=h.nodeName,!m||m.toLowerCase()!=="input"||h.type!=="checkbox"&&h.type!=="radio"?u&&yb(u.elementType)&&(S=aj):S=ok;if(S&&(S=S(e,u))){n2(d,S,n,f);break e}A&&A(e,h,u),e==="focusout"&&u&&h.type==="number"&&u.memoizedProps.value!=null&&Pv(h,"number",h.value)}switch(A=u?gc(u):window,e){case"focusin":(rj(A)||A.contentEditable==="true")&&(Jl=A,Rv=u,Ac=null);break;case"focusout":Ac=Rv=Jl=null;break;case"mousedown":kv=!0;break;case"contextmenu":case"mouseup":case"dragend":kv=!1,cj(d,n,f);break;case"selectionchange":if(uk)break;case"keydown":case"keyup":cj(d,n,f)}var N;if(bb)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else Zl?e2(e,n)&&(C="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(JE&&n.locale!=="ko"&&(Zl||C!=="onCompositionStart"?C==="onCompositionEnd"&&Zl&&(N=ZE()):(Qa=f,gb="value"in Qa?Qa.value:Qa.textContent,Zl=!0)),A=ah(u,C),0<A.length&&(C=new J1(C,e,null,n,f),d.push({event:C,listeners:A}),N?C.data=N:(N=t2(n),N!==null&&(C.data=N)))),(N=ek?tk(e,n):nk(e,n))&&(C=ah(u,"onBeforeInput"),0<C.length&&(A=new J1("onBeforeInput","beforeinput",null,n,f),d.push({event:A,listeners:C}),A.data=N)),Vk(d,e,u,n,f)}WC(d,t)})}function tu(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ah(e,t){for(var n=t+"Capture",r=[];e!==null;){var a=e,i=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||i===null||(a=Kc(e,n),a!=null&&r.unshift(tu(e,a,i)),a=Kc(e,t),a!=null&&r.push(tu(e,a,i))),e.tag===3)return r;e=e.return}return[]}function Wk(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Gj(e,t,n,r,a){for(var i=t._reactName,l=[];n!==null&&n!==r;){var s=n,c=s.alternate,u=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||u===null||(c=u,a?(u=Kc(n,i),u!=null&&l.unshift(tu(n,u,c))):a||(u=Kc(n,i),u!=null&&l.push(tu(n,u,c)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var Zk=/\r\n?/g,Jk=/\u0000|\uFFFD/g;function Kj(e){return(typeof e=="string"?e:""+e).replace(Zk,`
`).replace(Jk,"")}function JC(e,t){return t=Kj(t),Kj(e)===t}function Re(e,t,n,r,a,i){switch(n){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||Do(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&Do(e,""+r);break;case"className":Mf(e,"class",r);break;case"tabIndex":Mf(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Mf(e,n,r);break;case"style":QE(e,r,i);break;case"data":if(t!=="object"){Mf(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=yd(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(n==="formAction"?(t!=="input"&&Re(e,t,"name",a.name,a,null),Re(e,t,"formEncType",a.formEncType,a,null),Re(e,t,"formMethod",a.formMethod,a,null),Re(e,t,"formTarget",a.formTarget,a,null)):(Re(e,t,"encType",a.encType,a,null),Re(e,t,"method",a.method,a,null),Re(e,t,"target",a.target,a,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=yd(""+r),e.setAttribute(n,r);break;case"onClick":r!=null&&(e.onclick=ia);break;case"onScroll":r!=null&&ve("scroll",e);break;case"onScrollEnd":r!=null&&ve("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(F(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(F(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}n=yd(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""+r):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":r===!0?e.setAttribute(n,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":ve("beforetoggle",e),ve("toggle",e),md(e,"popover",r);break;case"xlinkActuate":Kr(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":Kr(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":Kr(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":Kr(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":Kr(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":Kr(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":Kr(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":Kr(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":Kr(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":md(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=ER.get(n)||n,md(e,n,r))}}function ig(e,t,n,r,a,i){switch(n){case"style":QE(e,r,i);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(F(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(F(60));e.innerHTML=n}}break;case"children":typeof r=="string"?Do(e,r):(typeof r=="number"||typeof r=="bigint")&&Do(e,""+r);break;case"onScroll":r!=null&&ve("scroll",e);break;case"onScrollEnd":r!=null&&ve("scrollend",e);break;case"onClick":r!=null&&(e.onclick=ia);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!FE.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(a=n.endsWith("Capture"),t=n.slice(2,a?n.length-7:void 0),i=e[mn]||null,i=i!=null?i[n]:null,typeof i=="function"&&e.removeEventListener(t,i,a),typeof r=="function")){typeof i!="function"&&i!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break e}n in e?e[n]=r:r===!0?e.setAttribute(n,""):md(e,n,r)}}}function Ht(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ve("error",e),ve("load",e);var r=!1,a=!1,i;for(i in n)if(n.hasOwnProperty(i)){var l=n[i];if(l!=null)switch(i){case"src":r=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(F(137,t));default:Re(e,t,i,l,n,null)}}a&&Re(e,t,"srcSet",n.srcSet,n,null),r&&Re(e,t,"src",n.src,n,null);return;case"input":ve("invalid",e);var s=i=l=a=null,c=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var f=n[r];if(f!=null)switch(r){case"name":a=f;break;case"type":l=f;break;case"checked":c=f;break;case"defaultChecked":u=f;break;case"value":i=f;break;case"defaultValue":s=f;break;case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(F(137,t));break;default:Re(e,t,r,f,n,null)}}VE(e,i,s,c,u,l,a,!1);return;case"select":ve("invalid",e),r=l=i=null;for(a in n)if(n.hasOwnProperty(a)&&(s=n[a],s!=null))switch(a){case"value":i=s;break;case"defaultValue":l=s;break;case"multiple":r=s;default:Re(e,t,a,s,n,null)}t=i,n=l,e.multiple=!!r,t!=null?mo(e,!!r,t,!1):n!=null&&mo(e,!!r,n,!0);return;case"textarea":ve("invalid",e),i=a=r=null;for(l in n)if(n.hasOwnProperty(l)&&(s=n[l],s!=null))switch(l){case"value":r=s;break;case"defaultValue":a=s;break;case"children":i=s;break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(F(91));break;default:Re(e,t,l,s,n,null)}XE(e,r,a,i);return;case"option":for(c in n)if(n.hasOwnProperty(c)&&(r=n[c],r!=null))switch(c){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:Re(e,t,c,r,n,null)}return;case"dialog":ve("beforetoggle",e),ve("toggle",e),ve("cancel",e),ve("close",e);break;case"iframe":case"object":ve("load",e);break;case"video":case"audio":for(r=0;r<eu.length;r++)ve(eu[r],e);break;case"image":ve("error",e),ve("load",e);break;case"details":ve("toggle",e);break;case"embed":case"source":case"link":ve("error",e),ve("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(F(137,t));default:Re(e,t,u,r,n,null)}return;default:if(yb(t)){for(f in n)n.hasOwnProperty(f)&&(r=n[f],r!==void 0&&ig(e,t,f,r,n,void 0));return}}for(s in n)n.hasOwnProperty(s)&&(r=n[s],r!=null&&Re(e,t,s,r,n,null))}function eD(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,i=null,l=null,s=null,c=null,u=null,f=null;for(m in n){var d=n[m];if(n.hasOwnProperty(m)&&d!=null)switch(m){case"checked":break;case"value":break;case"defaultValue":c=d;default:r.hasOwnProperty(m)||Re(e,t,m,null,r,d)}}for(var h in r){var m=r[h];if(d=n[h],r.hasOwnProperty(h)&&(m!=null||d!=null))switch(h){case"type":i=m;break;case"name":a=m;break;case"checked":u=m;break;case"defaultChecked":f=m;break;case"value":l=m;break;case"defaultValue":s=m;break;case"children":case"dangerouslySetInnerHTML":if(m!=null)throw Error(F(137,t));break;default:m!==d&&Re(e,t,h,m,r,d)}}Tv(e,l,s,c,u,f,i,a);return;case"select":m=l=s=h=null;for(i in n)if(c=n[i],n.hasOwnProperty(i)&&c!=null)switch(i){case"value":break;case"multiple":m=c;default:r.hasOwnProperty(i)||Re(e,t,i,null,r,c)}for(a in r)if(i=r[a],c=n[a],r.hasOwnProperty(a)&&(i!=null||c!=null))switch(a){case"value":h=i;break;case"defaultValue":s=i;break;case"multiple":l=i;default:i!==c&&Re(e,t,a,i,r,c)}t=s,n=l,r=m,h!=null?mo(e,!!n,h,!1):!!r!=!!n&&(t!=null?mo(e,!!n,t,!0):mo(e,!!n,n?[]:"",!1));return;case"textarea":m=h=null;for(s in n)if(a=n[s],n.hasOwnProperty(s)&&a!=null&&!r.hasOwnProperty(s))switch(s){case"value":break;case"children":break;default:Re(e,t,s,null,r,a)}for(l in r)if(a=r[l],i=n[l],r.hasOwnProperty(l)&&(a!=null||i!=null))switch(l){case"value":h=a;break;case"defaultValue":m=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(F(91));break;default:a!==i&&Re(e,t,l,a,r,i)}YE(e,h,m);return;case"option":for(var j in n)if(h=n[j],n.hasOwnProperty(j)&&h!=null&&!r.hasOwnProperty(j))switch(j){case"selected":e.selected=!1;break;default:Re(e,t,j,null,r,h)}for(c in r)if(h=r[c],m=n[c],r.hasOwnProperty(c)&&h!==m&&(h!=null||m!=null))switch(c){case"selected":e.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:Re(e,t,c,h,r,m)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var v in n)h=n[v],n.hasOwnProperty(v)&&h!=null&&!r.hasOwnProperty(v)&&Re(e,t,v,null,r,h);for(u in r)if(h=r[u],m=n[u],r.hasOwnProperty(u)&&h!==m&&(h!=null||m!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(F(137,t));break;default:Re(e,t,u,h,r,m)}return;default:if(yb(t)){for(var p in n)h=n[p],n.hasOwnProperty(p)&&h!==void 0&&!r.hasOwnProperty(p)&&ig(e,t,p,void 0,r,h);for(f in r)h=r[f],m=n[f],!r.hasOwnProperty(f)||h===m||h===void 0&&m===void 0||ig(e,t,f,h,r,m);return}}for(var y in n)h=n[y],n.hasOwnProperty(y)&&h!=null&&!r.hasOwnProperty(y)&&Re(e,t,y,null,r,h);for(d in r)h=r[d],m=n[d],!r.hasOwnProperty(d)||h===m||h==null&&m==null||Re(e,t,d,h,r,m)}function Vj(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function tD(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var a=n[r],i=a.transferSize,l=a.initiatorType,s=a.duration;if(i&&s&&Vj(l)){for(l=0,s=a.responseEnd,r+=1;r<n.length;r++){var c=n[r],u=c.startTime;if(u>s)break;var f=c.transferSize,d=c.initiatorType;f&&Vj(d)&&(c=c.responseEnd,l+=f*(c<s?1:(s-u)/(c-u)))}if(--r,t+=8*(i+l)/(a.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var lg=null,og=null;function ih(e){return e.nodeType===9?e:e.ownerDocument}function Yj(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function e_(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function sg(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var My=null;function nD(){var e=window.event;return e&&e.type==="popstate"?e===My?!1:(My=e,!0):(My=null,!1)}var t_=typeof setTimeout=="function"?setTimeout:void 0,rD=typeof clearTimeout=="function"?clearTimeout:void 0,Xj=typeof Promise=="function"?Promise:void 0,aD=typeof queueMicrotask=="function"?queueMicrotask:typeof Xj<"u"?function(e){return Xj.resolve(null).then(e).catch(iD)}:t_;function iD(e){setTimeout(function(){throw e})}function Oi(e){return e==="head"}function Qj(e,t){var n=t,r=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"||n==="/&"){if(r===0){e.removeChild(a),Fo(t);return}r--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")r++;else if(n==="html")kc(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,kc(n);for(var i=n.firstChild;i;){var l=i.nextSibling,s=i.nodeName;i[Wu]||s==="SCRIPT"||s==="STYLE"||s==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=l}}else n==="body"&&kc(e.ownerDocument.body);n=a}while(n);Fo(t)}function Wj(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=r}while(n)}function cg(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":cg(n),mb(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function lD(e,t,n,r){for(;e.nodeType===1;){var a=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[Wu])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=Jn(e.nextSibling),e===null)break}return null}function oD(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Jn(e.nextSibling),e===null))return null;return e}function n_(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Jn(e.nextSibling),e===null))return null;return e}function ug(e){return e.data==="$?"||e.data==="$~"}function fg(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function sD(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function Jn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var dg=null;function Zj(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Jn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Jj(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function r_(e,t,n){switch(t=ih(n),e){case"html":if(e=t.documentElement,!e)throw Error(F(452));return e;case"head":if(e=t.head,!e)throw Error(F(453));return e;case"body":if(e=t.body,!e)throw Error(F(454));return e;default:throw Error(F(451))}}function kc(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);mb(e)}var er=new Map,eS=new Set;function lh(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Oa=Ee.d;Ee.d={f:cD,r:uD,D:fD,C:dD,L:hD,m:pD,X:yD,S:mD,M:vD};function cD(){var e=Oa.f(),t=Lp();return e||t}function uD(e){var t=As(e);t!==null&&t.tag===5&&t.type==="form"?Q2(t):Oa.r(e)}var _s=typeof document>"u"?null:document;function a_(e,t,n){var r=_s;if(r&&typeof t=="string"&&t){var a=Kn(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),eS.has(a)||(eS.add(a),e={rel:e,crossOrigin:n,href:t},r.querySelector(a)===null&&(t=r.createElement("link"),Ht(t,"link",e),Mt(t),r.head.appendChild(t)))}}function fD(e){Oa.D(e),a_("dns-prefetch",e,null)}function dD(e,t){Oa.C(e,t),a_("preconnect",e,t)}function hD(e,t,n){Oa.L(e,t,n);var r=_s;if(r&&e&&t){var a='link[rel="preload"][as="'+Kn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+Kn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+Kn(n.imageSizes)+'"]')):a+='[href="'+Kn(e)+'"]';var i=a;switch(t){case"style":i=Ho(e);break;case"script":i=Ts(e)}er.has(i)||(e=Ze({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),er.set(i,e),r.querySelector(a)!==null||t==="style"&&r.querySelector(rf(i))||t==="script"&&r.querySelector(af(i))||(t=r.createElement("link"),Ht(t,"link",e),Mt(t),r.head.appendChild(t)))}}function pD(e,t){Oa.m(e,t);var n=_s;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+Kn(r)+'"][href="'+Kn(e)+'"]',i=a;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Ts(e)}if(!er.has(i)&&(e=Ze({rel:"modulepreload",href:e},t),er.set(i,e),n.querySelector(a)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(af(i)))return}r=n.createElement("link"),Ht(r,"link",e),Mt(r),n.head.appendChild(r)}}}function mD(e,t,n){Oa.S(e,t,n);var r=_s;if(r&&e){var a=po(r).hoistableStyles,i=Ho(e);t=t||"default";var l=a.get(i);if(!l){var s={loading:0,preload:null};if(l=r.querySelector(rf(i)))s.loading=5;else{e=Ze({rel:"stylesheet",href:e,"data-precedence":t},n),(n=er.get(i))&&e0(e,n);var c=l=r.createElement("link");Mt(c),Ht(c,"link",e),c._p=new Promise(function(u,f){c.onload=u,c.onerror=f}),c.addEventListener("load",function(){s.loading|=1}),c.addEventListener("error",function(){s.loading|=2}),s.loading|=4,Nd(l,t,r)}l={type:"stylesheet",instance:l,count:1,state:s},a.set(i,l)}}}function yD(e,t){Oa.X(e,t);var n=_s;if(n&&e){var r=po(n).hoistableScripts,a=Ts(e),i=r.get(a);i||(i=n.querySelector(af(a)),i||(e=Ze({src:e,async:!0},t),(t=er.get(a))&&t0(e,t),i=n.createElement("script"),Mt(i),Ht(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}}function vD(e,t){Oa.M(e,t);var n=_s;if(n&&e){var r=po(n).hoistableScripts,a=Ts(e),i=r.get(a);i||(i=n.querySelector(af(a)),i||(e=Ze({src:e,async:!0,type:"module"},t),(t=er.get(a))&&t0(e,t),i=n.createElement("script"),Mt(i),Ht(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}}function tS(e,t,n,r){var a=(a=ri.current)?lh(a):null;if(!a)throw Error(F(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Ho(n.href),n=po(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=Ho(n.href);var i=po(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(rf(e)))&&!i._p&&(l.instance=i,l.state.loading=5),er.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},er.set(e,n),i||gD(a,e,n,l.state))),t&&r===null)throw Error(F(528,""));return l}if(t&&r!==null)throw Error(F(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ts(n),n=po(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(F(444,e))}}function Ho(e){return'href="'+Kn(e)+'"'}function rf(e){return'link[rel="stylesheet"]['+e+"]"}function i_(e){return Ze({},e,{"data-precedence":e.precedence,precedence:null})}function gD(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}),Ht(t,"link",n),Mt(t),e.head.appendChild(t))}function Ts(e){return'[src="'+Kn(e)+'"]'}function af(e){return"script[async]"+e}function nS(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+Kn(n.href)+'"]');if(r)return t.instance=r,Mt(r),r;var a=Ze({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),Mt(r),Ht(r,"style",a),Nd(r,n.precedence,e),t.instance=r;case"stylesheet":a=Ho(n.href);var i=e.querySelector(rf(a));if(i)return t.state.loading|=4,t.instance=i,Mt(i),i;r=i_(n),(a=er.get(a))&&e0(r,a),i=(e.ownerDocument||e).createElement("link"),Mt(i);var l=i;return l._p=new Promise(function(s,c){l.onload=s,l.onerror=c}),Ht(i,"link",r),t.state.loading|=4,Nd(i,n.precedence,e),t.instance=i;case"script":return i=Ts(n.src),(a=e.querySelector(af(i)))?(t.instance=a,Mt(a),a):(r=n,(a=er.get(i))&&(r=Ze({},n),t0(r,a)),e=e.ownerDocument||e,a=e.createElement("script"),Mt(a),Ht(a,"link",r),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(F(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Nd(r,n.precedence,e));return t.instance}function Nd(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<r.length;l++){var s=r[l];if(s.dataset.precedence===t)i=s;else if(i!==a)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function e0(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function t0(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ed=null;function rS(e,t,n){if(Ed===null){var r=new Map,a=Ed=new Map;a.set(n,r)}else a=Ed,r=a.get(n),r||(r=new Map,a.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var i=n[a];if(!(i[Wu]||i[Bt]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var l=i.getAttribute(t)||"";l=e+l;var s=r.get(l);s?s.push(i):r.set(l,[i])}}return r}function aS(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function xD(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 l_(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function bD(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=Ho(r.href),i=t.querySelector(rf(a));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=oh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,Mt(i);return}i=t.ownerDocument||t,r=i_(r),(a=er.get(a))&&e0(r,a),i=i.createElement("link"),Mt(i);var l=i;l._p=new Promise(function(s,c){l.onload=s,l.onerror=c}),Ht(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=oh.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var $y=0;function jD(e,t){return e.stylesheets&&e.count===0&&Cd(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Cd(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&$y===0&&($y=62500*tD());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Cd(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>$y?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(a)}}:null}function oh(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Cd(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var sh=null;function Cd(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,sh=new Map,t.forEach(SD,e),sh=null,oh.call(e))}function SD(e,t){if(!(t.state.loading&4)){var n=sh.get(e);if(n)var r=n.get(null);else{n=new Map,sh.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<a.length;i++){var l=a[i];(l.nodeName==="LINK"||l.getAttribute("media")!=="not all")&&(n.set(l.dataset.precedence,l),r=l)}r&&n.set(null,r)}a=t.instance,l=a.getAttribute("data-precedence"),i=n.get(l)||r,i===r&&n.set(null,a),n.set(l,a),this.count++,r=oh.bind(this),a.addEventListener("load",r),a.addEventListener("error",r),i?i.parentNode.insertBefore(a,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var nu={$$typeof:aa,Provider:null,Consumer:null,_currentValue:al,_currentValue2:al,_threadCount:0};function wD(e,t,n,r,a,i,l,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ny(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ny(0),this.hiddenUpdates=ny(null),this.identifierPrefix=r,this.onUncaughtError=a,this.onCaughtError=i,this.onRecoverableError=l,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function o_(e,t,n,r,a,i,l,s,c,u,f,d){return e=new wD(e,t,n,l,c,u,f,d,s),t=1,i===!0&&(t|=24),i=On(3,null,null,t),e.current=i,i.stateNode=e,t=Eb(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:r,isDehydrated:n,cache:t},Tb(i),e}function s_(e){return e?(e=no,e):no}function c_(e,t,n,r,a,i){a=s_(a),r.context===null?r.context=a:r.pendingContext=a,r=ii(t),r.payload={element:n},i=i===void 0?null:i,i!==null&&(r.callback=i),n=li(e,r,t),n!==null&&(hn(n,e,t),Ec(n,e,t))}function iS(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function n0(e,t){iS(e,t),(e=e.alternate)&&iS(e,t)}function u_(e){if(e.tag===13||e.tag===31){var t=_l(e,67108864);t!==null&&hn(t,e,67108864),n0(e,67108864)}}function lS(e){if(e.tag===13||e.tag===31){var t=Tn();t=hb(t);var n=_l(e,t);n!==null&&hn(n,e,t),n0(e,t)}}var ch=!0;function OD(e,t,n,r){var a=ue.T;ue.T=null;var i=Ee.p;try{Ee.p=2,r0(e,t,n,r)}finally{Ee.p=i,ue.T=a}}function AD(e,t,n,r){var a=ue.T;ue.T=null;var i=Ee.p;try{Ee.p=8,r0(e,t,n,r)}finally{Ee.p=i,ue.T=a}}function r0(e,t,n,r){if(ch){var a=hg(r);if(a===null)Py(e,t,r,uh,n),oS(e,r);else if(ED(a,e,t,n,r))r.stopPropagation();else if(oS(e,r),t&4&&-1<ND.indexOf(e)){for(;a!==null;){var i=As(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var l=Bi(i.pendingLanes);if(l!==0){var s=i;for(s.pendingLanes|=2,s.entangledLanes|=2;l;){var c=1<<31-_n(l);s.entanglements[1]|=c,l&=~c}qr(i),!(Ne&6)&&(Jd=En()+500,nf(0))}}break;case 31:case 13:s=_l(i,2),s!==null&&hn(s,i,2),Lp(),n0(i,2)}if(i=hg(r),i===null&&Py(e,t,r,uh,n),i===a)break;a=i}a!==null&&r.stopPropagation()}else Py(e,t,r,null,n)}}function hg(e){return e=vb(e),a0(e)}var uh=null;function a0(e){if(uh=null,e=Ql(e),e!==null){var t=Vu(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=TE(t),e!==null)return e;e=null}else if(n===31){if(e=PE(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return uh=e,null}function f_(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(fR()){case kE:return 2;case DE:return 8;case Bd:case dR:return 32;case LE:return 268435456;default:return 32}default:return 32}}var pg=!1,ci=null,ui=null,fi=null,ru=new Map,au=new Map,Ua=[],ND="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function oS(e,t){switch(e){case"focusin":case"focusout":ci=null;break;case"dragenter":case"dragleave":ui=null;break;case"mouseover":case"mouseout":fi=null;break;case"pointerover":case"pointerout":ru.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":au.delete(t.pointerId)}}function rc(e,t,n,r,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[a]},t!==null&&(t=As(t),t!==null&&u_(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function ED(e,t,n,r,a){switch(t){case"focusin":return ci=rc(ci,e,t,n,r,a),!0;case"dragenter":return ui=rc(ui,e,t,n,r,a),!0;case"mouseover":return fi=rc(fi,e,t,n,r,a),!0;case"pointerover":var i=a.pointerId;return ru.set(i,rc(ru.get(i)||null,e,t,n,r,a)),!0;case"gotpointercapture":return i=a.pointerId,au.set(i,rc(au.get(i)||null,e,t,n,r,a)),!0}return!1}function d_(e){var t=Ql(e.target);if(t!==null){var n=Vu(t);if(n!==null){if(t=n.tag,t===13){if(t=TE(n),t!==null){e.blockedOn=t,G1(e.priority,function(){lS(n)});return}}else if(t===31){if(t=PE(n),t!==null){e.blockedOn=t,G1(e.priority,function(){lS(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function _d(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=hg(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Mv=r,n.target.dispatchEvent(r),Mv=null}else return t=As(n),t!==null&&u_(t),e.blockedOn=n,!1;t.shift()}return!0}function sS(e,t,n){_d(e)&&n.delete(t)}function CD(){pg=!1,ci!==null&&_d(ci)&&(ci=null),ui!==null&&_d(ui)&&(ui=null),fi!==null&&_d(fi)&&(fi=null),ru.forEach(sS),au.forEach(sS)}function If(e,t){e.blockedOn===t&&(e.blockedOn=null,pg||(pg=!0,Et.unstable_scheduleCallback(Et.unstable_NormalPriority,CD)))}var Uf=null;function cS(e){Uf!==e&&(Uf=e,Et.unstable_scheduleCallback(Et.unstable_NormalPriority,function(){Uf===e&&(Uf=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],a=e[t+2];if(typeof r!="function"){if(a0(r||n)===null)continue;break}var i=As(n);i!==null&&(e.splice(t,3),t-=3,Yv(i,{pending:!0,data:a,method:n.method,action:r},r,a))}}))}function Fo(e){function t(c){return If(c,e)}ci!==null&&If(ci,e),ui!==null&&If(ui,e),fi!==null&&If(fi,e),ru.forEach(t),au.forEach(t);for(var n=0;n<Ua.length;n++){var r=Ua[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ua.length&&(n=Ua[0],n.blockedOn===null);)d_(n),n.blockedOn===null&&Ua.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var a=n[r],i=n[r+1],l=a[mn]||null;if(typeof i=="function")l||cS(n);else if(l){var s=null;if(i&&i.hasAttribute("formAction")){if(a=i,l=i[mn]||null)s=l.formAction;else if(a0(a)!==null)continue}else s=l.action;typeof s=="function"?n[r+1]=s:(n.splice(r,3),r-=3),cS(n)}}}function h_(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(l){return a=l})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),a!==null&&(a(),a=null)}}}function i0(e){this._internalRoot=e}Ip.prototype.render=i0.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(F(409));var n=t.current,r=Tn();c_(n,r,e,t,null,null)};Ip.prototype.unmount=i0.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;c_(e.current,2,null,e,null,null),Lp(),t[Os]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=qE();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ua.length&&t!==0&&t<Ua[n].priority;n++);Ua.splice(n,0,e),n===0&&d_(e)}};var uS=CE.version;if(uS!=="19.2.7")throw Error(F(527,uS,"19.2.7"));Ee.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(F(188)):(e=Object.keys(e).join(","),Error(F(268,e)));return e=aR(t),e=e!==null?ME(e):null,e=e===null?null:e.stateNode,e};var _D={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:ue,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var qf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!qf.isDisabled&&qf.supportsFiber)try{Yu=qf.inject(_D),Cn=qf}catch{}}wp.createRoot=function(e,t){if(!_E(e))throw Error(F(299));var n=!1,r="",a=aC,i=iC,l=lC;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=o_(e,1,!1,null,null,n,r,null,a,i,l,h_),e[Os]=t.current,Jb(e),new i0(t)};wp.hydrateRoot=function(e,t,n){if(!_E(e))throw Error(F(299));var r=!1,a="",i=aC,l=iC,s=lC,c=null;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(l=n.onCaughtError),n.onRecoverableError!==void 0&&(s=n.onRecoverableError),n.formState!==void 0&&(c=n.formState)),t=o_(e,1,!0,t,n??null,r,a,c,i,l,s,h_),t.context=s_(null),n=t.current,r=Tn(),r=hb(r),a=ii(r),a.callback=null,li(n,a,r),n=r,t.current.lanes=n,Qu(t,n),qr(t),e[Os]=t.current,Jb(e),new Ip(t)};wp.version="19.2.7";function p_(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(p_)}catch(e){console.error(e)}}p_(),SE.exports=wp;var TD=SE.exports;const PD=_e(TD);/**
 * react-router v7.17.0
 *
 * 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
 */var fS="popstate";function dS(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function MD(e={}){function t(r,a){var u;let i=(u=a.state)==null?void 0:u.masked,{pathname:l,search:s,hash:c}=i||r.location;return mg("",{pathname:l,search:s,hash:c},a.state&&a.state.usr||null,a.state&&a.state.key||"default",i?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,a){return typeof a=="string"?a:iu(a)}return RD(t,n,null,e)}function tt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function br(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function $D(){return Math.random().toString(36).substring(2,10)}function hS(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function mg(e,t,n=null,r,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ps(t):t,state:n,key:t&&t.key||r||$D(),mask:a}}function iu({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ps(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function RD(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:i=!1}=r,l=a.history,s="POP",c=null,u=f();u==null&&(u=0,l.replaceState({...l.state,idx:u},""));function f(){return(l.state||{idx:null}).idx}function d(){s="POP";let p=f(),y=p==null?null:p-u;u=p,c&&c({action:s,location:v.location,delta:y})}function h(p,y){s="PUSH";let g=dS(p)?p:mg(v.location,p,y);u=f()+1;let b=hS(g,u),x=v.createHref(g.mask||g);try{l.pushState(b,"",x)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;a.location.assign(x)}i&&c&&c({action:s,location:v.location,delta:1})}function m(p,y){s="REPLACE";let g=dS(p)?p:mg(v.location,p,y);u=f();let b=hS(g,u),x=v.createHref(g.mask||g);l.replaceState(b,"",x),i&&c&&c({action:s,location:v.location,delta:0})}function j(p){return kD(a,p)}let v={get action(){return s},get location(){return e(a,l)},listen(p){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(fS,d),c=p,()=>{a.removeEventListener(fS,d),c=null}},createHref(p){return t(a,p)},createURL:j,encodeLocation(p){let y=j(p);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:m,go(p){return l.go(p)}};return v}function kD(e,t,n=!1){let r="http://localhost";e&&(r=e.location.origin!=="null"?e.location.origin:e.location.href),tt(r,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:iu(t);return a=a.replace(/ $/,"%20"),!n&&a.startsWith("//")&&(a=r+a),new URL(a,r)}function m_(e,t,n="/"){return DD(e,t,n,!1)}function DD(e,t,n,r,a){let i=typeof t=="string"?Ps(t):t,l=ba(i.pathname||"/",n);if(l==null)return null;let s=LD(e),c=null,u=XD(l);for(let f=0;c==null&&f<s.length;++f)c=VD(s[f],u,r);return c}function LD(e){let t=y_(e);return zD(t),t}function y_(e,t=[],n=[],r="",a=!1){let i=(l,s,c=a,u)=>{let f={relativePath:u===void 0?l.path||"":u,caseSensitive:l.caseSensitive===!0,childrenIndex:s,route:l};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(r)&&c)return;tt(f.relativePath.startsWith(r),`Absolute route path "${f.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(r.length)}let d=mr([r,f.relativePath]),h=n.concat(f);l.children&&l.children.length>0&&(tt(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),y_(l.children,t,h,d,c)),!(l.path==null&&!l.index)&&t.push({path:d,score:GD(d,l.index),routesMeta:h})};return e.forEach((l,s)=>{var c;if(l.path===""||!((c=l.path)!=null&&c.includes("?")))i(l,s);else for(let u of v_(l.path))i(l,s,!0,u)}),t}function v_(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=v_(r.join("/")),s=[];return s.push(...l.map(c=>c===""?i:[i,c].join("/"))),a&&s.push(...l),s.map(c=>e.startsWith("/")&&c===""?"/":c)}function zD(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:KD(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var BD=/^:[\w-]+$/,ID=3,UD=2,qD=1,HD=10,FD=-2,pS=e=>e==="*";function GD(e,t){let n=e.split("/"),r=n.length;return n.some(pS)&&(r+=FD),t&&(r+=UD),n.filter(a=>!pS(a)).reduce((a,i)=>a+(BD.test(i)?ID:i===""?qD:HD),r)}function KD(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 VD(e,t,n=!1){let{routesMeta:r}=e,a={},i="/",l=[];for(let s=0;s<r.length;++s){let c=r[s],u=s===r.length-1,f=i==="/"?t:t.slice(i.length)||"/",d=fh({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},f),h=c.route;if(!d&&u&&n&&!r[r.length-1].route.index&&(d=fh({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},f)),!d)return null;Object.assign(a,d.params),l.push({params:a,pathname:mr([i,d.pathname]),pathnameBase:JD(mr([i,d.pathnameBase])),route:h}),d.pathnameBase!=="/"&&(i=mr([i,d.pathnameBase]))}return l}function fh(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=YD(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let i=a[0],l=i.replace(/(.)\/+$/,"$1"),s=a.slice(1);return{params:r.reduce((u,{paramName:f,isOptional:d},h)=>{if(f==="*"){let j=s[h]||"";l=i.slice(0,i.length-j.length).replace(/(.)\/+$/,"$1")}const m=s[h];return d&&!m?u[f]=void 0:u[f]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:l,pattern:e}}function YD(e,t=!1,n=!0){br(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,s,c,u,f)=>{if(r.push({paramName:s,isOptional:c!=null}),c){let d=f.charAt(u+l.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function XD(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return br(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function ba(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)||"/"}var QD=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function WD(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?Ps(e):e,i;return n?(n=g_(n),n.startsWith("/")?i=mS(n.substring(1),"/"):i=mS(n,t)):i=t,{pathname:i,search:e4(r),hash:t4(a)}}function mS(e,t){let n=dh(t).split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function Ry(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 <Link to="..."> and the router will parse it for you.`}function ZD(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function l0(e){let t=ZD(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Up(e,t,n,r=!1){let a;typeof e=="string"?a=Ps(e):(a={...e},tt(!a.pathname||!a.pathname.includes("?"),Ry("?","pathname","search",a)),tt(!a.pathname||!a.pathname.includes("#"),Ry("#","pathname","hash",a)),tt(!a.search||!a.search.includes("#"),Ry("#","search","hash",a)));let i=e===""||a.pathname==="",l=i?"/":a.pathname,s;if(l==null)s=n;else{let d=t.length-1;if(!r&&l.startsWith("..")){let h=l.split("/");for(;h[0]==="..";)h.shift(),d-=1;a.pathname=h.join("/")}s=d>=0?t[d]:"/"}let c=WD(a,s),u=l&&l!=="/"&&l.endsWith("/"),f=(i||l===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||f)&&(c.pathname+="/"),c}var g_=e=>e.replace(/\/\/+/g,"/"),mr=e=>g_(e.join("/")),dh=e=>e.replace(/\/+$/,""),JD=e=>dh(e).replace(/^\/*/,"/"),e4=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,t4=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,n4=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function r4(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function a4(e){let t=e.map(n=>n.route.path).filter(Boolean);return mr(t)||"/"}var x_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function b_(e,t){let n=e;if(typeof n!="string"||!QD.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(x_)try{let i=new URL(window.location.href),l=n.startsWith("//")?new URL(i.protocol+n):new URL(n),s=ba(l.pathname,t);l.origin===i.origin&&s!=null?n=s+l.search+l.hash:a=!0}catch{br(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var j_=["POST","PUT","PATCH","DELETE"];new Set(j_);var i4=["GET",...j_];new Set(i4);var Ms=O.createContext(null);Ms.displayName="DataRouter";var qp=O.createContext(null);qp.displayName="DataRouterState";var S_=O.createContext(!1);function l4(){return O.useContext(S_)}var w_=O.createContext({isTransitioning:!1});w_.displayName="ViewTransition";var o4=O.createContext(new Map);o4.displayName="Fetchers";var s4=O.createContext(null);s4.displayName="Await";var kn=O.createContext(null);kn.displayName="Navigation";var lf=O.createContext(null);lf.displayName="Location";var Sr=O.createContext({outlet:null,matches:[],isDataRoute:!1});Sr.displayName="Route";var o0=O.createContext(null);o0.displayName="RouteError";var O_="REACT_ROUTER_ERROR",c4="REDIRECT",u4="ROUTE_ERROR_RESPONSE";function f4(e){if(e.startsWith(`${O_}:${c4}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function d4(e){if(e.startsWith(`${O_}:${u4}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new n4(t.status,t.statusText,t.data)}catch{}}function h4(e,{relative:t}={}){tt($s(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=O.useContext(kn),{hash:a,pathname:i,search:l}=of(e,{relative:t}),s=i;return n!=="/"&&(s=i==="/"?n:mr([n,i])),r.createHref({pathname:s,search:l,hash:a})}function $s(){return O.useContext(lf)!=null}function Hr(){return tt($s(),"useLocation() may be used only in the context of a <Router> component."),O.useContext(lf).location}var A_="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function N_(e){O.useContext(kn).static||O.useLayoutEffect(e)}function Hp(){let{isDataRoute:e}=O.useContext(Sr);return e?C4():p4()}function p4(){tt($s(),"useNavigate() may be used only in the context of a <Router> component.");let e=O.useContext(Ms),{basename:t,navigator:n}=O.useContext(kn),{matches:r}=O.useContext(Sr),{pathname:a}=Hr(),i=JSON.stringify(l0(r)),l=O.useRef(!1);return N_(()=>{l.current=!0}),O.useCallback((c,u={})=>{if(br(l.current,A_),!l.current)return;if(typeof c=="number"){n.go(c);return}let f=Up(c,JSON.parse(i),a,u.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:mr([t,f.pathname])),(u.replace?n.replace:n.push)(f,u.state,u)},[t,n,i,a,e])}var m4=O.createContext(null);function y4(e){let t=O.useContext(Sr).outlet;return O.useMemo(()=>t&&O.createElement(m4.Provider,{value:e},t),[t,e])}function of(e,{relative:t}={}){let{matches:n}=O.useContext(Sr),{pathname:r}=Hr(),a=JSON.stringify(l0(n));return O.useMemo(()=>Up(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function v4(e,t){return E_(e,t)}function E_(e,t,n){var p;tt($s(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=O.useContext(kn),{matches:a}=O.useContext(Sr),i=a[a.length-1],l=i?i.params:{},s=i?i.pathname:"/",c=i?i.pathnameBase:"/",u=i&&i.route;{let y=u&&u.path||"";__(s,!u||y.endsWith("*")||y.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${y}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.

Please change the parent <Route path="${y}"> to <Route path="${y==="/"?"*":`${y}/*`}">.`)}let f=Hr(),d;if(t){let y=typeof t=="string"?Ps(t):t;tt(c==="/"||((p=y.pathname)==null?void 0:p.startsWith(c)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${y.pathname}" was given in the \`location\` prop.`),d=y}else d=f;let h=d.pathname||"/",m=h;if(c!=="/"){let y=c.replace(/^\//,"").split("/");m="/"+h.replace(/^\//,"").split("/").slice(y.length).join("/")}let j=n&&n.state.matches.length?n.state.matches.map(y=>Object.assign(y,{route:n.manifest[y.route.id]||y.route})):m_(e,{pathname:m});br(u||j!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),br(j==null||j[j.length-1].route.element!==void 0||j[j.length-1].route.Component!==void 0||j[j.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let v=S4(j&&j.map(y=>Object.assign({},y,{params:Object.assign({},l,y.params),pathname:mr([c,r.encodeLocation?r.encodeLocation(y.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?c:mr([c,r.encodeLocation?r.encodeLocation(y.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathnameBase])})),a,n);return t&&v?O.createElement(lf.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...d},navigationType:"POP"}},v):v}function g4(){let e=E4(),t=r4(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=O.createElement(O.Fragment,null,O.createElement("p",null,"💿 Hey developer 👋"),O.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",O.createElement("code",{style:i},"ErrorBoundary")," or"," ",O.createElement("code",{style:i},"errorElement")," prop on your route.")),O.createElement(O.Fragment,null,O.createElement("h2",null,"Unexpected Application Error!"),O.createElement("h3",{style:{fontStyle:"italic"}},t),n?O.createElement("pre",{style:a},n):null,l)}var x4=O.createElement(g4,null),C_=class extends O.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=d4(e.digest);n&&(e=n)}let t=e!==void 0?O.createElement(Sr.Provider,{value:this.props.routeContext},O.createElement(o0.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?O.createElement(b4,{error:e},t):t}};C_.contextType=S_;var ky=new WeakMap;function b4({children:e,error:t}){let{basename:n}=O.useContext(kn);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=f4(t.digest);if(r){let a=ky.get(t);if(a)throw a;let i=b_(r.location,n);if(x_&&!ky.get(t))if(i.isExternal||r.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:r.replace}));throw ky.set(t,l),l}return O.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function j4({routeContext:e,match:t,children:n}){let r=O.useContext(Ms);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),O.createElement(Sr.Provider,{value:e},n)}function S4(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,i=r==null?void 0:r.errors;if(i!=null){let f=a.findIndex(d=>d.route.id&&(i==null?void 0:i[d.route.id])!==void 0);tt(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,f+1))}let l=!1,s=-1;if(n&&r){l=r.renderFallback;for(let f=0;f<a.length;f++){let d=a[f];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(s=f),d.route.id){let{loaderData:h,errors:m}=r,j=d.route.loader&&!h.hasOwnProperty(d.route.id)&&(!m||m[d.route.id]===void 0);if(d.route.lazy||j){n.isStatic&&(l=!0),s>=0?a=a.slice(0,s+1):a=[a[0]];break}}}}let c=n==null?void 0:n.onError,u=r&&c?(f,d)=>{var h,m;c(f,{location:r.location,params:((m=(h=r.matches)==null?void 0:h[0])==null?void 0:m.params)??{},pattern:a4(r.matches),errorInfo:d})}:void 0;return a.reduceRight((f,d,h)=>{let m,j=!1,v=null,p=null;r&&(m=i&&d.route.id?i[d.route.id]:void 0,v=d.route.errorElement||x4,l&&(s<0&&h===0?(__("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),j=!0,p=null):s===h&&(j=!0,p=d.route.hydrateFallbackElement||null)));let y=t.concat(a.slice(0,h+1)),g=()=>{let b;return m?b=v:j?b=p:d.route.Component?b=O.createElement(d.route.Component,null):d.route.element?b=d.route.element:b=f,O.createElement(j4,{match:d,routeContext:{outlet:f,matches:y,isDataRoute:r!=null},children:b})};return r&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?O.createElement(C_,{location:r.location,revalidation:r.revalidation,component:v,error:m,children:g(),routeContext:{outlet:null,matches:y,isDataRoute:!0},onError:u}):g()},null)}function s0(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function w4(e){let t=O.useContext(Ms);return tt(t,s0(e)),t}function O4(e){let t=O.useContext(qp);return tt(t,s0(e)),t}function A4(e){let t=O.useContext(Sr);return tt(t,s0(e)),t}function c0(e){let t=A4(e),n=t.matches[t.matches.length-1];return tt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function N4(){return c0("useRouteId")}function E4(){var r;let e=O.useContext(o0),t=O4("useRouteError"),n=c0("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function C4(){let{router:e}=w4("useNavigate"),t=c0("useNavigate"),n=O.useRef(!1);return N_(()=>{n.current=!0}),O.useCallback(async(a,i={})=>{br(n.current,A_),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...i}))},[e,t])}var yS={};function __(e,t,n){!t&&!yS[e]&&(yS[e]=!0,br(!1,n))}O.memo(_4);function _4({routes:e,manifest:t,future:n,state:r,isStatic:a,onError:i}){return E_(e,void 0,{manifest:t,state:r,isStatic:a,onError:i})}function T_({to:e,replace:t,state:n,relative:r}){tt($s(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=O.useContext(kn);br(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:i}=O.useContext(Sr),{pathname:l}=Hr(),s=Hp(),c=Up(e,l0(i),l,r==="path"),u=JSON.stringify(c);return O.useEffect(()=>{s(JSON.parse(u),{replace:t,state:n,relative:r})},[s,u,r,t,n]),null}function T4(e){return y4(e.context)}function Oe(e){tt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function P4({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:i=!1,useTransitions:l}){tt(!$s(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),c=O.useMemo(()=>({basename:s,navigator:a,static:i,useTransitions:l,future:{}}),[s,a,i,l]);typeof n=="string"&&(n=Ps(n));let{pathname:u="/",search:f="",hash:d="",state:h=null,key:m="default",mask:j}=n,v=O.useMemo(()=>{let p=ba(u,s);return p==null?null:{location:{pathname:p,search:f,hash:d,state:h,key:m,mask:j},navigationType:r}},[s,u,f,d,h,m,r,j]);return br(v!=null,`<Router basename="${s}"> is not able to match the URL "${u}${f}${d}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:O.createElement(kn.Provider,{value:c},O.createElement(lf.Provider,{children:t,value:v}))}function M4({children:e,location:t}){return v4(yg(e),t)}function yg(e,t=[]){let n=[];return O.Children.forEach(e,(r,a)=>{if(!O.isValidElement(r))return;let i=[...t,a];if(r.type===O.Fragment){n.push.apply(n,yg(r.props.children,i));return}tt(r.type===Oe,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),tt(!r.props.index||!r.props.children,"An index route cannot have child routes.");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,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||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=yg(r.props.children,i)),n.push(l)}),n}var Td="get",Pd="application/x-www-form-urlencoded";function Fp(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function $4(e){return Fp(e)&&e.tagName.toLowerCase()==="button"}function R4(e){return Fp(e)&&e.tagName.toLowerCase()==="form"}function k4(e){return Fp(e)&&e.tagName.toLowerCase()==="input"}function D4(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function L4(e,t){return e.button===0&&(!t||t==="_self")&&!D4(e)}var Hf=null;function z4(){if(Hf===null)try{new FormData(document.createElement("form"),0),Hf=!1}catch{Hf=!0}return Hf}var B4=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Dy(e){return e!=null&&!B4.has(e)?(br(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Pd}"`),null):e}function I4(e,t){let n,r,a,i,l;if(R4(e)){let s=e.getAttribute("action");r=s?ba(s,t):null,n=e.getAttribute("method")||Td,a=Dy(e.getAttribute("enctype"))||Pd,i=new FormData(e)}else if($4(e)||k4(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||s.getAttribute("action");if(r=c?ba(c,t):null,n=e.getAttribute("formmethod")||s.getAttribute("method")||Td,a=Dy(e.getAttribute("formenctype"))||Dy(s.getAttribute("enctype"))||Pd,i=new FormData(s,e),!z4()){let{name:u,type:f,value:d}=e;if(f==="image"){let h=u?`${u}.`:"";i.append(`${h}x`,"0"),i.append(`${h}y`,"0")}else u&&i.append(u,d)}}else{if(Fp(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Td,r=null,a=Pd,l=e}return i&&a==="text/plain"&&(l=i,i=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:i,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function u0(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function P_(e,t,n,r){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${r}`:a.pathname=`${a.pathname}.${r}`:a.pathname==="/"?a.pathname=`_root.${r}`:t&&ba(a.pathname,t)==="/"?a.pathname=`${dh(t)}/_root.${r}`:a.pathname=`${dh(a.pathname)}.${r}`,a}async function U4(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function q4(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function H4(e,t,n){let r=await Promise.all(e.map(async a=>{let i=t.routes[a.route.id];if(i){let l=await U4(i,n);return l.links?l.links():[]}return[]}));return V4(r.flat(1).filter(q4).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function vS(e,t,n,r,a,i){let l=(c,u)=>n[u]?c.route.id!==n[u].route.id:!0,s=(c,u)=>{var f;return n[u].pathname!==c.pathname||((f=n[u].route.path)==null?void 0:f.endsWith("*"))&&n[u].params["*"]!==c.params["*"]};return i==="assets"?t.filter((c,u)=>l(c,u)||s(c,u)):i==="data"?t.filter((c,u)=>{var d;let f=r.routes[c.route.id];if(!f||!f.hasLoader)return!1;if(l(c,u)||s(c,u))return!0;if(c.route.shouldRevalidate){let h=c.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((d=n[0])==null?void 0:d.params)||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function F4(e,t,{includeHydrateFallback:n}={}){return G4(e.map(r=>{let a=t.routes[r.route.id];if(!a)return[];let i=[a.module];return a.clientActionModule&&(i=i.concat(a.clientActionModule)),a.clientLoaderModule&&(i=i.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(i=i.concat(a.hydrateFallbackModule)),a.imports&&(i=i.concat(a.imports)),i}).flat(1))}function G4(e){return[...new Set(e)]}function K4(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function V4(e,t){let n=new Set;return new Set(t),e.reduce((r,a)=>{let i=JSON.stringify(K4(a));return n.has(i)||(n.add(i),r.push({key:i,link:a})),r},[])}function f0(){let e=O.useContext(Ms);return u0(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Y4(){let e=O.useContext(qp);return u0(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var d0=O.createContext(void 0);d0.displayName="FrameworkContext";function h0(){let e=O.useContext(d0);return u0(e,"You must render this element inside a <HydratedRouter> element"),e}function X4(e,t){let n=O.useContext(d0),[r,a]=O.useState(!1),[i,l]=O.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:u,onMouseLeave:f,onTouchStart:d}=t,h=O.useRef(null);O.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let v=y=>{y.forEach(g=>{l(g.isIntersecting)})},p=new IntersectionObserver(v,{threshold:.5});return h.current&&p.observe(h.current),()=>{p.disconnect()}}},[e]),O.useEffect(()=>{if(r){let v=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(v)}}},[r]);let m=()=>{a(!0)},j=()=>{a(!1),l(!1)};return n?e!=="intent"?[i,h,{}]:[i,h,{onFocus:ac(s,m),onBlur:ac(c,j),onMouseEnter:ac(u,m),onMouseLeave:ac(f,j),onTouchStart:ac(d,m)}]:[!1,h,{}]}function ac(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Q4({page:e,...t}){let n=l4(),{router:r}=f0(),a=O.useMemo(()=>m_(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?n?O.createElement(Z4,{page:e,matches:a,...t}):O.createElement(J4,{page:e,matches:a,...t}):null}function W4(e){let{manifest:t,routeModules:n}=h0(),[r,a]=O.useState([]);return O.useEffect(()=>{let i=!1;return H4(e,t,n).then(l=>{i||a(l)}),()=>{i=!0}},[e,t,n]),r}function Z4({page:e,matches:t,...n}){let r=Hr(),{future:a}=h0(),{basename:i}=f0(),l=O.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let s=P_(e,i,a.v8_trailingSlashAwareDataRequests,"rsc"),c=!1,u=[];for(let f of t)typeof f.route.shouldRevalidate=="function"?c=!0:u.push(f.route.id);return c&&u.length>0&&s.searchParams.set("_routes",u.join(",")),[s.pathname+s.search]},[i,a.v8_trailingSlashAwareDataRequests,e,r,t]);return O.createElement(O.Fragment,null,l.map(s=>O.createElement("link",{key:s,rel:"prefetch",as:"fetch",href:s,...n})))}function J4({page:e,matches:t,...n}){let r=Hr(),{future:a,manifest:i,routeModules:l}=h0(),{basename:s}=f0(),{loaderData:c,matches:u}=Y4(),f=O.useMemo(()=>vS(e,t,u,i,r,"data"),[e,t,u,i,r]),d=O.useMemo(()=>vS(e,t,u,i,r,"assets"),[e,t,u,i,r]),h=O.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let v=new Set,p=!1;if(t.forEach(g=>{var x;let b=i.routes[g.route.id];!b||!b.hasLoader||(!f.some(w=>w.route.id===g.route.id)&&g.route.id in c&&((x=l[g.route.id])!=null&&x.shouldRevalidate)||b.hasClientLoader?p=!0:v.add(g.route.id))}),v.size===0)return[];let y=P_(e,s,a.v8_trailingSlashAwareDataRequests,"data");return p&&v.size>0&&y.searchParams.set("_routes",t.filter(g=>v.has(g.route.id)).map(g=>g.route.id).join(",")),[y.pathname+y.search]},[s,a.v8_trailingSlashAwareDataRequests,c,r,i,f,t,e,l]),m=O.useMemo(()=>F4(d,i),[d,i]),j=W4(d);return O.createElement(O.Fragment,null,h.map(v=>O.createElement("link",{key:v,rel:"prefetch",as:"fetch",href:v,...n})),m.map(v=>O.createElement("link",{key:v,rel:"modulepreload",href:v,...n})),j.map(({key:v,link:p})=>O.createElement("link",{key:v,nonce:n.nonce,...p,crossOrigin:p.crossOrigin??n.crossOrigin})))}function e5(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var t5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{t5&&(window.__reactRouterVersion="7.17.0")}catch{}function n5({basename:e,children:t,useTransitions:n,window:r}){let a=O.useRef();a.current==null&&(a.current=MD({window:r,v5Compat:!0}));let i=a.current,[l,s]=O.useState({action:i.action,location:i.location}),c=O.useCallback(u=>{n===!1?s(u):O.startTransition(()=>s(u))},[n]);return O.useLayoutEffect(()=>i.listen(c),[i,c]),O.createElement(P4,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:i,useTransitions:n})}var M_=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,p0=O.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:a,reloadDocument:i,replace:l,mask:s,state:c,target:u,to:f,preventScrollReset:d,viewTransition:h,defaultShouldRevalidate:m,...j},v){let{basename:p,navigator:y,useTransitions:g}=O.useContext(kn),b=typeof f=="string"&&M_.test(f),x=b_(f,p);f=x.to;let w=h4(f,{relative:a}),S=Hr(),A=null;if(s){let E=Up(s,[],S.mask?S.mask.pathname:"/",!0);p!=="/"&&(E.pathname=E.pathname==="/"?p:mr([p,E.pathname])),A=y.createHref(E)}let[N,C,M]=X4(r,j),R=i5(f,{replace:l,mask:s,state:c,target:u,preventScrollReset:d,relative:a,viewTransition:h,defaultShouldRevalidate:m,useTransitions:g});function P(E){t&&t(E),E.defaultPrevented||R(E)}let B=!(x.isExternal||i),_=O.createElement("a",{...j,...M,href:(B?A:void 0)||x.absoluteURL||w,onClick:B?P:t,ref:e5(v,C),target:u,"data-discover":!b&&n==="render"?"true":void 0});return N&&!b?O.createElement(O.Fragment,null,_,O.createElement(Q4,{page:w})):_});p0.displayName="Link";var $_=O.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:a=!1,style:i,to:l,viewTransition:s,children:c,...u},f){let d=of(l,{relative:u.relative}),h=Hr(),m=O.useContext(qp),{navigator:j,basename:v}=O.useContext(kn),p=m!=null&&u5(d)&&s===!0,y=j.encodeLocation?j.encodeLocation(d).pathname:d.pathname,g=h.pathname,b=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;n||(g=g.toLowerCase(),b=b?b.toLowerCase():null,y=y.toLowerCase()),b&&v&&(b=ba(b,v)||b);const x=y!=="/"&&y.endsWith("/")?y.length-1:y.length;let w=g===y||!a&&g.startsWith(y)&&g.charAt(x)==="/",S=b!=null&&(b===y||!a&&b.startsWith(y)&&b.charAt(y.length)==="/"),A={isActive:w,isPending:S,isTransitioning:p},N=w?t:void 0,C;typeof r=="function"?C=r(A):C=[r,w?"active":null,S?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let M=typeof i=="function"?i(A):i;return O.createElement(p0,{...u,"aria-current":N,className:C,ref:f,style:M,to:l,viewTransition:s},typeof c=="function"?c(A):c)});$_.displayName="NavLink";var r5=O.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:i,method:l=Td,action:s,onSubmit:c,relative:u,preventScrollReset:f,viewTransition:d,defaultShouldRevalidate:h,...m},j)=>{let{useTransitions:v}=O.useContext(kn),p=s5(),y=c5(s,{relative:u}),g=l.toLowerCase()==="get"?"get":"post",b=typeof s=="string"&&M_.test(s),x=w=>{if(c&&c(w),w.defaultPrevented)return;w.preventDefault();let S=w.nativeEvent.submitter,A=(S==null?void 0:S.getAttribute("formmethod"))||l,N=()=>p(S||w.currentTarget,{fetcherKey:t,method:A,navigate:n,replace:a,state:i,relative:u,preventScrollReset:f,viewTransition:d,defaultShouldRevalidate:h});v&&n!==!1?O.startTransition(()=>N()):N()};return O.createElement("form",{ref:j,method:g,action:y,onSubmit:r?c:x,...m,"data-discover":!b&&e==="render"?"true":void 0})});r5.displayName="Form";function a5(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function R_(e){let t=O.useContext(Ms);return tt(t,a5(e)),t}function i5(e,{target:t,replace:n,mask:r,state:a,preventScrollReset:i,relative:l,viewTransition:s,defaultShouldRevalidate:c,useTransitions:u}={}){let f=Hp(),d=Hr(),h=of(e,{relative:l});return O.useCallback(m=>{if(L4(m,t)){m.preventDefault();let j=n!==void 0?n:iu(d)===iu(h),v=()=>f(e,{replace:j,mask:r,state:a,preventScrollReset:i,relative:l,viewTransition:s,defaultShouldRevalidate:c});u?O.startTransition(()=>v()):v()}},[d,f,h,n,r,a,t,e,i,l,s,c,u])}var l5=0,o5=()=>`__${String(++l5)}__`;function s5(){let{router:e}=R_("useSubmit"),{basename:t}=O.useContext(kn),n=N4(),r=e.fetch,a=e.navigate;return O.useCallback(async(i,l={})=>{let{action:s,method:c,encType:u,formData:f,body:d}=I4(i,t);if(l.navigate===!1){let h=l.fetcherKey||o5();await r(h,n,l.action||s,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:f,body:d,formMethod:l.method||c,formEncType:l.encType||u,flushSync:l.flushSync})}else await a(l.action||s,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:f,body:d,formMethod:l.method||c,formEncType:l.encType||u,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[r,a,t,n])}function c5(e,{relative:t}={}){let{basename:n}=O.useContext(kn),r=O.useContext(Sr);tt(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),i={...of(e||".",{relative:t})},l=Hr();if(e==null){i.search=l.search;let s=new URLSearchParams(i.search),c=s.getAll("index");if(c.some(f=>f==="")){s.delete("index"),c.filter(d=>d).forEach(d=>s.append("index",d));let f=s.toString();i.search=f?`?${f}`:""}}return(!e||e===".")&&a.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:mr([n,i.pathname])),iu(i)}function u5(e,{relative:t}={}){let n=O.useContext(w_);tt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=R_("useViewTransitionState"),a=of(e,{relative:t});if(!n.isTransitioning)return!1;let i=ba(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=ba(n.nextLocation.pathname,r)||n.nextLocation.pathname;return fh(a.pathname,l)!=null||fh(a.pathname,i)!=null}var Gp=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Zi,Ha,Ao,aE,f5=(aE=class extends Gp{constructor(){super();be(this,Zi);be(this,Ha);be(this,Ao);fe(this,Ao,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){I(this,Ha)||this.setEventListener(I(this,Ao))}onUnsubscribe(){var t;this.hasListeners()||((t=I(this,Ha))==null||t.call(this),fe(this,Ha,void 0))}setEventListener(t){var n;fe(this,Ao,t),(n=I(this,Ha))==null||n.call(this),fe(this,Ha,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){I(this,Zi)!==t&&(fe(this,Zi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof I(this,Zi)=="boolean"?I(this,Zi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Zi=new WeakMap,Ha=new WeakMap,Ao=new WeakMap,aE),k_=new f5,d5={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Fa,ab,iE,h5=(iE=class{constructor(){be(this,Fa,d5);be(this,ab,!1)}setTimeoutProvider(e){fe(this,Fa,e)}setTimeout(e,t){return I(this,Fa).setTimeout(e,t)}clearTimeout(e){I(this,Fa).clearTimeout(e)}setInterval(e,t){return I(this,Fa).setInterval(e,t)}clearInterval(e){I(this,Fa).clearInterval(e)}},Fa=new WeakMap,ab=new WeakMap,iE),vg=new h5;function p5(e){setTimeout(e,0)}var m5=typeof window>"u"||"Deno"in globalThis;function sr(){}function y5(e,t){return typeof e=="function"?e(t):e}function v5(e){return typeof e=="number"&&e>=0&&e!==1/0}function g5(e,t){return Math.max(e+(t||0)-Date.now(),0)}function gg(e,t){return typeof e=="function"?e(t):e}function x5(e,t){return typeof e=="function"?e(t):e}function gS(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:i,queryKey:l,stale:s}=e;if(l){if(r){if(t.queryHash!==m0(l,t.options))return!1}else if(!ou(t.queryKey,l))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||a&&a!==t.state.fetchStatus||i&&!i(t))}function xS(e,t){const{exact:n,status:r,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(lu(t.options.mutationKey)!==lu(i))return!1}else if(!ou(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function m0(e,t){return((t==null?void 0:t.queryKeyHashFn)||lu)(e)}function lu(e){return JSON.stringify(e,(t,n)=>xg(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function ou(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>ou(e[n],t[n])):!1}var b5=Object.prototype.hasOwnProperty;function D_(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=bS(e)&&bS(t);if(!r&&!(xg(e)&&xg(t)))return t;const i=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),s=l.length,c=r?new Array(s):{};let u=0;for(let f=0;f<s;f++){const d=r?f:l[f],h=e[d],m=t[d];if(h===m){c[d]=h,(r?f<i:b5.call(e,d))&&u++;continue}if(h===null||m===null||typeof h!="object"||typeof m!="object"){c[d]=m;continue}const j=D_(h,m,n+1);c[d]=j,j===h&&u++}return i===s&&u===i?e:c}function bS(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function xg(e){if(!jS(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!jS(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function jS(e){return Object.prototype.toString.call(e)==="[object Object]"}function j5(e){return new Promise(t=>{vg.setTimeout(t,e)})}function S5(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?D_(e,t):t}function w5(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function O5(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var y0=Symbol();function L_(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===y0?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function A5(e,t,n){let r=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),r||(r=!0,a.aborted?n():a.addEventListener("abort",n,{once:!0})),a)}),e}var z_=(()=>{let e=()=>m5;return{isServer(){return e()},setIsServer(t){e=t}}})();function N5(){let e,t;const n=new Promise((a,i)=>{e=a,t=i});n.status="pending",n.catch(()=>{});function r(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},n.reject=a=>{r({status:"rejected",reason:a}),t(a)},n}var E5=p5;function C5(){let e=[],t=0,n=s=>{s()},r=s=>{s()},a=E5;const i=s=>{t?e.push(s):a(()=>{n(s)})},l=()=>{const s=e;e=[],s.length&&a(()=>{r(()=>{s.forEach(c=>{n(c)})})})};return{batch:s=>{let c;t++;try{c=s()}finally{t--,t||l()}return c},batchCalls:s=>(...c)=>{i(()=>{s(...c)})},schedule:i,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{a=s}}}var Zt=C5(),No,Ga,Eo,lE,_5=(lE=class extends Gp{constructor(){super();be(this,No,!0);be(this,Ga);be(this,Eo);fe(this,Eo,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){I(this,Ga)||this.setEventListener(I(this,Eo))}onUnsubscribe(){var t;this.hasListeners()||((t=I(this,Ga))==null||t.call(this),fe(this,Ga,void 0))}setEventListener(t){var n;fe(this,Eo,t),(n=I(this,Ga))==null||n.call(this),fe(this,Ga,t(this.setOnline.bind(this)))}setOnline(t){I(this,No)!==t&&(fe(this,No,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return I(this,No)}},No=new WeakMap,Ga=new WeakMap,Eo=new WeakMap,lE),hh=new _5;function T5(e){return Math.min(1e3*2**e,3e4)}function B_(e){return(e??"online")==="online"?hh.isOnline():!0}var bg=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function I_(e){let t=!1,n=0,r;const a=N5(),i=()=>a.status!=="pending",l=v=>{var p;if(!i()){const y=new bg(v);h(y),(p=e.onCancel)==null||p.call(e,y)}},s=()=>{t=!0},c=()=>{t=!1},u=()=>k_.isFocused()&&(e.networkMode==="always"||hh.isOnline())&&e.canRun(),f=()=>B_(e.networkMode)&&e.canRun(),d=v=>{i()||(r==null||r(),a.resolve(v))},h=v=>{i()||(r==null||r(),a.reject(v))},m=()=>new Promise(v=>{var p;r=y=>{(i()||u())&&v(y)},(p=e.onPause)==null||p.call(e)}).then(()=>{var v;r=void 0,i()||(v=e.onContinue)==null||v.call(e)}),j=()=>{if(i())return;let v;const p=n===0?e.initialPromise:void 0;try{v=p??e.fn()}catch(y){v=Promise.reject(y)}Promise.resolve(v).then(d).catch(y=>{var S;if(i())return;const g=e.retry??(z_.isServer()?0:3),b=e.retryDelay??T5,x=typeof b=="function"?b(n,y):b,w=g===!0||typeof g=="number"&&n<g||typeof g=="function"&&g(n,y);if(t||!w){h(y);return}n++,(S=e.onFail)==null||S.call(e,n,y),j5(x).then(()=>u()?void 0:m()).then(()=>{t?h(y):j()})})};return{promise:a,status:()=>a.status,cancel:l,continue:()=>(r==null||r(),a),cancelRetry:s,continueRetry:c,canStart:f,start:()=>(f()?j():m().then(j),a)}}var Ji,oE,U_=(oE=class{constructor(){be(this,Ji)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),v5(this.gcTime)&&fe(this,Ji,vg.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(z_.isServer()?1/0:5*60*1e3))}clearGcTimeout(){I(this,Ji)!==void 0&&(vg.clearTimeout(I(this,Ji)),fe(this,Ji,void 0))}},Ji=new WeakMap,oE);function P5(e){return{onFetch:(t,n)=>{var f,d,h,m,j;const r=t.options,a=(h=(d=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:d.fetchMore)==null?void 0:h.direction,i=((m=t.state.data)==null?void 0:m.pages)||[],l=((j=t.state.data)==null?void 0:j.pageParams)||[];let s={pages:[],pageParams:[]},c=0;const u=async()=>{let v=!1;const p=b=>{A5(b,()=>t.signal,()=>v=!0)},y=L_(t.options,t.fetchOptions),g=async(b,x,w)=>{if(v)return Promise.reject(t.signal.reason);if(x==null&&b.pages.length)return Promise.resolve(b);const A=(()=>{const R={client:t.client,queryKey:t.queryKey,pageParam:x,direction:w?"backward":"forward",meta:t.options.meta};return p(R),R})(),N=await y(A),{maxPages:C}=t.options,M=w?O5:w5;return{pages:M(b.pages,N,C),pageParams:M(b.pageParams,x,C)}};if(a&&i.length){const b=a==="backward",x=b?M5:SS,w={pages:i,pageParams:l},S=x(r,w);s=await g(w,S,b)}else{const b=e??i.length;do{const x=c===0?l[0]??r.initialPageParam:SS(r,s);if(c>0&&x==null)break;s=await g(s,x),c++}while(c<b)}return s};t.options.persister?t.fetchFn=()=>{var v,p;return(p=(v=t.options).persister)==null?void 0:p.call(v,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function SS(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function M5(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Co,el,_o,Un,tl,_t,Fu,nl,Sn,q_,Zr,sE,$5=(sE=class extends U_{constructor(t){super();be(this,Sn);be(this,Co);be(this,el);be(this,_o);be(this,Un);be(this,tl);be(this,_t);be(this,Fu);be(this,nl);fe(this,nl,!1),fe(this,Fu,t.defaultOptions),this.setOptions(t.options),this.observers=[],fe(this,tl,t.client),fe(this,Un,I(this,tl).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,fe(this,el,OS(this.options)),this.state=t.state??I(this,el),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return I(this,Co)}get promise(){var t;return(t=I(this,_t))==null?void 0:t.promise}setOptions(t){if(this.options={...I(this,Fu),...t},t!=null&&t._type&&fe(this,Co,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=OS(this.options);n.data!==void 0&&(this.setState(wS(n.data,n.dataUpdatedAt)),fe(this,el,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&I(this,Un).remove(this)}setData(t,n){const r=S5(this.state.data,t,this.options);return Dt(this,Sn,Zr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){Dt(this,Sn,Zr).call(this,{type:"setState",state:t})}cancel(t){var r,a;const n=(r=I(this,_t))==null?void 0:r.promise;return(a=I(this,_t))==null||a.cancel(t),n?n.then(sr).catch(sr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return I(this,el)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>x5(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===y0||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>gg(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!g5(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=I(this,_t))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=I(this,_t))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),I(this,Un).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(I(this,_t)&&(I(this,nl)||Dt(this,Sn,q_).call(this)?I(this,_t).cancel({revert:!0}):I(this,_t).cancelRetry()),this.scheduleGc()),I(this,Un).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Dt(this,Sn,Zr).call(this,{type:"invalidate"})}async fetch(t,n){var u,f,d,h,m,j,v,p,y,g,b;if(this.state.fetchStatus!=="idle"&&((u=I(this,_t))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(I(this,_t))return I(this,_t).continueRetry(),I(this,_t).promise}if(t&&this.setOptions(t),!this.options.queryFn){const x=this.observers.find(w=>w.options.queryFn);x&&this.setOptions(x.options)}const r=new AbortController,a=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(fe(this,nl,!0),r.signal)})},i=()=>{const x=L_(this.options,n),S=(()=>{const A={client:I(this,tl),queryKey:this.queryKey,meta:this.meta};return a(A),A})();return fe(this,nl,!1),this.options.persister?this.options.persister(x,S,this):x(S)},s=(()=>{const x={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:I(this,tl),state:this.state,fetchFn:i};return a(x),x})(),c=I(this,Co)==="infinite"?P5(this.options.pages):this.options.behavior;c==null||c.onFetch(s,this),fe(this,_o,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=s.fetchOptions)==null?void 0:f.meta))&&Dt(this,Sn,Zr).call(this,{type:"fetch",meta:(d=s.fetchOptions)==null?void 0:d.meta}),fe(this,_t,I_({initialPromise:n==null?void 0:n.initialPromise,fn:s.fetchFn,onCancel:x=>{x instanceof bg&&x.revert&&this.setState({...I(this,_o),fetchStatus:"idle"}),r.abort()},onFail:(x,w)=>{Dt(this,Sn,Zr).call(this,{type:"failed",failureCount:x,error:w})},onPause:()=>{Dt(this,Sn,Zr).call(this,{type:"pause"})},onContinue:()=>{Dt(this,Sn,Zr).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}));try{const x=await I(this,_t).start();if(x===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(x),(m=(h=I(this,Un).config).onSuccess)==null||m.call(h,x,this),(v=(j=I(this,Un).config).onSettled)==null||v.call(j,x,this.state.error,this),x}catch(x){if(x instanceof bg){if(x.silent)return I(this,_t).promise;if(x.revert){if(this.state.data===void 0)throw x;return this.state.data}}throw Dt(this,Sn,Zr).call(this,{type:"error",error:x}),(y=(p=I(this,Un).config).onError)==null||y.call(p,x,this),(b=(g=I(this,Un).config).onSettled)==null||b.call(g,this.state.data,x,this),x}finally{this.scheduleGc()}}},Co=new WeakMap,el=new WeakMap,_o=new WeakMap,Un=new WeakMap,tl=new WeakMap,_t=new WeakMap,Fu=new WeakMap,nl=new WeakMap,Sn=new WeakSet,q_=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Zr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...R5(r.data,this.options),fetchMeta:t.meta??null};case"success":const a={...r,...wS(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return fe(this,_o,t.manual?a:void 0),a;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Zt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),I(this,Un).notify({query:this,type:"updated",action:t})})},sE);function R5(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:B_(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function wS(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function OS(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Gu,Cr,Ft,rl,_r,$a,cE,k5=(cE=class extends U_{constructor(t){super();be(this,_r);be(this,Gu);be(this,Cr);be(this,Ft);be(this,rl);fe(this,Gu,t.client),this.mutationId=t.mutationId,fe(this,Ft,t.mutationCache),fe(this,Cr,[]),this.state=t.state||D5(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){I(this,Cr).includes(t)||(I(this,Cr).push(t),this.clearGcTimeout(),I(this,Ft).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){fe(this,Cr,I(this,Cr).filter(n=>n!==t)),this.scheduleGc(),I(this,Ft).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){I(this,Cr).length||(this.state.status==="pending"?this.scheduleGc():I(this,Ft).remove(this))}continue(){var t;return((t=I(this,rl))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,s,c,u,f,d,h,m,j,v,p,y,g,b,x,w,S,A;const n=()=>{Dt(this,_r,$a).call(this,{type:"continue"})},r={client:I(this,Gu),meta:this.options.meta,mutationKey:this.options.mutationKey};fe(this,rl,I_({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(N,C)=>{Dt(this,_r,$a).call(this,{type:"failed",failureCount:N,error:C})},onPause:()=>{Dt(this,_r,$a).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>I(this,Ft).canRun(this)}));const a=this.state.status==="pending",i=!I(this,rl).canStart();try{if(a)n();else{Dt(this,_r,$a).call(this,{type:"pending",variables:t,isPaused:i}),I(this,Ft).config.onMutate&&await I(this,Ft).config.onMutate(t,this,r);const C=await((s=(l=this.options).onMutate)==null?void 0:s.call(l,t,r));C!==this.state.context&&Dt(this,_r,$a).call(this,{type:"pending",context:C,variables:t,isPaused:i})}const N=await I(this,rl).start();return await((u=(c=I(this,Ft).config).onSuccess)==null?void 0:u.call(c,N,t,this.state.context,this,r)),await((d=(f=this.options).onSuccess)==null?void 0:d.call(f,N,t,this.state.context,r)),await((m=(h=I(this,Ft).config).onSettled)==null?void 0:m.call(h,N,null,this.state.variables,this.state.context,this,r)),await((v=(j=this.options).onSettled)==null?void 0:v.call(j,N,null,t,this.state.context,r)),Dt(this,_r,$a).call(this,{type:"success",data:N}),N}catch(N){try{await((y=(p=I(this,Ft).config).onError)==null?void 0:y.call(p,N,t,this.state.context,this,r))}catch(C){Promise.reject(C)}try{await((b=(g=this.options).onError)==null?void 0:b.call(g,N,t,this.state.context,r))}catch(C){Promise.reject(C)}try{await((w=(x=I(this,Ft).config).onSettled)==null?void 0:w.call(x,void 0,N,this.state.variables,this.state.context,this,r))}catch(C){Promise.reject(C)}try{await((A=(S=this.options).onSettled)==null?void 0:A.call(S,void 0,N,t,this.state.context,r))}catch(C){Promise.reject(C)}throw Dt(this,_r,$a).call(this,{type:"error",error:N}),N}finally{I(this,Ft).runNext(this)}}},Gu=new WeakMap,Cr=new WeakMap,Ft=new WeakMap,rl=new WeakMap,_r=new WeakSet,$a=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Zt.batch(()=>{I(this,Cr).forEach(r=>{r.onMutationUpdate(t)}),I(this,Ft).notify({mutation:this,type:"updated",action:t})})},cE);function D5(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var na,cr,Ku,uE,L5=(uE=class extends Gp{constructor(t={}){super();be(this,na);be(this,cr);be(this,Ku);this.config=t,fe(this,na,new Set),fe(this,cr,new Map),fe(this,Ku,0)}build(t,n,r){const a=new k5({client:t,mutationCache:this,mutationId:++Af(this,Ku)._,options:t.defaultMutationOptions(n),state:r});return this.add(a),a}add(t){I(this,na).add(t);const n=Ff(t);if(typeof n=="string"){const r=I(this,cr).get(n);r?r.push(t):I(this,cr).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(I(this,na).delete(t)){const n=Ff(t);if(typeof n=="string"){const r=I(this,cr).get(n);if(r)if(r.length>1){const a=r.indexOf(t);a!==-1&&r.splice(a,1)}else r[0]===t&&I(this,cr).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Ff(t);if(typeof n=="string"){const r=I(this,cr).get(n),a=r==null?void 0:r.find(i=>i.state.status==="pending");return!a||a===t}else return!0}runNext(t){var r;const n=Ff(t);if(typeof n=="string"){const a=(r=I(this,cr).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Zt.batch(()=>{I(this,na).forEach(t=>{this.notify({type:"removed",mutation:t})}),I(this,na).clear(),I(this,cr).clear()})}getAll(){return Array.from(I(this,na))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>xS(n,r))}findAll(t={}){return this.getAll().filter(n=>xS(t,n))}notify(t){Zt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Zt.batch(()=>Promise.all(t.map(n=>n.continue().catch(sr))))}},na=new WeakMap,cr=new WeakMap,Ku=new WeakMap,uE);function Ff(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Tr,fE,z5=(fE=class extends Gp{constructor(t={}){super();be(this,Tr);this.config=t,fe(this,Tr,new Map)}build(t,n,r){const a=n.queryKey,i=n.queryHash??m0(a,n);let l=this.get(i);return l||(l=new $5({client:t,queryKey:a,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(a)}),this.add(l)),l}add(t){I(this,Tr).has(t.queryHash)||(I(this,Tr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=I(this,Tr).get(t.queryHash);n&&(t.destroy(),n===t&&I(this,Tr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Zt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return I(this,Tr).get(t)}getAll(){return[...I(this,Tr).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>gS(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>gS(t,r)):n}notify(t){Zt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Zt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Zt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Tr=new WeakMap,fE),ct,Ka,Va,To,Po,Ya,Mo,$o,dE,B5=(dE=class{constructor(e={}){be(this,ct);be(this,Ka);be(this,Va);be(this,To);be(this,Po);be(this,Ya);be(this,Mo);be(this,$o);fe(this,ct,e.queryCache||new z5),fe(this,Ka,e.mutationCache||new L5),fe(this,Va,e.defaultOptions||{}),fe(this,To,new Map),fe(this,Po,new Map),fe(this,Ya,0)}mount(){Af(this,Ya)._++,I(this,Ya)===1&&(fe(this,Mo,k_.subscribe(async e=>{e&&(await this.resumePausedMutations(),I(this,ct).onFocus())})),fe(this,$o,hh.subscribe(async e=>{e&&(await this.resumePausedMutations(),I(this,ct).onOnline())})))}unmount(){var e,t;Af(this,Ya)._--,I(this,Ya)===0&&((e=I(this,Mo))==null||e.call(this),fe(this,Mo,void 0),(t=I(this,$o))==null||t.call(this),fe(this,$o,void 0))}isFetching(e){return I(this,ct).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return I(this,Ka).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=I(this,ct).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=I(this,ct).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(gg(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return I(this,ct).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),a=I(this,ct).get(r.queryHash),i=a==null?void 0:a.state.data,l=y5(t,i);if(l!==void 0)return I(this,ct).build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return Zt.batch(()=>I(this,ct).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=I(this,ct).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=I(this,ct);Zt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=I(this,ct);return Zt.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Zt.batch(()=>I(this,ct).findAll(e).map(a=>a.cancel(n)));return Promise.all(r).then(sr).catch(sr)}invalidateQueries(e,t={}){return Zt.batch(()=>(I(this,ct).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Zt.batch(()=>I(this,ct).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,n);return n.throwOnError||(i=i.catch(sr)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(sr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=I(this,ct).build(this,t);return n.isStaleByTime(gg(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(sr).catch(sr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(sr).catch(sr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return hh.isOnline()?I(this,Ka).resumePausedMutations():Promise.resolve()}getQueryCache(){return I(this,ct)}getMutationCache(){return I(this,Ka)}getDefaultOptions(){return I(this,Va)}setDefaultOptions(e){fe(this,Va,e)}setQueryDefaults(e,t){I(this,To).set(lu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...I(this,To).values()],n={};return t.forEach(r=>{ou(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){I(this,Po).set(lu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...I(this,Po).values()],n={};return t.forEach(r=>{ou(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...I(this,Va).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=m0(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===y0&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...I(this,Va).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){I(this,ct).clear(),I(this,Ka).clear()}},ct=new WeakMap,Ka=new WeakMap,Va=new WeakMap,To=new WeakMap,Po=new WeakMap,Ya=new WeakMap,Mo=new WeakMap,$o=new WeakMap,dE),I5=O.createContext(void 0),U5=({client:e,children:t})=>(O.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),o.jsx(I5.Provider,{value:e,children:t}));/**
 * @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 q5=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),H_=(...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 H5={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 F5=O.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:i,iconNode:l,...s},c)=>O.createElement("svg",{ref:c,...H5,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:H_("lucide",a),...s},[...l.map(([u,f])=>O.createElement(u,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 te=(e,t)=>{const n=O.forwardRef(({className:r,...a},i)=>O.createElement(F5,{ref:i,iconNode:t,className:H_(`lucide-${q5(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 lo=te("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
 * @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 G5=te("AlarmClock",[["circle",{cx:"12",cy:"13",r:"8",key:"3y4lt7"}],["path",{d:"M12 9v4l2 2",key:"1c63tq"}],["path",{d:"M5 3 2 6",key:"18tl5t"}],["path",{d:"m22 6-3-3",key:"1opdir"}],["path",{d:"M6.38 18.7 4 21",key:"17xu3x"}],["path",{d:"M17.64 18.67 20 21",key:"kv2oe2"}]]);/**
 * @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 K5=te("ArrowLeftRight",[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]]);/**
 * @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 V5=te("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
 * @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 F_=te("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
 * @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 G_=te("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
 * @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 K_=te("Barcode",[["path",{d:"M3 5v14",key:"1nt18q"}],["path",{d:"M8 5v14",key:"1ybrkv"}],["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"M17 5v14",key:"ycjyhj"}],["path",{d:"M21 5v14",key:"nzette"}]]);/**
 * @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 sf=te("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 V_=te("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
 * @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 Y5=te("CalendarClock",[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);/**
 * @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 Y_=te("CalendarRange",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M17 14h-6",key:"bkmgh3"}],["path",{d:"M13 18H7",key:"bb0bb7"}],["path",{d:"M7 14h.01",key:"1qa3f1"}],["path",{d:"M17 18h.01",key:"1bdyru"}]]);/**
 * @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 X5=te("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
 * @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 X_=te("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
 * @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 Kp=te("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 Q5=te("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 ph=te("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
 * @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 Q_=te("ClipboardCheck",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]]);/**
 * @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 Go=te("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/**
 * @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 W5=te("ClipboardPen",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",key:"1oijnt"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-5.5",key:"cereej"}],["path",{d:"M4 13.5V6a2 2 0 0 1 2-2h2",key:"5ua5vh"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]]);/**
 * @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 AS=te("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
 * @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 v0=te("Columns3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
 * @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_=te("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 Z5=te("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 cl=te("Factory",[["path",{d:"M2 20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8l-7 5V8l-7 5V4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"159hny"}],["path",{d:"M17 18h1",key:"uldtlt"}],["path",{d:"M12 18h1",key:"s9uhes"}],["path",{d:"M7 18h1",key:"1neino"}]]);/**
 * @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 Z_=te("FileBadge",[["path",{d:"M12 22h6a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"12ixgl"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M5 17a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z",key:"u0c8gj"}],["path",{d:"M7 16.5 8 22l-3-1-3 1 1-5.5",key:"5gm2nr"}]]);/**
 * @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 NS=te("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 Ko=te("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
 * @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_=te("History",[["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"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
 * @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 J5=te("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 eL=te("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 g0=te("LineChart",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]);/**
 * @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 eT=te("ListChecks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
 * @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 tT=te("ListTree",[["path",{d:"M21 12h-8",key:"1bmf0i"}],["path",{d:"M21 6H8",key:"1pqkrb"}],["path",{d:"M21 18h-8",key:"1tm79t"}],["path",{d:"M3 6v4c0 1.1.9 2 2 2h3",key:"1ywdgy"}],["path",{d:"M3 10v6c0 1.1.9 2 2 2h3",key:"2wc746"}]]);/**
 * @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 tL=te("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 ES=te("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
 * @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 nT=te("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
 * @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 CS=te("PackageCheck",[["path",{d:"m16 16 2 2 4-4",key:"gfu2re"}],["path",{d:"M21 10V8a2 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 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]]);/**
 * @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=te("PackageOpen",[["path",{d:"M12 22v-9",key:"x3hkom"}],["path",{d:"M15.17 2.21a1.67 1.67 0 0 1 1.63 0L21 4.57a1.93 1.93 0 0 1 0 3.36L8.82 14.79a1.655 1.655 0 0 1-1.64 0L3 12.43a1.93 1.93 0 0 1 0-3.36z",key:"2ntwy6"}],["path",{d:"M20 13v3.87a2.06 2.06 0 0 1-1.11 1.83l-6 3.08a1.93 1.93 0 0 1-1.78 0l-6-3.08A2.06 2.06 0 0 1 4 16.87V13",key:"1pmm1c"}],["path",{d:"M21 12.43a1.93 1.93 0 0 0 0-3.36L8.83 2.2a1.64 1.64 0 0 0-1.63 0L3 4.57a1.93 1.93 0 0 0 0 3.36l12.18 6.86a1.636 1.636 0 0 0 1.63 0z",key:"12ttoo"}]]);/**
 * @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 rT=te("PackagePlus",[["path",{d:"M16 16h6",key:"100bgy"}],["path",{d:"M19 13v6",key:"85cyf1"}],["path",{d:"M21 10V8a2 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 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]]);/**
 * @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 aT=te("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 iT=te("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
 * @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 jg=te("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 at=te("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 lT=te("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/**
 * @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 nL=te("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 oT=te("Route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]);/**
 * @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 sT=te("Ruler",[["path",{d:"M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z",key:"icamh8"}],["path",{d:"m14.5 12.5 2-2",key:"inckbg"}],["path",{d:"m11.5 9.5 2-2",key:"fmmyf7"}],["path",{d:"m8.5 6.5 2-2",key:"vc6u1g"}],["path",{d:"m17.5 15.5 2-2",key:"wo5hmg"}]]);/**
 * @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 rL=te("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 ul=te("ScanSearch",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m16 16-1.9-1.9",key:"1dq9hf"}]]);/**
 * @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 cT=te("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/**
 * @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 Rs=te("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 TS=te("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 uT=te("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["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 aL=te("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 x0=te("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 Rn=te("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 tr=te("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
 * @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 su=te("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 gi=te("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 Vp=te("Truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]);/**
 * @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 iL=te("UserCog",[["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m21.7 16.4-.9-.3",key:"12j9ji"}],["path",{d:"m15.2 13.9-.9-.3",key:"1fdjdi"}],["path",{d:"m16.6 18.7.3-.9",key:"heedtr"}],["path",{d:"m19.1 12.2.3-.9",key:"1af3ki"}],["path",{d:"m19.6 18.7-.4-1",key:"1x9vze"}],["path",{d:"m16.8 12.3-.4-1",key:"vqeiwj"}],["path",{d:"m14.3 16.6 1-.4",key:"1qlj63"}],["path",{d:"m20.7 13.8 1-.4",key:"1v5t8k"}]]);/**
 * @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 fT=te("Warehouse",[["path",{d:"M22 8.35V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8.35A2 2 0 0 1 3.26 6.5l8-3.2a2 2 0 0 1 1.48 0l8 3.2A2 2 0 0 1 22 8.35Z",key:"gksnxg"}],["path",{d:"M6 18h12",key:"9pbo8z"}],["path",{d:"M6 14h12",key:"4cwo0f"}],["rect",{width:"12",height:"12",x:"6",y:"10",key:"apd30q"}]]);/**
 * @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 cf=te("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"}]]);/**
 * @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 dT=te("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),PS={SUPERADMIN:4,MANAGER:3,WORKER:2,VIEWER:1},MS=["SUPERADMIN","MANAGER","WORKER","VIEWER"];function xi(){return(localStorage.getItem("mes_role")||"VIEWER").toUpperCase()}function ks(e,t=xi()){return(PS[t]||0)>=(PS[e.toUpperCase()]||99)}const Vt=(e=xi())=>ks("WORKER",e),wr=(e=xi())=>ks("MANAGER",e),lL=(e=xi())=>ks("SUPERADMIN",e),oL=[{to:"/dashboard",label:"대시보드",icon:eL}],sL=[{to:"/jobs",label:"작업관리 ★",icon:cf},{to:"/progress",label:"진행관리 ★",icon:lo},{to:"/workorders",label:"작업지시",icon:Go},{to:"/production",label:"생산실적",icon:cl},{to:"/process-board",label:"공정진행",icon:v0},{to:"/oee",label:"설비 / OEE",icon:Ko},{to:"/tracking",label:"LOT 추적",icon:nT},{to:"/plans",label:"생산계획",icon:Y_}],cL=[{to:"/receiving",label:"입고",icon:rT},{to:"/shipping",label:"출하관리 ★",icon:Vp},{to:"/inventory",label:"재고",icon:sf},{to:"/stocktake",label:"재고실사",icon:Q_},{to:"/lotserial",label:"LOT / 시리얼",icon:K_}],uL=[{to:"/inspection",label:"검사",icon:ul},{to:"/spec",label:"검사기준",icon:sT},{to:"/ncr",label:"부적합 NCR",icon:gi},{to:"/capa",label:"시정조치 CAPA",icon:eT},{to:"/spc",label:"SPC 관리도",icon:g0},{to:"/certificate",label:"성적서",icon:Z_}],fL=[{to:"/items",label:"품목",icon:aT},{to:"/bom",label:"BOM",icon:tT},{to:"/routing",label:"라우팅",icon:oT},{to:"/partners",label:"거래처",icon:V_,min:"MANAGER"},{to:"/warehouses",label:"창고/로케이션",icon:fT}],dL=[{to:"/analytics",label:"분석 / KPI",icon:G_},{to:"/ai-tools",label:"AI 도구",icon:Rn}],hL=[{to:"/admin/users",label:"사용자/권한",icon:x0,min:"SUPERADMIN"},{to:"/admin/audit",label:"감사 로그",icon:cT,min:"MANAGER"},{to:"/admin/settings",label:"시스템 설정",icon:uT,min:"MANAGER"}],pL=({isActive:e})=>`flex items-center gap-3 px-5 py-1.5 text-sm transition-colors ${e?"bg-card text-brand border-r-2 border-brand":"text-slate-300 hover:bg-card/60"}`;function Ri({title:e,links:t,role:n}){const r=t.filter(a=>ks(a.min||"VIEWER",n));return r.length?o.jsxs(o.Fragment,{children:[e&&o.jsx("div",{className:"px-5 pt-3 pb-1 text-[10px] font-semibold tracking-wider text-slate-500 uppercase",children:e}),r.map(({to:a,label:i,icon:l})=>o.jsxs($_,{to:a,className:pL,children:[o.jsx(l,{size:16}),i]},a))]}):null}function mL(){const[e,t]=O.useState(xi);O.useEffect(()=>{const r=()=>{const i=xi();t(l=>l===i?l:i)},a=window.setInterval(r,800);return window.addEventListener("storage",r),()=>{window.clearInterval(a),window.removeEventListener("storage",r)}},[]);const n=hL.filter(r=>ks(r.min||"VIEWER",e));return o.jsxs("aside",{className:"w-60 bg-panel border-r border-edge flex flex-col",children:[o.jsxs("div",{className:"h-16 flex items-center gap-2 px-5 border-b border-edge",children:[o.jsx(W_,{className:"text-brand",size:24}),o.jsxs("div",{children:[o.jsx("div",{className:"font-bold text-base leading-tight",children:"GUARDiA MES"}),o.jsx("div",{className:"text-[11px] text-slate-400",children:"AI 제조실행시스템"})]})]}),o.jsxs("nav",{className:"flex-1 py-2 overflow-auto",children:[o.jsx(Ri,{links:oL,role:e}),o.jsx(Ri,{title:"MES 제조실행",links:sL,role:e}),o.jsx(Ri,{title:"WMS 창고관리",links:cL,role:e}),o.jsx(Ri,{title:"QMS 품질관리",links:uL,role:e}),o.jsx(Ri,{title:"기준정보",links:fL,role:e}),o.jsx(Ri,{title:"공통",links:dL,role:e}),n.length>0&&o.jsx("div",{className:"border-t border-edge mt-3",children:o.jsx(Ri,{title:"관리자",links:n,role:e})})]}),o.jsx("div",{className:"p-4 text-[11px] text-slate-500 border-t border-edge",children:"Ollama 온프레미스 · WMS·MES·QMS 통합"})]})}function hT(e,t){return function(){return e.apply(t,arguments)}}const{toString:yL}=Object.prototype,{getPrototypeOf:Yp}=Object,{iterator:Xp,toStringTag:pT}=Symbol,Qp=(e=>t=>{const n=yL.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Or=e=>(e=e.toLowerCase(),t=>Qp(t)===e),Wp=e=>t=>typeof t===e,{isArray:xl}=Array,Vo=Wp("undefined");function Ds(e){return e!==null&&!Vo(e)&&e.constructor!==null&&!Vo(e.constructor)&&pn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const mT=Or("ArrayBuffer");function vL(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&mT(e.buffer),t}const gL=Wp("string"),pn=Wp("function"),yT=Wp("number"),uf=e=>e!==null&&typeof e=="object",xL=e=>e===!0||e===!1,Md=e=>{if(Qp(e)!=="object")return!1;const t=Yp(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(pT in e)&&!(Xp in e)},bL=e=>{if(!uf(e)||Ds(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},jL=Or("Date"),SL=Or("File"),wL=e=>!!(e&&typeof e.uri<"u"),OL=e=>e&&typeof e.getParts<"u",AL=Or("Blob"),NL=Or("FileList"),EL=e=>uf(e)&&pn(e.pipe);function CL(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const $S=CL(),RS=typeof $S.FormData<"u"?$S.FormData:void 0,_L=e=>{if(!e)return!1;if(RS&&e instanceof RS)return!0;const t=Yp(e);if(!t||t===Object.prototype||!pn(e.append))return!1;const n=Qp(e);return n==="formdata"||n==="object"&&pn(e.toString)&&e.toString()==="[object FormData]"},TL=Or("URLSearchParams"),[PL,ML,$L,RL]=["ReadableStream","Request","Response","Headers"].map(Or),kL=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ff(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,a;if(typeof e!="object"&&(e=[e]),xl(e))for(r=0,a=e.length;r<a;r++)t.call(null,e[r],r,e);else{if(Ds(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),l=i.length;let s;for(r=0;r<l;r++)s=i[r],t.call(null,e[s],s,e)}}function vT(e,t){if(Ds(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,a;for(;r-- >0;)if(a=n[r],t===a.toLowerCase())return a;return null}const Ki=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,gT=e=>!Vo(e)&&e!==Ki;function Sg(...e){const{caseless:t,skipUndefined:n}=gT(this)&&this||{},r={},a=(i,l)=>{if(l==="__proto__"||l==="constructor"||l==="prototype")return;const s=t&&typeof l=="string"&&vT(r,l)||l,c=wg(r,s)?r[s]:void 0;Md(c)&&Md(i)?r[s]=Sg(c,i):Md(i)?r[s]=Sg({},i):xl(i)?r[s]=i.slice():(!n||!Vo(i))&&(r[s]=i)};for(let i=0,l=e.length;i<l;i++){const s=e[i];if(!s||Ds(s)||(ff(s,a),typeof s!="object"||xl(s)))continue;const c=Object.getOwnPropertySymbols(s);for(let u=0;u<c.length;u++){const f=c[u];VL.call(s,f)&&a(s[f],f)}}return r}const DL=(e,t,n,{allOwnKeys:r}={})=>(ff(t,(a,i)=>{n&&pn(a)?Object.defineProperty(e,i,{__proto__:null,value:hT(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),LL=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),zL=(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)},BL=(e,t,n,r)=>{let a,i,l;const s={};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))&&!s[l]&&(t[l]=e[l],s[l]=!0);e=n!==!1&&Yp(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},IL=(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},UL=e=>{if(!e)return null;if(xl(e))return e;let t=e.length;if(!yT(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},qL=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Yp(Uint8Array)),HL=(e,t)=>{const r=(e&&e[Xp]).call(e);let a;for(;(a=r.next())&&!a.done;){const i=a.value;t.call(e,i[0],i[1])}},FL=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},GL=Or("HTMLFormElement"),KL=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,a){return r.toUpperCase()+a}),wg=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),{propertyIsEnumerable:VL}=Object.prototype,YL=Or("RegExp"),xT=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ff(n,(a,i)=>{let l;(l=t(a,i,e))!==!1&&(r[i]=l||a)}),Object.defineProperties(e,r)},XL=e=>{xT(e,(t,n)=>{if(pn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(pn(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+"'")})}})},QL=(e,t)=>{const n={},r=a=>{a.forEach(i=>{n[i]=!0})};return xl(e)?r(e):r(String(e).split(t)),n},WL=()=>{},ZL=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function JL(e){return!!(e&&pn(e.append)&&e[pT]==="FormData"&&e[Xp])}const ez=e=>{const t=new WeakSet,n=r=>{if(uf(r)){if(t.has(r))return;if(Ds(r))return r;if(!("toJSON"in r)){t.add(r);const a=xl(r)?[]:{};return ff(r,(i,l)=>{const s=n(i);!Vo(s)&&(a[l]=s)}),t.delete(r),a}}return r};return n(e)},tz=Or("AsyncFunction"),nz=e=>e&&(uf(e)||pn(e))&&pn(e.then)&&pn(e.catch),bT=((e,t)=>e?setImmediate:t?((n,r)=>(Ki.addEventListener("message",({source:a,data:i})=>{a===Ki&&i===n&&r.length&&r.shift()()},!1),a=>{r.push(a),Ki.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",pn(Ki.postMessage)),rz=typeof queueMicrotask<"u"?queueMicrotask.bind(Ki):typeof process<"u"&&process.nextTick||bT,az=e=>e!=null&&pn(e[Xp]),k={isArray:xl,isArrayBuffer:mT,isBuffer:Ds,isFormData:_L,isArrayBufferView:vL,isString:gL,isNumber:yT,isBoolean:xL,isObject:uf,isPlainObject:Md,isEmptyObject:bL,isReadableStream:PL,isRequest:ML,isResponse:$L,isHeaders:RL,isUndefined:Vo,isDate:jL,isFile:SL,isReactNativeBlob:wL,isReactNative:OL,isBlob:AL,isRegExp:YL,isFunction:pn,isStream:EL,isURLSearchParams:TL,isTypedArray:qL,isFileList:NL,forEach:ff,merge:Sg,extend:DL,trim:kL,stripBOM:LL,inherits:zL,toFlatObject:BL,kindOf:Qp,kindOfTest:Or,endsWith:IL,toArray:UL,forEachEntry:HL,matchAll:FL,isHTMLForm:GL,hasOwnProperty:wg,hasOwnProp:wg,reduceDescriptors:xT,freezeMethods:XL,toObjectSet:QL,toCamelCase:KL,noop:WL,toFiniteNumber:ZL,findKey:vT,global:Ki,isContextDefined:gT,isSpecCompliantForm:JL,toJSONObject:ez,isAsyncFn:tz,isThenable:nz,setImmediate:bT,asap:rz,isIterable:az},iz=k.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"]),lz=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]&&iz[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function oz(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){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 sz=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),cz=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function b0(e,t){return k.isArray(e)?e.map(n=>b0(n,t)):oz(String(e).replace(t,""))}const uz=e=>b0(e,sz),fz=e=>b0(e,cz);function jT(e){const t=Object.create(null);return k.forEach(e.toJSON(),(n,r)=>{t[r]=fz(n)}),t}const kS=Symbol("internals");function ic(e){return e&&String(e).trim().toLowerCase()}function $d(e){return e===!1||e==null?e:k.isArray(e)?e.map($d):uz(String(e))}function dz(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 hz=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ly(e,t,n,r,a){if(k.isFunction(r))return r.call(this,t,n);if(a&&(t=n),!!k.isString(t)){if(k.isString(r))return t.indexOf(r)!==-1;if(k.isRegExp(r))return r.test(t)}}function pz(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function mz(e,t){const n=k.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 rn=class{constructor(t){t&&this.set(t)}set(t,n,r){const a=this;function i(s,c,u){const f=ic(c);if(!f)return;const d=k.findKey(a,f);(!d||a[d]===void 0||u===!0||u===void 0&&a[d]!==!1)&&(a[d||c]=$d(s))}const l=(s,c)=>k.forEach(s,(u,f)=>i(u,f,c));if(k.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(k.isString(t)&&(t=t.trim())&&!hz(t))l(lz(t),n);else if(k.isObject(t)&&k.isIterable(t)){let s={},c,u;for(const f of t){if(!k.isArray(f))throw new TypeError("Object iterator must return a key-value pair");s[u=f[0]]=(c=s[u])?k.isArray(c)?[...c,f[1]]:[c,f[1]]:f[1]}l(s,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=ic(t),t){const r=k.findKey(this,t);if(r){const a=this[r];if(!n)return a;if(n===!0)return dz(a);if(k.isFunction(n))return n.call(this,a,r);if(k.isRegExp(n))return n.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ic(t),t){const r=k.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ly(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let a=!1;function i(l){if(l=ic(l),l){const s=k.findKey(r,l);s&&(!n||Ly(r,r[s],s,n))&&(delete r[s],a=!0)}}return k.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||Ly(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){const n=this,r={};return k.forEach(this,(a,i)=>{const l=k.findKey(r,i);if(l){n[l]=$d(a),delete n[i];return}const s=t?pz(i):String(i).trim();s!==i&&delete n[i],n[s]=$d(a),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return k.forEach(this,(r,a)=>{r!=null&&r!==!1&&(n[a]=t&&k.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[kS]=this[kS]={accessors:{}}).accessors,a=this.prototype;function i(l){const s=ic(l);r[s]||(mz(a,l),r[s]=!0)}return k.isArray(t)?t.forEach(i):i(t),this}};rn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);k.reduceDescriptors(rn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});k.freezeMethods(rn);const yz="[REDACTED ****]";function vz(e){if(k.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(k.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function gz(e,t){const n=new Set(t.map(i=>String(i).toLowerCase())),r=[],a=i=>{if(i===null||typeof i!="object"||k.isBuffer(i))return i;if(r.indexOf(i)!==-1)return;i instanceof rn&&(i=i.toJSON()),r.push(i);let l;if(k.isArray(i))l=[],i.forEach((s,c)=>{const u=a(s);k.isUndefined(u)||(l[c]=u)});else{if(!k.isPlainObject(i)&&vz(i))return r.pop(),i;l=Object.create(null);for(const[s,c]of Object.entries(i)){const u=n.has(s.toLowerCase())?yz:a(c);k.isUndefined(u)||(l[s]=u)}}return r.pop(),l};return a(e)}let ne=class ST extends Error{static from(t,n,r,a,i,l){const s=new ST(t.message,n||t.code,r,a,i);return s.cause=t,s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),l&&Object.assign(s,l),s}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&&k.hasOwnProp(t,"redact")?t.redact:void 0,r=k.isArray(n)&&n.length>0?gz(t,n):k.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}}};ne.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";ne.ERR_BAD_OPTION="ERR_BAD_OPTION";ne.ECONNABORTED="ECONNABORTED";ne.ETIMEDOUT="ETIMEDOUT";ne.ECONNREFUSED="ECONNREFUSED";ne.ERR_NETWORK="ERR_NETWORK";ne.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";ne.ERR_DEPRECATED="ERR_DEPRECATED";ne.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";ne.ERR_BAD_REQUEST="ERR_BAD_REQUEST";ne.ERR_CANCELED="ERR_CANCELED";ne.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";ne.ERR_INVALID_URL="ERR_INVALID_URL";ne.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const xz=null;function Og(e){return k.isPlainObject(e)||k.isArray(e)}function wT(e){return k.endsWith(e,"[]")?e.slice(0,-2):e}function zy(e,t,n){return e?e.concat(t).map(function(a,i){return a=wT(a),!n&&i?"["+a+"]":a}).join(n?".":""):t}function bz(e){return k.isArray(e)&&!e.some(Og)}const jz=k.toFlatObject(k,{},null,function(t){return/^is[A-Z]/.test(t)});function Zp(e,t,n){if(!k.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=k.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,y){return!k.isUndefined(y[p])});const r=n.metaTokens,a=n.visitor||d,i=n.dots,l=n.indexes,s=n.Blob||typeof Blob<"u"&&Blob,c=n.maxDepth===void 0?100:n.maxDepth,u=s&&k.isSpecCompliantForm(t);if(!k.isFunction(a))throw new TypeError("visitor must be a function");function f(v){if(v===null)return"";if(k.isDate(v))return v.toISOString();if(k.isBoolean(v))return v.toString();if(!u&&k.isBlob(v))throw new ne("Blob is not supported. Use a Buffer instead.");return k.isArrayBuffer(v)||k.isTypedArray(v)?u&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function d(v,p,y){let g=v;if(k.isReactNative(t)&&k.isReactNativeBlob(v))return t.append(zy(y,p,i),f(v)),!1;if(v&&!y&&typeof v=="object"){if(k.endsWith(p,"{}"))p=r?p:p.slice(0,-2),v=JSON.stringify(v);else if(k.isArray(v)&&bz(v)||(k.isFileList(v)||k.endsWith(p,"[]"))&&(g=k.toArray(v)))return p=wT(p),g.forEach(function(x,w){!(k.isUndefined(x)||x===null)&&t.append(l===!0?zy([p],w,i):l===null?p:p+"[]",f(x))}),!1}return Og(v)?!0:(t.append(zy(y,p,i),f(v)),!1)}const h=[],m=Object.assign(jz,{defaultVisitor:d,convertValue:f,isVisitable:Og});function j(v,p,y=0){if(!k.isUndefined(v)){if(y>c)throw new ne("Object is too deeply nested ("+y+" levels). Max depth: "+c,ne.ERR_FORM_DATA_DEPTH_EXCEEDED);if(h.indexOf(v)!==-1)throw new Error("Circular reference detected in "+p.join("."));h.push(v),k.forEach(v,function(b,x){(!(k.isUndefined(b)||b===null)&&a.call(t,b,k.isString(x)?x.trim():x,p,m))===!0&&j(b,p?p.concat(x):[x],y+1)}),h.pop()}}if(!k.isObject(e))throw new TypeError("data must be an object");return j(e),t}function DS(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function j0(e,t){this._pairs=[],e&&Zp(e,this,t)}const OT=j0.prototype;OT.append=function(t,n){this._pairs.push([t,n])};OT.toString=function(t){const n=t?function(r){return t.call(this,r,DS)}:DS;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};function Sz(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function AT(e,t,n){if(!t)return e;const r=n&&n.encode||Sz,a=k.isFunction(n)?{serialize:n}:n,i=a&&a.serialize;let l;if(i?l=i(t,a):l=k.isURLSearchParams(t)?t.toString():new j0(t,a).toString(r),l){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+l}return e}class LS{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){k.forEach(this.handlers,function(r){r!==null&&t(r)})}}const S0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1},wz=typeof URLSearchParams<"u"?URLSearchParams:j0,Oz=typeof FormData<"u"?FormData:null,Az=typeof Blob<"u"?Blob:null,Nz={isBrowser:!0,classes:{URLSearchParams:wz,FormData:Oz,Blob:Az},protocols:["http","https","file","blob","url","data"]},w0=typeof window<"u"&&typeof document<"u",Ag=typeof navigator=="object"&&navigator||void 0,Ez=w0&&(!Ag||["ReactNative","NativeScript","NS"].indexOf(Ag.product)<0),Cz=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_z=w0&&window.location.href||"http://localhost",Tz=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:w0,hasStandardBrowserEnv:Ez,hasStandardBrowserWebWorkerEnv:Cz,navigator:Ag,origin:_z},Symbol.toStringTag,{value:"Module"})),Ut={...Tz,...Nz};function Pz(e,t){return Zp(e,new Ut.classes.URLSearchParams,{visitor:function(n,r,a,i){return Ut.isNode&&k.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function Mz(e){return k.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function $z(e){const t={},n=Object.keys(e);let r;const a=n.length;let i;for(r=0;r<a;r++)i=n[r],t[i]=e[i];return t}function NT(e){function t(n,r,a,i){let l=n[i++];if(l==="__proto__")return!0;const s=Number.isFinite(+l),c=i>=n.length;return l=!l&&k.isArray(a)?a.length:l,c?(k.hasOwnProp(a,l)?a[l]=k.isArray(a[l])?a[l].concat(r):[a[l],r]:a[l]=r,!s):((!k.hasOwnProp(a,l)||!k.isObject(a[l]))&&(a[l]=[]),t(n,r,a[l],i)&&k.isArray(a[l])&&(a[l]=$z(a[l])),!s)}if(k.isFormData(e)&&k.isFunction(e.entries)){const n={};return k.forEachEntry(e,(r,a)=>{t(Mz(r),a,n,0)}),n}return null}const Bl=(e,t)=>e!=null&&k.hasOwnProp(e,t)?e[t]:void 0;function Rz(e,t,n){if(k.isString(e))try{return(t||JSON.parse)(e),k.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const df={transitional:S0,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",a=r.indexOf("application/json")>-1,i=k.isObject(t);if(i&&k.isHTMLForm(t)&&(t=new FormData(t)),k.isFormData(t))return a?JSON.stringify(NT(t)):t;if(k.isArrayBuffer(t)||k.isBuffer(t)||k.isStream(t)||k.isFile(t)||k.isBlob(t)||k.isReadableStream(t))return t;if(k.isArrayBufferView(t))return t.buffer;if(k.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){const c=Bl(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Pz(t,c).toString();if((s=k.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=Bl(this,"env"),f=u&&u.FormData;return Zp(s?{"files[]":t}:t,f&&new f,c)}}return i||a?(n.setContentType("application/json",!1),Rz(t)):t}],transformResponse:[function(t){const n=Bl(this,"transitional")||df.transitional,r=n&&n.forcedJSONParsing,a=Bl(this,"responseType"),i=a==="json";if(k.isResponse(t)||k.isReadableStream(t))return t;if(t&&k.isString(t)&&(r&&!a||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,Bl(this,"parseReviver"))}catch(c){if(s)throw c.name==="SyntaxError"?ne.from(c,ne.ERR_BAD_RESPONSE,this,null,Bl(this,"response")):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ut.classes.FormData,Blob:Ut.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};k.forEach(["delete","get","head","post","put","patch","query"],e=>{df.headers[e]={}});function By(e,t){const n=this||df,r=t||n,a=rn.from(r.headers);let i=r.data;return k.forEach(e,function(s){i=s.call(n,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function ET(e){return!!(e&&e.__CANCEL__)}let hf=class extends ne{constructor(t,n,r){super(t??"canceled",ne.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function CT(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ne("Request failed with status code "+n.status,n.status>=400&&n.status<500?ne.ERR_BAD_REQUEST:ne.ERR_BAD_RESPONSE,n.config,n.request,n))}function kz(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Dz(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(c){const u=Date.now(),f=r[i];l||(l=u),n[a]=c,r[a]=u;let d=i,h=0;for(;d!==a;)h+=n[d++],d=d%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),u-l<t)return;const m=f&&u-f;return m?Math.round(h*1e3/m):void 0}}function Lz(e,t){let n=0,r=1e3/t,a,i;const l=(u,f=Date.now())=>{n=f,a=null,i&&(clearTimeout(i),i=null),e(...u)};return[(...u)=>{const f=Date.now(),d=f-n;d>=r?l(u,f):(a=u,i||(i=setTimeout(()=>{i=null,l(a)},r-d)))},()=>a&&l(a)]}const mh=(e,t,n=3)=>{let r=0;const a=Dz(50,250);return Lz(i=>{if(!i||typeof i.loaded!="number")return;const l=i.loaded,s=i.lengthComputable?i.total:void 0,c=s!=null?Math.min(l,s):l,u=Math.max(0,c-r),f=a(u);r=Math.max(r,c);const d={loaded:c,total:s,progress:s?c/s:void 0,bytes:u,rate:f||void 0,estimated:f&&s?(s-c)/f:void 0,event:i,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(d)},n)},zS=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},BS=e=>(...t)=>k.asap(()=>e(...t)),zz=Ut.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ut.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ut.origin),Ut.navigator&&/(msie|trident)/i.test(Ut.navigator.userAgent)):()=>!0,Bz=Ut.hasStandardBrowserEnv?{write(e,t,n,r,a,i,l){if(typeof document>"u")return;const s=[`${e}=${encodeURIComponent(t)}`];k.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),k.isString(r)&&s.push(`path=${r}`),k.isString(a)&&s.push(`domain=${a}`),i===!0&&s.push("secure"),k.isString(l)&&s.push(`SameSite=${l}`),document.cookie=s.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),a=r.indexOf("=");if(a!==-1&&r.slice(0,a)===e)return decodeURIComponent(r.slice(a+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Iz(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Uz(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function _T(e,t,n){let r=!Iz(t);return e&&(r||n===!1)?Uz(e,t):t}const IS=e=>e instanceof rn?{...e}:e;function bl(e,t){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(u,f,d,h){return k.isPlainObject(u)&&k.isPlainObject(f)?k.merge.call({caseless:h},u,f):k.isPlainObject(f)?k.merge({},f):k.isArray(f)?f.slice():f}function a(u,f,d,h){if(k.isUndefined(f)){if(!k.isUndefined(u))return r(void 0,u,d,h)}else return r(u,f,d,h)}function i(u,f){if(!k.isUndefined(f))return r(void 0,f)}function l(u,f){if(k.isUndefined(f)){if(!k.isUndefined(u))return r(void 0,u)}else return r(void 0,f)}function s(u,f,d){if(k.hasOwnProp(t,d))return r(u,f);if(k.hasOwnProp(e,d))return r(void 0,u)}const c={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:s,headers:(u,f,d)=>a(IS(u),IS(f),d,!0)};return k.forEach(Object.keys({...e,...t}),function(f){if(f==="__proto__"||f==="constructor"||f==="prototype")return;const d=k.hasOwnProp(c,f)?c[f]:a,h=k.hasOwnProp(e,f)?e[f]:void 0,m=k.hasOwnProp(t,f)?t[f]:void 0,j=d(h,m,f);k.isUndefined(j)&&d!==s||(n[f]=j)}),n}const qz=["content-type","content-length"];function Hz(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,a])=>{qz.includes(r.toLowerCase())&&e.set(r,a)})}const Fz=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function TT(e){const t=bl({},e),n=h=>k.hasOwnProp(t,h)?t[h]:void 0,r=n("data");let a=n("withXSRFToken");const i=n("xsrfHeaderName"),l=n("xsrfCookieName");let s=n("headers");const c=n("auth"),u=n("baseURL"),f=n("allowAbsoluteUrls"),d=n("url");if(t.headers=s=rn.from(s),t.url=AT(_T(u,d,f),n("params"),n("paramsSerializer")),c&&s.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?Fz(c.password):""))),k.isFormData(r)&&(Ut.hasStandardBrowserEnv||Ut.hasStandardBrowserWebWorkerEnv||k.isReactNative(r)?s.setContentType(void 0):k.isFunction(r.getHeaders)&&Hz(s,r.getHeaders(),n("formDataHeaderPolicy"))),Ut.hasStandardBrowserEnv&&(k.isFunction(a)&&(a=a(t)),a===!0||a==null&&zz(t.url))){const m=i&&l&&Bz.read(l);m&&s.set(i,m)}return t}const Gz=typeof XMLHttpRequest<"u",Kz=Gz&&function(e){return new Promise(function(n,r){const a=TT(e);let i=a.data;const l=rn.from(a.headers).normalize();let{responseType:s,onUploadProgress:c,onDownloadProgress:u}=a,f,d,h,m,j;function v(){m&&m(),j&&j(),a.cancelToken&&a.cancelToken.unsubscribe(f),a.signal&&a.signal.removeEventListener("abort",f)}let p=new XMLHttpRequest;p.open(a.method.toUpperCase(),a.url,!0),p.timeout=a.timeout;function y(){if(!p)return;const b=rn.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),w={data:!s||s==="text"||s==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:b,config:e,request:p};CT(function(A){n(A),v()},function(A){r(A),v()},w),p=null}"onloadend"in p?p.onloadend=y:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.startsWith("file:"))||setTimeout(y)},p.onabort=function(){p&&(r(new ne("Request aborted",ne.ECONNABORTED,e,p)),v(),p=null)},p.onerror=function(x){const w=x&&x.message?x.message:"Network Error",S=new ne(w,ne.ERR_NETWORK,e,p);S.event=x||null,r(S),v(),p=null},p.ontimeout=function(){let x=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const w=a.transitional||S0;a.timeoutErrorMessage&&(x=a.timeoutErrorMessage),r(new ne(x,w.clarifyTimeoutError?ne.ETIMEDOUT:ne.ECONNABORTED,e,p)),v(),p=null},i===void 0&&l.setContentType(null),"setRequestHeader"in p&&k.forEach(jT(l),function(x,w){p.setRequestHeader(w,x)}),k.isUndefined(a.withCredentials)||(p.withCredentials=!!a.withCredentials),s&&s!=="json"&&(p.responseType=a.responseType),u&&([h,j]=mh(u,!0),p.addEventListener("progress",h)),c&&p.upload&&([d,m]=mh(c),p.upload.addEventListener("progress",d),p.upload.addEventListener("loadend",m)),(a.cancelToken||a.signal)&&(f=b=>{p&&(r(!b||b.type?new hf(null,e,p):b),p.abort(),v(),p=null)},a.cancelToken&&a.cancelToken.subscribe(f),a.signal&&(a.signal.aborted?f():a.signal.addEventListener("abort",f)));const g=kz(a.url);if(g&&!Ut.protocols.includes(g)){r(new ne("Unsupported protocol "+g+":",ne.ERR_BAD_REQUEST,e));return}p.send(i||null)})},Vz=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const a=function(c){if(!r){r=!0,l();const u=c instanceof Error?c:this.reason;n.abort(u instanceof ne?u:new hf(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,a(new ne(`timeout of ${t}ms exceeded`,ne.ETIMEDOUT))},t);const l=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(a):c.removeEventListener("abort",a)}),e=null)};e.forEach(c=>c.addEventListener("abort",a));const{signal:s}=n;return s.unsubscribe=()=>k.asap(l),s},Yz=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,a;for(;r<n;)a=r+t,yield e.slice(r,a),r=a},Xz=async function*(e,t){for await(const n of Qz(e))yield*Yz(n,t)},Qz=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},US=(e,t,n,r)=>{const a=Xz(e,t);let i=0,l,s=c=>{l||(l=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:f}=await a.next();if(u){s(),c.close();return}let d=f.byteLength;if(n){let h=i+=d;n(h)}c.enqueue(new Uint8Array(f))}catch(u){throw s(u),u}},cancel(c){return s(c),a.return()}},{highWaterMark:2})};function Wz(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let l=r.length;const s=r.length;for(let m=0;m<s;m++)if(r.charCodeAt(m)===37&&m+2<s){const j=r.charCodeAt(m+1),v=r.charCodeAt(m+2);(j>=48&&j<=57||j>=65&&j<=70||j>=97&&j<=102)&&(v>=48&&v<=57||v>=65&&v<=70||v>=97&&v<=102)&&(l-=2,m+=2)}let c=0,u=s-1;const f=m=>m>=2&&r.charCodeAt(m-2)===37&&r.charCodeAt(m-1)===51&&(r.charCodeAt(m)===68||r.charCodeAt(m)===100);u>=0&&(r.charCodeAt(u)===61?(c++,u--):f(u)&&(c++,u-=3)),c===1&&u>=0&&(r.charCodeAt(u)===61||f(u))&&c++;const h=Math.floor(l/4)*3-(c||0);return h>0?h:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let i=0;for(let l=0,s=r.length;l<s;l++){const c=r.charCodeAt(l);if(c<128)i+=1;else if(c<2048)i+=2;else if(c>=55296&&c<=56319&&l+1<s){const u=r.charCodeAt(l+1);u>=56320&&u<=57343?(i+=4,l++):i+=3}else i+=3}return i}const O0="1.17.0",qS=64*1024,{isFunction:Gf}=k,Zz=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),HS=e=>{if(!k.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},FS=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Jz=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},e6=e=>{const t=k.global!==void 0&&k.global!==null?k.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=k.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:a,Request:i,Response:l}=e,s=a?Gf(a):typeof fetch=="function",c=Gf(i),u=Gf(l);if(!s)return!1;const f=s&&Gf(n),d=s&&(typeof r=="function"?(y=>g=>y.encode(g))(new r):async y=>new Uint8Array(await new i(y).arrayBuffer())),h=c&&f&&FS(()=>{let y=!1;const g=new i(Ut.origin,{body:new n,method:"POST",get duplex(){return y=!0,"half"}}),b=g.headers.has("Content-Type");return g.body!=null&&g.body.cancel(),y&&!b}),m=u&&f&&FS(()=>k.isReadableStream(new l("").body)),j={stream:m&&(y=>y.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!j[y]&&(j[y]=(g,b)=>{let x=g&&g[y];if(x)return x.call(g);throw new ne(`Response type '${y}' is not supported`,ne.ERR_NOT_SUPPORT,b)})});const v=async y=>{if(y==null)return 0;if(k.isBlob(y))return y.size;if(k.isSpecCompliantForm(y))return(await new i(Ut.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(k.isArrayBufferView(y)||k.isArrayBuffer(y))return y.byteLength;if(k.isURLSearchParams(y)&&(y=y+""),k.isString(y))return(await d(y)).byteLength},p=async(y,g)=>{const b=k.toFiniteNumber(y.getContentLength());return b??v(g)};return async y=>{let{url:g,method:b,data:x,signal:w,cancelToken:S,timeout:A,onDownloadProgress:N,onUploadProgress:C,responseType:M,headers:R,withCredentials:P="same-origin",fetchOptions:B,maxContentLength:_,maxBodyLength:E}=TT(y);const $=k.isNumber(_)&&_>-1,L=k.isNumber(E)&&E>-1,q=ae=>k.hasOwnProp(y,ae)?y[ae]:void 0;let V=a||fetch;M=M?(M+"").toLowerCase():"text";let X=Vz([w,S&&S.toAbortSignal()],A),J=null;const Q=X&&X.unsubscribe&&(()=>{X.unsubscribe()});let ie;try{let ae;const Se=q("auth");if(Se){const W=Se.username||"",G=Se.password||"";ae={username:W,password:G}}if(Jz(g)){const W=new URL(g,Ut.origin);if(!ae&&(W.username||W.password)){const G=HS(W.username),Te=HS(W.password);ae={username:G,password:Te}}(W.username||W.password)&&(W.username="",W.password="",g=W.href)}if(ae&&(R.delete("authorization"),R.set("Authorization","Basic "+btoa(Zz((ae.username||"")+":"+(ae.password||""))))),$&&typeof g=="string"&&g.startsWith("data:")&&Wz(g)>_)throw new ne("maxContentLength size of "+_+" exceeded",ne.ERR_BAD_RESPONSE,y,J);if(L&&b!=="get"&&b!=="head"){const W=await p(R,x);if(typeof W=="number"&&isFinite(W)&&W>E)throw new ne("Request body larger than maxBodyLength limit",ne.ERR_BAD_REQUEST,y,J)}if(C&&h&&b!=="get"&&b!=="head"&&(ie=await p(R,x))!==0){let W=new i(g,{method:"POST",body:x,duplex:"half"}),G;if(k.isFormData(x)&&(G=W.headers.get("content-type"))&&R.setContentType(G),W.body){const[Te,ye]=zS(ie,mh(BS(C)));x=US(W.body,qS,Te,ye)}}k.isString(P)||(P=P?"include":"omit");const Xt=c&&"credentials"in i.prototype;if(k.isFormData(x)){const W=R.getContentType();W&&/^multipart\/form-data/i.test(W)&&!/boundary=/i.test(W)&&R.delete("content-type")}R.set("User-Agent","axios/"+O0,!1);const Nr={...B,signal:X,method:b.toUpperCase(),headers:jT(R.normalize()),body:x,duplex:"half",credentials:Xt?P:void 0};J=c&&new i(g,Nr);let Ge=await(c?V(J,B):V(g,Nr));if($){const W=k.toFiniteNumber(Ge.headers.get("content-length"));if(W!=null&&W>_)throw new ne("maxContentLength size of "+_+" exceeded",ne.ERR_BAD_RESPONSE,y,J)}const Z=m&&(M==="stream"||M==="response");if(m&&Ge.body&&(N||$||Z&&Q)){const W={};["status","statusText","headers"].forEach(yt=>{W[yt]=Ge[yt]});const G=k.toFiniteNumber(Ge.headers.get("content-length")),[Te,ye]=N&&zS(G,mh(BS(N),!0))||[];let ot=0;const dt=yt=>{if($&&(ot=yt,ot>_))throw new ne("maxContentLength size of "+_+" exceeded",ne.ERR_BAD_RESPONSE,y,J);Te&&Te(yt)};Ge=new l(US(Ge.body,qS,dt,()=>{ye&&ye(),Q&&Q()}),W)}M=M||"text";let oe=await j[k.findKey(j,M)||"text"](Ge,y);if($&&!m&&!Z){let W;if(oe!=null&&(typeof oe.byteLength=="number"?W=oe.byteLength:typeof oe.size=="number"?W=oe.size:typeof oe=="string"&&(W=typeof r=="function"?new r().encode(oe).byteLength:oe.length)),typeof W=="number"&&W>_)throw new ne("maxContentLength size of "+_+" exceeded",ne.ERR_BAD_RESPONSE,y,J)}return!Z&&Q&&Q(),await new Promise((W,G)=>{CT(W,G,{data:oe,headers:rn.from(Ge.headers),status:Ge.status,statusText:Ge.statusText,config:y,request:J})})}catch(ae){if(Q&&Q(),X&&X.aborted&&X.reason instanceof ne){const Se=X.reason;throw Se.config=y,J&&(Se.request=J),ae!==Se&&(Se.cause=ae),Se}throw ae&&ae.name==="TypeError"&&/Load failed|fetch/i.test(ae.message)?Object.assign(new ne("Network Error",ne.ERR_NETWORK,y,J,ae&&ae.response),{cause:ae.cause||ae}):ne.from(ae,ae&&ae.code,y,J,ae&&ae.response)}}},t6=new Map,PT=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:a}=t,i=[r,a,n];let l=i.length,s=l,c,u,f=t6;for(;s--;)c=i[s],u=f.get(c),u===void 0&&f.set(c,u=s?new Map:e6(t)),f=u;return u};PT();const A0={http:xz,xhr:Kz,fetch:{get:PT}};k.forEach(A0,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const GS=e=>`- ${e}`,n6=e=>k.isFunction(e)||e===null||e===!1;function r6(e,t){e=k.isArray(e)?e:[e];const{length:n}=e;let r,a;const i={};for(let l=0;l<n;l++){r=e[l];let s;if(a=r,!n6(r)&&(a=A0[(s=String(r)).toLowerCase()],a===void 0))throw new ne(`Unknown adapter '${s}'`);if(a&&(k.isFunction(a)||(a=a.get(t))))break;i[s||"#"+l]=a}if(!a){const l=Object.entries(i).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let s=n?l.length>1?`since :
`+l.map(GS).join(`
`):" "+GS(l[0]):"as no adapter specified";throw new ne("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return a}const MT={getAdapter:r6,adapters:A0};function Iy(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new hf(null,e)}function KS(e){return Iy(e),e.headers=rn.from(e.headers),e.data=By.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),MT.getAdapter(e.adapter||df.adapter,e)(e).then(function(r){Iy(e),e.response=r;try{r.data=By.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=rn.from(r.headers),r},function(r){if(!ET(r)&&(Iy(e),r&&r.response)){e.response=r.response;try{r.response.data=By.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=rn.from(r.response.headers)}return Promise.reject(r)})}const Jp={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Jp[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const VS={};Jp.transitional=function(t,n,r){function a(i,l){return"[Axios v"+O0+"] Transitional option '"+i+"'"+l+(r?". "+r:"")}return(i,l,s)=>{if(t===!1)throw new ne(a(l," has been removed"+(n?" in "+n:"")),ne.ERR_DEPRECATED);return n&&!VS[l]&&(VS[l]=!0,console.warn(a(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,l,s):!0}};Jp.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function a6(e,t,n){if(typeof e!="object")throw new ne("options must be an object",ne.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 s=e[i],c=s===void 0||l(s,i,e);if(c!==!0)throw new ne("option "+i+" must be "+c,ne.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ne("Unknown option "+i,ne.ERR_BAD_OPTION)}}const Rd={assertOptions:a6,validators:Jp},cn=Rd.validators;let fl=class{constructor(t){this.defaults=t||{},this.interceptors={request:new LS,response:new LS}}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(`
`),s=l===-1?-1:i.indexOf(`
`,l+1),c=s===-1?"":i.slice(s+1);String(r.stack).endsWith(c)||(r.stack+=`
`+i)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=bl(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:i}=n;r!==void 0&&Rd.assertOptions(r,{silentJSONParsing:cn.transitional(cn.boolean),forcedJSONParsing:cn.transitional(cn.boolean),clarifyTimeoutError:cn.transitional(cn.boolean),legacyInterceptorReqResOrdering:cn.transitional(cn.boolean),advertiseZstdAcceptEncoding:cn.transitional(cn.boolean)},!1),a!=null&&(k.isFunction(a)?n.paramsSerializer={serialize:a}:Rd.assertOptions(a,{encode:cn.function,serialize:cn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Rd.assertOptions(n,{baseUrl:cn.spelling("baseURL"),withXsrfToken:cn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=i&&k.merge(i.common,i[n.method]);i&&k.forEach(["delete","get","head","post","put","patch","query","common"],j=>{delete i[j]}),n.headers=rn.concat(l,i);const s=[];let c=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;c=c&&v.synchronous;const p=n.transitional||S0;p&&p.legacyInterceptorReqResOrdering?s.unshift(v.fulfilled,v.rejected):s.push(v.fulfilled,v.rejected)});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let f,d=0,h;if(!c){const j=[KS.bind(this),void 0];for(j.unshift(...s),j.push(...u),h=j.length,f=Promise.resolve(n);d<h;)f=f.then(j[d++],j[d++]);return f}h=s.length;let m=n;for(;d<h;){const j=s[d++],v=s[d++];try{m=j(m)}catch(p){v.call(this,p);break}}try{f=KS.call(this,m)}catch(j){return Promise.reject(j)}for(d=0,h=u.length;d<h;)f=f.then(u[d++],u[d++]);return f}getUri(t){t=bl(this.defaults,t);const n=_T(t.baseURL,t.url,t.allowAbsoluteUrls);return AT(n,t.params,t.paramsSerializer)}};k.forEach(["delete","get","head","options"],function(t){fl.prototype[t]=function(n,r){return this.request(bl(r||{},{method:t,url:n,data:(r||{}).data}))}});k.forEach(["post","put","patch","query"],function(t){function n(r){return function(i,l,s){return this.request(bl(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:l}))}}fl.prototype[t]=n(),t!=="query"&&(fl.prototype[t+"Form"]=n(!0))});let i6=class $T{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(a=>{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(s=>{r.subscribe(s),i=s}).then(a);return l.cancel=function(){r.unsubscribe(i)},l},t(function(i,l,s){r.reason||(r.reason=new hf(i,l,s),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 $T(function(a){t=a}),cancel:t}}};function l6(e){return function(n){return e.apply(null,n)}}function o6(e){return k.isObject(e)&&e.isAxiosError===!0}const Ng={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(Ng).forEach(([e,t])=>{Ng[t]=e});function RT(e){const t=new fl(e),n=hT(fl.prototype.request,t);return k.extend(n,fl.prototype,t,{allOwnKeys:!0}),k.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return RT(bl(e,a))},n}const mt=RT(df);mt.Axios=fl;mt.CanceledError=hf;mt.CancelToken=i6;mt.isCancel=ET;mt.VERSION=O0;mt.toFormData=Zp;mt.AxiosError=ne;mt.Cancel=mt.CanceledError;mt.all=function(t){return Promise.all(t)};mt.spread=l6;mt.isAxiosError=o6;mt.mergeConfig=bl;mt.AxiosHeaders=rn;mt.formToJSON=e=>NT(k.isHTMLForm(e)?new FormData(e):e);mt.getAdapter=MT.getAdapter;mt.HttpStatusCode=Ng;mt.default=mt;const{Axios:Lpe,AxiosError:zpe,CanceledError:Bpe,isCancel:Ipe,CancelToken:Upe,VERSION:qpe,all:Hpe,Cancel:Fpe,isAxiosError:Gpe,spread:Kpe,toFormData:Vpe,AxiosHeaders:Ype,HttpStatusCode:Xpe,formToJSON:Qpe,getAdapter:Wpe,mergeConfig:Zpe,create:Jpe}=mt,z=mt.create({baseURL:"http://localhost:8013"});z.interceptors.request.use(e=>{const t=localStorage.getItem("mes_token");return t&&(e.headers.Authorization=`Bearer ${t}`),e});z.interceptors.response.use(e=>e,e=>{var t;return((t=e.response)==null?void 0:t.status)===401&&(localStorage.removeItem("mes_token"),location.pathname!=="/login"&&(location.href="/login")),Promise.reject(e)});const H=e=>e.then(t=>{var n;return(n=t.data)==null?void 0:n.data}),it=e=>{const t=new URLSearchParams;Object.entries(e).forEach(([r,a])=>{a!=null&&a!==""&&t.set(r,String(a))});const n=t.toString();return n?`?${n}`:""},s6=(e,t)=>z.post("/api/mes/auth/login",{username:e,password:t}),kT=()=>z.get("/api/mes/auth/me"),c6=()=>H(z.get("/api/mes/dashboard/summary")),u6=()=>H(z.get("/api/mes/dashboard/workorder-status")),f6=()=>H(z.get("/api/mes/dashboard/shipping-status")),d6=()=>H(z.get("/api/mes/dashboard/equipment-status")),h6=(e={})=>H(z.get(`/api/mes/jobs${it(e)}`)),p6=()=>H(z.get("/api/mes/jobs/board")),m6=()=>H(z.get("/api/mes/jobs/workload")),y6=e=>H(z.post("/api/mes/jobs",e)),v6=(e,t)=>H(z.put(`/api/mes/jobs/${e}`,t)),g6=(e,t)=>H(z.post(`/api/mes/jobs/${e}/assign`,t)),x6=(e,t)=>H(z.post(`/api/mes/jobs/${e}/transition`,{action:t})),b6=(e,t)=>H(z.post(`/api/mes/jobs/${e}/report`,{qty:t})),j6=e=>z.delete(`/api/mes/jobs/${e}`),DT=()=>H(z.get("/api/mes/progress/summary")),S6=(e="")=>H(z.get(`/api/mes/progress/workorders${e?`?status=${e}`:""}`)),w6=()=>H(z.get("/api/mes/progress/live")),O6=(e=30)=>H(z.get(`/api/mes/progress/plan-vs-actual?days=${e}`)),A6=()=>H(z.get("/api/mes/progress/delays")),N6=(e={})=>H(z.get(`/api/mes/shipping${it(e)}`)),E6=()=>H(z.get("/api/mes/shipping/board")),C6=e=>H(z.get(`/api/mes/shipping/${e}`)),_6=e=>H(z.post("/api/mes/shipping",e)),T6=(e,t)=>H(z.put(`/api/mes/shipping/${e}`,t)),P6=(e,t)=>H(z.post(`/api/mes/shipping/${e}/pick`,{qty:t})),M6=(e,t)=>H(z.post(`/api/mes/shipping/${e}/pack`,{qty:t})),$6=(e,t)=>H(z.post(`/api/mes/shipping/${e}/inspect`,{result:t})),R6=e=>H(z.post(`/api/mes/shipping/${e}/ship`)),k6=e=>H(z.post(`/api/mes/shipping/${e}/cancel`)),em=(e={})=>H(z.get(`/api/mes/workorders${it(e)}`)),D6=()=>H(z.get("/api/mes/workorders/kanban")),L6=e=>H(z.post("/api/mes/workorders",e)),z6=(e,t)=>H(z.put(`/api/mes/workorders/${e}`,t)),B6=(e,t)=>H(z.post(`/api/mes/workorders/${e}/transition`,{action:t})),I6=e=>z.delete(`/api/mes/workorders/${e}`),U6=(e={})=>H(z.get(`/api/mes/production${it(e)}`)),q6=(e=14)=>H(z.get(`/api/mes/production/daily-output?days=${e}`)),H6=(e=30)=>H(z.get(`/api/mes/production/defect-pareto?days=${e}`)),F6=e=>H(z.post("/api/mes/production/report",e)),G6=e=>H(z.get(`/api/mes/process/workorder/${e}`)),K6=()=>H(z.get("/api/mes/process/running")),V6=(e,t)=>H(z.put(`/api/mes/process/${e}/status`,{status:t})),Y6=(e={})=>H(z.get(`/api/mes/oee${it(e)}`)),X6=e=>H(z.post("/api/mes/oee",e)),Q6=(e=30)=>H(z.get(`/api/mes/oee/downtime-pareto?days=${e}`)),W6=e=>H(z.get(`/api/mes/tracking/lot/${encodeURIComponent(e)}/history`)),Z6=e=>H(z.get(`/api/mes/tracking/lot/${encodeURIComponent(e)}/forward`)),J6=e=>H(z.get(`/api/mes/tracking/lot/${encodeURIComponent(e)}/backward`)),e8=(e={})=>H(z.get(`/api/mes/plans${it(e)}`)),t8=e=>H(z.post("/api/mes/plans",e)),n8=(e,t)=>H(z.put(`/api/mes/plans/${e}`,t)),r8=(e,t)=>H(z.post(`/api/mes/plans/${e}/transition`,{action:t})),a8=e=>z.delete(`/api/mes/plans/${e}`),i8=(e={})=>H(z.get(`/api/mes/receiving${it(e)}`)),l8=e=>H(z.post("/api/mes/receiving",e)),o8=(e,t)=>H(z.post(`/api/mes/receiving/${e}/accept`,{inspectionResult:t})),s8=(e,t)=>H(z.post(`/api/mes/receiving/${e}/reject`,{reason:t})),c8=(e={})=>H(z.get(`/api/mes/inventory${it(e)}`)),u8=()=>H(z.get("/api/mes/inventory/below-safety")),f8=(e={})=>H(z.get(`/api/mes/inventory/txns${it(e)}`)),d8=e=>H(z.post("/api/mes/inventory/transfer",e)),h8=(e={})=>H(z.get(`/api/mes/stocktake${it(e)}`)),p8=e=>H(z.post("/api/mes/stocktake/count",e)),m8=e=>H(z.post(`/api/mes/stocktake/${e}/adjust`)),y8=(e={})=>H(z.get(`/api/mes/lotserial${it(e)}`)),v8=(e=30)=>H(z.get(`/api/mes/lotserial/expiring?days=${e}`)),g8=e=>H(z.post("/api/mes/lotserial",e)),x8=(e,t)=>H(z.put(`/api/mes/lotserial/${e}/status`,{status:t})),b8=(e={})=>H(z.get(`/api/mes/inspections${it(e)}`)),j8=(e=30)=>H(z.get(`/api/mes/inspections/pass-rate?days=${e}`)),S8=e=>H(z.post("/api/mes/inspections",e)),w8=(e,t)=>H(z.post(`/api/mes/inspections/${e}/judge`,t)),O8=(e,t)=>H(z.post(`/api/mes/inspections/${e}/result`,t)),A8=(e={})=>H(z.get(`/api/mes/specs${it(e)}`)),N8=e=>H(z.post("/api/mes/specs",e)),E8=(e,t)=>H(z.put(`/api/mes/specs/${e}`,t)),C8=e=>z.delete(`/api/mes/specs/${e}`),_8=(e={})=>H(z.get(`/api/mes/ncr${it(e)}`)),T8=()=>H(z.get("/api/mes/ncr/board")),P8=e=>H(z.post("/api/mes/ncr",e)),M8=(e,t)=>H(z.post(`/api/mes/ncr/${e}/disposition`,{disposition:t})),$8=(e,t)=>H(z.post(`/api/mes/ncr/${e}/transition`,{status:t})),R8=(e={})=>H(z.get(`/api/mes/capa${it(e)}`)),k8=e=>H(z.post("/api/mes/capa",e)),D8=(e,t)=>H(z.put(`/api/mes/capa/${e}`,t)),L8=(e,t)=>H(z.post(`/api/mes/capa/${e}/transition`,t)),z8=()=>H(z.get("/api/mes/spc/charts")),B8=(e={})=>H(z.get(`/api/mes/spc/samples${it(e)}`)),I8=e=>H(z.get(`/api/mes/spc/chart${it(e)}`)),U8=e=>H(z.post("/api/mes/spc/samples",e)),q8=(e={})=>H(z.get(`/api/mes/certificates${it(e)}`)),H8=e=>H(z.get(`/api/mes/certificates/${e}`)),F8=e=>H(z.post("/api/mes/certificates",e)),Yt=(e={})=>H(z.get(`/api/mes/items${it(e)}`)),G8=e=>H(z.post("/api/mes/items",e)),K8=(e,t)=>H(z.put(`/api/mes/items/${e}`,t)),V8=e=>z.delete(`/api/mes/items/${e}`),Y8=(e={})=>H(z.get(`/api/mes/bom${it(e)}`)),X8=()=>H(z.get("/api/mes/bom/all")),Q8=e=>H(z.post("/api/mes/bom",e)),W8=(e,t)=>H(z.put(`/api/mes/bom/${e}`,t)),Z8=e=>z.delete(`/api/mes/bom/${e}`),J8=(e="")=>H(z.get(`/api/mes/routings${e?`?itemCode=${encodeURIComponent(e)}`:""}`)),eB=e=>H(z.post("/api/mes/routings",e)),tB=(e,t)=>H(z.put(`/api/mes/routings/${e}`,t)),nB=e=>z.delete(`/api/mes/routings/${e}`),N0=(e={})=>H(z.get(`/api/mes/equipment${it(e)}`)),rB=(e,t)=>H(z.put(`/api/mes/equipment/${e}/run-status`,{runStatus:t})),E0=(e={})=>H(z.get(`/api/mes/partners${it(e)}`)),aB=e=>H(z.post("/api/mes/partners",e)),iB=(e,t)=>H(z.put(`/api/mes/partners/${e}`,t)),lB=e=>z.delete(`/api/mes/partners/${e}`),pf=()=>H(z.get("/api/mes/warehouses")),oB=e=>H(z.post("/api/mes/warehouses",e)),sB=(e,t)=>H(z.put(`/api/mes/warehouses/${e}`,t)),cB=e=>z.delete(`/api/mes/warehouses/${e}`),uB=e=>H(z.get(`/api/mes/warehouses/${encodeURIComponent(e)}/locations`)),fB=e=>H(z.post("/api/mes/warehouses/locations",e)),dB=e=>z.delete(`/api/mes/warehouses/locations/${e}`),LT=()=>H(z.get("/api/mes/members/workers")),hB=(e=30)=>H(z.get(`/api/mes/analytics/production-kpi?days=${e}`)),pB=(e=30)=>H(z.get(`/api/mes/analytics/quality-kpi?days=${e}`)),mB=()=>H(z.get("/api/mes/analytics/inventory-kpi")),zT=(e=14)=>H(z.get(`/api/mes/analytics/daily-production?days=${e}`)),yB=(e=30,t=10)=>H(z.get(`/api/mes/analytics/top-items?days=${e}&limit=${t}`)),BT=()=>H(z.get("/api/mes/ai/status")),vB=e=>H(z.post("/api/mes/ai/defect-root-cause",e)),gB=e=>H(z.post("/api/mes/ai/forecast",e)),xB=e=>H(z.post("/api/mes/ai/predictive-maintenance",e)),bB=e=>H(z.post("/api/mes/ai/spc-anomaly",e)),jB=e=>H(z.post("/api/mes/ai/parse-query",e)),SB=e=>H(z.post("/api/mes/ai/safety-stock",e)),wB=e=>H(z.post("/api/mes/ai/schedule-optimize",e)),OB=()=>z.get("/api/admin/users"),AB=e=>z.post("/api/admin/users",e),NB=(e,t)=>z.put(`/api/admin/users/${e}/role`,{role:t}),EB=(e,t)=>z.put(`/api/admin/users/${e}/active`,{active:t}),CB=(e,t)=>z.put(`/api/admin/users/${e}/password`,{password:t}),_B=e=>z.delete(`/api/admin/users/${e}`),TB=(e="",t="",n=200)=>z.get(`/api/admin/audit${it({action:e,actor:t,limit:n})}`),PB=()=>z.get("/api/admin/settings"),MB=(e,t)=>z.put(`/api/admin/settings/${encodeURIComponent(e)}`,{value:t});function $B(){const e=Hp(),t=localStorage.getItem("mes_user")||"admin",n=localStorage.getItem("mes_role")||"",[r,a]=O.useState(null);O.useEffect(()=>{BT().then(l=>a(!!((l==null?void 0:l.ollamaAvailable)??(l==null?void 0:l.available)))).catch(()=>a(!1))},[]);const i=()=>{localStorage.removeItem("mes_token"),localStorage.removeItem("mes_role"),localStorage.removeItem("mes_user"),e("/login")};return o.jsxs("header",{className:"h-16 bg-panel border-b border-edge flex items-center justify-between px-6",children:[o.jsx("div",{className:"text-sm text-slate-400",children:"AI 제조실행시스템 · WMS · MES · QMS · Ollama 온프레미스"}),o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsxs("span",{className:`flex items-center gap-1.5 text-xs px-2 py-1 rounded-md border ${r?"text-accent border-accent/30 bg-accent/10":"text-slate-400 border-edge bg-card"}`,children:[o.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${r?"bg-accent":"bg-slate-500"}`}),"AI ",r===null?"확인 중":r?"온라인":"폴백"]}),o.jsxs("span",{className:"flex items-center gap-1.5 text-sm text-slate-300",children:[o.jsx(Q5,{size:18})," ",t,n&&o.jsxs("span",{className:"text-[11px] text-slate-500",children:["(",n,")"]})]}),o.jsxs("button",{onClick:i,className:"flex items-center gap-1.5 text-sm text-slate-400 hover:text-brand",children:[o.jsx(tL,{size:16})," 로그아웃"]})]})]})}function RB(){const e=localStorage.getItem("mes_token");return O.useEffect(()=>{e&&kT().then(t=>{var r;const n=((r=t.data)==null?void 0:r.data)||{};n.role&&localStorage.setItem("mes_role",n.role),n.username&&localStorage.setItem("mes_user",n.username)}).catch(()=>{})},[e]),e?o.jsxs("div",{className:"flex h-screen bg-ink",children:[o.jsx(mL,{}),o.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[o.jsx($B,{}),o.jsx("main",{className:"flex-1 overflow-auto p-6",children:o.jsx(T4,{})})]})]}):o.jsx(T_,{to:"/login",replace:!0})}function Kf({min:e,children:t}){const[n,r]=O.useState(xi());return O.useEffect(()=>{const a=window.setInterval(()=>{const i=xi();r(l=>l===i?l:i)},500);return()=>window.clearInterval(a)},[]),ks(e,n)?o.jsx(o.Fragment,{children:t}):o.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[o.jsx(aL,{size:48,className:"text-rose-400 mb-4"}),o.jsx("h2",{className:"text-lg font-bold mb-1",children:"접근 권한이 없습니다"}),o.jsxs("p",{className:"text-sm text-slate-400",children:["이 화면은 ",o.jsx("b",{className:"text-brand",children:e})," 이상 권한이 필요합니다. (현재: ",n,")"]})]})}function kB(){const[e,t]=O.useState("admin"),[n,r]=O.useState(""),[a,i]=O.useState(""),[l,s]=O.useState(!1),c=Hp(),u=async f=>{var d,h,m;f.preventDefault(),i(""),s(!0);try{const v=(h=(d=(await s6(e,n)).data)==null?void 0:d.data)==null?void 0:h.token;if(!v)throw new Error("no token");localStorage.setItem("mes_token",v);try{const y=((m=(await kT()).data)==null?void 0:m.data)||{};y.role&&localStorage.setItem("mes_role",y.role),y.username&&localStorage.setItem("mes_user",y.username)}catch{}c("/dashboard")}catch{i("로그인 실패 — 아이디/비밀번호를 확인하세요.")}finally{s(!1)}};return o.jsx("div",{className:"min-h-screen flex items-center justify-center bg-ink",children:o.jsxs("form",{onSubmit:u,className:"w-[360px] bg-panel border border-edge rounded-2xl p-8",children:[o.jsxs("div",{className:"flex items-center gap-2 justify-center mb-6",children:[o.jsx(W_,{className:"text-brand",size:32}),o.jsx("span",{className:"text-xl font-bold",children:"GUARDiA MES"})]}),o.jsx("p",{className:"text-center text-sm text-slate-400 mb-6",children:"AI 제조실행시스템 · WMS · MES · QMS"}),o.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"아이디"}),o.jsx("input",{value:e,onChange:f=>t(f.target.value),className:"w-full mb-4 px-3 py-2 rounded-lg bg-card border border-edge text-sm focus:border-brand outline-none"}),o.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"비밀번호"}),o.jsx("input",{type:"password",value:n,onChange:f=>r(f.target.value),className:"w-full mb-4 px-3 py-2 rounded-lg bg-card border border-edge text-sm focus:border-brand outline-none"}),a&&o.jsx("p",{className:"text-rose-400 text-xs mb-3",children:a}),o.jsx("button",{disabled:l,className:"w-full py-2.5 rounded-lg bg-brand text-ink font-semibold hover:bg-brand/90 disabled:opacity-60",children:l?"로그인 중…":"로그인"}),o.jsx("p",{className:"text-center text-[11px] text-slate-500 mt-4",children:"admin / manager / worker · admin123"})]})})}function IT(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<a;t++)e[t]&&(n=IT(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function de(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=IT(e))&&(r&&(r+=" "),r+=t);return r}var DB=Array.isArray,vn=DB,LB=typeof Nf=="object"&&Nf&&Nf.Object===Object&&Nf,UT=LB,zB=UT,BB=typeof self=="object"&&self&&self.Object===Object&&self,IB=zB||BB||Function("return this")(),Fr=IB,UB=Fr,qB=UB.Symbol,mf=qB,YS=mf,qT=Object.prototype,HB=qT.hasOwnProperty,FB=qT.toString,lc=YS?YS.toStringTag:void 0;function GB(e){var t=HB.call(e,lc),n=e[lc];try{e[lc]=void 0;var r=!0}catch{}var a=FB.call(e);return r&&(t?e[lc]=n:delete e[lc]),a}var KB=GB,VB=Object.prototype,YB=VB.toString;function XB(e){return YB.call(e)}var QB=XB,XS=mf,WB=KB,ZB=QB,JB="[object Null]",eI="[object Undefined]",QS=XS?XS.toStringTag:void 0;function tI(e){return e==null?e===void 0?eI:JB:QS&&QS in Object(e)?WB(e):ZB(e)}var Aa=tI;function nI(e){return e!=null&&typeof e=="object"}var Na=nI,rI=Aa,aI=Na,iI="[object Symbol]";function lI(e){return typeof e=="symbol"||aI(e)&&rI(e)==iI}var Ls=lI,oI=vn,sI=Ls,cI=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,uI=/^\w*$/;function fI(e,t){if(oI(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||sI(e)?!0:uI.test(e)||!cI.test(e)||t!=null&&e in Object(t)}var C0=fI;function dI(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ai=dI;const zs=_e(Ai);var hI=Aa,pI=Ai,mI="[object AsyncFunction]",yI="[object Function]",vI="[object GeneratorFunction]",gI="[object Proxy]";function xI(e){if(!pI(e))return!1;var t=hI(e);return t==yI||t==vI||t==mI||t==gI}var _0=xI;const se=_e(_0);var bI=Fr,jI=bI["__core-js_shared__"],SI=jI,Uy=SI,WS=function(){var e=/[^.]+$/.exec(Uy&&Uy.keys&&Uy.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function wI(e){return!!WS&&WS in e}var OI=wI,AI=Function.prototype,NI=AI.toString;function EI(e){if(e!=null){try{return NI.call(e)}catch{}try{return e+""}catch{}}return""}var HT=EI,CI=_0,_I=OI,TI=Ai,PI=HT,MI=/[\\^$.*+?()[\]{}|]/g,$I=/^\[object .+?Constructor\]$/,RI=Function.prototype,kI=Object.prototype,DI=RI.toString,LI=kI.hasOwnProperty,zI=RegExp("^"+DI.call(LI).replace(MI,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function BI(e){if(!TI(e)||_I(e))return!1;var t=CI(e)?zI:$I;return t.test(PI(e))}var II=BI;function UI(e,t){return e==null?void 0:e[t]}var qI=UI,HI=II,FI=qI;function GI(e,t){var n=FI(e,t);return HI(n)?n:void 0}var Pl=GI,KI=Pl,VI=KI(Object,"create"),tm=VI,ZS=tm;function YI(){this.__data__=ZS?ZS(null):{},this.size=0}var XI=YI;function QI(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var WI=QI,ZI=tm,JI="__lodash_hash_undefined__",eU=Object.prototype,tU=eU.hasOwnProperty;function nU(e){var t=this.__data__;if(ZI){var n=t[e];return n===JI?void 0:n}return tU.call(t,e)?t[e]:void 0}var rU=nU,aU=tm,iU=Object.prototype,lU=iU.hasOwnProperty;function oU(e){var t=this.__data__;return aU?t[e]!==void 0:lU.call(t,e)}var sU=oU,cU=tm,uU="__lodash_hash_undefined__";function fU(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=cU&&t===void 0?uU:t,this}var dU=fU,hU=XI,pU=WI,mU=rU,yU=sU,vU=dU;function Bs(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Bs.prototype.clear=hU;Bs.prototype.delete=pU;Bs.prototype.get=mU;Bs.prototype.has=yU;Bs.prototype.set=vU;var gU=Bs;function xU(){this.__data__=[],this.size=0}var bU=xU;function jU(e,t){return e===t||e!==e&&t!==t}var T0=jU,SU=T0;function wU(e,t){for(var n=e.length;n--;)if(SU(e[n][0],t))return n;return-1}var nm=wU,OU=nm,AU=Array.prototype,NU=AU.splice;function EU(e){var t=this.__data__,n=OU(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():NU.call(t,n,1),--this.size,!0}var CU=EU,_U=nm;function TU(e){var t=this.__data__,n=_U(t,e);return n<0?void 0:t[n][1]}var PU=TU,MU=nm;function $U(e){return MU(this.__data__,e)>-1}var RU=$U,kU=nm;function DU(e,t){var n=this.__data__,r=kU(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var LU=DU,zU=bU,BU=CU,IU=PU,UU=RU,qU=LU;function Is(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Is.prototype.clear=zU;Is.prototype.delete=BU;Is.prototype.get=IU;Is.prototype.has=UU;Is.prototype.set=qU;var rm=Is,HU=Pl,FU=Fr,GU=HU(FU,"Map"),P0=GU,JS=gU,KU=rm,VU=P0;function YU(){this.size=0,this.__data__={hash:new JS,map:new(VU||KU),string:new JS}}var XU=YU;function QU(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var WU=QU,ZU=WU;function JU(e,t){var n=e.__data__;return ZU(t)?n[typeof t=="string"?"string":"hash"]:n.map}var am=JU,e7=am;function t7(e){var t=e7(this,e).delete(e);return this.size-=t?1:0,t}var n7=t7,r7=am;function a7(e){return r7(this,e).get(e)}var i7=a7,l7=am;function o7(e){return l7(this,e).has(e)}var s7=o7,c7=am;function u7(e,t){var n=c7(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var f7=u7,d7=XU,h7=n7,p7=i7,m7=s7,y7=f7;function Us(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Us.prototype.clear=d7;Us.prototype.delete=h7;Us.prototype.get=p7;Us.prototype.has=m7;Us.prototype.set=y7;var M0=Us,FT=M0,v7="Expected a function";function $0(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(v7);var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var l=e.apply(this,r);return n.cache=i.set(a,l)||i,l};return n.cache=new($0.Cache||FT),n}$0.Cache=FT;var GT=$0;const g7=_e(GT);var x7=GT,b7=500;function j7(e){var t=x7(e,function(r){return n.size===b7&&n.clear(),r}),n=t.cache;return t}var S7=j7,w7=S7,O7=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,A7=/\\(\\)?/g,N7=w7(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(O7,function(n,r,a,i){t.push(a?i.replace(A7,"$1"):r||n)}),t}),E7=N7;function C7(e,t){for(var n=-1,r=e==null?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}var R0=C7,ew=mf,_7=R0,T7=vn,P7=Ls,tw=ew?ew.prototype:void 0,nw=tw?tw.toString:void 0;function KT(e){if(typeof e=="string")return e;if(T7(e))return _7(e,KT)+"";if(P7(e))return nw?nw.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var M7=KT,$7=M7;function R7(e){return e==null?"":$7(e)}var VT=R7,k7=vn,D7=C0,L7=E7,z7=VT;function B7(e,t){return k7(e)?e:D7(e,t)?[e]:L7(z7(e))}var YT=B7,I7=Ls;function U7(e){if(typeof e=="string"||I7(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var im=U7,q7=YT,H7=im;function F7(e,t){t=q7(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[H7(t[n++])];return n&&n==r?e:void 0}var k0=F7,G7=k0;function K7(e,t,n){var r=e==null?void 0:G7(e,t);return r===void 0?n:r}var XT=K7;const Pn=_e(XT);function V7(e){return e==null}var Y7=V7;const le=_e(Y7);var X7=Aa,Q7=vn,W7=Na,Z7="[object String]";function J7(e){return typeof e=="string"||!Q7(e)&&W7(e)&&X7(e)==Z7}var e9=J7;const jl=_e(e9);var QT={exports:{}},$e={};/**
 * @license React
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var D0=Symbol.for("react.element"),L0=Symbol.for("react.portal"),lm=Symbol.for("react.fragment"),om=Symbol.for("react.strict_mode"),sm=Symbol.for("react.profiler"),cm=Symbol.for("react.provider"),um=Symbol.for("react.context"),t9=Symbol.for("react.server_context"),fm=Symbol.for("react.forward_ref"),dm=Symbol.for("react.suspense"),hm=Symbol.for("react.suspense_list"),pm=Symbol.for("react.memo"),mm=Symbol.for("react.lazy"),n9=Symbol.for("react.offscreen"),WT;WT=Symbol.for("react.module.reference");function ar(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case D0:switch(e=e.type,e){case lm:case sm:case om:case dm:case hm:return e;default:switch(e=e&&e.$$typeof,e){case t9:case um:case fm:case mm:case pm:case cm:return e;default:return t}}case L0:return t}}}$e.ContextConsumer=um;$e.ContextProvider=cm;$e.Element=D0;$e.ForwardRef=fm;$e.Fragment=lm;$e.Lazy=mm;$e.Memo=pm;$e.Portal=L0;$e.Profiler=sm;$e.StrictMode=om;$e.Suspense=dm;$e.SuspenseList=hm;$e.isAsyncMode=function(){return!1};$e.isConcurrentMode=function(){return!1};$e.isContextConsumer=function(e){return ar(e)===um};$e.isContextProvider=function(e){return ar(e)===cm};$e.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===D0};$e.isForwardRef=function(e){return ar(e)===fm};$e.isFragment=function(e){return ar(e)===lm};$e.isLazy=function(e){return ar(e)===mm};$e.isMemo=function(e){return ar(e)===pm};$e.isPortal=function(e){return ar(e)===L0};$e.isProfiler=function(e){return ar(e)===sm};$e.isStrictMode=function(e){return ar(e)===om};$e.isSuspense=function(e){return ar(e)===dm};$e.isSuspenseList=function(e){return ar(e)===hm};$e.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===lm||e===sm||e===om||e===dm||e===hm||e===n9||typeof e=="object"&&e!==null&&(e.$$typeof===mm||e.$$typeof===pm||e.$$typeof===cm||e.$$typeof===um||e.$$typeof===fm||e.$$typeof===WT||e.getModuleId!==void 0)};$e.typeOf=ar;QT.exports=$e;var r9=QT.exports,a9=Aa,i9=Na,l9="[object Number]";function o9(e){return typeof e=="number"||i9(e)&&a9(e)==l9}var ZT=o9;const s9=_e(ZT);var c9=ZT;function u9(e){return c9(e)&&e!=+e}var f9=u9;const qs=_e(f9);var en=function(t){return t===0?0:t>0?1:-1},Vi=function(t){return jl(t)&&t.indexOf("%")===t.length-1},Y=function(t){return s9(t)&&!qs(t)},d9=function(t){return le(t)},Nt=function(t){return Y(t)||jl(t)},h9=0,Ni=function(t){var n=++h9;return"".concat(t||"").concat(n)},tn=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)&&!jl(t))return r;var i;if(Vi(t)){var l=t.indexOf("%");i=n*parseFloat(t.slice(0,l))/100}else i=+t;return qs(i)&&(i=r),a&&i>n&&(i=n),i},qa=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},p9=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},a=0;a<n;a++)if(!r[t[a]])r[t[a]]=!0;else return!0;return!1},nt=function(t,n){return Y(t)&&Y(n)?function(r){return t+r*(n-t)}:function(){return n}};function yh(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):Pn(r,t))===n})}var m9=function(t){if(!t||!t.length)return null;for(var n=t.length,r=0,a=0,i=0,l=0,s=1/0,c=-1/0,u=0,f=0,d=0;d<n;d++)u=t[d].cx||0,f=t[d].cy||0,r+=u,a+=f,i+=u*f,l+=u*u,s=Math.min(s,u),c=Math.max(c,u);var h=n*l!==r*r?(n*i-r*a)/(n*l-r*r):0;return{xmin:s,xmax:c,a:h,b:(a-h*r)/n}},y9=function(t,n){return Y(t)&&Y(n)?t-n:jl(t)&&jl(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function jo(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function Eg(e){"@babel/helpers - typeof";return Eg=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},Eg(e)}var v9=["viewBox","children"],g9=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],rw=["points","pathLength"],qy={svg:v9,polygon:rw,polyline:rw},z0=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],vh=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(O.isValidElement(t)&&(r=t.props),!zs(r))return null;var a={};return Object.keys(r).forEach(function(i){z0.includes(i)&&(a[i]=n||function(l){return r[i](r,l)})}),a},x9=function(t,n,r){return function(a){return t(n,r,a),null}},bi=function(t,n,r){if(!zs(t)||Eg(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(i){var l=t[i];z0.includes(i)&&typeof l=="function"&&(a||(a={}),a[i]=x9(l,n,r))}),a},b9=["children"],j9=["children"];function aw(e,t){if(e==null)return{};var n=S9(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function S9(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 Cg(e){"@babel/helpers - typeof";return Cg=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},Cg(e)}var iw={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"},ha=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},lw=null,Hy=null,B0=function e(t){if(t===lw&&Array.isArray(Hy))return Hy;var n=[];return O.Children.forEach(t,function(r){le(r)||(r9.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),Hy=n,lw=t,n};function an(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(a){return ha(a)}):r=[ha(t)],B0(e).forEach(function(a){var i=Pn(a,"type.displayName")||Pn(a,"type.name");r.indexOf(i)!==-1&&n.push(a)}),n}function jn(e,t){var n=an(e,t);return n&&n[0]}var ow=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)},w9=["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"],O9=function(t){return t&&t.type&&jl(t.type)&&w9.indexOf(t.type)>=0},JT=function(t){return t&&Cg(t)==="object"&&"clipDot"in t},A9=function(t,n,r,a){var i,l=(i=qy==null?void 0:qy[a])!==null&&i!==void 0?i:[];return n.startsWith("data-")||!se(t)&&(a&&l.includes(n)||g9.includes(n))||r&&z0.includes(n)},re=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(O.isValidElement(t)&&(a=t.props),!zs(a))return null;var i={};return Object.keys(a).forEach(function(l){var s;A9((s=a)===null||s===void 0?void 0:s[l],l,n,r)&&(i[l]=a[l])}),i},_g=function e(t,n){if(t===n)return!0;var r=O.Children.count(t);if(r!==O.Children.count(n))return!1;if(r===0)return!0;if(r===1)return sw(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var a=0;a<r;a++){var i=t[a],l=n[a];if(Array.isArray(i)||Array.isArray(l)){if(!e(i,l))return!1}else if(!sw(i,l))return!1}return!0},sw=function(t,n){if(le(t)&&le(n))return!0;if(!le(t)&&!le(n)){var r=t.props||{},a=r.children,i=aw(r,b9),l=n.props||{},s=l.children,c=aw(l,j9);return a&&s?jo(i,c)&&_g(a,s):!a&&!s?jo(i,c):!1}return!1},cw=function(t,n){var r=[],a={};return B0(t).forEach(function(i,l){if(O9(i))r.push(i);else if(i){var s=ha(i.type),c=n[s]||{},u=c.handler,f=c.once;if(u&&(!f||!a[s])){var d=u(i,s,l);r.push(d),a[s]=!0}}}),r},N9=function(t){var n=t&&t.type;return n&&iw[n]?iw[n]:null},E9=function(t,n){return B0(n).indexOf(t)},C9=["children","width","height","viewBox","className","style","title","desc"];function Tg(){return Tg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tg.apply(this,arguments)}function _9(e,t){if(e==null)return{};var n=T9(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function T9(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 Pg(e){var t=e.children,n=e.width,r=e.height,a=e.viewBox,i=e.className,l=e.style,s=e.title,c=e.desc,u=_9(e,C9),f=a||{width:n,height:r,x:0,y:0},d=de("recharts-surface",i);return T.createElement("svg",Tg({},re(u,!0,"svg"),{className:d,width:n,height:r,style:l,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),T.createElement("title",null,s),T.createElement("desc",null,c),t)}var P9=["children","className"];function Mg(){return Mg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mg.apply(this,arguments)}function M9(e,t){if(e==null)return{};var n=$9(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $9(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 me=T.forwardRef(function(e,t){var n=e.children,r=e.className,a=M9(e,P9),i=de("recharts-layer",r);return T.createElement("g",Mg({className:i},re(a,!0),{ref:t}),n)}),yr=function(t,n){for(var r=arguments.length,a=new Array(r>2?r-2:0),i=2;i<r;i++)a[i-2]=arguments[i]};function R9(e,t,n){var r=-1,a=e.length;t<0&&(t=-t>a?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<a;)i[r]=e[r+t];return i}var k9=R9,D9=k9;function L9(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:D9(e,t,n)}var z9=L9,B9="\\ud800-\\udfff",I9="\\u0300-\\u036f",U9="\\ufe20-\\ufe2f",q9="\\u20d0-\\u20ff",H9=I9+U9+q9,F9="\\ufe0e\\ufe0f",G9="\\u200d",K9=RegExp("["+G9+B9+H9+F9+"]");function V9(e){return K9.test(e)}var eP=V9;function Y9(e){return e.split("")}var X9=Y9,tP="\\ud800-\\udfff",Q9="\\u0300-\\u036f",W9="\\ufe20-\\ufe2f",Z9="\\u20d0-\\u20ff",J9=Q9+W9+Z9,eq="\\ufe0e\\ufe0f",tq="["+tP+"]",$g="["+J9+"]",Rg="\\ud83c[\\udffb-\\udfff]",nq="(?:"+$g+"|"+Rg+")",nP="[^"+tP+"]",rP="(?:\\ud83c[\\udde6-\\uddff]){2}",aP="[\\ud800-\\udbff][\\udc00-\\udfff]",rq="\\u200d",iP=nq+"?",lP="["+eq+"]?",aq="(?:"+rq+"(?:"+[nP,rP,aP].join("|")+")"+lP+iP+")*",iq=lP+iP+aq,lq="(?:"+[nP+$g+"?",$g,rP,aP,tq].join("|")+")",oq=RegExp(Rg+"(?="+Rg+")|"+lq+iq,"g");function sq(e){return e.match(oq)||[]}var cq=sq,uq=X9,fq=eP,dq=cq;function hq(e){return fq(e)?dq(e):uq(e)}var pq=hq,mq=z9,yq=eP,vq=pq,gq=VT;function xq(e){return function(t){t=gq(t);var n=yq(t)?vq(t):void 0,r=n?n[0]:t.charAt(0),a=n?mq(n,1).join(""):t.slice(1);return r[e]()+a}}var bq=xq,jq=bq,Sq=jq("toUpperCase"),wq=Sq;const ym=_e(wq);function Ue(e){return function(){return e}}const oP=Math.cos,gh=Math.sin,Ar=Math.sqrt,xh=Math.PI,vm=2*xh,kg=Math.PI,Dg=2*kg,qi=1e-6,Oq=Dg-qi;function sP(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Aq(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return sP;const n=10**t;return function(r){this._+=r[0];for(let a=1,i=r.length;a<i;++a)this._+=Math.round(arguments[a]*n)/n+r[a]}}class Nq{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?sP:Aq(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,a){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+a}`}bezierCurveTo(t,n,r,a,i,l){this._append`C${+t},${+n},${+r},${+a},${this._x1=+i},${this._y1=+l}`}arcTo(t,n,r,a,i){if(t=+t,n=+n,r=+r,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let l=this._x1,s=this._y1,c=r-t,u=a-n,f=l-t,d=s-n,h=f*f+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(h>qi)if(!(Math.abs(d*c-u*f)>qi)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let m=r-l,j=a-s,v=c*c+u*u,p=m*m+j*j,y=Math.sqrt(v),g=Math.sqrt(h),b=i*Math.tan((kg-Math.acos((v+h-p)/(2*y*g)))/2),x=b/g,w=b/y;Math.abs(x-1)>qi&&this._append`L${t+x*f},${n+x*d}`,this._append`A${i},${i},0,0,${+(d*m>f*j)},${this._x1=t+w*c},${this._y1=n+w*u}`}}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 s=r*Math.cos(a),c=r*Math.sin(a),u=t+s,f=n+c,d=1^l,h=l?a-i:i-a;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>qi||Math.abs(this._y1-f)>qi)&&this._append`L${u},${f}`,r&&(h<0&&(h=h%Dg+Dg),h>Oq?this._append`A${r},${r},0,1,${d},${t-s},${n-c}A${r},${r},0,1,${d},${this._x1=u},${this._y1=f}`:h>qi&&this._append`A${r},${r},0,${+(h>=kg)},${d},${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 I0(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 Nq(t)}function U0(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function cP(e){this._context=e}cP.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 gm(e){return new cP(e)}function uP(e){return e[0]}function fP(e){return e[1]}function dP(e,t){var n=Ue(!0),r=null,a=gm,i=null,l=I0(s);e=typeof e=="function"?e:e===void 0?uP:Ue(e),t=typeof t=="function"?t:t===void 0?fP:Ue(t);function s(c){var u,f=(c=U0(c)).length,d,h=!1,m;for(r==null&&(i=a(m=l())),u=0;u<=f;++u)!(u<f&&n(d=c[u],u,c))===h&&((h=!h)?i.lineStart():i.lineEnd()),h&&i.point(+e(d,u,c),+t(d,u,c));if(m)return i=null,m+""||null}return s.x=function(c){return arguments.length?(e=typeof c=="function"?c:Ue(+c),s):e},s.y=function(c){return arguments.length?(t=typeof c=="function"?c:Ue(+c),s):t},s.defined=function(c){return arguments.length?(n=typeof c=="function"?c:Ue(!!c),s):n},s.curve=function(c){return arguments.length?(a=c,r!=null&&(i=a(r)),s):a},s.context=function(c){return arguments.length?(c==null?r=i=null:i=a(r=c),s):r},s}function Vf(e,t,n){var r=null,a=Ue(!0),i=null,l=gm,s=null,c=I0(u);e=typeof e=="function"?e:e===void 0?uP:Ue(+e),t=typeof t=="function"?t:Ue(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?fP:Ue(+n);function u(d){var h,m,j,v=(d=U0(d)).length,p,y=!1,g,b=new Array(v),x=new Array(v);for(i==null&&(s=l(g=c())),h=0;h<=v;++h){if(!(h<v&&a(p=d[h],h,d))===y)if(y=!y)m=h,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),j=h-1;j>=m;--j)s.point(b[j],x[j]);s.lineEnd(),s.areaEnd()}y&&(b[h]=+e(p,h,d),x[h]=+t(p,h,d),s.point(r?+r(p,h,d):b[h],n?+n(p,h,d):x[h]))}if(g)return s=null,g+""||null}function f(){return dP().defined(a).curve(l).context(i)}return u.x=function(d){return arguments.length?(e=typeof d=="function"?d:Ue(+d),r=null,u):e},u.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Ue(+d),u):e},u.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:Ue(+d),u):r},u.y=function(d){return arguments.length?(t=typeof d=="function"?d:Ue(+d),n=null,u):t},u.y0=function(d){return arguments.length?(t=typeof d=="function"?d:Ue(+d),u):t},u.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:Ue(+d),u):n},u.lineX0=u.lineY0=function(){return f().x(e).y(t)},u.lineY1=function(){return f().x(e).y(n)},u.lineX1=function(){return f().x(r).y(t)},u.defined=function(d){return arguments.length?(a=typeof d=="function"?d:Ue(!!d),u):a},u.curve=function(d){return arguments.length?(l=d,i!=null&&(s=l(i)),u):l},u.context=function(d){return arguments.length?(d==null?i=s=null:s=l(i=d),u):i},u}class hP{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 Eq(e){return new hP(e,!0)}function Cq(e){return new hP(e,!1)}const q0={draw(e,t){const n=Ar(t/xh);e.moveTo(n,0),e.arc(0,0,n,0,vm)}},_q={draw(e,t){const n=Ar(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()}},pP=Ar(1/3),Tq=pP*2,Pq={draw(e,t){const n=Ar(t/Tq),r=n*pP;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Mq={draw(e,t){const n=Ar(t),r=-n/2;e.rect(r,r,n,n)}},$q=.8908130915292852,mP=gh(xh/10)/gh(7*xh/10),Rq=gh(vm/10)*mP,kq=-oP(vm/10)*mP,Dq={draw(e,t){const n=Ar(t*$q),r=Rq*n,a=kq*n;e.moveTo(0,-n),e.lineTo(r,a);for(let i=1;i<5;++i){const l=vm*i/5,s=oP(l),c=gh(l);e.lineTo(c*n,-s*n),e.lineTo(s*r-c*a,c*r+s*a)}e.closePath()}},Fy=Ar(3),Lq={draw(e,t){const n=-Ar(t/(Fy*3));e.moveTo(0,n*2),e.lineTo(-Fy*n,-n),e.lineTo(Fy*n,-n),e.closePath()}},Dn=-.5,Ln=Ar(3)/2,Lg=1/Ar(12),zq=(Lg/2+1)*3,Bq={draw(e,t){const n=Ar(t/zq),r=n/2,a=n*Lg,i=r,l=n*Lg+n,s=-i,c=l;e.moveTo(r,a),e.lineTo(i,l),e.lineTo(s,c),e.lineTo(Dn*r-Ln*a,Ln*r+Dn*a),e.lineTo(Dn*i-Ln*l,Ln*i+Dn*l),e.lineTo(Dn*s-Ln*c,Ln*s+Dn*c),e.lineTo(Dn*r+Ln*a,Dn*a-Ln*r),e.lineTo(Dn*i+Ln*l,Dn*l-Ln*i),e.lineTo(Dn*s+Ln*c,Dn*c-Ln*s),e.closePath()}};function Iq(e,t){let n=null,r=I0(a);e=typeof e=="function"?e:Ue(e||q0),t=typeof t=="function"?t:Ue(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:Ue(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:Ue(+i),a):t},a.context=function(i){return arguments.length?(n=i??null,a):n},a}function bh(){}function jh(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 yP(e){this._context=e}yP.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:jh(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:jh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Uq(e){return new yP(e)}function vP(e){this._context=e}vP.prototype={areaStart:bh,areaEnd:bh,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:jh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function qq(e){return new vP(e)}function gP(e){this._context=e}gP.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:jh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Hq(e){return new gP(e)}function xP(e){this._context=e}xP.prototype={areaStart:bh,areaEnd:bh,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 Fq(e){return new xP(e)}function uw(e){return e<0?-1:1}function fw(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),s=(i*a+l*r)/(r+a);return(uw(i)+uw(l))*Math.min(Math.abs(i),Math.abs(l),.5*Math.abs(s))||0}function dw(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Gy(e,t,n){var r=e._x0,a=e._y0,i=e._x1,l=e._y1,s=(i-r)/3;e._context.bezierCurveTo(r+s,a+s*t,i-s,l-s*n,i,l)}function Sh(e){this._context=e}Sh.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:Gy(this,this._t0,dw(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,Gy(this,dw(this,n=fw(this,e,t)),n);break;default:Gy(this,this._t0,n=fw(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function bP(e){this._context=new jP(e)}(bP.prototype=Object.create(Sh.prototype)).point=function(e,t){Sh.prototype.point.call(this,t,e)};function jP(e){this._context=e}jP.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 Gq(e){return new Sh(e)}function Kq(e){return new bP(e)}function SP(e){this._context=e}SP.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=hw(e),a=hw(t),i=0,l=1;l<n;++i,++l)this._context.bezierCurveTo(r[0][i],a[0][i],r[1][i],a[1][i],e[l],t[l]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function hw(e){var t,n=e.length-1,r,a=new Array(n),i=new Array(n),l=new Array(n);for(a[0]=0,i[0]=2,l[0]=e[0]+2*e[1],t=1;t<n-1;++t)a[t]=1,i[t]=4,l[t]=4*e[t]+2*e[t+1];for(a[n-1]=2,i[n-1]=7,l[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=a[t]/i[t-1],i[t]-=r,l[t]-=r*l[t-1];for(a[n-1]=l[n-1]/i[n-1],t=n-2;t>=0;--t)a[t]=(l[t]-a[t+1])/i[t];for(i[n-1]=(e[n]+a[n-1])/2,t=0;t<n-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function Vq(e){return new SP(e)}function xm(e,t){this._context=e,this._t=t}xm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=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 Yq(e){return new xm(e,.5)}function Xq(e){return new xm(e,0)}function Qq(e){return new xm(e,1)}function Yo(e,t){if((l=e.length)>1)for(var n=1,r,a,i=e[t[0]],l,s=i.length;n<l;++n)for(a=i,i=e[t[n]],r=0;r<s;++r)i[r][1]+=i[r][0]=isNaN(a[r][1])?a[r][0]:a[r][1]}function zg(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Wq(e,t){return e[t]}function Zq(e){const t=[];return t.key=e,t}function Jq(){var e=Ue([]),t=zg,n=Yo,r=Wq;function a(i){var l=Array.from(e.apply(this,arguments),Zq),s,c=l.length,u=-1,f;for(const d of i)for(s=0,++u;s<c;++s)(l[s][u]=[0,+r(d,l[s].key,u,i)]).data=d;for(s=0,f=U0(t(l));s<c;++s)l[f[s]].index=s;return n(l,f),l}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:Ue(Array.from(i)),a):e},a.value=function(i){return arguments.length?(r=typeof i=="function"?i:Ue(+i),a):r},a.order=function(i){return arguments.length?(t=i==null?zg:typeof i=="function"?i:Ue(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(n=i??Yo,a):n},a}function eH(e,t){if((r=e.length)>0){for(var n,r,a=0,i=e[0].length,l;a<i;++a){for(l=n=0;n<r;++n)l+=e[n][a][1]||0;if(l)for(n=0;n<r;++n)e[n][a][1]/=l}Yo(e,t)}}function tH(e,t){if((a=e.length)>0){for(var n=0,r=e[t[0]],a,i=r.length;n<i;++n){for(var l=0,s=0;l<a;++l)s+=e[l][n][1]||0;r[n][1]+=r[n][0]=-s/2}Yo(e,t)}}function nH(e,t){if(!(!((l=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var n=0,r=1,a,i,l;r<i;++r){for(var s=0,c=0,u=0;s<l;++s){for(var f=e[t[s]],d=f[r][1]||0,h=f[r-1][1]||0,m=(d-h)/2,j=0;j<s;++j){var v=e[t[j]],p=v[r][1]||0,y=v[r-1][1]||0;m+=p-y}c+=d,u+=m*d}a[r-1][1]+=a[r-1][0]=n,c&&(n-=u/c)}a[r-1][1]+=a[r-1][0]=n,Yo(e,t)}}function cu(e){"@babel/helpers - typeof";return cu=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},cu(e)}var rH=["type","size","sizeType"];function Bg(){return Bg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bg.apply(this,arguments)}function pw(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 mw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pw(Object(n),!0).forEach(function(r){aH(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aH(e,t,n){return t=iH(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iH(e){var t=lH(e,"string");return cu(t)=="symbol"?t:t+""}function lH(e,t){if(cu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(cu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oH(e,t){if(e==null)return{};var n=sH(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sH(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 wP={symbolCircle:q0,symbolCross:_q,symbolDiamond:Pq,symbolSquare:Mq,symbolStar:Dq,symbolTriangle:Lq,symbolWye:Bq},cH=Math.PI/180,uH=function(t){var n="symbol".concat(ym(t));return wP[n]||q0},fH=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*cH;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}},dH=function(t,n){wP["symbol".concat(ym(t))]=n},bm=function(t){var n=t.type,r=n===void 0?"circle":n,a=t.size,i=a===void 0?64:a,l=t.sizeType,s=l===void 0?"area":l,c=oH(t,rH),u=mw(mw({},c),{},{type:r,size:i,sizeType:s}),f=function(){var p=uH(r),y=Iq().type(p).size(fH(i,s,r));return y()},d=u.className,h=u.cx,m=u.cy,j=re(u,!0);return h===+h&&m===+m&&i===+i?T.createElement("path",Bg({},j,{className:de("recharts-symbols",d),transform:"translate(".concat(h,", ").concat(m,")"),d:f()})):null};bm.registerSymbol=dH;function Xo(e){"@babel/helpers - typeof";return Xo=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},Xo(e)}function Ig(){return Ig=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ig.apply(this,arguments)}function yw(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 hH(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yw(Object(n),!0).forEach(function(r){uu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mH(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,AP(r.key),r)}}function yH(e,t,n){return t&&mH(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function vH(e,t,n){return t=wh(t),gH(e,OP()?Reflect.construct(t,n||[],wh(e).constructor):t.apply(e,n))}function gH(e,t){if(t&&(Xo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xH(e)}function xH(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function OP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(OP=function(){return!!e})()}function wh(e){return wh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},wh(e)}function bH(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ug(e,t)}function Ug(e,t){return Ug=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Ug(e,t)}function uu(e,t,n){return t=AP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AP(e){var t=jH(e,"string");return Xo(t)=="symbol"?t:t+""}function jH(e,t){if(Xo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Xo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var zn=32,H0=function(e){function t(){return pH(this,t),vH(this,t,arguments)}return bH(t,e),yH(t,[{key:"renderIcon",value:function(r){var a=this.props.inactiveColor,i=zn/2,l=zn/6,s=zn/3,c=r.inactive?a:r.color;if(r.type==="plainline")return T.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:i,x2:zn,y2:i,className:"recharts-legend-icon"});if(r.type==="line")return T.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(i,"h").concat(s,`
            A`).concat(l,",").concat(l,",0,1,1,").concat(2*s,",").concat(i,`
            H`).concat(zn,"M").concat(2*s,",").concat(i,`
            A`).concat(l,",").concat(l,",0,1,1,").concat(s,",").concat(i),className:"recharts-legend-icon"});if(r.type==="rect")return T.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(zn/8,"h").concat(zn,"v").concat(zn*3/4,"h").concat(-zn,"z"),className:"recharts-legend-icon"});if(T.isValidElement(r.legendIcon)){var u=hH({},r);return delete u.legendIcon,T.cloneElement(r.legendIcon,u)}return T.createElement(bm,{fill:c,cx:i,cy:i,size:zn,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,a=this.props,i=a.payload,l=a.iconSize,s=a.layout,c=a.formatter,u=a.inactiveColor,f={x:0,y:0,width:zn,height:zn},d={display:s==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(m,j){var v=m.formatter||c,p=de(uu(uu({"recharts-legend-item":!0},"legend-item-".concat(j),!0),"inactive",m.inactive));if(m.type==="none")return null;var y=se(m.value)?null:m.value;yr(!se(m.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var g=m.inactive?u:m.color;return T.createElement("li",Ig({className:p,style:d,key:"legend-item-".concat(j)},bi(r.props,m,j)),T.createElement(Pg,{width:l,height:l,viewBox:f,style:h},r.renderIcon(m)),T.createElement("span",{className:"recharts-legend-item-text",style:{color:g}},v?v(y,m,j):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 s={padding:0,margin:0,textAlign:i==="horizontal"?l:"left"};return T.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(O.PureComponent);uu(H0,"displayName","Legend");uu(H0,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var SH=rm;function wH(){this.__data__=new SH,this.size=0}var OH=wH;function AH(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var NH=AH;function EH(e){return this.__data__.get(e)}var CH=EH;function _H(e){return this.__data__.has(e)}var TH=_H,PH=rm,MH=P0,$H=M0,RH=200;function kH(e,t){var n=this.__data__;if(n instanceof PH){var r=n.__data__;if(!MH||r.length<RH-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new $H(r)}return n.set(e,t),this.size=n.size,this}var DH=kH,LH=rm,zH=OH,BH=NH,IH=CH,UH=TH,qH=DH;function Hs(e){var t=this.__data__=new LH(e);this.size=t.size}Hs.prototype.clear=zH;Hs.prototype.delete=BH;Hs.prototype.get=IH;Hs.prototype.has=UH;Hs.prototype.set=qH;var NP=Hs,HH="__lodash_hash_undefined__";function FH(e){return this.__data__.set(e,HH),this}var GH=FH;function KH(e){return this.__data__.has(e)}var VH=KH,YH=M0,XH=GH,QH=VH;function Oh(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new YH;++t<n;)this.add(e[t])}Oh.prototype.add=Oh.prototype.push=XH;Oh.prototype.has=QH;var EP=Oh;function WH(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var CP=WH;function ZH(e,t){return e.has(t)}var _P=ZH,JH=EP,eF=CP,tF=_P,nF=1,rF=2;function aF(e,t,n,r,a,i){var l=n&nF,s=e.length,c=t.length;if(s!=c&&!(l&&c>s))return!1;var u=i.get(e),f=i.get(t);if(u&&f)return u==t&&f==e;var d=-1,h=!0,m=n&rF?new JH:void 0;for(i.set(e,t),i.set(t,e);++d<s;){var j=e[d],v=t[d];if(r)var p=l?r(v,j,d,t,e,i):r(j,v,d,e,t,i);if(p!==void 0){if(p)continue;h=!1;break}if(m){if(!eF(t,function(y,g){if(!tF(m,g)&&(j===y||a(j,y,n,r,i)))return m.push(g)})){h=!1;break}}else if(!(j===v||a(j,v,n,r,i))){h=!1;break}}return i.delete(e),i.delete(t),h}var TP=aF,iF=Fr,lF=iF.Uint8Array,oF=lF;function sF(e){var t=-1,n=Array(e.size);return e.forEach(function(r,a){n[++t]=[a,r]}),n}var cF=sF;function uF(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var F0=uF,vw=mf,gw=oF,fF=T0,dF=TP,hF=cF,pF=F0,mF=1,yF=2,vF="[object Boolean]",gF="[object Date]",xF="[object Error]",bF="[object Map]",jF="[object Number]",SF="[object RegExp]",wF="[object Set]",OF="[object String]",AF="[object Symbol]",NF="[object ArrayBuffer]",EF="[object DataView]",xw=vw?vw.prototype:void 0,Ky=xw?xw.valueOf:void 0;function CF(e,t,n,r,a,i,l){switch(n){case EF:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case NF:return!(e.byteLength!=t.byteLength||!i(new gw(e),new gw(t)));case vF:case gF:case jF:return fF(+e,+t);case xF:return e.name==t.name&&e.message==t.message;case SF:case OF:return e==t+"";case bF:var s=hF;case wF:var c=r&mF;if(s||(s=pF),e.size!=t.size&&!c)return!1;var u=l.get(e);if(u)return u==t;r|=yF,l.set(e,t);var f=dF(s(e),s(t),r,a,i,l);return l.delete(e),f;case AF:if(Ky)return Ky.call(e)==Ky.call(t)}return!1}var _F=CF;function TF(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}var PP=TF,PF=PP,MF=vn;function $F(e,t,n){var r=t(e);return MF(e)?r:PF(r,n(e))}var RF=$F;function kF(e,t){for(var n=-1,r=e==null?0:e.length,a=0,i=[];++n<r;){var l=e[n];t(l,n,e)&&(i[a++]=l)}return i}var DF=kF;function LF(){return[]}var zF=LF,BF=DF,IF=zF,UF=Object.prototype,qF=UF.propertyIsEnumerable,bw=Object.getOwnPropertySymbols,HF=bw?function(e){return e==null?[]:(e=Object(e),BF(bw(e),function(t){return qF.call(e,t)}))}:IF,FF=HF;function GF(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var KF=GF,VF=Aa,YF=Na,XF="[object Arguments]";function QF(e){return YF(e)&&VF(e)==XF}var WF=QF,jw=WF,ZF=Na,MP=Object.prototype,JF=MP.hasOwnProperty,eG=MP.propertyIsEnumerable,tG=jw(function(){return arguments}())?jw:function(e){return ZF(e)&&JF.call(e,"callee")&&!eG.call(e,"callee")},G0=tG,Ah={exports:{}};function nG(){return!1}var rG=nG;Ah.exports;(function(e,t){var n=Fr,r=rG,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,l=i&&i.exports===a,s=l?n.Buffer:void 0,c=s?s.isBuffer:void 0,u=c||r;e.exports=u})(Ah,Ah.exports);var $P=Ah.exports,aG=9007199254740991,iG=/^(?:0|[1-9]\d*)$/;function lG(e,t){var n=typeof e;return t=t??aG,!!t&&(n=="number"||n!="symbol"&&iG.test(e))&&e>-1&&e%1==0&&e<t}var K0=lG,oG=9007199254740991;function sG(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=oG}var V0=sG,cG=Aa,uG=V0,fG=Na,dG="[object Arguments]",hG="[object Array]",pG="[object Boolean]",mG="[object Date]",yG="[object Error]",vG="[object Function]",gG="[object Map]",xG="[object Number]",bG="[object Object]",jG="[object RegExp]",SG="[object Set]",wG="[object String]",OG="[object WeakMap]",AG="[object ArrayBuffer]",NG="[object DataView]",EG="[object Float32Array]",CG="[object Float64Array]",_G="[object Int8Array]",TG="[object Int16Array]",PG="[object Int32Array]",MG="[object Uint8Array]",$G="[object Uint8ClampedArray]",RG="[object Uint16Array]",kG="[object Uint32Array]",Ve={};Ve[EG]=Ve[CG]=Ve[_G]=Ve[TG]=Ve[PG]=Ve[MG]=Ve[$G]=Ve[RG]=Ve[kG]=!0;Ve[dG]=Ve[hG]=Ve[AG]=Ve[pG]=Ve[NG]=Ve[mG]=Ve[yG]=Ve[vG]=Ve[gG]=Ve[xG]=Ve[bG]=Ve[jG]=Ve[SG]=Ve[wG]=Ve[OG]=!1;function DG(e){return fG(e)&&uG(e.length)&&!!Ve[cG(e)]}var LG=DG;function zG(e){return function(t){return e(t)}}var RP=zG,Nh={exports:{}};Nh.exports;(function(e,t){var n=UT,r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===r,l=i&&n.process,s=function(){try{var c=a&&a.require&&a.require("util").types;return c||l&&l.binding&&l.binding("util")}catch{}}();e.exports=s})(Nh,Nh.exports);var BG=Nh.exports,IG=LG,UG=RP,Sw=BG,ww=Sw&&Sw.isTypedArray,qG=ww?UG(ww):IG,kP=qG,HG=KF,FG=G0,GG=vn,KG=$P,VG=K0,YG=kP,XG=Object.prototype,QG=XG.hasOwnProperty;function WG(e,t){var n=GG(e),r=!n&&FG(e),a=!n&&!r&&KG(e),i=!n&&!r&&!a&&YG(e),l=n||r||a||i,s=l?HG(e.length,String):[],c=s.length;for(var u in e)(t||QG.call(e,u))&&!(l&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||VG(u,c)))&&s.push(u);return s}var ZG=WG,JG=Object.prototype;function eK(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||JG;return e===n}var tK=eK;function nK(e,t){return function(n){return e(t(n))}}var DP=nK,rK=DP,aK=rK(Object.keys,Object),iK=aK,lK=tK,oK=iK,sK=Object.prototype,cK=sK.hasOwnProperty;function uK(e){if(!lK(e))return oK(e);var t=[];for(var n in Object(e))cK.call(e,n)&&n!="constructor"&&t.push(n);return t}var fK=uK,dK=_0,hK=V0;function pK(e){return e!=null&&hK(e.length)&&!dK(e)}var yf=pK,mK=ZG,yK=fK,vK=yf;function gK(e){return vK(e)?mK(e):yK(e)}var jm=gK,xK=RF,bK=FF,jK=jm;function SK(e){return xK(e,jK,bK)}var wK=SK,Ow=wK,OK=1,AK=Object.prototype,NK=AK.hasOwnProperty;function EK(e,t,n,r,a,i){var l=n&OK,s=Ow(e),c=s.length,u=Ow(t),f=u.length;if(c!=f&&!l)return!1;for(var d=c;d--;){var h=s[d];if(!(l?h in t:NK.call(t,h)))return!1}var m=i.get(e),j=i.get(t);if(m&&j)return m==t&&j==e;var v=!0;i.set(e,t),i.set(t,e);for(var p=l;++d<c;){h=s[d];var y=e[h],g=t[h];if(r)var b=l?r(g,y,h,t,e,i):r(y,g,h,e,t,i);if(!(b===void 0?y===g||a(y,g,n,r,i):b)){v=!1;break}p||(p=h=="constructor")}if(v&&!p){var x=e.constructor,w=t.constructor;x!=w&&"constructor"in e&&"constructor"in t&&!(typeof x=="function"&&x instanceof x&&typeof w=="function"&&w instanceof w)&&(v=!1)}return i.delete(e),i.delete(t),v}var CK=EK,_K=Pl,TK=Fr,PK=_K(TK,"DataView"),MK=PK,$K=Pl,RK=Fr,kK=$K(RK,"Promise"),DK=kK,LK=Pl,zK=Fr,BK=LK(zK,"Set"),LP=BK,IK=Pl,UK=Fr,qK=IK(UK,"WeakMap"),HK=qK,qg=MK,Hg=P0,Fg=DK,Gg=LP,Kg=HK,zP=Aa,Fs=HT,Aw="[object Map]",FK="[object Object]",Nw="[object Promise]",Ew="[object Set]",Cw="[object WeakMap]",_w="[object DataView]",GK=Fs(qg),KK=Fs(Hg),VK=Fs(Fg),YK=Fs(Gg),XK=Fs(Kg),Hi=zP;(qg&&Hi(new qg(new ArrayBuffer(1)))!=_w||Hg&&Hi(new Hg)!=Aw||Fg&&Hi(Fg.resolve())!=Nw||Gg&&Hi(new Gg)!=Ew||Kg&&Hi(new Kg)!=Cw)&&(Hi=function(e){var t=zP(e),n=t==FK?e.constructor:void 0,r=n?Fs(n):"";if(r)switch(r){case GK:return _w;case KK:return Aw;case VK:return Nw;case YK:return Ew;case XK:return Cw}return t});var QK=Hi,Vy=NP,WK=TP,ZK=_F,JK=CK,Tw=QK,Pw=vn,Mw=$P,eV=kP,tV=1,$w="[object Arguments]",Rw="[object Array]",Yf="[object Object]",nV=Object.prototype,kw=nV.hasOwnProperty;function rV(e,t,n,r,a,i){var l=Pw(e),s=Pw(t),c=l?Rw:Tw(e),u=s?Rw:Tw(t);c=c==$w?Yf:c,u=u==$w?Yf:u;var f=c==Yf,d=u==Yf,h=c==u;if(h&&Mw(e)){if(!Mw(t))return!1;l=!0,f=!1}if(h&&!f)return i||(i=new Vy),l||eV(e)?WK(e,t,n,r,a,i):ZK(e,t,c,n,r,a,i);if(!(n&tV)){var m=f&&kw.call(e,"__wrapped__"),j=d&&kw.call(t,"__wrapped__");if(m||j){var v=m?e.value():e,p=j?t.value():t;return i||(i=new Vy),a(v,p,n,r,i)}}return h?(i||(i=new Vy),JK(e,t,n,r,a,i)):!1}var aV=rV,iV=aV,Dw=Na;function BP(e,t,n,r,a){return e===t?!0:e==null||t==null||!Dw(e)&&!Dw(t)?e!==e&&t!==t:iV(e,t,n,r,BP,a)}var Y0=BP,lV=NP,oV=Y0,sV=1,cV=2;function uV(e,t,n,r){var a=n.length,i=a,l=!r;if(e==null)return!i;for(e=Object(e);a--;){var s=n[a];if(l&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a<i;){s=n[a];var c=s[0],u=e[c],f=s[1];if(l&&s[2]){if(u===void 0&&!(c in e))return!1}else{var d=new lV;if(r)var h=r(u,f,c,e,t,d);if(!(h===void 0?oV(f,u,sV|cV,r,d):h))return!1}}return!0}var fV=uV,dV=Ai;function hV(e){return e===e&&!dV(e)}var IP=hV,pV=IP,mV=jm;function yV(e){for(var t=mV(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,pV(a)]}return t}var vV=yV;function gV(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var UP=gV,xV=fV,bV=vV,jV=UP;function SV(e){var t=bV(e);return t.length==1&&t[0][2]?jV(t[0][0],t[0][1]):function(n){return n===e||xV(n,e,t)}}var wV=SV;function OV(e,t){return e!=null&&t in Object(e)}var AV=OV,NV=YT,EV=G0,CV=vn,_V=K0,TV=V0,PV=im;function MV(e,t,n){t=NV(t,e);for(var r=-1,a=t.length,i=!1;++r<a;){var l=PV(t[r]);if(!(i=e!=null&&n(e,l)))break;e=e[l]}return i||++r!=a?i:(a=e==null?0:e.length,!!a&&TV(a)&&_V(l,a)&&(CV(e)||EV(e)))}var $V=MV,RV=AV,kV=$V;function DV(e,t){return e!=null&&kV(e,t,RV)}var LV=DV,zV=Y0,BV=XT,IV=LV,UV=C0,qV=IP,HV=UP,FV=im,GV=1,KV=2;function VV(e,t){return UV(e)&&qV(t)?HV(FV(e),t):function(n){var r=BV(n,e);return r===void 0&&r===t?IV(n,e):zV(t,r,GV|KV)}}var YV=VV;function XV(e){return e}var Gs=XV;function QV(e){return function(t){return t==null?void 0:t[e]}}var WV=QV,ZV=k0;function JV(e){return function(t){return ZV(t,e)}}var eY=JV,tY=WV,nY=eY,rY=C0,aY=im;function iY(e){return rY(e)?tY(aY(e)):nY(e)}var lY=iY,oY=wV,sY=YV,cY=Gs,uY=vn,fY=lY;function dY(e){return typeof e=="function"?e:e==null?cY:typeof e=="object"?uY(e)?sY(e[0],e[1]):oY(e):fY(e)}var Gr=dY;function hY(e,t,n,r){for(var a=e.length,i=n+(r?1:-1);r?i--:++i<a;)if(t(e[i],i,e))return i;return-1}var qP=hY;function pY(e){return e!==e}var mY=pY;function yY(e,t,n){for(var r=n-1,a=e.length;++r<a;)if(e[r]===t)return r;return-1}var vY=yY,gY=qP,xY=mY,bY=vY;function jY(e,t,n){return t===t?bY(e,t,n):gY(e,xY,n)}var SY=jY,wY=SY;function OY(e,t){var n=e==null?0:e.length;return!!n&&wY(e,t,0)>-1}var AY=OY;function NY(e,t,n){for(var r=-1,a=e==null?0:e.length;++r<a;)if(n(t,e[r]))return!0;return!1}var EY=NY;function CY(){}var _Y=CY,Yy=LP,TY=_Y,PY=F0,MY=1/0,$Y=Yy&&1/PY(new Yy([,-0]))[1]==MY?function(e){return new Yy(e)}:TY,RY=$Y,kY=EP,DY=AY,LY=EY,zY=_P,BY=RY,IY=F0,UY=200;function qY(e,t,n){var r=-1,a=DY,i=e.length,l=!0,s=[],c=s;if(n)l=!1,a=LY;else if(i>=UY){var u=t?null:BY(e);if(u)return IY(u);l=!1,a=zY,c=new kY}else c=t?[]:s;e:for(;++r<i;){var f=e[r],d=t?t(f):f;if(f=n||f!==0?f:0,l&&d===d){for(var h=c.length;h--;)if(c[h]===d)continue e;t&&c.push(d),s.push(f)}else a(c,d,n)||(c!==s&&c.push(d),s.push(f))}return s}var HY=qY,FY=Gr,GY=HY;function KY(e,t){return e&&e.length?GY(e,FY(t)):[]}var VY=KY;const Lw=_e(VY);function HP(e,t,n){return t===!0?Lw(e,n):se(t)?Lw(e,t):e}function Qo(e){"@babel/helpers - typeof";return Qo=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},Qo(e)}var YY=["ref"];function zw(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 Qr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zw(Object(n),!0).forEach(function(r){Sm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function XY(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,GP(r.key),r)}}function QY(e,t,n){return t&&Bw(e.prototype,t),n&&Bw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function WY(e,t,n){return t=Eh(t),ZY(e,FP()?Reflect.construct(t,n||[],Eh(e).constructor):t.apply(e,n))}function ZY(e,t){if(t&&(Qo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return JY(e)}function JY(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function FP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(FP=function(){return!!e})()}function Eh(e){return Eh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Eh(e)}function eX(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vg(e,t)}function Vg(e,t){return Vg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Vg(e,t)}function Sm(e,t,n){return t=GP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GP(e){var t=tX(e,"string");return Qo(t)=="symbol"?t:t+""}function tX(e,t){if(Qo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Qo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function nX(e,t){if(e==null)return{};var n=rX(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rX(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 aX(e){return e.value}function iX(e,t){if(T.isValidElement(e))return T.cloneElement(e,t);if(typeof e=="function")return T.createElement(e,t);t.ref;var n=nX(t,YY);return T.createElement(H0,n)}var Iw=1,Qn=function(e){function t(){var n;XY(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=WY(this,t,[].concat(a)),Sm(n,"lastBoundingBox",{width:-1,height:-1}),n}return eX(t,e),QY(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,a=this.getBBox();a?(Math.abs(a.width-this.lastBoundingBox.width)>Iw||Math.abs(a.height-this.lastBoundingBox.height)>Iw)&&(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?Qr({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var a=this.props,i=a.layout,l=a.align,s=a.verticalAlign,c=a.margin,u=a.chartWidth,f=a.chartHeight,d,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(l==="center"&&i==="vertical"){var m=this.getBBoxSnapshot();d={left:((u||0)-m.width)/2}}else d=l==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var j=this.getBBoxSnapshot();h={top:((f||0)-j.height)/2}}else h=s==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return Qr(Qr({},d),h)}},{key:"render",value:function(){var r=this,a=this.props,i=a.content,l=a.width,s=a.height,c=a.wrapperStyle,u=a.payloadUniqBy,f=a.payload,d=Qr(Qr({position:"absolute",width:l||"auto",height:s||"auto"},this.getDefaultPosition(c)),c);return T.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(m){r.wrapperNode=m}},iX(i,Qr(Qr({},this.props),{},{payload:HP(f,u,aX)})))}}],[{key:"getWithHeight",value:function(r,a){var i=Qr(Qr({},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}}])}(O.PureComponent);Sm(Qn,"displayName","Legend");Sm(Qn,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Uw=mf,lX=G0,oX=vn,qw=Uw?Uw.isConcatSpreadable:void 0;function sX(e){return oX(e)||lX(e)||!!(qw&&e&&e[qw])}var cX=sX,uX=PP,fX=cX;function KP(e,t,n,r,a){var i=-1,l=e.length;for(n||(n=fX),a||(a=[]);++i<l;){var s=e[i];t>0&&n(s)?t>1?KP(s,t-1,n,r,a):uX(a,s):r||(a[a.length]=s)}return a}var VP=KP;function dX(e){return function(t,n,r){for(var a=-1,i=Object(t),l=r(t),s=l.length;s--;){var c=l[e?s:++a];if(n(i[c],c,i)===!1)break}return t}}var hX=dX,pX=hX,mX=pX(),yX=mX,vX=yX,gX=jm;function xX(e,t){return e&&vX(e,t,gX)}var YP=xX,bX=yf;function jX(e,t){return function(n,r){if(n==null)return n;if(!bX(n))return e(n,r);for(var a=n.length,i=t?a:-1,l=Object(n);(t?i--:++i<a)&&r(l[i],i,l)!==!1;);return n}}var SX=jX,wX=YP,OX=SX,AX=OX(wX),X0=AX,NX=X0,EX=yf;function CX(e,t){var n=-1,r=EX(e)?Array(e.length):[];return NX(e,function(a,i,l){r[++n]=t(a,i,l)}),r}var XP=CX;function _X(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}var TX=_X,Hw=Ls;function PX(e,t){if(e!==t){var n=e!==void 0,r=e===null,a=e===e,i=Hw(e),l=t!==void 0,s=t===null,c=t===t,u=Hw(t);if(!s&&!u&&!i&&e>t||i&&l&&c&&!s&&!u||r&&l&&c||!n&&c||!a)return 1;if(!r&&!i&&!u&&e<t||u&&n&&a&&!r&&!i||s&&n&&a||!l&&a||!c)return-1}return 0}var MX=PX,$X=MX;function RX(e,t,n){for(var r=-1,a=e.criteria,i=t.criteria,l=a.length,s=n.length;++r<l;){var c=$X(a[r],i[r]);if(c){if(r>=s)return c;var u=n[r];return c*(u=="desc"?-1:1)}}return e.index-t.index}var kX=RX,Xy=R0,DX=k0,LX=Gr,zX=XP,BX=TX,IX=RP,UX=kX,qX=Gs,HX=vn;function FX(e,t,n){t.length?t=Xy(t,function(i){return HX(i)?function(l){return DX(l,i.length===1?i[0]:i)}:i}):t=[qX];var r=-1;t=Xy(t,IX(LX));var a=zX(e,function(i,l,s){var c=Xy(t,function(u){return u(i)});return{criteria:c,index:++r,value:i}});return BX(a,function(i,l){return UX(i,l,n)})}var GX=FX;function KX(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 VX=KX,YX=VX,Fw=Math.max;function XX(e,t,n){return t=Fw(t===void 0?e.length-1:t,0),function(){for(var r=arguments,a=-1,i=Fw(r.length-t,0),l=Array(i);++a<i;)l[a]=r[t+a];a=-1;for(var s=Array(t+1);++a<t;)s[a]=r[a];return s[t]=n(l),YX(e,this,s)}}var QX=XX;function WX(e){return function(){return e}}var ZX=WX,JX=Pl,eQ=function(){try{var e=JX(Object,"defineProperty");return e({},"",{}),e}catch{}}(),QP=eQ,tQ=ZX,Gw=QP,nQ=Gs,rQ=Gw?function(e,t){return Gw(e,"toString",{configurable:!0,enumerable:!1,value:tQ(t),writable:!0})}:nQ,aQ=rQ,iQ=800,lQ=16,oQ=Date.now;function sQ(e){var t=0,n=0;return function(){var r=oQ(),a=lQ-(r-n);if(n=r,a>0){if(++t>=iQ)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var cQ=sQ,uQ=aQ,fQ=cQ,dQ=fQ(uQ),hQ=dQ,pQ=Gs,mQ=QX,yQ=hQ;function vQ(e,t){return yQ(mQ(e,t,pQ),e+"")}var gQ=vQ,xQ=T0,bQ=yf,jQ=K0,SQ=Ai;function wQ(e,t,n){if(!SQ(n))return!1;var r=typeof t;return(r=="number"?bQ(n)&&jQ(t,n.length):r=="string"&&t in n)?xQ(n[t],e):!1}var wm=wQ,OQ=VP,AQ=GX,NQ=gQ,Kw=wm,EQ=NQ(function(e,t){if(e==null)return[];var n=t.length;return n>1&&Kw(e,t[0],t[1])?t=[]:n>2&&Kw(t[0],t[1],t[2])&&(t=[t[0]]),AQ(e,OQ(t,1),[])}),CQ=EQ;const Q0=_e(CQ);function fu(e){"@babel/helpers - typeof";return fu=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},fu(e)}function Yg(){return Yg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yg.apply(this,arguments)}function _Q(e,t){return $Q(e)||MQ(e,t)||PQ(e,t)||TQ()}function TQ(){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 PQ(e,t){if(e){if(typeof e=="string")return Vw(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 Vw(e,t)}}function Vw(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function MQ(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,s=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return s}}function $Q(e){if(Array.isArray(e))return e}function Yw(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 Qy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Yw(Object(n),!0).forEach(function(r){RQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function RQ(e,t,n){return t=kQ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kQ(e){var t=DQ(e,"string");return fu(t)=="symbol"?t:t+""}function DQ(e,t){if(fu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(fu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function LQ(e){return Array.isArray(e)&&Nt(e[0])&&Nt(e[1])?e.join(" ~ "):e}var zQ=function(t){var n=t.separator,r=n===void 0?" : ":n,a=t.contentStyle,i=a===void 0?{}:a,l=t.itemStyle,s=l===void 0?{}:l,c=t.labelStyle,u=c===void 0?{}:c,f=t.payload,d=t.formatter,h=t.itemSorter,m=t.wrapperClassName,j=t.labelClassName,v=t.label,p=t.labelFormatter,y=t.accessibilityLayer,g=y===void 0?!1:y,b=function(){if(f&&f.length){var P={padding:0,margin:0},B=(h?Q0(f,h):f).map(function(_,E){if(_.type==="none")return null;var $=Qy({display:"block",paddingTop:4,paddingBottom:4,color:_.color||"#000"},s),L=_.formatter||d||LQ,q=_.value,V=_.name,X=q,J=V;if(L&&X!=null&&J!=null){var Q=L(q,V,_,E,f);if(Array.isArray(Q)){var ie=_Q(Q,2);X=ie[0],J=ie[1]}else X=Q}return T.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(E),style:$},Nt(J)?T.createElement("span",{className:"recharts-tooltip-item-name"},J):null,Nt(J)?T.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,T.createElement("span",{className:"recharts-tooltip-item-value"},X),T.createElement("span",{className:"recharts-tooltip-item-unit"},_.unit||""))});return T.createElement("ul",{className:"recharts-tooltip-item-list",style:P},B)}return null},x=Qy({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),w=Qy({margin:0},u),S=!le(v),A=S?v:"",N=de("recharts-default-tooltip",m),C=de("recharts-tooltip-label",j);S&&p&&f!==void 0&&f!==null&&(A=p(v,f));var M=g?{role:"status","aria-live":"assertive"}:{};return T.createElement("div",Yg({className:N,style:x},M),T.createElement("p",{className:C,style:w},T.isValidElement(A)?A:"".concat(A)),b())};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 Xf(e,t,n){return t=BQ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BQ(e){var t=IQ(e,"string");return du(t)=="symbol"?t:t+""}function IQ(e,t){if(du(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(du(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var oc="recharts-tooltip-wrapper",UQ={visibility:"hidden"};function qQ(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return de(oc,Xf(Xf(Xf(Xf({},"".concat(oc,"-right"),Y(n)&&t&&Y(t.x)&&n>=t.x),"".concat(oc,"-left"),Y(n)&&t&&Y(t.x)&&n<t.x),"".concat(oc,"-bottom"),Y(r)&&t&&Y(t.y)&&r>=t.y),"".concat(oc,"-top"),Y(r)&&t&&Y(t.y)&&r<t.y))}function Xw(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,a=e.offsetTopLeft,i=e.position,l=e.reverseDirection,s=e.tooltipDimension,c=e.viewBox,u=e.viewBoxDimension;if(i&&Y(i[r]))return i[r];var f=n[r]-s-a,d=n[r]+a;if(t[r])return l[r]?f:d;if(l[r]){var h=f,m=c[r];return h<m?Math.max(d,c[r]):Math.max(f,c[r])}var j=d+s,v=c[r]+u;return j>v?Math.max(f,c[r]):Math.max(d,c[r])}function HQ(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 FQ(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,a=e.position,i=e.reverseDirection,l=e.tooltipBox,s=e.useTranslate3d,c=e.viewBox,u,f,d;return l.height>0&&l.width>0&&n?(f=Xw({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:a,reverseDirection:i,tooltipDimension:l.width,viewBox:c,viewBoxDimension:c.width}),d=Xw({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:a,reverseDirection:i,tooltipDimension:l.height,viewBox:c,viewBoxDimension:c.height}),u=HQ({translateX:f,translateY:d,useTranslate3d:s})):u=UQ,{cssProperties:u,cssClasses:qQ({translateX:f,translateY:d,coordinate:n})}}function Wo(e){"@babel/helpers - typeof";return Wo=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},Wo(e)}function Qw(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 Ww(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qw(Object(n),!0).forEach(function(r){Qg(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function GQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KQ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ZP(r.key),r)}}function VQ(e,t,n){return t&&KQ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function YQ(e,t,n){return t=Ch(t),XQ(e,WP()?Reflect.construct(t,n||[],Ch(e).constructor):t.apply(e,n))}function XQ(e,t){if(t&&(Wo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return QQ(e)}function QQ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function WP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(WP=function(){return!!e})()}function Ch(e){return Ch=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ch(e)}function WQ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xg(e,t)}function Xg(e,t){return Xg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Xg(e,t)}function Qg(e,t,n){return t=ZP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZP(e){var t=ZQ(e,"string");return Wo(t)=="symbol"?t:t+""}function ZQ(e,t){if(Wo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Wo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Zw=1,JQ=function(e){function t(){var n;GQ(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=YQ(this,t,[].concat(a)),Qg(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Qg(n,"handleKeyDown",function(l){if(l.key==="Escape"){var s,c,u,f;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(c=n.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&s!==void 0?s:0,y:(u=(f=n.props.coordinate)===null||f===void 0?void 0:f.y)!==null&&u!==void 0?u:0}})}}),n}return WQ(t,e),VQ(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>Zw||Math.abs(r.height-this.state.lastBoundingBox.height)>Zw)&&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,s=a.animationDuration,c=a.animationEasing,u=a.children,f=a.coordinate,d=a.hasPayload,h=a.isAnimationActive,m=a.offset,j=a.position,v=a.reverseDirection,p=a.useTranslate3d,y=a.viewBox,g=a.wrapperStyle,b=FQ({allowEscapeViewBox:l,coordinate:f,offsetTopLeft:m,position:j,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:p,viewBox:y}),x=b.cssClasses,w=b.cssProperties,S=Ww(Ww({transition:h&&i?"transform ".concat(s,"ms ").concat(c):void 0},w),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&d?"visible":"hidden",position:"absolute",top:0,left:0},g);return T.createElement("div",{tabIndex:-1,className:x,style:S,ref:function(N){r.wrapperNode=N}},u)}}])}(O.PureComponent),eW=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Ea={isSsr:eW()};function Zo(e){"@babel/helpers - typeof";return Zo=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},Zo(e)}function Jw(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 eO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Jw(Object(n),!0).forEach(function(r){W0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nW(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,eM(r.key),r)}}function rW(e,t,n){return t&&nW(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function aW(e,t,n){return t=_h(t),iW(e,JP()?Reflect.construct(t,n||[],_h(e).constructor):t.apply(e,n))}function iW(e,t){if(t&&(Zo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lW(e)}function lW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function JP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(JP=function(){return!!e})()}function _h(e){return _h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_h(e)}function oW(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wg(e,t)}function Wg(e,t){return Wg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Wg(e,t)}function W0(e,t,n){return t=eM(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eM(e){var t=sW(e,"string");return Zo(t)=="symbol"?t:t+""}function sW(e,t){if(Zo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Zo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function cW(e){return e.dataKey}function uW(e,t){return T.isValidElement(e)?T.cloneElement(e,t):typeof e=="function"?T.createElement(e,t):T.createElement(zQ,t)}var Wt=function(e){function t(){return tW(this,t),aW(this,t,arguments)}return oW(t,e),rW(t,[{key:"render",value:function(){var r=this,a=this.props,i=a.active,l=a.allowEscapeViewBox,s=a.animationDuration,c=a.animationEasing,u=a.content,f=a.coordinate,d=a.filterNull,h=a.isAnimationActive,m=a.offset,j=a.payload,v=a.payloadUniqBy,p=a.position,y=a.reverseDirection,g=a.useTranslate3d,b=a.viewBox,x=a.wrapperStyle,w=j??[];d&&w.length&&(w=HP(j.filter(function(A){return A.value!=null&&(A.hide!==!0||r.props.includeHidden)}),v,cW));var S=w.length>0;return T.createElement(JQ,{allowEscapeViewBox:l,animationDuration:s,animationEasing:c,isAnimationActive:h,active:i,coordinate:f,hasPayload:S,offset:m,position:p,reverseDirection:y,useTranslate3d:g,viewBox:b,wrapperStyle:x},uW(u,eO(eO({},this.props),{},{payload:w})))}}])}(O.PureComponent);W0(Wt,"displayName","Tooltip");W0(Wt,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Ea.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 fW=Fr,dW=function(){return fW.Date.now()},hW=dW,pW=/\s/;function mW(e){for(var t=e.length;t--&&pW.test(e.charAt(t)););return t}var yW=mW,vW=yW,gW=/^\s+/;function xW(e){return e&&e.slice(0,vW(e)+1).replace(gW,"")}var bW=xW,jW=bW,tO=Ai,SW=Ls,nO=NaN,wW=/^[-+]0x[0-9a-f]+$/i,OW=/^0b[01]+$/i,AW=/^0o[0-7]+$/i,NW=parseInt;function EW(e){if(typeof e=="number")return e;if(SW(e))return nO;if(tO(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=tO(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=jW(e);var n=OW.test(e);return n||AW.test(e)?NW(e.slice(2),n?2:8):wW.test(e)?nO:+e}var tM=EW,CW=Ai,Wy=hW,rO=tM,_W="Expected a function",TW=Math.max,PW=Math.min;function MW(e,t,n){var r,a,i,l,s,c,u=0,f=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(_W);t=rO(t)||0,CW(n)&&(f=!!n.leading,d="maxWait"in n,i=d?TW(rO(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function m(S){var A=r,N=a;return r=a=void 0,u=S,l=e.apply(N,A),l}function j(S){return u=S,s=setTimeout(y,t),f?m(S):l}function v(S){var A=S-c,N=S-u,C=t-A;return d?PW(C,i-N):C}function p(S){var A=S-c,N=S-u;return c===void 0||A>=t||A<0||d&&N>=i}function y(){var S=Wy();if(p(S))return g(S);s=setTimeout(y,v(S))}function g(S){return s=void 0,h&&r?m(S):(r=a=void 0,l)}function b(){s!==void 0&&clearTimeout(s),u=0,r=c=a=s=void 0}function x(){return s===void 0?l:g(Wy())}function w(){var S=Wy(),A=p(S);if(r=arguments,a=this,c=S,A){if(s===void 0)return j(c);if(d)return clearTimeout(s),s=setTimeout(y,t),m(c)}return s===void 0&&(s=setTimeout(y,t)),l}return w.cancel=b,w.flush=x,w}var $W=MW,RW=$W,kW=Ai,DW="Expected a function";function LW(e,t,n){var r=!0,a=!0;if(typeof e!="function")throw new TypeError(DW);return kW(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),RW(e,t,{leading:r,maxWait:t,trailing:a})}var zW=LW;const nM=_e(zW);function hu(e){"@babel/helpers - typeof";return hu=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},hu(e)}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 Qf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aO(Object(n),!0).forEach(function(r){BW(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function BW(e,t,n){return t=IW(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IW(e){var t=UW(e,"string");return hu(t)=="symbol"?t:t+""}function UW(e,t){if(hu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(hu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qW(e,t){return KW(e)||GW(e,t)||FW(e,t)||HW()}function HW(){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 FW(e,t){if(e){if(typeof e=="string")return iO(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 iO(e,t)}}function iO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function GW(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,s=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return s}}function KW(e){if(Array.isArray(e))return e}var oo=O.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,a=r===void 0?{width:-1,height:-1}:r,i=e.width,l=i===void 0?"100%":i,s=e.height,c=s===void 0?"100%":s,u=e.minWidth,f=u===void 0?0:u,d=e.minHeight,h=e.maxHeight,m=e.children,j=e.debounce,v=j===void 0?0:j,p=e.id,y=e.className,g=e.onResize,b=e.style,x=b===void 0?{}:b,w=O.useRef(null),S=O.useRef();S.current=g,O.useImperativeHandle(t,function(){return Object.defineProperty(w.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),w.current},configurable:!0})});var A=O.useState({containerWidth:a.width,containerHeight:a.height}),N=qW(A,2),C=N[0],M=N[1],R=O.useCallback(function(B,_){M(function(E){var $=Math.round(B),L=Math.round(_);return E.containerWidth===$&&E.containerHeight===L?E:{containerWidth:$,containerHeight:L}})},[]);O.useEffect(function(){var B=function(V){var X,J=V[0].contentRect,Q=J.width,ie=J.height;R(Q,ie),(X=S.current)===null||X===void 0||X.call(S,Q,ie)};v>0&&(B=nM(B,v,{trailing:!0,leading:!1}));var _=new ResizeObserver(B),E=w.current.getBoundingClientRect(),$=E.width,L=E.height;return R($,L),_.observe(w.current),function(){_.disconnect()}},[R,v]);var P=O.useMemo(function(){var B=C.containerWidth,_=C.containerHeight;if(B<0||_<0)return null;yr(Vi(l)||Vi(c),`The width(%s) and height(%s) are both fixed numbers,
       maybe you don't need to use a ResponsiveContainer.`,l,c),yr(!n||n>0,"The aspect(%s) must be greater than zero.",n);var E=Vi(l)?B:l,$=Vi(c)?_:c;n&&n>0&&(E?$=E/n:$&&(E=$*n),h&&$>h&&($=h)),yr(E>0||$>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.`,E,$,l,c,f,d,n);var L=!Array.isArray(m)&&ha(m.type).endsWith("Chart");return T.Children.map(m,function(q){return T.isValidElement(q)?O.cloneElement(q,Qf({width:E,height:$},L?{style:Qf({height:"100%",width:"100%",maxHeight:$,maxWidth:E},q.props.style)}:{})):q})},[n,m,c,h,d,f,C,l]);return T.createElement("div",{id:p?"".concat(p):void 0,className:de("recharts-responsive-container",y),style:Qf(Qf({},x),{},{width:l,height:c,minWidth:f,minHeight:d,maxHeight:h}),ref:w},P)}),vf=function(t){return null};vf.displayName="Cell";function pu(e){"@babel/helpers - typeof";return pu=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},pu(e)}function lO(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 Zg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lO(Object(n),!0).forEach(function(r){VW(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function VW(e,t,n){return t=YW(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YW(e){var t=XW(e,"string");return pu(t)=="symbol"?t:t+""}function XW(e,t){if(pu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Il={widthCache:{},cacheCount:0},QW=2e3,WW={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},oO="recharts_measurement_span";function ZW(e){var t=Zg({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var Dc=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Ea.isSsr)return{width:0,height:0};var r=ZW(n),a=JSON.stringify({text:t,copyStyle:r});if(Il.widthCache[a])return Il.widthCache[a];try{var i=document.getElementById(oO);i||(i=document.createElement("span"),i.setAttribute("id",oO),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var l=Zg(Zg({},WW),r);Object.assign(i.style,l),i.textContent="".concat(t);var s=i.getBoundingClientRect(),c={width:s.width,height:s.height};return Il.widthCache[a]=c,++Il.cacheCount>QW&&(Il.cacheCount=0,Il.widthCache={}),c}catch{return{width:0,height:0}}},JW=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function mu(e){"@babel/helpers - typeof";return mu=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},mu(e)}function Th(e,t){return rZ(e)||nZ(e,t)||tZ(e,t)||eZ()}function eZ(){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 tZ(e,t){if(e){if(typeof e=="string")return sO(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 sO(e,t)}}function sO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function nZ(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,s=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return s}}function rZ(e){if(Array.isArray(e))return e}function aZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lZ(r.key),r)}}function iZ(e,t,n){return t&&cO(e.prototype,t),n&&cO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function lZ(e){var t=oZ(e,"string");return mu(t)=="symbol"?t:t+""}function oZ(e,t){if(mu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(mu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var uO=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,fO=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,sZ=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,cZ=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,rM={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},uZ=Object.keys(rM),so="NaN";function fZ(e,t){return e*rM[t]}var Wf=function(){function e(t,n){aZ(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!sZ.test(n)&&(this.num=NaN,this.unit=""),uZ.includes(n)&&(this.num=fZ(t,n),this.unit="px")}return iZ(e,[{key:"add",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num/n.num,this.unit||n.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(n){var r,a=(r=cZ.exec(n))!==null&&r!==void 0?r:[],i=Th(a,3),l=i[1],s=i[2];return new e(parseFloat(l),s??"")}}])}();function aM(e){if(e.includes(so))return so;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=uO.exec(t))!==null&&n!==void 0?n:[],a=Th(r,4),i=a[1],l=a[2],s=a[3],c=Wf.parse(i??""),u=Wf.parse(s??""),f=l==="*"?c.multiply(u):c.divide(u);if(f.isNaN())return so;t=t.replace(uO,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var d,h=(d=fO.exec(t))!==null&&d!==void 0?d:[],m=Th(h,4),j=m[1],v=m[2],p=m[3],y=Wf.parse(j??""),g=Wf.parse(p??""),b=v==="+"?y.add(g):y.subtract(g);if(b.isNaN())return so;t=t.replace(fO,b.toString())}return t}var dO=/\(([^()]*)\)/;function dZ(e){for(var t=e;t.includes("(");){var n=dO.exec(t),r=Th(n,2),a=r[1];t=t.replace(dO,aM(a))}return t}function hZ(e){var t=e.replace(/\s+/g,"");return t=dZ(t),t=aM(t),t}function pZ(e){try{return hZ(e)}catch{return so}}function Zy(e){var t=pZ(e.slice(5,-1));return t===so?"":t}var mZ=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],yZ=["dx","dy","angle","className","breakAll"];function Jg(){return Jg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jg.apply(this,arguments)}function hO(e,t){if(e==null)return{};var n=vZ(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vZ(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 pO(e,t){return jZ(e)||bZ(e,t)||xZ(e,t)||gZ()}function gZ(){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 xZ(e,t){if(e){if(typeof e=="string")return mO(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 mO(e,t)}}function mO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bZ(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,s=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return s}}function jZ(e){if(Array.isArray(e))return e}var iM=/[ \f\n\r\t\v\u2028\u2029]+/,lM=function(t){var n=t.children,r=t.breakAll,a=t.style;try{var i=[];le(n)||(r?i=n.toString().split(""):i=n.toString().split(iM));var l=i.map(function(c){return{word:c,width:Dc(c,a).width}}),s=r?0:Dc(" ",a).width;return{wordsWithComputedWidth:l,spaceWidth:s}}catch{return null}},SZ=function(t,n,r,a,i){var l=t.maxLines,s=t.children,c=t.style,u=t.breakAll,f=Y(l),d=s,h=function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return E.reduce(function($,L){var q=L.word,V=L.width,X=$[$.length-1];if(X&&(a==null||i||X.width+V+r<Number(a)))X.words.push(q),X.width+=V+r;else{var J={words:[q],width:V};$.push(J)}return $},[])},m=h(n),j=function(E){return E.reduce(function($,L){return $.width>L.width?$:L})};if(!f)return m;for(var v="…",p=function(E){var $=d.slice(0,E),L=lM({breakAll:u,style:c,children:$+v}).wordsWithComputedWidth,q=h(L),V=q.length>l||j(q).width>Number(a);return[V,q]},y=0,g=d.length-1,b=0,x;y<=g&&b<=d.length-1;){var w=Math.floor((y+g)/2),S=w-1,A=p(S),N=pO(A,2),C=N[0],M=N[1],R=p(w),P=pO(R,1),B=P[0];if(!C&&!B&&(y=w+1),C&&B&&(g=w-1),!C&&B){x=M;break}b++}return x||m},yO=function(t){var n=le(t)?[]:t.toString().split(iM);return[{words:n}]},wZ=function(t){var n=t.width,r=t.scaleToFit,a=t.children,i=t.style,l=t.breakAll,s=t.maxLines;if((n||r)&&!Ea.isSsr){var c,u,f=lM({breakAll:l,children:a,style:i});if(f){var d=f.wordsWithComputedWidth,h=f.spaceWidth;c=d,u=h}else return yO(a);return SZ({breakAll:l,children:a,maxLines:s,style:i},c,u,n,r)}return yO(a)},vO="#808080",Sl=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,i=a===void 0?0:a,l=t.lineHeight,s=l===void 0?"1em":l,c=t.capHeight,u=c===void 0?"0.71em":c,f=t.scaleToFit,d=f===void 0?!1:f,h=t.textAnchor,m=h===void 0?"start":h,j=t.verticalAnchor,v=j===void 0?"end":j,p=t.fill,y=p===void 0?vO:p,g=hO(t,mZ),b=O.useMemo(function(){return wZ({breakAll:g.breakAll,children:g.children,maxLines:g.maxLines,scaleToFit:d,style:g.style,width:g.width})},[g.breakAll,g.children,g.maxLines,d,g.style,g.width]),x=g.dx,w=g.dy,S=g.angle,A=g.className,N=g.breakAll,C=hO(g,yZ);if(!Nt(r)||!Nt(i))return null;var M=r+(Y(x)?x:0),R=i+(Y(w)?w:0),P;switch(v){case"start":P=Zy("calc(".concat(u,")"));break;case"middle":P=Zy("calc(".concat((b.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:P=Zy("calc(".concat(b.length-1," * -").concat(s,")"));break}var B=[];if(d){var _=b[0].width,E=g.width;B.push("scale(".concat((Y(E)?E/_:1)/_,")"))}return S&&B.push("rotate(".concat(S,", ").concat(M,", ").concat(R,")")),B.length&&(C.transform=B.join(" ")),T.createElement("text",Jg({},re(C,!0),{x:M,y:R,className:de("recharts-text",A),textAnchor:m,fill:y.includes("url")?vO:y}),b.map(function($,L){var q=$.words.join(N?"":" ");return T.createElement("tspan",{x:M,dy:L===0?P:s,key:"".concat(q,"-").concat(L)},q)}))};function di(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function OZ(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Z0(e){let t,n,r;e.length!==2?(t=di,n=(s,c)=>di(e(s),c),r=(s,c)=>e(s)-c):(t=e===di||e===OZ?e:AZ,n=e,r=e);function a(s,c,u=0,f=s.length){if(u<f){if(t(c,c)!==0)return f;do{const d=u+f>>>1;n(s[d],c)<0?u=d+1:f=d}while(u<f)}return u}function i(s,c,u=0,f=s.length){if(u<f){if(t(c,c)!==0)return f;do{const d=u+f>>>1;n(s[d],c)<=0?u=d+1:f=d}while(u<f)}return u}function l(s,c,u=0,f=s.length){const d=a(s,c,u,f-1);return d>u&&r(s[d-1],c)>-r(s[d],c)?d-1:d}return{left:a,center:l,right:i}}function AZ(){return 0}function oM(e){return e===null?NaN:+e}function*NZ(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const EZ=Z0(di),gf=EZ.right;Z0(oM).center;class gO extends Map{constructor(t,n=TZ){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(xO(this,t))}has(t){return super.has(xO(this,t))}set(t,n){return super.set(CZ(this,t),n)}delete(t){return super.delete(_Z(this,t))}}function xO({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function CZ({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function _Z({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function TZ(e){return e!==null&&typeof e=="object"?e.valueOf():e}function PZ(e=di){if(e===di)return sM;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 sM(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const MZ=Math.sqrt(50),$Z=Math.sqrt(10),RZ=Math.sqrt(2);function Ph(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>=MZ?10:i>=$Z?5:i>=RZ?2:1;let s,c,u;return a<0?(u=Math.pow(10,-a)/l,s=Math.round(e*u),c=Math.round(t*u),s/u<e&&++s,c/u>t&&--c,u=-u):(u=Math.pow(10,a)*l,s=Math.round(e/u),c=Math.round(t/u),s*u<e&&++s,c*u>t&&--c),c<s&&.5<=n&&n<2?Ph(e,t,n*2):[s,c,u]}function ex(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[a,i,l]=r?Ph(t,e,n):Ph(e,t,n);if(!(i>=a))return[];const s=i-a+1,c=new Array(s);if(r)if(l<0)for(let u=0;u<s;++u)c[u]=(i-u)/-l;else for(let u=0;u<s;++u)c[u]=(i-u)*l;else if(l<0)for(let u=0;u<s;++u)c[u]=(a+u)/-l;else for(let u=0;u<s;++u)c[u]=(a+u)*l;return c}function tx(e,t,n){return t=+t,e=+e,n=+n,Ph(e,t,n)[2]}function nx(e,t,n){t=+t,e=+e,n=+n;const r=t<e,a=r?tx(t,e,n):tx(e,t,n);return(r?-1:1)*(a<0?1/-a:a)}function bO(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function jO(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function cM(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?sM:PZ(a);r>n;){if(r-n>600){const c=r-n+1,u=t-n+1,f=Math.log(c),d=.5*Math.exp(2*f/3),h=.5*Math.sqrt(f*d*(c-d)/c)*(u-c/2<0?-1:1),m=Math.max(n,Math.floor(t-u*d/c+h)),j=Math.min(r,Math.floor(t+(c-u)*d/c+h));cM(e,t,m,j,a)}const i=e[t];let l=n,s=r;for(sc(e,n,t),a(e[r],i)>0&&sc(e,n,r);l<s;){for(sc(e,l,s),++l,--s;a(e[l],i)<0;)++l;for(;a(e[s],i)>0;)--s}a(e[n],i)===0?sc(e,n,s):(++s,sc(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function sc(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function kZ(e,t,n){if(e=Float64Array.from(NZ(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return jO(e);if(t>=1)return bO(e);var r,a=(r-1)*t,i=Math.floor(a),l=bO(cM(e,i).subarray(0,i+1)),s=jO(e.subarray(i+1));return l+(s-l)*(a-i)}}function DZ(e,t,n=oM){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),s=+n(e[i+1],i+1,e);return l+(s-l)*(a-i)}}function LZ(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<a;)i[r]=e+r*n;return i}function ir(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Ca(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const rx=Symbol("implicit");function J0(){var e=new gO,t=[],n=[],r=rx;function a(i){let l=e.get(i);if(l===void 0){if(r!==rx)return r;e.set(i,l=t.push(i)-1)}return n[l%n.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new gO;for(const l of i)e.has(l)||e.set(l,t.push(l)-1);return a},a.range=function(i){return arguments.length?(n=Array.from(i),a):n.slice()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return J0(t,n).unknown(r)},ir.apply(a,arguments),a}function yu(){var e=J0().unknown(void 0),t=e.domain,n=e.range,r=0,a=1,i,l,s=!1,c=0,u=0,f=.5;delete e.unknown;function d(){var h=t().length,m=a<r,j=m?a:r,v=m?r:a;i=(v-j)/Math.max(1,h-c+u*2),s&&(i=Math.floor(i)),j+=(v-j-i*(h-c))*f,l=i*(1-c),s&&(j=Math.round(j),l=Math.round(l));var p=LZ(h).map(function(y){return j+i*y});return n(m?p.reverse():p)}return e.domain=function(h){return arguments.length?(t(h),d()):t()},e.range=function(h){return arguments.length?([r,a]=h,r=+r,a=+a,d()):[r,a]},e.rangeRound=function(h){return[r,a]=h,r=+r,a=+a,s=!0,d()},e.bandwidth=function(){return l},e.step=function(){return i},e.round=function(h){return arguments.length?(s=!!h,d()):s},e.padding=function(h){return arguments.length?(c=Math.min(1,u=+h),d()):c},e.paddingInner=function(h){return arguments.length?(c=Math.min(1,h),d()):c},e.paddingOuter=function(h){return arguments.length?(u=+h,d()):u},e.align=function(h){return arguments.length?(f=Math.max(0,Math.min(1,h)),d()):f},e.copy=function(){return yu(t(),[r,a]).round(s).paddingInner(c).paddingOuter(u).align(f)},ir.apply(d(),arguments)}function uM(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return uM(t())},e}function Lc(){return uM(yu.apply(null,arguments).paddingInner(1))}function e1(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function fM(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function xf(){}var vu=.7,Mh=1/vu,So="\\s*([+-]?\\d+)\\s*",gu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",zr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",zZ=/^#([0-9a-f]{3,8})$/,BZ=new RegExp(`^rgb\\(${So},${So},${So}\\)$`),IZ=new RegExp(`^rgb\\(${zr},${zr},${zr}\\)$`),UZ=new RegExp(`^rgba\\(${So},${So},${So},${gu}\\)$`),qZ=new RegExp(`^rgba\\(${zr},${zr},${zr},${gu}\\)$`),HZ=new RegExp(`^hsl\\(${gu},${zr},${zr}\\)$`),FZ=new RegExp(`^hsla\\(${gu},${zr},${zr},${gu}\\)$`),SO={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};e1(xf,xu,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:wO,formatHex:wO,formatHex8:GZ,formatHsl:KZ,formatRgb:OO,toString:OO});function wO(){return this.rgb().formatHex()}function GZ(){return this.rgb().formatHex8()}function KZ(){return dM(this).formatHsl()}function OO(){return this.rgb().formatRgb()}function xu(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=zZ.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?AO(t):n===3?new dn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Zf(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Zf(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=BZ.exec(e))?new dn(t[1],t[2],t[3],1):(t=IZ.exec(e))?new dn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=UZ.exec(e))?Zf(t[1],t[2],t[3],t[4]):(t=qZ.exec(e))?Zf(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=HZ.exec(e))?CO(t[1],t[2]/100,t[3]/100,1):(t=FZ.exec(e))?CO(t[1],t[2]/100,t[3]/100,t[4]):SO.hasOwnProperty(e)?AO(SO[e]):e==="transparent"?new dn(NaN,NaN,NaN,0):null}function AO(e){return new dn(e>>16&255,e>>8&255,e&255,1)}function Zf(e,t,n,r){return r<=0&&(e=t=n=NaN),new dn(e,t,n,r)}function VZ(e){return e instanceof xf||(e=xu(e)),e?(e=e.rgb(),new dn(e.r,e.g,e.b,e.opacity)):new dn}function ax(e,t,n,r){return arguments.length===1?VZ(e):new dn(e,t,n,r??1)}function dn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}e1(dn,ax,fM(xf,{brighter(e){return e=e==null?Mh:Math.pow(Mh,e),new dn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?vu:Math.pow(vu,e),new dn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new dn(dl(this.r),dl(this.g),dl(this.b),$h(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:NO,formatHex:NO,formatHex8:YZ,formatRgb:EO,toString:EO}));function NO(){return`#${Yi(this.r)}${Yi(this.g)}${Yi(this.b)}`}function YZ(){return`#${Yi(this.r)}${Yi(this.g)}${Yi(this.b)}${Yi((isNaN(this.opacity)?1:this.opacity)*255)}`}function EO(){const e=$h(this.opacity);return`${e===1?"rgb(":"rgba("}${dl(this.r)}, ${dl(this.g)}, ${dl(this.b)}${e===1?")":`, ${e})`}`}function $h(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function dl(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Yi(e){return e=dl(e),(e<16?"0":"")+e.toString(16)}function CO(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new hr(e,t,n,r)}function dM(e){if(e instanceof hr)return new hr(e.h,e.s,e.l,e.opacity);if(e instanceof xf||(e=xu(e)),!e)return new hr;if(e instanceof hr)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,s=i-a,c=(i+a)/2;return s?(t===i?l=(n-r)/s+(n<r)*6:n===i?l=(r-t)/s+2:l=(t-n)/s+4,s/=c<.5?i+a:2-i-a,l*=60):s=c>0&&c<1?0:l,new hr(l,s,c,e.opacity)}function XZ(e,t,n,r){return arguments.length===1?dM(e):new hr(e,t,n,r??1)}function hr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}e1(hr,XZ,fM(xf,{brighter(e){return e=e==null?Mh:Math.pow(Mh,e),new hr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?vu:Math.pow(vu,e),new hr(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 dn(Jy(e>=240?e-240:e+120,a,r),Jy(e,a,r),Jy(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new hr(_O(this.h),Jf(this.s),Jf(this.l),$h(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=$h(this.opacity);return`${e===1?"hsl(":"hsla("}${_O(this.h)}, ${Jf(this.s)*100}%, ${Jf(this.l)*100}%${e===1?")":`, ${e})`}`}}));function _O(e){return e=(e||0)%360,e<0?e+360:e}function Jf(e){return Math.max(0,Math.min(1,e||0))}function Jy(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 t1=e=>()=>e;function QZ(e,t){return function(n){return e+n*t}}function WZ(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 ZZ(e){return(e=+e)==1?hM:function(t,n){return n-t?WZ(t,n,e):t1(isNaN(t)?n:t)}}function hM(e,t){var n=t-e;return n?QZ(e,n):t1(isNaN(e)?t:e)}const TO=function e(t){var n=ZZ(t);function r(a,i){var l=n((a=ax(a)).r,(i=ax(i)).r),s=n(a.g,i.g),c=n(a.b,i.b),u=hM(a.opacity,i.opacity);return function(f){return a.r=l(f),a.g=s(f),a.b=c(f),a.opacity=u(f),a+""}}return r.gamma=e,r}(1);function JZ(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(i){for(a=0;a<n;++a)r[a]=e[a]*(1-i)+t[a]*i;return r}}function eJ(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function tJ(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,a=new Array(r),i=new Array(n),l;for(l=0;l<r;++l)a[l]=Ks(e[l],t[l]);for(;l<n;++l)i[l]=t[l];return function(s){for(l=0;l<r;++l)i[l]=a[l](s);return i}}function nJ(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Rh(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function rJ(e,t){var n={},r={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?n[a]=Ks(e[a],t[a]):r[a]=t[a];return function(i){for(a in n)r[a]=n[a](i);return r}}var ix=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ev=new RegExp(ix.source,"g");function aJ(e){return function(){return e}}function iJ(e){return function(t){return e(t)+""}}function lJ(e,t){var n=ix.lastIndex=ev.lastIndex=0,r,a,i,l=-1,s=[],c=[];for(e=e+"",t=t+"";(r=ix.exec(e))&&(a=ev.exec(t));)(i=a.index)>n&&(i=t.slice(n,i),s[l]?s[l]+=i:s[++l]=i),(r=r[0])===(a=a[0])?s[l]?s[l]+=a:s[++l]=a:(s[++l]=null,c.push({i:l,x:Rh(r,a)})),n=ev.lastIndex;return n<t.length&&(i=t.slice(n),s[l]?s[l]+=i:s[++l]=i),s.length<2?c[0]?iJ(c[0].x):aJ(t):(t=c.length,function(u){for(var f=0,d;f<t;++f)s[(d=c[f]).i]=d.x(u);return s.join("")})}function Ks(e,t){var n=typeof t,r;return t==null||n==="boolean"?t1(t):(n==="number"?Rh:n==="string"?(r=xu(t))?(t=r,TO):lJ:t instanceof xu?TO:t instanceof Date?nJ:eJ(t)?JZ:Array.isArray(t)?tJ:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?rJ:Rh)(e,t)}function n1(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function oJ(e,t){t===void 0&&(t=e,e=Ks);for(var n=0,r=t.length-1,a=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(a,a=t[++n]);return function(l){var s=Math.max(0,Math.min(r-1,Math.floor(l*=r)));return i[s](l-s)}}function sJ(e){return function(){return e}}function kh(e){return+e}var PO=[0,1];function nn(e){return e}function lx(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:sJ(isNaN(t)?NaN:.5)}function cJ(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function uJ(e,t,n){var r=e[0],a=e[1],i=t[0],l=t[1];return a<r?(r=lx(a,r),i=n(l,i)):(r=lx(r,a),i=n(i,l)),function(s){return i(r(s))}}function fJ(e,t,n){var r=Math.min(e.length,t.length)-1,a=new Array(r),i=new Array(r),l=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++l<r;)a[l]=lx(e[l],e[l+1]),i[l]=n(t[l],t[l+1]);return function(s){var c=gf(e,s,1,r)-1;return i[c](a[c](s))}}function bf(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Om(){var e=PO,t=PO,n=Ks,r,a,i,l=nn,s,c,u;function f(){var h=Math.min(e.length,t.length);return l!==nn&&(l=cJ(e[0],e[h-1])),s=h>2?fJ:uJ,c=u=null,d}function d(h){return h==null||isNaN(h=+h)?i:(c||(c=s(e.map(r),t,n)))(r(l(h)))}return d.invert=function(h){return l(a((u||(u=s(t,e.map(r),Rh)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,kh),f()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),f()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),n=n1,f()},d.clamp=function(h){return arguments.length?(l=h?!0:nn,f()):l!==nn},d.interpolate=function(h){return arguments.length?(n=h,f()):n},d.unknown=function(h){return arguments.length?(i=h,d):i},function(h,m){return r=h,a=m,f()}}function r1(){return Om()(nn,nn)}function dJ(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Dh(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 Jo(e){return e=Dh(Math.abs(e)),e?e[1]:NaN}function hJ(e,t){return function(n,r){for(var a=n.length,i=[],l=0,s=e[0],c=0;a>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),i.push(n.substring(a-=s,a+s)),!((c+=s+1)>r));)s=e[l=(l+1)%e.length];return i.reverse().join(t)}}function pJ(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var mJ=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function bu(e){if(!(t=mJ.exec(e)))throw new Error("invalid format: "+e);var t;return new a1({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]})}bu.prototype=a1.prototype;function a1(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+""}a1.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 yJ(e){e:for(var t=e.length,n=1,r=-1,a;n<t;++n)switch(e[n]){case".":r=a=n;break;case"0":r===0&&(r=n),a=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(a+1):e}var Lh;function vJ(e,t){var n=Dh(e,t);if(!n)return Lh=void 0,e.toPrecision(t);var r=n[0],a=n[1],i=a-(Lh=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")+Dh(e,Math.max(0,t+i-1))[0]}function MO(e,t){var n=Dh(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 $O={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:dJ,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)=>MO(e*100,t),r:MO,s:vJ,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function RO(e){return e}var kO=Array.prototype.map,DO=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function gJ(e){var t=e.grouping===void 0||e.thousands===void 0?RO:hJ(kO.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?RO:pJ(kO.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(d,h){d=bu(d);var m=d.fill,j=d.align,v=d.sign,p=d.symbol,y=d.zero,g=d.width,b=d.comma,x=d.precision,w=d.trim,S=d.type;S==="n"?(b=!0,S="g"):$O[S]||(x===void 0&&(x=12),w=!0,S="g"),(y||m==="0"&&j==="=")&&(y=!0,m="0",j="=");var A=(h&&h.prefix!==void 0?h.prefix:"")+(p==="$"?n:p==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():""),N=(p==="$"?r:/[%p]/.test(S)?l:"")+(h&&h.suffix!==void 0?h.suffix:""),C=$O[S],M=/[defgprs%]/.test(S);x=x===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function R(P){var B=A,_=N,E,$,L;if(S==="c")_=C(P)+_,P="";else{P=+P;var q=P<0||1/P<0;if(P=isNaN(P)?c:C(Math.abs(P),x),w&&(P=yJ(P)),q&&+P==0&&v!=="+"&&(q=!1),B=(q?v==="("?v:s:v==="-"||v==="("?"":v)+B,_=(S==="s"&&!isNaN(P)&&Lh!==void 0?DO[8+Lh/3]:"")+_+(q&&v==="("?")":""),M){for(E=-1,$=P.length;++E<$;)if(L=P.charCodeAt(E),48>L||L>57){_=(L===46?a+P.slice(E+1):P.slice(E))+_,P=P.slice(0,E);break}}}b&&!y&&(P=t(P,1/0));var V=B.length+P.length+_.length,X=V<g?new Array(g-V+1).join(m):"";switch(b&&y&&(P=t(X+P,X.length?g-_.length:1/0),X=""),j){case"<":P=B+P+_+X;break;case"=":P=B+X+P+_;break;case"^":P=X.slice(0,V=X.length>>1)+B+P+_+X.slice(V);break;default:P=X+B+P+_;break}return i(P)}return R.toString=function(){return d+""},R}function f(d,h){var m=Math.max(-8,Math.min(8,Math.floor(Jo(h)/3)))*3,j=Math.pow(10,-m),v=u((d=bu(d),d.type="f",d),{suffix:DO[8+m/3]});return function(p){return v(j*p)}}return{format:u,formatPrefix:f}}var ed,i1,pM;xJ({thousands:",",grouping:[3],currency:["$",""]});function xJ(e){return ed=gJ(e),i1=ed.format,pM=ed.formatPrefix,ed}function bJ(e){return Math.max(0,-Jo(Math.abs(e)))}function jJ(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Jo(t)/3)))*3-Jo(Math.abs(e)))}function SJ(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Jo(t)-Jo(e))+1}function mM(e,t,n,r){var a=nx(e,t,n),i;switch(r=bu(r??",f"),r.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=jJ(a,l))&&(r.precision=i),pM(r,l)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=SJ(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=bJ(a))&&(r.precision=i-(r.type==="%")*2);break}}return i1(r)}function Ei(e){var t=e.domain;return e.ticks=function(n){var r=t();return ex(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return mM(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],s=r[i],c,u,f=10;for(s<l&&(u=l,l=s,s=u,u=a,a=i,i=u);f-- >0;){if(u=tx(l,s,n),u===c)return r[a]=l,r[i]=s,t(r);if(u>0)l=Math.floor(l/u)*u,s=Math.ceil(s/u)*u;else if(u<0)l=Math.ceil(l*u)/u,s=Math.floor(s*u)/u;else break;c=u}return e},e}function zh(){var e=r1();return e.copy=function(){return bf(e,zh())},ir.apply(e,arguments),Ei(e)}function yM(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,kh),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return yM(e).unknown(t)},e=arguments.length?Array.from(e,kh):[0,1],Ei(n)}function vM(e,t){e=e.slice();var n=0,r=e.length-1,a=e[n],i=e[r],l;return i<a&&(l=n,n=r,r=l,l=a,a=i,i=l),e[n]=t.floor(a),e[r]=t.ceil(i),e}function LO(e){return Math.log(e)}function zO(e){return Math.exp(e)}function wJ(e){return-Math.log(-e)}function OJ(e){return-Math.exp(-e)}function AJ(e){return isFinite(e)?+("1e"+e):e<0?0:e}function NJ(e){return e===10?AJ:e===Math.E?Math.exp:t=>Math.pow(e,t)}function EJ(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 BO(e){return(t,n)=>-e(-t,n)}function l1(e){const t=e(LO,zO),n=t.domain;let r=10,a,i;function l(){return a=EJ(r),i=NJ(r),n()[0]<0?(a=BO(a),i=BO(i),e(wJ,OJ)):e(LO,zO),t}return t.base=function(s){return arguments.length?(r=+s,l()):r},t.domain=function(s){return arguments.length?(n(s),l()):n()},t.ticks=s=>{const c=n();let u=c[0],f=c[c.length-1];const d=f<u;d&&([u,f]=[f,u]);let h=a(u),m=a(f),j,v;const p=s==null?10:+s;let y=[];if(!(r%1)&&m-h<p){if(h=Math.floor(h),m=Math.ceil(m),u>0){for(;h<=m;++h)for(j=1;j<r;++j)if(v=h<0?j/i(-h):j*i(h),!(v<u)){if(v>f)break;y.push(v)}}else for(;h<=m;++h)for(j=r-1;j>=1;--j)if(v=h>0?j/i(-h):j*i(h),!(v<u)){if(v>f)break;y.push(v)}y.length*2<p&&(y=ex(u,f,p))}else y=ex(h,m,Math.min(m-h,p)).map(i);return d?y.reverse():y},t.tickFormat=(s,c)=>{if(s==null&&(s=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=bu(c)).precision==null&&(c.trim=!0),c=i1(c)),s===1/0)return c;const u=Math.max(1,r*s/t.ticks().length);return f=>{let d=f/i(Math.round(a(f)));return d*r<r-.5&&(d*=r),d<=u?c(f):""}},t.nice=()=>n(vM(n(),{floor:s=>i(Math.floor(a(s))),ceil:s=>i(Math.ceil(a(s)))})),t}function gM(){const e=l1(Om()).domain([1,10]);return e.copy=()=>bf(e,gM()).base(e.base()),ir.apply(e,arguments),e}function IO(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function UO(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function o1(e){var t=1,n=e(IO(t),UO(t));return n.constant=function(r){return arguments.length?e(IO(t=+r),UO(t)):t},Ei(n)}function xM(){var e=o1(Om());return e.copy=function(){return bf(e,xM()).constant(e.constant())},ir.apply(e,arguments)}function qO(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function CJ(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function _J(e){return e<0?-e*e:e*e}function s1(e){var t=e(nn,nn),n=1;function r(){return n===1?e(nn,nn):n===.5?e(CJ,_J):e(qO(n),qO(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},Ei(t)}function c1(){var e=s1(Om());return e.copy=function(){return bf(e,c1()).exponent(e.exponent())},ir.apply(e,arguments),e}function TJ(){return c1.apply(null,arguments).exponent(.5)}function HO(e){return Math.sign(e)*e*e}function PJ(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function bM(){var e=r1(),t=[0,1],n=!1,r;function a(i){var l=PJ(e(i));return isNaN(l)?r:n?Math.round(l):l}return a.invert=function(i){return e.invert(HO(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,kh)).map(HO)),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 bM(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},ir.apply(a,arguments),Ei(a)}function jM(){var e=[],t=[],n=[],r;function a(){var l=0,s=Math.max(1,t.length);for(n=new Array(s-1);++l<s;)n[l-1]=DZ(e,l/s);return i}function i(l){return l==null||isNaN(l=+l)?r:t[gf(n,l)]}return i.invertExtent=function(l){var s=t.indexOf(l);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},i.domain=function(l){if(!arguments.length)return e.slice();e=[];for(let s of l)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(di),a()},i.range=function(l){return arguments.length?(t=Array.from(l),a()):t.slice()},i.unknown=function(l){return arguments.length?(r=l,i):r},i.quantiles=function(){return n.slice()},i.copy=function(){return jM().domain(e).range(t).unknown(r)},ir.apply(i,arguments)}function SM(){var e=0,t=1,n=1,r=[.5],a=[0,1],i;function l(c){return c!=null&&c<=c?a[gf(r,c,0,n)]:i}function s(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*t-(c-n)*e)/(n+1);return l}return l.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,s()):[e,t]},l.range=function(c){return arguments.length?(n=(a=Array.from(c)).length-1,s()):a.slice()},l.invertExtent=function(c){var u=a.indexOf(c);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},l.unknown=function(c){return arguments.length&&(i=c),l},l.thresholds=function(){return r.slice()},l.copy=function(){return SM().domain([e,t]).range(a).unknown(i)},ir.apply(Ei(l),arguments)}function wM(){var e=[.5],t=[0,1],n,r=1;function a(i){return i!=null&&i<=i?t[gf(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 wM().domain(e).range(t).unknown(n)},ir.apply(a,arguments)}const tv=new Date,nv=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),s=a.ceil(i);return i-l<s-i?l:s},a.offset=(i,l)=>(t(i=new Date(+i),l==null?1:Math.floor(l)),i),a.range=(i,l,s)=>{const c=[];if(i=a.ceil(i),s=s==null?1:Math.floor(s),!(i<l)||!(s>0))return c;let u;do c.push(u=new Date(+i)),t(i,s),e(i);while(u<i&&i<l);return c},a.filter=i=>Ct(l=>{if(l>=l)for(;e(l),!i(l);)l.setTime(l-1)},(l,s)=>{if(l>=l)if(s<0)for(;++s<=0;)for(;t(l,-1),!i(l););else for(;--s>=0;)for(;t(l,1),!i(l););}),n&&(a.count=(i,l)=>(tv.setTime(+i),nv.setTime(+l),e(tv),e(nv),Math.floor(n(tv,nv))),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 Bh=Ct(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Bh.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):Bh);Bh.range;const oa=1e3,Wn=oa*60,sa=Wn*60,ja=sa*24,u1=ja*7,FO=ja*30,rv=ja*365,Xi=Ct(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*oa)},(e,t)=>(t-e)/oa,e=>e.getUTCSeconds());Xi.range;const f1=Ct(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*oa)},(e,t)=>{e.setTime(+e+t*Wn)},(e,t)=>(t-e)/Wn,e=>e.getMinutes());f1.range;const d1=Ct(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Wn)},(e,t)=>(t-e)/Wn,e=>e.getUTCMinutes());d1.range;const h1=Ct(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*oa-e.getMinutes()*Wn)},(e,t)=>{e.setTime(+e+t*sa)},(e,t)=>(t-e)/sa,e=>e.getHours());h1.range;const p1=Ct(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*sa)},(e,t)=>(t-e)/sa,e=>e.getUTCHours());p1.range;const jf=Ct(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Wn)/ja,e=>e.getDate()-1);jf.range;const Am=Ct(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ja,e=>e.getUTCDate()-1);Am.range;const OM=Ct(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ja,e=>Math.floor(e/ja));OM.range;function Ml(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())*Wn)/u1)}const Nm=Ml(0),Ih=Ml(1),MJ=Ml(2),$J=Ml(3),es=Ml(4),RJ=Ml(5),kJ=Ml(6);Nm.range;Ih.range;MJ.range;$J.range;es.range;RJ.range;kJ.range;function $l(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)/u1)}const Em=$l(0),Uh=$l(1),DJ=$l(2),LJ=$l(3),ts=$l(4),zJ=$l(5),BJ=$l(6);Em.range;Uh.range;DJ.range;LJ.range;ts.range;zJ.range;BJ.range;const m1=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());m1.range;const y1=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());y1.range;const Sa=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());Sa.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)});Sa.range;const wa=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());wa.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)});wa.range;function AM(e,t,n,r,a,i){const l=[[Xi,1,oa],[Xi,5,5*oa],[Xi,15,15*oa],[Xi,30,30*oa],[i,1,Wn],[i,5,5*Wn],[i,15,15*Wn],[i,30,30*Wn],[a,1,sa],[a,3,3*sa],[a,6,6*sa],[a,12,12*sa],[r,1,ja],[r,2,2*ja],[n,1,u1],[t,1,FO],[t,3,3*FO],[e,1,rv]];function s(u,f,d){const h=f<u;h&&([u,f]=[f,u]);const m=d&&typeof d.range=="function"?d:c(u,f,d),j=m?m.range(u,+f+1):[];return h?j.reverse():j}function c(u,f,d){const h=Math.abs(f-u)/d,m=Z0(([,,p])=>p).right(l,h);if(m===l.length)return e.every(nx(u/rv,f/rv,d));if(m===0)return Bh.every(Math.max(nx(u,f,d),1));const[j,v]=l[h/l[m-1][2]<l[m][2]/h?m-1:m];return j.every(v)}return[s,c]}const[IJ,UJ]=AM(wa,y1,Em,OM,p1,d1),[qJ,HJ]=AM(Sa,m1,Nm,jf,h1,f1);function av(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function iv(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function cc(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function FJ(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,i=e.days,l=e.shortDays,s=e.months,c=e.shortMonths,u=uc(a),f=fc(a),d=uc(i),h=fc(i),m=uc(l),j=fc(l),v=uc(s),p=fc(s),y=uc(c),g=fc(c),b={a:L,A:q,b:V,B:X,c:null,d:QO,e:QO,f:hee,g:wee,G:Aee,H:uee,I:fee,j:dee,L:NM,m:pee,M:mee,p:J,q:Q,Q:JO,s:eA,S:yee,u:vee,U:gee,V:xee,w:bee,W:jee,x:null,X:null,y:See,Y:Oee,Z:Nee,"%":ZO},x={a:ie,A:ae,b:Se,B:Xt,c:null,d:WO,e:WO,f:Tee,g:Iee,G:qee,H:Eee,I:Cee,j:_ee,L:CM,m:Pee,M:Mee,p:Nr,q:Ge,Q:JO,s:eA,S:$ee,u:Ree,U:kee,V:Dee,w:Lee,W:zee,x:null,X:null,y:Bee,Y:Uee,Z:Hee,"%":ZO},w={a:M,A:R,b:P,B,c:_,d:YO,e:YO,f:lee,g:VO,G:KO,H:XO,I:XO,j:nee,L:iee,m:tee,M:ree,p:C,q:eee,Q:see,s:cee,S:aee,u:XJ,U:QJ,V:WJ,w:YJ,W:ZJ,x:E,X:$,y:VO,Y:KO,Z:JJ,"%":oee};b.x=S(n,b),b.X=S(r,b),b.c=S(t,b),x.x=S(n,x),x.X=S(r,x),x.c=S(t,x);function S(Z,oe){return function(W){var G=[],Te=-1,ye=0,ot=Z.length,dt,yt,Pa;for(W instanceof Date||(W=new Date(+W));++Te<ot;)Z.charCodeAt(Te)===37&&(G.push(Z.slice(ye,Te)),(yt=GO[dt=Z.charAt(++Te)])!=null?dt=Z.charAt(++Te):yt=dt==="e"?" ":"0",(Pa=oe[dt])&&(dt=Pa(W,yt)),G.push(dt),ye=Te+1);return G.push(Z.slice(ye,Te)),G.join("")}}function A(Z,oe){return function(W){var G=cc(1900,void 0,1),Te=N(G,Z,W+="",0),ye,ot;if(Te!=W.length)return null;if("Q"in G)return new Date(G.Q);if("s"in G)return new Date(G.s*1e3+("L"in G?G.L:0));if(oe&&!("Z"in G)&&(G.Z=0),"p"in G&&(G.H=G.H%12+G.p*12),G.m===void 0&&(G.m="q"in G?G.q:0),"V"in G){if(G.V<1||G.V>53)return null;"w"in G||(G.w=1),"Z"in G?(ye=iv(cc(G.y,0,1)),ot=ye.getUTCDay(),ye=ot>4||ot===0?Uh.ceil(ye):Uh(ye),ye=Am.offset(ye,(G.V-1)*7),G.y=ye.getUTCFullYear(),G.m=ye.getUTCMonth(),G.d=ye.getUTCDate()+(G.w+6)%7):(ye=av(cc(G.y,0,1)),ot=ye.getDay(),ye=ot>4||ot===0?Ih.ceil(ye):Ih(ye),ye=jf.offset(ye,(G.V-1)*7),G.y=ye.getFullYear(),G.m=ye.getMonth(),G.d=ye.getDate()+(G.w+6)%7)}else("W"in G||"U"in G)&&("w"in G||(G.w="u"in G?G.u%7:"W"in G?1:0),ot="Z"in G?iv(cc(G.y,0,1)).getUTCDay():av(cc(G.y,0,1)).getDay(),G.m=0,G.d="W"in G?(G.w+6)%7+G.W*7-(ot+5)%7:G.w+G.U*7-(ot+6)%7);return"Z"in G?(G.H+=G.Z/100|0,G.M+=G.Z%100,iv(G)):av(G)}}function N(Z,oe,W,G){for(var Te=0,ye=oe.length,ot=W.length,dt,yt;Te<ye;){if(G>=ot)return-1;if(dt=oe.charCodeAt(Te++),dt===37){if(dt=oe.charAt(Te++),yt=w[dt in GO?oe.charAt(Te++):dt],!yt||(G=yt(Z,W,G))<0)return-1}else if(dt!=W.charCodeAt(G++))return-1}return G}function C(Z,oe,W){var G=u.exec(oe.slice(W));return G?(Z.p=f.get(G[0].toLowerCase()),W+G[0].length):-1}function M(Z,oe,W){var G=m.exec(oe.slice(W));return G?(Z.w=j.get(G[0].toLowerCase()),W+G[0].length):-1}function R(Z,oe,W){var G=d.exec(oe.slice(W));return G?(Z.w=h.get(G[0].toLowerCase()),W+G[0].length):-1}function P(Z,oe,W){var G=y.exec(oe.slice(W));return G?(Z.m=g.get(G[0].toLowerCase()),W+G[0].length):-1}function B(Z,oe,W){var G=v.exec(oe.slice(W));return G?(Z.m=p.get(G[0].toLowerCase()),W+G[0].length):-1}function _(Z,oe,W){return N(Z,t,oe,W)}function E(Z,oe,W){return N(Z,n,oe,W)}function $(Z,oe,W){return N(Z,r,oe,W)}function L(Z){return l[Z.getDay()]}function q(Z){return i[Z.getDay()]}function V(Z){return c[Z.getMonth()]}function X(Z){return s[Z.getMonth()]}function J(Z){return a[+(Z.getHours()>=12)]}function Q(Z){return 1+~~(Z.getMonth()/3)}function ie(Z){return l[Z.getUTCDay()]}function ae(Z){return i[Z.getUTCDay()]}function Se(Z){return c[Z.getUTCMonth()]}function Xt(Z){return s[Z.getUTCMonth()]}function Nr(Z){return a[+(Z.getUTCHours()>=12)]}function Ge(Z){return 1+~~(Z.getUTCMonth()/3)}return{format:function(Z){var oe=S(Z+="",b);return oe.toString=function(){return Z},oe},parse:function(Z){var oe=A(Z+="",!1);return oe.toString=function(){return Z},oe},utcFormat:function(Z){var oe=S(Z+="",x);return oe.toString=function(){return Z},oe},utcParse:function(Z){var oe=A(Z+="",!0);return oe.toString=function(){return Z},oe}}}var GO={"-":"",_:" ",0:"0"},kt=/^\s*\d+/,GJ=/^%/,KJ=/[\\^$*+?|[\]().{}]/g;function Ae(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i<n?new Array(n-i+1).join(t)+a:a)}function VJ(e){return e.replace(KJ,"\\$&")}function uc(e){return new RegExp("^(?:"+e.map(VJ).join("|")+")","i")}function fc(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function YJ(e,t,n){var r=kt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function XJ(e,t,n){var r=kt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function QJ(e,t,n){var r=kt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function WJ(e,t,n){var r=kt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function ZJ(e,t,n){var r=kt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function KO(e,t,n){var r=kt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function VO(e,t,n){var r=kt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function JJ(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 eee(e,t,n){var r=kt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function tee(e,t,n){var r=kt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function YO(e,t,n){var r=kt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function nee(e,t,n){var r=kt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function XO(e,t,n){var r=kt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function ree(e,t,n){var r=kt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function aee(e,t,n){var r=kt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function iee(e,t,n){var r=kt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function lee(e,t,n){var r=kt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function oee(e,t,n){var r=GJ.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function see(e,t,n){var r=kt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function cee(e,t,n){var r=kt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function QO(e,t){return Ae(e.getDate(),t,2)}function uee(e,t){return Ae(e.getHours(),t,2)}function fee(e,t){return Ae(e.getHours()%12||12,t,2)}function dee(e,t){return Ae(1+jf.count(Sa(e),e),t,3)}function NM(e,t){return Ae(e.getMilliseconds(),t,3)}function hee(e,t){return NM(e,t)+"000"}function pee(e,t){return Ae(e.getMonth()+1,t,2)}function mee(e,t){return Ae(e.getMinutes(),t,2)}function yee(e,t){return Ae(e.getSeconds(),t,2)}function vee(e){var t=e.getDay();return t===0?7:t}function gee(e,t){return Ae(Nm.count(Sa(e)-1,e),t,2)}function EM(e){var t=e.getDay();return t>=4||t===0?es(e):es.ceil(e)}function xee(e,t){return e=EM(e),Ae(es.count(Sa(e),e)+(Sa(e).getDay()===4),t,2)}function bee(e){return e.getDay()}function jee(e,t){return Ae(Ih.count(Sa(e)-1,e),t,2)}function See(e,t){return Ae(e.getFullYear()%100,t,2)}function wee(e,t){return e=EM(e),Ae(e.getFullYear()%100,t,2)}function Oee(e,t){return Ae(e.getFullYear()%1e4,t,4)}function Aee(e,t){var n=e.getDay();return e=n>=4||n===0?es(e):es.ceil(e),Ae(e.getFullYear()%1e4,t,4)}function Nee(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ae(t/60|0,"0",2)+Ae(t%60,"0",2)}function WO(e,t){return Ae(e.getUTCDate(),t,2)}function Eee(e,t){return Ae(e.getUTCHours(),t,2)}function Cee(e,t){return Ae(e.getUTCHours()%12||12,t,2)}function _ee(e,t){return Ae(1+Am.count(wa(e),e),t,3)}function CM(e,t){return Ae(e.getUTCMilliseconds(),t,3)}function Tee(e,t){return CM(e,t)+"000"}function Pee(e,t){return Ae(e.getUTCMonth()+1,t,2)}function Mee(e,t){return Ae(e.getUTCMinutes(),t,2)}function $ee(e,t){return Ae(e.getUTCSeconds(),t,2)}function Ree(e){var t=e.getUTCDay();return t===0?7:t}function kee(e,t){return Ae(Em.count(wa(e)-1,e),t,2)}function _M(e){var t=e.getUTCDay();return t>=4||t===0?ts(e):ts.ceil(e)}function Dee(e,t){return e=_M(e),Ae(ts.count(wa(e),e)+(wa(e).getUTCDay()===4),t,2)}function Lee(e){return e.getUTCDay()}function zee(e,t){return Ae(Uh.count(wa(e)-1,e),t,2)}function Bee(e,t){return Ae(e.getUTCFullYear()%100,t,2)}function Iee(e,t){return e=_M(e),Ae(e.getUTCFullYear()%100,t,2)}function Uee(e,t){return Ae(e.getUTCFullYear()%1e4,t,4)}function qee(e,t){var n=e.getUTCDay();return e=n>=4||n===0?ts(e):ts.ceil(e),Ae(e.getUTCFullYear()%1e4,t,4)}function Hee(){return"+0000"}function ZO(){return"%"}function JO(e){return+e}function eA(e){return Math.floor(+e/1e3)}var Ul,TM,PM;Fee({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 Fee(e){return Ul=FJ(e),TM=Ul.format,Ul.parse,PM=Ul.utcFormat,Ul.utcParse,Ul}function Gee(e){return new Date(e)}function Kee(e){return e instanceof Date?+e:+new Date(+e)}function v1(e,t,n,r,a,i,l,s,c,u){var f=r1(),d=f.invert,h=f.domain,m=u(".%L"),j=u(":%S"),v=u("%I:%M"),p=u("%I %p"),y=u("%a %d"),g=u("%b %d"),b=u("%B"),x=u("%Y");function w(S){return(c(S)<S?m:s(S)<S?j:l(S)<S?v:i(S)<S?p:r(S)<S?a(S)<S?y:g:n(S)<S?b:x)(S)}return f.invert=function(S){return new Date(d(S))},f.domain=function(S){return arguments.length?h(Array.from(S,Kee)):h().map(Gee)},f.ticks=function(S){var A=h();return e(A[0],A[A.length-1],S??10)},f.tickFormat=function(S,A){return A==null?w:u(A)},f.nice=function(S){var A=h();return(!S||typeof S.range!="function")&&(S=t(A[0],A[A.length-1],S??10)),S?h(vM(A,S)):f},f.copy=function(){return bf(f,v1(e,t,n,r,a,i,l,s,c,u))},f}function Vee(){return ir.apply(v1(qJ,HJ,Sa,m1,Nm,jf,h1,f1,Xi,TM).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Yee(){return ir.apply(v1(IJ,UJ,wa,y1,Em,Am,p1,d1,Xi,PM).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Cm(){var e=0,t=1,n,r,a,i,l=nn,s=!1,c;function u(d){return d==null||isNaN(d=+d)?c:l(a===0?.5:(d=(i(d)-n)*a,s?Math.max(0,Math.min(1,d)):d))}u.domain=function(d){return arguments.length?([e,t]=d,n=i(e=+e),r=i(t=+t),a=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(d){return arguments.length?(s=!!d,u):s},u.interpolator=function(d){return arguments.length?(l=d,u):l};function f(d){return function(h){var m,j;return arguments.length?([m,j]=h,l=d(m,j),u):[l(0),l(1)]}}return u.range=f(Ks),u.rangeRound=f(n1),u.unknown=function(d){return arguments.length?(c=d,u):c},function(d){return i=d,n=d(e),r=d(t),a=n===r?0:1/(r-n),u}}function Ci(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function MM(){var e=Ei(Cm()(nn));return e.copy=function(){return Ci(e,MM())},Ca.apply(e,arguments)}function $M(){var e=l1(Cm()).domain([1,10]);return e.copy=function(){return Ci(e,$M()).base(e.base())},Ca.apply(e,arguments)}function RM(){var e=o1(Cm());return e.copy=function(){return Ci(e,RM()).constant(e.constant())},Ca.apply(e,arguments)}function g1(){var e=s1(Cm());return e.copy=function(){return Ci(e,g1()).exponent(e.exponent())},Ca.apply(e,arguments)}function Xee(){return g1.apply(null,arguments).exponent(.5)}function kM(){var e=[],t=nn;function n(r){if(r!=null&&!isNaN(r=+r))return t((gf(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let a of r)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(di),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,a)=>t(a/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(a,i)=>kZ(e,i/r))},n.copy=function(){return kM(t).domain(e)},Ca.apply(n,arguments)}function _m(){var e=0,t=.5,n=1,r=1,a,i,l,s,c,u=nn,f,d=!1,h;function m(v){return isNaN(v=+v)?h:(v=.5+((v=+f(v))-i)*(r*v<r*i?s:c),u(d?Math.max(0,Math.min(1,v)):v))}m.domain=function(v){return arguments.length?([e,t,n]=v,a=f(e=+e),i=f(t=+t),l=f(n=+n),s=a===i?0:.5/(i-a),c=i===l?0:.5/(l-i),r=i<a?-1:1,m):[e,t,n]},m.clamp=function(v){return arguments.length?(d=!!v,m):d},m.interpolator=function(v){return arguments.length?(u=v,m):u};function j(v){return function(p){var y,g,b;return arguments.length?([y,g,b]=p,u=oJ(v,[y,g,b]),m):[u(0),u(.5),u(1)]}}return m.range=j(Ks),m.rangeRound=j(n1),m.unknown=function(v){return arguments.length?(h=v,m):h},function(v){return f=v,a=v(e),i=v(t),l=v(n),s=a===i?0:.5/(i-a),c=i===l?0:.5/(l-i),r=i<a?-1:1,m}}function DM(){var e=Ei(_m()(nn));return e.copy=function(){return Ci(e,DM())},Ca.apply(e,arguments)}function LM(){var e=l1(_m()).domain([.1,1,10]);return e.copy=function(){return Ci(e,LM()).base(e.base())},Ca.apply(e,arguments)}function zM(){var e=o1(_m());return e.copy=function(){return Ci(e,zM()).constant(e.constant())},Ca.apply(e,arguments)}function x1(){var e=s1(_m());return e.copy=function(){return Ci(e,x1()).exponent(e.exponent())},Ca.apply(e,arguments)}function Qee(){return x1.apply(null,arguments).exponent(.5)}const tA=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:yu,scaleDiverging:DM,scaleDivergingLog:LM,scaleDivergingPow:x1,scaleDivergingSqrt:Qee,scaleDivergingSymlog:zM,scaleIdentity:yM,scaleImplicit:rx,scaleLinear:zh,scaleLog:gM,scaleOrdinal:J0,scalePoint:Lc,scalePow:c1,scaleQuantile:jM,scaleQuantize:SM,scaleRadial:bM,scaleSequential:MM,scaleSequentialLog:$M,scaleSequentialPow:g1,scaleSequentialQuantile:kM,scaleSequentialSqrt:Xee,scaleSequentialSymlog:RM,scaleSqrt:TJ,scaleSymlog:xM,scaleThreshold:wM,scaleTime:Vee,scaleUtc:Yee,tickFormat:mM},Symbol.toStringTag,{value:"Module"}));var Wee=Ls;function Zee(e,t,n){for(var r=-1,a=e.length;++r<a;){var i=e[r],l=t(i);if(l!=null&&(s===void 0?l===l&&!Wee(l):n(l,s)))var s=l,c=i}return c}var Tm=Zee;function Jee(e,t){return e>t}var BM=Jee,ete=Tm,tte=BM,nte=Gs;function rte(e){return e&&e.length?ete(e,nte,tte):void 0}var ate=rte;const ei=_e(ate);function ite(e,t){return e<t}var IM=ite,lte=Tm,ote=IM,ste=Gs;function cte(e){return e&&e.length?lte(e,ste,ote):void 0}var ute=cte;const Pm=_e(ute);var fte=R0,dte=Gr,hte=XP,pte=vn;function mte(e,t){var n=pte(e)?fte:hte;return n(e,dte(t))}var yte=mte,vte=VP,gte=yte;function xte(e,t){return vte(gte(e,t),1)}var bte=xte;const jte=_e(bte);var Ste=Y0;function wte(e,t){return Ste(e,t)}var Ote=wte;const ji=_e(Ote);var Vs=1e9,Ate={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},j1,et=!0,nr="[DecimalError] ",hl=nr+"Invalid argument: ",b1=nr+"Exponent out of range: ",Ys=Math.floor,Fi=Math.pow,Nte=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,An,Tt=1e7,Ye=7,UM=9007199254740991,qh=Ys(UM/Ye),ee={};ee.absoluteValue=ee.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};ee.comparedTo=ee.cmp=function(e){var t,n,r,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(r=i.d.length,a=e.d.length,t=0,n=r<a?r:a;t<n;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return r===a?0:r>a^i.s<0?1:-1};ee.decimalPlaces=ee.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Ye;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};ee.dividedBy=ee.div=function(e){return pa(this,new this.constructor(e))};ee.dividedToIntegerBy=ee.idiv=function(e){var t=this,n=t.constructor;return Le(pa(t,new n(e),0,1),n.precision)};ee.equals=ee.eq=function(e){return!this.cmp(e)};ee.exponent=function(){return St(this)};ee.greaterThan=ee.gt=function(e){return this.cmp(e)>0};ee.greaterThanOrEqualTo=ee.gte=function(e){return this.cmp(e)>=0};ee.isInteger=ee.isint=function(){return this.e>this.d.length-2};ee.isNegative=ee.isneg=function(){return this.s<0};ee.isPositive=ee.ispos=function(){return this.s>0};ee.isZero=function(){return this.s===0};ee.lessThan=ee.lt=function(e){return this.cmp(e)<0};ee.lessThanOrEqualTo=ee.lte=function(e){return this.cmp(e)<1};ee.logarithm=ee.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(An))throw Error(nr+"NaN");if(n.s<1)throw Error(nr+(n.s?"NaN":"-Infinity"));return n.eq(An)?new r(0):(et=!1,t=pa(ju(n,i),ju(e,i),i),et=!0,Le(t,a))};ee.minus=ee.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?FM(t,e):qM(t,(e.s=-e.s,e))};ee.modulo=ee.mod=function(e){var t,n=this,r=n.constructor,a=r.precision;if(e=new r(e),!e.s)throw Error(nr+"NaN");return n.s?(et=!1,t=pa(n,e,0,1).times(e),et=!0,n.minus(t)):Le(new r(n),a)};ee.naturalExponential=ee.exp=function(){return HM(this)};ee.naturalLogarithm=ee.ln=function(){return ju(this)};ee.negated=ee.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ee.plus=ee.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?qM(t,e):FM(t,(e.s=-e.s,e))};ee.precision=ee.sd=function(e){var t,n,r,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(hl+e);if(t=St(a)+1,r=a.d.length-1,n=r*Ye+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};ee.squareRoot=ee.sqrt=function(){var e,t,n,r,a,i,l,s=this,c=s.constructor;if(s.s<1){if(!s.s)return new c(0);throw Error(nr+"NaN")}for(e=St(s),et=!1,a=Math.sqrt(+s),a==0||a==1/0?(t=kr(s.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Ys((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 c(t)):r=new c(a.toString()),n=c.precision,a=l=n+3;;)if(i=r,r=i.plus(pa(s,i,l+2)).times(.5),kr(i.d).slice(0,l)===(t=kr(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),a==l&&t=="4999"){if(Le(i,n+1,0),i.times(i).eq(s)){r=i;break}}else if(t!="9999")break;l+=4}return et=!0,Le(r,n)};ee.times=ee.mul=function(e){var t,n,r,a,i,l,s,c,u,f=this,d=f.constructor,h=f.d,m=(e=new d(e)).d;if(!f.s||!e.s)return new d(0);for(e.s*=f.s,n=f.e+e.e,c=h.length,u=m.length,c<u&&(i=h,h=m,m=i,l=c,c=u,u=l),i=[],l=c+u,r=l;r--;)i.push(0);for(r=u;--r>=0;){for(t=0,a=c+r;a>r;)s=i[a]+m[r]*h[a-r-1]+t,i[a--]=s%Tt|0,t=s/Tt|0;i[a]=(i[a]+t)%Tt|0}for(;!i[--l];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,et?Le(e,d.precision):e};ee.toDecimalPlaces=ee.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Ir(e,0,Vs),t===void 0?t=r.rounding:Ir(t,0,8),Le(n,e+St(n)+1,t))};ee.toExponential=function(e,t){var n,r=this,a=r.constructor;return e===void 0?n=wl(r,!0):(Ir(e,0,Vs),t===void 0?t=a.rounding:Ir(t,0,8),r=Le(new a(r),e+1,t),n=wl(r,!0,e+1)),n};ee.toFixed=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?wl(a):(Ir(e,0,Vs),t===void 0?t=i.rounding:Ir(t,0,8),r=Le(new i(a),e+St(a)+1,t),n=wl(r.abs(),!1,e+St(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)};ee.toInteger=ee.toint=function(){var e=this,t=e.constructor;return Le(new t(e),St(e)+1,t.rounding)};ee.toNumber=function(){return+this};ee.toPower=ee.pow=function(e){var t,n,r,a,i,l,s=this,c=s.constructor,u=12,f=+(e=new c(e));if(!e.s)return new c(An);if(s=new c(s),!s.s){if(e.s<1)throw Error(nr+"Infinity");return s}if(s.eq(An))return s;if(r=c.precision,e.eq(An))return Le(s,r);if(t=e.e,n=e.d.length-1,l=t>=n,i=s.s,l){if((n=f<0?-f:f)<=UM){for(a=new c(An),t=Math.ceil(r/Ye+4),et=!1;n%2&&(a=a.times(s),rA(a.d,t)),n=Ys(n/2),n!==0;)s=s.times(s),rA(s.d,t);return et=!0,e.s<0?new c(An).div(a):Le(a,r)}}else if(i<0)throw Error(nr+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,et=!1,a=e.times(ju(s,r+u)),et=!0,a=HM(a),a.s=i,a};ee.toPrecision=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?(n=St(a),r=wl(a,n<=i.toExpNeg||n>=i.toExpPos)):(Ir(e,1,Vs),t===void 0?t=i.rounding:Ir(t,0,8),a=Le(new i(a),e,t),n=St(a),r=wl(a,e<=n||n<=i.toExpNeg,e)),r};ee.toSignificantDigits=ee.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Ir(e,1,Vs),t===void 0?t=r.rounding:Ir(t,0,8)),Le(new r(n),e,t)};ee.toString=ee.valueOf=ee.val=ee.toJSON=ee[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=St(e),n=e.constructor;return wl(e,t<=n.toExpNeg||t>=n.toExpPos)};function qM(e,t){var n,r,a,i,l,s,c,u,f=e.constructor,d=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),et?Le(t,d):t;if(c=e.d,u=t.d,l=e.e,a=t.e,c=c.slice(),i=l-a,i){for(i<0?(r=c,i=-i,s=u.length):(r=u,a=l,s=c.length),l=Math.ceil(d/Ye),s=l>s?l+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=c.length,i=u.length,s-i<0&&(i=s,r=u,u=c,c=r),n=0;i;)n=(c[--i]=c[i]+u[i]+n)/Tt|0,c[i]%=Tt;for(n&&(c.unshift(n),++a),s=c.length;c[--s]==0;)c.pop();return t.d=c,t.e=a,et?Le(t,d):t}function Ir(e,t,n){if(e!==~~e||e<t||e>n)throw Error(hl+e)}function kr(e){var t,n,r,a=e.length-1,i="",l=e[0];if(a>0){for(i+=l,t=1;t<a;t++)r=e[t]+"",n=Ye-r.length,n&&(i+=La(n)),i+=r;l=e[t],r=l+"",n=Ye-r.length,n&&(i+=La(n))}else if(l===0)return"0";for(;l%10===0;)l/=10;return i+l}var pa=function(){function e(r,a){var i,l=0,s=r.length;for(r=r.slice();s--;)i=r[s]*a+l,r[s]=i%Tt|0,l=i/Tt|0;return l&&r.unshift(l),r}function t(r,a,i,l){var s,c;if(i!=l)c=i>l?1:-1;else for(s=c=0;s<i;s++)if(r[s]!=a[s]){c=r[s]>a[s]?1:-1;break}return c}function n(r,a,i){for(var l=0;i--;)r[i]-=l,l=r[i]<a[i]?1:0,r[i]=l*Tt+r[i]-a[i];for(;!r[0]&&r.length>1;)r.shift()}return function(r,a,i,l){var s,c,u,f,d,h,m,j,v,p,y,g,b,x,w,S,A,N,C=r.constructor,M=r.s==a.s?1:-1,R=r.d,P=a.d;if(!r.s)return new C(r);if(!a.s)throw Error(nr+"Division by zero");for(c=r.e-a.e,A=P.length,w=R.length,m=new C(M),j=m.d=[],u=0;P[u]==(R[u]||0);)++u;if(P[u]>(R[u]||0)&&--c,i==null?g=i=C.precision:l?g=i+(St(r)-St(a))+1:g=i,g<0)return new C(0);if(g=g/Ye+2|0,u=0,A==1)for(f=0,P=P[0],g++;(u<w||f)&&g--;u++)b=f*Tt+(R[u]||0),j[u]=b/P|0,f=b%P|0;else{for(f=Tt/(P[0]+1)|0,f>1&&(P=e(P,f),R=e(R,f),A=P.length,w=R.length),x=A,v=R.slice(0,A),p=v.length;p<A;)v[p++]=0;N=P.slice(),N.unshift(0),S=P[0],P[1]>=Tt/2&&++S;do f=0,s=t(P,v,A,p),s<0?(y=v[0],A!=p&&(y=y*Tt+(v[1]||0)),f=y/S|0,f>1?(f>=Tt&&(f=Tt-1),d=e(P,f),h=d.length,p=v.length,s=t(d,v,h,p),s==1&&(f--,n(d,A<h?N:P,h))):(f==0&&(s=f=1),d=P.slice()),h=d.length,h<p&&d.unshift(0),n(v,d,p),s==-1&&(p=v.length,s=t(P,v,A,p),s<1&&(f++,n(v,A<p?N:P,p))),p=v.length):s===0&&(f++,v=[0]),j[u++]=f,s&&v[0]?v[p++]=R[x]||0:(v=[R[x]],p=1);while((x++<w||v[0]!==void 0)&&g--)}return j[0]||j.shift(),m.e=c,Le(m,l?i+St(m)+1:i)}}();function HM(e,t){var n,r,a,i,l,s,c=0,u=0,f=e.constructor,d=f.precision;if(St(e)>16)throw Error(b1+St(e));if(!e.s)return new f(An);for(et=!1,s=d,l=new f(.03125);e.abs().gte(.1);)e=e.times(l),u+=5;for(r=Math.log(Fi(2,u))/Math.LN10*2+5|0,s+=r,n=a=i=new f(An),f.precision=s;;){if(a=Le(a.times(e),s),n=n.times(++c),l=i.plus(pa(a,n,s)),kr(l.d).slice(0,s)===kr(i.d).slice(0,s)){for(;u--;)i=Le(i.times(i),s);return f.precision=d,t==null?(et=!0,Le(i,d)):i}i=l}}function St(e){for(var t=e.e*Ye,n=e.d[0];n>=10;n/=10)t++;return t}function lv(e,t,n){if(t>e.LN10.sd())throw et=!0,n&&(e.precision=n),Error(nr+"LN10 precision limit exceeded");return Le(new e(e.LN10),t)}function La(e){for(var t="";e--;)t+="0";return t}function ju(e,t){var n,r,a,i,l,s,c,u,f,d=1,h=10,m=e,j=m.d,v=m.constructor,p=v.precision;if(m.s<1)throw Error(nr+(m.s?"NaN":"-Infinity"));if(m.eq(An))return new v(0);if(t==null?(et=!1,u=p):u=t,m.eq(10))return t==null&&(et=!0),lv(v,u);if(u+=h,v.precision=u,n=kr(j),r=n.charAt(0),i=St(m),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)m=m.times(e),n=kr(m.d),r=n.charAt(0),d++;i=St(m),r>1?(m=new v("0."+n),i++):m=new v(r+"."+n.slice(1))}else return c=lv(v,u+2,p).times(i+""),m=ju(new v(r+"."+n.slice(1)),u-h).plus(c),v.precision=p,t==null?(et=!0,Le(m,p)):m;for(s=l=m=pa(m.minus(An),m.plus(An),u),f=Le(m.times(m),u),a=3;;){if(l=Le(l.times(f),u),c=s.plus(pa(l,new v(a),u)),kr(c.d).slice(0,u)===kr(s.d).slice(0,u))return s=s.times(2),i!==0&&(s=s.plus(lv(v,u+2,p).times(i+""))),s=pa(s,new v(d),u),v.precision=p,t==null?(et=!0,Le(s,p)):s;s=c,a+=2}}function nA(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=Ys(n/Ye),e.d=[],r=(n+1)%Ye,n<0&&(r+=Ye),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=Ye;r<a;)e.d.push(+t.slice(r,r+=Ye));t=t.slice(r),r=Ye-t.length}else r-=a;for(;r--;)t+="0";if(e.d.push(+t),et&&(e.e>qh||e.e<-qh))throw Error(b1+n)}else e.s=0,e.e=0,e.d=[0];return e}function Le(e,t,n){var r,a,i,l,s,c,u,f,d=e.d;for(l=1,i=d[0];i>=10;i/=10)l++;if(r=t-l,r<0)r+=Ye,a=t,u=d[f=0];else{if(f=Math.ceil((r+1)/Ye),i=d.length,f>=i)return e;for(u=i=d[f],l=1;i>=10;i/=10)l++;r%=Ye,a=r-Ye+l}if(n!==void 0&&(i=Fi(10,l-a-1),s=u/i%10|0,c=t<0||d[f+1]!==void 0||u%i,c=n<4?(s||c)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||c||n==6&&(r>0?a>0?u/Fi(10,l-a):0:d[f-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return c?(i=St(e),d.length=1,t=t-i-1,d[0]=Fi(10,(Ye-t%Ye)%Ye),e.e=Ys(-t/Ye)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=f,i=1,f--):(d.length=f+1,i=Fi(10,Ye-r),d[f]=a>0?(u/Fi(10,l-a)%Fi(10,a)|0)*i:0),c)for(;;)if(f==0){(d[0]+=i)==Tt&&(d[0]=1,++e.e);break}else{if(d[f]+=i,d[f]!=Tt)break;d[f--]=0,i=1}for(r=d.length;d[--r]===0;)d.pop();if(et&&(e.e>qh||e.e<-qh))throw Error(b1+St(e));return e}function FM(e,t){var n,r,a,i,l,s,c,u,f,d,h=e.constructor,m=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),et?Le(t,m):t;if(c=e.d,d=t.d,r=t.e,u=e.e,c=c.slice(),l=u-r,l){for(f=l<0,f?(n=c,l=-l,s=d.length):(n=d,r=u,s=c.length),a=Math.max(Math.ceil(m/Ye),s)+2,l>a&&(l=a,n.length=1),n.reverse(),a=l;a--;)n.push(0);n.reverse()}else{for(a=c.length,s=d.length,f=a<s,f&&(s=a),a=0;a<s;a++)if(c[a]!=d[a]){f=c[a]<d[a];break}l=0}for(f&&(n=c,c=d,d=n,t.s=-t.s),s=c.length,a=d.length-s;a>0;--a)c[s++]=0;for(a=d.length;a>l;){if(c[--a]<d[a]){for(i=a;i&&c[--i]===0;)c[i]=Tt-1;--c[i],c[a]+=Tt}c[a]-=d[a]}for(;c[--s]===0;)c.pop();for(;c[0]===0;c.shift())--r;return c[0]?(t.d=c,t.e=r,et?Le(t,m):t):new h(0)}function wl(e,t,n){var r,a=St(e),i=kr(e.d),l=i.length;return t?(n&&(r=n-l)>0?i=i.charAt(0)+"."+i.slice(1)+La(r):l>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+La(-a-1)+i,n&&(r=n-l)>0&&(i+=La(r))):a>=l?(i+=La(a+1-l),n&&(r=n-a-1)>0&&(i=i+"."+La(r))):((r=a+1)<l&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-l)>0&&(a+1===l&&(i+="."),i+=La(r))),e.s<0?"-"+i:i}function rA(e,t){if(e.length>t)return e.length=t,!0}function GM(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(hl+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 nA(l,i.toString())}else if(typeof i!="string")throw Error(hl+i);if(i.charCodeAt(0)===45?(i=i.slice(1),l.s=-1):l.s=1,Nte.test(i))nA(l,i);else throw Error(hl+i)}if(a.prototype=ee,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=GM,a.config=a.set=Ete,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return a.config(e),a}function Ete(e){if(!e||typeof e!="object")throw Error(nr+"Object expected");var t,n,r,a=["precision",1,Vs,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((r=e[n=a[t]])!==void 0)if(Ys(r)===r&&r>=a[t+1]&&r<=a[t+2])this[n]=r;else throw Error(hl+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(hl+n+": "+r);return this}var j1=GM(Ate);An=new j1(1);const ke=j1;function Cte(e){return Mte(e)||Pte(e)||Tte(e)||_te()}function _te(){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 Tte(e,t){if(e){if(typeof e=="string")return ox(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 ox(e,t)}}function Pte(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Mte(e){if(Array.isArray(e))return ox(e)}function ox(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var $te=function(t){return t},KM={},VM=function(t){return t===KM},aA=function(t){return function n(){return arguments.length===0||arguments.length===1&&VM(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},Rte=function e(t,n){return t===1?n:aA(function(){for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];var l=a.filter(function(s){return s!==KM}).length;return l>=t?n.apply(void 0,a):e(t-l,aA(function(){for(var s=arguments.length,c=new Array(s),u=0;u<s;u++)c[u]=arguments[u];var f=a.map(function(d){return VM(d)?c.shift():d});return n.apply(void 0,Cte(f).concat(c))}))})},Mm=function(t){return Rte(t.length,t)},sx=function(t,n){for(var r=[],a=t;a<n;++a)r[a-t]=a;return r},kte=Mm(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),Dte=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return $te;var a=n.reverse(),i=a[0],l=a.slice(1);return function(){return l.reduce(function(s,c){return c(s)},i.apply(void 0,arguments))}},cx=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},YM=function(t){var n=null,r=null;return function(){for(var a=arguments.length,i=new Array(a),l=0;l<a;l++)i[l]=arguments[l];return n&&i.every(function(s,c){return s===n[c]})||(n=i,r=t.apply(void 0,i)),r}};function Lte(e){var t;return e===0?t=1:t=Math.floor(new ke(e).abs().log(10).toNumber())+1,t}function zte(e,t,n){for(var r=new ke(e),a=0,i=[];r.lt(t)&&a<1e5;)i.push(r.toNumber()),r=r.add(n),a++;return i}var Bte=Mm(function(e,t,n){var r=+e,a=+t;return r+n*(a-r)}),Ite=Mm(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),Ute=Mm(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const $m={rangeStep:zte,getDigitCount:Lte,interpolateNumber:Bte,uninterpolateNumber:Ite,uninterpolateTruncation:Ute};function ux(e){return Fte(e)||Hte(e)||XM(e)||qte()}function qte(){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 Hte(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Fte(e){if(Array.isArray(e))return fx(e)}function Su(e,t){return Vte(e)||Kte(e,t)||XM(e,t)||Gte()}function Gte(){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 XM(e,t){if(e){if(typeof e=="string")return fx(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 fx(e,t)}}function fx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Kte(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,a=!1,i=void 0;try{for(var l=e[Symbol.iterator](),s;!(r=(s=l.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(c){a=!0,i=c}finally{try{!r&&l.return!=null&&l.return()}finally{if(a)throw i}}return n}}function Vte(e){if(Array.isArray(e))return e}function QM(e){var t=Su(e,2),n=t[0],r=t[1],a=n,i=r;return n>r&&(a=r,i=n),[a,i]}function WM(e,t,n){if(e.lte(0))return new ke(0);var r=$m.getDigitCount(e.toNumber()),a=new ke(10).pow(r),i=e.div(a),l=r!==1?.05:.1,s=new ke(Math.ceil(i.div(l).toNumber())).add(n).mul(l),c=s.mul(a);return t?c:new ke(Math.ceil(c))}function Yte(e,t,n){var r=1,a=new ke(e);if(!a.isint()&&n){var i=Math.abs(e);i<1?(r=new ke(10).pow($m.getDigitCount(e)-1),a=new ke(Math.floor(a.div(r).toNumber())).mul(r)):i>1&&(a=new ke(Math.floor(e)))}else e===0?a=new ke(Math.floor((t-1)/2)):n||(a=new ke(Math.floor(e)));var l=Math.floor((t-1)/2),s=Dte(kte(function(c){return a.add(new ke(c-l).mul(r)).toNumber()}),sx);return s(0,t)}function ZM(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 ke(0),tickMin:new ke(0),tickMax:new ke(0)};var i=WM(new ke(t).sub(e).div(n-1),r,a),l;e<=0&&t>=0?l=new ke(0):(l=new ke(e).add(t).div(2),l=l.sub(new ke(l).mod(i)));var s=Math.ceil(l.sub(e).div(i).toNumber()),c=Math.ceil(new ke(t).sub(l).div(i).toNumber()),u=s+c+1;return u>n?ZM(e,t,n,r,a+1):(u<n&&(c=t>0?c+(n-u):c,s=t>0?s:s+(n-u)),{step:i,tickMin:l.sub(new ke(s).mul(i)),tickMax:l.add(new ke(c).mul(i))})}function Xte(e){var t=Su(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),s=QM([n,r]),c=Su(s,2),u=c[0],f=c[1];if(u===-1/0||f===1/0){var d=f===1/0?[u].concat(ux(sx(0,a-1).map(function(){return 1/0}))):[].concat(ux(sx(0,a-1).map(function(){return-1/0})),[f]);return n>r?cx(d):d}if(u===f)return Yte(u,a,i);var h=ZM(u,f,l,i),m=h.step,j=h.tickMin,v=h.tickMax,p=$m.rangeStep(j,v.add(new ke(.1).mul(m)),m);return n>r?cx(p):p}function Qte(e,t){var n=Su(e,2),r=n[0],a=n[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=QM([r,a]),s=Su(l,2),c=s[0],u=s[1];if(c===-1/0||u===1/0)return[r,a];if(c===u)return[c];var f=Math.max(t,2),d=WM(new ke(u).sub(c).div(f-1),i,0),h=[].concat(ux($m.rangeStep(new ke(c),new ke(u).sub(new ke(.99).mul(d)),d)),[u]);return r>a?cx(h):h}var Wte=YM(Xte),Zte=YM(Qte),Jte="Invariant failed";function Ol(e,t){throw new Error(Jte)}var ene=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function ns(e){"@babel/helpers - typeof";return ns=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},ns(e)}function Hh(){return Hh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hh.apply(this,arguments)}function tne(e,t){return ine(e)||ane(e,t)||rne(e,t)||nne()}function nne(){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 rne(e,t){if(e){if(typeof e=="string")return iA(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 iA(e,t)}}function iA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ane(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,s=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return s}}function ine(e){if(Array.isArray(e))return e}function lne(e,t){if(e==null)return{};var n=one(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function one(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 sne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cne(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,t$(r.key),r)}}function une(e,t,n){return t&&cne(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function fne(e,t,n){return t=Fh(t),dne(e,JM()?Reflect.construct(t,n||[],Fh(e).constructor):t.apply(e,n))}function dne(e,t){if(t&&(ns(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hne(e)}function hne(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function JM(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(JM=function(){return!!e})()}function Fh(e){return Fh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fh(e)}function pne(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dx(e,t)}function dx(e,t){return dx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},dx(e,t)}function e$(e,t,n){return t=t$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t$(e){var t=mne(e,"string");return ns(t)=="symbol"?t:t+""}function mne(e,t){if(ns(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ns(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Xs=function(e){function t(){return sne(this,t),fne(this,t,arguments)}return pne(t,e),une(t,[{key:"render",value:function(){var r=this.props,a=r.offset,i=r.layout,l=r.width,s=r.dataKey,c=r.data,u=r.dataPointFormatter,f=r.xAxis,d=r.yAxis,h=lne(r,ene),m=re(h,!1);this.props.direction==="x"&&f.type!=="number"&&Ol();var j=c.map(function(v){var p=u(v,s),y=p.x,g=p.y,b=p.value,x=p.errorVal;if(!x)return null;var w=[],S,A;if(Array.isArray(x)){var N=tne(x,2);S=N[0],A=N[1]}else S=A=x;if(i==="vertical"){var C=f.scale,M=g+a,R=M+l,P=M-l,B=C(b-S),_=C(b+A);w.push({x1:_,y1:R,x2:_,y2:P}),w.push({x1:B,y1:M,x2:_,y2:M}),w.push({x1:B,y1:R,x2:B,y2:P})}else if(i==="horizontal"){var E=d.scale,$=y+a,L=$-l,q=$+l,V=E(b-S),X=E(b+A);w.push({x1:L,y1:X,x2:q,y2:X}),w.push({x1:$,y1:V,x2:$,y2:X}),w.push({x1:L,y1:V,x2:q,y2:V})}return T.createElement(me,Hh({className:"recharts-errorBar",key:"bar-".concat(w.map(function(J){return"".concat(J.x1,"-").concat(J.x2,"-").concat(J.y1,"-").concat(J.y2)}))},m),w.map(function(J){return T.createElement("line",Hh({},J,{key:"line-".concat(J.x1,"-").concat(J.x2,"-").concat(J.y1,"-").concat(J.y2)}))}))});return T.createElement(me,{className:"recharts-errorBars"},j)}}])}(T.Component);e$(Xs,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});e$(Xs,"displayName","ErrorBar");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 lA(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 ki(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lA(Object(n),!0).forEach(function(r){yne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yne(e,t,n){return t=vne(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vne(e){var t=gne(e,"string");return wu(t)=="symbol"?t:t+""}function gne(e,t){if(wu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var n$=function(t){var n=t.children,r=t.formattedGraphicalItems,a=t.legendWidth,i=t.legendContent,l=jn(n,Qn);if(!l)return null;var s=Qn.defaultProps,c=s!==void 0?ki(ki({},s),l.props):{},u;return l.props&&l.props.payload?u=l.props&&l.props.payload:i==="children"?u=(r||[]).reduce(function(f,d){var h=d.item,m=d.props,j=m.sectors||m.data||[];return f.concat(j.map(function(v){return{type:l.props.iconType||h.props.legendType,value:v.name,color:v.fill,payload:v}}))},[]):u=(r||[]).map(function(f){var d=f.item,h=d.type.defaultProps,m=h!==void 0?ki(ki({},h),d.props):{},j=m.dataKey,v=m.name,p=m.legendType,y=m.hide;return{inactive:y,dataKey:j,type:c.iconType||p||"square",color:S1(d),value:v||j,payload:m}}),ki(ki(ki({},c),Qn.getWithHeight(l,a)),{},{payload:u,item:l})};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 oA(e){return Sne(e)||jne(e)||bne(e)||xne()}function xne(){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 bne(e,t){if(e){if(typeof e=="string")return hx(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 hx(e,t)}}function jne(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Sne(e){if(Array.isArray(e))return hx(e)}function hx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function sA(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 ut(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sA(Object(n),!0).forEach(function(r){wo(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wo(e,t,n){return t=wne(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wne(e){var t=One(e,"string");return Ou(t)=="symbol"?t:t+""}function One(e,t){if(Ou(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ou(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qe(e,t,n){return le(e)||le(t)?n:Nt(t)?Pn(e,t,n):se(t)?t(e):n}function zc(e,t,n,r){var a=jte(e,function(s){return Qe(s,t)});if(n==="number"){var i=a.filter(function(s){return Y(s)||parseFloat(s)});return i.length?[Pm(i),ei(i)]:[1/0,-1/0]}var l=r?a.filter(function(s){return!le(s)}):a;return l.map(function(s){return Nt(s)||s instanceof Date?s:""})}var Ane=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,l=-1,s=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var c=i.range,u=0;u<s;u++){var f=u>0?a[u-1].coordinate:a[s-1].coordinate,d=a[u].coordinate,h=u>=s-1?a[0].coordinate:a[u+1].coordinate,m=void 0;if(en(d-f)!==en(h-d)){var j=[];if(en(h-d)===en(c[1]-c[0])){m=h;var v=d+c[1]-c[0];j[0]=Math.min(v,(v+f)/2),j[1]=Math.max(v,(v+f)/2)}else{m=f;var p=h+c[1]-c[0];j[0]=Math.min(d,(p+d)/2),j[1]=Math.max(d,(p+d)/2)}var y=[Math.min(d,(m+d)/2),Math.max(d,(m+d)/2)];if(t>y[0]&&t<=y[1]||t>=j[0]&&t<=j[1]){l=a[u].index;break}}else{var g=Math.min(f,h),b=Math.max(f,h);if(t>(g+d)/2&&t<=(b+d)/2){l=a[u].index;break}}}else for(var x=0;x<s;x++)if(x===0&&t<=(r[x].coordinate+r[x+1].coordinate)/2||x>0&&x<s-1&&t>(r[x].coordinate+r[x-1].coordinate)/2&&t<=(r[x].coordinate+r[x+1].coordinate)/2||x===s-1&&t>(r[x].coordinate+r[x-1].coordinate)/2){l=r[x].index;break}return l},S1=function(t){var n,r=t,a=r.type.displayName,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?ut(ut({},t.type.defaultProps),t.props):t.props,l=i.stroke,s=i.fill,c;switch(a){case"Line":c=l;break;case"Area":case"Radar":c=l&&l!=="none"?l:s;break;default:c=s;break}return c},Nne=function(t){var n=t.barSize,r=t.totalSize,a=t.stackGroups,i=a===void 0?{}:a;if(!i)return{};for(var l={},s=Object.keys(i),c=0,u=s.length;c<u;c++)for(var f=i[s[c]].stackGroups,d=Object.keys(f),h=0,m=d.length;h<m;h++){var j=f[d[h]],v=j.items,p=j.cateAxisId,y=v.filter(function(A){return ha(A.type).indexOf("Bar")>=0});if(y&&y.length){var g=y[0].type.defaultProps,b=g!==void 0?ut(ut({},g),y[0].props):y[0].props,x=b.barSize,w=b[p];l[w]||(l[w]=[]);var S=le(x)?n:x;l[w].push({item:y[0],stackList:y.slice(1),barSize:le(S)?void 0:tn(S,r,0)})}}return l},Ene=function(t){var n=t.barGap,r=t.barCategoryGap,a=t.bandSize,i=t.sizeList,l=i===void 0?[]:i,s=t.maxBarSize,c=l.length;if(c<1)return null;var u=tn(n,a,0,!0),f,d=[];if(l[0].barSize===+l[0].barSize){var h=!1,m=a/c,j=l.reduce(function(x,w){return x+w.barSize||0},0);j+=(c-1)*u,j>=a&&(j-=(c-1)*u,u=0),j>=a&&m>0&&(h=!0,m*=.9,j=c*m);var v=(a-j)/2>>0,p={offset:v-u,size:0};f=l.reduce(function(x,w){var S={item:w.item,position:{offset:p.offset+p.size+u,size:h?m:w.barSize}},A=[].concat(oA(x),[S]);return p=A[A.length-1].position,w.stackList&&w.stackList.length&&w.stackList.forEach(function(N){A.push({item:N,position:p})}),A},d)}else{var y=tn(r,a,0,!0);a-2*y-(c-1)*u<=0&&(u=0);var g=(a-2*y-(c-1)*u)/c;g>1&&(g>>=0);var b=s===+s?Math.min(g,s):g;f=l.reduce(function(x,w,S){var A=[].concat(oA(x),[{item:w.item,position:{offset:y+(g+u)*S+(g-b)/2,size:b}}]);return w.stackList&&w.stackList.length&&w.stackList.forEach(function(N){A.push({item:N,position:A[A.length-1].position})}),A},d)}return f},Cne=function(t,n,r,a){var i=r.children,l=r.width,s=r.margin,c=l-(s.left||0)-(s.right||0),u=n$({children:i,legendWidth:c});if(u){var f=a||{},d=f.width,h=f.height,m=u.align,j=u.verticalAlign,v=u.layout;if((v==="vertical"||v==="horizontal"&&j==="middle")&&m!=="center"&&Y(t[m]))return ut(ut({},t),{},wo({},m,t[m]+(d||0)));if((v==="horizontal"||v==="vertical"&&m==="center")&&j!=="middle"&&Y(t[j]))return ut(ut({},t),{},wo({},j,t[j]+(h||0)))}return t},_ne=function(t,n,r){return le(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},r$=function(t,n,r,a,i){var l=n.props.children,s=an(l,Xs).filter(function(u){return _ne(a,i,u.props.direction)});if(s&&s.length){var c=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,f){var d=Qe(f,r);if(le(d))return u;var h=Array.isArray(d)?[Pm(d),ei(d)]:[d,d],m=c.reduce(function(j,v){var p=Qe(f,v,0),y=h[0]-Math.abs(Array.isArray(p)?p[0]:p),g=h[1]+Math.abs(Array.isArray(p)?p[1]:p);return[Math.min(y,j[0]),Math.max(g,j[1])]},[1/0,-1/0]);return[Math.min(m[0],u[0]),Math.max(m[1],u[1])]},[1/0,-1/0])}return null},Tne=function(t,n,r,a,i){var l=n.map(function(s){return r$(t,s,r,i,a)}).filter(function(s){return!le(s)});return l&&l.length?l.reduce(function(s,c){return[Math.min(s[0],c[0]),Math.max(s[1],c[1])]},[1/0,-1/0]):null},a$=function(t,n,r,a,i){var l=n.map(function(c){var u=c.props.dataKey;return r==="number"&&u&&r$(t,c,u,a)||zc(t,u,r,i)});if(r==="number")return l.reduce(function(c,u){return[Math.min(c[0],u[0]),Math.max(c[1],u[1])]},[1/0,-1/0]);var s={};return l.reduce(function(c,u){for(var f=0,d=u.length;f<d;f++)s[u[f]]||(s[u[f]]=!0,c.push(u[f]));return c},[])},i$=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},l$=function(t,n,r,a){if(a)return t.map(function(c){return c.coordinate});var i,l,s=t.map(function(c){return c.coordinate===n&&(i=!0),c.coordinate===r&&(l=!0),c.coordinate});return i||s.push(n),l||s.push(r),s},ca=function(t,n,r){if(!t)return null;var a=t.scale,i=t.duplicateDomain,l=t.type,s=t.range,c=t.realScaleType==="scaleBand"?a.bandwidth()/2:2,u=(n||r)&&l==="category"&&a.bandwidth?a.bandwidth()/c:0;if(u=t.axisType==="angleAxis"&&(s==null?void 0:s.length)>=2?en(s[0]-s[1])*2*u:u,n&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(d){var h=i?i.indexOf(d):d;return{coordinate:a(h)+u,value:d,offset:u}});return f.filter(function(d){return!qs(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,h){return{coordinate:a(d)+u,value:d,index:h,offset:u}}):a.ticks&&!r?a.ticks(t.tickCount).map(function(d){return{coordinate:a(d)+u,value:d,offset:u}}):a.domain().map(function(d,h){return{coordinate:a(d)+u,value:i?i[d]:d,index:h,offset:u}})},ov=new WeakMap,td=function(t,n){if(typeof n!="function")return t;ov.has(t)||ov.set(t,new WeakMap);var r=ov.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},o$=function(t,n,r){var a=t.scale,i=t.type,l=t.layout,s=t.axisType;if(a==="auto")return l==="radial"&&s==="radiusAxis"?{scale:yu(),realScaleType:"band"}:l==="radial"&&s==="angleAxis"?{scale:zh(),realScaleType:"linear"}:i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Lc(),realScaleType:"point"}:i==="category"?{scale:yu(),realScaleType:"band"}:{scale:zh(),realScaleType:"linear"};if(jl(a)){var c="scale".concat(ym(a));return{scale:(tA[c]||Lc)(),realScaleType:tA[c]?c:"point"}}return se(a)?{scale:a}:{scale:Lc(),realScaleType:"point"}},cA=1e-4,s$=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])-cA,l=Math.max(a[0],a[1])+cA,s=t(n[0]),c=t(n[r-1]);(s<i||s>l||c<i||c>l)&&t.domain([n[0],n[r-1]])}},Pne=function(t,n){if(!t)return null;for(var r=0,a=t.length;r<a;r++)if(t[r].item===n)return t[r].position;return null},Mne=function(t,n){if(!n||n.length!==2||!Y(n[0])||!Y(n[1]))return t;var r=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]),i=[t[0],t[1]];return(!Y(t[0])||t[0]<r)&&(i[0]=r),(!Y(t[1])||t[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<r&&(i[1]=r),i},$ne=function(t){var n=t.length;if(!(n<=0))for(var r=0,a=t[0].length;r<a;++r)for(var i=0,l=0,s=0;s<n;++s){var c=qs(t[s][r][1])?t[s][r][0]:t[s][r][1];c>=0?(t[s][r][0]=i,t[s][r][1]=i+c,i=t[s][r][1]):(t[s][r][0]=l,t[s][r][1]=l+c,l=t[s][r][1])}},Rne=function(t){var n=t.length;if(!(n<=0))for(var r=0,a=t[0].length;r<a;++r)for(var i=0,l=0;l<n;++l){var s=qs(t[l][r][1])?t[l][r][0]:t[l][r][1];s>=0?(t[l][r][0]=i,t[l][r][1]=i+s,i=t[l][r][1]):(t[l][r][0]=0,t[l][r][1]=0)}},kne={sign:$ne,expand:eH,none:Yo,silhouette:tH,wiggle:nH,positive:Rne},Dne=function(t,n,r){var a=n.map(function(s){return s.props.dataKey}),i=kne[r],l=Jq().keys(a).value(function(s,c){return+Qe(s,c,0)}).order(zg).offset(i);return l(t)},Lne=function(t,n,r,a,i,l){if(!t)return null;var s=l?n.reverse():n,c={},u=s.reduce(function(d,h){var m,j=(m=h.type)!==null&&m!==void 0&&m.defaultProps?ut(ut({},h.type.defaultProps),h.props):h.props,v=j.stackId,p=j.hide;if(p)return d;var y=j[r],g=d[y]||{hasStack:!1,stackGroups:{}};if(Nt(v)){var b=g.stackGroups[v]||{numericAxisId:r,cateAxisId:a,items:[]};b.items.push(h),g.hasStack=!0,g.stackGroups[v]=b}else g.stackGroups[Ni("_stackId_")]={numericAxisId:r,cateAxisId:a,items:[h]};return ut(ut({},d),{},wo({},y,g))},c),f={};return Object.keys(u).reduce(function(d,h){var m=u[h];if(m.hasStack){var j={};m.stackGroups=Object.keys(m.stackGroups).reduce(function(v,p){var y=m.stackGroups[p];return ut(ut({},v),{},wo({},p,{numericAxisId:r,cateAxisId:a,items:y.items,stackedData:Dne(t,y.items,i)}))},j)}return ut(ut({},d),{},wo({},h,m))},f)},c$=function(t,n){var r=n.realScaleType,a=n.type,i=n.tickCount,l=n.originalDomain,s=n.allowDecimals,c=r||n.scale;if(c!=="auto"&&c!=="linear")return null;if(i&&a==="number"&&l&&(l[0]==="auto"||l[1]==="auto")){var u=t.domain();if(!u.length)return null;var f=Wte(u,i,s);return t.domain([Pm(f),ei(f)]),{niceTicks:f}}if(i&&a==="number"){var d=t.domain(),h=Zte(d,i,s);return{niceTicks:h}}return null};function rs(e){var t=e.axis,n=e.ticks,r=e.bandSize,a=e.entry,i=e.index,l=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!le(a[t.dataKey])){var s=yh(n,"value",a[t.dataKey]);if(s)return s.coordinate+r/2}return n[i]?n[i].coordinate+r/2:null}var c=Qe(a,le(l)?t.dataKey:l);return le(c)?null:t.scale(c)}var uA=function(t){var n=t.axis,r=t.ticks,a=t.offset,i=t.bandSize,l=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+a:null;var c=Qe(l,n.dataKey,n.domain[s]);return le(c)?null:n.scale(c)-i/2+a},zne=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]},Bne=function(t,n){var r,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?ut(ut({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(Nt(i)){var l=n[i];if(l){var s=l.items.indexOf(t);return s>=0?l.stackedData[s]:null}}return null},Ine=function(t){return t.reduce(function(n,r){return[Pm(r.concat([n[0]]).filter(Y)),ei(r.concat([n[1]]).filter(Y))]},[1/0,-1/0])},u$=function(t,n,r){return Object.keys(t).reduce(function(a,i){var l=t[i],s=l.stackedData,c=s.reduce(function(u,f){var d=Ine(f.slice(n,r+1));return[Math.min(u[0],d[0]),Math.max(u[1],d[1])]},[1/0,-1/0]);return[Math.min(c[0],a[0]),Math.max(c[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},fA=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,dA=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,px=function(t,n,r){if(se(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(fA.test(t[0])){var i=+fA.exec(t[0])[1];a[0]=n[0]-i}else se(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(dA.test(t[1])){var l=+dA.exec(t[1])[1];a[1]=n[1]+l}else se(t[1])?a[1]=t[1](n[1]):a[1]=n[1];return a},Gh=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=Q0(n,function(d){return d.coordinate}),l=1/0,s=1,c=i.length;s<c;s++){var u=i[s],f=i[s-1];l=Math.min((u.coordinate||0)-(f.coordinate||0),l)}return l===1/0?0:l}return r?void 0:0},hA=function(t,n,r){return!t||!t.length||ji(t,Pn(r,"type.defaultProps.domain"))?n:t},f$=function(t,n){var r=t.type.defaultProps?ut(ut({},t.type.defaultProps),t.props):t.props,a=r.dataKey,i=r.name,l=r.unit,s=r.formatter,c=r.tooltipType,u=r.chartType,f=r.hide;return ut(ut({},re(t,!1)),{},{dataKey:a,unit:l,formatter:s,name:i||a,color:S1(t),value:Qe(n,a),type:c,payload:n,chartType:u,hide:f})};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 pA(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 Jr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pA(Object(n),!0).forEach(function(r){d$(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function d$(e,t,n){return t=Une(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Une(e){var t=qne(e,"string");return Au(t)=="symbol"?t:t+""}function qne(e,t){if(Au(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Au(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hne(e,t){return Vne(e)||Kne(e,t)||Gne(e,t)||Fne()}function Fne(){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 Gne(e,t){if(e){if(typeof e=="string")return mA(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 mA(e,t)}}function mA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Kne(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,s=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return s}}function Vne(e){if(Array.isArray(e))return e}var Kh=Math.PI/180,Yne=function(t){return t*180/Math.PI},He=function(t,n,r,a){return{x:t+Math.cos(-Kh*a)*r,y:n+Math.sin(-Kh*a)*r}},h$=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},Xne=function(t,n,r,a,i){var l=t.width,s=t.height,c=t.startAngle,u=t.endAngle,f=tn(t.cx,l,l/2),d=tn(t.cy,s,s/2),h=h$(l,s,r),m=tn(t.innerRadius,h,0),j=tn(t.outerRadius,h,h*.8),v=Object.keys(n);return v.reduce(function(p,y){var g=n[y],b=g.domain,x=g.reversed,w;if(le(g.range))a==="angleAxis"?w=[c,u]:a==="radiusAxis"&&(w=[m,j]),x&&(w=[w[1],w[0]]);else{w=g.range;var S=w,A=Hne(S,2);c=A[0],u=A[1]}var N=o$(g,i),C=N.realScaleType,M=N.scale;M.domain(b).range(w),s$(M);var R=c$(M,Jr(Jr({},g),{},{realScaleType:C})),P=Jr(Jr(Jr({},g),R),{},{range:w,radius:j,realScaleType:C,scale:M,cx:f,cy:d,innerRadius:m,outerRadius:j,startAngle:c,endAngle:u});return Jr(Jr({},p),{},d$({},y,P))},{})},Qne=function(t,n){var r=t.x,a=t.y,i=n.x,l=n.y;return Math.sqrt(Math.pow(r-i,2)+Math.pow(a-l,2))},Wne=function(t,n){var r=t.x,a=t.y,i=n.cx,l=n.cy,s=Qne({x:r,y:a},{x:i,y:l});if(s<=0)return{radius:s};var c=(r-i)/s,u=Math.acos(c);return a>l&&(u=2*Math.PI-u),{radius:s,angle:Yne(u),angleInRadian:u}},Zne=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}},Jne=function(t,n){var r=n.startAngle,a=n.endAngle,i=Math.floor(r/360),l=Math.floor(a/360),s=Math.min(i,l);return t+s*360},yA=function(t,n){var r=t.x,a=t.y,i=Wne({x:r,y:a},n),l=i.radius,s=i.angle,c=n.innerRadius,u=n.outerRadius;if(l<c||l>u)return!1;if(l===0)return!0;var f=Zne(n),d=f.startAngle,h=f.endAngle,m=s,j;if(d<=h){for(;m>h;)m-=360;for(;m<d;)m+=360;j=m>=d&&m<=h}else{for(;m>d;)m-=360;for(;m<h;)m+=360;j=m>=h&&m<=d}return j?Jr(Jr({},n),{},{radius:l,angle:Jne(m,n)}):null},p$=function(t){return!O.isValidElement(t)&&!se(t)&&typeof t!="boolean"?t.className:""};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)}var ere=["offset"];function tre(e){return ire(e)||are(e)||rre(e)||nre()}function nre(){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 rre(e,t){if(e){if(typeof e=="string")return mx(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 mx(e,t)}}function are(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ire(e){if(Array.isArray(e))return mx(e)}function mx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function lre(e,t){if(e==null)return{};var n=ore(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ore(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 vA(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 Ot(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vA(Object(n),!0).forEach(function(r){sre(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sre(e,t,n){return t=cre(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cre(e){var t=ure(e,"string");return Nu(t)=="symbol"?t:t+""}function ure(e,t){if(Nu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Eu(){return Eu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Eu.apply(this,arguments)}var fre=function(t){var n=t.value,r=t.formatter,a=le(t.children)?n:t.children;return se(r)?r(a):a},dre=function(t,n){var r=en(n-t),a=Math.min(Math.abs(n-t),360);return r*a},hre=function(t,n,r){var a=t.position,i=t.viewBox,l=t.offset,s=t.className,c=i,u=c.cx,f=c.cy,d=c.innerRadius,h=c.outerRadius,m=c.startAngle,j=c.endAngle,v=c.clockWise,p=(d+h)/2,y=dre(m,j),g=y>=0?1:-1,b,x;a==="insideStart"?(b=m+g*l,x=v):a==="insideEnd"?(b=j-g*l,x=!v):a==="end"&&(b=j+g*l,x=v),x=y<=0?x:!x;var w=He(u,f,p,b),S=He(u,f,p,b+(x?1:-1)*359),A="M".concat(w.x,",").concat(w.y,`
    A`).concat(p,",").concat(p,",0,1,").concat(x?0:1,`,
    `).concat(S.x,",").concat(S.y),N=le(t.id)?Ni("recharts-radial-line-"):t.id;return T.createElement("text",Eu({},r,{dominantBaseline:"central",className:de("recharts-radial-bar-label",s)}),T.createElement("defs",null,T.createElement("path",{id:N,d:A})),T.createElement("textPath",{xlinkHref:"#".concat(N)},n))},pre=function(t){var n=t.viewBox,r=t.offset,a=t.position,i=n,l=i.cx,s=i.cy,c=i.innerRadius,u=i.outerRadius,f=i.startAngle,d=i.endAngle,h=(f+d)/2;if(a==="outside"){var m=He(l,s,u+r,h),j=m.x,v=m.y;return{x:j,y:v,textAnchor:j>=l?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:l,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:l,y:s,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:l,y:s,textAnchor:"middle",verticalAnchor:"end"};var p=(c+u)/2,y=He(l,s,p,h),g=y.x,b=y.y;return{x:g,y:b,textAnchor:"middle",verticalAnchor:"middle"}},mre=function(t){var n=t.viewBox,r=t.parentViewBox,a=t.offset,i=t.position,l=n,s=l.x,c=l.y,u=l.width,f=l.height,d=f>=0?1:-1,h=d*a,m=d>0?"end":"start",j=d>0?"start":"end",v=u>=0?1:-1,p=v*a,y=v>0?"end":"start",g=v>0?"start":"end";if(i==="top"){var b={x:s+u/2,y:c-d*a,textAnchor:"middle",verticalAnchor:m};return Ot(Ot({},b),r?{height:Math.max(c-r.y,0),width:u}:{})}if(i==="bottom"){var x={x:s+u/2,y:c+f+h,textAnchor:"middle",verticalAnchor:j};return Ot(Ot({},x),r?{height:Math.max(r.y+r.height-(c+f),0),width:u}:{})}if(i==="left"){var w={x:s-p,y:c+f/2,textAnchor:y,verticalAnchor:"middle"};return Ot(Ot({},w),r?{width:Math.max(w.x-r.x,0),height:f}:{})}if(i==="right"){var S={x:s+u+p,y:c+f/2,textAnchor:g,verticalAnchor:"middle"};return Ot(Ot({},S),r?{width:Math.max(r.x+r.width-S.x,0),height:f}:{})}var A=r?{width:u,height:f}:{};return i==="insideLeft"?Ot({x:s+p,y:c+f/2,textAnchor:g,verticalAnchor:"middle"},A):i==="insideRight"?Ot({x:s+u-p,y:c+f/2,textAnchor:y,verticalAnchor:"middle"},A):i==="insideTop"?Ot({x:s+u/2,y:c+h,textAnchor:"middle",verticalAnchor:j},A):i==="insideBottom"?Ot({x:s+u/2,y:c+f-h,textAnchor:"middle",verticalAnchor:m},A):i==="insideTopLeft"?Ot({x:s+p,y:c+h,textAnchor:g,verticalAnchor:j},A):i==="insideTopRight"?Ot({x:s+u-p,y:c+h,textAnchor:y,verticalAnchor:j},A):i==="insideBottomLeft"?Ot({x:s+p,y:c+f-h,textAnchor:g,verticalAnchor:m},A):i==="insideBottomRight"?Ot({x:s+u-p,y:c+f-h,textAnchor:y,verticalAnchor:m},A):zs(i)&&(Y(i.x)||Vi(i.x))&&(Y(i.y)||Vi(i.y))?Ot({x:s+tn(i.x,u),y:c+tn(i.y,f),textAnchor:"end",verticalAnchor:"end"},A):Ot({x:s+u/2,y:c+f/2,textAnchor:"middle",verticalAnchor:"middle"},A)},yre=function(t){return"cx"in t&&Y(t.cx)};function $t(e){var t=e.offset,n=t===void 0?5:t,r=lre(e,ere),a=Ot({offset:n},r),i=a.viewBox,l=a.position,s=a.value,c=a.children,u=a.content,f=a.className,d=f===void 0?"":f,h=a.textBreakAll;if(!i||le(s)&&le(c)&&!O.isValidElement(u)&&!se(u))return null;if(O.isValidElement(u))return O.cloneElement(u,a);var m;if(se(u)){if(m=O.createElement(u,a),O.isValidElement(m))return m}else m=fre(a);var j=yre(i),v=re(a,!0);if(j&&(l==="insideStart"||l==="insideEnd"||l==="end"))return hre(a,m,v);var p=j?pre(a):mre(a);return T.createElement(Sl,Eu({className:de("recharts-label",d)},v,p,{breakAll:h}),m)}$t.displayName="Label";var m$=function(t){var n=t.cx,r=t.cy,a=t.angle,i=t.startAngle,l=t.endAngle,s=t.r,c=t.radius,u=t.innerRadius,f=t.outerRadius,d=t.x,h=t.y,m=t.top,j=t.left,v=t.width,p=t.height,y=t.clockWise,g=t.labelViewBox;if(g)return g;if(Y(v)&&Y(p)){if(Y(d)&&Y(h))return{x:d,y:h,width:v,height:p};if(Y(m)&&Y(j))return{x:m,y:j,width:v,height:p}}return Y(d)&&Y(h)?{x:d,y:h,width:0,height:0}:Y(n)&&Y(r)?{cx:n,cy:r,startAngle:i||a||0,endAngle:l||a||0,innerRadius:u||0,outerRadius:f||c||s||0,clockWise:y}:t.viewBox?t.viewBox:{}},vre=function(t,n){return t?t===!0?T.createElement($t,{key:"label-implicit",viewBox:n}):Nt(t)?T.createElement($t,{key:"label-implicit",viewBox:n,value:t}):O.isValidElement(t)?t.type===$t?O.cloneElement(t,{key:"label-implicit",viewBox:n}):T.createElement($t,{key:"label-implicit",content:t,viewBox:n}):se(t)?T.createElement($t,{key:"label-implicit",content:t,viewBox:n}):zs(t)?T.createElement($t,Eu({viewBox:n},t,{key:"label-implicit"})):null:null},gre=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=m$(t),l=an(a,$t).map(function(c,u){return O.cloneElement(c,{viewBox:n||i,key:"label-".concat(u)})});if(!r)return l;var s=vre(t.label,n||i);return[s].concat(tre(l))};$t.parseViewBox=m$;$t.renderCallByParent=gre;function xre(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var bre=xre;const jre=_e(bre);function Cu(e){"@babel/helpers - typeof";return Cu=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},Cu(e)}var Sre=["valueAccessor"],wre=["data","dataKey","clockWise","id","textBreakAll"];function Ore(e){return Cre(e)||Ere(e)||Nre(e)||Are()}function Are(){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 Nre(e,t){if(e){if(typeof e=="string")return yx(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 yx(e,t)}}function Ere(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Cre(e){if(Array.isArray(e))return yx(e)}function yx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Vh(){return Vh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vh.apply(this,arguments)}function gA(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 xA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gA(Object(n),!0).forEach(function(r){_re(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _re(e,t,n){return t=Tre(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tre(e){var t=Pre(e,"string");return Cu(t)=="symbol"?t:t+""}function Pre(e,t){if(Cu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bA(e,t){if(e==null)return{};var n=Mre(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Mre(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 $re=function(t){return Array.isArray(t.value)?jre(t.value):t.value};function vr(e){var t=e.valueAccessor,n=t===void 0?$re:t,r=bA(e,Sre),a=r.data,i=r.dataKey,l=r.clockWise,s=r.id,c=r.textBreakAll,u=bA(r,wre);return!a||!a.length?null:T.createElement(me,{className:"recharts-label-list"},a.map(function(f,d){var h=le(i)?n(f,d):Qe(f&&f.payload,i),m=le(s)?{}:{id:"".concat(s,"-").concat(d)};return T.createElement($t,Vh({},re(f,!0),u,m,{parentViewBox:f.parentViewBox,value:h,textBreakAll:c,viewBox:$t.parseViewBox(le(l)?f:xA(xA({},f),{},{clockWise:l})),key:"label-".concat(d),index:d}))}))}vr.displayName="LabelList";function Rre(e,t){return e?e===!0?T.createElement(vr,{key:"labelList-implicit",data:t}):T.isValidElement(e)||se(e)?T.createElement(vr,{key:"labelList-implicit",data:t,content:e}):zs(e)?T.createElement(vr,Vh({data:t},e,{key:"labelList-implicit"})):null:null}function kre(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=an(r,vr).map(function(l,s){return O.cloneElement(l,{data:t,key:"labelList-".concat(s)})});if(!n)return a;var i=Rre(e.label,t);return[i].concat(Ore(a))}vr.renderCallByParent=kre;function _u(e){"@babel/helpers - typeof";return _u=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},_u(e)}function vx(){return vx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vx.apply(this,arguments)}function jA(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 SA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jA(Object(n),!0).forEach(function(r){Dre(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Dre(e,t,n){return t=Lre(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lre(e){var t=zre(e,"string");return _u(t)=="symbol"?t:t+""}function zre(e,t){if(_u(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_u(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Bre=function(t,n){var r=en(n-t),a=Math.min(Math.abs(n-t),359.999);return r*a},nd=function(t){var n=t.cx,r=t.cy,a=t.radius,i=t.angle,l=t.sign,s=t.isExternal,c=t.cornerRadius,u=t.cornerIsExternal,f=c*(s?1:-1)+a,d=Math.asin(c/f)/Kh,h=u?i:i+l*d,m=He(n,r,f,h),j=He(n,r,a,h),v=u?i-l*d:i,p=He(n,r,f*Math.cos(d*Kh),v);return{center:m,circleTangency:j,lineTangency:p,theta:d}},y$=function(t){var n=t.cx,r=t.cy,a=t.innerRadius,i=t.outerRadius,l=t.startAngle,s=t.endAngle,c=Bre(l,s),u=l+c,f=He(n,r,i,l),d=He(n,r,i,u),h="M ".concat(f.x,",").concat(f.y,`
    A `).concat(i,",").concat(i,`,0,
    `).concat(+(Math.abs(c)>180),",").concat(+(l>u),`,
    `).concat(d.x,",").concat(d.y,`
  `);if(a>0){var m=He(n,r,a,l),j=He(n,r,a,u);h+="L ".concat(j.x,",").concat(j.y,`
            A `).concat(a,",").concat(a,`,0,
            `).concat(+(Math.abs(c)>180),",").concat(+(l<=u),`,
            `).concat(m.x,",").concat(m.y," Z")}else h+="L ".concat(n,",").concat(r," Z");return h},Ire=function(t){var n=t.cx,r=t.cy,a=t.innerRadius,i=t.outerRadius,l=t.cornerRadius,s=t.forceCornerRadius,c=t.cornerIsExternal,u=t.startAngle,f=t.endAngle,d=en(f-u),h=nd({cx:n,cy:r,radius:i,angle:u,sign:d,cornerRadius:l,cornerIsExternal:c}),m=h.circleTangency,j=h.lineTangency,v=h.theta,p=nd({cx:n,cy:r,radius:i,angle:f,sign:-d,cornerRadius:l,cornerIsExternal:c}),y=p.circleTangency,g=p.lineTangency,b=p.theta,x=c?Math.abs(u-f):Math.abs(u-f)-v-b;if(x<0)return s?"M ".concat(j.x,",").concat(j.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
      `):y$({cx:n,cy:r,innerRadius:a,outerRadius:i,startAngle:u,endAngle:f});var w="M ".concat(j.x,",").concat(j.y,`
    A`).concat(l,",").concat(l,",0,0,").concat(+(d<0),",").concat(m.x,",").concat(m.y,`
    A`).concat(i,",").concat(i,",0,").concat(+(x>180),",").concat(+(d<0),",").concat(y.x,",").concat(y.y,`
    A`).concat(l,",").concat(l,",0,0,").concat(+(d<0),",").concat(g.x,",").concat(g.y,`
  `);if(a>0){var S=nd({cx:n,cy:r,radius:a,angle:u,sign:d,isExternal:!0,cornerRadius:l,cornerIsExternal:c}),A=S.circleTangency,N=S.lineTangency,C=S.theta,M=nd({cx:n,cy:r,radius:a,angle:f,sign:-d,isExternal:!0,cornerRadius:l,cornerIsExternal:c}),R=M.circleTangency,P=M.lineTangency,B=M.theta,_=c?Math.abs(u-f):Math.abs(u-f)-C-B;if(_<0&&l===0)return"".concat(w,"L").concat(n,",").concat(r,"Z");w+="L".concat(P.x,",").concat(P.y,`
      A`).concat(l,",").concat(l,",0,0,").concat(+(d<0),",").concat(R.x,",").concat(R.y,`
      A`).concat(a,",").concat(a,",0,").concat(+(_>180),",").concat(+(d>0),",").concat(A.x,",").concat(A.y,`
      A`).concat(l,",").concat(l,",0,0,").concat(+(d<0),",").concat(N.x,",").concat(N.y,"Z")}else w+="L".concat(n,",").concat(r,"Z");return w},Ure={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},v$=function(t){var n=SA(SA({},Ure),t),r=n.cx,a=n.cy,i=n.innerRadius,l=n.outerRadius,s=n.cornerRadius,c=n.forceCornerRadius,u=n.cornerIsExternal,f=n.startAngle,d=n.endAngle,h=n.className;if(l<i||f===d)return null;var m=de("recharts-sector",h),j=l-i,v=tn(s,j,0,!0),p;return v>0&&Math.abs(f-d)<360?p=Ire({cx:r,cy:a,innerRadius:i,outerRadius:l,cornerRadius:Math.min(v,j/2),forceCornerRadius:c,cornerIsExternal:u,startAngle:f,endAngle:d}):p=y$({cx:r,cy:a,innerRadius:i,outerRadius:l,startAngle:f,endAngle:d}),T.createElement("path",vx({},re(n,!0),{className:m,d:p,role:"img"}))};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 gx(){return gx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gx.apply(this,arguments)}function wA(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 OA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wA(Object(n),!0).forEach(function(r){qre(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qre(e,t,n){return t=Hre(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hre(e){var t=Fre(e,"string");return Tu(t)=="symbol"?t:t+""}function Fre(e,t){if(Tu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Tu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var AA={curveBasisClosed:qq,curveBasisOpen:Hq,curveBasis:Uq,curveBumpX:Eq,curveBumpY:Cq,curveLinearClosed:Fq,curveLinear:gm,curveMonotoneX:Gq,curveMonotoneY:Kq,curveNatural:Vq,curveStep:Yq,curveStepAfter:Qq,curveStepBefore:Xq},rd=function(t){return t.x===+t.x&&t.y===+t.y},dc=function(t){return t.x},hc=function(t){return t.y},Gre=function(t,n){if(se(t))return t;var r="curve".concat(ym(t));return(r==="curveMonotone"||r==="curveBump")&&n?AA["".concat(r).concat(n==="vertical"?"Y":"X")]:AA[r]||gm},Kre=function(t){var n=t.type,r=n===void 0?"linear":n,a=t.points,i=a===void 0?[]:a,l=t.baseLine,s=t.layout,c=t.connectNulls,u=c===void 0?!1:c,f=Gre(r,s),d=u?i.filter(function(v){return rd(v)}):i,h;if(Array.isArray(l)){var m=u?l.filter(function(v){return rd(v)}):l,j=d.map(function(v,p){return OA(OA({},v),{},{base:m[p]})});return s==="vertical"?h=Vf().y(hc).x1(dc).x0(function(v){return v.base.x}):h=Vf().x(dc).y1(hc).y0(function(v){return v.base.y}),h.defined(rd).curve(f),h(j)}return s==="vertical"&&Y(l)?h=Vf().y(hc).x1(dc).x0(l):Y(l)?h=Vf().x(dc).y1(hc).y0(l):h=dP().x(dc).y(hc),h.defined(rd).curve(f),h(d)},hi=function(t){var n=t.className,r=t.points,a=t.path,i=t.pathRef;if((!r||!r.length)&&!a)return null;var l=r&&r.length?Kre(t):a;return O.createElement("path",gx({},re(t,!1),vh(t),{className:de("recharts-curve",n),d:l,ref:i}))},g$={exports:{}},Vre="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Yre=Vre,Xre=Yre;function x$(){}function b$(){}b$.resetWarningCache=x$;var Qre=function(){function e(r,a,i,l,s,c){if(c!==Xre){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:b$,resetWarningCache:x$};return n.PropTypes=n,n};g$.exports=Qre();var Wre=g$.exports;const Ce=_e(Wre),{getOwnPropertyNames:Zre,getOwnPropertySymbols:Jre}=Object,{hasOwnProperty:eae}=Object.prototype;function sv(e,t){return function(r,a,i){return e(r,a,i)&&t(r,a,i)}}function ad(e){return function(n,r,a){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,a);const{cache:i}=a,l=i.get(n),s=i.get(r);if(l&&s)return l===r&&s===n;i.set(n,r),i.set(r,n);const c=e(n,r,a);return i.delete(n),i.delete(r),c}}function tae(e){return e!=null?e[Symbol.toStringTag]:void 0}function NA(e){return Zre(e).concat(Jre(e))}const nae=Object.hasOwn||((e,t)=>eae.call(e,t));function Rl(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const rae="__v",aae="__o",iae="_owner",{getOwnPropertyDescriptor:EA,keys:CA}=Object;function lae(e,t){return e.byteLength===t.byteLength&&Yh(new Uint8Array(e),new Uint8Array(t))}function oae(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 sae(e,t){return e.byteLength===t.byteLength&&Yh(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function cae(e,t){return Rl(e.getTime(),t.getTime())}function uae(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function fae(e,t){return e===t}function _A(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,s,c=0;for(;(l=i.next())&&!l.done;){const u=t.entries();let f=!1,d=0;for(;(s=u.next())&&!s.done;){if(a[d]){d++;continue}const h=l.value,m=s.value;if(n.equals(h[0],m[0],c,d,e,t,n)&&n.equals(h[1],m[1],h[0],m[0],e,t,n)){f=a[d]=!0;break}d++}if(!f)return!1;c++}return!0}const dae=Rl;function hae(e,t,n){const r=CA(e);let a=r.length;if(CA(t).length!==a)return!1;for(;a-- >0;)if(!j$(e,t,n,r[a]))return!1;return!0}function pc(e,t,n){const r=NA(e);let a=r.length;if(NA(t).length!==a)return!1;let i,l,s;for(;a-- >0;)if(i=r[a],!j$(e,t,n,i)||(l=EA(e,i),s=EA(t,i),(l||s)&&(!l||!s||l.configurable!==s.configurable||l.enumerable!==s.enumerable||l.writable!==s.writable)))return!1;return!0}function pae(e,t){return Rl(e.valueOf(),t.valueOf())}function mae(e,t){return e.source===t.source&&e.flags===t.flags}function TA(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,s;for(;(l=i.next())&&!l.done;){const c=t.values();let u=!1,f=0;for(;(s=c.next())&&!s.done;){if(!a[f]&&n.equals(l.value,s.value,l.value,s.value,e,t,n)){u=a[f]=!0;break}f++}if(!u)return!1}return!0}function Yh(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 yae(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 j$(e,t,n,r){return(r===iae||r===aae||r===rae)&&(e.$$typeof||t.$$typeof)?!0:nae(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const vae="[object ArrayBuffer]",gae="[object Arguments]",xae="[object Boolean]",bae="[object DataView]",jae="[object Date]",Sae="[object Error]",wae="[object Map]",Oae="[object Number]",Aae="[object Object]",Nae="[object RegExp]",Eae="[object Set]",Cae="[object String]",_ae={"[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},Tae="[object URL]",Pae=Object.prototype.toString;function Mae({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:a,areFunctionsEqual:i,areMapsEqual:l,areNumbersEqual:s,areObjectsEqual:c,arePrimitiveWrappersEqual:u,areRegExpsEqual:f,areSetsEqual:d,areTypedArraysEqual:h,areUrlsEqual:m,unknownTagComparators:j}){return function(p,y,g){if(p===y)return!0;if(p==null||y==null)return!1;const b=typeof p;if(b!==typeof y)return!1;if(b!=="object")return b==="number"?s(p,y,g):b==="function"?i(p,y,g):!1;const x=p.constructor;if(x!==y.constructor)return!1;if(x===Object)return c(p,y,g);if(Array.isArray(p))return t(p,y,g);if(x===Date)return r(p,y,g);if(x===RegExp)return f(p,y,g);if(x===Map)return l(p,y,g);if(x===Set)return d(p,y,g);const w=Pae.call(p);if(w===jae)return r(p,y,g);if(w===Nae)return f(p,y,g);if(w===wae)return l(p,y,g);if(w===Eae)return d(p,y,g);if(w===Aae)return typeof p.then!="function"&&typeof y.then!="function"&&c(p,y,g);if(w===Tae)return m(p,y,g);if(w===Sae)return a(p,y,g);if(w===gae)return c(p,y,g);if(_ae[w])return h(p,y,g);if(w===vae)return e(p,y,g);if(w===bae)return n(p,y,g);if(w===xae||w===Oae||w===Cae)return u(p,y,g);if(j){let S=j[w];if(!S){const A=tae(p);A&&(S=j[A])}if(S)return S(p,y,g)}return!1}}function $ae({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:lae,areArraysEqual:n?pc:oae,areDataViewsEqual:sae,areDatesEqual:cae,areErrorsEqual:uae,areFunctionsEqual:fae,areMapsEqual:n?sv(_A,pc):_A,areNumbersEqual:dae,areObjectsEqual:n?pc:hae,arePrimitiveWrappersEqual:pae,areRegExpsEqual:mae,areSetsEqual:n?sv(TA,pc):TA,areTypedArraysEqual:n?sv(Yh,pc):Yh,areUrlsEqual:yae,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const a=ad(r.areArraysEqual),i=ad(r.areMapsEqual),l=ad(r.areObjectsEqual),s=ad(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:a,areMapsEqual:i,areObjectsEqual:l,areSetsEqual:s})}return r}function Rae(e){return function(t,n,r,a,i,l,s){return e(t,n,s)}}function kae({circular:e,comparator:t,createState:n,equals:r,strict:a}){if(n)return function(s,c){const{cache:u=e?new WeakMap:void 0,meta:f}=n();return t(s,c,{cache:u,equals:r,meta:f,strict:a})};if(e)return function(s,c){return t(s,c,{cache:new WeakMap,equals:r,meta:void 0,strict:a})};const i={cache:void 0,equals:r,meta:void 0,strict:a};return function(s,c){return t(s,c,i)}}const Dae=_i();_i({strict:!0});_i({circular:!0});_i({circular:!0,strict:!0});_i({createInternalComparator:()=>Rl});_i({strict:!0,createInternalComparator:()=>Rl});_i({circular:!0,createInternalComparator:()=>Rl});_i({circular:!0,createInternalComparator:()=>Rl,strict:!0});function _i(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:a=!1}=e,i=$ae(e),l=Mae(i),s=n?n(l):Rae(l);return kae({circular:t,comparator:l,createState:r,equals:s,strict:a})}function Lae(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function PA(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):Lae(a)};requestAnimationFrame(r)}function xx(e){"@babel/helpers - typeof";return xx=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},xx(e)}function zae(e){return qae(e)||Uae(e)||Iae(e)||Bae()}function Bae(){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 Iae(e,t){if(e){if(typeof e=="string")return MA(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 MA(e,t)}}function MA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Uae(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qae(e){if(Array.isArray(e))return e}function Hae(){var e={},t=function(){return null},n=!1,r=function a(i){if(!n){if(Array.isArray(i)){if(!i.length)return;var l=i,s=zae(l),c=s[0],u=s.slice(1);if(typeof c=="number"){PA(a.bind(null,u),c);return}a(c),PA(a.bind(null,u));return}xx(i)==="object"&&(e=i,t(e)),typeof i=="function"&&i()}};return{stop:function(){n=!0},start:function(i){n=!1,r(i)},subscribe:function(i){return t=i,function(){t=function(){return null}}}}}function Pu(e){"@babel/helpers - typeof";return Pu=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},Pu(e)}function $A(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 RA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$A(Object(n),!0).forEach(function(r){S$(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$A(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function S$(e,t,n){return t=Fae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fae(e){var t=Gae(e,"string");return Pu(t)==="symbol"?t:String(t)}function Gae(e,t){if(Pu(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Pu(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Kae=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,a){return r.filter(function(i){return a.includes(i)})})},Vae=function(t){return t},Yae=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},Bc=function(t,n){return Object.keys(n).reduce(function(r,a){return RA(RA({},r),{},S$({},a,t(a,n[a])))},{})},kA=function(t,n,r){return t.map(function(a){return"".concat(Yae(a)," ").concat(n,"ms ").concat(r)}).join(",")};function Xae(e,t){return Zae(e)||Wae(e,t)||w$(e,t)||Qae()}function Qae(){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 Wae(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,s=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return s}}function Zae(e){if(Array.isArray(e))return e}function Jae(e){return nie(e)||tie(e)||w$(e)||eie()}function eie(){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 w$(e,t){if(e){if(typeof e=="string")return bx(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 bx(e,t)}}function tie(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function nie(e){if(Array.isArray(e))return bx(e)}function bx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Xh=1e-4,O$=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},A$=function(t,n){return t.map(function(r,a){return r*Math.pow(n,a)}).reduce(function(r,a){return r+a})},DA=function(t,n){return function(r){var a=O$(t,n);return A$(a,r)}},rie=function(t,n){return function(r){var a=O$(t,n),i=[].concat(Jae(a.map(function(l,s){return l*s}).slice(1)),[0]);return A$(i,r)}},LA=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n[0],i=n[1],l=n[2],s=n[3];if(n.length===1)switch(n[0]){case"linear":a=0,i=0,l=1,s=1;break;case"ease":a=.25,i=.1,l=.25,s=1;break;case"ease-in":a=.42,i=0,l=1,s=1;break;case"ease-out":a=.42,i=0,l=.58,s=1;break;case"ease-in-out":a=0,i=0,l=.58,s=1;break;default:{var c=n[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var u=c[1].split(")")[0].split(",").map(function(p){return parseFloat(p)}),f=Xae(u,4);a=f[0],i=f[1],l=f[2],s=f[3]}}}var d=DA(a,l),h=DA(i,s),m=rie(a,l),j=function(y){return y>1?1:y<0?0:y},v=function(y){for(var g=y>1?1:y,b=g,x=0;x<8;++x){var w=d(b)-g,S=m(b);if(Math.abs(w-g)<Xh||S<Xh)return h(b);b=j(b-w/S)}return h(b)};return v.isStepper=!1,v},aie=function(){var t=arguments.length>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,s=l===void 0?17:l,c=function(f,d,h){var m=-(f-d)*r,j=h*i,v=h+(m-j)*s/1e3,p=h*s/1e3+f;return Math.abs(p-d)<Xh&&Math.abs(v)<Xh?[d,0]:[p,v]};return c.isStepper=!0,c.dt=s,c},iie=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n[0];if(typeof a=="string")switch(a){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return LA(a);case"spring":return aie();default:if(a.split("(")[0]==="cubic-bezier")return LA(a)}return typeof a=="function"?a:null};function Mu(e){"@babel/helpers - typeof";return Mu=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},Mu(e)}function zA(e){return sie(e)||oie(e)||N$(e)||lie()}function lie(){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 oie(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function sie(e){if(Array.isArray(e))return Sx(e)}function BA(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<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BA(Object(n),!0).forEach(function(r){jx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jx(e,t,n){return t=cie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cie(e){var t=uie(e,"string");return Mu(t)==="symbol"?t:String(t)}function uie(e,t){if(Mu(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Mu(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fie(e,t){return pie(e)||hie(e,t)||N$(e,t)||die()}function die(){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 N$(e,t){if(e){if(typeof e=="string")return Sx(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 Sx(e,t)}}function Sx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hie(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,s=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return s}}function pie(e){if(Array.isArray(e))return e}var Qh=function(t,n,r){return t+(n-t)*r},wx=function(t){var n=t.from,r=t.to;return n!==r},mie=function e(t,n,r){var a=Bc(function(i,l){if(wx(l)){var s=t(l.from,l.to,l.velocity),c=fie(s,2),u=c[0],f=c[1];return Lt(Lt({},l),{},{from:u,velocity:f})}return l},n);return r<1?Bc(function(i,l){return wx(l)?Lt(Lt({},l),{},{velocity:Qh(l.velocity,a[i].velocity,r),from:Qh(l.from,a[i].from,r)}):l},n):e(t,a,r-1)};const yie=function(e,t,n,r,a){var i=Kae(e,t),l=i.reduce(function(p,y){return Lt(Lt({},p),{},jx({},y,[e[y],t[y]]))},{}),s=i.reduce(function(p,y){return Lt(Lt({},p),{},jx({},y,{from:e[y],velocity:0,to:t[y]}))},{}),c=-1,u,f,d=function(){return null},h=function(){return Bc(function(y,g){return g.from},s)},m=function(){return!Object.values(s).filter(wx).length},j=function(y){u||(u=y);var g=y-u,b=g/n.dt;s=mie(n,s,b),a(Lt(Lt(Lt({},e),t),h())),u=y,m()||(c=requestAnimationFrame(d))},v=function(y){f||(f=y);var g=(y-f)/r,b=Bc(function(w,S){return Qh.apply(void 0,zA(S).concat([n(g)]))},l);if(a(Lt(Lt(Lt({},e),t),b)),g<1)c=requestAnimationFrame(d);else{var x=Bc(function(w,S){return Qh.apply(void 0,zA(S).concat([n(1)]))},l);a(Lt(Lt(Lt({},e),t),x))}};return d=n.isStepper?j:v,function(){return requestAnimationFrame(d),function(){cancelAnimationFrame(c)}}};function as(e){"@babel/helpers - typeof";return as=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},as(e)}var vie=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function gie(e,t){if(e==null)return{};var n=xie(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function xie(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function cv(e){return wie(e)||Sie(e)||jie(e)||bie()}function bie(){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 jie(e,t){if(e){if(typeof e=="string")return Ox(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 Ox(e,t)}}function Sie(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wie(e){if(Array.isArray(e))return Ox(e)}function Ox(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function IA(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 or(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?IA(Object(n),!0).forEach(function(r){jc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jc(e,t,n){return t=E$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Aie(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,E$(r.key),r)}}function Nie(e,t,n){return t&&Aie(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function E$(e){var t=Eie(e,"string");return as(t)==="symbol"?t:String(t)}function Eie(e,t){if(as(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(as(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cie(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ax(e,t)}function Ax(e,t){return Ax=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Ax(e,t)}function _ie(e){var t=Tie();return function(){var r=Wh(e),a;if(t){var i=Wh(this).constructor;a=Reflect.construct(r,arguments,i)}else a=r.apply(this,arguments);return Nx(this,a)}}function Nx(e,t){if(t&&(as(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ex(e)}function Ex(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Tie(){if(typeof Reflect>"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 Wh(e){return Wh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Wh(e)}var rr=function(e){Cie(n,e);var t=_ie(n);function n(r,a){var i;Oie(this,n),i=t.call(this,r,a);var l=i.props,s=l.isActive,c=l.attributeName,u=l.from,f=l.to,d=l.steps,h=l.children,m=l.duration;if(i.handleStyleChange=i.handleStyleChange.bind(Ex(i)),i.changeStyle=i.changeStyle.bind(Ex(i)),!s||m<=0)return i.state={style:{}},typeof h=="function"&&(i.state={style:f}),Nx(i);if(d&&d.length)i.state={style:d[0].style};else if(u){if(typeof h=="function")return i.state={style:u},Nx(i);i.state={style:c?jc({},c,u):u}}else i.state={style:{}};return i}return Nie(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,s=i.canBegin,c=i.attributeName,u=i.shouldReAnimate,f=i.to,d=i.from,h=this.state.style;if(s){if(!l){var m={style:c?jc({},c,f):f};this.state&&h&&(c&&h[c]!==f||!c&&h!==f)&&this.setState(m);return}if(!(Dae(a.to,f)&&a.canBegin&&a.isActive)){var j=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var v=j||u?d:a.to;if(this.state&&h){var p={style:c?jc({},c,v):v};(c&&h[c]!==v||!c&&h!==v)&&this.setState(p)}this.runAnimation(or(or({},this.props),{},{from:v,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,s=a.to,c=a.duration,u=a.easing,f=a.begin,d=a.onAnimationEnd,h=a.onAnimationStart,m=yie(l,s,iie(u),c,this.changeStyle),j=function(){i.stopJSAnimation=m()};this.manager.start([h,f,j,c,d])}},{key:"runStepAnimation",value:function(a){var i=this,l=a.steps,s=a.begin,c=a.onAnimationStart,u=l[0],f=u.style,d=u.duration,h=d===void 0?0:d,m=function(v,p,y){if(y===0)return v;var g=p.duration,b=p.easing,x=b===void 0?"ease":b,w=p.style,S=p.properties,A=p.onAnimationEnd,N=y>0?l[y-1]:p,C=S||Object.keys(w);if(typeof x=="function"||x==="spring")return[].concat(cv(v),[i.runJSAnimation.bind(i,{from:N.style,to:w,duration:g,easing:x}),g]);var M=kA(C,g,x),R=or(or(or({},N.style),w),{},{transition:M});return[].concat(cv(v),[R,g,A]).filter(Vae)};return this.manager.start([c].concat(cv(l.reduce(m,[f,Math.max(h,s)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=Hae());var i=a.begin,l=a.duration,s=a.attributeName,c=a.to,u=a.easing,f=a.onAnimationStart,d=a.onAnimationEnd,h=a.steps,m=a.children,j=this.manager;if(this.unSubscribe=j.subscribe(this.handleStyleChange),typeof u=="function"||typeof m=="function"||u==="spring"){this.runJSAnimation(a);return}if(h.length>1){this.runStepAnimation(a);return}var v=s?jc({},s,c):c,p=kA(Object.keys(v),l,u);j.start([f,i,or(or({},v),{},{transition:p}),l,d])}},{key:"render",value:function(){var a=this.props,i=a.children;a.begin;var l=a.duration;a.attributeName,a.easing;var s=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var c=gie(a,vie),u=O.Children.count(i),f=this.state.style;if(typeof i=="function")return i(f);if(!s||u===0||l<=0)return i;var d=function(m){var j=m.props,v=j.style,p=v===void 0?{}:v,y=j.className,g=O.cloneElement(m,or(or({},c),{},{style:or(or({},p),f),className:y}));return g};return u===1?d(O.Children.only(i)):T.createElement("div",null,O.Children.map(i,function(h){return d(h)}))}}]),n}(O.PureComponent);rr.displayName="Animate";rr.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};rr.propTypes={from:Ce.oneOfType([Ce.object,Ce.string]),to:Ce.oneOfType([Ce.object,Ce.string]),attributeName:Ce.string,duration:Ce.number,begin:Ce.number,easing:Ce.oneOfType([Ce.string,Ce.func]),steps:Ce.arrayOf(Ce.shape({duration:Ce.number.isRequired,style:Ce.object.isRequired,easing:Ce.oneOfType([Ce.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Ce.func]),properties:Ce.arrayOf("string"),onAnimationEnd:Ce.func})),children:Ce.oneOfType([Ce.node,Ce.func]),isActive:Ce.bool,canBegin:Ce.bool,onAnimationEnd:Ce.func,shouldReAnimate:Ce.bool,onAnimationStart:Ce.func,onAnimationReStart:Ce.func};function $u(e){"@babel/helpers - typeof";return $u=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},$u(e)}function Zh(){return Zh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zh.apply(this,arguments)}function Pie(e,t){return kie(e)||Rie(e,t)||$ie(e,t)||Mie()}function Mie(){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 $ie(e,t){if(e){if(typeof e=="string")return UA(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 UA(e,t)}}function UA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Rie(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,s=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return s}}function kie(e){if(Array.isArray(e))return e}function qA(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 HA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qA(Object(n),!0).forEach(function(r){Die(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Die(e,t,n){return t=Lie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lie(e){var t=zie(e,"string");return $u(t)=="symbol"?t:t+""}function zie(e,t){if($u(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($u(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var FA=function(t,n,r,a,i){var l=Math.min(Math.abs(r)/2,Math.abs(a)/2),s=a>=0?1:-1,c=r>=0?1:-1,u=a>=0&&r>=0||a<0&&r<0?1:0,f;if(l>0&&i instanceof Array){for(var d=[0,0,0,0],h=0,m=4;h<m;h++)d[h]=i[h]>l?l:i[h];f="M".concat(t,",").concat(n+s*d[0]),d[0]>0&&(f+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(u,",").concat(t+c*d[0],",").concat(n)),f+="L ".concat(t+r-c*d[1],",").concat(n),d[1]>0&&(f+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(u,`,
        `).concat(t+r,",").concat(n+s*d[1])),f+="L ".concat(t+r,",").concat(n+a-s*d[2]),d[2]>0&&(f+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(u,`,
        `).concat(t+r-c*d[2],",").concat(n+a)),f+="L ".concat(t+c*d[3],",").concat(n+a),d[3]>0&&(f+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(u,`,
        `).concat(t,",").concat(n+a-s*d[3])),f+="Z"}else if(l>0&&i===+i&&i>0){var j=Math.min(l,i);f="M ".concat(t,",").concat(n+s*j,`
            A `).concat(j,",").concat(j,",0,0,").concat(u,",").concat(t+c*j,",").concat(n,`
            L `).concat(t+r-c*j,",").concat(n,`
            A `).concat(j,",").concat(j,",0,0,").concat(u,",").concat(t+r,",").concat(n+s*j,`
            L `).concat(t+r,",").concat(n+a-s*j,`
            A `).concat(j,",").concat(j,",0,0,").concat(u,",").concat(t+r-c*j,",").concat(n+a,`
            L `).concat(t+c*j,",").concat(n+a,`
            A `).concat(j,",").concat(j,",0,0,").concat(u,",").concat(t,",").concat(n+a-s*j," Z")}else f="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(a," h ").concat(-r," Z");return f},Bie=function(t,n){if(!t||!n)return!1;var r=t.x,a=t.y,i=n.x,l=n.y,s=n.width,c=n.height;if(Math.abs(s)>0&&Math.abs(c)>0){var u=Math.min(i,i+s),f=Math.max(i,i+s),d=Math.min(l,l+c),h=Math.max(l,l+c);return r>=u&&r<=f&&a>=d&&a<=h}return!1},Iie={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},w1=function(t){var n=HA(HA({},Iie),t),r=O.useRef(),a=O.useState(-1),i=Pie(a,2),l=i[0],s=i[1];O.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var x=r.current.getTotalLength();x&&s(x)}catch{}},[]);var c=n.x,u=n.y,f=n.width,d=n.height,h=n.radius,m=n.className,j=n.animationEasing,v=n.animationDuration,p=n.animationBegin,y=n.isAnimationActive,g=n.isUpdateAnimationActive;if(c!==+c||u!==+u||f!==+f||d!==+d||f===0||d===0)return null;var b=de("recharts-rectangle",m);return g?T.createElement(rr,{canBegin:l>0,from:{width:f,height:d,x:c,y:u},to:{width:f,height:d,x:c,y:u},duration:v,animationEasing:j,isActive:g},function(x){var w=x.width,S=x.height,A=x.x,N=x.y;return T.createElement(rr,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:p,duration:v,isActive:y,easing:j},T.createElement("path",Zh({},re(n,!0),{className:b,d:FA(A,N,w,S,h),ref:r})))}):T.createElement("path",Zh({},re(n,!0),{className:b,d:FA(c,u,f,d,h)}))},Uie=["points","className","baseLinePoints","connectNulls"];function co(){return co=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},co.apply(this,arguments)}function qie(e,t){if(e==null)return{};var n=Hie(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Hie(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 GA(e){return Vie(e)||Kie(e)||Gie(e)||Fie()}function Fie(){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 Gie(e,t){if(e){if(typeof e=="string")return Cx(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 Cx(e,t)}}function Kie(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Vie(e){if(Array.isArray(e))return Cx(e)}function Cx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var KA=function(t){return t&&t.x===+t.x&&t.y===+t.y},Yie=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){KA(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),KA(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},Ic=function(t,n){var r=Yie(t);n&&(r=[r.reduce(function(i,l){return[].concat(GA(i),GA(l))},[])]);var a=r.map(function(i){return i.reduce(function(l,s,c){return"".concat(l).concat(c===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return r.length===1?"".concat(a,"Z"):a},Xie=function(t,n,r){var a=Ic(t,r);return"".concat(a.slice(-1)==="Z"?a.slice(0,-1):a,"L").concat(Ic(n.reverse(),r).slice(1))},Qie=function(t){var n=t.points,r=t.className,a=t.baseLinePoints,i=t.connectNulls,l=qie(t,Uie);if(!n||!n.length)return null;var s=de("recharts-polygon",r);if(a&&a.length){var c=l.stroke&&l.stroke!=="none",u=Xie(n,a,i);return T.createElement("g",{className:s},T.createElement("path",co({},re(l,!0),{fill:u.slice(-1)==="Z"?l.fill:"none",stroke:"none",d:u})),c?T.createElement("path",co({},re(l,!0),{fill:"none",d:Ic(n,i)})):null,c?T.createElement("path",co({},re(l,!0),{fill:"none",d:Ic(a,i)})):null)}var f=Ic(n,i);return T.createElement("path",co({},re(l,!0),{fill:f.slice(-1)==="Z"?l.fill:"none",className:s,d:f}))};function _x(){return _x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_x.apply(this,arguments)}var Sf=function(t){var n=t.cx,r=t.cy,a=t.r,i=t.className,l=de("recharts-dot",i);return n===+n&&r===+r&&a===+a?O.createElement("circle",_x({},re(t,!1),vh(t),{className:l,cx:n,cy:r,r:a})):null};function Ru(e){"@babel/helpers - typeof";return Ru=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},Ru(e)}var Wie=["x","y","top","left","width","height","className"];function Tx(){return Tx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tx.apply(this,arguments)}function VA(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 Zie(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VA(Object(n),!0).forEach(function(r){Jie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jie(e,t,n){return t=ele(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ele(e){var t=tle(e,"string");return Ru(t)=="symbol"?t:t+""}function tle(e,t){if(Ru(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ru(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nle(e,t){if(e==null)return{};var n=rle(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rle(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 ale=function(t,n,r,a,i,l){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(l,",").concat(n,"h").concat(r)},ile=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,i=a===void 0?0:a,l=t.top,s=l===void 0?0:l,c=t.left,u=c===void 0?0:c,f=t.width,d=f===void 0?0:f,h=t.height,m=h===void 0?0:h,j=t.className,v=nle(t,Wie),p=Zie({x:r,y:i,top:s,left:u,width:d,height:m},v);return!Y(r)||!Y(i)||!Y(d)||!Y(m)||!Y(s)||!Y(u)?null:T.createElement("path",Tx({},re(p,!0),{className:de("recharts-cross",j),d:ale(r,i,d,m,s,u)}))},lle=Tm,ole=BM,sle=Gr;function cle(e,t){return e&&e.length?lle(e,sle(t),ole):void 0}var ule=cle;const fle=_e(ule);var dle=Tm,hle=Gr,ple=IM;function mle(e,t){return e&&e.length?dle(e,hle(t),ple):void 0}var yle=mle;const vle=_e(yle);var gle=["cx","cy","angle","ticks","axisLine"],xle=["ticks","tick","angle","tickFormatter","stroke"];function is(e){"@babel/helpers - typeof";return is=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},is(e)}function Uc(){return Uc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Uc.apply(this,arguments)}function YA(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 Di(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YA(Object(n),!0).forEach(function(r){Rm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function XA(e,t){if(e==null)return{};var n=ble(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ble(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 jle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function QA(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_$(r.key),r)}}function Sle(e,t,n){return t&&QA(e.prototype,t),n&&QA(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function wle(e,t,n){return t=Jh(t),Ole(e,C$()?Reflect.construct(t,n||[],Jh(e).constructor):t.apply(e,n))}function Ole(e,t){if(t&&(is(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ale(e)}function Ale(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function C$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(C$=function(){return!!e})()}function Jh(e){return Jh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Jh(e)}function Nle(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Px(e,t)}function Px(e,t){return Px=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Px(e,t)}function Rm(e,t,n){return t=_$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _$(e){var t=Ele(e,"string");return is(t)=="symbol"?t:t+""}function Ele(e,t){if(is(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(is(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var km=function(e){function t(){return jle(this,t),wle(this,t,arguments)}return Nle(t,e),Sle(t,[{key:"getTickValueCoord",value:function(r){var a=r.coordinate,i=this.props,l=i.angle,s=i.cx,c=i.cy;return He(s,c,a,l)}},{key:"getTickTextAnchor",value:function(){var r=this.props.orientation,a;switch(r){case"left":a="end";break;case"right":a="start";break;default:a="middle";break}return a}},{key:"getViewBox",value:function(){var r=this.props,a=r.cx,i=r.cy,l=r.angle,s=r.ticks,c=fle(s,function(f){return f.coordinate||0}),u=vle(s,function(f){return f.coordinate||0});return{cx:a,cy:i,startAngle:l,endAngle:l,innerRadius:u.coordinate||0,outerRadius:c.coordinate||0}}},{key:"renderAxisLine",value:function(){var r=this.props,a=r.cx,i=r.cy,l=r.angle,s=r.ticks,c=r.axisLine,u=XA(r,gle),f=s.reduce(function(j,v){return[Math.min(j[0],v.coordinate),Math.max(j[1],v.coordinate)]},[1/0,-1/0]),d=He(a,i,f[0],l),h=He(a,i,f[1],l),m=Di(Di(Di({},re(u,!1)),{},{fill:"none"},re(c,!1)),{},{x1:d.x,y1:d.y,x2:h.x,y2:h.y});return T.createElement("line",Uc({className:"recharts-polar-radius-axis-line"},m))}},{key:"renderTicks",value:function(){var r=this,a=this.props,i=a.ticks,l=a.tick,s=a.angle,c=a.tickFormatter,u=a.stroke,f=XA(a,xle),d=this.getTickTextAnchor(),h=re(f,!1),m=re(l,!1),j=i.map(function(v,p){var y=r.getTickValueCoord(v),g=Di(Di(Di(Di({textAnchor:d,transform:"rotate(".concat(90-s,", ").concat(y.x,", ").concat(y.y,")")},h),{},{stroke:"none",fill:u},m),{},{index:p},y),{},{payload:v});return T.createElement(me,Uc({className:de("recharts-polar-radius-axis-tick",p$(l)),key:"tick-".concat(v.coordinate)},bi(r.props,v,p)),t.renderTickItem(l,g,c?c(v.value,p):v.value))});return T.createElement(me,{className:"recharts-polar-radius-axis-ticks"},j)}},{key:"render",value:function(){var r=this.props,a=r.ticks,i=r.axisLine,l=r.tick;return!a||!a.length?null:T.createElement(me,{className:de("recharts-polar-radius-axis",this.props.className)},i&&this.renderAxisLine(),l&&this.renderTicks(),$t.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(r,a,i){var l;return T.isValidElement(r)?l=T.cloneElement(r,a):se(r)?l=r(a):l=T.createElement(Sl,Uc({},a,{className:"recharts-polar-radius-axis-tick-value"}),i),l}}])}(O.PureComponent);Rm(km,"displayName","PolarRadiusAxis");Rm(km,"axisType","radiusAxis");Rm(km,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function ls(e){"@babel/helpers - typeof";return ls=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},ls(e)}function Gi(){return Gi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gi.apply(this,arguments)}function WA(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 Li(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WA(Object(n),!0).forEach(function(r){Dm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZA(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,P$(r.key),r)}}function _le(e,t,n){return t&&ZA(e.prototype,t),n&&ZA(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Tle(e,t,n){return t=ep(t),Ple(e,T$()?Reflect.construct(t,n||[],ep(e).constructor):t.apply(e,n))}function Ple(e,t){if(t&&(ls(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mle(e)}function Mle(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(T$=function(){return!!e})()}function ep(e){return ep=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ep(e)}function $le(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mx(e,t)}function Mx(e,t){return Mx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Mx(e,t)}function Dm(e,t,n){return t=P$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P$(e){var t=Rle(e,"string");return ls(t)=="symbol"?t:t+""}function Rle(e,t){if(ls(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ls(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var kle=Math.PI/180,JA=1e-5,Lm=function(e){function t(){return Cle(this,t),Tle(this,t,arguments)}return $le(t,e),_le(t,[{key:"getTickLineCoord",value:function(r){var a=this.props,i=a.cx,l=a.cy,s=a.radius,c=a.orientation,u=a.tickSize,f=u||8,d=He(i,l,s,r.coordinate),h=He(i,l,s+(c==="inner"?-1:1)*f,r.coordinate);return{x1:d.x,y1:d.y,x2:h.x,y2:h.y}}},{key:"getTickTextAnchor",value:function(r){var a=this.props.orientation,i=Math.cos(-r.coordinate*kle),l;return i>JA?l=a==="outer"?"start":"end":i<-JA?l=a==="outer"?"end":"start":l="middle",l}},{key:"renderAxisLine",value:function(){var r=this.props,a=r.cx,i=r.cy,l=r.radius,s=r.axisLine,c=r.axisLineType,u=Li(Li({},re(this.props,!1)),{},{fill:"none"},re(s,!1));if(c==="circle")return T.createElement(Sf,Gi({className:"recharts-polar-angle-axis-line"},u,{cx:a,cy:i,r:l}));var f=this.props.ticks,d=f.map(function(h){return He(a,i,l,h.coordinate)});return T.createElement(Qie,Gi({className:"recharts-polar-angle-axis-line"},u,{points:d}))}},{key:"renderTicks",value:function(){var r=this,a=this.props,i=a.ticks,l=a.tick,s=a.tickLine,c=a.tickFormatter,u=a.stroke,f=re(this.props,!1),d=re(l,!1),h=Li(Li({},f),{},{fill:"none"},re(s,!1)),m=i.map(function(j,v){var p=r.getTickLineCoord(j),y=r.getTickTextAnchor(j),g=Li(Li(Li({textAnchor:y},f),{},{stroke:"none",fill:u},d),{},{index:v,payload:j,x:p.x2,y:p.y2});return T.createElement(me,Gi({className:de("recharts-polar-angle-axis-tick",p$(l)),key:"tick-".concat(j.coordinate)},bi(r.props,j,v)),s&&T.createElement("line",Gi({className:"recharts-polar-angle-axis-tick-line"},h,p)),l&&t.renderTickItem(l,g,c?c(j.value,v):j.value))});return T.createElement(me,{className:"recharts-polar-angle-axis-ticks"},m)}},{key:"render",value:function(){var r=this.props,a=r.ticks,i=r.radius,l=r.axisLine;return i<=0||!a||!a.length?null:T.createElement(me,{className:de("recharts-polar-angle-axis",this.props.className)},l&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,a,i){var l;return T.isValidElement(r)?l=T.cloneElement(r,a):se(r)?l=r(a):l=T.createElement(Sl,Gi({},a,{className:"recharts-polar-angle-axis-tick-value"}),i),l}}])}(O.PureComponent);Dm(Lm,"displayName","PolarAngleAxis");Dm(Lm,"axisType","angleAxis");Dm(Lm,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var Dle=DP,Lle=Dle(Object.getPrototypeOf,Object),zle=Lle,Ble=Aa,Ile=zle,Ule=Na,qle="[object Object]",Hle=Function.prototype,Fle=Object.prototype,M$=Hle.toString,Gle=Fle.hasOwnProperty,Kle=M$.call(Object);function Vle(e){if(!Ule(e)||Ble(e)!=qle)return!1;var t=Ile(e);if(t===null)return!0;var n=Gle.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&M$.call(n)==Kle}var Yle=Vle;const Xle=_e(Yle);var Qle=Aa,Wle=Na,Zle="[object Boolean]";function Jle(e){return e===!0||e===!1||Wle(e)&&Qle(e)==Zle}var eoe=Jle;const toe=_e(eoe);function ku(e){"@babel/helpers - typeof";return ku=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},ku(e)}function tp(){return tp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tp.apply(this,arguments)}function noe(e,t){return loe(e)||ioe(e,t)||aoe(e,t)||roe()}function roe(){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 aoe(e,t){if(e){if(typeof e=="string")return eN(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 eN(e,t)}}function eN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ioe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,s=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return s}}function loe(e){if(Array.isArray(e))return e}function tN(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 nN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tN(Object(n),!0).forEach(function(r){ooe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ooe(e,t,n){return t=soe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function soe(e){var t=coe(e,"string");return ku(t)=="symbol"?t:t+""}function coe(e,t){if(ku(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ku(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var rN=function(t,n,r,a,i){var l=r-a,s;return s="M ".concat(t,",").concat(n),s+="L ".concat(t+r,",").concat(n),s+="L ".concat(t+r-l/2,",").concat(n+i),s+="L ".concat(t+r-l/2-a,",").concat(n+i),s+="L ".concat(t,",").concat(n," Z"),s},uoe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},foe=function(t){var n=nN(nN({},uoe),t),r=O.useRef(),a=O.useState(-1),i=noe(a,2),l=i[0],s=i[1];O.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var b=r.current.getTotalLength();b&&s(b)}catch{}},[]);var c=n.x,u=n.y,f=n.upperWidth,d=n.lowerWidth,h=n.height,m=n.className,j=n.animationEasing,v=n.animationDuration,p=n.animationBegin,y=n.isUpdateAnimationActive;if(c!==+c||u!==+u||f!==+f||d!==+d||h!==+h||f===0&&d===0||h===0)return null;var g=de("recharts-trapezoid",m);return y?T.createElement(rr,{canBegin:l>0,from:{upperWidth:0,lowerWidth:0,height:h,x:c,y:u},to:{upperWidth:f,lowerWidth:d,height:h,x:c,y:u},duration:v,animationEasing:j,isActive:y},function(b){var x=b.upperWidth,w=b.lowerWidth,S=b.height,A=b.x,N=b.y;return T.createElement(rr,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:p,duration:v,easing:j},T.createElement("path",tp({},re(n,!0),{className:g,d:rN(A,N,x,w,S),ref:r})))}):T.createElement("g",null,T.createElement("path",tp({},re(n,!0),{className:g,d:rN(c,u,f,d,h)})))},doe=["option","shapeType","propTransformer","activeClassName","isActive"];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 hoe(e,t){if(e==null)return{};var n=poe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function poe(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 aN(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 np(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aN(Object(n),!0).forEach(function(r){moe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function moe(e,t,n){return t=yoe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yoe(e){var t=voe(e,"string");return Du(t)=="symbol"?t:t+""}function voe(e,t){if(Du(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Du(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function goe(e,t){return np(np({},t),e)}function xoe(e,t){return e==="symbols"}function iN(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return T.createElement(w1,n);case"trapezoid":return T.createElement(foe,n);case"sector":return T.createElement(v$,n);case"symbols":if(xoe(t))return T.createElement(bm,n);break;default:return null}}function boe(e){return O.isValidElement(e)?e.props:e}function rp(e){var t=e.option,n=e.shapeType,r=e.propTransformer,a=r===void 0?goe:r,i=e.activeClassName,l=i===void 0?"recharts-active-shape":i,s=e.isActive,c=hoe(e,doe),u;if(O.isValidElement(t))u=O.cloneElement(t,np(np({},c),boe(t)));else if(se(t))u=t(c);else if(Xle(t)&&!toe(t)){var f=a(t,c);u=T.createElement(iN,{shapeType:n,elementProps:f})}else{var d=c;u=T.createElement(iN,{shapeType:n,elementProps:d})}return s?T.createElement(me,{className:l},u):u}function zm(e,t){return t!=null&&"trapezoids"in e.props}function Bm(e,t){return t!=null&&"sectors"in e.props}function Lu(e,t){return t!=null&&"points"in e.props}function joe(e,t){var n,r,a=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,i=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return a&&i}function Soe(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function woe(e,t){var n=e.x===t.x,r=e.y===t.y,a=e.z===t.z;return n&&r&&a}function Ooe(e,t){var n;return zm(e,t)?n=joe:Bm(e,t)?n=Soe:Lu(e,t)&&(n=woe),n}function Aoe(e,t){var n;return zm(e,t)?n="trapezoids":Bm(e,t)?n="sectors":Lu(e,t)&&(n="points"),n}function Noe(e,t){if(zm(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(Bm(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}return Lu(e,t)?t.payload:{}}function Eoe(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,a=Aoe(n,t),i=Noe(n,t),l=r.filter(function(c,u){var f=ji(i,c),d=n.props[a].filter(function(j){var v=Ooe(n,t);return v(j,t)}),h=n.props[a].indexOf(d[d.length-1]),m=u===h;return f&&m}),s=r.indexOf(l[l.length-1]);return s}var kd;function os(e){"@babel/helpers - typeof";return os=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},os(e)}function uo(){return uo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uo.apply(this,arguments)}function lN(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 Ie(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lN(Object(n),!0).forEach(function(r){Xn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Coe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oN(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,R$(r.key),r)}}function _oe(e,t,n){return t&&oN(e.prototype,t),n&&oN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Toe(e,t,n){return t=ap(t),Poe(e,$$()?Reflect.construct(t,n||[],ap(e).constructor):t.apply(e,n))}function Poe(e,t){if(t&&(os(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Moe(e)}function Moe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($$=function(){return!!e})()}function ap(e){return ap=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ap(e)}function $oe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$x(e,t)}function $x(e,t){return $x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},$x(e,t)}function Xn(e,t,n){return t=R$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R$(e){var t=Roe(e,"string");return os(t)=="symbol"?t:t+""}function Roe(e,t){if(os(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(os(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var _a=function(e){function t(n){var r;return Coe(this,t),r=Toe(this,t,[n]),Xn(r,"pieRef",null),Xn(r,"sectorRefs",[]),Xn(r,"id",Ni("recharts-pie-")),Xn(r,"handleAnimationEnd",function(){var a=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),se(a)&&a()}),Xn(r,"handleAnimationStart",function(){var a=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),se(a)&&a()}),r.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},r}return $oe(t,e),_oe(t,[{key:"isActiveIndex",value:function(r){var a=this.props.activeIndex;return Array.isArray(a)?a.indexOf(r)!==-1:r===a}},{key:"hasActiveIndex",value:function(){var r=this.props.activeIndex;return Array.isArray(r)?r.length!==0:r||r===0}},{key:"renderLabels",value:function(r){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var i=this.props,l=i.label,s=i.labelLine,c=i.dataKey,u=i.valueKey,f=re(this.props,!1),d=re(l,!1),h=re(s,!1),m=l&&l.offsetRadius||20,j=r.map(function(v,p){var y=(v.startAngle+v.endAngle)/2,g=He(v.cx,v.cy,v.outerRadius+m,y),b=Ie(Ie(Ie(Ie({},f),v),{},{stroke:"none"},d),{},{index:p,textAnchor:t.getTextAnchor(g.x,v.cx)},g),x=Ie(Ie(Ie(Ie({},f),v),{},{fill:"none",stroke:v.fill},h),{},{index:p,points:[He(v.cx,v.cy,v.outerRadius,y),g]}),w=c;return le(c)&&le(u)?w="value":le(c)&&(w=u),T.createElement(me,{key:"label-".concat(v.startAngle,"-").concat(v.endAngle,"-").concat(v.midAngle,"-").concat(p)},s&&t.renderLabelLineItem(s,x,"line"),t.renderLabelItem(l,b,Qe(v,w)))});return T.createElement(me,{className:"recharts-pie-labels"},j)}},{key:"renderSectorsStatically",value:function(r){var a=this,i=this.props,l=i.activeShape,s=i.blendStroke,c=i.inactiveShape;return r.map(function(u,f){if((u==null?void 0:u.startAngle)===0&&(u==null?void 0:u.endAngle)===0&&r.length!==1)return null;var d=a.isActiveIndex(f),h=c&&a.hasActiveIndex()?c:null,m=d?l:h,j=Ie(Ie({},u),{},{stroke:s?u.fill:u.stroke,tabIndex:-1});return T.createElement(me,uo({ref:function(p){p&&!a.sectorRefs.includes(p)&&a.sectorRefs.push(p)},tabIndex:-1,className:"recharts-pie-sector"},bi(a.props,u,f),{key:"sector-".concat(u==null?void 0:u.startAngle,"-").concat(u==null?void 0:u.endAngle,"-").concat(u.midAngle,"-").concat(f)}),T.createElement(rp,uo({option:m,isActive:d,shapeType:"sector"},j)))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,a=this.props,i=a.sectors,l=a.isAnimationActive,s=a.animationBegin,c=a.animationDuration,u=a.animationEasing,f=a.animationId,d=this.state,h=d.prevSectors,m=d.prevIsAnimationActive;return T.createElement(rr,{begin:s,duration:c,isActive:l,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(f,"-").concat(m),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(j){var v=j.t,p=[],y=i&&i[0],g=y.startAngle;return i.forEach(function(b,x){var w=h&&h[x],S=x>0?Pn(b,"paddingAngle",0):0;if(w){var A=nt(w.endAngle-w.startAngle,b.endAngle-b.startAngle),N=Ie(Ie({},b),{},{startAngle:g+S,endAngle:g+A(v)+S});p.push(N),g=N.endAngle}else{var C=b.endAngle,M=b.startAngle,R=nt(0,C-M),P=R(v),B=Ie(Ie({},b),{},{startAngle:g+S,endAngle:g+P+S});p.push(B),g=B.endAngle}}),T.createElement(me,null,r.renderSectorsStatically(p))})}},{key:"attachKeyboardHandlers",value:function(r){var a=this;r.onkeydown=function(i){if(!i.altKey)switch(i.key){case"ArrowLeft":{var l=++a.state.sectorToFocus%a.sectorRefs.length;a.sectorRefs[l].focus(),a.setState({sectorToFocus:l});break}case"ArrowRight":{var s=--a.state.sectorToFocus<0?a.sectorRefs.length-1:a.state.sectorToFocus%a.sectorRefs.length;a.sectorRefs[s].focus(),a.setState({sectorToFocus:s});break}case"Escape":{a.sectorRefs[a.state.sectorToFocus].blur(),a.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,a=r.sectors,i=r.isAnimationActive,l=this.state.prevSectors;return i&&a&&a.length&&(!l||!ji(l,a))?this.renderSectorsWithAnimation():this.renderSectorsStatically(a)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,a=this.props,i=a.hide,l=a.sectors,s=a.className,c=a.label,u=a.cx,f=a.cy,d=a.innerRadius,h=a.outerRadius,m=a.isAnimationActive,j=this.state.isAnimationFinished;if(i||!l||!l.length||!Y(u)||!Y(f)||!Y(d)||!Y(h))return null;var v=de("recharts-pie",s);return T.createElement(me,{tabIndex:this.props.rootTabIndex,className:v,ref:function(y){r.pieRef=y}},this.renderSectors(),c&&this.renderLabels(l),$t.renderCallByParent(this.props,null,!1),(!m||j)&&vr.renderCallByParent(this.props,l,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return a.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:a.curSectors,isAnimationFinished:!0}:r.sectors!==a.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,a){return r>a?"start":r<a?"end":"middle"}},{key:"renderLabelLineItem",value:function(r,a,i){if(T.isValidElement(r))return T.cloneElement(r,a);if(se(r))return r(a);var l=de("recharts-pie-label-line",typeof r!="boolean"?r.className:"");return T.createElement(hi,uo({},a,{key:i,type:"linear",className:l}))}},{key:"renderLabelItem",value:function(r,a,i){if(T.isValidElement(r))return T.cloneElement(r,a);var l=i;if(se(r)&&(l=r(a),T.isValidElement(l)))return l;var s=de("recharts-pie-label-text",typeof r!="boolean"&&!se(r)?r.className:"");return T.createElement(Sl,uo({},a,{alignmentBaseline:"middle",className:s}),l)}}])}(O.PureComponent);kd=_a;Xn(_a,"displayName","Pie");Xn(_a,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!Ea.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});Xn(_a,"parseDeltaAngle",function(e,t){var n=en(t-e),r=Math.min(Math.abs(t-e),360);return n*r});Xn(_a,"getRealPieData",function(e){var t=e.data,n=e.children,r=re(e,!1),a=an(n,vf);return t&&t.length?t.map(function(i,l){return Ie(Ie(Ie({payload:i},r),i),a&&a[l]&&a[l].props)}):a&&a.length?a.map(function(i){return Ie(Ie({},r),i.props)}):[]});Xn(_a,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,a=t.width,i=t.height,l=h$(a,i),s=r+tn(e.cx,a,a/2),c=n+tn(e.cy,i,i/2),u=tn(e.innerRadius,l,0),f=tn(e.outerRadius,l,l*.8),d=e.maxRadius||Math.sqrt(a*a+i*i)/2;return{cx:s,cy:c,innerRadius:u,outerRadius:f,maxRadius:d}});Xn(_a,"getComposedData",function(e){var t=e.item,n=e.offset,r=t.type.defaultProps!==void 0?Ie(Ie({},t.type.defaultProps),t.props):t.props,a=kd.getRealPieData(r);if(!a||!a.length)return null;var i=r.cornerRadius,l=r.startAngle,s=r.endAngle,c=r.paddingAngle,u=r.dataKey,f=r.nameKey,d=r.valueKey,h=r.tooltipType,m=Math.abs(r.minAngle),j=kd.parseCoordinateOfPie(r,n),v=kd.parseDeltaAngle(l,s),p=Math.abs(v),y=u;le(u)&&le(d)?(yr(!1,`Use "dataKey" to specify the value of pie,
      the props "valueKey" will be deprecated in 1.1.0`),y="value"):le(u)&&(yr(!1,`Use "dataKey" to specify the value of pie,
      the props "valueKey" will be deprecated in 1.1.0`),y=d);var g=a.filter(function(N){return Qe(N,y,0)!==0}).length,b=(p>=360?g:g-1)*c,x=p-g*m-b,w=a.reduce(function(N,C){var M=Qe(C,y,0);return N+(Y(M)?M:0)},0),S;if(w>0){var A;S=a.map(function(N,C){var M=Qe(N,y,0),R=Qe(N,f,C),P=(Y(M)?M:0)/w,B;C?B=A.endAngle+en(v)*c*(M!==0?1:0):B=l;var _=B+en(v)*((M!==0?m:0)+P*x),E=(B+_)/2,$=(j.innerRadius+j.outerRadius)/2,L=[{name:R,value:M,payload:N,dataKey:y,type:h}],q=He(j.cx,j.cy,$,E);return A=Ie(Ie(Ie({percent:P,cornerRadius:i,name:R,tooltipPayload:L,midAngle:E,middleRadius:$,tooltipPosition:q},N),j),{},{value:Qe(N,y),startAngle:B,endAngle:_,payload:N,paddingAngle:en(v)*c}),A})}return Ie(Ie({},j),{},{sectors:S,data:a})});var koe=Math.ceil,Doe=Math.max;function Loe(e,t,n,r){for(var a=-1,i=Doe(koe((t-e)/(n||1)),0),l=Array(i);i--;)l[r?i:++a]=e,e+=n;return l}var zoe=Loe,Boe=tM,sN=1/0,Ioe=17976931348623157e292;function Uoe(e){if(!e)return e===0?e:0;if(e=Boe(e),e===sN||e===-sN){var t=e<0?-1:1;return t*Ioe}return e===e?e:0}var k$=Uoe,qoe=zoe,Hoe=wm,uv=k$;function Foe(e){return function(t,n,r){return r&&typeof r!="number"&&Hoe(t,n,r)&&(n=r=void 0),t=uv(t),n===void 0?(n=t,t=0):n=uv(n),r=r===void 0?t<n?1:-1:uv(r),qoe(t,n,r,e)}}var Goe=Foe,Koe=Goe,Voe=Koe(),Yoe=Voe;const ip=_e(Yoe);function zu(e){"@babel/helpers - typeof";return zu=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},zu(e)}function cN(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 uN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cN(Object(n),!0).forEach(function(r){D$(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function D$(e,t,n){return t=Xoe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xoe(e){var t=Qoe(e,"string");return zu(t)=="symbol"?t:t+""}function Qoe(e,t){if(zu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Woe=["Webkit","Moz","O","ms"],Zoe=function(t,n){var r=t.replace(/(\w)/,function(i){return i.toUpperCase()}),a=Woe.reduce(function(i,l){return uN(uN({},i),{},D$({},l+r,n))},{});return a[t]=n,a};function ss(e){"@babel/helpers - typeof";return ss=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},ss(e)}function lp(){return lp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lp.apply(this,arguments)}function fN(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 fv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fN(Object(n),!0).forEach(function(r){xn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Joe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dN(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,z$(r.key),r)}}function ese(e,t,n){return t&&dN(e.prototype,t),n&&dN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function tse(e,t,n){return t=op(t),nse(e,L$()?Reflect.construct(t,n||[],op(e).constructor):t.apply(e,n))}function nse(e,t){if(t&&(ss(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rse(e)}function rse(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function L$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(L$=function(){return!!e})()}function op(e){return op=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},op(e)}function ase(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rx(e,t)}function Rx(e,t){return Rx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Rx(e,t)}function xn(e,t,n){return t=z$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z$(e){var t=ise(e,"string");return ss(t)=="symbol"?t:t+""}function ise(e,t){if(ss(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ss(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var lse=function(t){var n=t.data,r=t.startIndex,a=t.endIndex,i=t.x,l=t.width,s=t.travellerWidth;if(!n||!n.length)return{};var c=n.length,u=Lc().domain(ip(0,c)).range([i,i+l-s]),f=u.domain().map(function(d){return u(d)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(r),endX:u(a),scale:u,scaleValues:f}},hN=function(t){return t.changedTouches&&!!t.changedTouches.length},cs=function(e){function t(n){var r;return Joe(this,t),r=tse(this,t,[n]),xn(r,"handleDrag",function(a){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(a):r.state.isSlideMoving&&r.handleSlideDrag(a)}),xn(r,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&r.handleDrag(a.changedTouches[0])}),xn(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=r.props,i=a.endIndex,l=a.onDragEnd,s=a.startIndex;l==null||l({endIndex:i,startIndex:s})}),r.detachDragEndListener()}),xn(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),xn(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),xn(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),xn(r,"handleSlideDragStart",function(a){var i=hN(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 ase(t,e),ese(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,s=this.props,c=s.gap,u=s.data,f=u.length-1,d=Math.min(a,i),h=Math.max(a,i),m=t.getIndexInRange(l,d),j=t.getIndexInRange(l,h);return{startIndex:m-m%c,endIndex:j===f?f:j-j%c}}},{key:"getTextOfTick",value:function(r){var a=this.props,i=a.data,l=a.tickFormatter,s=a.dataKey,c=Qe(i[r],s,r);return se(l)?l(c,r):c}},{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,s=a.endX,c=this.props,u=c.x,f=c.width,d=c.travellerWidth,h=c.startIndex,m=c.endIndex,j=c.onChange,v=r.pageX-i;v>0?v=Math.min(v,u+f-d-s,u+f-d-l):v<0&&(v=Math.max(v,u-l,u-s));var p=this.getIndex({startX:l+v,endX:s+v});(p.startIndex!==h||p.endIndex!==m)&&j&&j(p),this.setState({startX:l+v,endX:s+v,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,a){var i=hN(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,s=a.endX,c=a.startX,u=this.state[l],f=this.props,d=f.x,h=f.width,m=f.travellerWidth,j=f.onChange,v=f.gap,p=f.data,y={startX:this.state.startX,endX:this.state.endX},g=r.pageX-i;g>0?g=Math.min(g,d+h-m-u):g<0&&(g=Math.max(g,d-u)),y[l]=u+g;var b=this.getIndex(y),x=b.startIndex,w=b.endIndex,S=function(){var N=p.length-1;return l==="startX"&&(s>c?x%v===0:w%v===0)||s<c&&w===N||l==="endX"&&(s>c?w%v===0:x%v===0)||s>c&&w===N};this.setState(xn(xn({},l,u+g),"brushMoveStartX",r.pageX),function(){j&&S()&&j(b)})}},{key:"handleTravellerMoveKeyboard",value:function(r,a){var i=this,l=this.state,s=l.scaleValues,c=l.startX,u=l.endX,f=this.state[a],d=s.indexOf(f);if(d!==-1){var h=d+r;if(!(h===-1||h>=s.length)){var m=s[h];a==="startX"&&m>=u||a==="endX"&&m<=c||this.setState(xn({},a,m),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,s=r.height,c=r.fill,u=r.stroke;return T.createElement("rect",{stroke:u,fill:c,x:a,y:i,width:l,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,a=r.x,i=r.y,l=r.width,s=r.height,c=r.data,u=r.children,f=r.padding,d=O.Children.only(u);return d?T.cloneElement(d,{x:a,y:i,width:l,height:s,margin:f,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(r,a){var i,l,s=this,c=this.props,u=c.y,f=c.travellerWidth,d=c.height,h=c.traveller,m=c.ariaLabel,j=c.data,v=c.startIndex,p=c.endIndex,y=Math.max(r,this.props.x),g=fv(fv({},re(this.props,!1)),{},{x:y,y:u,width:f,height:d}),b=m||"Min value: ".concat((i=j[v])===null||i===void 0?void 0:i.name,", Max value: ").concat((l=j[p])===null||l===void 0?void 0:l.name);return T.createElement(me,{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(w){["ArrowLeft","ArrowRight"].includes(w.key)&&(w.preventDefault(),w.stopPropagation(),s.handleTravellerMoveKeyboard(w.key==="ArrowRight"?1:-1,a))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,g))}},{key:"renderSlide",value:function(r,a){var i=this.props,l=i.y,s=i.height,c=i.stroke,u=i.travellerWidth,f=Math.min(r,a)+u,d=Math.max(Math.abs(a-r)-u,0);return T.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:f,y:l,width:d,height:s})}},{key:"renderText",value:function(){var r=this.props,a=r.startIndex,i=r.endIndex,l=r.y,s=r.height,c=r.travellerWidth,u=r.stroke,f=this.state,d=f.startX,h=f.endX,m=5,j={pointerEvents:"none",fill:u};return T.createElement(me,{className:"recharts-brush-texts"},T.createElement(Sl,lp({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,h)-m,y:l+s/2},j),this.getTextOfTick(a)),T.createElement(Sl,lp({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,h)+c+m,y:l+s/2},j),this.getTextOfTick(i)))}},{key:"render",value:function(){var r=this.props,a=r.data,i=r.className,l=r.children,s=r.x,c=r.y,u=r.width,f=r.height,d=r.alwaysShowText,h=this.state,m=h.startX,j=h.endX,v=h.isTextActive,p=h.isSlideMoving,y=h.isTravellerMoving,g=h.isTravellerFocused;if(!a||!a.length||!Y(s)||!Y(c)||!Y(u)||!Y(f)||u<=0||f<=0)return null;var b=de("recharts-brush",i),x=T.Children.count(l)===1,w=Zoe("userSelect","none");return T.createElement(me,{className:b,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:w},this.renderBackground(),x&&this.renderPanorama(),this.renderSlide(m,j),this.renderTravellerLayer(m,"startX"),this.renderTravellerLayer(j,"endX"),(v||p||y||g||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var a=r.x,i=r.y,l=r.width,s=r.height,c=r.stroke,u=Math.floor(i+s/2)-1;return T.createElement(T.Fragment,null,T.createElement("rect",{x:a,y:i,width:l,height:s,fill:c,stroke:"none"}),T.createElement("line",{x1:a+1,y1:u,x2:a+l-1,y2:u,fill:"none",stroke:"#fff"}),T.createElement("line",{x1:a+1,y1:u+2,x2:a+l-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,a){var i;return T.isValidElement(r)?i=T.cloneElement(r,a):se(r)?i=r(a):i=t.renderDefaultTraveller(a),i}},{key:"getDerivedStateFromProps",value:function(r,a){var i=r.data,l=r.width,s=r.x,c=r.travellerWidth,u=r.updateId,f=r.startIndex,d=r.endIndex;if(i!==a.prevData||u!==a.prevUpdateId)return fv({prevData:i,prevTravellerWidth:c,prevUpdateId:u,prevX:s,prevWidth:l},i&&i.length?lse({data:i,width:l,x:s,travellerWidth:c,startIndex:f,endIndex:d}):{scale:null,scaleValues:null});if(a.scale&&(l!==a.prevWidth||s!==a.prevX||c!==a.prevTravellerWidth)){a.scale.range([s,s+l-c]);var h=a.scale.domain().map(function(m){return a.scale(m)});return{prevData:i,prevTravellerWidth:c,prevUpdateId:u,prevX:s,prevWidth:l,startX:a.scale(r.startIndex),endX:a.scale(r.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(r,a){for(var i=r.length,l=0,s=i-1;s-l>1;){var c=Math.floor((l+s)/2);r[c]>a?s=c:l=c}return a>=r[s]?s:l}}])}(O.PureComponent);xn(cs,"displayName","Brush");xn(cs,"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 ose=X0;function sse(e,t){var n;return ose(e,function(r,a,i){return n=t(r,a,i),!n}),!!n}var cse=sse,use=CP,fse=Gr,dse=cse,hse=vn,pse=wm;function mse(e,t,n){var r=hse(e)?use:dse;return n&&pse(e,t,n)&&(t=void 0),r(e,fse(t))}var yse=mse;const vse=_e(yse);var Br=function(t,n){var r=t.alwaysShow,a=t.ifOverflow;return r&&(a="extendDomain"),a===n},pN=QP;function gse(e,t,n){t=="__proto__"&&pN?pN(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var xse=gse,bse=xse,jse=YP,Sse=Gr;function wse(e,t){var n={};return t=Sse(t),jse(e,function(r,a,i){bse(n,a,t(r,a,i))}),n}var Ose=wse;const Ase=_e(Ose);function Nse(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}var Ese=Nse,Cse=X0;function _se(e,t){var n=!0;return Cse(e,function(r,a,i){return n=!!t(r,a,i),n}),n}var Tse=_se,Pse=Ese,Mse=Tse,$se=Gr,Rse=vn,kse=wm;function Dse(e,t,n){var r=Rse(e)?Pse:Mse;return n&&kse(e,t,n)&&(t=void 0),r(e,$se(t))}var Lse=Dse;const B$=_e(Lse);var zse=["x","y"];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)}function kx(){return kx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kx.apply(this,arguments)}function mN(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 mc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mN(Object(n),!0).forEach(function(r){Bse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bse(e,t,n){return t=Ise(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ise(e){var t=Use(e,"string");return Bu(t)=="symbol"?t:t+""}function Use(e,t){if(Bu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Bu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qse(e,t){if(e==null)return{};var n=Hse(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Hse(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 Fse(e,t){var n=e.x,r=e.y,a=qse(e,zse),i="".concat(n),l=parseInt(i,10),s="".concat(r),c=parseInt(s,10),u="".concat(t.height||a.height),f=parseInt(u,10),d="".concat(t.width||a.width),h=parseInt(d,10);return mc(mc(mc(mc(mc({},t),a),l?{x:l}:{}),c?{y:c}:{}),{},{height:f,width:h,name:t.name,radius:t.radius})}function yN(e){return T.createElement(rp,kx({shapeType:"rectangle",propTransformer:Fse,activeClassName:"recharts-active-bar"},e))}var Gse=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)||d9(r);return i?t(r,a):(i||Ol(),n)}},Kse=["value","background"],I$;function us(e){"@babel/helpers - typeof";return us=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},us(e)}function Vse(e,t){if(e==null)return{};var n=Yse(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Yse(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 sp(){return sp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sp.apply(this,arguments)}function vN(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 vt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vN(Object(n),!0).forEach(function(r){ti(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gN(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,q$(r.key),r)}}function Qse(e,t,n){return t&&gN(e.prototype,t),n&&gN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Wse(e,t,n){return t=cp(t),Zse(e,U$()?Reflect.construct(t,n||[],cp(e).constructor):t.apply(e,n))}function Zse(e,t){if(t&&(us(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jse(e)}function Jse(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function U$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(U$=function(){return!!e})()}function cp(e){return cp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cp(e)}function ece(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dx(e,t)}function Dx(e,t){return Dx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Dx(e,t)}function ti(e,t,n){return t=q$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q$(e){var t=tce(e,"string");return us(t)=="symbol"?t:t+""}function tce(e,t){if(us(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(us(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ti=function(e){function t(){var n;Xse(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=Wse(this,t,[].concat(a)),ti(n,"state",{isAnimationFinished:!1}),ti(n,"id",Ni("recharts-bar-")),ti(n,"handleAnimationEnd",function(){var l=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),l&&l()}),ti(n,"handleAnimationStart",function(){var l=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),l&&l()}),n}return ece(t,e),Qse(t,[{key:"renderRectanglesStatically",value:function(r){var a=this,i=this.props,l=i.shape,s=i.dataKey,c=i.activeIndex,u=i.activeBar,f=re(this.props,!1);return r&&r.map(function(d,h){var m=h===c,j=m?u:l,v=vt(vt(vt({},f),d),{},{isActive:m,option:j,index:h,dataKey:s,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return T.createElement(me,sp({className:"recharts-bar-rectangle"},bi(a.props,d,h),{key:"rectangle-".concat(d==null?void 0:d.x,"-").concat(d==null?void 0:d.y,"-").concat(d==null?void 0:d.value,"-").concat(h)}),T.createElement(yN,v))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,a=this.props,i=a.data,l=a.layout,s=a.isAnimationActive,c=a.animationBegin,u=a.animationDuration,f=a.animationEasing,d=a.animationId,h=this.state.prevData;return T.createElement(rr,{begin:c,duration:u,isActive:s,easing:f,from:{t:0},to:{t:1},key:"bar-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(m){var j=m.t,v=i.map(function(p,y){var g=h&&h[y];if(g){var b=nt(g.x,p.x),x=nt(g.y,p.y),w=nt(g.width,p.width),S=nt(g.height,p.height);return vt(vt({},p),{},{x:b(j),y:x(j),width:w(j),height:S(j)})}if(l==="horizontal"){var A=nt(0,p.height),N=A(j);return vt(vt({},p),{},{y:p.y+p.height-N,height:N})}var C=nt(0,p.width),M=C(j);return vt(vt({},p),{},{width:M})});return T.createElement(me,null,r.renderRectanglesStatically(v))})}},{key:"renderRectangles",value:function(){var r=this.props,a=r.data,i=r.isAnimationActive,l=this.state.prevData;return i&&a&&a.length&&(!l||!ji(l,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var r=this,a=this.props,i=a.data,l=a.dataKey,s=a.activeIndex,c=re(this.props.background,!1);return i.map(function(u,f){u.value;var d=u.background,h=Vse(u,Kse);if(!d)return null;var m=vt(vt(vt(vt(vt({},h),{},{fill:"#eee"},d),c),bi(r.props,u,f)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:l,index:f,className:"recharts-bar-background-rectangle"});return T.createElement(yN,sp({key:"background-bar-".concat(f),option:r.props.background,isActive:f===s},m))})}},{key:"renderErrorBar",value:function(r,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,l=i.data,s=i.xAxis,c=i.yAxis,u=i.layout,f=i.children,d=an(f,Xs);if(!d)return null;var h=u==="vertical"?l[0].height/2:l[0].width/2,m=function(p,y){var g=Array.isArray(p.value)?p.value[1]:p.value;return{x:p.x,y:p.y,value:g,errorVal:Qe(p,y)}},j={clipPath:r?"url(#clipPath-".concat(a,")"):null};return T.createElement(me,j,d.map(function(v){return T.cloneElement(v,{key:"error-bar-".concat(a,"-").concat(v.props.dataKey),data:l,xAxis:s,yAxis:c,layout:u,offset:h,dataPointFormatter:m})}))}},{key:"render",value:function(){var r=this.props,a=r.hide,i=r.data,l=r.className,s=r.xAxis,c=r.yAxis,u=r.left,f=r.top,d=r.width,h=r.height,m=r.isAnimationActive,j=r.background,v=r.id;if(a||!i||!i.length)return null;var p=this.state.isAnimationFinished,y=de("recharts-bar",l),g=s&&s.allowDataOverflow,b=c&&c.allowDataOverflow,x=g||b,w=le(v)?this.id:v;return T.createElement(me,{className:y},g||b?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(w)},T.createElement("rect",{x:g?u:u-d/2,y:b?f:f-h/2,width:g?d:d*2,height:b?h:h*2}))):null,T.createElement(me,{className:"recharts-bar-rectangles",clipPath:x?"url(#clipPath-".concat(w,")"):null},j?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(x,w),(!m||p)&&vr.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:a.curData}:r.data!==a.curData?{curData:r.data}:null}}])}(O.PureComponent);I$=Ti;ti(Ti,"displayName","Bar");ti(Ti,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Ea.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});ti(Ti,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,a=e.bandSize,i=e.xAxis,l=e.yAxis,s=e.xAxisTicks,c=e.yAxisTicks,u=e.stackedData,f=e.dataStartIndex,d=e.displayedData,h=e.offset,m=Pne(r,n);if(!m)return null;var j=t.layout,v=n.type.defaultProps,p=v!==void 0?vt(vt({},v),n.props):n.props,y=p.dataKey,g=p.children,b=p.minPointSize,x=j==="horizontal"?l:i,w=u?x.scale.domain():null,S=zne({numericAxis:x}),A=an(g,vf),N=d.map(function(C,M){var R,P,B,_,E,$;u?R=Mne(u[f+M],w):(R=Qe(C,y),Array.isArray(R)||(R=[S,R]));var L=Gse(b,I$.defaultProps.minPointSize)(R[1],M);if(j==="horizontal"){var q,V=[l.scale(R[0]),l.scale(R[1])],X=V[0],J=V[1];P=uA({axis:i,ticks:s,bandSize:a,offset:m.offset,entry:C,index:M}),B=(q=J??X)!==null&&q!==void 0?q:void 0,_=m.size;var Q=X-J;if(E=Number.isNaN(Q)?0:Q,$={x:P,y:l.y,width:_,height:l.height},Math.abs(L)>0&&Math.abs(E)<Math.abs(L)){var ie=en(E||L)*(Math.abs(L)-Math.abs(E));B-=ie,E+=ie}}else{var ae=[i.scale(R[0]),i.scale(R[1])],Se=ae[0],Xt=ae[1];if(P=Se,B=uA({axis:l,ticks:c,bandSize:a,offset:m.offset,entry:C,index:M}),_=Xt-Se,E=m.size,$={x:i.x,y:B,width:i.width,height:E},Math.abs(L)>0&&Math.abs(_)<Math.abs(L)){var Nr=en(_||L)*(Math.abs(L)-Math.abs(_));_+=Nr}}return vt(vt(vt({},C),{},{x:P,y:B,width:_,height:E,value:u?R:R[1],payload:C,background:$},A&&A[M]&&A[M].props),{},{tooltipPayload:[f$(n,C)],tooltipPosition:{x:P+_/2,y:B+E/2}})});return vt({data:N,layout:j},h)});function Iu(e){"@babel/helpers - typeof";return Iu=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},Iu(e)}function nce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xN(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,H$(r.key),r)}}function rce(e,t,n){return t&&xN(e.prototype,t),n&&xN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function bN(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 fr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bN(Object(n),!0).forEach(function(r){Im(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Im(e,t,n){return t=H$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H$(e){var t=ace(e,"string");return Iu(t)=="symbol"?t:t+""}function ace(e,t){if(Iu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Iu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Um=function(t,n,r,a,i){var l=t.width,s=t.height,c=t.layout,u=t.children,f=Object.keys(n),d={left:r.left,leftMirror:r.left,right:l-r.right,rightMirror:l-r.right,top:r.top,topMirror:r.top,bottom:s-r.bottom,bottomMirror:s-r.bottom},h=!!jn(u,Ti);return f.reduce(function(m,j){var v=n[j],p=v.orientation,y=v.domain,g=v.padding,b=g===void 0?{}:g,x=v.mirror,w=v.reversed,S="".concat(p).concat(x?"Mirror":""),A,N,C,M,R;if(v.type==="number"&&(v.padding==="gap"||v.padding==="no-gap")){var P=y[1]-y[0],B=1/0,_=v.categoricalDomain.sort(y9);if(_.forEach(function(ae,Se){Se>0&&(B=Math.min((ae||0)-(_[Se-1]||0),B))}),Number.isFinite(B)){var E=B/P,$=v.layout==="vertical"?r.height:r.width;if(v.padding==="gap"&&(A=E*$/2),v.padding==="no-gap"){var L=tn(t.barCategoryGap,E*$),q=E*$/2;A=q-L-(q-L)/$*L}}}a==="xAxis"?N=[r.left+(b.left||0)+(A||0),r.left+r.width-(b.right||0)-(A||0)]:a==="yAxis"?N=c==="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)]:N=v.range,w&&(N=[N[1],N[0]]);var V=o$(v,i,h),X=V.scale,J=V.realScaleType;X.domain(y).range(N),s$(X);var Q=c$(X,fr(fr({},v),{},{realScaleType:J}));a==="xAxis"?(R=p==="top"&&!x||p==="bottom"&&x,C=r.left,M=d[S]-R*v.height):a==="yAxis"&&(R=p==="left"&&!x||p==="right"&&x,C=d[S]-R*v.width,M=r.top);var ie=fr(fr(fr({},v),Q),{},{realScaleType:J,x:C,y:M,scale:X,width:a==="xAxis"?r.width:v.width,height:a==="yAxis"?r.height:v.height});return ie.bandSize=Gh(ie,Q),!v.hide&&a==="xAxis"?d[S]+=(R?-1:1)*ie.height:v.hide||(d[S]+=(R?-1:1)*ie.width),fr(fr({},m),{},Im({},j,ie))},{})},F$=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)}},ice=function(t){var n=t.x1,r=t.y1,a=t.x2,i=t.y2;return F$({x:n,y:r},{x:a,y:i})},G$=function(){function e(t){nce(this,e),this.scale=t}return rce(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 s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(a){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+c}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)}}])}();Im(G$,"EPS",1e-4);var O1=function(t){var n=Object.keys(t).reduce(function(r,a){return fr(fr({},r),{},Im({},a,G$.create(t[a])))},{});return fr(fr({},n),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=i.bandAware,s=i.position;return Ase(a,function(c,u){return n[u].apply(c,{bandAware:l,position:s})})},isInRange:function(a){return B$(a,function(i,l){return n[l].isInRange(i)})}})};function lce(e){return(e%180+180)%180}var oce=function(t){var n=t.width,r=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=lce(a),l=i*Math.PI/180,s=Math.atan(r/n),c=l>s&&l<Math.PI-s?r/Math.sin(l):n/Math.cos(l);return Math.abs(c)},sce=Gr,cce=yf,uce=jm;function fce(e){return function(t,n,r){var a=Object(t);if(!cce(t)){var i=sce(n);t=uce(t),n=function(s){return i(a[s],s,a)}}var l=e(t,n,r);return l>-1?a[i?t[l]:l]:void 0}}var dce=fce,hce=k$;function pce(e){var t=hce(e),n=t%1;return t===t?n?t-n:t:0}var mce=pce,yce=qP,vce=Gr,gce=mce,xce=Math.max;function bce(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var a=n==null?0:gce(n);return a<0&&(a=xce(r+a,0)),yce(e,vce(t),a)}var jce=bce,Sce=dce,wce=jce,Oce=Sce(wce),Ace=Oce;const Nce=_e(Ace);var Ece=g7(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("")}),A1=O.createContext(void 0),N1=O.createContext(void 0),K$=O.createContext(void 0),V$=O.createContext({}),Y$=O.createContext(void 0),X$=O.createContext(0),Q$=O.createContext(0),jN=function(t){var n=t.state,r=n.xAxisMap,a=n.yAxisMap,i=n.offset,l=t.clipPathId,s=t.children,c=t.width,u=t.height,f=Ece(i);return T.createElement(A1.Provider,{value:r},T.createElement(N1.Provider,{value:a},T.createElement(V$.Provider,{value:i},T.createElement(K$.Provider,{value:f},T.createElement(Y$.Provider,{value:l},T.createElement(X$.Provider,{value:u},T.createElement(Q$.Provider,{value:c},s)))))))},Cce=function(){return O.useContext(Y$)},W$=function(t){var n=O.useContext(A1);n==null&&Ol();var r=n[t];return r==null&&Ol(),r},_ce=function(){var t=O.useContext(A1);return qa(t)},Tce=function(){var t=O.useContext(N1),n=Nce(t,function(r){return B$(r.domain,Number.isFinite)});return n||qa(t)},Z$=function(t){var n=O.useContext(N1);n==null&&Ol();var r=n[t];return r==null&&Ol(),r},Pce=function(){var t=O.useContext(K$);return t},Mce=function(){return O.useContext(V$)},E1=function(){return O.useContext(Q$)},C1=function(){return O.useContext(X$)};function fs(e){"@babel/helpers - typeof";return fs=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},fs(e)}function $ce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,e3(r.key),r)}}function kce(e,t,n){return t&&Rce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Dce(e,t,n){return t=up(t),Lce(e,J$()?Reflect.construct(t,n||[],up(e).constructor):t.apply(e,n))}function Lce(e,t){if(t&&(fs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zce(e)}function zce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function J$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(J$=function(){return!!e})()}function up(e){return up=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},up(e)}function Bce(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lx(e,t)}function Lx(e,t){return Lx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Lx(e,t)}function SN(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 wN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?SN(Object(n),!0).forEach(function(r){_1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _1(e,t,n){return t=e3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function e3(e){var t=Ice(e,"string");return fs(t)=="symbol"?t:t+""}function Ice(e,t){if(fs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(fs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Uce(e,t){return Gce(e)||Fce(e,t)||Hce(e,t)||qce()}function qce(){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 Hce(e,t){if(e){if(typeof e=="string")return ON(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 ON(e,t)}}function ON(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Fce(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,s=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return s}}function Gce(e){if(Array.isArray(e))return e}function zx(){return zx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zx.apply(this,arguments)}var Kce=function(t,n){var r;return T.isValidElement(t)?r=T.cloneElement(t,n):se(t)?r=t(n):r=T.createElement("line",zx({},n,{className:"recharts-reference-line-line"})),r},Vce=function(t,n,r,a,i,l,s,c,u){var f=i.x,d=i.y,h=i.width,m=i.height;if(r){var j=u.y,v=t.y.apply(j,{position:l});if(Br(u,"discard")&&!t.y.isInRange(v))return null;var p=[{x:f+h,y:v},{x:f,y:v}];return c==="left"?p.reverse():p}if(n){var y=u.x,g=t.x.apply(y,{position:l});if(Br(u,"discard")&&!t.x.isInRange(g))return null;var b=[{x:g,y:d+m},{x:g,y:d}];return s==="top"?b.reverse():b}if(a){var x=u.segment,w=x.map(function(S){return t.apply(S,{position:l})});return Br(u,"discard")&&vse(w,function(S){return!t.isInRange(S)})?null:w}return null};function Yce(e){var t=e.x,n=e.y,r=e.segment,a=e.xAxisId,i=e.yAxisId,l=e.shape,s=e.className,c=e.alwaysShow,u=Cce(),f=W$(a),d=Z$(i),h=Pce();if(!u||!h)return null;yr(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var m=O1({x:f.scale,y:d.scale}),j=Nt(t),v=Nt(n),p=r&&r.length===2,y=Vce(m,j,v,p,h,e.position,f.orientation,d.orientation,e);if(!y)return null;var g=Uce(y,2),b=g[0],x=b.x,w=b.y,S=g[1],A=S.x,N=S.y,C=Br(e,"hidden")?"url(#".concat(u,")"):void 0,M=wN(wN({clipPath:C},re(e,!0)),{},{x1:x,y1:w,x2:A,y2:N});return T.createElement(me,{className:de("recharts-reference-line",s)},Kce(l,M),$t.renderCallByParent(e,ice({x1:x,y1:w,x2:A,y2:N})))}var ta=function(e){function t(){return $ce(this,t),Dce(this,t,arguments)}return Bce(t,e),kce(t,[{key:"render",value:function(){return T.createElement(Yce,this.props)}}])}(T.Component);_1(ta,"displayName","ReferenceLine");_1(ta,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Bx(){return Bx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bx.apply(this,arguments)}function ds(e){"@babel/helpers - typeof";return ds=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},ds(e)}function AN(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 NN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?AN(Object(n),!0).forEach(function(r){qm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n3(r.key),r)}}function Wce(e,t,n){return t&&Qce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zce(e,t,n){return t=fp(t),Jce(e,t3()?Reflect.construct(t,n||[],fp(e).constructor):t.apply(e,n))}function Jce(e,t){if(t&&(ds(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return eue(e)}function eue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function t3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(t3=function(){return!!e})()}function fp(e){return fp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},fp(e)}function tue(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ix(e,t)}function Ix(e,t){return Ix=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Ix(e,t)}function qm(e,t,n){return t=n3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n3(e){var t=nue(e,"string");return ds(t)=="symbol"?t:t+""}function nue(e,t){if(ds(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ds(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var rue=function(t){var n=t.x,r=t.y,a=t.xAxis,i=t.yAxis,l=O1({x:a.scale,y:i.scale}),s=l.apply({x:n,y:r},{bandAware:!0});return Br(t,"discard")&&!l.isInRange(s)?null:s},Hm=function(e){function t(){return Xce(this,t),Zce(this,t,arguments)}return tue(t,e),Wce(t,[{key:"render",value:function(){var r=this.props,a=r.x,i=r.y,l=r.r,s=r.alwaysShow,c=r.clipPathId,u=Nt(a),f=Nt(i);if(yr(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!f)return null;var d=rue(this.props);if(!d)return null;var h=d.x,m=d.y,j=this.props,v=j.shape,p=j.className,y=Br(this.props,"hidden")?"url(#".concat(c,")"):void 0,g=NN(NN({clipPath:y},re(this.props,!0)),{},{cx:h,cy:m});return T.createElement(me,{className:de("recharts-reference-dot",p)},t.renderDot(v,g),$t.renderCallByParent(this.props,{x:h-l,y:m-l,width:2*l,height:2*l}))}}])}(T.Component);qm(Hm,"displayName","ReferenceDot");qm(Hm,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});qm(Hm,"renderDot",function(e,t){var n;return T.isValidElement(e)?n=T.cloneElement(e,t):se(e)?n=e(t):n=T.createElement(Sf,Bx({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function Ux(){return Ux=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ux.apply(this,arguments)}function hs(e){"@babel/helpers - typeof";return hs=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},hs(e)}function EN(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 CN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?EN(Object(n),!0).forEach(function(r){Fm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iue(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a3(r.key),r)}}function lue(e,t,n){return t&&iue(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function oue(e,t,n){return t=dp(t),sue(e,r3()?Reflect.construct(t,n||[],dp(e).constructor):t.apply(e,n))}function sue(e,t){if(t&&(hs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cue(e)}function cue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function r3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(r3=function(){return!!e})()}function dp(e){return dp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},dp(e)}function uue(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qx(e,t)}function qx(e,t){return qx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},qx(e,t)}function Fm(e,t,n){return t=a3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a3(e){var t=fue(e,"string");return hs(t)=="symbol"?t:t+""}function fue(e,t){if(hs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(hs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var due=function(t,n,r,a,i){var l=i.x1,s=i.x2,c=i.y1,u=i.y2,f=i.xAxis,d=i.yAxis;if(!f||!d)return null;var h=O1({x:f.scale,y:d.scale}),m={x:t?h.x.apply(l,{position:"start"}):h.x.rangeMin,y:r?h.y.apply(c,{position:"start"}):h.y.rangeMin},j={x:n?h.x.apply(s,{position:"end"}):h.x.rangeMax,y:a?h.y.apply(u,{position:"end"}):h.y.rangeMax};return Br(i,"discard")&&(!h.isInRange(m)||!h.isInRange(j))?null:F$(m,j)},Gm=function(e){function t(){return aue(this,t),oue(this,t,arguments)}return uue(t,e),lue(t,[{key:"render",value:function(){var r=this.props,a=r.x1,i=r.x2,l=r.y1,s=r.y2,c=r.className,u=r.alwaysShow,f=r.clipPathId;yr(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var d=Nt(a),h=Nt(i),m=Nt(l),j=Nt(s),v=this.props.shape;if(!d&&!h&&!m&&!j&&!v)return null;var p=due(d,h,m,j,this.props);if(!p&&!v)return null;var y=Br(this.props,"hidden")?"url(#".concat(f,")"):void 0;return T.createElement(me,{className:de("recharts-reference-area",c)},t.renderRect(v,CN(CN({clipPath:y},re(this.props,!0)),p)),$t.renderCallByParent(this.props,p))}}])}(T.Component);Fm(Gm,"displayName","ReferenceArea");Fm(Gm,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});Fm(Gm,"renderRect",function(e,t){var n;return T.isValidElement(e)?n=T.cloneElement(e,t):se(e)?n=e(t):n=T.createElement(w1,Ux({},t,{className:"recharts-reference-area-rect"})),n});function i3(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],a=0;a<e.length;a+=t)r.push(e[a]);return r}function hue(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return oce(r,n)}function pue(e,t,n){var r=n==="width",a=e.x,i=e.y,l=e.width,s=e.height;return t===1?{start:r?a:i,end:r?a+l:i+s}:{start:r?a+l:i+s,end:r?a:i}}function hp(e,t,n,r,a){if(e*t<e*r||e*t>e*a)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-a)<=0}function mue(e,t){return i3(e,t+1)}function yue(e,t,n,r,a){for(var i=(r||[]).slice(),l=t.start,s=t.end,c=0,u=1,f=l,d=function(){var j=r==null?void 0:r[c];if(j===void 0)return{v:i3(r,u)};var v=c,p,y=function(){return p===void 0&&(p=n(j,v)),p},g=j.coordinate,b=c===0||hp(e,g,y,f,s);b||(c=0,f=l,u+=1),b&&(f=g+e*(y()/2+a),c+=u)},h;u<=i.length;)if(h=d(),h)return h.v;return[]}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 _N(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 Gt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_N(Object(n),!0).forEach(function(r){vue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_N(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vue(e,t,n){return t=gue(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gue(e){var t=xue(e,"string");return Uu(t)=="symbol"?t:t+""}function xue(e,t){if(Uu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Uu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bue(e,t,n,r,a){for(var i=(r||[]).slice(),l=i.length,s=t.start,c=t.end,u=function(h){var m=i[h],j,v=function(){return j===void 0&&(j=n(m,h)),j};if(h===l-1){var p=e*(m.coordinate+e*v()/2-c);i[h]=m=Gt(Gt({},m),{},{tickCoord:p>0?m.coordinate-p*e:m.coordinate})}else i[h]=m=Gt(Gt({},m),{},{tickCoord:m.coordinate});var y=hp(e,m.tickCoord,v,s,c);y&&(c=m.tickCoord-e*(v()/2+a),i[h]=Gt(Gt({},m),{},{isShow:!0}))},f=l-1;f>=0;f--)u(f);return i}function jue(e,t,n,r,a,i){var l=(r||[]).slice(),s=l.length,c=t.start,u=t.end;if(i){var f=r[s-1],d=n(f,s-1),h=e*(f.coordinate+e*d/2-u);l[s-1]=f=Gt(Gt({},f),{},{tickCoord:h>0?f.coordinate-h*e:f.coordinate});var m=hp(e,f.tickCoord,function(){return d},c,u);m&&(u=f.tickCoord-e*(d/2+a),l[s-1]=Gt(Gt({},f),{},{isShow:!0}))}for(var j=i?s-1:s,v=function(g){var b=l[g],x,w=function(){return x===void 0&&(x=n(b,g)),x};if(g===0){var S=e*(b.coordinate-e*w()/2-c);l[g]=b=Gt(Gt({},b),{},{tickCoord:S<0?b.coordinate-S*e:b.coordinate})}else l[g]=b=Gt(Gt({},b),{},{tickCoord:b.coordinate});var A=hp(e,b.tickCoord,w,c,u);A&&(c=b.tickCoord+e*(w()/2+a),l[g]=Gt(Gt({},b),{},{isShow:!0}))},p=0;p<j;p++)v(p);return l}function T1(e,t,n){var r=e.tick,a=e.ticks,i=e.viewBox,l=e.minTickGap,s=e.orientation,c=e.interval,u=e.tickFormatter,f=e.unit,d=e.angle;if(!a||!a.length||!r)return[];if(Y(c)||Ea.isSsr)return mue(a,typeof c=="number"&&Y(c)?c:0);var h=[],m=s==="top"||s==="bottom"?"width":"height",j=f&&m==="width"?Dc(f,{fontSize:t,letterSpacing:n}):{width:0,height:0},v=function(b,x){var w=se(u)?u(b.value,x):b.value;return m==="width"?hue(Dc(w,{fontSize:t,letterSpacing:n}),j,d):Dc(w,{fontSize:t,letterSpacing:n})[m]},p=a.length>=2?en(a[1].coordinate-a[0].coordinate):1,y=pue(i,p,m);return c==="equidistantPreserveStart"?yue(p,y,v,a,l):(c==="preserveStart"||c==="preserveStartEnd"?h=jue(p,y,v,a,l,c==="preserveStartEnd"):h=bue(p,y,v,a,l),h.filter(function(g){return g.isShow}))}var Sue=["viewBox"],wue=["viewBox"],Oue=["ticks"];function ps(e){"@babel/helpers - typeof";return ps=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},ps(e)}function fo(){return fo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fo.apply(this,arguments)}function TN(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 wt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TN(Object(n),!0).forEach(function(r){P1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dv(e,t){if(e==null)return{};var n=Aue(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Aue(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 Nue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PN(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o3(r.key),r)}}function Eue(e,t,n){return t&&PN(e.prototype,t),n&&PN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Cue(e,t,n){return t=pp(t),_ue(e,l3()?Reflect.construct(t,n||[],pp(e).constructor):t.apply(e,n))}function _ue(e,t){if(t&&(ps(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Tue(e)}function Tue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(l3=function(){return!!e})()}function pp(e){return pp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},pp(e)}function Pue(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hx(e,t)}function Hx(e,t){return Hx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Hx(e,t)}function P1(e,t,n){return t=o3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o3(e){var t=Mue(e,"string");return ps(t)=="symbol"?t:t+""}function Mue(e,t){if(ps(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ps(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Qs=function(e){function t(n){var r;return Nue(this,t),r=Cue(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return Pue(t,e),Eue(t,[{key:"shouldComponentUpdate",value:function(r,a){var i=r.viewBox,l=dv(r,Sue),s=this.props,c=s.viewBox,u=dv(s,wue);return!jo(i,c)||!jo(l,u)||!jo(a,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var a=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var a=this.props,i=a.x,l=a.y,s=a.width,c=a.height,u=a.orientation,f=a.tickSize,d=a.mirror,h=a.tickMargin,m,j,v,p,y,g,b=d?-1:1,x=r.tickSize||f,w=Y(r.tickCoord)?r.tickCoord:r.coordinate;switch(u){case"top":m=j=r.coordinate,p=l+ +!d*c,v=p-b*x,g=v-b*h,y=w;break;case"left":v=p=r.coordinate,j=i+ +!d*s,m=j-b*x,y=m-b*h,g=w;break;case"right":v=p=r.coordinate,j=i+ +d*s,m=j+b*x,y=m+b*h,g=w;break;default:m=j=r.coordinate,p=l+ +d*c,v=p+b*x,g=v+b*h,y=w;break}return{line:{x1:m,y1:v,x2:j,y2:p},tick:{x:y,y:g}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,a=r.orientation,i=r.mirror,l;switch(a){case"left":l=i?"start":"end";break;case"right":l=i?"end":"start";break;default:l="middle";break}return l}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,a=r.orientation,i=r.mirror,l="end";switch(a){case"left":case"right":l="middle";break;case"top":l=i?"start":"end";break;default:l=i?"end":"start";break}return l}},{key:"renderAxisLine",value:function(){var r=this.props,a=r.x,i=r.y,l=r.width,s=r.height,c=r.orientation,u=r.mirror,f=r.axisLine,d=wt(wt(wt({},re(this.props,!1)),re(f,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var h=+(c==="top"&&!u||c==="bottom"&&u);d=wt(wt({},d),{},{x1:a,y1:i+h*s,x2:a+l,y2:i+h*s})}else{var m=+(c==="left"&&!u||c==="right"&&u);d=wt(wt({},d),{},{x1:a+m*l,y1:i,x2:a+m*l,y2:i+s})}return T.createElement("line",fo({},d,{className:de("recharts-cartesian-axis-line",Pn(f,"className"))}))}},{key:"renderTicks",value:function(r,a,i){var l=this,s=this.props,c=s.tickLine,u=s.stroke,f=s.tick,d=s.tickFormatter,h=s.unit,m=T1(wt(wt({},this.props),{},{ticks:r}),a,i),j=this.getTickTextAnchor(),v=this.getTickVerticalAnchor(),p=re(this.props,!1),y=re(f,!1),g=wt(wt({},p),{},{fill:"none"},re(c,!1)),b=m.map(function(x,w){var S=l.getTickLineCoord(x),A=S.line,N=S.tick,C=wt(wt(wt(wt({textAnchor:j,verticalAnchor:v},p),{},{stroke:"none",fill:u},y),N),{},{index:w,payload:x,visibleTicksCount:m.length,tickFormatter:d});return T.createElement(me,fo({className:"recharts-cartesian-axis-tick",key:"tick-".concat(x.value,"-").concat(x.coordinate,"-").concat(x.tickCoord)},bi(l.props,x,w)),c&&T.createElement("line",fo({},g,A,{className:de("recharts-cartesian-axis-tick-line",Pn(c,"className"))})),f&&t.renderTickItem(f,C,"".concat(se(d)?d(x.value,w):x.value).concat(h||"")))});return T.createElement("g",{className:"recharts-cartesian-axis-ticks"},b)}},{key:"render",value:function(){var r=this,a=this.props,i=a.axisLine,l=a.width,s=a.height,c=a.ticksGenerator,u=a.className,f=a.hide;if(f)return null;var d=this.props,h=d.ticks,m=dv(d,Oue),j=h;return se(c)&&(j=h&&h.length>0?c(this.props):c(m)),l<=0||s<=0||!j||!j.length?null:T.createElement(me,{className:de("recharts-cartesian-axis",u),ref:function(p){r.layerReference=p}},i&&this.renderAxisLine(),this.renderTicks(j,this.state.fontSize,this.state.letterSpacing),$t.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,a,i){var l,s=de(a.className,"recharts-cartesian-axis-tick-value");return T.isValidElement(r)?l=T.cloneElement(r,wt(wt({},a),{},{className:s})):se(r)?l=r(wt(wt({},a),{},{className:s})):l=T.createElement(Sl,fo({},a,{className:"recharts-cartesian-axis-tick-value"}),i),l}}])}(O.Component);P1(Qs,"displayName","CartesianAxis");P1(Qs,"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 $ue=["x1","y1","x2","y2","key"],Rue=["offset"];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 MN(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 Kt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?MN(Object(n),!0).forEach(function(r){kue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kue(e,t,n){return t=Due(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Due(e){var t=Lue(e,"string");return Al(t)=="symbol"?t:t+""}function Lue(e,t){if(Al(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Al(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qi(){return Qi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qi.apply(this,arguments)}function $N(e,t){if(e==null)return{};var n=zue(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zue(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 Bue=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,s=t.height,c=t.ry;return T.createElement("rect",{x:a,y:i,ry:c,width:l,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function s3(e,t){var n;if(T.isValidElement(e))n=T.cloneElement(e,t);else if(se(e))n=e(t);else{var r=t.x1,a=t.y1,i=t.x2,l=t.y2,s=t.key,c=$N(t,$ue),u=re(c,!1);u.offset;var f=$N(u,Rue);n=T.createElement("line",Qi({},f,{x1:r,y1:a,x2:i,y2:l,fill:"none",key:s}))}return n}function Iue(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(s,c){var u=Kt(Kt({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(c),index:c});return s3(a,u)});return T.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function Uue(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(s,c){var u=Kt(Kt({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(c),index:c});return s3(a,u)});return T.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function que(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,a=e.y,i=e.width,l=e.height,s=e.horizontalPoints,c=e.horizontal,u=c===void 0?!0:c;if(!u||!t||!t.length)return null;var f=s.map(function(h){return Math.round(h+a-a)}).sort(function(h,m){return h-m});a!==f[0]&&f.unshift(0);var d=f.map(function(h,m){var j=!f[m+1],v=j?a+l-h:f[m+1]-h;if(v<=0)return null;var p=m%t.length;return T.createElement("rect",{key:"react-".concat(m),y:h,x:r,height:v,width:i,stroke:"none",fill:t[p],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return T.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function Hue(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,a=e.fillOpacity,i=e.x,l=e.y,s=e.width,c=e.height,u=e.verticalPoints;if(!n||!r||!r.length)return null;var f=u.map(function(h){return Math.round(h+i-i)}).sort(function(h,m){return h-m});i!==f[0]&&f.unshift(0);var d=f.map(function(h,m){var j=!f[m+1],v=j?i+s-h:f[m+1]-h;if(v<=0)return null;var p=m%r.length;return T.createElement("rect",{key:"react-".concat(m),x:h,y:l,width:v,height:c,stroke:"none",fill:r[p],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return T.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var Fue=function(t,n){var r=t.xAxis,a=t.width,i=t.height,l=t.offset;return l$(T1(Kt(Kt(Kt({},Qs.defaultProps),r),{},{ticks:ca(r,!0),viewBox:{x:0,y:0,width:a,height:i}})),l.left,l.left+l.width,n)},Gue=function(t,n){var r=t.yAxis,a=t.width,i=t.height,l=t.offset;return l$(T1(Kt(Kt(Kt({},Qs.defaultProps),r),{},{ticks:ca(r,!0),viewBox:{x:0,y:0,width:a,height:i}})),l.top,l.top+l.height,n)},ql={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Oo(e){var t,n,r,a,i,l,s=E1(),c=C1(),u=Mce(),f=Kt(Kt({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:ql.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:ql.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:ql.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:ql.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:ql.vertical,verticalFill:(l=e.verticalFill)!==null&&l!==void 0?l:ql.verticalFill,x:Y(e.x)?e.x:u.left,y:Y(e.y)?e.y:u.top,width:Y(e.width)?e.width:u.width,height:Y(e.height)?e.height:u.height}),d=f.x,h=f.y,m=f.width,j=f.height,v=f.syncWithTicks,p=f.horizontalValues,y=f.verticalValues,g=_ce(),b=Tce();if(!Y(m)||m<=0||!Y(j)||j<=0||!Y(d)||d!==+d||!Y(h)||h!==+h)return null;var x=f.verticalCoordinatesGenerator||Fue,w=f.horizontalCoordinatesGenerator||Gue,S=f.horizontalPoints,A=f.verticalPoints;if((!S||!S.length)&&se(w)){var N=p&&p.length,C=w({yAxis:b?Kt(Kt({},b),{},{ticks:N?p:b.ticks}):void 0,width:s,height:c,offset:u},N?!0:v);yr(Array.isArray(C),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Al(C),"]")),Array.isArray(C)&&(S=C)}if((!A||!A.length)&&se(x)){var M=y&&y.length,R=x({xAxis:g?Kt(Kt({},g),{},{ticks:M?y:g.ticks}):void 0,width:s,height:c,offset:u},M?!0:v);yr(Array.isArray(R),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Al(R),"]")),Array.isArray(R)&&(A=R)}return T.createElement("g",{className:"recharts-cartesian-grid"},T.createElement(Bue,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),T.createElement(Iue,Qi({},f,{offset:u,horizontalPoints:S,xAxis:g,yAxis:b})),T.createElement(Uue,Qi({},f,{offset:u,verticalPoints:A,xAxis:g,yAxis:b})),T.createElement(que,Qi({},f,{horizontalPoints:S})),T.createElement(Hue,Qi({},f,{verticalPoints:A})))}Oo.displayName="CartesianGrid";var Kue=["type","layout","connectNulls","ref"],Vue=["key"];function ms(e){"@babel/helpers - typeof";return ms=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},ms(e)}function RN(e,t){if(e==null)return{};var n=Yue(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Yue(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 qc(){return qc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qc.apply(this,arguments)}function kN(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 gn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kN(Object(n),!0).forEach(function(r){dr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hl(e){return Zue(e)||Wue(e)||Que(e)||Xue()}function Xue(){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 Que(e,t){if(e){if(typeof e=="string")return Fx(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 Fx(e,t)}}function Wue(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Zue(e){if(Array.isArray(e))return Fx(e)}function Fx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Jue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DN(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u3(r.key),r)}}function efe(e,t,n){return t&&DN(e.prototype,t),n&&DN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function tfe(e,t,n){return t=mp(t),nfe(e,c3()?Reflect.construct(t,n||[],mp(e).constructor):t.apply(e,n))}function nfe(e,t){if(t&&(ms(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rfe(e)}function rfe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(c3=function(){return!!e})()}function mp(e){return mp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},mp(e)}function afe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gx(e,t)}function Gx(e,t){return Gx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Gx(e,t)}function dr(e,t,n){return t=u3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u3(e){var t=ife(e,"string");return ms(t)=="symbol"?t:t+""}function ife(e,t){if(ms(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ms(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Si=function(e){function t(){var n;Jue(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=tfe(this,t,[].concat(a)),dr(n,"state",{isAnimationFinished:!0,totalLength:0}),dr(n,"generateSimpleStrokeDasharray",function(l,s){return"".concat(s,"px ").concat(l-s,"px")}),dr(n,"getStrokeDasharray",function(l,s,c){var u=c.reduce(function(y,g){return y+g});if(!u)return n.generateSimpleStrokeDasharray(s,l);for(var f=Math.floor(l/u),d=l%u,h=s-l,m=[],j=0,v=0;j<c.length;v+=c[j],++j)if(v+c[j]>d){m=[].concat(Hl(c.slice(0,j)),[d-v]);break}var p=m.length%2===0?[0,h]:[h];return[].concat(Hl(t.repeat(c,f)),Hl(m),p).map(function(y){return"".concat(y,"px")}).join(", ")}),dr(n,"id",Ni("recharts-line-")),dr(n,"pathRef",function(l){n.mainCurve=l}),dr(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),dr(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return afe(t,e),efe(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,l=i.points,s=i.xAxis,c=i.yAxis,u=i.layout,f=i.children,d=an(f,Xs);if(!d)return null;var h=function(v,p){return{x:v.x,y:v.y,value:v.value,errorVal:Qe(v.payload,p)}},m={clipPath:r?"url(#clipPath-".concat(a,")"):null};return T.createElement(me,m,d.map(function(j){return T.cloneElement(j,{key:"bar-".concat(j.props.dataKey),data:l,xAxis:s,yAxis:c,layout:u,dataPointFormatter:h})}))}},{key:"renderDots",value:function(r,a,i){var l=this.props.isAnimationActive;if(l&&!this.state.isAnimationFinished)return null;var s=this.props,c=s.dot,u=s.points,f=s.dataKey,d=re(this.props,!1),h=re(c,!0),m=u.map(function(v,p){var y=gn(gn(gn({key:"dot-".concat(p),r:3},d),h),{},{index:p,cx:v.x,cy:v.y,value:v.value,dataKey:f,payload:v.payload,points:u});return t.renderDotItem(c,y)}),j={clipPath:r?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return T.createElement(me,qc({className:"recharts-line-dots",key:"dots"},j),m)}},{key:"renderCurveStatically",value:function(r,a,i,l){var s=this.props,c=s.type,u=s.layout,f=s.connectNulls;s.ref;var d=RN(s,Kue),h=gn(gn(gn({},re(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:a?"url(#clipPath-".concat(i,")"):null,points:r},l),{},{type:c,layout:u,connectNulls:f});return T.createElement(hi,qc({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,a){var i=this,l=this.props,s=l.points,c=l.strokeDasharray,u=l.isAnimationActive,f=l.animationBegin,d=l.animationDuration,h=l.animationEasing,m=l.animationId,j=l.animateNewValues,v=l.width,p=l.height,y=this.state,g=y.prevPoints,b=y.totalLength;return T.createElement(rr,{begin:f,duration:d,isActive:u,easing:h,from:{t:0},to:{t:1},key:"line-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(x){var w=x.t;if(g){var S=g.length/s.length,A=s.map(function(P,B){var _=Math.floor(B*S);if(g[_]){var E=g[_],$=nt(E.x,P.x),L=nt(E.y,P.y);return gn(gn({},P),{},{x:$(w),y:L(w)})}if(j){var q=nt(v*2,P.x),V=nt(p/2,P.y);return gn(gn({},P),{},{x:q(w),y:V(w)})}return gn(gn({},P),{},{x:P.x,y:P.y})});return i.renderCurveStatically(A,r,a)}var N=nt(0,b),C=N(w),M;if(c){var R="".concat(c).split(/[,\s]+/gim).map(function(P){return parseFloat(P)});M=i.getStrokeDasharray(C,b,R)}else M=i.generateSimpleStrokeDasharray(b,C);return i.renderCurveStatically(s,r,a,{strokeDasharray:M})})}},{key:"renderCurve",value:function(r,a){var i=this.props,l=i.points,s=i.isAnimationActive,c=this.state,u=c.prevPoints,f=c.totalLength;return s&&l&&l.length&&(!u&&f>0||!ji(u,l))?this.renderCurveWithAnimation(r,a):this.renderCurveStatically(l,r,a)}},{key:"render",value:function(){var r,a=this.props,i=a.hide,l=a.dot,s=a.points,c=a.className,u=a.xAxis,f=a.yAxis,d=a.top,h=a.left,m=a.width,j=a.height,v=a.isAnimationActive,p=a.id;if(i||!s||!s.length)return null;var y=this.state.isAnimationFinished,g=s.length===1,b=de("recharts-line",c),x=u&&u.allowDataOverflow,w=f&&f.allowDataOverflow,S=x||w,A=le(p)?this.id:p,N=(r=re(l,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},C=N.r,M=C===void 0?3:C,R=N.strokeWidth,P=R===void 0?2:R,B=JT(l)?l:{},_=B.clipDot,E=_===void 0?!0:_,$=M*2+P;return T.createElement(me,{className:b},x||w?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(A)},T.createElement("rect",{x:x?h:h-m/2,y:w?d:d-j/2,width:x?m:m*2,height:w?j:j*2})),!E&&T.createElement("clipPath",{id:"clipPath-dots-".concat(A)},T.createElement("rect",{x:h-$/2,y:d-$/2,width:m+$,height:j+$}))):null,!g&&this.renderCurve(S,A),this.renderErrorBar(S,A),(g||l)&&this.renderDots(S,E,A),(!v||y)&&vr.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:a.curPoints}:r.points!==a.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,a){for(var i=r.length%2!==0?[].concat(Hl(r),[0]):r,l=[],s=0;s<a;++s)l=[].concat(Hl(l),Hl(i));return l}},{key:"renderDotItem",value:function(r,a){var i;if(T.isValidElement(r))i=T.cloneElement(r,a);else if(se(r))i=r(a);else{var l=a.key,s=RN(a,Vue),c=de("recharts-line-dot",typeof r!="boolean"?r.className:"");i=T.createElement(Sf,qc({key:l},s,{className:c}))}return i}}])}(O.PureComponent);dr(Si,"displayName","Line");dr(Si,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!Ea.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});dr(Si,"getComposedData",function(e){var t=e.props,n=e.xAxis,r=e.yAxis,a=e.xAxisTicks,i=e.yAxisTicks,l=e.dataKey,s=e.bandSize,c=e.displayedData,u=e.offset,f=t.layout,d=c.map(function(h,m){var j=Qe(h,l);return f==="horizontal"?{x:rs({axis:n,ticks:a,bandSize:s,entry:h,index:m}),y:le(j)?null:r.scale(j),value:j,payload:h}:{x:le(j)?null:n.scale(j),y:rs({axis:r,ticks:i,bandSize:s,entry:h,index:m}),value:j,payload:h}});return gn({points:d,layout:f},u)});var lfe=["layout","type","stroke","connectNulls","isRange","ref"],ofe=["key"],f3;function ys(e){"@babel/helpers - typeof";return ys=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},ys(e)}function d3(e,t){if(e==null)return{};var n=sfe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sfe(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 Wi(){return Wi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wi.apply(this,arguments)}function LN(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 Ra(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LN(Object(n),!0).forEach(function(r){Dr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zN(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,p3(r.key),r)}}function ufe(e,t,n){return t&&zN(e.prototype,t),n&&zN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ffe(e,t,n){return t=yp(t),dfe(e,h3()?Reflect.construct(t,n||[],yp(e).constructor):t.apply(e,n))}function dfe(e,t){if(t&&(ys(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hfe(e)}function hfe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(h3=function(){return!!e})()}function yp(e){return yp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},yp(e)}function pfe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kx(e,t)}function Kx(e,t){return Kx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Kx(e,t)}function Dr(e,t,n){return t=p3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p3(e){var t=mfe(e,"string");return ys(t)=="symbol"?t:t+""}function mfe(e,t){if(ys(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ys(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ta=function(e){function t(){var n;cfe(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=ffe(this,t,[].concat(a)),Dr(n,"state",{isAnimationFinished:!0}),Dr(n,"id",Ni("recharts-area-")),Dr(n,"handleAnimationEnd",function(){var l=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),se(l)&&l()}),Dr(n,"handleAnimationStart",function(){var l=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),se(l)&&l()}),n}return pfe(t,e),ufe(t,[{key:"renderDots",value:function(r,a,i){var l=this.props.isAnimationActive,s=this.state.isAnimationFinished;if(l&&!s)return null;var c=this.props,u=c.dot,f=c.points,d=c.dataKey,h=re(this.props,!1),m=re(u,!0),j=f.map(function(p,y){var g=Ra(Ra(Ra({key:"dot-".concat(y),r:3},h),m),{},{index:y,cx:p.x,cy:p.y,dataKey:d,value:p.value,payload:p.payload,points:f});return t.renderDotItem(u,g)}),v={clipPath:r?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return T.createElement(me,Wi({className:"recharts-area-dots"},v),j)}},{key:"renderHorizontalRect",value:function(r){var a=this.props,i=a.baseLine,l=a.points,s=a.strokeWidth,c=l[0].x,u=l[l.length-1].x,f=r*Math.abs(c-u),d=ei(l.map(function(h){return h.y||0}));return Y(i)&&typeof i=="number"?d=Math.max(i,d):i&&Array.isArray(i)&&i.length&&(d=Math.max(ei(i.map(function(h){return h.y||0})),d)),Y(d)?T.createElement("rect",{x:c<u?c:c-f,y:0,width:f,height:Math.floor(d+(s?parseInt("".concat(s),10):1))}):null}},{key:"renderVerticalRect",value:function(r){var a=this.props,i=a.baseLine,l=a.points,s=a.strokeWidth,c=l[0].y,u=l[l.length-1].y,f=r*Math.abs(c-u),d=ei(l.map(function(h){return h.x||0}));return Y(i)&&typeof i=="number"?d=Math.max(i,d):i&&Array.isArray(i)&&i.length&&(d=Math.max(ei(i.map(function(h){return h.x||0})),d)),Y(d)?T.createElement("rect",{x:0,y:c<u?c:c-f,width:d+(s?parseInt("".concat(s),10):1),height:Math.floor(f)}):null}},{key:"renderClipRect",value:function(r){var a=this.props.layout;return a==="vertical"?this.renderVerticalRect(r):this.renderHorizontalRect(r)}},{key:"renderAreaStatically",value:function(r,a,i,l){var s=this.props,c=s.layout,u=s.type,f=s.stroke,d=s.connectNulls,h=s.isRange;s.ref;var m=d3(s,lfe);return T.createElement(me,{clipPath:i?"url(#clipPath-".concat(l,")"):null},T.createElement(hi,Wi({},re(m,!0),{points:r,connectNulls:d,type:u,baseLine:a,layout:c,stroke:"none",className:"recharts-area-area"})),f!=="none"&&T.createElement(hi,Wi({},re(this.props,!1),{className:"recharts-area-curve",layout:c,type:u,connectNulls:d,fill:"none",points:r})),f!=="none"&&h&&T.createElement(hi,Wi({},re(this.props,!1),{className:"recharts-area-curve",layout:c,type:u,connectNulls:d,fill:"none",points:a})))}},{key:"renderAreaWithAnimation",value:function(r,a){var i=this,l=this.props,s=l.points,c=l.baseLine,u=l.isAnimationActive,f=l.animationBegin,d=l.animationDuration,h=l.animationEasing,m=l.animationId,j=this.state,v=j.prevPoints,p=j.prevBaseLine;return T.createElement(rr,{begin:f,duration:d,isActive:u,easing:h,from:{t:0},to:{t:1},key:"area-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(y){var g=y.t;if(v){var b=v.length/s.length,x=s.map(function(N,C){var M=Math.floor(C*b);if(v[M]){var R=v[M],P=nt(R.x,N.x),B=nt(R.y,N.y);return Ra(Ra({},N),{},{x:P(g),y:B(g)})}return N}),w;if(Y(c)&&typeof c=="number"){var S=nt(p,c);w=S(g)}else if(le(c)||qs(c)){var A=nt(p,0);w=A(g)}else w=c.map(function(N,C){var M=Math.floor(C*b);if(p[M]){var R=p[M],P=nt(R.x,N.x),B=nt(R.y,N.y);return Ra(Ra({},N),{},{x:P(g),y:B(g)})}return N});return i.renderAreaStatically(x,w,r,a)}return T.createElement(me,null,T.createElement("defs",null,T.createElement("clipPath",{id:"animationClipPath-".concat(a)},i.renderClipRect(g))),T.createElement(me,{clipPath:"url(#animationClipPath-".concat(a,")")},i.renderAreaStatically(s,c,r,a)))})}},{key:"renderArea",value:function(r,a){var i=this.props,l=i.points,s=i.baseLine,c=i.isAnimationActive,u=this.state,f=u.prevPoints,d=u.prevBaseLine,h=u.totalLength;return c&&l&&l.length&&(!f&&h>0||!ji(f,l)||!ji(d,s))?this.renderAreaWithAnimation(r,a):this.renderAreaStatically(l,s,r,a)}},{key:"render",value:function(){var r,a=this.props,i=a.hide,l=a.dot,s=a.points,c=a.className,u=a.top,f=a.left,d=a.xAxis,h=a.yAxis,m=a.width,j=a.height,v=a.isAnimationActive,p=a.id;if(i||!s||!s.length)return null;var y=this.state.isAnimationFinished,g=s.length===1,b=de("recharts-area",c),x=d&&d.allowDataOverflow,w=h&&h.allowDataOverflow,S=x||w,A=le(p)?this.id:p,N=(r=re(l,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},C=N.r,M=C===void 0?3:C,R=N.strokeWidth,P=R===void 0?2:R,B=JT(l)?l:{},_=B.clipDot,E=_===void 0?!0:_,$=M*2+P;return T.createElement(me,{className:b},x||w?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(A)},T.createElement("rect",{x:x?f:f-m/2,y:w?u:u-j/2,width:x?m:m*2,height:w?j:j*2})),!E&&T.createElement("clipPath",{id:"clipPath-dots-".concat(A)},T.createElement("rect",{x:f-$/2,y:u-$/2,width:m+$,height:j+$}))):null,g?null:this.renderArea(S,A),(l||g)&&this.renderDots(S,E,A),(!v||y)&&vr.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:a.curPoints,prevBaseLine:a.curBaseLine}:r.points!==a.curPoints||r.baseLine!==a.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])}(O.PureComponent);f3=Ta;Dr(Ta,"displayName","Area");Dr(Ta,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Ea.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Dr(Ta,"getBaseValue",function(e,t,n,r){var a=e.layout,i=e.baseValue,l=t.props.baseValue,s=l??i;if(Y(s)&&typeof s=="number")return s;var c=a==="horizontal"?r:n,u=c.scale.domain();if(c.type==="number"){var f=Math.max(u[0],u[1]),d=Math.min(u[0],u[1]);return s==="dataMin"?d:s==="dataMax"||f<0?f:Math.max(Math.min(u[0],u[1]),0)}return s==="dataMin"?u[0]:s==="dataMax"?u[1]:u[0]});Dr(Ta,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,a=e.yAxis,i=e.xAxisTicks,l=e.yAxisTicks,s=e.bandSize,c=e.dataKey,u=e.stackedData,f=e.dataStartIndex,d=e.displayedData,h=e.offset,m=t.layout,j=u&&u.length,v=f3.getBaseValue(t,n,r,a),p=m==="horizontal",y=!1,g=d.map(function(x,w){var S;j?S=u[f+w]:(S=Qe(x,c),Array.isArray(S)?y=!0:S=[v,S]);var A=S[1]==null||j&&Qe(x,c)==null;return p?{x:rs({axis:r,ticks:i,bandSize:s,entry:x,index:w}),y:A?null:a.scale(S[1]),value:S,payload:x}:{x:A?null:r.scale(S[1]),y:rs({axis:a,ticks:l,bandSize:s,entry:x,index:w}),value:S,payload:x}}),b;return j||y?b=g.map(function(x){var w=Array.isArray(x.value)?x.value[0]:null;return p?{x:x.x,y:w!=null&&x.y!=null?a.scale(w):null}:{x:w!=null?r.scale(w):null,y:x.y}}):b=p?a.scale(v):r.scale(v),Ra({points:g,baseLine:b,layout:m,isRange:y},h)});Dr(Ta,"renderDotItem",function(e,t){var n;if(T.isValidElement(e))n=T.cloneElement(e,t);else if(se(e))n=e(t);else{var r=de("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,i=d3(t,ofe);n=T.createElement(Sf,Wi({},i,{key:a,className:r}))}return n});function vs(e){"@babel/helpers - typeof";return vs=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},vs(e)}function yfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vfe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,v3(r.key),r)}}function gfe(e,t,n){return t&&vfe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function xfe(e,t,n){return t=vp(t),bfe(e,m3()?Reflect.construct(t,n||[],vp(e).constructor):t.apply(e,n))}function bfe(e,t){if(t&&(vs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jfe(e)}function jfe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(m3=function(){return!!e})()}function vp(e){return vp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},vp(e)}function Sfe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vx(e,t)}function Vx(e,t){return Vx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Vx(e,t)}function y3(e,t,n){return t=v3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v3(e){var t=wfe(e,"string");return vs(t)=="symbol"?t:t+""}function wfe(e,t){if(vs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Km=function(e){function t(){return yfe(this,t),xfe(this,t,arguments)}return Sfe(t,e),gfe(t,[{key:"render",value:function(){return null}}])}(O.Component);y3(Km,"displayName","ZAxis");y3(Km,"defaultProps",{zAxisId:0,range:[64,64],scale:"auto",type:"number"});var Ofe=["option","isActive"];function Hc(){return Hc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hc.apply(this,arguments)}function Afe(e,t){if(e==null)return{};var n=Nfe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Nfe(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 Efe(e){var t=e.option,n=e.isActive,r=Afe(e,Ofe);return typeof t=="string"?O.createElement(rp,Hc({option:O.createElement(bm,Hc({type:t},r)),isActive:n,shapeType:"symbols"},r)):O.createElement(rp,Hc({option:t,isActive:n,shapeType:"symbols"},r))}function gs(e){"@babel/helpers - typeof";return gs=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},gs(e)}function Fc(){return Fc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fc.apply(this,arguments)}function BN(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 In(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BN(Object(n),!0).forEach(function(r){ni(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IN(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,x3(r.key),r)}}function _fe(e,t,n){return t&&IN(e.prototype,t),n&&IN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Tfe(e,t,n){return t=gp(t),Pfe(e,g3()?Reflect.construct(t,n||[],gp(e).constructor):t.apply(e,n))}function Pfe(e,t){if(t&&(gs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mfe(e)}function Mfe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(g3=function(){return!!e})()}function gp(e){return gp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},gp(e)}function $fe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yx(e,t)}function Yx(e,t){return Yx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Yx(e,t)}function ni(e,t,n){return t=x3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x3(e){var t=Rfe(e,"string");return gs(t)=="symbol"?t:t+""}function Rfe(e,t){if(gs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Vm=function(e){function t(){var n;Cfe(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=Tfe(this,t,[].concat(a)),ni(n,"state",{isAnimationFinished:!1}),ni(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0})}),ni(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1})}),ni(n,"id",Ni("recharts-scatter-")),n}return $fe(t,e),_fe(t,[{key:"renderSymbolsStatically",value:function(r){var a=this,i=this.props,l=i.shape,s=i.activeShape,c=i.activeIndex,u=re(this.props,!1);return r.map(function(f,d){var h=c===d,m=h?s:l,j=In(In({},u),f);return T.createElement(me,Fc({className:"recharts-scatter-symbol",key:"symbol-".concat(f==null?void 0:f.cx,"-").concat(f==null?void 0:f.cy,"-").concat(f==null?void 0:f.size,"-").concat(d)},bi(a.props,f,d),{role:"img"}),T.createElement(Efe,Fc({option:m,isActive:h,key:"symbol-".concat(d)},j)))})}},{key:"renderSymbolsWithAnimation",value:function(){var r=this,a=this.props,i=a.points,l=a.isAnimationActive,s=a.animationBegin,c=a.animationDuration,u=a.animationEasing,f=a.animationId,d=this.state.prevPoints;return T.createElement(rr,{begin:s,duration:c,isActive:l,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(h){var m=h.t,j=i.map(function(v,p){var y=d&&d[p];if(y){var g=nt(y.cx,v.cx),b=nt(y.cy,v.cy),x=nt(y.size,v.size);return In(In({},v),{},{cx:g(m),cy:b(m),size:x(m)})}var w=nt(0,v.size);return In(In({},v),{},{size:w(m)})});return T.createElement(me,null,r.renderSymbolsStatically(j))})}},{key:"renderSymbols",value:function(){var r=this.props,a=r.points,i=r.isAnimationActive,l=this.state.prevPoints;return i&&a&&a.length&&(!l||!ji(l,a))?this.renderSymbolsWithAnimation():this.renderSymbolsStatically(a)}},{key:"renderErrorBar",value:function(){var r=this.props.isAnimationActive;if(r&&!this.state.isAnimationFinished)return null;var a=this.props,i=a.points,l=a.xAxis,s=a.yAxis,c=a.children,u=an(c,Xs);return u?u.map(function(f,d){var h=f.props,m=h.direction,j=h.dataKey;return T.cloneElement(f,{key:"".concat(m,"-").concat(j,"-").concat(i[d]),data:i,xAxis:l,yAxis:s,layout:m==="x"?"vertical":"horizontal",dataPointFormatter:function(p,y){return{x:p.cx,y:p.cy,value:m==="x"?+p.node.x:+p.node.y,errorVal:Qe(p,y)}}})}):null}},{key:"renderLine",value:function(){var r=this.props,a=r.points,i=r.line,l=r.lineType,s=r.lineJointType,c=re(this.props,!1),u=re(i,!1),f,d;if(l==="joint")f=a.map(function(b){return{x:b.cx,y:b.cy}});else if(l==="fitting"){var h=m9(a),m=h.xmin,j=h.xmax,v=h.a,p=h.b,y=function(x){return v*x+p};f=[{x:m,y:y(m)},{x:j,y:y(j)}]}var g=In(In(In({},c),{},{fill:"none",stroke:c&&c.fill},u),{},{points:f});return T.isValidElement(i)?d=T.cloneElement(i,g):se(i)?d=i(g):d=T.createElement(hi,Fc({},g,{type:s})),T.createElement(me,{className:"recharts-scatter-line",key:"recharts-scatter-line"},d)}},{key:"render",value:function(){var r=this.props,a=r.hide,i=r.points,l=r.line,s=r.className,c=r.xAxis,u=r.yAxis,f=r.left,d=r.top,h=r.width,m=r.height,j=r.id,v=r.isAnimationActive;if(a||!i||!i.length)return null;var p=this.state.isAnimationFinished,y=de("recharts-scatter",s),g=c&&c.allowDataOverflow,b=u&&u.allowDataOverflow,x=g||b,w=le(j)?this.id:j;return T.createElement(me,{className:y,clipPath:x?"url(#clipPath-".concat(w,")"):null},g||b?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(w)},T.createElement("rect",{x:g?f:f-h/2,y:b?d:d-m/2,width:g?h:h*2,height:b?m:m*2}))):null,l&&this.renderLine(),this.renderErrorBar(),T.createElement(me,{key:"recharts-scatter-symbols"},this.renderSymbols()),(!v||p)&&vr.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:a.curPoints}:r.points!==a.curPoints?{curPoints:r.points}:null}}])}(O.PureComponent);ni(Vm,"displayName","Scatter");ni(Vm,"defaultProps",{xAxisId:0,yAxisId:0,zAxisId:0,legendType:"circle",lineType:"joint",lineJointType:"linear",data:[],shape:"circle",hide:!1,isAnimationActive:!Ea.isSsr,animationBegin:0,animationDuration:400,animationEasing:"linear"});ni(Vm,"getComposedData",function(e){var t=e.xAxis,n=e.yAxis,r=e.zAxis,a=e.item,i=e.displayedData,l=e.xAxisTicks,s=e.yAxisTicks,c=e.offset,u=a.props.tooltipType,f=an(a.props.children,vf),d=le(t.dataKey)?a.props.dataKey:t.dataKey,h=le(n.dataKey)?a.props.dataKey:n.dataKey,m=r&&r.dataKey,j=r?r.range:Km.defaultProps.range,v=j&&j[0],p=t.scale.bandwidth?t.scale.bandwidth():0,y=n.scale.bandwidth?n.scale.bandwidth():0,g=i.map(function(b,x){var w=Qe(b,d),S=Qe(b,h),A=!le(m)&&Qe(b,m)||"-",N=[{name:le(t.dataKey)?a.props.name:t.name||t.dataKey,unit:t.unit||"",value:w,payload:b,dataKey:d,type:u},{name:le(n.dataKey)?a.props.name:n.name||n.dataKey,unit:n.unit||"",value:S,payload:b,dataKey:h,type:u}];A!=="-"&&N.push({name:r.name||r.dataKey,unit:r.unit||"",value:A,payload:b,dataKey:m,type:u});var C=rs({axis:t,ticks:l,bandSize:p,entry:b,index:x,dataKey:d}),M=rs({axis:n,ticks:s,bandSize:y,entry:b,index:x,dataKey:h}),R=A!=="-"?r.scale(A):v,P=Math.sqrt(Math.max(R,0)/Math.PI);return In(In({},b),{},{cx:C,cy:M,x:C-P,y:M-P,xAxis:t,yAxis:n,zAxis:r,width:2*P,height:2*P,size:R,node:{x:w,y:S,z:A},tooltipPayload:N,tooltipPosition:{x:C,y:M},payload:b},f&&f[x]&&f[x].props)});return In({points:g},c)});function xs(e){"@babel/helpers - typeof";return xs=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},xs(e)}function kfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dfe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,S3(r.key),r)}}function Lfe(e,t,n){return t&&Dfe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function zfe(e,t,n){return t=xp(t),Bfe(e,b3()?Reflect.construct(t,n||[],xp(e).constructor):t.apply(e,n))}function Bfe(e,t){if(t&&(xs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ife(e)}function Ife(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(b3=function(){return!!e})()}function xp(e){return xp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xp(e)}function Ufe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xx(e,t)}function Xx(e,t){return Xx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Xx(e,t)}function j3(e,t,n){return t=S3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S3(e){var t=qfe(e,"string");return xs(t)=="symbol"?t:t+""}function qfe(e,t){if(xs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Qx(){return Qx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qx.apply(this,arguments)}function Hfe(e){var t=e.xAxisId,n=E1(),r=C1(),a=W$(t);return a==null?null:O.createElement(Qs,Qx({},a,{className:de("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(l){return ca(l,!0)}}))}var gr=function(e){function t(){return kfe(this,t),zfe(this,t,arguments)}return Ufe(t,e),Lfe(t,[{key:"render",value:function(){return O.createElement(Hfe,this.props)}}])}(O.Component);j3(gr,"displayName","XAxis");j3(gr,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function bs(e){"@babel/helpers - typeof";return bs=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},bs(e)}function Ffe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gfe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,A3(r.key),r)}}function Kfe(e,t,n){return t&&Gfe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Vfe(e,t,n){return t=bp(t),Yfe(e,w3()?Reflect.construct(t,n||[],bp(e).constructor):t.apply(e,n))}function Yfe(e,t){if(t&&(bs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Xfe(e)}function Xfe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(w3=function(){return!!e})()}function bp(e){return bp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},bp(e)}function Qfe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wx(e,t)}function Wx(e,t){return Wx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Wx(e,t)}function O3(e,t,n){return t=A3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A3(e){var t=Wfe(e,"string");return bs(t)=="symbol"?t:t+""}function Wfe(e,t){if(bs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(bs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Zx(){return Zx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zx.apply(this,arguments)}var Zfe=function(t){var n=t.yAxisId,r=E1(),a=C1(),i=Z$(n);return i==null?null:O.createElement(Qs,Zx({},i,{className:de("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:a},ticksGenerator:function(s){return ca(s,!0)}}))},xr=function(e){function t(){return Ffe(this,t),Vfe(this,t,arguments)}return Qfe(t,e),Kfe(t,[{key:"render",value:function(){return O.createElement(Zfe,this.props)}}])}(O.Component);O3(xr,"displayName","YAxis");O3(xr,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function UN(e){return nde(e)||tde(e)||ede(e)||Jfe()}function Jfe(){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 ede(e,t){if(e){if(typeof e=="string")return Jx(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 Jx(e,t)}}function tde(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function nde(e){if(Array.isArray(e))return Jx(e)}function Jx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var eb=function(t,n,r,a,i){var l=an(t,ta),s=an(t,Hm),c=[].concat(UN(l),UN(s)),u=an(t,Gm),f="".concat(a,"Id"),d=a[0],h=n;if(c.length&&(h=c.reduce(function(v,p){if(p.props[f]===r&&Br(p.props,"extendDomain")&&Y(p.props[d])){var y=p.props[d];return[Math.min(v[0],y),Math.max(v[1],y)]}return v},h)),u.length){var m="".concat(d,"1"),j="".concat(d,"2");h=u.reduce(function(v,p){if(p.props[f]===r&&Br(p.props,"extendDomain")&&Y(p.props[m])&&Y(p.props[j])){var y=p.props[m],g=p.props[j];return[Math.min(v[0],y,g),Math.max(v[1],y,g)]}return v},h)}return i&&i.length&&(h=i.reduce(function(v,p){return Y(p)?[Math.min(v[0],p),Math.max(v[1],p)]:v},h)),h},N3={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function a(c,u,f){this.fn=c,this.context=u,this.once=f||!1}function i(c,u,f,d,h){if(typeof f!="function")throw new TypeError("The listener must be a function");var m=new a(f,d||c,h),j=n?n+u:u;return c._events[j]?c._events[j].fn?c._events[j]=[c._events[j],m]:c._events[j].push(m):(c._events[j]=m,c._eventsCount++),c}function l(c,u){--c._eventsCount===0?c._events=new r:delete c._events[u]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var u=[],f,d;if(this._eventsCount===0)return u;for(d in f=this._events)t.call(f,d)&&u.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(f)):u},s.prototype.listeners=function(u){var f=n?n+u:u,d=this._events[f];if(!d)return[];if(d.fn)return[d.fn];for(var h=0,m=d.length,j=new Array(m);h<m;h++)j[h]=d[h].fn;return j},s.prototype.listenerCount=function(u){var f=n?n+u:u,d=this._events[f];return d?d.fn?1:d.length:0},s.prototype.emit=function(u,f,d,h,m,j){var v=n?n+u:u;if(!this._events[v])return!1;var p=this._events[v],y=arguments.length,g,b;if(p.fn){switch(p.once&&this.removeListener(u,p.fn,void 0,!0),y){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,f),!0;case 3:return p.fn.call(p.context,f,d),!0;case 4:return p.fn.call(p.context,f,d,h),!0;case 5:return p.fn.call(p.context,f,d,h,m),!0;case 6:return p.fn.call(p.context,f,d,h,m,j),!0}for(b=1,g=new Array(y-1);b<y;b++)g[b-1]=arguments[b];p.fn.apply(p.context,g)}else{var x=p.length,w;for(b=0;b<x;b++)switch(p[b].once&&this.removeListener(u,p[b].fn,void 0,!0),y){case 1:p[b].fn.call(p[b].context);break;case 2:p[b].fn.call(p[b].context,f);break;case 3:p[b].fn.call(p[b].context,f,d);break;case 4:p[b].fn.call(p[b].context,f,d,h);break;default:if(!g)for(w=1,g=new Array(y-1);w<y;w++)g[w-1]=arguments[w];p[b].fn.apply(p[b].context,g)}}return!0},s.prototype.on=function(u,f,d){return i(this,u,f,d,!1)},s.prototype.once=function(u,f,d){return i(this,u,f,d,!0)},s.prototype.removeListener=function(u,f,d,h){var m=n?n+u:u;if(!this._events[m])return this;if(!f)return l(this,m),this;var j=this._events[m];if(j.fn)j.fn===f&&(!h||j.once)&&(!d||j.context===d)&&l(this,m);else{for(var v=0,p=[],y=j.length;v<y;v++)(j[v].fn!==f||h&&!j[v].once||d&&j[v].context!==d)&&p.push(j[v]);p.length?this._events[m]=p.length===1?p[0]:p:l(this,m)}return this},s.prototype.removeAllListeners=function(u){var f;return u?(f=n?n+u:u,this._events[f]&&l(this,f)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s})(N3);var rde=N3.exports;const ade=_e(rde);var hv=new ade,pv="recharts.syncMouseEvents";function qu(e){"@babel/helpers - typeof";return qu=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},qu(e)}function ide(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lde(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,E3(r.key),r)}}function ode(e,t,n){return t&&lde(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function mv(e,t,n){return t=E3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E3(e){var t=sde(e,"string");return qu(t)=="symbol"?t:t+""}function sde(e,t){if(qu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var cde=function(){function e(){ide(this,e),mv(this,"activeIndex",0),mv(this,"coordinateList",[]),mv(this,"layout","horizontal")}return ode(e,[{key:"setDetails",value:function(n){var r,a=n.coordinateList,i=a===void 0?null:a,l=n.container,s=l===void 0?null:l,c=n.layout,u=c===void 0?null:c,f=n.offset,d=f===void 0?null:f,h=n.mouseHandlerCallback,m=h===void 0?null:h;this.coordinateList=(r=i??this.coordinateList)!==null&&r!==void 0?r:[],this.container=s??this.container,this.layout=u??this.layout,this.offset=d??this.offset,this.mouseHandlerCallback=m??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var a=this.container.getBoundingClientRect(),i=a.x,l=a.y,s=a.height,c=this.coordinateList[this.activeIndex].coordinate,u=((n=window)===null||n===void 0?void 0:n.scrollX)||0,f=((r=window)===null||r===void 0?void 0:r.scrollY)||0,d=i+c+u,h=l+this.offset.top+s/2+f;this.mouseHandlerCallback({pageX:d,pageY:h})}}}])}();function ude(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e==null?void 0:e[0],a=e==null?void 0:e[1];if(r&&a&&Y(r)&&Y(a))return!0}return!1}function fde(e,t,n,r){var a=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-a,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function C3(e){var t=e.cx,n=e.cy,r=e.radius,a=e.startAngle,i=e.endAngle,l=He(t,n,r,a),s=He(t,n,r,i);return{points:[l,s],cx:t,cy:n,radius:r,startAngle:a,endAngle:i}}function dde(e,t,n){var r,a,i,l;if(e==="horizontal")r=t.x,i=r,a=n.top,l=n.top+n.height;else if(e==="vertical")a=t.y,l=a,r=n.left,i=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var s=t.cx,c=t.cy,u=t.innerRadius,f=t.outerRadius,d=t.angle,h=He(s,c,u,d),m=He(s,c,f,d);r=h.x,a=h.y,i=m.x,l=m.y}else return C3(t);return[{x:r,y:a},{x:i,y:l}]}function Hu(e){"@babel/helpers - typeof";return Hu=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},Hu(e)}function qN(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 id(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qN(Object(n),!0).forEach(function(r){hde(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hde(e,t,n){return t=pde(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pde(e){var t=mde(e,"string");return Hu(t)=="symbol"?t:t+""}function mde(e,t){if(Hu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Hu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yde(e){var t,n,r=e.element,a=e.tooltipEventType,i=e.isActive,l=e.activeCoordinate,s=e.activePayload,c=e.offset,u=e.activeTooltipIndex,f=e.tooltipAxisBandSize,d=e.layout,h=e.chartName,m=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!m||!i||!l||h!=="ScatterChart"&&a!=="axis")return null;var j,v=hi;if(h==="ScatterChart")j=l,v=ile;else if(h==="BarChart")j=fde(d,l,c,f),v=w1;else if(d==="radial"){var p=C3(l),y=p.cx,g=p.cy,b=p.radius,x=p.startAngle,w=p.endAngle;j={cx:y,cy:g,startAngle:x,endAngle:w,innerRadius:b,outerRadius:b},v=v$}else j={points:dde(d,l,c)},v=hi;var S=id(id(id(id({stroke:"#ccc",pointerEvents:"none"},c),j),re(m,!1)),{},{payload:s,payloadIndex:u,className:de("recharts-tooltip-cursor",m.className)});return O.isValidElement(m)?O.cloneElement(m,S):O.createElement(v,S)}var vde=["item"],gde=["children","className","width","height","style","compact","title","desc"];function js(e){"@babel/helpers - typeof";return js=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},js(e)}function ho(){return ho=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ho.apply(this,arguments)}function HN(e,t){return jde(e)||bde(e,t)||T3(e,t)||xde()}function xde(){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 bde(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,s=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return s}}function jde(e){if(Array.isArray(e))return e}function FN(e,t){if(e==null)return{};var n=Sde(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Sde(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 wde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ode(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,P3(r.key),r)}}function Ade(e,t,n){return t&&Ode(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Nde(e,t,n){return t=jp(t),Ede(e,_3()?Reflect.construct(t,n||[],jp(e).constructor):t.apply(e,n))}function Ede(e,t){if(t&&(js(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Cde(e)}function Cde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_3=function(){return!!e})()}function jp(e){return jp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},jp(e)}function _de(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tb(e,t)}function tb(e,t){return tb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},tb(e,t)}function Ss(e){return Mde(e)||Pde(e)||T3(e)||Tde()}function Tde(){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 T3(e,t){if(e){if(typeof e=="string")return nb(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 nb(e,t)}}function Pde(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Mde(e){if(Array.isArray(e))return nb(e)}function nb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function GN(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 U(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GN(Object(n),!0).forEach(function(r){ce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ce(e,t,n){return t=P3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P3(e){var t=$de(e,"string");return js(t)=="symbol"?t:t+""}function $de(e,t){if(js(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(js(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Rde={xAxis:["bottom","top"],yAxis:["left","right"]},kde={width:"100%",height:"100%"},M3={x:0,y:0};function ld(e){return e}var Dde=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},Lde=function(t,n,r,a){var i=n.find(function(f){return f&&f.index===r});if(i){if(t==="horizontal")return{x:i.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:i.coordinate};if(t==="centric"){var l=i.coordinate,s=a.radius;return U(U(U({},a),He(a.cx,a.cy,s,l)),{},{angle:l,radius:s})}var c=i.coordinate,u=a.angle;return U(U(U({},a),He(a.cx,a.cy,c,u)),{},{angle:u,radius:c})}return M3},Ym=function(t,n){var r=n.graphicalItems,a=n.dataStartIndex,i=n.dataEndIndex,l=(r??[]).reduce(function(s,c){var u=c.props.data;return u&&u.length?[].concat(Ss(s),Ss(u)):s},[]);return l.length>0?l:t&&t.length&&Y(a)&&Y(i)?t.slice(a,i+1):[]};function $3(e){return e==="number"?[0,"auto"]:void 0}var rb=function(t,n,r,a){var i=t.graphicalItems,l=t.tooltipAxis,s=Ym(n,t);return r<0||!i||!i.length||r>=s.length?null:i.reduce(function(c,u){var f,d=(f=u.props.data)!==null&&f!==void 0?f:n;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(l.dataKey&&!l.allowDuplicatedCategory){var m=d===void 0?s:d;h=yh(m,l.dataKey,a)}else h=d&&d[r]||s[r];return h?[].concat(Ss(c),[f$(u,h)]):c},[])},KN=function(t,n,r,a){var i=a||{x:t.chartX,y:t.chartY},l=Dde(i,r),s=t.orderedTooltipTicks,c=t.tooltipAxis,u=t.tooltipTicks,f=Ane(l,s,u,c);if(f>=0&&u){var d=u[f]&&u[f].value,h=rb(t,n,f,d),m=Lde(r,s,f,i);return{activeTooltipIndex:f,activeLabel:d,activePayload:h,activeCoordinate:m}}return null},zde=function(t,n){var r=n.axes,a=n.graphicalItems,i=n.axisType,l=n.axisIdKey,s=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,f=t.layout,d=t.children,h=t.stackOffset,m=i$(f,i);return r.reduce(function(j,v){var p,y=v.type.defaultProps!==void 0?U(U({},v.type.defaultProps),v.props):v.props,g=y.type,b=y.dataKey,x=y.allowDataOverflow,w=y.allowDuplicatedCategory,S=y.scale,A=y.ticks,N=y.includeHidden,C=y[l];if(j[C])return j;var M=Ym(t.data,{graphicalItems:a.filter(function(Q){var ie,ae=l in Q.props?Q.props[l]:(ie=Q.type.defaultProps)===null||ie===void 0?void 0:ie[l];return ae===C}),dataStartIndex:c,dataEndIndex:u}),R=M.length,P,B,_;ude(y.domain,x,g)&&(P=px(y.domain,null,x),m&&(g==="number"||S!=="auto")&&(_=zc(M,b,"category")));var E=$3(g);if(!P||P.length===0){var $,L=($=y.domain)!==null&&$!==void 0?$:E;if(b){if(P=zc(M,b,g),g==="category"&&m){var q=p9(P);w&&q?(B=P,P=ip(0,R)):w||(P=hA(L,P,v).reduce(function(Q,ie){return Q.indexOf(ie)>=0?Q:[].concat(Ss(Q),[ie])},[]))}else if(g==="category")w?P=P.filter(function(Q){return Q!==""&&!le(Q)}):P=hA(L,P,v).reduce(function(Q,ie){return Q.indexOf(ie)>=0||ie===""||le(ie)?Q:[].concat(Ss(Q),[ie])},[]);else if(g==="number"){var V=Tne(M,a.filter(function(Q){var ie,ae,Se=l in Q.props?Q.props[l]:(ie=Q.type.defaultProps)===null||ie===void 0?void 0:ie[l],Xt="hide"in Q.props?Q.props.hide:(ae=Q.type.defaultProps)===null||ae===void 0?void 0:ae.hide;return Se===C&&(N||!Xt)}),b,i,f);V&&(P=V)}m&&(g==="number"||S!=="auto")&&(_=zc(M,b,"category"))}else m?P=ip(0,R):s&&s[C]&&s[C].hasStack&&g==="number"?P=h==="expand"?[0,1]:u$(s[C].stackGroups,c,u):P=a$(M,a.filter(function(Q){var ie=l in Q.props?Q.props[l]:Q.type.defaultProps[l],ae="hide"in Q.props?Q.props.hide:Q.type.defaultProps.hide;return ie===C&&(N||!ae)}),g,f,!0);if(g==="number")P=eb(d,P,C,i,A),L&&(P=px(L,P,x));else if(g==="category"&&L){var X=L,J=P.every(function(Q){return X.indexOf(Q)>=0});J&&(P=X)}}return U(U({},j),{},ce({},C,U(U({},y),{},{axisType:i,domain:P,categoricalDomain:_,duplicateDomain:B,originalDomain:(p=y.domain)!==null&&p!==void 0?p:E,isCategorical:m,layout:f})))},{})},Bde=function(t,n){var r=n.graphicalItems,a=n.Axis,i=n.axisType,l=n.axisIdKey,s=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,f=t.layout,d=t.children,h=Ym(t.data,{graphicalItems:r,dataStartIndex:c,dataEndIndex:u}),m=h.length,j=i$(f,i),v=-1;return r.reduce(function(p,y){var g=y.type.defaultProps!==void 0?U(U({},y.type.defaultProps),y.props):y.props,b=g[l],x=$3("number");if(!p[b]){v++;var w;return j?w=ip(0,m):s&&s[b]&&s[b].hasStack?(w=u$(s[b].stackGroups,c,u),w=eb(d,w,b,i)):(w=px(x,a$(h,r.filter(function(S){var A,N,C=l in S.props?S.props[l]:(A=S.type.defaultProps)===null||A===void 0?void 0:A[l],M="hide"in S.props?S.props.hide:(N=S.type.defaultProps)===null||N===void 0?void 0:N.hide;return C===b&&!M}),"number",f),a.defaultProps.allowDataOverflow),w=eb(d,w,b,i)),U(U({},p),{},ce({},b,U(U({axisType:i},a.defaultProps),{},{hide:!0,orientation:Pn(Rde,"".concat(i,".").concat(v%2),null),domain:w,originalDomain:x,isCategorical:j,layout:f})))}return p},{})},Ide=function(t,n){var r=n.axisType,a=r===void 0?"xAxis":r,i=n.AxisComp,l=n.graphicalItems,s=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,f=t.children,d="".concat(a,"Id"),h=an(f,i),m={};return h&&h.length?m=zde(t,{axes:h,graphicalItems:l,axisType:a,axisIdKey:d,stackGroups:s,dataStartIndex:c,dataEndIndex:u}):l&&l.length&&(m=Bde(t,{Axis:i,graphicalItems:l,axisType:a,axisIdKey:d,stackGroups:s,dataStartIndex:c,dataEndIndex:u})),m},Ude=function(t){var n=qa(t),r=ca(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:Q0(r,function(a){return a.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Gh(n,r)}},VN=function(t){var n=t.children,r=t.defaultShowTooltip,a=jn(n,cs),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}},qde=function(t){return!t||!t.length?!1:t.some(function(n){var r=ha(n&&n.type);return r&&r.indexOf("Bar")>=0})},YN=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"}},Hde=function(t,n){var r=t.props,a=t.graphicalItems,i=t.xAxisMap,l=i===void 0?{}:i,s=t.yAxisMap,c=s===void 0?{}:s,u=r.width,f=r.height,d=r.children,h=r.margin||{},m=jn(d,cs),j=jn(d,Qn),v=Object.keys(c).reduce(function(w,S){var A=c[S],N=A.orientation;return!A.mirror&&!A.hide?U(U({},w),{},ce({},N,w[N]+A.width)):w},{left:h.left||0,right:h.right||0}),p=Object.keys(l).reduce(function(w,S){var A=l[S],N=A.orientation;return!A.mirror&&!A.hide?U(U({},w),{},ce({},N,Pn(w,"".concat(N))+A.height)):w},{top:h.top||0,bottom:h.bottom||0}),y=U(U({},p),v),g=y.bottom;m&&(y.bottom+=m.props.height||cs.defaultProps.height),j&&n&&(y=Cne(y,a,r,n));var b=u-y.left-y.right,x=f-y.top-y.bottom;return U(U({brushBottom:g},y),{},{width:Math.max(b,0),height:Math.max(x,0)})},Fde=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},wf=function(t){var n=t.chartName,r=t.GraphicalChild,a=t.defaultTooltipEventType,i=a===void 0?"axis":a,l=t.validateTooltipEventTypes,s=l===void 0?["axis"]:l,c=t.axisComponents,u=t.legendContent,f=t.formatAxisMap,d=t.defaultProps,h=function(y,g){var b=g.graphicalItems,x=g.stackGroups,w=g.offset,S=g.updateId,A=g.dataStartIndex,N=g.dataEndIndex,C=y.barSize,M=y.layout,R=y.barGap,P=y.barCategoryGap,B=y.maxBarSize,_=YN(M),E=_.numericAxisName,$=_.cateAxisName,L=qde(b),q=[];return b.forEach(function(V,X){var J=Ym(y.data,{graphicalItems:[V],dataStartIndex:A,dataEndIndex:N}),Q=V.type.defaultProps!==void 0?U(U({},V.type.defaultProps),V.props):V.props,ie=Q.dataKey,ae=Q.maxBarSize,Se=Q["".concat(E,"Id")],Xt=Q["".concat($,"Id")],Nr={},Ge=c.reduce(function(Pi,Mi){var Xm=g["".concat(Mi.axisType,"Map")],R1=Q["".concat(Mi.axisType,"Id")];Xm&&Xm[R1]||Mi.axisType==="zAxis"||Ol();var k1=Xm[R1];return U(U({},Pi),{},ce(ce({},Mi.axisType,k1),"".concat(Mi.axisType,"Ticks"),ca(k1)))},Nr),Z=Ge[$],oe=Ge["".concat($,"Ticks")],W=x&&x[Se]&&x[Se].hasStack&&Bne(V,x[Se].stackGroups),G=ha(V.type).indexOf("Bar")>=0,Te=Gh(Z,oe),ye=[],ot=L&&Nne({barSize:C,stackGroups:x,totalSize:Fde(Ge,$)});if(G){var dt,yt,Pa=le(ae)?B:ae,Dl=(dt=(yt=Gh(Z,oe,!0))!==null&&yt!==void 0?yt:Pa)!==null&&dt!==void 0?dt:0;ye=Ene({barGap:R,barCategoryGap:P,bandSize:Dl!==Te?Dl:Te,sizeList:ot[Xt],maxBarSize:Pa}),Dl!==Te&&(ye=ye.map(function(Pi){return U(U({},Pi),{},{position:U(U({},Pi.position),{},{offset:Pi.position.offset-Dl/2})})}))}var Of=V&&V.type&&V.type.getComposedData;Of&&q.push({props:U(U({},Of(U(U({},Ge),{},{displayedData:J,props:y,dataKey:ie,item:V,bandSize:Te,barPosition:ye,offset:w,stackedData:W,layout:M,dataStartIndex:A,dataEndIndex:N}))),{},ce(ce(ce({key:V.key||"item-".concat(X)},E,Ge[E]),$,Ge[$]),"animationId",S)),childIndex:E9(V,y.children),item:V})}),q},m=function(y,g){var b=y.props,x=y.dataStartIndex,w=y.dataEndIndex,S=y.updateId;if(!ow({props:b}))return null;var A=b.children,N=b.layout,C=b.stackOffset,M=b.data,R=b.reverseStackOrder,P=YN(N),B=P.numericAxisName,_=P.cateAxisName,E=an(A,r),$=Lne(M,E,"".concat(B,"Id"),"".concat(_,"Id"),C,R),L=c.reduce(function(Q,ie){var ae="".concat(ie.axisType,"Map");return U(U({},Q),{},ce({},ae,Ide(b,U(U({},ie),{},{graphicalItems:E,stackGroups:ie.axisType===B&&$,dataStartIndex:x,dataEndIndex:w}))))},{}),q=Hde(U(U({},L),{},{props:b,graphicalItems:E}),g==null?void 0:g.legendBBox);Object.keys(L).forEach(function(Q){L[Q]=f(b,L[Q],q,Q.replace("Map",""),n)});var V=L["".concat(_,"Map")],X=Ude(V),J=h(b,U(U({},L),{},{dataStartIndex:x,dataEndIndex:w,updateId:S,graphicalItems:E,stackGroups:$,offset:q}));return U(U({formattedGraphicalItems:J,graphicalItems:E,offset:q,stackGroups:$},X),L)},j=function(p){function y(g){var b,x,w;return wde(this,y),w=Nde(this,y,[g]),ce(w,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ce(w,"accessibilityManager",new cde),ce(w,"handleLegendBBoxUpdate",function(S){if(S){var A=w.state,N=A.dataStartIndex,C=A.dataEndIndex,M=A.updateId;w.setState(U({legendBBox:S},m({props:w.props,dataStartIndex:N,dataEndIndex:C,updateId:M},U(U({},w.state),{},{legendBBox:S}))))}}),ce(w,"handleReceiveSyncEvent",function(S,A,N){if(w.props.syncId===S){if(N===w.eventEmitterSymbol&&typeof w.props.syncMethod!="function")return;w.applySyncEvent(A)}}),ce(w,"handleBrushChange",function(S){var A=S.startIndex,N=S.endIndex;if(A!==w.state.dataStartIndex||N!==w.state.dataEndIndex){var C=w.state.updateId;w.setState(function(){return U({dataStartIndex:A,dataEndIndex:N},m({props:w.props,dataStartIndex:A,dataEndIndex:N,updateId:C},w.state))}),w.triggerSyncEvent({dataStartIndex:A,dataEndIndex:N})}}),ce(w,"handleMouseEnter",function(S){var A=w.getMouseInfo(S);if(A){var N=U(U({},A),{},{isTooltipActive:!0});w.setState(N),w.triggerSyncEvent(N);var C=w.props.onMouseEnter;se(C)&&C(N,S)}}),ce(w,"triggeredAfterMouseMove",function(S){var A=w.getMouseInfo(S),N=A?U(U({},A),{},{isTooltipActive:!0}):{isTooltipActive:!1};w.setState(N),w.triggerSyncEvent(N);var C=w.props.onMouseMove;se(C)&&C(N,S)}),ce(w,"handleItemMouseEnter",function(S){w.setState(function(){return{isTooltipActive:!0,activeItem:S,activePayload:S.tooltipPayload,activeCoordinate:S.tooltipPosition||{x:S.cx,y:S.cy}}})}),ce(w,"handleItemMouseLeave",function(){w.setState(function(){return{isTooltipActive:!1}})}),ce(w,"handleMouseMove",function(S){S.persist(),w.throttleTriggeredAfterMouseMove(S)}),ce(w,"handleMouseLeave",function(S){w.throttleTriggeredAfterMouseMove.cancel();var A={isTooltipActive:!1};w.setState(A),w.triggerSyncEvent(A);var N=w.props.onMouseLeave;se(N)&&N(A,S)}),ce(w,"handleOuterEvent",function(S){var A=N9(S),N=Pn(w.props,"".concat(A));if(A&&se(N)){var C,M;/.*touch.*/i.test(A)?M=w.getMouseInfo(S.changedTouches[0]):M=w.getMouseInfo(S),N((C=M)!==null&&C!==void 0?C:{},S)}}),ce(w,"handleClick",function(S){var A=w.getMouseInfo(S);if(A){var N=U(U({},A),{},{isTooltipActive:!0});w.setState(N),w.triggerSyncEvent(N);var C=w.props.onClick;se(C)&&C(N,S)}}),ce(w,"handleMouseDown",function(S){var A=w.props.onMouseDown;if(se(A)){var N=w.getMouseInfo(S);A(N,S)}}),ce(w,"handleMouseUp",function(S){var A=w.props.onMouseUp;if(se(A)){var N=w.getMouseInfo(S);A(N,S)}}),ce(w,"handleTouchMove",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&w.throttleTriggeredAfterMouseMove(S.changedTouches[0])}),ce(w,"handleTouchStart",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&w.handleMouseDown(S.changedTouches[0])}),ce(w,"handleTouchEnd",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&w.handleMouseUp(S.changedTouches[0])}),ce(w,"handleDoubleClick",function(S){var A=w.props.onDoubleClick;if(se(A)){var N=w.getMouseInfo(S);A(N,S)}}),ce(w,"handleContextMenu",function(S){var A=w.props.onContextMenu;if(se(A)){var N=w.getMouseInfo(S);A(N,S)}}),ce(w,"triggerSyncEvent",function(S){w.props.syncId!==void 0&&hv.emit(pv,w.props.syncId,S,w.eventEmitterSymbol)}),ce(w,"applySyncEvent",function(S){var A=w.props,N=A.layout,C=A.syncMethod,M=w.state.updateId,R=S.dataStartIndex,P=S.dataEndIndex;if(S.dataStartIndex!==void 0||S.dataEndIndex!==void 0)w.setState(U({dataStartIndex:R,dataEndIndex:P},m({props:w.props,dataStartIndex:R,dataEndIndex:P,updateId:M},w.state)));else if(S.activeTooltipIndex!==void 0){var B=S.chartX,_=S.chartY,E=S.activeTooltipIndex,$=w.state,L=$.offset,q=$.tooltipTicks;if(!L)return;if(typeof C=="function")E=C(q,S);else if(C==="value"){E=-1;for(var V=0;V<q.length;V++)if(q[V].value===S.activeLabel){E=V;break}}var X=U(U({},L),{},{x:L.left,y:L.top}),J=Math.min(B,X.x+X.width),Q=Math.min(_,X.y+X.height),ie=q[E]&&q[E].value,ae=rb(w.state,w.props.data,E),Se=q[E]?{x:N==="horizontal"?q[E].coordinate:J,y:N==="horizontal"?Q:q[E].coordinate}:M3;w.setState(U(U({},S),{},{activeLabel:ie,activeCoordinate:Se,activePayload:ae,activeTooltipIndex:E}))}else w.setState(S)}),ce(w,"renderCursor",function(S){var A,N=w.state,C=N.isTooltipActive,M=N.activeCoordinate,R=N.activePayload,P=N.offset,B=N.activeTooltipIndex,_=N.tooltipAxisBandSize,E=w.getTooltipEventType(),$=(A=S.props.active)!==null&&A!==void 0?A:C,L=w.props.layout,q=S.key||"_recharts-cursor";return T.createElement(yde,{key:q,activeCoordinate:M,activePayload:R,activeTooltipIndex:B,chartName:n,element:S,isActive:$,layout:L,offset:P,tooltipAxisBandSize:_,tooltipEventType:E})}),ce(w,"renderPolarAxis",function(S,A,N){var C=Pn(S,"type.axisType"),M=Pn(w.state,"".concat(C,"Map")),R=S.type.defaultProps,P=R!==void 0?U(U({},R),S.props):S.props,B=M&&M[P["".concat(C,"Id")]];return O.cloneElement(S,U(U({},B),{},{className:de(C,B.className),key:S.key||"".concat(A,"-").concat(N),ticks:ca(B,!0)}))}),ce(w,"renderPolarGrid",function(S){var A=S.props,N=A.radialLines,C=A.polarAngles,M=A.polarRadius,R=w.state,P=R.radiusAxisMap,B=R.angleAxisMap,_=qa(P),E=qa(B),$=E.cx,L=E.cy,q=E.innerRadius,V=E.outerRadius;return O.cloneElement(S,{polarAngles:Array.isArray(C)?C:ca(E,!0).map(function(X){return X.coordinate}),polarRadius:Array.isArray(M)?M:ca(_,!0).map(function(X){return X.coordinate}),cx:$,cy:L,innerRadius:q,outerRadius:V,key:S.key||"polar-grid",radialLines:N})}),ce(w,"renderLegend",function(){var S=w.state.formattedGraphicalItems,A=w.props,N=A.children,C=A.width,M=A.height,R=w.props.margin||{},P=C-(R.left||0)-(R.right||0),B=n$({children:N,formattedGraphicalItems:S,legendWidth:P,legendContent:u});if(!B)return null;var _=B.item,E=FN(B,vde);return O.cloneElement(_,U(U({},E),{},{chartWidth:C,chartHeight:M,margin:R,onBBoxUpdate:w.handleLegendBBoxUpdate}))}),ce(w,"renderTooltip",function(){var S,A=w.props,N=A.children,C=A.accessibilityLayer,M=jn(N,Wt);if(!M)return null;var R=w.state,P=R.isTooltipActive,B=R.activeCoordinate,_=R.activePayload,E=R.activeLabel,$=R.offset,L=(S=M.props.active)!==null&&S!==void 0?S:P;return O.cloneElement(M,{viewBox:U(U({},$),{},{x:$.left,y:$.top}),active:L,label:E,payload:L?_:[],coordinate:B,accessibilityLayer:C})}),ce(w,"renderBrush",function(S){var A=w.props,N=A.margin,C=A.data,M=w.state,R=M.offset,P=M.dataStartIndex,B=M.dataEndIndex,_=M.updateId;return O.cloneElement(S,{key:S.key||"_recharts-brush",onChange:td(w.handleBrushChange,S.props.onChange),data:C,x:Y(S.props.x)?S.props.x:R.left,y:Y(S.props.y)?S.props.y:R.top+R.height+R.brushBottom-(N.bottom||0),width:Y(S.props.width)?S.props.width:R.width,startIndex:P,endIndex:B,updateId:"brush-".concat(_)})}),ce(w,"renderReferenceElement",function(S,A,N){if(!S)return null;var C=w,M=C.clipPathId,R=w.state,P=R.xAxisMap,B=R.yAxisMap,_=R.offset,E=S.type.defaultProps||{},$=S.props,L=$.xAxisId,q=L===void 0?E.xAxisId:L,V=$.yAxisId,X=V===void 0?E.yAxisId:V;return O.cloneElement(S,{key:S.key||"".concat(A,"-").concat(N),xAxis:P[q],yAxis:B[X],viewBox:{x:_.left,y:_.top,width:_.width,height:_.height},clipPathId:M})}),ce(w,"renderActivePoints",function(S){var A=S.item,N=S.activePoint,C=S.basePoint,M=S.childIndex,R=S.isRange,P=[],B=A.props.key,_=A.item.type.defaultProps!==void 0?U(U({},A.item.type.defaultProps),A.item.props):A.item.props,E=_.activeDot,$=_.dataKey,L=U(U({index:M,dataKey:$,cx:N.x,cy:N.y,r:4,fill:S1(A.item),strokeWidth:2,stroke:"#fff",payload:N.payload,value:N.value},re(E,!1)),vh(E));return P.push(y.renderActiveDot(E,L,"".concat(B,"-activePoint-").concat(M))),C?P.push(y.renderActiveDot(E,U(U({},L),{},{cx:C.x,cy:C.y}),"".concat(B,"-basePoint-").concat(M))):R&&P.push(null),P}),ce(w,"renderGraphicChild",function(S,A,N){var C=w.filterFormatItem(S,A,N);if(!C)return null;var M=w.getTooltipEventType(),R=w.state,P=R.isTooltipActive,B=R.tooltipAxis,_=R.activeTooltipIndex,E=R.activeLabel,$=w.props.children,L=jn($,Wt),q=C.props,V=q.points,X=q.isRange,J=q.baseLine,Q=C.item.type.defaultProps!==void 0?U(U({},C.item.type.defaultProps),C.item.props):C.item.props,ie=Q.activeDot,ae=Q.hide,Se=Q.activeBar,Xt=Q.activeShape,Nr=!!(!ae&&P&&L&&(ie||Se||Xt)),Ge={};M!=="axis"&&L&&L.props.trigger==="click"?Ge={onClick:td(w.handleItemMouseEnter,S.props.onClick)}:M!=="axis"&&(Ge={onMouseLeave:td(w.handleItemMouseLeave,S.props.onMouseLeave),onMouseEnter:td(w.handleItemMouseEnter,S.props.onMouseEnter)});var Z=O.cloneElement(S,U(U({},C.props),Ge));function oe(Mi){return typeof B.dataKey=="function"?B.dataKey(Mi.payload):null}if(Nr)if(_>=0){var W,G;if(B.dataKey&&!B.allowDuplicatedCategory){var Te=typeof B.dataKey=="function"?oe:"payload.".concat(B.dataKey.toString());W=yh(V,Te,E),G=X&&J&&yh(J,Te,E)}else W=V==null?void 0:V[_],G=X&&J&&J[_];if(Xt||Se){var ye=S.props.activeIndex!==void 0?S.props.activeIndex:_;return[O.cloneElement(S,U(U(U({},C.props),Ge),{},{activeIndex:ye})),null,null]}if(!le(W))return[Z].concat(Ss(w.renderActivePoints({item:C,activePoint:W,basePoint:G,childIndex:_,isRange:X})))}else{var ot,dt=(ot=w.getItemByXY(w.state.activeCoordinate))!==null&&ot!==void 0?ot:{graphicalItem:Z},yt=dt.graphicalItem,Pa=yt.item,Dl=Pa===void 0?S:Pa,Of=yt.childIndex,Pi=U(U(U({},C.props),Ge),{},{activeIndex:Of});return[O.cloneElement(Dl,Pi),null,null]}return X?[Z,null,null]:[Z,null]}),ce(w,"renderCustomized",function(S,A,N){return O.cloneElement(S,U(U({key:"recharts-customized-".concat(N)},w.props),w.state))}),ce(w,"renderMap",{CartesianGrid:{handler:ld,once:!0},ReferenceArea:{handler:w.renderReferenceElement},ReferenceLine:{handler:ld},ReferenceDot:{handler:w.renderReferenceElement},XAxis:{handler:ld},YAxis:{handler:ld},Brush:{handler:w.renderBrush,once:!0},Bar:{handler:w.renderGraphicChild},Line:{handler:w.renderGraphicChild},Area:{handler:w.renderGraphicChild},Radar:{handler:w.renderGraphicChild},RadialBar:{handler:w.renderGraphicChild},Scatter:{handler:w.renderGraphicChild},Pie:{handler:w.renderGraphicChild},Funnel:{handler:w.renderGraphicChild},Tooltip:{handler:w.renderCursor,once:!0},PolarGrid:{handler:w.renderPolarGrid,once:!0},PolarAngleAxis:{handler:w.renderPolarAxis},PolarRadiusAxis:{handler:w.renderPolarAxis},Customized:{handler:w.renderCustomized}}),w.clipPathId="".concat((b=g.id)!==null&&b!==void 0?b:Ni("recharts"),"-clip"),w.throttleTriggeredAfterMouseMove=nM(w.triggeredAfterMouseMove,(x=g.throttleDelay)!==null&&x!==void 0?x:1e3/60),w.state={},w}return _de(y,p),Ade(y,[{key:"componentDidMount",value:function(){var b,x;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(b=this.props.margin.left)!==null&&b!==void 0?b:0,top:(x=this.props.margin.top)!==null&&x!==void 0?x:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var b=this.props,x=b.children,w=b.data,S=b.height,A=b.layout,N=jn(x,Wt);if(N){var C=N.props.defaultIndex;if(!(typeof C!="number"||C<0||C>this.state.tooltipTicks.length-1)){var M=this.state.tooltipTicks[C]&&this.state.tooltipTicks[C].value,R=rb(this.state,w,C,M),P=this.state.tooltipTicks[C].coordinate,B=(this.state.offset.top+S)/2,_=A==="horizontal",E=_?{x:P,y:B}:{y:P,x:B},$=this.state.formattedGraphicalItems.find(function(q){var V=q.item;return V.type.name==="Scatter"});$&&(E=U(U({},E),$.props.points[C].tooltipPosition),R=$.props.points[C].tooltipPayload);var L={activeTooltipIndex:C,isTooltipActive:!0,activeLabel:M,activePayload:R,activeCoordinate:E};this.setState(L),this.renderCursor(N),this.accessibilityManager.setIndex(C)}}}},{key:"getSnapshotBeforeUpdate",value:function(b,x){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==x.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 w,S;this.accessibilityManager.setDetails({offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0}})}return null}},{key:"componentDidUpdate",value:function(b){_g([jn(b.children,Wt)],[jn(this.props.children,Wt)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var b=jn(this.props.children,Wt);if(b&&typeof b.props.shared=="boolean"){var x=b.props.shared?"axis":"item";return s.indexOf(x)>=0?x:i}return i}},{key:"getMouseInfo",value:function(b){if(!this.container)return null;var x=this.container,w=x.getBoundingClientRect(),S=JW(w),A={chartX:Math.round(b.pageX-S.left),chartY:Math.round(b.pageY-S.top)},N=w.width/x.offsetWidth||1,C=this.inRange(A.chartX,A.chartY,N);if(!C)return null;var M=this.state,R=M.xAxisMap,P=M.yAxisMap,B=this.getTooltipEventType(),_=KN(this.state,this.props.data,this.props.layout,C);if(B!=="axis"&&R&&P){var E=qa(R).scale,$=qa(P).scale,L=E&&E.invert?E.invert(A.chartX):null,q=$&&$.invert?$.invert(A.chartY):null;return U(U({},A),{},{xValue:L,yValue:q},_)}return _?U(U({},A),_):null}},{key:"inRange",value:function(b,x){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,S=this.props.layout,A=b/w,N=x/w;if(S==="horizontal"||S==="vertical"){var C=this.state.offset,M=A>=C.left&&A<=C.left+C.width&&N>=C.top&&N<=C.top+C.height;return M?{x:A,y:N}:null}var R=this.state,P=R.angleAxisMap,B=R.radiusAxisMap;if(P&&B){var _=qa(P);return yA({x:A,y:N},_)}return null}},{key:"parseEventsOfWrapper",value:function(){var b=this.props.children,x=this.getTooltipEventType(),w=jn(b,Wt),S={};w&&x==="axis"&&(w.props.trigger==="click"?S={onClick:this.handleClick}:S={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=vh(this.props,this.handleOuterEvent);return U(U({},A),S)}},{key:"addListener",value:function(){hv.on(pv,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){hv.removeListener(pv,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(b,x,w){for(var S=this.state.formattedGraphicalItems,A=0,N=S.length;A<N;A++){var C=S[A];if(C.item===b||C.props.key===b.key||x===ha(C.item.type)&&w===C.childIndex)return C}return null}},{key:"renderClipPath",value:function(){var b=this.clipPathId,x=this.state.offset,w=x.left,S=x.top,A=x.height,N=x.width;return T.createElement("defs",null,T.createElement("clipPath",{id:b},T.createElement("rect",{x:w,y:S,height:A,width:N})))}},{key:"getXScales",value:function(){var b=this.state.xAxisMap;return b?Object.entries(b).reduce(function(x,w){var S=HN(w,2),A=S[0],N=S[1];return U(U({},x),{},ce({},A,N.scale))},{}):null}},{key:"getYScales",value:function(){var b=this.state.yAxisMap;return b?Object.entries(b).reduce(function(x,w){var S=HN(w,2),A=S[0],N=S[1];return U(U({},x),{},ce({},A,N.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(b){var x;return(x=this.state.xAxisMap)===null||x===void 0||(x=x[b])===null||x===void 0?void 0:x.scale}},{key:"getYScaleByAxisId",value:function(b){var x;return(x=this.state.yAxisMap)===null||x===void 0||(x=x[b])===null||x===void 0?void 0:x.scale}},{key:"getItemByXY",value:function(b){var x=this.state,w=x.formattedGraphicalItems,S=x.activeItem;if(w&&w.length)for(var A=0,N=w.length;A<N;A++){var C=w[A],M=C.props,R=C.item,P=R.type.defaultProps!==void 0?U(U({},R.type.defaultProps),R.props):R.props,B=ha(R.type);if(B==="Bar"){var _=(M.data||[]).find(function(q){return Bie(b,q)});if(_)return{graphicalItem:C,payload:_}}else if(B==="RadialBar"){var E=(M.data||[]).find(function(q){return yA(b,q)});if(E)return{graphicalItem:C,payload:E}}else if(zm(C,S)||Bm(C,S)||Lu(C,S)){var $=Eoe({graphicalItem:C,activeTooltipItem:S,itemData:P.data}),L=P.activeIndex===void 0?$:P.activeIndex;return{graphicalItem:U(U({},C),{},{childIndex:L}),payload:Lu(C,S)?P.data[$]:C.props.data[$]}}}return null}},{key:"render",value:function(){var b=this;if(!ow(this))return null;var x=this.props,w=x.children,S=x.className,A=x.width,N=x.height,C=x.style,M=x.compact,R=x.title,P=x.desc,B=FN(x,gde),_=re(B,!1);if(M)return T.createElement(jN,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},T.createElement(Pg,ho({},_,{width:A,height:N,title:R,desc:P}),this.renderClipPath(),cw(w,this.renderMap)));if(this.props.accessibilityLayer){var E,$;_.tabIndex=(E=this.props.tabIndex)!==null&&E!==void 0?E:0,_.role=($=this.props.role)!==null&&$!==void 0?$:"application",_.onKeyDown=function(q){b.accessibilityManager.keyboardEvent(q)},_.onFocus=function(){b.accessibilityManager.focus()}}var L=this.parseEventsOfWrapper();return T.createElement(jN,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},T.createElement("div",ho({className:de("recharts-wrapper",S),style:U({position:"relative",cursor:"default",width:A,height:N},C)},L,{ref:function(V){b.container=V}}),T.createElement(Pg,ho({},_,{width:A,height:N,title:R,desc:P,style:kde}),this.renderClipPath(),cw(w,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(O.Component);ce(j,"displayName",n),ce(j,"defaultProps",U({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},d)),ce(j,"getDerivedStateFromProps",function(p,y){var g=p.dataKey,b=p.data,x=p.children,w=p.width,S=p.height,A=p.layout,N=p.stackOffset,C=p.margin,M=y.dataStartIndex,R=y.dataEndIndex;if(y.updateId===void 0){var P=VN(p);return U(U(U({},P),{},{updateId:0},m(U(U({props:p},P),{},{updateId:0}),y)),{},{prevDataKey:g,prevData:b,prevWidth:w,prevHeight:S,prevLayout:A,prevStackOffset:N,prevMargin:C,prevChildren:x})}if(g!==y.prevDataKey||b!==y.prevData||w!==y.prevWidth||S!==y.prevHeight||A!==y.prevLayout||N!==y.prevStackOffset||!jo(C,y.prevMargin)){var B=VN(p),_={chartX:y.chartX,chartY:y.chartY,isTooltipActive:y.isTooltipActive},E=U(U({},KN(y,b,A)),{},{updateId:y.updateId+1}),$=U(U(U({},B),_),E);return U(U(U({},$),m(U({props:p},$),y)),{},{prevDataKey:g,prevData:b,prevWidth:w,prevHeight:S,prevLayout:A,prevStackOffset:N,prevMargin:C,prevChildren:x})}if(!_g(x,y.prevChildren)){var L,q,V,X,J=jn(x,cs),Q=J&&(L=(q=J.props)===null||q===void 0?void 0:q.startIndex)!==null&&L!==void 0?L:M,ie=J&&(V=(X=J.props)===null||X===void 0?void 0:X.endIndex)!==null&&V!==void 0?V:R,ae=Q!==M||ie!==R,Se=!le(b),Xt=Se&&!ae?y.updateId:y.updateId+1;return U(U({updateId:Xt},m(U(U({props:p},y),{},{updateId:Xt,dataStartIndex:Q,dataEndIndex:ie}),y)),{},{prevChildren:x,dataStartIndex:Q,dataEndIndex:ie})}return null}),ce(j,"renderActiveDot",function(p,y,g){var b;return O.isValidElement(p)?b=O.cloneElement(p,y):se(p)?b=p(y):b=T.createElement(Sf,y),T.createElement(me,{className:"recharts-active-dot",key:g},b)});var v=O.forwardRef(function(y,g){return T.createElement(j,ho({},y,{ref:g}))});return v.displayName=j.displayName,v},Gde=wf({chartName:"LineChart",GraphicalChild:Si,axisComponents:[{axisType:"xAxis",AxisComp:gr},{axisType:"yAxis",AxisComp:xr}],formatAxisMap:Um}),Kde=wf({chartName:"BarChart",GraphicalChild:Ti,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:gr},{axisType:"yAxis",AxisComp:xr}],formatAxisMap:Um}),Vde=wf({chartName:"PieChart",GraphicalChild:_a,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:Lm},{axisType:"radiusAxis",AxisComp:km}],formatAxisMap:Xne,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),Yde=wf({chartName:"AreaChart",GraphicalChild:Ta,axisComponents:[{axisType:"xAxis",AxisComp:gr},{axisType:"yAxis",AxisComp:xr}],formatAxisMap:Um}),XN=wf({chartName:"ComposedChart",GraphicalChild:[Si,Ta,Ti,Vm],axisComponents:[{axisType:"xAxis",AxisComp:gr},{axisType:"yAxis",AxisComp:xr},{axisType:"zAxis",AxisComp:Km}],formatAxisMap:Um});const Er=["#00a0c8","#3ddc97","#f59e0b","#ef4444","#8b5cf6","#06b6d4","#ec4899"],Fl={fontSize:11,fill:"#94a3b8"},od={background:"#0f172a",border:"1px solid #26304a",borderRadius:8,fontSize:12,color:"#e2e8f0"};function Xde(e){const t=e.labels||[],n=e.series||[];return t.map((r,a)=>{const i={name:r};return n.forEach(l=>{var s;i[l.name]=((s=l.data)==null?void 0:s[a])??0}),i})}function pr({type:e="BAR",data:t,height:n=240}){const r=t||{},a=r.series||[],i=Xde(r);if(!i.length)return o.jsx("div",{className:"flex items-center justify-center text-slate-500 text-sm",style:{height:n},children:"데이터 없음"});const l=(e||"BAR").toUpperCase();if(l==="PIE"){const s=a[0],c=(r.labels||[]).map((u,f)=>{var d;return{name:u,value:((d=s==null?void 0:s.data)==null?void 0:d[f])??0}});return o.jsx(oo,{width:"100%",height:n,children:o.jsxs(Vde,{children:[o.jsx(_a,{data:c,dataKey:"value",nameKey:"name",outerRadius:n/2.8,innerRadius:n/5,children:c.map((u,f)=>o.jsx(vf,{fill:Er[f%Er.length]},f))}),o.jsx(Wt,{contentStyle:od}),o.jsx(Qn,{wrapperStyle:{fontSize:11}})]})})}return l==="LINE"?o.jsx(oo,{width:"100%",height:n,children:o.jsxs(Gde,{data:i,children:[o.jsx(Oo,{strokeDasharray:"3 3",stroke:"#26304a"}),o.jsx(gr,{dataKey:"name",tick:Fl}),o.jsx(xr,{tick:Fl}),o.jsx(Wt,{contentStyle:od}),o.jsx(Qn,{wrapperStyle:{fontSize:11}}),a.map((s,c)=>o.jsx(Si,{type:"monotone",dataKey:s.name,stroke:Er[c%Er.length],strokeWidth:2,dot:!1},s.name))]})}):l==="AREA"?o.jsx(oo,{width:"100%",height:n,children:o.jsxs(Yde,{data:i,children:[o.jsx(Oo,{strokeDasharray:"3 3",stroke:"#26304a"}),o.jsx(gr,{dataKey:"name",tick:Fl}),o.jsx(xr,{tick:Fl}),o.jsx(Wt,{contentStyle:od}),o.jsx(Qn,{wrapperStyle:{fontSize:11}}),a.map((s,c)=>o.jsx(Ta,{type:"monotone",dataKey:s.name,stroke:Er[c%Er.length],fill:Er[c%Er.length],fillOpacity:.18,strokeWidth:2},s.name))]})}):o.jsx(oo,{width:"100%",height:n,children:o.jsxs(Kde,{data:i,children:[o.jsx(Oo,{strokeDasharray:"3 3",stroke:"#26304a"}),o.jsx(gr,{dataKey:"name",tick:Fl}),o.jsx(xr,{tick:Fl}),o.jsx(Wt,{contentStyle:od,cursor:{fill:"#26304a55"}}),o.jsx(Qn,{wrapperStyle:{fontSize:11}}),a.map((s,c)=>o.jsx(Ti,{dataKey:s.name,fill:Er[c%Er.length],radius:[3,3,0,0]},s.name))]})})}function lt({title:e,subtitle:t,actions:n}){return o.jsxs("div",{className:"flex items-center justify-between mb-6",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-xl font-bold",children:e}),t&&o.jsx("p",{className:"text-sm text-slate-400 mt-0.5",children:t})]}),n&&o.jsx("div",{className:"flex items-center gap-2",children:n})]})}function D({label:e,children:t,hint:n}){return o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:e}),t,n&&o.jsx("p",{className:"text-[11px] text-slate-500 mt-1",children:n})]})}function Fe({title:e,onClose:t,children:n,wide:r}){return o.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",onClick:t,children:o.jsxs("div",{className:`bg-panel border border-edge rounded-2xl p-6 ${r?"w-[760px]":"w-[480px]"} max-h-[90vh] overflow-auto`,onClick:a=>a.stopPropagation(),children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsx("h2",{className:"text-lg font-bold",children:e}),o.jsx("button",{onClick:t,className:"text-slate-400 hover:text-slate-200",children:o.jsx(dT,{size:18})})]}),n]})})}function K({children:e,onClick:t,variant:n="primary",size:r="md",disabled:a,title:i,type:l}){const s="inline-flex items-center gap-1.5 rounded-lg font-semibold transition-colors disabled:opacity-50",c=r==="sm"?"px-2.5 py-1 text-xs":"px-3 py-2 text-sm",u=n==="primary"?"bg-brand text-ink hover:bg-brand/90":n==="danger"?"bg-rose-500/90 text-white hover:bg-rose-500":"bg-card border border-edge text-slate-300 hover:border-brand";return o.jsx("button",{type:l||"button",onClick:t,disabled:a,title:i,className:`${s} ${c} ${u}`,children:e})}function Be({msg:e="데이터가 없습니다.",colSpan:t}){return t?o.jsx("tr",{children:o.jsx("td",{colSpan:t,className:"py-6 text-center text-slate-500 text-sm",children:e})}):o.jsx("div",{className:"py-8 text-center text-slate-500 text-sm bg-card border border-edge rounded-xl",children:e})}function xe({title:e,icon:t,children:n,className:r=""}){return o.jsxs("div",{className:`bg-card border border-edge rounded-xl p-4 ${r}`,children:[e&&o.jsxs("h3",{className:"text-sm font-semibold mb-3 flex items-center gap-1.5",children:[t,e]}),n]})}function Pr({label:e,value:t,icon:n,color:r="text-brand",unit:a}){return o.jsxs("div",{className:"bg-card border border-edge rounded-xl p-4",children:[o.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-slate-400",children:[n," ",e]}),o.jsxs("div",{className:`text-2xl font-bold mt-2 ${r}`,children:[typeof t=="number"?t.toLocaleString():t,a&&o.jsx("span",{className:"text-sm font-normal text-slate-500 ml-1",children:a})]})]})}function M1(e,t=[]){if(e==null)return t;if(typeof e=="object")return e;try{return JSON.parse(e)}catch{return t}}function $1(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return""}}function QN(e){if(!e)return"-";if(e.includes("@")){const[t,n]=e.split("@");return`${t.slice(0,2)}***@${n}`}return e.length>4?e.slice(0,3)+"****"+e.slice(-2):"***"}const WN={CREATED:"bg-slate-500/15 text-slate-400 border-slate-500/30",RELEASED:"bg-sky-500/15 text-sky-400 border-sky-500/30",INPROGRESS:"bg-amber-500/15 text-amber-400 border-amber-500/30",DONE:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",CLOSED:"bg-slate-600/15 text-slate-500 border-slate-600/30",CANCELLED:"bg-rose-500/15 text-rose-400 border-rose-500/30",ASSIGNED:"bg-slate-500/15 text-slate-400 border-slate-500/30",STARTED:"bg-amber-500/15 text-amber-400 border-amber-500/30",PAUSED:"bg-orange-500/15 text-orange-400 border-orange-500/30",ORDERED:"bg-slate-500/15 text-slate-400 border-slate-500/30",PICKING:"bg-sky-500/15 text-sky-400 border-sky-500/30",PACKING:"bg-violet-500/15 text-violet-400 border-violet-500/30",INSPECTED:"bg-cyan-500/15 text-cyan-400 border-cyan-500/30",SHIPPED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",WAIT:"bg-slate-500/15 text-slate-400 border-slate-500/30",RUNNING:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",RUN:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",IDLE:"bg-amber-500/15 text-amber-400 border-amber-500/30",DOWN:"bg-rose-500/15 text-rose-400 border-rose-500/30",MAINT:"bg-orange-500/15 text-orange-400 border-orange-500/30",REQUESTED:"bg-slate-500/15 text-slate-400 border-slate-500/30",INSPECTING:"bg-amber-500/15 text-amber-400 border-amber-500/30",ACCEPTED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",REJECTED:"bg-rose-500/15 text-rose-400 border-rose-500/30",COUNTED:"bg-sky-500/15 text-sky-400 border-sky-500/30",ADJUSTED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",CONSUMED:"bg-slate-600/15 text-slate-500 border-slate-600/30",EXPIRED:"bg-rose-500/15 text-rose-400 border-rose-500/30",PASS:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",FAIL:"bg-rose-500/15 text-rose-400 border-rose-500/30",OPEN:"bg-rose-500/15 text-rose-400 border-rose-500/30",REVIEW:"bg-amber-500/15 text-amber-400 border-amber-500/30",DISPOSITIONED:"bg-sky-500/15 text-sky-400 border-sky-500/30",VERIFY:"bg-cyan-500/15 text-cyan-400 border-cyan-500/30",CRITICAL:"bg-rose-500/15 text-rose-400 border-rose-500/30",MAJOR:"bg-orange-500/15 text-orange-400 border-orange-500/30",MINOR:"bg-amber-500/15 text-amber-400 border-amber-500/30",ACTIVE:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",INACTIVE:"bg-slate-500/15 text-slate-400 border-slate-500/30",DELAYED:"bg-rose-500/15 text-rose-400 border-rose-500/30",ON_TIME:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30"};function rt({status:e}){const t=(e||"").toUpperCase(),n=WN[t]||WN.CREATED;return o.jsx("span",{className:`inline-block px-2 py-0.5 rounded text-xs font-medium border ${n}`,children:e||"-"})}const Qde=[{key:"activeWorkorders",alt:["inprogressWorkorders","activeWo"],label:"진행 작업지시",icon:Go,color:"text-brand"},{key:"todayOutput",alt:["todayProduction","dailyOutput"],label:"금일 생산량",icon:cl,color:"text-emerald-400"},{key:"oeePercent",alt:["oee","avgOee"],label:"평균 OEE",icon:Ko,color:"text-accent",pct:!0},{key:"openNcr",alt:["ncrOpen","defectCount"],label:"미처리 부적합",icon:gi,color:"text-rose-400"},{key:"belowSafety",alt:["lowStock","safetyAlert"],label:"안전재고 미달",icon:sf,color:"text-amber-400"},{key:"pendingShipping",alt:["openShipping","shippingCount"],label:"출하 대기",icon:Vp,color:"text-sky-400"},{key:"runningProcesses",alt:["running","activeProcesses"],label:"가동 공정",icon:lo,color:"text-violet-400"},{key:"equipmentDown",alt:["downEquipment","downCount"],label:"설비 비가동",icon:Ko,color:"text-orange-400"}];function sd(e,t,n=[]){if(!e)return 0;for(const r of[t,...n])if(e[r]!=null)return Number(e[r])||0;return 0}function cd(e,t){if(!e)return;if(e.labels&&e.series)return e;const n=Object.entries(e).filter(([,r])=>typeof r=="number");if(n.length)return{labels:n.map(r=>r[0]),series:[{name:t,data:n.map(r=>r[1])}]}}function Wde(){const[e,t]=O.useState({}),[n,r]=O.useState(null),[a,i]=O.useState(null),[l,s]=O.useState(null),[c,u]=O.useState(null),[f,d]=O.useState({}),h=()=>{c6().then(v=>t(v||{})).catch(()=>{}),DT().then(v=>d(v||{})).catch(()=>{}),u6().then(r).catch(()=>{}),f6().then(i).catch(()=>{}),d6().then(s).catch(()=>{}),zT(14).then(u).catch(()=>{})};O.useEffect(()=>{h();const v=window.setInterval(h,15e3);return()=>window.clearInterval(v)},[]);const m={...f,...e},j=sd(f,"avg_progress_rate",["avgProgressRate","avgRate"]);return o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center justify-between mb-6",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-xl font-bold",children:"제조 실시간 대시보드"}),o.jsx("p",{className:"text-sm text-slate-400 mt-0.5",children:"생산 · OEE · 재고 · 품질 통합 모니터링 (15초 자동 갱신)"})]}),o.jsxs(p0,{to:"/ai-tools",className:"flex items-center gap-1.5 text-sm text-brand hover:underline",children:[o.jsx(Rn,{size:16})," AI 도구 ",o.jsx(F_,{size:14})]})]}),o.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 mb-6",children:Qde.map(({key:v,alt:p,label:y,icon:g,color:b,pct:x})=>{const w=sd(m,v,p);return o.jsxs("div",{className:"bg-card border border-edge rounded-xl p-4",children:[o.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-slate-400",children:[o.jsx(g,{size:13})," ",y]}),o.jsxs("div",{className:`text-2xl font-bold mt-2 ${b}`,children:[w.toLocaleString(),x?"%":""]})]},v)})}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4 mb-6",children:[o.jsx(xe,{title:"일별 생산량 (14일)",icon:o.jsx(cl,{size:15}),className:"lg:col-span-2",children:o.jsx(pr,{type:"AREA",data:cd(c,"생산량")})}),o.jsx(xe,{title:"평균 진척률",icon:o.jsx(Kp,{size:15}),children:o.jsxs("div",{className:"flex flex-col items-center justify-center h-[240px]",children:[o.jsxs("div",{className:"text-5xl font-bold text-accent",children:[j.toFixed(1),"%"]}),o.jsxs("div",{className:"text-sm text-slate-400 mt-3",children:["진행 ",sd(f,"inprogress_workorders",["inprogressWorkorders"])," · 지연 ",o.jsx("span",{className:"text-rose-400",children:sd(f,"delayed_workorders",["delayedWorkorders"])})]})]})})]}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[o.jsx(xe,{title:"작업지시 상태",icon:o.jsx(Go,{size:15}),children:o.jsx(pr,{type:"PIE",data:cd(n,"작업지시"),height:200})}),o.jsx(xe,{title:"출하 상태",icon:o.jsx(Vp,{size:15}),children:o.jsx(pr,{type:"BAR",data:cd(a,"출하"),height:200})}),o.jsx(xe,{title:"설비 가동 현황",icon:o.jsx(Ko,{size:15}),children:Array.isArray(l)?o.jsxs("div",{className:"space-y-1.5 max-h-[200px] overflow-auto",children:[l.slice(0,8).map((v,p)=>o.jsxs("div",{className:"flex items-center justify-between text-sm border-b border-edge/40 pb-1",children:[o.jsx("span",{className:"text-slate-300",children:v.equipmentName||v.equipmentCode||`설비 ${p+1}`}),o.jsx(rt,{status:v.runStatus||v.status})]},p)),l.length===0&&o.jsx("p",{className:"text-slate-500 text-sm py-4 text-center",children:"설비 데이터 없음"})]}):o.jsx(pr,{type:"PIE",data:cd(l,"설비"),height:200})})]})]})}const Zde=["","ASSIGNED","STARTED","PAUSED","DONE","CANCELLED"],Jde={workorderId:"",opSeq:1,processCode:"",workerId:"",equipmentCode:"",assignedQty:0,plannedStart:"",plannedEnd:"",remark:""};function ehe(){const[e,t]=O.useState([]),[n,r]=O.useState(null),[a,i]=O.useState([]),[l,s]=O.useState(""),[c,u]=O.useState(""),[f,d]=O.useState(null),[h,m]=O.useState(null),[j,v]=O.useState([]),[p,y]=O.useState([]),[g,b]=O.useState([]),x=Vt(),w=wr(),S=()=>{h6({status:l,woNo:c}).then(E=>t(E||[])).catch(()=>t([])),p6().then(r).catch(()=>{}),m6().then(E=>i(Array.isArray(E)?E:[])).catch(()=>{})};O.useEffect(()=>{S()},[l]),O.useEffect(()=>{LT().then(E=>v(E||[])).catch(()=>{}),N0().then(E=>y(E||[])).catch(()=>{}),em().then(E=>b(E||[])).catch(()=>{})},[]);const A=()=>d({...Jde,_new:!0}),N=async()=>{const{_new:E,id:$,...L}=f;E?await y6(L):await v6($,L),d(null),S()},C=async E=>{window.confirm("삭제하시겠습니까?")&&(await j6(E),S())},M=async(E,$)=>{await x6(E,$),S()},R=async E=>{const $=window.prompt(`'${E.jobNo}' 완료 수량 (현재 ${E.doneQty}/${E.assignedQty})`,String(E.assignedQty-E.doneQty));$!=null&&(await b6(E.id,Number($)),S())},P=async()=>{await g6(h.id,{workerId:h.workerId||void 0,equipmentCode:h.equipmentCode||void 0}),m(null),S()},B=[{key:"ASSIGNED",label:"배정"},{key:"STARTED",label:"진행"},{key:"PAUSED",label:"일시정지"},{key:"DONE",label:"완료"}],_=E=>(n==null?void 0:n[E])??(n==null?void 0:n[E.toLowerCase()])??0;return o.jsxs("div",{children:[o.jsx(lt,{title:"작업관리 ★",subtitle:"작업/작업자/설비 배정 · 작업 할당 · 진행 상태 전이 · 작업 이력",actions:x&&o.jsxs(K,{onClick:A,children:[o.jsx(at,{size:16})," 작업 생성"]})}),o.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 mb-5",children:B.map(E=>o.jsxs("div",{className:"bg-card border border-edge rounded-xl p-4 text-center",children:[o.jsx("div",{className:"text-xs text-slate-400",children:E.label}),o.jsx("div",{className:"text-2xl font-bold mt-1 text-brand",children:_(E.key).toLocaleString()})]},E.key))}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-5 mb-5",children:[o.jsxs("div",{className:"lg:col-span-3",children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-3",children:[o.jsx("select",{className:"inp w-36",value:l,onChange:E=>s(E.target.value),children:Zde.map(E=>o.jsx("option",{value:E,children:E||"전체 상태"},E))}),o.jsx("input",{value:c,onChange:E=>u(E.target.value),onKeyDown:E=>E.key==="Enter"&&S(),placeholder:"작업지시번호",className:"inp w-44"}),o.jsx(K,{variant:"ghost",onClick:S,children:"검색"})]}),o.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left py-3 px-4",children:"작업번호"}),o.jsx("th",{className:"text-left",children:"작업지시"}),o.jsx("th",{className:"text-left",children:"공정"}),o.jsx("th",{className:"text-left",children:"작업자"}),o.jsx("th",{className:"text-left",children:"설비"}),o.jsx("th",{className:"text-right",children:"수량"}),o.jsx("th",{className:"text-left",children:"상태"}),o.jsx("th",{className:"text-right px-4",children:"작업"})]})}),o.jsxs("tbody",{children:[e.map(E=>o.jsxs("tr",{className:"border-t border-edge/50",children:[o.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[o.jsx(cf,{size:14,className:"text-brand"}),E.jobNo]}),o.jsxs("td",{className:"text-slate-400 text-xs",children:[E.woNo,o.jsx("div",{className:"text-slate-500",children:E.itemName||E.itemCode})]}),o.jsx("td",{className:"text-slate-300 text-xs",children:E.processName||E.processCode}),o.jsx("td",{className:"text-slate-400 text-xs",children:E.workerId||"-"}),o.jsx("td",{className:"text-slate-400 text-xs",children:E.equipmentCode||"-"}),o.jsxs("td",{className:"text-right text-slate-300",children:[E.doneQty,"/",E.assignedQty]}),o.jsx("td",{children:o.jsx(rt,{status:E.status})}),o.jsx("td",{className:"px-4",children:o.jsxs("div",{className:"flex items-center justify-end gap-2",children:[x&&E.status==="ASSIGNED"&&o.jsx("button",{onClick:()=>M(E.id,"START"),title:"시작",className:"text-emerald-400 hover:text-emerald-300",children:o.jsx(jg,{size:15})}),x&&E.status==="STARTED"&&o.jsx("button",{onClick:()=>M(E.id,"PAUSE"),title:"일시정지",className:"text-amber-400 hover:text-amber-300",children:o.jsx(iT,{size:15})}),x&&E.status==="PAUSED"&&o.jsx("button",{onClick:()=>M(E.id,"RESUME"),title:"재개",className:"text-emerald-400 hover:text-emerald-300",children:o.jsx(jg,{size:15})}),x&&(E.status==="STARTED"||E.status==="PAUSED")&&o.jsx("button",{onClick:()=>R(E),title:"실적 보고",className:"text-sky-400 hover:text-sky-300",children:o.jsx(W5,{size:15})}),x&&(E.status==="STARTED"||E.status==="PAUSED")&&o.jsx("button",{onClick:()=>M(E.id,"DONE"),title:"완료",className:"text-emerald-400 hover:text-emerald-300",children:o.jsx(Kp,{size:15})}),x&&E.status!=="DONE"&&E.status!=="CANCELLED"&&o.jsx("button",{onClick:()=>m({id:E.id,workerId:E.workerId||"",equipmentCode:E.equipmentCode||""}),title:"배정",className:"text-slate-400 hover:text-brand",children:o.jsx(iL,{size:15})}),x&&E.status!=="DONE"&&E.status!=="CANCELLED"&&o.jsx("button",{onClick:()=>M(E.id,"CANCEL"),title:"취소",className:"text-rose-400 hover:text-rose-300",children:o.jsx(ph,{size:15})}),w&&(E.status==="ASSIGNED"||E.status==="CANCELLED")&&o.jsx("button",{onClick:()=>C(E.id),title:"삭제",className:"text-rose-400 hover:text-rose-300",children:o.jsx(tr,{size:15})})]})})]},E.id)),e.length===0&&o.jsx(Be,{colSpan:8,msg:"작업이 없습니다."})]})]})})]}),o.jsx(xe,{title:"작업자별 부하",children:o.jsxs("div",{className:"space-y-2 max-h-[420px] overflow-auto",children:[a.map((E,$)=>o.jsxs("div",{className:"bg-panel border border-edge rounded p-2.5",children:[o.jsx("div",{className:"text-sm font-medium",children:E.workerName||E.displayName||E.workerId}),o.jsxs("div",{className:"text-[11px] text-slate-400 mt-0.5",children:["진행 ",E.activeJobs??E.inprogressJobs??0,"건 · 잔여 ",Number(E.remainingQty??E.remaining??0).toLocaleString()]})]},$)),a.length===0&&o.jsx("p",{className:"text-slate-500 text-xs py-4 text-center",children:"부하 데이터 없음"})]})})]}),f&&o.jsxs(Fe,{title:f._new?"작업 생성":"작업 수정",onClose:()=>d(null),children:[o.jsxs("div",{className:"space-y-3",children:[o.jsx(D,{label:"작업지시",children:o.jsxs("select",{className:"inp",value:f.workorderId,onChange:E=>d({...f,workorderId:E.target.value}),children:[o.jsx("option",{value:"",children:"선택"}),g.map(E=>o.jsxs("option",{value:E.id,children:[E.woNo," · ",E.itemName||E.itemCode]},E.id))]})}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"공정순서 (opSeq)",children:o.jsx("input",{type:"number",className:"inp",value:f.opSeq,onChange:E=>d({...f,opSeq:Number(E.target.value)})})}),o.jsx(D,{label:"공정코드",children:o.jsx("input",{className:"inp",value:f.processCode,onChange:E=>d({...f,processCode:E.target.value})})})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"작업자",children:o.jsxs("select",{className:"inp",value:f.workerId,onChange:E=>d({...f,workerId:E.target.value}),children:[o.jsx("option",{value:"",children:"미배정"}),j.map(E=>o.jsx("option",{value:E.id,children:E.displayName||E.username},E.id))]})}),o.jsx(D,{label:"설비",children:o.jsxs("select",{className:"inp",value:f.equipmentCode,onChange:E=>d({...f,equipmentCode:E.target.value}),children:[o.jsx("option",{value:"",children:"미배정"}),p.map(E=>o.jsx("option",{value:E.equipmentCode,children:E.equipmentName||E.equipmentCode},E.id))]})})]}),o.jsx(D,{label:"배정 수량",children:o.jsx("input",{type:"number",className:"inp",value:f.assignedQty,onChange:E=>d({...f,assignedQty:Number(E.target.value)})})}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"계획 시작",children:o.jsx("input",{type:"datetime-local",className:"inp",value:f.plannedStart,onChange:E=>d({...f,plannedStart:E.target.value})})}),o.jsx(D,{label:"계획 종료",children:o.jsx("input",{type:"datetime-local",className:"inp",value:f.plannedEnd,onChange:E=>d({...f,plannedEnd:E.target.value})})})]}),o.jsx(D,{label:"비고",children:o.jsx("input",{className:"inp",value:f.remark,onChange:E=>d({...f,remark:E.target.value})})})]}),o.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[o.jsx(K,{variant:"ghost",onClick:()=>d(null),children:"취소"}),o.jsx(K,{onClick:N,children:"저장"})]})]}),h&&o.jsxs(Fe,{title:"작업자/설비 배정",onClose:()=>m(null),children:[o.jsxs("div",{className:"space-y-3",children:[o.jsx(D,{label:"작업자",children:o.jsxs("select",{className:"inp",value:h.workerId,onChange:E=>m({...h,workerId:E.target.value}),children:[o.jsx("option",{value:"",children:"미배정"}),j.map(E=>o.jsx("option",{value:E.id,children:E.displayName||E.username},E.id))]})}),o.jsx(D,{label:"설비",children:o.jsxs("select",{className:"inp",value:h.equipmentCode,onChange:E=>m({...h,equipmentCode:E.target.value}),children:[o.jsx("option",{value:"",children:"미배정"}),p.map(E=>o.jsx("option",{value:E.equipmentCode,children:E.equipmentName||E.equipmentCode},E.id))]})})]}),o.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[o.jsx(K,{variant:"ghost",onClick:()=>m(null),children:"취소"}),o.jsx(K,{onClick:P,children:"배정"})]})]})]})}function the(e){return Math.max(0,Math.min(100,Number(e)||0))}function nhe({rate:e,delayed:t}){const n=t?"bg-rose-500":e>=100?"bg-emerald-500":"bg-brand";return o.jsx("div",{className:"w-full bg-ink rounded-full h-2 overflow-hidden",children:o.jsx("div",{className:`h-full ${n} transition-all`,style:{width:`${the(e)}%`}})})}function rhe(){const[e,t]=O.useState({}),[n,r]=O.useState([]),[a,i]=O.useState([]),[l,s]=O.useState(null),[c,u]=O.useState({workorders:[],jobs:[]}),[f,d]=O.useState(""),h=()=>{DT().then(v=>t(v||{})).catch(()=>{}),S6(f).then(v=>r(Array.isArray(v)?v:[])).catch(()=>r([])),w6().then(v=>i(Array.isArray(v)?v:[])).catch(()=>i([])),O6(30).then(s).catch(()=>{}),A6().then(v=>u(v||{workorders:[],jobs:[]})).catch(()=>{})};O.useEffect(()=>{h()},[f]),O.useEffect(()=>{const v=window.setInterval(h,15e3);return()=>window.clearInterval(v)},[f]);const m=(v,...p)=>{for(const y of[v,...p])if((e==null?void 0:e[y])!=null)return Number(e[y])||0;return 0},j=(()=>{if(l){if(l.labels&&l.series)return l;if(Array.isArray(l))return{labels:l.map(v=>v.itemName||v.itemCode),series:[{name:"계획",data:l.map(v=>Number(v.planQty??v.plannedQty??0))},{name:"실적",data:l.map(v=>Number(v.actualQty??v.producedQty??0))}]}}})();return o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center justify-between mb-6",children:[o.jsxs("div",{children:[o.jsxs("h1",{className:"text-xl font-bold flex items-center gap-2",children:[o.jsx(lo,{className:"text-brand",size:20})," 진행관리 ★"]}),o.jsx("p",{className:"text-sm text-slate-400 mt-0.5",children:"진척률 · 계획대비실적 · 실시간 생산현황 · 지연 알림 (15초 자동 갱신)"})]}),o.jsxs("button",{onClick:h,className:"flex items-center gap-1.5 text-sm text-slate-400 hover:text-brand",children:[o.jsx(nL,{size:15})," 새로고침"]})]}),o.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-6 gap-3 mb-6",children:[o.jsx(Pr,{label:"진행 작업지시",value:m("active_workorders","activeWorkorders"),icon:o.jsx(Go,{size:13})}),o.jsx(Pr,{label:"가공 중",value:m("inprogress_workorders","inprogressWorkorders"),icon:o.jsx(lo,{size:13}),color:"text-amber-400"}),o.jsx(Pr,{label:"지연",value:m("delayed_workorders","delayedWorkorders"),icon:o.jsx(gi,{size:13}),color:"text-rose-400"}),o.jsx(Pr,{label:"가동 공정",value:m("running_processes","runningProcesses"),icon:o.jsx(Ko,{size:13}),color:"text-emerald-400"}),o.jsx(Pr,{label:"활성 작업",value:m("active_jobs","activeJobs"),icon:o.jsx(su,{size:13}),color:"text-sky-400"}),o.jsx(Pr,{label:"평균 진척률",value:m("avg_progress_rate","avgProgressRate").toFixed(1),unit:"%",icon:o.jsx(lo,{size:13}),color:"text-accent"})]}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4 mb-6",children:[o.jsxs(xe,{title:"작업지시별 진척률",icon:o.jsx(Go,{size:15}),className:"lg:col-span-2",children:[o.jsx("div",{className:"flex items-center gap-2 mb-3",children:o.jsx("select",{className:"inp w-40",value:f,onChange:v=>d(v.target.value),children:["","RELEASED","INPROGRESS","DONE"].map(v=>o.jsx("option",{value:v,children:v||"전체 상태"},v))})}),o.jsxs("div",{className:"space-y-2.5 max-h-[360px] overflow-auto",children:[n.map((v,p)=>{const y=Number(v.progressRate??v.progress_rate??0),g=!!(v.delayed??v.isDelayed);return o.jsxs("div",{className:"bg-panel border border-edge rounded-lg p-3",children:[o.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[o.jsxs("span",{className:"text-sm font-medium",children:[v.woNo," ",o.jsx("span",{className:"text-slate-400 text-xs ml-1",children:v.itemName||v.itemCode})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[g&&o.jsx(rt,{status:"DELAYED"}),o.jsxs("span",{className:`text-sm font-bold ${g?"text-rose-400":y>=100?"text-emerald-400":"text-brand"}`,children:[y.toFixed(0),"%"]})]})]}),o.jsx(nhe,{rate:y,delayed:g}),o.jsxs("div",{className:"text-[11px] text-slate-500 mt-1",children:["실적 ",Number(v.producedQty??v.actualQty??0).toLocaleString()," / 계획 ",Number(v.planQty??v.plannedQty??0).toLocaleString()]})]},v.id??p)}),n.length===0&&o.jsx(Be,{msg:"진행 중 작업지시가 없습니다."})]})]}),o.jsx(xe,{title:"실시간 가동 공정",icon:o.jsx(lo,{size:15}),children:o.jsxs("div",{className:"space-y-2 max-h-[400px] overflow-auto",children:[a.map((v,p)=>o.jsxs("div",{className:"bg-panel border border-edge rounded-lg p-2.5",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"text-sm font-medium",children:v.processName||v.processCode}),o.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-emerald-400",children:[o.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse"}),"RUNNING"]})]}),o.jsxs("div",{className:"text-[11px] text-slate-400 mt-0.5",children:[v.woNo," · ",v.equipmentCode||"설비 미지정"]})]},v.id??p)),a.length===0&&o.jsx("p",{className:"text-slate-500 text-xs py-6 text-center",children:"가동 중 공정 없음"})]})})]}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[o.jsx(xe,{title:"품목별 계획 대비 실적 (30일)",icon:o.jsx(su,{size:15}),children:o.jsx(pr,{type:"BAR",data:j})}),o.jsx(xe,{title:"지연 알림",icon:o.jsx(AS,{size:15}),children:o.jsxs("div",{className:"space-y-1.5 max-h-[280px] overflow-auto",children:[(c.workorders||[]).map((v,p)=>o.jsxs("div",{className:"flex items-center justify-between bg-rose-500/5 border border-rose-500/20 rounded p-2 text-sm",children:[o.jsxs("span",{children:[o.jsx(gi,{size:13,className:"inline text-rose-400 mr-1.5"}),v.woNo," · ",v.itemName||v.itemCode]}),o.jsx("span",{className:"text-rose-400 text-xs",children:"작업지시 지연"})]},`wo${p}`)),(c.jobs||[]).map((v,p)=>o.jsxs("div",{className:"flex items-center justify-between bg-amber-500/5 border border-amber-500/20 rounded p-2 text-sm",children:[o.jsxs("span",{children:[o.jsx(AS,{size:13,className:"inline text-amber-400 mr-1.5"}),v.jobNo," · ",v.processName||v.processCode]}),o.jsx("span",{className:"text-amber-400 text-xs",children:"작업 지연"})]},`job${p}`)),(c.workorders||[]).length===0&&(c.jobs||[]).length===0&&o.jsx("p",{className:"text-slate-500 text-sm py-6 text-center",children:"지연 항목이 없습니다."})]})})]})]})}const ahe=["","CREATED","RELEASED","INPROGRESS","DONE","CLOSED","CANCELLED"],ihe=["CREATED","RELEASED","INPROGRESS","DONE","CLOSED"],lhe={itemCode:"",planQty:0,dueDate:"",priority:"NORMAL",remark:""},ZN={CREATED:[{action:"RELEASE",label:"확정",manager:!0},{action:"CANCEL",label:"취소",manager:!0}],RELEASED:[{action:"START",label:"착수"},{action:"CANCEL",label:"취소",manager:!0}],INPROGRESS:[{action:"COMPLETE",label:"완료"}],DONE:[{action:"CLOSE",label:"마감",manager:!0}]};function ohe(){const[e,t]=O.useState([]),[n,r]=O.useState(null),[a,i]=O.useState("table"),[l,s]=O.useState(""),[c,u]=O.useState(""),[f,d]=O.useState(null),[h,m]=O.useState([]),j=Vt(),v=wr(),p=()=>{em({status:l,keyword:c}).then(S=>t(S||[])).catch(()=>t([])),D6().then(r).catch(()=>{})};O.useEffect(()=>{p()},[l]),O.useEffect(()=>{Yt({itemType:"PRODUCT"}).then(S=>m(S||[])).catch(()=>{})},[]);const y=()=>d({...lhe,_new:!0}),g=async()=>{const{_new:S,id:A,...N}=f;S?await L6(N):await z6(A,N),d(null),p()},b=async S=>{window.confirm("삭제하시겠습니까?")&&(await I6(S),p())},x=async(S,A)=>{await B6(S,A),p()},w=S=>n?n[S]||n[S.toLowerCase()]||[]:e.filter(A=>A.status===S);return o.jsxs("div",{children:[o.jsx(lt,{title:"작업지시",subtitle:"생산 작업지시 발행 · 상태 전이 · 칸반",actions:o.jsxs(o.Fragment,{children:[o.jsxs(K,{variant:"ghost",onClick:()=>i(a==="table"?"kanban":"table"),children:[o.jsx(v0,{size:15})," ",a==="table"?"칸반":"테이블"]}),j&&o.jsxs(K,{onClick:y,children:[o.jsx(at,{size:16})," 작업지시"]})]})}),a==="table"?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[o.jsx("select",{className:"inp w-36",value:l,onChange:S=>s(S.target.value),children:ahe.map(S=>o.jsx("option",{value:S,children:S||"전체 상태"},S))}),o.jsx("input",{value:c,onChange:S=>u(S.target.value),onKeyDown:S=>S.key==="Enter"&&p(),placeholder:"품목 검색",className:"inp w-52"}),o.jsx(K,{variant:"ghost",onClick:p,children:"검색"})]}),o.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left py-3 px-4",children:"작업지시"}),o.jsx("th",{className:"text-left",children:"품목"}),o.jsx("th",{className:"text-right",children:"계획수량"}),o.jsx("th",{className:"text-left",children:"납기"}),o.jsx("th",{className:"text-left",children:"우선순위"}),o.jsx("th",{className:"text-left",children:"상태"}),o.jsx("th",{className:"text-right px-4",children:"작업"})]})}),o.jsxs("tbody",{children:[e.map(S=>o.jsxs("tr",{className:"border-t border-edge/50",children:[o.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[o.jsx(Go,{size:14,className:"text-brand"}),S.woNo]}),o.jsx("td",{className:"text-slate-300 text-xs",children:S.itemName||S.itemCode}),o.jsx("td",{className:"text-right text-slate-300",children:Number(S.planQty||0).toLocaleString()}),o.jsx("td",{className:"text-slate-400 text-xs",children:S.dueDate||"-"}),o.jsx("td",{className:"text-slate-400 text-xs",children:S.priority||"NORMAL"}),o.jsx("td",{children:o.jsx(rt,{status:S.status})}),o.jsx("td",{className:"px-4",children:o.jsxs("div",{className:"flex items-center justify-end gap-2",children:[j&&(ZN[S.status]||[]).filter(A=>!A.manager||v).map(A=>o.jsx("button",{onClick:()=>x(S.id,A.action),className:"text-xs text-brand hover:underline",children:A.label},A.action)),j&&S.status==="CREATED"&&o.jsx("button",{onClick:()=>d({...S,_new:!1}),className:"text-xs text-slate-400 hover:text-brand",children:"편집"}),v&&o.jsx("button",{onClick:()=>b(S.id),className:"text-rose-400 hover:text-rose-300",children:o.jsx(tr,{size:14})})]})})]},S.id)),e.length===0&&o.jsx(Be,{colSpan:7,msg:"작업지시가 없습니다."})]})]})})]}):o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 xl:grid-cols-5 gap-3",children:ihe.map(S=>o.jsxs("div",{className:"bg-panel border border-edge rounded-xl p-3",children:[o.jsxs("div",{className:"flex items-center justify-between mb-2 px-1",children:[o.jsx(rt,{status:S}),o.jsx("span",{className:"text-xs text-slate-500",children:w(S).length})]}),o.jsxs("div",{className:"space-y-2 max-h-[600px] overflow-auto",children:[w(S).map(A=>o.jsxs("div",{className:"bg-card border border-edge rounded-lg p-2.5",children:[o.jsxs("div",{className:"text-sm font-medium flex items-center gap-1",children:[o.jsx(X_,{size:12,className:"text-brand"}),A.woNo]}),o.jsx("div",{className:"text-[11px] text-slate-400 mt-0.5",children:A.itemName||A.itemCode}),o.jsxs("div",{className:"text-[11px] text-slate-500 mt-0.5",children:["계획 ",Number(A.planQty||0).toLocaleString()," · 납기 ",A.dueDate||"-"]}),j&&o.jsx("div",{className:"flex gap-1.5 mt-2",children:(ZN[A.status]||[]).filter(N=>!N.manager||v).map(N=>o.jsx("button",{onClick:()=>x(A.id,N.action),className:"text-[11px] px-1.5 py-0.5 rounded bg-brand/15 text-brand border border-brand/30",children:N.label},N.action))})]},A.id)),w(S).length===0&&o.jsx("p",{className:"text-slate-600 text-xs text-center py-3",children:"-"})]})]},S))}),f&&o.jsxs(Fe,{title:f._new?"작업지시 발행":"작업지시 편집",onClose:()=>d(null),children:[o.jsxs("div",{className:"space-y-3",children:[o.jsx(D,{label:"품목(제품)",children:o.jsxs("select",{className:"inp",value:f.itemCode,onChange:S=>d({...f,itemCode:S.target.value}),children:[o.jsx("option",{value:"",children:"선택"}),h.map(S=>o.jsxs("option",{value:S.itemCode,children:[S.itemName," (",S.itemCode,")"]},S.id))]})}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"계획 수량",children:o.jsx("input",{type:"number",className:"inp",value:f.planQty,onChange:S=>d({...f,planQty:Number(S.target.value)})})}),o.jsx(D,{label:"납기",children:o.jsx("input",{type:"date",className:"inp",value:f.dueDate||"",onChange:S=>d({...f,dueDate:S.target.value})})})]}),o.jsx(D,{label:"우선순위",children:o.jsx("select",{className:"inp",value:f.priority,onChange:S=>d({...f,priority:S.target.value}),children:["LOW","NORMAL","HIGH","URGENT"].map(S=>o.jsx("option",{children:S},S))})}),o.jsx(D,{label:"비고",children:o.jsx("input",{className:"inp",value:f.remark||"",onChange:S=>d({...f,remark:S.target.value})})})]}),o.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[o.jsx(K,{variant:"ghost",onClick:()=>d(null),children:"취소"}),o.jsx(K,{onClick:g,children:"저장"})]})]})]})}const she={woNo:"",itemCode:"",goodQty:0,defectQty:0,lotNo:"",workerId:"",remark:""};function JN(e,t){if(!e)return;if(e.labels&&e.series)return e;if(Array.isArray(e))return{labels:e.map(r=>r.label||r.name||r.defectCode||r.date),series:[{name:t,data:e.map(r=>Number(r.value??r.count??r.qty??0))}]};const n=Object.entries(e).filter(([,r])=>typeof r=="number");return n.length?{labels:n.map(r=>r[0]),series:[{name:t,data:n.map(r=>r[1])}]}:void 0}function che(){const[e,t]=O.useState([]),[n,r]=O.useState(null),[a,i]=O.useState(null),[l,s]=O.useState(""),[c,u]=O.useState(null),[f,d]=O.useState([]),[h,m]=O.useState([]),[j,v]=O.useState([]),p=Vt(),y=()=>{U6({woNo:l,limit:100}).then(x=>t(x||[])).catch(()=>t([])),q6(14).then(r).catch(()=>{}),H6(30).then(i).catch(()=>{})};O.useEffect(()=>{y()},[]),O.useEffect(()=>{em({status:"INPROGRESS"}).then(x=>d(x||[])).catch(()=>{}),Yt().then(x=>m(x||[])).catch(()=>{}),LT().then(x=>v(x||[])).catch(()=>{})},[]);const g=()=>u({...she}),b=async()=>{await F6(c),u(null),y()};return o.jsxs("div",{children:[o.jsx(lt,{title:"생산실적",subtitle:"생산실적 보고 · LOT 생성 · 자재 투입 / 산출 입고",actions:p&&o.jsxs(K,{onClick:g,children:[o.jsx(at,{size:16})," 실적 보고"]})}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 mb-6",children:[o.jsx(xe,{title:"일별 생산량 (14일)",icon:o.jsx(cl,{size:15}),children:o.jsx(pr,{type:"AREA",data:JN(n,"생산량")})}),o.jsx(xe,{title:"불량 파레토 (30일)",children:o.jsx(pr,{type:"BAR",data:JN(a,"불량수")})})]}),o.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[o.jsx("input",{value:l,onChange:x=>s(x.target.value),onKeyDown:x=>x.key==="Enter"&&y(),placeholder:"작업지시번호",className:"inp w-44"}),o.jsx(K,{variant:"ghost",onClick:y,children:"검색"})]}),o.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left py-3 px-4",children:"작업지시"}),o.jsx("th",{className:"text-left",children:"품목"}),o.jsx("th",{className:"text-left",children:"LOT"}),o.jsx("th",{className:"text-right",children:"양품"}),o.jsx("th",{className:"text-right",children:"불량"}),o.jsx("th",{className:"text-left",children:"작업자"}),o.jsx("th",{className:"text-left",children:"일시"})]})}),o.jsxs("tbody",{children:[e.map(x=>o.jsxs("tr",{className:"border-t border-edge/50",children:[o.jsx("td",{className:"py-3 px-4 font-medium",children:x.woNo}),o.jsx("td",{className:"text-slate-300 text-xs",children:x.itemName||x.itemCode}),o.jsx("td",{className:"text-slate-400 font-mono text-xs",children:x.lotNo||"-"}),o.jsx("td",{className:"text-right text-emerald-400",children:Number(x.goodQty||0).toLocaleString()}),o.jsx("td",{className:"text-right text-rose-400",children:Number(x.defectQty||0).toLocaleString()}),o.jsx("td",{className:"text-slate-400 text-xs",children:x.workerId||"-"}),o.jsx("td",{className:"text-slate-500 text-xs",children:x.createdAt?new Date(x.createdAt).toLocaleString("ko-KR"):"-"})]},x.id)),e.length===0&&o.jsx(Be,{colSpan:7,msg:"생산실적이 없습니다."})]})]})}),c&&o.jsxs(Fe,{title:"생산실적 보고",onClose:()=>u(null),children:[o.jsxs("div",{className:"space-y-3",children:[o.jsx(D,{label:"작업지시",children:o.jsxs("select",{className:"inp",value:c.woNo,onChange:x=>{const w=f.find(S=>S.woNo===x.target.value);u({...c,woNo:x.target.value,itemCode:(w==null?void 0:w.itemCode)||c.itemCode})},children:[o.jsx("option",{value:"",children:"선택"}),f.map(x=>o.jsxs("option",{value:x.woNo,children:[x.woNo," · ",x.itemName||x.itemCode]},x.id))]})}),o.jsx(D,{label:"품목코드",children:o.jsxs("select",{className:"inp",value:c.itemCode,onChange:x=>u({...c,itemCode:x.target.value}),children:[o.jsx("option",{value:"",children:"선택"}),h.map(x=>o.jsxs("option",{value:x.itemCode,children:[x.itemName," (",x.itemCode,")"]},x.id))]})}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"양품 수량",children:o.jsx("input",{type:"number",className:"inp",value:c.goodQty,onChange:x=>u({...c,goodQty:Number(x.target.value)})})}),o.jsx(D,{label:"불량 수량",children:o.jsx("input",{type:"number",className:"inp",value:c.defectQty,onChange:x=>u({...c,defectQty:Number(x.target.value)})})})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"LOT (미입력 시 자동)",children:o.jsx("input",{className:"inp",value:c.lotNo,onChange:x=>u({...c,lotNo:x.target.value})})}),o.jsx(D,{label:"작업자",children:o.jsxs("select",{className:"inp",value:c.workerId,onChange:x=>u({...c,workerId:x.target.value}),children:[o.jsx("option",{value:"",children:"선택"}),j.map(x=>o.jsx("option",{value:x.id,children:x.displayName||x.username},x.id))]})})]}),o.jsx(D,{label:"비고",children:o.jsx("input",{className:"inp",value:c.remark,onChange:x=>u({...c,remark:x.target.value})})})]}),o.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[o.jsx(K,{variant:"ghost",onClick:()=>u(null),children:"취소"}),o.jsx(K,{onClick:b,children:"보고"})]})]})]})}const uhe=[{key:"WAIT",label:"대기"},{key:"RUNNING",label:"가동"},{key:"DONE",label:"완료"}];function fhe(){const[e,t]=O.useState([]),[n,r]=O.useState(""),[a,i]=O.useState([]),l=Vt(),s=()=>K6().then(d=>t(Array.isArray(d)?d:[])).catch(()=>t([])),c=()=>{n?G6(Number(n)).then(d=>t(Array.isArray(d)?d:[])).catch(()=>t([])):s()};O.useEffect(()=>{s()},[]),O.useEffect(()=>{em().then(h=>i(h||[])).catch(()=>{});const d=window.setInterval(()=>{n||s()},15e3);return()=>window.clearInterval(d)},[n]);const u=async(d,h)=>{await V6(d,h),c()},f=d=>e.filter(h=>(h.status||"WAIT").toUpperCase()===d);return o.jsxs("div",{children:[o.jsx(lt,{title:"공정진행 칸반",subtitle:"공정 실시간 진행 상태 (작업지시 미선택 시 전체 가동 공정 · 15초 갱신)",actions:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("select",{className:"inp w-56",value:n,onChange:d=>r(d.target.value),children:[o.jsx("option",{value:"",children:"전체 가동 공정"}),a.map(d=>o.jsxs("option",{value:d.id,children:[d.woNo," · ",d.itemName||d.itemCode]},d.id))]}),o.jsxs(K,{variant:"ghost",onClick:c,children:[o.jsx(Rs,{size:15})," 조회"]})]})}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:uhe.map(d=>o.jsxs("div",{className:"bg-panel border border-edge rounded-xl p-3",children:[o.jsxs("div",{className:"flex items-center justify-between mb-2 px-1",children:[o.jsx(rt,{status:d.key}),o.jsx("span",{className:"text-xs text-slate-500",children:f(d.key).length})]}),o.jsxs("div",{className:"space-y-2 max-h-[600px] overflow-auto",children:[f(d.key).map(h=>o.jsxs("div",{className:"bg-card border border-edge rounded-lg p-2.5",children:[o.jsxs("div",{className:"text-sm font-medium flex items-center gap-1.5",children:[o.jsx(v0,{size:13,className:"text-brand"}),h.processName||h.processCode]}),o.jsxs("div",{className:"text-[11px] text-slate-400 mt-0.5",children:[h.woNo||""," · 순서 ",h.opSeq??"-"," · ",h.equipmentCode||"설비 미지정"]}),l&&o.jsxs("div",{className:"flex gap-1.5 mt-2",children:[d.key==="WAIT"&&o.jsxs("button",{onClick:()=>u(h.id,"RUNNING"),className:"text-[11px] px-1.5 py-0.5 rounded bg-emerald-500/15 text-emerald-400 border border-emerald-500/30 flex items-center gap-1",children:[o.jsx(jg,{size:10})," 가동"]}),d.key==="RUNNING"&&o.jsxs(o.Fragment,{children:[o.jsxs("button",{onClick:()=>u(h.id,"WAIT"),className:"text-[11px] px-1.5 py-0.5 rounded bg-amber-500/15 text-amber-400 border border-amber-500/30 flex items-center gap-1",children:[o.jsx(iT,{size:10})," 대기"]}),o.jsxs("button",{onClick:()=>u(h.id,"DONE"),className:"text-[11px] px-1.5 py-0.5 rounded bg-brand/15 text-brand border border-brand/30 flex items-center gap-1",children:[o.jsx(Kp,{size:10})," 완료"]})]})]})]},h.id)),f(d.key).length===0&&o.jsx("p",{className:"text-slate-600 text-xs text-center py-3",children:"-"})]})]},d.key))}),e.length===0&&o.jsx("div",{className:"mt-4",children:o.jsx(Be,{msg:"가동 중 공정이 없습니다. 작업지시를 선택해 공정을 조회하세요."})})]})}const dhe={equipmentCode:"",plannedTime:480,runTime:0,idealCycleTime:1,totalCount:0,goodCount:0,recordDate:""},hhe=["RUN","IDLE","DOWN","MAINT"];function phe(e,t){if(e){if(e.labels&&e.series)return e;if(Array.isArray(e))return{labels:e.map(n=>n.label||n.code||n.downtimeCode||n.name),series:[{name:t,data:e.map(n=>Number(n.value??n.minutes??n.count??0))}]}}}function mhe(e){const t=e.oeePercent??(e.oee!=null?e.oee*100:null);return t!=null?Number(t).toFixed(1):"-"}function yhe(){const[e,t]=O.useState([]),[n,r]=O.useState([]),[a,i]=O.useState(null),[l,s]=O.useState(""),[c,u]=O.useState(null),f=Vt(),d=wr(),h=()=>{Y6({equipmentCode:l,limit:50}).then(p=>t(p||[])).catch(()=>t([])),N0().then(p=>r(p||[])).catch(()=>{}),Q6(30).then(i).catch(()=>{})};O.useEffect(()=>{h()},[]);const m=()=>u({...dhe}),j=async()=>{await X6(c),u(null),h()},v=async(p,y)=>{await rB(p,y),h()};return o.jsxs("div",{children:[o.jsx(lt,{title:"설비 / OEE",subtitle:"가동률 × 성능 × 품질 = OEE · 비가동 코드 분석",actions:f&&o.jsxs(K,{onClick:m,children:[o.jsx(at,{size:16})," OEE 기록"]})}),o.jsx(xe,{title:"설비 가동 현황",icon:o.jsx(cf,{size:15}),className:"mb-5",children:o.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[n.map(p=>o.jsxs("div",{className:"bg-panel border border-edge rounded-lg p-3",children:[o.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[o.jsx("span",{className:"text-sm font-medium",children:p.equipmentName||p.equipmentCode}),o.jsx(rt,{status:p.runStatus||p.status})]}),d&&o.jsx("select",{className:"inp text-xs",value:p.runStatus||"IDLE",onChange:y=>v(p.id,y.target.value),children:hhe.map(y=>o.jsx("option",{value:y,children:y},y))})]},p.id)),n.length===0&&o.jsx("p",{className:"text-slate-500 text-sm col-span-4 text-center py-4",children:"설비가 없습니다."})]})}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 mb-6",children:[o.jsx(xe,{title:"비가동 파레토 (30일)",icon:o.jsx(lT,{size:15}),children:o.jsx(pr,{type:"BAR",data:phe(a,"비가동(분)")})}),o.jsx(xe,{title:"OEE 추이",icon:o.jsx(Ko,{size:15}),children:o.jsx(pr,{type:"LINE",data:{labels:e.slice(0,12).reverse().map(p=>p.recordDate||p.equipmentCode),series:[{name:"OEE%",data:e.slice(0,12).reverse().map(p=>Number(p.oeePercent??(p.oee!=null?p.oee*100:0)))}]}})})]}),o.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[o.jsxs("select",{className:"inp w-52",value:l,onChange:p=>s(p.target.value),children:[o.jsx("option",{value:"",children:"전체 설비"}),n.map(p=>o.jsx("option",{value:p.equipmentCode,children:p.equipmentName||p.equipmentCode},p.id))]}),o.jsx(K,{variant:"ghost",onClick:h,children:"조회"})]}),o.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left py-3 px-4",children:"설비"}),o.jsx("th",{className:"text-left",children:"일자"}),o.jsx("th",{className:"text-right",children:"가동률"}),o.jsx("th",{className:"text-right",children:"성능"}),o.jsx("th",{className:"text-right",children:"품질"}),o.jsx("th",{className:"text-right px-4",children:"OEE"})]})}),o.jsxs("tbody",{children:[e.map(p=>o.jsxs("tr",{className:"border-t border-edge/50",children:[o.jsx("td",{className:"py-3 px-4 font-medium",children:p.equipmentCode}),o.jsx("td",{className:"text-slate-400 text-xs",children:p.recordDate||"-"}),o.jsx("td",{className:"text-right text-slate-300",children:p.availability!=null?(p.availability*100).toFixed(0)+"%":"-"}),o.jsx("td",{className:"text-right text-slate-300",children:p.performance!=null?(p.performance*100).toFixed(0)+"%":"-"}),o.jsx("td",{className:"text-right text-slate-300",children:p.quality!=null?(p.quality*100).toFixed(0)+"%":"-"}),o.jsxs("td",{className:"text-right px-4 font-bold text-accent",children:[mhe(p),"%"]})]},p.id)),e.length===0&&o.jsx(Be,{colSpan:6,msg:"OEE 기록이 없습니다."})]})]})}),c&&o.jsxs(Fe,{title:"OEE 기록",onClose:()=>u(null),children:[o.jsxs("div",{className:"space-y-3",children:[o.jsx(D,{label:"설비",children:o.jsxs("select",{className:"inp",value:c.equipmentCode,onChange:p=>u({...c,equipmentCode:p.target.value}),children:[o.jsx("option",{value:"",children:"선택"}),n.map(p=>o.jsx("option",{value:p.equipmentCode,children:p.equipmentName||p.equipmentCode},p.id))]})}),o.jsx(D,{label:"기록 일자",children:o.jsx("input",{type:"date",className:"inp",value:c.recordDate,onChange:p=>u({...c,recordDate:p.target.value})})}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"계획 가동시간(분)",children:o.jsx("input",{type:"number",className:"inp",value:c.plannedTime,onChange:p=>u({...c,plannedTime:Number(p.target.value)})})}),o.jsx(D,{label:"실제 가동시간(분)",children:o.jsx("input",{type:"number",className:"inp",value:c.runTime,onChange:p=>u({...c,runTime:Number(p.target.value)})})})]}),o.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[o.jsx(D,{label:"이상 사이클(분)",children:o.jsx("input",{type:"number",step:"0.01",className:"inp",value:c.idealCycleTime,onChange:p=>u({...c,idealCycleTime:Number(p.target.value)})})}),o.jsx(D,{label:"총 생산수",children:o.jsx("input",{type:"number",className:"inp",value:c.totalCount,onChange:p=>u({...c,totalCount:Number(p.target.value)})})}),o.jsx(D,{label:"양품수",children:o.jsx("input",{type:"number",className:"inp",value:c.goodCount,onChange:p=>u({...c,goodCount:Number(p.target.value)})})})]})]}),o.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[o.jsx(K,{variant:"ghost",onClick:()=>u(null),children:"취소"}),o.jsx(K,{onClick:j,children:"저장"})]})]})]})}function vhe(){const[e,t]=O.useState(""),[n,r]=O.useState([]),[a,i]=O.useState([]),[l,s]=O.useState([]),[c,u]=O.useState(!1),f=async()=>{e.trim()&&(u(!0),W6(e).then(h=>r(d(h))).catch(()=>r([])),Z6(e).then(h=>i(d(h))).catch(()=>i([])),J6(e).then(h=>s(d(h))).catch(()=>s([])))},d=h=>Array.isArray(h)?h:(h==null?void 0:h.nodes)||(h==null?void 0:h.items)||(h?[h]:[]);return o.jsxs("div",{children:[o.jsx(lt,{title:"LOT 추적",subtitle:"LOT/시리얼 정·역추적 (Genealogy) — 이력 · 정추적(소비처) · 역추적(투입원)"}),o.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[o.jsx("input",{value:e,onChange:h=>t(h.target.value),onKeyDown:h=>h.key==="Enter"&&f(),placeholder:"LOT 번호 입력 (예: LOT-20260614-001)",className:"inp w-80"}),o.jsxs(K,{onClick:f,children:[o.jsx(Rs,{size:15})," 추적"]})]}),c?o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[o.jsx(xe,{title:"이력 (History)",icon:o.jsx(J_,{size:15}),children:o.jsx(yv,{rows:n,kind:"history"})}),o.jsx(xe,{title:"정추적 → 소비 작업지시",icon:o.jsx(F_,{size:15,className:"text-emerald-400"}),children:o.jsx(yv,{rows:a,kind:"forward"})}),o.jsx(xe,{title:"역추적 ← 투입 LOT",icon:o.jsx(V5,{size:15,className:"text-sky-400"}),children:o.jsx(yv,{rows:l,kind:"backward"})})]}):o.jsx(Be,{msg:"LOT 번호를 입력하고 추적을 실행하세요."})]})}function yv({rows:e,kind:t}){return e.length?o.jsx("div",{className:"space-y-2 max-h-[460px] overflow-auto",children:e.map((n,r)=>o.jsxs("div",{className:"relative pl-4 border-l-2 border-edge",children:[o.jsx("span",{className:"absolute -left-[5px] top-1.5 w-2 h-2 rounded-full bg-brand"}),o.jsxs("div",{className:"bg-panel border border-edge rounded-lg p-2.5",children:[o.jsxs("div",{className:"text-sm font-medium flex items-center gap-1.5",children:[o.jsx(nT,{size:12,className:"text-brand"}),n.lotNo||n.woNo||n.itemName||n.itemCode||n.event||`노드 ${r+1}`]}),o.jsx("div",{className:"text-[11px] text-slate-400 mt-0.5",children:[n.itemName||n.itemCode,n.woNo,n.eventType||n.txnType||n.refType,n.qty!=null?`${n.qty}`:null].filter(Boolean).join(" · ")||(t==="history"?"이력":"관계")}),n.createdAt&&o.jsx("div",{className:"text-[10px] text-slate-500 mt-0.5",children:new Date(n.createdAt).toLocaleString("ko-KR")})]})]},r))}):o.jsx("p",{className:"text-slate-500 text-sm py-6 text-center",children:"데이터 없음"})}const ghe=["","DRAFT","CONFIRMED","INPROGRESS","DONE","CANCELLED"],xhe={itemCode:"",planQty:0,startDate:"",endDate:"",remark:""},bhe={DRAFT:[{action:"CONFIRM",label:"확정"},{action:"CANCEL",label:"취소"}],CONFIRMED:[{action:"START",label:"착수"},{action:"CANCEL",label:"취소"}],INPROGRESS:[{action:"COMPLETE",label:"완료"}]};function jhe(e,t,n){const r=e.startDate?new Date(e.startDate).getTime():t,a=e.endDate?new Date(e.endDate).getTime():n,i=Math.max(1,n-t),l=(r-t)/i*100,s=Math.max(2,(a-r)/i*100);return{left:`${Math.max(0,l)}%`,width:`${Math.min(100,s)}%`}}function She(){const[e,t]=O.useState([]),[n,r]=O.useState(""),[a,i]=O.useState(null),[l,s]=O.useState([]),c=Vt(),u=wr(),f=()=>e8({status:n}).then(g=>t(g||[])).catch(()=>t([]));O.useEffect(()=>{f()},[n]),O.useEffect(()=>{Yt({itemType:"PRODUCT"}).then(g=>s(g||[])).catch(()=>{})},[]);const d=()=>i({...xhe,_new:!0}),h=async()=>{const{_new:g,id:b,...x}=a;g?await t8(x):await n8(b,x),i(null),f()},m=async g=>{window.confirm("삭제하시겠습니까?")&&(await a8(g),f())},j=async(g,b)=>{await r8(g,b),f()},v=e.flatMap(g=>[g.startDate,g.endDate]).filter(Boolean).map(g=>new Date(g).getTime()),p=v.length?Math.min(...v):Date.now(),y=v.length?Math.max(...v):Date.now()+864e5;return o.jsxs("div",{children:[o.jsx(lt,{title:"생산계획",subtitle:"생산 일정 계획 · 간트 타임라인",actions:c&&o.jsxs(K,{onClick:d,children:[o.jsx(at,{size:16})," 생산계획"]})}),o.jsx("div",{className:"flex items-center gap-2 mb-4",children:o.jsx("select",{className:"inp w-36",value:n,onChange:g=>r(g.target.value),children:ghe.map(g=>o.jsx("option",{value:g,children:g||"전체 상태"},g))})}),o.jsx(xe,{title:"생산 일정 (간트)",icon:o.jsx(Y_,{size:15}),className:"mb-5",children:o.jsxs("div",{className:"space-y-2",children:[e.map(g=>{const b=jhe(g,p,y);return o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"w-40 text-xs text-slate-300 truncate",children:g.itemName||g.itemCode}),o.jsx("div",{className:"flex-1 relative h-5 bg-ink rounded",children:o.jsx("div",{className:"absolute h-5 rounded bg-brand/60 border border-brand text-[10px] text-white flex items-center px-1 overflow-hidden",style:b,children:Number(g.planQty||0).toLocaleString()})}),o.jsx(rt,{status:g.status})]},g.id)}),e.length===0&&o.jsx("p",{className:"text-slate-500 text-sm py-4 text-center",children:"생산계획이 없습니다."})]})}),o.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left py-3 px-4",children:"품목"}),o.jsx("th",{className:"text-right",children:"계획수량"}),o.jsx("th",{className:"text-left",children:"시작"}),o.jsx("th",{className:"text-left",children:"종료"}),o.jsx("th",{className:"text-left",children:"상태"}),o.jsx("th",{className:"text-right px-4",children:"작업"})]})}),o.jsxs("tbody",{children:[e.map(g=>o.jsxs("tr",{className:"border-t border-edge/50",children:[o.jsx("td",{className:"py-3 px-4 font-medium",children:g.itemName||g.itemCode}),o.jsx("td",{className:"text-right text-slate-300",children:Number(g.planQty||0).toLocaleString()}),o.jsx("td",{className:"text-slate-400 text-xs",children:g.startDate||"-"}),o.jsx("td",{className:"text-slate-400 text-xs",children:g.endDate||"-"}),o.jsx("td",{children:o.jsx(rt,{status:g.status})}),o.jsx("td",{className:"px-4",children:o.jsxs("div",{className:"flex items-center justify-end gap-2",children:[c&&(bhe[g.status]||[]).map(b=>o.jsx("button",{onClick:()=>j(g.id,b.action),className:"text-xs text-brand hover:underline",children:b.label},b.action)),c&&g.status==="DRAFT"&&o.jsx("button",{onClick:()=>i({...g,_new:!1}),className:"text-xs text-slate-400 hover:text-brand",children:"편집"}),u&&o.jsx("button",{onClick:()=>m(g.id),className:"text-rose-400 hover:text-rose-300",children:o.jsx(tr,{size:14})})]})})]},g.id)),e.length===0&&o.jsx(Be,{colSpan:6,msg:"생산계획이 없습니다."})]})]})}),a&&o.jsxs(Fe,{title:a._new?"생산계획 작성":"생산계획 편집",onClose:()=>i(null),children:[o.jsxs("div",{className:"space-y-3",children:[o.jsx(D,{label:"품목(제품)",children:o.jsxs("select",{className:"inp",value:a.itemCode,onChange:g=>i({...a,itemCode:g.target.value}),children:[o.jsx("option",{value:"",children:"선택"}),l.map(g=>o.jsxs("option",{value:g.itemCode,children:[g.itemName," (",g.itemCode,")"]},g.id))]})}),o.jsx(D,{label:"계획 수량",children:o.jsx("input",{type:"number",className:"inp",value:a.planQty,onChange:g=>i({...a,planQty:Number(g.target.value)})})}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"시작일",children:o.jsx("input",{type:"date",className:"inp",value:a.startDate||"",onChange:g=>i({...a,startDate:g.target.value})})}),o.jsx(D,{label:"종료일",children:o.jsx("input",{type:"date",className:"inp",value:a.endDate||"",onChange:g=>i({...a,endDate:g.target.value})})})]}),o.jsx(D,{label:"비고",children:o.jsx("input",{className:"inp",value:a.remark||"",onChange:g=>i({...a,remark:g.target.value})})})]}),o.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[o.jsx(K,{variant:"ghost",onClick:()=>i(null),children:"취소"}),o.jsx(K,{onClick:h,children:"저장"})]})]})]})}const whe=["","REQUESTED","INSPECTING","ACCEPTED","REJECTED"],Ohe={partnerCode:"",itemCode:"",qty:0,lotNo:"",warehouseCode:"",locationCode:"",inspectionRequired:!1,remark:""};function Ahe(){const[e,t]=O.useState([]),[n,r]=O.useState(""),[a,i]=O.useState(null),[l,s]=O.useState([]),[c,u]=O.useState([]),[f,d]=O.useState([]),h=Vt(),m=()=>i8({status:n}).then(g=>t(g||[])).catch(()=>t([]));O.useEffect(()=>{m()},[n]),O.useEffect(()=>{Yt().then(g=>s(g||[])).catch(()=>{}),E0({partnerType:"SUPPLIER"}).then(g=>u(g||[])).catch(()=>{}),pf().then(g=>d(g||[])).catch(()=>{})},[]);const j=()=>i({...Ohe,_new:!0}),v=async()=>{const{_new:g,...b}=a;await l8(b),i(null),m()},p=async g=>{await o8(g.id,g.inspectionRequired?"PASS":void 0),m()},y=async g=>{const b=window.prompt("반려 사유");b!=null&&(await s8(g.id,b),m())};return o.jsxs("div",{children:[o.jsx(lt,{title:"입고",subtitle:"입고 요청 · 검수 · 입고 LOT · 재고 증가",actions:h&&o.jsxs(K,{onClick:j,children:[o.jsx(at,{size:16})," 입고 요청"]})}),o.jsx("div",{className:"flex items-center gap-2 mb-4",children:o.jsx("select",{className:"inp w-36",value:n,onChange:g=>r(g.target.value),children:whe.map(g=>o.jsx("option",{value:g,children:g||"전체 상태"},g))})}),o.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left py-3 px-4",children:"입고번호"}),o.jsx("th",{className:"text-left",children:"공급사"}),o.jsx("th",{className:"text-left",children:"품목"}),o.jsx("th",{className:"text-right",children:"수량"}),o.jsx("th",{className:"text-left",children:"LOT"}),o.jsx("th",{className:"text-left",children:"창고"}),o.jsx("th",{className:"text-left",children:"상태"}),o.jsx("th",{className:"text-right px-4",children:"작업"})]})}),o.jsxs("tbody",{children:[e.map(g=>o.jsxs("tr",{className:"border-t border-edge/50",children:[o.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[o.jsx(rT,{size:14,className:"text-brand"}),g.receivingNo||g.id]}),o.jsx("td",{className:"text-slate-400 text-xs",children:g.partnerCode}),o.jsx("td",{className:"text-slate-300 text-xs",children:g.itemName||g.itemCode}),o.jsx("td",{className:"text-right text-slate-300",children:Number(g.qty||0).toLocaleString()}),o.jsx("td",{className:"text-slate-400 font-mono text-xs",children:g.lotNo||"-"}),o.jsx("td",{className:"text-slate-400 text-xs",children:g.warehouseCode||"-"}),o.jsx("td",{children:o.jsx(rt,{status:g.status})}),o.jsx("td",{className:"px-4",children:o.jsx("div",{className:"flex items-center justify-end gap-2",children:h&&(g.status==="REQUESTED"||g.status==="INSPECTING")&&o.jsxs(o.Fragment,{children:[o.jsx("button",{onClick:()=>p(g),title:"입고 승인",className:"text-emerald-400 hover:text-emerald-300",children:o.jsx(X5,{size:16})}),o.jsx("button",{onClick:()=>y(g),title:"반려",className:"text-rose-400 hover:text-rose-300",children:o.jsx(dT,{size:16})})]})})})]},g.id)),e.length===0&&o.jsx(Be,{colSpan:8,msg:"입고 건이 없습니다."})]})]})}),a&&o.jsxs(Fe,{title:"입고 요청",onClose:()=>i(null),children:[o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"공급사",children:o.jsxs("select",{className:"inp",value:a.partnerCode,onChange:g=>i({...a,partnerCode:g.target.value}),children:[o.jsx("option",{value:"",children:"선택"}),c.map(g=>o.jsx("option",{value:g.partnerCode,children:g.partnerName||g.partnerCode},g.id))]})}),o.jsx(D,{label:"품목",children:o.jsxs("select",{className:"inp",value:a.itemCode,onChange:g=>i({...a,itemCode:g.target.value}),children:[o.jsx("option",{value:"",children:"선택"}),l.map(g=>o.jsxs("option",{value:g.itemCode,children:[g.itemName," (",g.itemCode,")"]},g.id))]})})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"수량",children:o.jsx("input",{type:"number",className:"inp",value:a.qty,onChange:g=>i({...a,qty:Number(g.target.value)})})}),o.jsx(D,{label:"LOT (미입력 시 자동)",children:o.jsx("input",{className:"inp",value:a.lotNo,onChange:g=>i({...a,lotNo:g.target.value})})})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"창고",children:o.jsxs("select",{className:"inp",value:a.warehouseCode,onChange:g=>i({...a,warehouseCode:g.target.value}),children:[o.jsx("option",{value:"",children:"선택"}),f.map(g=>o.jsx("option",{value:g.warehouseCode,children:g.warehouseName||g.warehouseCode},g.id))]})}),o.jsx(D,{label:"로케이션",children:o.jsx("input",{className:"inp",value:a.locationCode,onChange:g=>i({...a,locationCode:g.target.value})})})]}),o.jsxs("label",{className:"flex items-center gap-2 text-sm text-slate-300",children:[o.jsx("input",{type:"checkbox",checked:a.inspectionRequired,onChange:g=>i({...a,inspectionRequired:g.target.checked})})," 수입검사(IQC) 필요"]}),o.jsx(D,{label:"비고",children:o.jsx("input",{className:"inp",value:a.remark,onChange:g=>i({...a,remark:g.target.value})})})]}),o.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[o.jsx(K,{variant:"ghost",onClick:()=>i(null),children:"취소"}),o.jsx(K,{onClick:v,children:"저장"})]})]})]})}const Nhe=["","ORDERED","PICKING","PACKING","INSPECTED","SHIPPED","CANCELLED"],Ehe={partnerCode:"",orderRef:"",itemCode:"",lotNo:"",planQty:0,warehouseCode:"",locationCode:"",inspectionRequired:!1,remark:""};function Che(){const[e,t]=O.useState([]),[n,r]=O.useState(null),[a,i]=O.useState(""),[l,s]=O.useState(""),[c,u]=O.useState(null),[f,d]=O.useState(null),[h,m]=O.useState([]),[j,v]=O.useState([]),[p,y]=O.useState([]),g=Vt(),b=()=>{N6({status:a,keyword:l}).then(_=>t(_||[])).catch(()=>t([])),E6().then(r).catch(()=>{})};O.useEffect(()=>{b()},[a]),O.useEffect(()=>{E0({partnerType:"CUSTOMER"}).then(_=>m(_||[])).catch(()=>{}),Yt().then(_=>v(_||[])).catch(()=>{}),pf().then(_=>y(_||[])).catch(()=>{})},[]);const x=()=>u({...Ehe,_new:!0}),w=async _=>{d(await C6(_))},S=async()=>{const{_new:_,id:E,...$}=c;_?await _6($):await T6(E,$),u(null),b()},A=async _=>{const E=window.prompt(`피킹 수량 (계획 ${_.planQty})`,String(_.planQty-(_.pickedQty||0)));E!=null&&(await P6(_.id,Number(E)),b(),(f==null?void 0:f.id)===_.id&&w(_.id))},N=async _=>{const E=window.prompt(`패킹 수량 (피킹 ${_.pickedQty})`,String((_.pickedQty||0)-(_.packedQty||0)));E!=null&&(await M6(_.id,Number(E)),b(),(f==null?void 0:f.id)===_.id&&w(_.id))},C=async(_,E)=>{await $6(_.id,E),b(),(f==null?void 0:f.id)===_.id&&w(_.id)},M=async _=>{var E,$;if(window.confirm("출하 확정 시 재고가 차감되고 납품서·거래명세서가 발번됩니다. 진행할까요?"))try{await R6(_.id),b(),d(null)}catch(L){window.alert((($=(E=L==null?void 0:L.response)==null?void 0:E.data)==null?void 0:$.message)===void 0?"출하 확정 실패":"출하 확정 실패 — 검사 합격 필요 여부를 확인하세요.")}},R=async _=>{window.confirm("취소하시겠습니까?")&&(await k6(_.id),b(),d(null))},P=[{key:"ORDERED",label:"출하지시"},{key:"PICKING",label:"피킹"},{key:"PACKING",label:"패킹"},{key:"INSPECTED",label:"검사완료"},{key:"SHIPPED",label:"출하완료"}],B=_=>(n==null?void 0:n[_])??(n==null?void 0:n[_.toLowerCase()])??0;return o.jsxs("div",{children:[o.jsx(lt,{title:"출하관리 ★",subtitle:"출하지시 · 피킹/패킹 · 출하검사(OQC) · 출하확정(재고감소·납품서·거래명세서)",actions:g&&o.jsxs(K,{onClick:x,children:[o.jsx(at,{size:16})," 출하지시"]})}),o.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-5 gap-3 mb-5",children:P.map(_=>o.jsxs("div",{className:"bg-card border border-edge rounded-xl p-4 text-center",children:[o.jsx("div",{className:"text-xs text-slate-400",children:_.label}),o.jsx("div",{className:"text-2xl font-bold mt-1 text-brand",children:B(_.key).toLocaleString()})]},_.key))}),o.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[o.jsx("select",{className:"inp w-36",value:a,onChange:_=>i(_.target.value),children:Nhe.map(_=>o.jsx("option",{value:_,children:_||"전체 상태"},_))}),o.jsx("input",{value:l,onChange:_=>s(_.target.value),onKeyDown:_=>_.key==="Enter"&&b(),placeholder:"품목/거래처 검색",className:"inp w-52"}),o.jsx(K,{variant:"ghost",onClick:b,children:"검색"})]}),o.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left py-3 px-4",children:"출하번호"}),o.jsx("th",{className:"text-left",children:"거래처"}),o.jsx("th",{className:"text-left",children:"품목"}),o.jsx("th",{className:"text-left",children:"LOT"}),o.jsx("th",{className:"text-right",children:"계획/피킹/패킹"}),o.jsx("th",{className:"text-left",children:"검사"}),o.jsx("th",{className:"text-left",children:"상태"}),o.jsx("th",{className:"text-right px-4",children:"작업"})]})}),o.jsxs("tbody",{children:[e.map(_=>o.jsxs("tr",{className:"border-t border-edge/50 cursor-pointer hover:bg-panel/40",onClick:()=>w(_.id),children:[o.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[o.jsx(Vp,{size:14,className:"text-brand"}),_.shippingNo]}),o.jsx("td",{className:"text-slate-400 text-xs",children:_.partnerCode}),o.jsx("td",{className:"text-slate-300 text-xs",children:_.itemName||_.itemCode}),o.jsx("td",{className:"text-slate-400 font-mono text-xs",children:_.lotNo||"-"}),o.jsxs("td",{className:"text-right text-slate-300 text-xs",children:[_.planQty,"/",_.pickedQty||0,"/",_.packedQty||0]}),o.jsx("td",{children:_.inspectionRequired?o.jsx(rt,{status:_.inspectionResult||"WAIT"}):o.jsx("span",{className:"text-slate-500 text-xs",children:"불필요"})}),o.jsx("td",{children:o.jsx(rt,{status:_.status})}),o.jsx("td",{className:"px-4",onClick:E=>E.stopPropagation(),children:o.jsxs("div",{className:"flex items-center justify-end gap-2",children:[g&&_.status==="ORDERED"&&o.jsx("button",{onClick:()=>A(_),title:"피킹",className:"text-sky-400 hover:text-sky-300",children:o.jsx(_S,{size:15})}),g&&_.status==="PICKING"&&o.jsx("button",{onClick:()=>N(_),title:"패킹",className:"text-violet-400 hover:text-violet-300",children:o.jsx(CS,{size:15})}),g&&_.status==="PACKING"&&_.inspectionRequired&&o.jsx("button",{onClick:()=>C(_,"PASS"),title:"출하검사",className:"text-cyan-400 hover:text-cyan-300",children:o.jsx(ul,{size:15})}),g&&(_.status==="PACKING"||_.status==="INSPECTED")&&o.jsx("button",{onClick:()=>M(_),title:"출하확정",className:"text-emerald-400 hover:text-emerald-300",children:o.jsx(TS,{size:15})}),g&&_.status!=="SHIPPED"&&_.status!=="CANCELLED"&&o.jsx("button",{onClick:()=>R(_),title:"취소",className:"text-rose-400 hover:text-rose-300",children:o.jsx(ph,{size:15})})]})})]},_.id)),e.length===0&&o.jsx(Be,{colSpan:8,msg:"출하 건이 없습니다."})]})]})}),c&&o.jsxs(Fe,{title:"출하지시 생성",onClose:()=>u(null),children:[o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"거래처(고객)",children:o.jsxs("select",{className:"inp",value:c.partnerCode,onChange:_=>u({...c,partnerCode:_.target.value}),children:[o.jsx("option",{value:"",children:"선택"}),h.map(_=>o.jsx("option",{value:_.partnerCode,children:_.partnerName||_.partnerCode},_.id))]})}),o.jsx(D,{label:"주문참조",children:o.jsx("input",{className:"inp",value:c.orderRef,onChange:_=>u({...c,orderRef:_.target.value})})})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"품목",children:o.jsxs("select",{className:"inp",value:c.itemCode,onChange:_=>u({...c,itemCode:_.target.value}),children:[o.jsx("option",{value:"",children:"선택"}),j.map(_=>o.jsxs("option",{value:_.itemCode,children:[_.itemName," (",_.itemCode,")"]},_.id))]})}),o.jsx(D,{label:"LOT 번호",children:o.jsx("input",{className:"inp",value:c.lotNo,onChange:_=>u({...c,lotNo:_.target.value})})})]}),o.jsx(D,{label:"계획 수량",children:o.jsx("input",{type:"number",className:"inp",value:c.planQty,onChange:_=>u({...c,planQty:Number(_.target.value)})})}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"창고",children:o.jsxs("select",{className:"inp",value:c.warehouseCode,onChange:_=>u({...c,warehouseCode:_.target.value}),children:[o.jsx("option",{value:"",children:"선택"}),p.map(_=>o.jsx("option",{value:_.warehouseCode,children:_.warehouseName||_.warehouseCode},_.id))]})}),o.jsx(D,{label:"로케이션",children:o.jsx("input",{className:"inp",value:c.locationCode,onChange:_=>u({...c,locationCode:_.target.value})})})]}),o.jsxs("label",{className:"flex items-center gap-2 text-sm text-slate-300",children:[o.jsx("input",{type:"checkbox",checked:c.inspectionRequired,onChange:_=>u({...c,inspectionRequired:_.target.checked})}),"출하검사(OQC) 필수"]}),o.jsx(D,{label:"비고",children:o.jsx("input",{className:"inp",value:c.remark,onChange:_=>u({...c,remark:_.target.value})})})]}),o.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[o.jsx(K,{variant:"ghost",onClick:()=>u(null),children:"취소"}),o.jsx(K,{onClick:S,children:"저장"})]})]}),f&&o.jsxs(Fe,{title:`출하 상세 — ${f.shippingNo}`,onClose:()=>d(null),wide:!0,children:[o.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[o.jsx(Bn,{label:"거래처",value:f.partnerCode}),o.jsx(Bn,{label:"상태",value:o.jsx(rt,{status:f.status})}),o.jsx(Bn,{label:"품목",value:`${f.itemName||""} (${f.itemCode})`}),o.jsx(Bn,{label:"LOT",value:f.lotNo||"-"}),o.jsx(Bn,{label:"계획 수량",value:f.planQty}),o.jsx(Bn,{label:"피킹/패킹/출하",value:`${f.pickedQty||0} / ${f.packedQty||0} / ${f.shippedQty||0}`}),o.jsx(Bn,{label:"검사 필수",value:f.inspectionRequired?`예 (${f.inspectionResult||"대기"})`:"아니오"}),o.jsx(Bn,{label:"창고/로케이션",value:`${f.warehouseCode||"-"} / ${f.locationCode||"-"}`}),o.jsx(Bn,{label:"납품서",value:f.deliveryNo||"-",icon:o.jsx(NS,{size:13})}),o.jsx(Bn,{label:"거래명세서",value:f.statementNo||"-",icon:o.jsx(NS,{size:13})}),o.jsx(Bn,{label:"출하일",value:f.shipDate||"-"}),o.jsx(Bn,{label:"비고",value:f.remark||"-"})]}),g&&f.status!=="SHIPPED"&&f.status!=="CANCELLED"&&o.jsxs("div",{className:"flex flex-wrap gap-2 mt-5 justify-end",children:[f.status==="ORDERED"&&o.jsxs(K,{variant:"ghost",onClick:()=>A(f),children:[o.jsx(_S,{size:14})," 피킹"]}),f.status==="PICKING"&&o.jsxs(K,{variant:"ghost",onClick:()=>N(f),children:[o.jsx(CS,{size:14})," 패킹"]}),f.status==="PACKING"&&f.inspectionRequired&&o.jsxs(o.Fragment,{children:[o.jsxs(K,{variant:"ghost",onClick:()=>C(f,"PASS"),children:[o.jsx(ul,{size:14})," 검사 합격"]}),o.jsxs(K,{variant:"danger",onClick:()=>C(f,"FAIL"),children:[o.jsx(ul,{size:14})," 검사 불합격"]})]}),(f.status==="PACKING"||f.status==="INSPECTED")&&o.jsxs(K,{onClick:()=>M(f),children:[o.jsx(TS,{size:14})," 출하확정"]}),o.jsxs(K,{variant:"danger",onClick:()=>R(f),children:[o.jsx(ph,{size:14})," 취소"]})]})]})]})}function Bn({label:e,value:t,icon:n}){return o.jsxs("div",{className:"bg-panel border border-edge rounded-lg p-2.5",children:[o.jsxs("div",{className:"text-[11px] text-slate-500 mb-0.5 flex items-center gap-1",children:[n,e]}),o.jsx("div",{className:"text-slate-200",children:t})]})}function _he(){const[e,t]=O.useState([]),[n,r]=O.useState([]),[a,i]=O.useState([]),[l,s]=O.useState(""),[c,u]=O.useState(""),[f,d]=O.useState(null),[h,m]=O.useState([]),[j,v]=O.useState([]),p=Vt(),y=()=>{c8({keyword:l,warehouseCode:c}).then(x=>t(x||[])).catch(()=>t([])),u8().then(x=>r(Array.isArray(x)?x:[])).catch(()=>r([])),f8({limit:30}).then(x=>i(Array.isArray(x)?x:[])).catch(()=>i([]))};O.useEffect(()=>{y()},[c]),O.useEffect(()=>{Yt().then(x=>m(x||[])).catch(()=>{}),pf().then(x=>v(x||[])).catch(()=>{})},[]);const g=()=>d({itemCode:"",fromWarehouse:"",toWarehouse:"",fromLocation:"",toLocation:"",qty:0}),b=async()=>{await d8(f),d(null),y()};return o.jsxs("div",{children:[o.jsx(lt,{title:"재고",subtitle:"로케이션별 재고 · 안전재고 · 재고 이동(transfer) · 수불 원장",actions:p&&o.jsxs(K,{onClick:g,children:[o.jsx(K5,{size:15})," 재고 이동"]})}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4 mb-5",children:[o.jsx(xe,{title:"안전재고 미달",icon:o.jsx(gi,{size:15,className:"text-amber-400"}),children:o.jsxs("div",{className:"space-y-1.5 max-h-44 overflow-auto",children:[n.map((x,w)=>o.jsxs("div",{className:"flex items-center justify-between bg-amber-500/5 border border-amber-500/20 rounded p-2 text-sm",children:[o.jsx("span",{children:x.itemName||x.itemCode}),o.jsxs("span",{className:"text-amber-400 text-xs",children:[Number(x.qty??x.availableQty??0)," / 안전 ",Number(x.safetyStock??0)]})]},w)),n.length===0&&o.jsx("p",{className:"text-slate-500 text-xs py-4 text-center",children:"미달 항목 없음"})]})}),o.jsx(xe,{title:"최근 수불 이력",icon:o.jsx(J_,{size:15}),className:"lg:col-span-2",children:o.jsxs("div",{className:"space-y-1 max-h-44 overflow-auto",children:[a.map((x,w)=>o.jsxs("div",{className:"flex items-center justify-between text-xs border-b border-edge/40 py-1",children:[o.jsx("span",{className:"text-slate-300",children:x.itemName||x.itemCode}),o.jsxs("span",{className:"flex items-center gap-2",children:[o.jsx(rt,{status:x.txnType||x.refType}),o.jsxs("span",{className:Number(x.qty)<0?"text-rose-400":"text-emerald-400",children:[Number(x.qty||0)>0?"+":"",Number(x.qty||0).toLocaleString()]}),o.jsx("span",{className:"text-slate-500",children:x.createdAt?new Date(x.createdAt).toLocaleDateString("ko-KR"):""})]})]},w)),a.length===0&&o.jsx("p",{className:"text-slate-500 text-xs py-4 text-center",children:"수불 이력 없음"})]})})]}),o.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[o.jsxs("select",{className:"inp w-44",value:c,onChange:x=>u(x.target.value),children:[o.jsx("option",{value:"",children:"전체 창고"}),j.map(x=>o.jsx("option",{value:x.warehouseCode,children:x.warehouseName||x.warehouseCode},x.id))]}),o.jsx("input",{value:l,onChange:x=>s(x.target.value),onKeyDown:x=>x.key==="Enter"&&y(),placeholder:"품목 검색",className:"inp w-52"}),o.jsx(K,{variant:"ghost",onClick:y,children:"검색"})]}),o.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left py-3 px-4",children:"품목"}),o.jsx("th",{className:"text-left",children:"창고"}),o.jsx("th",{className:"text-left",children:"로케이션"}),o.jsx("th",{className:"text-left",children:"LOT"}),o.jsx("th",{className:"text-right",children:"재고수량"}),o.jsx("th",{className:"text-right px-4",children:"안전재고"})]})}),o.jsxs("tbody",{children:[e.map((x,w)=>{const S=Number(x.qty??x.availableQty??0),A=Number(x.safetyStock??0);return o.jsxs("tr",{className:"border-t border-edge/50",children:[o.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[o.jsx(sf,{size:14,className:"text-brand"}),x.itemName||x.itemCode]}),o.jsx("td",{className:"text-slate-400 text-xs",children:x.warehouseCode||"-"}),o.jsx("td",{className:"text-slate-400 text-xs",children:x.locationCode||"-"}),o.jsx("td",{className:"text-slate-400 font-mono text-xs",children:x.lotNo||"-"}),o.jsx("td",{className:`text-right font-medium ${A>0&&S<A?"text-amber-400":"text-slate-200"}`,children:S.toLocaleString()}),o.jsx("td",{className:"text-right px-4 text-slate-500",children:A.toLocaleString()})]},x.id??w)}),e.length===0&&o.jsx(Be,{colSpan:6,msg:"재고가 없습니다."})]})]})}),f&&o.jsxs(Fe,{title:"재고 이동",onClose:()=>d(null),children:[o.jsxs("div",{className:"space-y-3",children:[o.jsx(D,{label:"품목",children:o.jsxs("select",{className:"inp",value:f.itemCode,onChange:x=>d({...f,itemCode:x.target.value}),children:[o.jsx("option",{value:"",children:"선택"}),h.map(x=>o.jsxs("option",{value:x.itemCode,children:[x.itemName," (",x.itemCode,")"]},x.id))]})}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"출발 창고",children:o.jsxs("select",{className:"inp",value:f.fromWarehouse,onChange:x=>d({...f,fromWarehouse:x.target.value}),children:[o.jsx("option",{value:"",children:"선택"}),j.map(x=>o.jsx("option",{value:x.warehouseCode,children:x.warehouseName||x.warehouseCode},x.id))]})}),o.jsx(D,{label:"도착 창고",children:o.jsxs("select",{className:"inp",value:f.toWarehouse,onChange:x=>d({...f,toWarehouse:x.target.value}),children:[o.jsx("option",{value:"",children:"선택"}),j.map(x=>o.jsx("option",{value:x.warehouseCode,children:x.warehouseName||x.warehouseCode},x.id))]})})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"출발 로케이션",children:o.jsx("input",{className:"inp",value:f.fromLocation,onChange:x=>d({...f,fromLocation:x.target.value})})}),o.jsx(D,{label:"도착 로케이션",children:o.jsx("input",{className:"inp",value:f.toLocation,onChange:x=>d({...f,toLocation:x.target.value})})})]}),o.jsx(D,{label:"이동 수량",children:o.jsx("input",{type:"number",className:"inp",value:f.qty,onChange:x=>d({...f,qty:Number(x.target.value)})})})]}),o.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[o.jsx(K,{variant:"ghost",onClick:()=>d(null),children:"취소"}),o.jsx(K,{onClick:b,children:"이동"})]})]})]})}const The=["","COUNTED","ADJUSTED"],Phe={itemCode:"",warehouseCode:"",locationCode:"",lotNo:"",countedQty:0,remark:""};function Mhe(){const[e,t]=O.useState([]),[n,r]=O.useState(""),[a,i]=O.useState(null),[l,s]=O.useState([]),[c,u]=O.useState([]),f=Vt(),d=wr(),h=()=>h8({status:n}).then(p=>t(p||[])).catch(()=>t([]));O.useEffect(()=>{h()},[n]),O.useEffect(()=>{Yt().then(p=>s(p||[])).catch(()=>{}),pf().then(p=>u(p||[])).catch(()=>{})},[]);const m=()=>i({...Phe}),j=async()=>{await p8(a),i(null),h()},v=async p=>{window.confirm("재고를 실사 수량으로 보정하시겠습니까?")&&(await m8(p),h())};return o.jsxs("div",{children:[o.jsx(lt,{title:"재고실사",subtitle:"실사 카운트 · 시스템 재고 대비 차이 계산 · 재고 보정(ADJUST)",actions:f&&o.jsxs(K,{onClick:m,children:[o.jsx(at,{size:16})," 실사 카운트"]})}),o.jsx("div",{className:"flex items-center gap-2 mb-4",children:o.jsx("select",{className:"inp w-36",value:n,onChange:p=>r(p.target.value),children:The.map(p=>o.jsx("option",{value:p,children:p||"전체 상태"},p))})}),o.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left py-3 px-4",children:"실사번호"}),o.jsx("th",{className:"text-left",children:"품목"}),o.jsx("th",{className:"text-left",children:"창고/로케이션"}),o.jsx("th",{className:"text-right",children:"시스템"}),o.jsx("th",{className:"text-right",children:"실사"}),o.jsx("th",{className:"text-right",children:"차이"}),o.jsx("th",{className:"text-left",children:"상태"}),o.jsx("th",{className:"text-right px-4",children:"작업"})]})}),o.jsxs("tbody",{children:[e.map(p=>{const y=Number(p.diffQty??(p.countedQty||0)-(p.systemQty||0));return o.jsxs("tr",{className:"border-t border-edge/50",children:[o.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[o.jsx(Q_,{size:14,className:"text-brand"}),p.stocktakeNo||p.id]}),o.jsx("td",{className:"text-slate-300 text-xs",children:p.itemName||p.itemCode}),o.jsxs("td",{className:"text-slate-400 text-xs",children:[p.warehouseCode||"-"," / ",p.locationCode||"-"]}),o.jsx("td",{className:"text-right text-slate-300",children:Number(p.systemQty||0).toLocaleString()}),o.jsx("td",{className:"text-right text-slate-300",children:Number(p.countedQty||0).toLocaleString()}),o.jsxs("td",{className:`text-right font-medium ${y===0?"text-slate-400":y>0?"text-emerald-400":"text-rose-400"}`,children:[y>0?"+":"",y.toLocaleString()]}),o.jsx("td",{children:o.jsx(rt,{status:p.status})}),o.jsx("td",{className:"px-4 text-right",children:d&&p.status==="COUNTED"&&o.jsxs("button",{onClick:()=>v(p.id),className:"inline-flex items-center gap-1 text-xs text-brand hover:underline",children:[o.jsx(cf,{size:12})," 보정"]})})]},p.id)}),e.length===0&&o.jsx(Be,{colSpan:8,msg:"실사 기록이 없습니다."})]})]})}),a&&o.jsxs(Fe,{title:"실사 카운트",onClose:()=>i(null),children:[o.jsxs("div",{className:"space-y-3",children:[o.jsx(D,{label:"품목",children:o.jsxs("select",{className:"inp",value:a.itemCode,onChange:p=>i({...a,itemCode:p.target.value}),children:[o.jsx("option",{value:"",children:"선택"}),l.map(p=>o.jsxs("option",{value:p.itemCode,children:[p.itemName," (",p.itemCode,")"]},p.id))]})}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"창고",children:o.jsxs("select",{className:"inp",value:a.warehouseCode,onChange:p=>i({...a,warehouseCode:p.target.value}),children:[o.jsx("option",{value:"",children:"선택"}),c.map(p=>o.jsx("option",{value:p.warehouseCode,children:p.warehouseName||p.warehouseCode},p.id))]})}),o.jsx(D,{label:"로케이션",children:o.jsx("input",{className:"inp",value:a.locationCode,onChange:p=>i({...a,locationCode:p.target.value})})})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"LOT",children:o.jsx("input",{className:"inp",value:a.lotNo,onChange:p=>i({...a,lotNo:p.target.value})})}),o.jsx(D,{label:"실사 수량",children:o.jsx("input",{type:"number",className:"inp",value:a.countedQty,onChange:p=>i({...a,countedQty:Number(p.target.value)})})})]}),o.jsx(D,{label:"비고",children:o.jsx("input",{className:"inp",value:a.remark,onChange:p=>i({...a,remark:p.target.value})})})]}),o.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[o.jsx(K,{variant:"ghost",onClick:()=>i(null),children:"취소"}),o.jsx(K,{onClick:j,children:"카운트"})]})]})]})}const $he=["","ACTIVE","CONSUMED","SHIPPED","EXPIRED"],Rhe=["ACTIVE","CONSUMED","SHIPPED","EXPIRED"],khe={itemCode:"",lotNo:"",serialNo:"",qty:0,mfgDate:"",expiryDate:"",status:"ACTIVE"};function Dhe(){const[e,t]=O.useState([]),[n,r]=O.useState([]),[a,i]=O.useState(""),[l,s]=O.useState(""),[c,u]=O.useState(null),[f,d]=O.useState([]),h=Vt(),m=()=>{y8({status:a,keyword:l}).then(y=>t(y||[])).catch(()=>t([])),v8(30).then(y=>r(Array.isArray(y)?y:[])).catch(()=>r([]))};O.useEffect(()=>{m()},[a]),O.useEffect(()=>{Yt().then(y=>d(y||[])).catch(()=>{})},[]);const j=()=>u({...khe}),v=async()=>{await g8(c),u(null),m()},p=async(y,g)=>{await x8(y,g),m()};return o.jsxs("div",{children:[o.jsx(lt,{title:"LOT / 시리얼",subtitle:"LOT·시리얼 추적 · 유효기간 관리",actions:h&&o.jsxs(K,{onClick:j,children:[o.jsx(at,{size:16})," LOT 등록"]})}),o.jsx(xe,{title:"유효기간 임박 (30일)",icon:o.jsx(G5,{size:15,className:"text-amber-400"}),className:"mb-5",children:o.jsxs("div",{className:"flex flex-wrap gap-2",children:[n.map((y,g)=>o.jsxs("div",{className:"bg-amber-500/5 border border-amber-500/20 rounded-lg px-3 py-2 text-sm",children:[o.jsx("span",{className:"font-mono text-xs text-amber-300",children:y.lotNo}),o.jsxs("span",{className:"text-slate-400 text-xs ml-2",children:[y.itemName||y.itemCode," · ~",y.expiryDate]})]},g)),n.length===0&&o.jsx("p",{className:"text-slate-500 text-sm py-2",children:"임박 LOT 없음"})]})}),o.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[o.jsx("select",{className:"inp w-36",value:a,onChange:y=>i(y.target.value),children:$he.map(y=>o.jsx("option",{value:y,children:y||"전체 상태"},y))}),o.jsx("input",{value:l,onChange:y=>s(y.target.value),onKeyDown:y=>y.key==="Enter"&&m(),placeholder:"LOT/품목 검색",className:"inp w-52"}),o.jsx(K,{variant:"ghost",onClick:m,children:"검색"})]}),o.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left py-3 px-4",children:"LOT"}),o.jsx("th",{className:"text-left",children:"시리얼"}),o.jsx("th",{className:"text-left",children:"품목"}),o.jsx("th",{className:"text-right",children:"수량"}),o.jsx("th",{className:"text-left",children:"제조"}),o.jsx("th",{className:"text-left",children:"유효"}),o.jsx("th",{className:"text-left px-4",children:"상태"})]})}),o.jsxs("tbody",{children:[e.map(y=>o.jsxs("tr",{className:"border-t border-edge/50",children:[o.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[o.jsx(K_,{size:14,className:"text-brand"}),y.lotNo]}),o.jsx("td",{className:"text-slate-400 font-mono text-xs",children:y.serialNo||"-"}),o.jsx("td",{className:"text-slate-300 text-xs",children:y.itemName||y.itemCode}),o.jsx("td",{className:"text-right text-slate-300",children:Number(y.qty||0).toLocaleString()}),o.jsx("td",{className:"text-slate-400 text-xs",children:y.mfgDate||"-"}),o.jsx("td",{className:"text-slate-400 text-xs",children:y.expiryDate||"-"}),o.jsx("td",{className:"px-4",children:h?o.jsx("select",{value:y.status,onChange:g=>p(y.id,g.target.value),className:"px-2 py-1 rounded-md bg-ink border border-edge text-xs focus:border-brand outline-none",children:Rhe.map(g=>o.jsx("option",{value:g,children:g},g))}):o.jsx(rt,{status:y.status})})]},y.id)),e.length===0&&o.jsx(Be,{colSpan:7,msg:"LOT/시리얼이 없습니다."})]})]})}),c&&o.jsxs(Fe,{title:"LOT / 시리얼 등록",onClose:()=>u(null),children:[o.jsxs("div",{className:"space-y-3",children:[o.jsx(D,{label:"품목",children:o.jsxs("select",{className:"inp",value:c.itemCode,onChange:y=>u({...c,itemCode:y.target.value}),children:[o.jsx("option",{value:"",children:"선택"}),f.map(y=>o.jsxs("option",{value:y.itemCode,children:[y.itemName," (",y.itemCode,")"]},y.id))]})}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"LOT 번호",children:o.jsx("input",{className:"inp",value:c.lotNo,onChange:y=>u({...c,lotNo:y.target.value})})}),o.jsx(D,{label:"시리얼",children:o.jsx("input",{className:"inp",value:c.serialNo,onChange:y=>u({...c,serialNo:y.target.value})})})]}),o.jsx(D,{label:"수량",children:o.jsx("input",{type:"number",className:"inp",value:c.qty,onChange:y=>u({...c,qty:Number(y.target.value)})})}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"제조일",children:o.jsx("input",{type:"date",className:"inp",value:c.mfgDate,onChange:y=>u({...c,mfgDate:y.target.value})})}),o.jsx(D,{label:"유효기간",children:o.jsx("input",{type:"date",className:"inp",value:c.expiryDate,onChange:y=>u({...c,expiryDate:y.target.value})})})]})]}),o.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[o.jsx(K,{variant:"ghost",onClick:()=>u(null),children:"취소"}),o.jsx(K,{onClick:v,children:"저장"})]})]})]})}const Lhe=["","IQC","IPQC","OQC"],zhe=["","PASS","FAIL","WAIT"],Bhe={inspectionType:"IQC",itemCode:"",lotNo:"",qty:0,remark:""};function Ihe(){const[e,t]=O.useState([]),[n,r]=O.useState(null),[a,i]=O.useState(""),[l,s]=O.useState(""),[c,u]=O.useState(null),[f,d]=O.useState(null),[h,m]=O.useState([]),j=Vt(),v=()=>{b8({inspectionType:a,result:l}).then(S=>t(S||[])).catch(()=>t([])),j8(30).then(r).catch(()=>{})};O.useEffect(()=>{v()},[a,l]),O.useEffect(()=>{Yt().then(S=>m(S||[])).catch(()=>{})},[]);const p=()=>u({...Bhe}),y=async()=>{await S8(c),u(null),v()},g=S=>d({id:S.id,measured:0,lsl:"",usl:"",target:"",defectQty:0,defectCode:""}),b=async()=>{const{id:S,...A}=f;await w8(S,{measured:Number(A.measured),lsl:A.lsl===""?void 0:Number(A.lsl),usl:A.usl===""?void 0:Number(A.usl),target:A.target===""?void 0:Number(A.target),defectQty:Number(A.defectQty),defectCode:A.defectCode||void 0}),d(null),v()},x=async(S,A)=>{let N=0,C="";A==="FAIL"&&(N=Number(window.prompt("불량 수량","1")||0),C=window.prompt("불량 코드","")||""),await O8(S.id,{result:A,defectQty:N,defectCode:C}),v()},w=(n==null?void 0:n.passRate)??(n==null?void 0:n.rate);return o.jsxs("div",{children:[o.jsx(lt,{title:"검사 (IQC / IPQC / OQC)",subtitle:"수입·공정·출하 검사 · 합/불 판정 · FAIL 시 NCR 자동생성",actions:j&&o.jsxs(K,{onClick:p,children:[o.jsx(at,{size:16})," 검사 등록"]})}),w!=null&&o.jsx(xe,{title:"합격률 (30일)",className:"mb-5",children:o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsxs("div",{className:"text-4xl font-bold text-accent",children:[Number(w).toFixed(1),"%"]}),o.jsxs("div",{className:"text-sm text-slate-400",children:["합격 ",(n==null?void 0:n.passCount)??0," / 전체 ",(n==null?void 0:n.totalCount)??(n==null?void 0:n.total)??0]})]})}),o.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[o.jsx("select",{className:"inp w-32",value:a,onChange:S=>i(S.target.value),children:Lhe.map(S=>o.jsx("option",{value:S,children:S||"전체 유형"},S))}),o.jsx("select",{className:"inp w-32",value:l,onChange:S=>s(S.target.value),children:zhe.map(S=>o.jsx("option",{value:S,children:S||"전체 결과"},S))})]}),o.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left py-3 px-4",children:"검사번호"}),o.jsx("th",{className:"text-left",children:"유형"}),o.jsx("th",{className:"text-left",children:"품목"}),o.jsx("th",{className:"text-left",children:"LOT"}),o.jsx("th",{className:"text-right",children:"수량"}),o.jsx("th",{className:"text-left",children:"결과"}),o.jsx("th",{className:"text-right px-4",children:"작업"})]})}),o.jsxs("tbody",{children:[e.map(S=>o.jsxs("tr",{className:"border-t border-edge/50",children:[o.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[o.jsx(ul,{size:14,className:"text-brand"}),S.inspectionNo||S.id]}),o.jsx("td",{children:o.jsx("span",{className:"px-2 py-0.5 rounded bg-brand/15 text-brand text-xs border border-brand/30",children:S.inspectionType})}),o.jsx("td",{className:"text-slate-300 text-xs",children:S.itemName||S.itemCode}),o.jsx("td",{className:"text-slate-400 font-mono text-xs",children:S.lotNo||"-"}),o.jsx("td",{className:"text-right text-slate-300",children:Number(S.qty||0).toLocaleString()}),o.jsx("td",{children:o.jsx(rt,{status:S.result||"WAIT"})}),o.jsx("td",{className:"px-4",children:j&&(!S.result||S.result==="WAIT")&&o.jsxs("div",{className:"flex items-center justify-end gap-2",children:[o.jsx("button",{onClick:()=>g(S),title:"AI 판정 보조",className:"text-accent hover:text-accent/80",children:o.jsx(Rn,{size:15})}),o.jsx("button",{onClick:()=>x(S,"PASS"),title:"합격",className:"text-emerald-400 hover:text-emerald-300",children:o.jsx(Kp,{size:15})}),o.jsx("button",{onClick:()=>x(S,"FAIL"),title:"불합격",className:"text-rose-400 hover:text-rose-300",children:o.jsx(ph,{size:15})})]})})]},S.id)),e.length===0&&o.jsx(Be,{colSpan:7,msg:"검사 기록이 없습니다."})]})]})}),c&&o.jsxs(Fe,{title:"검사 등록",onClose:()=>u(null),children:[o.jsxs("div",{className:"space-y-3",children:[o.jsx(D,{label:"검사 유형",children:o.jsx("select",{className:"inp",value:c.inspectionType,onChange:S=>u({...c,inspectionType:S.target.value}),children:["IQC","IPQC","OQC"].map(S=>o.jsx("option",{children:S},S))})}),o.jsx(D,{label:"품목",children:o.jsxs("select",{className:"inp",value:c.itemCode,onChange:S=>u({...c,itemCode:S.target.value}),children:[o.jsx("option",{value:"",children:"선택"}),h.map(S=>o.jsxs("option",{value:S.itemCode,children:[S.itemName," (",S.itemCode,")"]},S.id))]})}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"LOT",children:o.jsx("input",{className:"inp",value:c.lotNo,onChange:S=>u({...c,lotNo:S.target.value})})}),o.jsx(D,{label:"검사 수량",children:o.jsx("input",{type:"number",className:"inp",value:c.qty,onChange:S=>u({...c,qty:Number(S.target.value)})})})]}),o.jsx(D,{label:"비고",children:o.jsx("input",{className:"inp",value:c.remark,onChange:S=>u({...c,remark:S.target.value})})})]}),o.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[o.jsx(K,{variant:"ghost",onClick:()=>u(null),children:"취소"}),o.jsx(K,{onClick:y,children:"저장"})]})]}),f&&o.jsxs(Fe,{title:"검사 판정 (AI 보조)",onClose:()=>d(null),children:[o.jsx("p",{className:"text-xs text-slate-400 mb-3",children:"측정값과 규격(LSL/USL/Target)을 입력하면 PASS/FAIL을 자동 판정합니다. FAIL 시 NCR이 자동 생성됩니다."}),o.jsxs("div",{className:"space-y-3",children:[o.jsx(D,{label:"측정값",children:o.jsx("input",{type:"number",step:"any",className:"inp",value:f.measured,onChange:S=>d({...f,measured:S.target.value})})}),o.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[o.jsx(D,{label:"LSL",children:o.jsx("input",{type:"number",step:"any",className:"inp",value:f.lsl,onChange:S=>d({...f,lsl:S.target.value})})}),o.jsx(D,{label:"Target",children:o.jsx("input",{type:"number",step:"any",className:"inp",value:f.target,onChange:S=>d({...f,target:S.target.value})})}),o.jsx(D,{label:"USL",children:o.jsx("input",{type:"number",step:"any",className:"inp",value:f.usl,onChange:S=>d({...f,usl:S.target.value})})})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"불량 수량",children:o.jsx("input",{type:"number",className:"inp",value:f.defectQty,onChange:S=>d({...f,defectQty:S.target.value})})}),o.jsx(D,{label:"불량 코드",children:o.jsx("input",{className:"inp",value:f.defectCode,onChange:S=>d({...f,defectCode:S.target.value})})})]})]}),o.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[o.jsx(K,{variant:"ghost",onClick:()=>d(null),children:"취소"}),o.jsxs(K,{onClick:b,children:[o.jsx(Rn,{size:14})," 판정"]})]})]})]})}const Uhe=["","IQC","IPQC","OQC"],qhe={specCode:"",itemCode:"",inspectionType:"IQC",characteristic:"",lsl:"",usl:"",target:"",unit:"",aql:"",items:[]};function Hhe(){const[e,t]=O.useState([]),[n,r]=O.useState(""),[a,i]=O.useState(null),[l,s]=O.useState([]),c=wr(),u=()=>A8({inspectionType:n}).then(y=>t(y||[])).catch(()=>t([]));O.useEffect(()=>{u()},[n]),O.useEffect(()=>{Yt().then(y=>s(y||[])).catch(()=>{})},[]);const f=()=>i({...qhe,_new:!0}),d=y=>i({...y,items:M1(y.items,[]),_new:!1}),h=async()=>{const{_new:y,id:g,items:b,...x}=a,w={...x,items:$1(b)};y?await N8(w):await E8(g,w),i(null),u()},m=async y=>{window.confirm("삭제하시겠습니까?")&&(await C8(y),u())},j=()=>i(y=>({...y,items:[...y.items,{name:"",lsl:"",usl:"",unit:""}]})),v=(y,g,b)=>i(x=>{const w=[...x.items];return w[y]={...w[y],[g]:b},{...x,items:w}}),p=y=>i(g=>({...g,items:g.items.filter((b,x)=>x!==y)}));return o.jsxs("div",{children:[o.jsx(lt,{title:"검사기준 (Spec)",subtitle:"규격 · LSL/USL/Target · AQL · 동적 검사항목(JSON)",actions:c&&o.jsxs(K,{onClick:f,children:[o.jsx(at,{size:16})," 검사기준"]})}),o.jsx("div",{className:"flex items-center gap-2 mb-4",children:o.jsx("select",{className:"inp w-32",value:n,onChange:y=>r(y.target.value),children:Uhe.map(y=>o.jsx("option",{value:y,children:y||"전체 유형"},y))})}),o.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left py-3 px-4",children:"기준코드"}),o.jsx("th",{className:"text-left",children:"품목"}),o.jsx("th",{className:"text-left",children:"유형"}),o.jsx("th",{className:"text-left",children:"특성"}),o.jsx("th",{className:"text-right",children:"LSL"}),o.jsx("th",{className:"text-right",children:"Target"}),o.jsx("th",{className:"text-right",children:"USL"}),o.jsx("th",{className:"text-left",children:"AQL"}),o.jsx("th",{className:"text-right px-4",children:"작업"})]})}),o.jsxs("tbody",{children:[e.map(y=>o.jsxs("tr",{className:"border-t border-edge/50",children:[o.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[o.jsx(sT,{size:14,className:"text-brand"}),y.specCode]}),o.jsx("td",{className:"text-slate-300 text-xs",children:y.itemCode}),o.jsx("td",{children:o.jsx("span",{className:"px-2 py-0.5 rounded bg-brand/15 text-brand text-xs border border-brand/30",children:y.inspectionType})}),o.jsx("td",{className:"text-slate-400 text-xs",children:y.characteristic||"-"}),o.jsx("td",{className:"text-right text-slate-300",children:y.lsl??"-"}),o.jsx("td",{className:"text-right text-slate-300",children:y.target??"-"}),o.jsx("td",{className:"text-right text-slate-300",children:y.usl??"-"}),o.jsx("td",{className:"text-slate-400 text-xs",children:y.aql??"-"}),o.jsx("td",{className:"px-4",children:c&&o.jsxs("div",{className:"flex items-center justify-end gap-2",children:[o.jsx("button",{onClick:()=>d(y),className:"text-xs text-slate-400 hover:text-brand",children:"편집"}),o.jsx("button",{onClick:()=>m(y.id),className:"text-rose-400 hover:text-rose-300",children:o.jsx(tr,{size:14})})]})})]},y.id)),e.length===0&&o.jsx(Be,{colSpan:9,msg:"검사기준이 없습니다."})]})]})}),a&&o.jsxs(Fe,{title:a._new?"검사기준 등록":"검사기준 편집",onClose:()=>i(null),wide:!0,children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"기준코드",children:o.jsx("input",{className:"inp",value:a.specCode,onChange:y=>i({...a,specCode:y.target.value})})}),o.jsx(D,{label:"검사유형",children:o.jsx("select",{className:"inp",value:a.inspectionType,onChange:y=>i({...a,inspectionType:y.target.value}),children:["IQC","IPQC","OQC"].map(y=>o.jsx("option",{children:y},y))})})]}),o.jsx(D,{label:"품목",children:o.jsxs("select",{className:"inp",value:a.itemCode,onChange:y=>i({...a,itemCode:y.target.value}),children:[o.jsx("option",{value:"",children:"선택"}),l.map(y=>o.jsxs("option",{value:y.itemCode,children:[y.itemName," (",y.itemCode,")"]},y.id))]})}),o.jsx(D,{label:"특성",children:o.jsx("input",{className:"inp",value:a.characteristic,onChange:y=>i({...a,characteristic:y.target.value})})}),o.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[o.jsx(D,{label:"LSL",children:o.jsx("input",{type:"number",step:"any",className:"inp",value:a.lsl,onChange:y=>i({...a,lsl:y.target.value})})}),o.jsx(D,{label:"Target",children:o.jsx("input",{type:"number",step:"any",className:"inp",value:a.target,onChange:y=>i({...a,target:y.target.value})})}),o.jsx(D,{label:"USL",children:o.jsx("input",{type:"number",step:"any",className:"inp",value:a.usl,onChange:y=>i({...a,usl:y.target.value})})})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"단위",children:o.jsx("input",{className:"inp",value:a.unit,onChange:y=>i({...a,unit:y.target.value})})}),o.jsx(D,{label:"AQL",children:o.jsx("input",{className:"inp",value:a.aql,onChange:y=>i({...a,aql:y.target.value})})})]})]}),o.jsxs("div",{className:"bg-card border border-edge rounded-xl p-4",children:[o.jsxs("div",{className:"flex items-center justify-between mb-3",children:[o.jsx("h3",{className:"text-sm font-semibold",children:"동적 검사항목"}),o.jsxs(K,{size:"sm",variant:"ghost",onClick:j,children:[o.jsx(at,{size:13})," 항목"]})]}),a.items.length===0&&o.jsx("p",{className:"text-center text-slate-500 text-xs py-6 border border-dashed border-edge rounded",children:"검사항목을 추가하세요."}),o.jsx("div",{className:"space-y-2 max-h-72 overflow-auto",children:a.items.map((y,g)=>o.jsxs("div",{className:"bg-panel border border-edge rounded p-2",children:[o.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[o.jsxs("span",{className:"text-[11px] text-brand",children:["항목 #",g+1]}),o.jsx("button",{onClick:()=>p(g),className:"text-rose-400 hover:text-rose-300",children:o.jsx(tr,{size:12})})]}),o.jsx("input",{placeholder:"항목명",className:"inp text-xs mb-1.5",value:y.name||"",onChange:b=>v(g,"name",b.target.value)}),o.jsxs("div",{className:"grid grid-cols-3 gap-1.5",children:[o.jsx("input",{placeholder:"LSL",className:"inp text-xs",value:y.lsl||"",onChange:b=>v(g,"lsl",b.target.value)}),o.jsx("input",{placeholder:"USL",className:"inp text-xs",value:y.usl||"",onChange:b=>v(g,"usl",b.target.value)}),o.jsx("input",{placeholder:"단위",className:"inp text-xs",value:y.unit||"",onChange:b=>v(g,"unit",b.target.value)})]})]},g))})]})]}),o.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[o.jsx(K,{variant:"ghost",onClick:()=>i(null),children:"취소"}),o.jsx(K,{onClick:h,children:"저장"})]})]})]})}const Fhe=["","OPEN","REVIEW","DISPOSITIONED","CLOSED"],Ghe=["","MINOR","MAJOR","CRITICAL"],Khe=["USE_AS_IS","REWORK","SCRAP","RETURN"],Vhe={itemCode:"",lotNo:"",defectCode:"",severity:"MINOR",qty:0,description:""},vv={OPEN:"REVIEW",REVIEW:"DISPOSITIONED",DISPOSITIONED:"CLOSED"};function Yhe(){const[e,t]=O.useState([]),[n,r]=O.useState(null),[a,i]=O.useState(""),[l,s]=O.useState(""),[c,u]=O.useState(null),[f,d]=O.useState([]),h=Vt(),m=()=>{_8({status:a,severity:l}).then(x=>t(x||[])).catch(()=>t([])),T8().then(r).catch(()=>{})};O.useEffect(()=>{m()},[a,l]),O.useEffect(()=>{Yt().then(x=>d(x||[])).catch(()=>{})},[]);const j=()=>u({...Vhe}),v=async()=>{await P8(c),u(null),m()},p=async x=>{const w=window.prompt(`처리 방식 (${Khe.join("/")})`,"REWORK");w&&(await M8(x.id,w),m())},y=async x=>{const w=vv[x.status];w&&(await $8(x.id,w),m())},g=["OPEN","REVIEW","DISPOSITIONED","CLOSED"],b=x=>(n==null?void 0:n[x])??(n==null?void 0:n[x.toLowerCase()])??0;return o.jsxs("div",{children:[o.jsx(lt,{title:"부적합 NCR",subtitle:"부적합 보고 · 처리(USE_AS_IS/REWORK/SCRAP/RETURN) · CAPA 연계",actions:h&&o.jsxs(K,{onClick:j,children:[o.jsx(at,{size:16})," NCR 등록"]})}),o.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 mb-5",children:g.map(x=>o.jsxs("div",{className:"bg-card border border-edge rounded-xl p-4 text-center",children:[o.jsx("div",{className:"text-xs text-slate-400",children:x}),o.jsx("div",{className:"text-2xl font-bold mt-1 text-brand",children:b(x).toLocaleString()})]},x))}),o.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[o.jsx("select",{className:"inp w-36",value:a,onChange:x=>i(x.target.value),children:Fhe.map(x=>o.jsx("option",{value:x,children:x||"전체 상태"},x))}),o.jsx("select",{className:"inp w-32",value:l,onChange:x=>s(x.target.value),children:Ghe.map(x=>o.jsx("option",{value:x,children:x||"전체 심각도"},x))})]}),o.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left py-3 px-4",children:"NCR"}),o.jsx("th",{className:"text-left",children:"품목"}),o.jsx("th",{className:"text-left",children:"불량코드"}),o.jsx("th",{className:"text-left",children:"심각도"}),o.jsx("th",{className:"text-right",children:"수량"}),o.jsx("th",{className:"text-left",children:"상태"}),o.jsx("th",{className:"text-right px-4",children:"작업"})]})}),o.jsxs("tbody",{children:[e.map(x=>o.jsxs("tr",{className:"border-t border-edge/50",children:[o.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[o.jsx(gi,{size:14,className:"text-rose-400"}),x.ncrNo||x.id]}),o.jsx("td",{className:"text-slate-300 text-xs",children:x.itemName||x.itemCode}),o.jsx("td",{className:"text-slate-400 text-xs",children:x.defectCode||"-"}),o.jsx("td",{children:o.jsx(rt,{status:x.severity})}),o.jsx("td",{className:"text-right text-slate-300",children:Number(x.qty||0).toLocaleString()}),o.jsx("td",{children:o.jsx(rt,{status:x.status})}),o.jsx("td",{className:"px-4",children:o.jsxs("div",{className:"flex items-center justify-end gap-2",children:[h&&x.status==="REVIEW"&&o.jsx("button",{onClick:()=>p(x),className:"text-xs text-brand hover:underline",children:"처리방식"}),h&&vv[x.status]&&o.jsxs("button",{onClick:()=>y(x),className:"text-xs text-brand hover:underline",children:["→ ",vv[x.status]]})]})})]},x.id)),e.length===0&&o.jsx(Be,{colSpan:7,msg:"부적합이 없습니다."})]})]})}),c&&o.jsxs(Fe,{title:"부적합 NCR 등록",onClose:()=>u(null),children:[o.jsxs("div",{className:"space-y-3",children:[o.jsx(D,{label:"품목",children:o.jsxs("select",{className:"inp",value:c.itemCode,onChange:x=>u({...c,itemCode:x.target.value}),children:[o.jsx("option",{value:"",children:"선택"}),f.map(x=>o.jsxs("option",{value:x.itemCode,children:[x.itemName," (",x.itemCode,")"]},x.id))]})}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"LOT",children:o.jsx("input",{className:"inp",value:c.lotNo,onChange:x=>u({...c,lotNo:x.target.value})})}),o.jsx(D,{label:"불량코드",children:o.jsx("input",{className:"inp",value:c.defectCode,onChange:x=>u({...c,defectCode:x.target.value})})})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"심각도",children:o.jsx("select",{className:"inp",value:c.severity,onChange:x=>u({...c,severity:x.target.value}),children:["MINOR","MAJOR","CRITICAL"].map(x=>o.jsx("option",{children:x},x))})}),o.jsx(D,{label:"수량",children:o.jsx("input",{type:"number",className:"inp",value:c.qty,onChange:x=>u({...c,qty:Number(x.target.value)})})})]}),o.jsx(D,{label:"설명",children:o.jsx("textarea",{className:"inp",value:c.description,onChange:x=>u({...c,description:x.target.value})})})]}),o.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[o.jsx(K,{variant:"ghost",onClick:()=>u(null),children:"취소"}),o.jsx(K,{onClick:v,children:"저장"})]})]})]})}const Xhe=["","OPEN","INPROGRESS","VERIFY","CLOSED"],Qhe=["","CORRECTIVE","PREVENTIVE"],gv={OPEN:"INPROGRESS",INPROGRESS:"VERIFY",VERIFY:"CLOSED"},Whe={ncrNo:"",title:"",capaType:"CORRECTIVE",rootCause:"",actionPlan:"",owner:"",dueDate:""};function Zhe(){const[e,t]=O.useState([]),[n,r]=O.useState(""),[a,i]=O.useState(""),[l,s]=O.useState(null),c=Vt(),u=()=>R8({status:n,capaType:a}).then(m=>t(m||[])).catch(()=>t([]));O.useEffect(()=>{u()},[n,a]);const f=()=>s({...Whe,_new:!0}),d=async()=>{const{_new:m,id:j,...v}=l;m?await k8(v):await D8(j,v),s(null),u()},h=async m=>{const j=gv[m.status];if(!j)return;let v;j==="CLOSED"&&(v=window.prompt("효과성 평가 (예: EFFECTIVE/INEFFECTIVE)","EFFECTIVE")||void 0),await L8(m.id,{status:j,effectiveness:v}),u()};return o.jsxs("div",{children:[o.jsx(lt,{title:"시정조치 CAPA",subtitle:"시정·예방조치(8D) · 근본원인 · 조치계획 · 효과성 검증",actions:c&&o.jsxs(K,{onClick:f,children:[o.jsx(at,{size:16})," CAPA 등록"]})}),o.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[o.jsx("select",{className:"inp w-36",value:n,onChange:m=>r(m.target.value),children:Xhe.map(m=>o.jsx("option",{value:m,children:m||"전체 상태"},m))}),o.jsx("select",{className:"inp w-40",value:a,onChange:m=>i(m.target.value),children:Qhe.map(m=>o.jsx("option",{value:m,children:m||"전체 유형"},m))})]}),o.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left py-3 px-4",children:"CAPA"}),o.jsx("th",{className:"text-left",children:"제목"}),o.jsx("th",{className:"text-left",children:"유형"}),o.jsx("th",{className:"text-left",children:"NCR"}),o.jsx("th",{className:"text-left",children:"담당"}),o.jsx("th",{className:"text-left",children:"기한"}),o.jsx("th",{className:"text-left",children:"상태"}),o.jsx("th",{className:"text-right px-4",children:"작업"})]})}),o.jsxs("tbody",{children:[e.map(m=>o.jsxs("tr",{className:"border-t border-edge/50",children:[o.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[o.jsx(eT,{size:14,className:"text-brand"}),m.capaNo||m.id]}),o.jsx("td",{className:"text-slate-300 text-xs max-w-[220px] truncate",children:m.title}),o.jsx("td",{children:o.jsx("span",{className:"px-2 py-0.5 rounded bg-brand/15 text-brand text-xs border border-brand/30",children:m.capaType})}),o.jsx("td",{className:"text-slate-400 text-xs",children:m.ncrNo||"-"}),o.jsx("td",{className:"text-slate-400 text-xs",children:m.owner||"-"}),o.jsx("td",{className:"text-slate-400 text-xs",children:m.dueDate||"-"}),o.jsx("td",{children:o.jsx(rt,{status:m.status})}),o.jsx("td",{className:"px-4",children:o.jsxs("div",{className:"flex items-center justify-end gap-2",children:[c&&o.jsx("button",{onClick:()=>s({...m,_new:!1}),className:"text-xs text-slate-400 hover:text-brand",children:"편집"}),c&&gv[m.status]&&o.jsxs("button",{onClick:()=>h(m),className:"text-xs text-brand hover:underline",children:["→ ",gv[m.status]]})]})})]},m.id)),e.length===0&&o.jsx(Be,{colSpan:8,msg:"CAPA가 없습니다."})]})]})}),l&&o.jsxs(Fe,{title:l._new?"CAPA 등록":"CAPA 편집",onClose:()=>s(null),wide:!0,children:[o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"제목",children:o.jsx("input",{className:"inp",value:l.title,onChange:m=>s({...l,title:m.target.value})})}),o.jsx(D,{label:"유형",children:o.jsx("select",{className:"inp",value:l.capaType,onChange:m=>s({...l,capaType:m.target.value}),children:["CORRECTIVE","PREVENTIVE"].map(m=>o.jsx("option",{children:m},m))})})]}),o.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[o.jsx(D,{label:"연계 NCR",children:o.jsx("input",{className:"inp",value:l.ncrNo,onChange:m=>s({...l,ncrNo:m.target.value})})}),o.jsx(D,{label:"담당자",children:o.jsx("input",{className:"inp",value:l.owner,onChange:m=>s({...l,owner:m.target.value})})}),o.jsx(D,{label:"기한",children:o.jsx("input",{type:"date",className:"inp",value:l.dueDate||"",onChange:m=>s({...l,dueDate:m.target.value})})})]}),o.jsx(D,{label:"근본 원인 (Root Cause)",children:o.jsx("textarea",{className:"inp",value:l.rootCause,onChange:m=>s({...l,rootCause:m.target.value})})}),o.jsx(D,{label:"조치 계획 (Action Plan)",children:o.jsx("textarea",{className:"inp",value:l.actionPlan,onChange:m=>s({...l,actionPlan:m.target.value})})})]}),o.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[o.jsx(K,{variant:"ghost",onClick:()=>s(null),children:"취소"}),o.jsx(K,{onClick:d,children:"저장"})]})]})]})}const ud={fontSize:11,fill:"#94a3b8"},eE={background:"#0f172a",border:"1px solid #26304a",borderRadius:8,fontSize:12,color:"#e2e8f0"},Jhe={chartCode:"",itemCode:"",characteristic:"",subgroupNo:1,values:""};function epe(){const[e,t]=O.useState([]),[n,r]=O.useState(""),[a,i]=O.useState([]),[l,s]=O.useState(null),[c,u]=O.useState(""),[f,d]=O.useState(""),[h,m]=O.useState(null),[j,v]=O.useState([]),p=Vt(),y=()=>z8().then(N=>{const C=N||[];t(C),!n&&C.length&&r(C[0].chartCode)}).catch(()=>t([]));O.useEffect(()=>{y(),Yt().then(N=>v(N||[])).catch(()=>{})},[]);const g=()=>{n&&(B8({chartCode:n,limit:50}).then(N=>i(Array.isArray(N)?N:[])).catch(()=>i([])),I8({chartCode:n,lsl:c===""?void 0:Number(c),usl:f===""?void 0:Number(f)}).then(s).catch(()=>s(null)))};O.useEffect(()=>{g()},[n]);const b=()=>m({...Jhe,chartCode:n}),x=async()=>{const N=h.values.split(/[,\s]+/).map(C=>Number(C)).filter(C=>!isNaN(C));await U8({chartCode:h.chartCode,itemCode:h.itemCode,characteristic:h.characteristic,subgroupNo:Number(h.subgroupNo),values:N}),m(null),g()},w=a.map((N,C)=>({name:N.subgroupNo??C+1,xbar:Number(N.mean??N.xbar??N.average??0),range:Number(N.range??N.r??0)})),S=l||{},A=Array.isArray(S.violations)?S.violations:[];return o.jsxs("div",{children:[o.jsx(lt,{title:"SPC 관리도",subtitle:"Xbar-R 관리한계 · Cp/Cpk 공정능력 · Western Electric 이상감지",actions:p&&n&&o.jsxs(K,{onClick:b,children:[o.jsx(at,{size:16})," 샘플 추가"]})}),o.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-5",children:[o.jsxs("select",{className:"inp w-56",value:n,onChange:N=>r(N.target.value),children:[o.jsx("option",{value:"",children:"관리도 선택"}),e.map(N=>o.jsxs("option",{value:N.chartCode,children:[N.chartCode," · ",N.characteristic||N.itemCode]},N.chartCode||N.id))]}),o.jsx("input",{className:"inp w-24",placeholder:"LSL",value:c,onChange:N=>u(N.target.value)}),o.jsx("input",{className:"inp w-24",placeholder:"USL",value:f,onChange:N=>d(N.target.value)}),o.jsx(K,{variant:"ghost",onClick:g,children:"분석"})]}),n?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-5 gap-3 mb-5",children:[o.jsx(fd,{label:"X̄ (전체평균)",value:dd(S.xbar)}),o.jsx(fd,{label:"R̄ (평균범위)",value:dd(S.rbar)}),o.jsx(fd,{label:"Cp",value:dd(S.cp),color:"text-sky-400"}),o.jsx(fd,{label:"Cpk",value:dd(S.cpk),color:"text-accent"}),o.jsxs("div",{className:"bg-card border border-edge rounded-xl p-4",children:[o.jsx("div",{className:"text-xs text-slate-400",children:"공정능력 등급"}),o.jsx("div",{className:"mt-2",children:o.jsx(rt,{status:S.capabilityGrade||"-"})})]})]}),S.anomaly&&o.jsxs("div",{className:"bg-rose-500/10 border border-rose-500/40 text-rose-300 text-sm rounded-lg px-4 py-2.5 mb-4 flex items-center gap-2",children:[o.jsx(gi,{size:16})," 이상 패턴 감지됨 (Western Electric Rules)",A.length?` — 위반 ${A.length}건`:""]}),o.jsx(xe,{title:"X̄ 관리도 (Xbar Chart)",icon:o.jsx(g0,{size:15}),className:"mb-4",children:w.length===0?o.jsx(Be,{msg:"샘플이 없습니다."}):o.jsx(oo,{width:"100%",height:280,children:o.jsxs(XN,{data:w,children:[o.jsx(Oo,{strokeDasharray:"3 3",stroke:"#26304a"}),o.jsx(gr,{dataKey:"name",tick:ud}),o.jsx(xr,{tick:ud,domain:["auto","auto"]}),o.jsx(Wt,{contentStyle:eE}),o.jsx(Qn,{wrapperStyle:{fontSize:11}}),S.xbarUcl!=null&&o.jsx(ta,{y:Number(S.xbarUcl),stroke:"#ef4444",strokeDasharray:"4 4",label:{value:"UCL",fontSize:10,fill:"#ef4444",position:"right"}}),S.xbar!=null&&o.jsx(ta,{y:Number(S.xbar),stroke:"#3ddc97",label:{value:"CL",fontSize:10,fill:"#3ddc97",position:"right"}}),S.xbarLcl!=null&&o.jsx(ta,{y:Number(S.xbarLcl),stroke:"#ef4444",strokeDasharray:"4 4",label:{value:"LCL",fontSize:10,fill:"#ef4444",position:"right"}}),o.jsx(Si,{type:"monotone",dataKey:"xbar",name:"X̄",stroke:"#00a0c8",strokeWidth:2,dot:{r:3}})]})})}),o.jsx(xe,{title:"R 관리도 (Range Chart)",children:w.length===0?o.jsx(Be,{msg:"샘플이 없습니다."}):o.jsx(oo,{width:"100%",height:240,children:o.jsxs(XN,{data:w,children:[o.jsx(Oo,{strokeDasharray:"3 3",stroke:"#26304a"}),o.jsx(gr,{dataKey:"name",tick:ud}),o.jsx(xr,{tick:ud,domain:["auto","auto"]}),o.jsx(Wt,{contentStyle:eE}),o.jsx(Qn,{wrapperStyle:{fontSize:11}}),S.rUcl!=null&&o.jsx(ta,{y:Number(S.rUcl),stroke:"#ef4444",strokeDasharray:"4 4",label:{value:"UCL",fontSize:10,fill:"#ef4444",position:"right"}}),S.rbar!=null&&o.jsx(ta,{y:Number(S.rbar),stroke:"#3ddc97",label:{value:"R̄",fontSize:10,fill:"#3ddc97",position:"right"}}),S.rLcl!=null&&o.jsx(ta,{y:Number(S.rLcl),stroke:"#ef4444",strokeDasharray:"4 4",label:{value:"LCL",fontSize:10,fill:"#ef4444",position:"right"}}),o.jsx(Si,{type:"monotone",dataKey:"range",name:"R",stroke:"#f59e0b",strokeWidth:2,dot:{r:3}})]})})})]}):o.jsx(Be,{msg:"관리도를 선택하세요."}),h&&o.jsxs(Fe,{title:"SPC 샘플 추가",onClose:()=>m(null),children:[o.jsx("p",{className:"text-xs text-slate-400 mb-3",children:"서브그룹 측정값을 입력하면 평균/범위가 자동 계산됩니다."}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"관리도 코드",children:o.jsx("input",{className:"inp",value:h.chartCode,onChange:N=>m({...h,chartCode:N.target.value})})}),o.jsx(D,{label:"서브그룹 번호",children:o.jsx("input",{type:"number",className:"inp",value:h.subgroupNo,onChange:N=>m({...h,subgroupNo:N.target.value})})})]}),o.jsx(D,{label:"품목",children:o.jsxs("select",{className:"inp",value:h.itemCode,onChange:N=>m({...h,itemCode:N.target.value}),children:[o.jsx("option",{value:"",children:"선택"}),j.map(N=>o.jsxs("option",{value:N.itemCode,children:[N.itemName," (",N.itemCode,")"]},N.id))]})}),o.jsx(D,{label:"특성",children:o.jsx("input",{className:"inp",value:h.characteristic,onChange:N=>m({...h,characteristic:N.target.value})})}),o.jsx(D,{label:"측정값 (콤마/공백 구분)",hint:"예: 10.1, 10.0, 9.9, 10.2, 10.0",children:o.jsx("input",{className:"inp",value:h.values,onChange:N=>m({...h,values:N.target.value})})})]}),o.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[o.jsx(K,{variant:"ghost",onClick:()=>m(null),children:"취소"}),o.jsxs(K,{onClick:x,children:[o.jsx(Rn,{size:14})," 추가"]})]})]})]})}function fd({label:e,value:t,color:n="text-slate-200"}){return o.jsxs("div",{className:"bg-card border border-edge rounded-xl p-4",children:[o.jsx("div",{className:"text-xs text-slate-400",children:e}),o.jsx("div",{className:`text-2xl font-bold mt-1 ${n}`,children:t})]})}function dd(e){return e==null?"-":Number(e).toFixed(3)}const tpe=["","COA","MSDS","TEST_REPORT"],npe={certType:"COA",itemCode:"",lotNo:"",partnerCode:"",content:""};function rpe(){const[e,t]=O.useState([]),[n,r]=O.useState(""),[a,i]=O.useState(null),[l,s]=O.useState(null),[c,u]=O.useState([]),f=Vt(),d=()=>q8({certType:n}).then(v=>t(v||[])).catch(()=>t([]));O.useEffect(()=>{d()},[n]),O.useEffect(()=>{Yt().then(v=>u(v||[])).catch(()=>{})},[]);const h=()=>i({...npe}),m=async()=>{await F8(a),i(null),d()},j=async v=>s(await H8(v));return o.jsxs("div",{children:[o.jsx(lt,{title:"성적서 (Certificate)",subtitle:"COA · MSDS · 시험성적서 (content JSON)",actions:f&&o.jsxs(K,{onClick:h,children:[o.jsx(at,{size:16})," 성적서 발행"]})}),o.jsx("div",{className:"flex items-center gap-2 mb-4",children:o.jsx("select",{className:"inp w-40",value:n,onChange:v=>r(v.target.value),children:tpe.map(v=>o.jsx("option",{value:v,children:v||"전체 유형"},v))})}),o.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left py-3 px-4",children:"성적서번호"}),o.jsx("th",{className:"text-left",children:"유형"}),o.jsx("th",{className:"text-left",children:"품목"}),o.jsx("th",{className:"text-left",children:"LOT"}),o.jsx("th",{className:"text-left",children:"거래처"}),o.jsx("th",{className:"text-left",children:"발행일"}),o.jsx("th",{className:"text-right px-4",children:"작업"})]})}),o.jsxs("tbody",{children:[e.map(v=>o.jsxs("tr",{className:"border-t border-edge/50 cursor-pointer hover:bg-panel/40",onClick:()=>j(v.id),children:[o.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[o.jsx(Z_,{size:14,className:"text-brand"}),v.certNo||v.id]}),o.jsx("td",{children:o.jsx("span",{className:"px-2 py-0.5 rounded bg-brand/15 text-brand text-xs border border-brand/30",children:v.certType})}),o.jsx("td",{className:"text-slate-300 text-xs",children:v.itemName||v.itemCode}),o.jsx("td",{className:"text-slate-400 font-mono text-xs",children:v.lotNo||"-"}),o.jsx("td",{className:"text-slate-400 text-xs",children:v.partnerCode||"-"}),o.jsx("td",{className:"text-slate-500 text-xs",children:v.createdAt?new Date(v.createdAt).toLocaleDateString("ko-KR"):"-"}),o.jsx("td",{className:"px-4 text-right",onClick:p=>p.stopPropagation(),children:o.jsx("button",{onClick:()=>j(v.id),className:"text-slate-400 hover:text-brand",children:o.jsx(Z5,{size:15})})})]},v.id)),e.length===0&&o.jsx(Be,{colSpan:7,msg:"성적서가 없습니다."})]})]})}),a&&o.jsxs(Fe,{title:"성적서 발행",onClose:()=>i(null),children:[o.jsxs("div",{className:"space-y-3",children:[o.jsx(D,{label:"유형",children:o.jsx("select",{className:"inp",value:a.certType,onChange:v=>i({...a,certType:v.target.value}),children:["COA","MSDS","TEST_REPORT"].map(v=>o.jsx("option",{children:v},v))})}),o.jsx(D,{label:"품목",children:o.jsxs("select",{className:"inp",value:a.itemCode,onChange:v=>i({...a,itemCode:v.target.value}),children:[o.jsx("option",{value:"",children:"선택"}),c.map(v=>o.jsxs("option",{value:v.itemCode,children:[v.itemName," (",v.itemCode,")"]},v.id))]})}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"LOT",children:o.jsx("input",{className:"inp",value:a.lotNo,onChange:v=>i({...a,lotNo:v.target.value})})}),o.jsx(D,{label:"거래처",children:o.jsx("input",{className:"inp",value:a.partnerCode,onChange:v=>i({...a,partnerCode:v.target.value})})})]}),o.jsx(D,{label:"내용 (JSON)",hint:'예: {"검사항목":"인장강도","결과":"450MPa","판정":"합격"}',children:o.jsx("textarea",{className:"inp font-mono text-xs",rows:5,value:a.content,onChange:v=>i({...a,content:v.target.value})})})]}),o.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[o.jsx(K,{variant:"ghost",onClick:()=>i(null),children:"취소"}),o.jsx(K,{onClick:m,children:"발행"})]})]}),l&&o.jsxs(Fe,{title:`성적서 — ${l.certNo||l.id}`,onClose:()=>s(null),wide:!0,children:[o.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm mb-4",children:[o.jsx(hd,{label:"유형",value:l.certType}),o.jsx(hd,{label:"품목",value:`${l.itemName||""} (${l.itemCode})`}),o.jsx(hd,{label:"LOT",value:l.lotNo||"-"}),o.jsx(hd,{label:"거래처",value:l.partnerCode||"-"})]}),o.jsxs("div",{className:"bg-ink border border-edge rounded p-3",children:[o.jsx("div",{className:"text-[11px] text-slate-500 mb-1",children:"내용"}),o.jsx("pre",{className:"text-xs text-slate-300 whitespace-pre-wrap",children:$1(M1(l.content,l.content))||"-"})]})]})]})}function hd({label:e,value:t}){return o.jsxs("div",{className:"bg-panel border border-edge rounded-lg p-2.5",children:[o.jsx("div",{className:"text-[11px] text-slate-500 mb-0.5",children:e}),o.jsx("div",{className:"text-slate-200",children:t})]})}const ape=["","RAW","SEMI","PRODUCT","SUBSIDIARY"],ipe=["","ACTIVE","INACTIVE"],lpe={itemCode:"",itemName:"",itemType:"PRODUCT",unit:"EA",barcode:"",spec:"",safetyStock:0,warehouseCode:"",attributes:"",status:"ACTIVE"};function ope(){const[e,t]=O.useState([]),[n,r]=O.useState(""),[a,i]=O.useState(""),[l,s]=O.useState(""),[c,u]=O.useState(null),f=wr(),d=()=>Yt({itemType:n,status:a,keyword:l}).then(p=>t(p||[])).catch(()=>t([]));O.useEffect(()=>{d()},[n,a]);const h=()=>u({...lpe,_new:!0}),m=p=>u({...p,attributes:$1(M1(p.attributes,{})),_new:!1}),j=async()=>{const{_new:p,id:y,...g}=c;p?await G8(g):await K8(y,g),u(null),d()},v=async p=>{window.confirm("삭제하시겠습니까?")&&(await V8(p),d())};return o.jsxs("div",{children:[o.jsx(lt,{title:"품목",subtitle:"자재 · 반제품 · 제품 · 부자재 · 바코드 · 안전재고 · 속성(JSON)",actions:f&&o.jsxs(K,{onClick:h,children:[o.jsx(at,{size:16})," 품목"]})}),o.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[o.jsx("select",{className:"inp w-36",value:n,onChange:p=>r(p.target.value),children:ape.map(p=>o.jsx("option",{value:p,children:p||"전체 유형"},p))}),o.jsx("select",{className:"inp w-32",value:a,onChange:p=>i(p.target.value),children:ipe.map(p=>o.jsx("option",{value:p,children:p||"전체 상태"},p))}),o.jsx("input",{value:l,onChange:p=>s(p.target.value),onKeyDown:p=>p.key==="Enter"&&d(),placeholder:"품목 검색",className:"inp w-52"}),o.jsx(K,{variant:"ghost",onClick:d,children:"검색"})]}),o.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left py-3 px-4",children:"코드"}),o.jsx("th",{className:"text-left",children:"품목명"}),o.jsx("th",{className:"text-left",children:"유형"}),o.jsx("th",{className:"text-left",children:"단위"}),o.jsx("th",{className:"text-left",children:"바코드"}),o.jsx("th",{className:"text-right",children:"안전재고"}),o.jsx("th",{className:"text-left",children:"상태"}),o.jsx("th",{className:"text-right px-4",children:"작업"})]})}),o.jsxs("tbody",{children:[e.map(p=>o.jsxs("tr",{className:"border-t border-edge/50",children:[o.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[o.jsx(aT,{size:14,className:"text-brand"}),p.itemCode]}),o.jsx("td",{className:"text-slate-300",children:p.itemName}),o.jsx("td",{children:o.jsx("span",{className:"px-2 py-0.5 rounded bg-brand/15 text-brand text-xs border border-brand/30",children:p.itemType})}),o.jsx("td",{className:"text-slate-400 text-xs",children:p.unit}),o.jsx("td",{className:"text-slate-400 font-mono text-xs",children:p.barcode||"-"}),o.jsx("td",{className:"text-right text-slate-300",children:Number(p.safetyStock||0).toLocaleString()}),o.jsx("td",{children:o.jsx(rt,{status:p.status})}),o.jsx("td",{className:"px-4",children:f&&o.jsxs("div",{className:"flex items-center justify-end gap-2",children:[o.jsx("button",{onClick:()=>m(p),className:"text-xs text-slate-400 hover:text-brand",children:"편집"}),o.jsx("button",{onClick:()=>v(p.id),className:"text-rose-400 hover:text-rose-300",children:o.jsx(tr,{size:14})})]})})]},p.id)),e.length===0&&o.jsx(Be,{colSpan:8,msg:"품목이 없습니다."})]})]})}),c&&o.jsxs(Fe,{title:c._new?"품목 등록":"품목 편집",onClose:()=>u(null),children:[o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"품목코드",children:o.jsx("input",{className:"inp",value:c.itemCode,onChange:p=>u({...c,itemCode:p.target.value}),disabled:!c._new})}),o.jsx(D,{label:"품목명",children:o.jsx("input",{className:"inp",value:c.itemName,onChange:p=>u({...c,itemName:p.target.value})})})]}),o.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[o.jsx(D,{label:"유형",children:o.jsx("select",{className:"inp",value:c.itemType,onChange:p=>u({...c,itemType:p.target.value}),children:["RAW","SEMI","PRODUCT","SUBSIDIARY"].map(p=>o.jsx("option",{children:p},p))})}),o.jsx(D,{label:"단위",children:o.jsx("input",{className:"inp",value:c.unit,onChange:p=>u({...c,unit:p.target.value})})}),o.jsx(D,{label:"안전재고",children:o.jsx("input",{type:"number",className:"inp",value:c.safetyStock,onChange:p=>u({...c,safetyStock:Number(p.target.value)})})})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"바코드",children:o.jsx("input",{className:"inp",value:c.barcode,onChange:p=>u({...c,barcode:p.target.value})})}),o.jsx(D,{label:"기본 창고",children:o.jsx("input",{className:"inp",value:c.warehouseCode,onChange:p=>u({...c,warehouseCode:p.target.value})})})]}),o.jsx(D,{label:"규격(spec)",children:o.jsx("input",{className:"inp",value:c.spec,onChange:p=>u({...c,spec:p.target.value})})}),o.jsx(D,{label:"속성 (JSON)",hint:'예: {"color":"red","grade":"A"}',children:o.jsx("textarea",{className:"inp font-mono text-xs",rows:3,value:c.attributes,onChange:p=>u({...c,attributes:p.target.value})})}),!c._new&&o.jsx(D,{label:"상태",children:o.jsx("select",{className:"inp",value:c.status,onChange:p=>u({...c,status:p.target.value}),children:["ACTIVE","INACTIVE"].map(p=>o.jsx("option",{children:p},p))})})]}),o.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[o.jsx(K,{variant:"ghost",onClick:()=>u(null),children:"취소"}),o.jsx(K,{onClick:j,children:"저장"})]})]})]})}const spe={parentItemCode:"",childItemCode:"",qtyPer:1,seq:1,lossRate:0,bomVersion:"v1"};function cpe(e,t){const n={};e.forEach(a=>{(n[a.parentItemCode]=n[a.parentItemCode]||[]).push(a)});const r=(a,i,l)=>l.has(a)||i>8?[]:(l.add(a),(n[a]||[]).flatMap(s=>[{...s,depth:i},...r(s.childItemCode,i+1,new Set(l))]));return r(t,0,new Set)}function upe(){const[e,t]=O.useState(""),[n,r]=O.useState(""),[a,i]=O.useState([]),[l,s]=O.useState([]),[c,u]=O.useState(null),[f,d]=O.useState([]),h=wr(),m=()=>X8().then(b=>s(Array.isArray(b)?b:[])).catch(()=>s([])),j=()=>{if(!e){i([]);return}Y8({parentItemCode:e,bomVersion:n}).then(b=>{const x=Array.isArray(b)?b:(b==null?void 0:b.rows)||(b==null?void 0:b.nodes)||[];i(x.some(w=>w.depth!=null)?x:cpe(x,e))}).catch(()=>i([]))};O.useEffect(()=>{m(),Yt().then(b=>d(b||[])).catch(()=>{})},[]),O.useEffect(()=>{j()},[e,n]);const v=()=>u({...spe,parentItemCode:e,_new:!0}),p=async()=>{const{_new:b,id:x,...w}=c;b?await Q8(w):await W8(x,w),u(null),m(),j()},y=async b=>{window.confirm("삭제하시겠습니까?")&&(await Z8(b),m(),j())},g=f.filter(b=>["PRODUCT","SEMI"].includes(b.itemType));return o.jsxs("div",{children:[o.jsx(lt,{title:"BOM",subtitle:"자재 구성(Bill of Materials) · 소요량 · 버전 · 트리 전개",actions:h&&o.jsxs(K,{onClick:v,children:[o.jsx(at,{size:16})," BOM 행"]})}),o.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-5",children:[o.jsxs("select",{className:"inp w-56",value:e,onChange:b=>t(b.target.value),children:[o.jsx("option",{value:"",children:"상위 품목 선택"}),g.map(b=>o.jsxs("option",{value:b.itemCode,children:[b.itemName," (",b.itemCode,")"]},b.id))]}),o.jsx("input",{className:"inp w-28",placeholder:"버전",value:n,onChange:b=>r(b.target.value)}),o.jsxs(K,{variant:"ghost",onClick:j,children:[o.jsx(Rs,{size:15})," 전개"]})]}),o.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden mb-6",children:o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left py-3 px-4",children:"구성 (트리)"}),o.jsx("th",{className:"text-left",children:"하위 품목"}),o.jsx("th",{className:"text-right",children:"소요량"}),o.jsx("th",{className:"text-right",children:"손실률"}),o.jsx("th",{className:"text-left",children:"버전"}),o.jsx("th",{className:"text-right px-4",children:"작업"})]})}),o.jsxs("tbody",{children:[a.map((b,x)=>o.jsxs("tr",{className:"border-t border-edge/50",children:[o.jsx("td",{className:"py-2.5 px-4",style:{paddingLeft:16+(b.depth||0)*20},children:o.jsxs("span",{className:"flex items-center gap-1 text-slate-300",children:[o.jsx(X_,{size:12,className:"text-brand"}),b.childItemName||b.childItemCode]})}),o.jsx("td",{className:"text-slate-400 font-mono text-xs",children:b.childItemCode}),o.jsx("td",{className:"text-right text-slate-300",children:b.qtyPer}),o.jsx("td",{className:"text-right text-slate-400 text-xs",children:b.lossRate!=null?`${b.lossRate}%`:"-"}),o.jsx("td",{className:"text-slate-400 text-xs",children:b.bomVersion||"-"}),o.jsx("td",{className:"px-4",children:h&&o.jsxs("div",{className:"flex items-center justify-end gap-2",children:[o.jsx("button",{onClick:()=>u({...b,_new:!1}),className:"text-xs text-slate-400 hover:text-brand",children:"편집"}),o.jsx("button",{onClick:()=>y(b.id),className:"text-rose-400 hover:text-rose-300",children:o.jsx(tr,{size:14})})]})})]},b.id??x)),a.length===0&&o.jsx(Be,{colSpan:6,msg:e?"구성이 없습니다.":"상위 품목을 선택하면 BOM 트리가 전개됩니다."})]})]})}),o.jsxs("h3",{className:"text-sm font-semibold mb-2 flex items-center gap-1.5",children:[o.jsx(tT,{size:15,className:"text-brand"})," 전체 BOM"]}),o.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left py-3 px-4",children:"상위"}),o.jsx("th",{className:"text-left",children:"하위"}),o.jsx("th",{className:"text-right",children:"소요량"}),o.jsx("th",{className:"text-left",children:"버전"})]})}),o.jsxs("tbody",{children:[l.slice(0,100).map(b=>o.jsxs("tr",{className:"border-t border-edge/50",children:[o.jsx("td",{className:"py-2.5 px-4 text-slate-300",children:b.parentItemCode}),o.jsx("td",{className:"text-slate-400",children:b.childItemCode}),o.jsx("td",{className:"text-right text-slate-300",children:b.qtyPer}),o.jsx("td",{className:"text-slate-400 text-xs",children:b.bomVersion||"-"})]},b.id)),l.length===0&&o.jsx(Be,{colSpan:4,msg:"BOM이 없습니다."})]})]})}),c&&o.jsxs(Fe,{title:c._new?"BOM 행 추가":"BOM 행 편집",onClose:()=>u(null),children:[o.jsxs("div",{className:"space-y-3",children:[o.jsx(D,{label:"상위 품목",children:o.jsxs("select",{className:"inp",value:c.parentItemCode,onChange:b=>u({...c,parentItemCode:b.target.value}),children:[o.jsx("option",{value:"",children:"선택"}),g.map(b=>o.jsxs("option",{value:b.itemCode,children:[b.itemName," (",b.itemCode,")"]},b.id))]})}),o.jsx(D,{label:"하위 품목",children:o.jsxs("select",{className:"inp",value:c.childItemCode,onChange:b=>u({...c,childItemCode:b.target.value}),children:[o.jsx("option",{value:"",children:"선택"}),f.map(b=>o.jsxs("option",{value:b.itemCode,children:[b.itemName," (",b.itemCode,")"]},b.id))]})}),o.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[o.jsx(D,{label:"소요량",children:o.jsx("input",{type:"number",step:"any",className:"inp",value:c.qtyPer,onChange:b=>u({...c,qtyPer:Number(b.target.value)})})}),o.jsx(D,{label:"순서",children:o.jsx("input",{type:"number",className:"inp",value:c.seq,onChange:b=>u({...c,seq:Number(b.target.value)})})}),o.jsx(D,{label:"손실률(%)",children:o.jsx("input",{type:"number",step:"any",className:"inp",value:c.lossRate,onChange:b=>u({...c,lossRate:Number(b.target.value)})})})]}),o.jsx(D,{label:"버전",children:o.jsx("input",{className:"inp",value:c.bomVersion,onChange:b=>u({...c,bomVersion:b.target.value})})})]}),o.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[o.jsx(K,{variant:"ghost",onClick:()=>u(null),children:"취소"}),o.jsx(K,{onClick:p,children:"저장"})]})]})]})}const fpe={itemCode:"",opSeq:1,processCode:"",processName:"",equipmentCode:"",stdTimeMin:0};function dpe(){const[e,t]=O.useState([]),[n,r]=O.useState(""),[a,i]=O.useState(null),[l,s]=O.useState([]),[c,u]=O.useState([]),f=wr(),d=()=>J8(n).then(p=>t(p||[])).catch(()=>t([]));O.useEffect(()=>{d()},[n]),O.useEffect(()=>{Yt({itemType:"PRODUCT"}).then(p=>s(p||[])).catch(()=>{}),N0().then(p=>u(p||[])).catch(()=>{})},[]);const h=()=>i({...fpe,itemCode:n,_new:!0}),m=async()=>{const{_new:p,id:y,...g}=a;p?await eB(g):await tB(y,g),i(null),d()},j=async p=>{window.confirm("삭제하시겠습니까?")&&(await nB(p),d())},v=[...e].sort((p,y)=>(p.opSeq||0)-(y.opSeq||0));return o.jsxs("div",{children:[o.jsx(lt,{title:"라우팅",subtitle:"공정 순서 · 표준시간 · 설비 매핑",actions:f&&o.jsxs(K,{onClick:h,children:[o.jsx(at,{size:16})," 공정"]})}),o.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[o.jsxs("select",{className:"inp w-56",value:n,onChange:p=>r(p.target.value),children:[o.jsx("option",{value:"",children:"전체 / 품목 선택"}),l.map(p=>o.jsxs("option",{value:p.itemCode,children:[p.itemName," (",p.itemCode,")"]},p.id))]}),o.jsxs(K,{variant:"ghost",onClick:d,children:[o.jsx(Rs,{size:15})," 조회"]})]}),o.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left py-3 px-4",children:"순서"}),o.jsx("th",{className:"text-left",children:"품목"}),o.jsx("th",{className:"text-left",children:"공정코드"}),o.jsx("th",{className:"text-left",children:"공정명"}),o.jsx("th",{className:"text-left",children:"설비"}),o.jsx("th",{className:"text-right",children:"표준시간(분)"}),o.jsx("th",{className:"text-right px-4",children:"작업"})]})}),o.jsxs("tbody",{children:[v.map(p=>o.jsxs("tr",{className:"border-t border-edge/50",children:[o.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[o.jsx(oT,{size:14,className:"text-brand"}),p.opSeq]}),o.jsx("td",{className:"text-slate-300 text-xs",children:p.itemCode}),o.jsx("td",{className:"text-slate-400 text-xs",children:p.processCode}),o.jsx("td",{className:"text-slate-300 text-xs",children:p.processName||"-"}),o.jsx("td",{className:"text-slate-400 text-xs",children:p.equipmentCode||"-"}),o.jsx("td",{className:"text-right text-slate-300",children:p.stdTimeMin??"-"}),o.jsx("td",{className:"px-4",children:f&&o.jsxs("div",{className:"flex items-center justify-end gap-2",children:[o.jsx("button",{onClick:()=>i({...p,_new:!1}),className:"text-xs text-slate-400 hover:text-brand",children:"편집"}),o.jsx("button",{onClick:()=>j(p.id),className:"text-rose-400 hover:text-rose-300",children:o.jsx(tr,{size:14})})]})})]},p.id)),v.length===0&&o.jsx(Be,{colSpan:7,msg:"라우팅이 없습니다."})]})]})}),a&&o.jsxs(Fe,{title:a._new?"공정 추가":"공정 편집",onClose:()=>i(null),children:[o.jsxs("div",{className:"space-y-3",children:[o.jsx(D,{label:"품목",children:o.jsxs("select",{className:"inp",value:a.itemCode,onChange:p=>i({...a,itemCode:p.target.value}),children:[o.jsx("option",{value:"",children:"선택"}),l.map(p=>o.jsxs("option",{value:p.itemCode,children:[p.itemName," (",p.itemCode,")"]},p.id))]})}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"공정순서",children:o.jsx("input",{type:"number",className:"inp",value:a.opSeq,onChange:p=>i({...a,opSeq:Number(p.target.value)})})}),o.jsx(D,{label:"표준시간(분)",children:o.jsx("input",{type:"number",step:"any",className:"inp",value:a.stdTimeMin,onChange:p=>i({...a,stdTimeMin:Number(p.target.value)})})})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"공정코드",children:o.jsx("input",{className:"inp",value:a.processCode,onChange:p=>i({...a,processCode:p.target.value})})}),o.jsx(D,{label:"공정명",children:o.jsx("input",{className:"inp",value:a.processName,onChange:p=>i({...a,processName:p.target.value})})})]}),o.jsx(D,{label:"설비",children:o.jsxs("select",{className:"inp",value:a.equipmentCode,onChange:p=>i({...a,equipmentCode:p.target.value}),children:[o.jsx("option",{value:"",children:"미지정"}),c.map(p=>o.jsx("option",{value:p.equipmentCode,children:p.equipmentName||p.equipmentCode},p.id))]})})]}),o.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[o.jsx(K,{variant:"ghost",onClick:()=>i(null),children:"취소"}),o.jsx(K,{onClick:m,children:"저장"})]})]})]})}const hpe=["","SUPPLIER","CUSTOMER","BOTH"],ppe=["","ACTIVE","INACTIVE"],mpe={partnerCode:"",partnerName:"",partnerType:"SUPPLIER",contactName:"",contactPhone:"",contactEmail:"",address:"",status:"ACTIVE"};function ype(){const[e,t]=O.useState([]),[n,r]=O.useState(""),[a,i]=O.useState(""),[l,s]=O.useState(""),[c,u]=O.useState(null),f=wr(),d=()=>E0({partnerType:n,status:a,keyword:l}).then(p=>t(p||[])).catch(()=>t([]));O.useEffect(()=>{d()},[n,a]);const h=()=>u({...mpe,_new:!0}),m=p=>u({...p,contactPhone:"",contactEmail:"",_new:!1}),j=async()=>{const{_new:p,id:y,...g}=c;p?await aB(g):await iB(y,g),u(null),d()},v=async p=>{window.confirm("삭제하시겠습니까?")&&(await lB(p),d())};return o.jsxs("div",{children:[o.jsx(lt,{title:"거래처",subtitle:"공급사 · 고객 · 연락처 AES 암호화 저장 · 응답 마스킹 (MANAGER+)",actions:f&&o.jsxs(K,{onClick:h,children:[o.jsx(at,{size:16})," 거래처"]})}),o.jsxs("div",{className:"bg-amber-500/5 border border-amber-500/20 text-amber-300/80 text-xs rounded-lg px-3 py-2 mb-4 flex items-center gap-2",children:[o.jsx(x0,{size:14})," 거래처 연락처(전화·이메일)는 PII로 마스킹되어 표시됩니다. 원문은 저장 시 AES-256-GCM으로 암호화됩니다."]}),o.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[o.jsx("select",{className:"inp w-36",value:n,onChange:p=>r(p.target.value),children:hpe.map(p=>o.jsx("option",{value:p,children:p||"전체 유형"},p))}),o.jsx("select",{className:"inp w-32",value:a,onChange:p=>i(p.target.value),children:ppe.map(p=>o.jsx("option",{value:p,children:p||"전체 상태"},p))}),o.jsx("input",{value:l,onChange:p=>s(p.target.value),onKeyDown:p=>p.key==="Enter"&&d(),placeholder:"거래처 검색",className:"inp w-52"}),o.jsx(K,{variant:"ghost",onClick:d,children:"검색"})]}),o.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left py-3 px-4",children:"코드"}),o.jsx("th",{className:"text-left",children:"거래처명"}),o.jsx("th",{className:"text-left",children:"유형"}),o.jsx("th",{className:"text-left",children:"담당"}),o.jsx("th",{className:"text-left",children:"전화"}),o.jsx("th",{className:"text-left",children:"이메일"}),o.jsx("th",{className:"text-left",children:"상태"}),o.jsx("th",{className:"text-right px-4",children:"작업"})]})}),o.jsxs("tbody",{children:[e.map(p=>o.jsxs("tr",{className:"border-t border-edge/50",children:[o.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[o.jsx(V_,{size:14,className:"text-brand"}),p.partnerCode]}),o.jsx("td",{className:"text-slate-300",children:p.partnerName}),o.jsx("td",{children:o.jsx("span",{className:"px-2 py-0.5 rounded bg-brand/15 text-brand text-xs border border-brand/30",children:p.partnerType})}),o.jsx("td",{className:"text-slate-400 text-xs",children:p.contactName||"-"}),o.jsx("td",{className:"text-slate-400 font-mono text-xs",children:p.contactPhone?QN(p.contactPhone):"-"}),o.jsx("td",{className:"text-slate-400 font-mono text-xs",children:p.contactEmail?QN(p.contactEmail):"-"}),o.jsx("td",{children:o.jsx(rt,{status:p.status})}),o.jsx("td",{className:"px-4",children:f&&o.jsxs("div",{className:"flex items-center justify-end gap-2",children:[o.jsx("button",{onClick:()=>m(p),className:"text-xs text-slate-400 hover:text-brand",children:"편집"}),o.jsx("button",{onClick:()=>v(p.id),className:"text-rose-400 hover:text-rose-300",children:o.jsx(tr,{size:14})})]})})]},p.id)),e.length===0&&o.jsx(Be,{colSpan:8,msg:"거래처가 없습니다."})]})]})}),c&&o.jsxs(Fe,{title:c._new?"거래처 등록":"거래처 편집",onClose:()=>u(null),children:[o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"코드",children:o.jsx("input",{className:"inp",value:c.partnerCode,onChange:p=>u({...c,partnerCode:p.target.value}),disabled:!c._new})}),o.jsx(D,{label:"거래처명",children:o.jsx("input",{className:"inp",value:c.partnerName,onChange:p=>u({...c,partnerName:p.target.value})})})]}),o.jsx(D,{label:"유형",children:o.jsx("select",{className:"inp",value:c.partnerType,onChange:p=>u({...c,partnerType:p.target.value}),children:["SUPPLIER","CUSTOMER","BOTH"].map(p=>o.jsx("option",{children:p},p))})}),o.jsx(D,{label:"담당자",children:o.jsx("input",{className:"inp",value:c.contactName,onChange:p=>u({...c,contactName:p.target.value})})}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"전화 (암호화 저장)",hint:c._new?"":"변경 시에만 입력",children:o.jsx("input",{className:"inp",value:c.contactPhone,onChange:p=>u({...c,contactPhone:p.target.value})})}),o.jsx(D,{label:"이메일 (암호화 저장)",hint:c._new?"":"변경 시에만 입력",children:o.jsx("input",{className:"inp",value:c.contactEmail,onChange:p=>u({...c,contactEmail:p.target.value})})})]}),o.jsx(D,{label:"주소",children:o.jsx("input",{className:"inp",value:c.address,onChange:p=>u({...c,address:p.target.value})})}),!c._new&&o.jsx(D,{label:"상태",children:o.jsx("select",{className:"inp",value:c.status,onChange:p=>u({...c,status:p.target.value}),children:["ACTIVE","INACTIVE"].map(p=>o.jsx("option",{children:p},p))})})]}),o.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[o.jsx(K,{variant:"ghost",onClick:()=>u(null),children:"취소"}),o.jsx(K,{onClick:j,children:"저장"})]})]})]})}const vpe={warehouseCode:"",warehouseName:"",address:"",remark:""};function gpe(){const[e,t]=O.useState([]),[n,r]=O.useState(null),[a,i]=O.useState([]),[l,s]=O.useState(null),[c,u]=O.useState(null),f=wr(),d=()=>pf().then(b=>t(b||[])).catch(()=>t([]));O.useEffect(()=>{d()},[]);const h=async b=>{r(b),i(await uB(b.warehouseCode).catch(()=>[])||[])},m=()=>s({...vpe,_new:!0}),j=async()=>{const{_new:b,id:x,...w}=l;b?await oB(w):await sB(x,w),s(null),d()},v=async b=>{window.confirm("삭제하시겠습니까?")&&(await cB(b),d(),(n==null?void 0:n.id)===b&&(r(null),i([])))},p=()=>u({warehouseCode:n.warehouseCode,locationCode:"",locationName:"",binType:"SHELF"}),y=async()=>{await fB(c),u(null),h(n)},g=async b=>{window.confirm("로케이션 삭제?")&&(await dB(b),h(n))};return o.jsxs("div",{children:[o.jsx(lt,{title:"창고 / 로케이션",subtitle:"창고 · 로케이션(bin) 관리",actions:f&&o.jsxs(K,{onClick:m,children:[o.jsx(at,{size:16})," 창고"]})}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[o.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left py-3 px-4",children:"코드"}),o.jsx("th",{className:"text-left",children:"창고명"}),o.jsx("th",{className:"text-left",children:"주소"}),o.jsx("th",{className:"text-right px-4",children:"작업"})]})}),o.jsxs("tbody",{children:[e.map(b=>o.jsxs("tr",{className:`border-t border-edge/50 cursor-pointer ${(n==null?void 0:n.id)===b.id?"bg-panel/60":"hover:bg-panel/30"}`,onClick:()=>h(b),children:[o.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[o.jsx(fT,{size:14,className:"text-brand"}),b.warehouseCode]}),o.jsx("td",{className:"text-slate-300",children:b.warehouseName}),o.jsx("td",{className:"text-slate-400 text-xs truncate max-w-[160px]",children:b.address||"-"}),o.jsx("td",{className:"px-4",onClick:x=>x.stopPropagation(),children:f&&o.jsxs("div",{className:"flex items-center justify-end gap-2",children:[o.jsx("button",{onClick:()=>s({...b,_new:!1}),className:"text-xs text-slate-400 hover:text-brand",children:"편집"}),o.jsx("button",{onClick:()=>v(b.id),className:"text-rose-400 hover:text-rose-300",children:o.jsx(tr,{size:14})})]})})]},b.id)),e.length===0&&o.jsx(Be,{colSpan:4,msg:"창고가 없습니다."})]})]})}),o.jsx(xe,{title:n?`로케이션 — ${n.warehouseName}`:"로케이션 (창고 선택)",icon:o.jsx(ES,{size:15}),children:n?o.jsxs(o.Fragment,{children:[f&&o.jsx("div",{className:"mb-3",children:o.jsxs(K,{size:"sm",variant:"ghost",onClick:p,children:[o.jsx(at,{size:13})," 로케이션 추가"]})}),o.jsxs("div",{className:"space-y-1.5 max-h-[420px] overflow-auto",children:[a.map(b=>o.jsxs("div",{className:"flex items-center justify-between bg-panel border border-edge rounded p-2 text-sm",children:[o.jsxs("span",{className:"flex items-center gap-1.5",children:[o.jsx(ES,{size:12,className:"text-brand"}),o.jsx("span",{className:"font-mono text-xs",children:b.locationCode})," ",o.jsx("span",{className:"text-slate-400",children:b.locationName||""})]}),o.jsxs("span",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-[11px] text-slate-500",children:b.binType||""}),f&&o.jsx("button",{onClick:()=>g(b.id),className:"text-rose-400 hover:text-rose-300",children:o.jsx(tr,{size:12})})]})]},b.id)),a.length===0&&o.jsx("p",{className:"text-slate-500 text-xs py-4 text-center",children:"로케이션이 없습니다."})]})]}):o.jsx("p",{className:"text-slate-500 text-sm py-6 text-center",children:"왼쪽에서 창고를 선택하세요."})})]}),l&&o.jsxs(Fe,{title:l._new?"창고 등록":"창고 편집",onClose:()=>s(null),children:[o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"코드",children:o.jsx("input",{className:"inp",value:l.warehouseCode,onChange:b=>s({...l,warehouseCode:b.target.value}),disabled:!l._new})}),o.jsx(D,{label:"창고명",children:o.jsx("input",{className:"inp",value:l.warehouseName,onChange:b=>s({...l,warehouseName:b.target.value})})})]}),o.jsx(D,{label:"주소",children:o.jsx("input",{className:"inp",value:l.address,onChange:b=>s({...l,address:b.target.value})})}),o.jsx(D,{label:"비고",children:o.jsx("input",{className:"inp",value:l.remark,onChange:b=>s({...l,remark:b.target.value})})})]}),o.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[o.jsx(K,{variant:"ghost",onClick:()=>s(null),children:"취소"}),o.jsx(K,{onClick:j,children:"저장"})]})]}),c&&o.jsxs(Fe,{title:"로케이션 추가",onClose:()=>u(null),children:[o.jsxs("div",{className:"space-y-3",children:[o.jsx(D,{label:"로케이션 코드",children:o.jsx("input",{className:"inp",value:c.locationCode,onChange:b=>u({...c,locationCode:b.target.value})})}),o.jsx(D,{label:"로케이션명",children:o.jsx("input",{className:"inp",value:c.locationName,onChange:b=>u({...c,locationName:b.target.value})})}),o.jsx(D,{label:"유형",children:o.jsx("select",{className:"inp",value:c.binType,onChange:b=>u({...c,binType:b.target.value}),children:["SHELF","RACK","FLOOR","PALLET","BIN"].map(b=>o.jsx("option",{children:b},b))})})]}),o.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[o.jsx(K,{variant:"ghost",onClick:()=>u(null),children:"취소"}),o.jsx(K,{onClick:y,children:"추가"})]})]})]})}function tE(e,t){if(!e)return;if(e.labels&&e.series)return e;if(Array.isArray(e))return{labels:e.map(r=>r.label||r.name||r.itemName||r.itemCode||r.date),series:[{name:t,data:e.map(r=>Number(r.value??r.qty??r.count??0))}]};const n=Object.entries(e).filter(([,r])=>typeof r=="number");return n.length?{labels:n.map(r=>r[0]),series:[{name:t,data:n.map(r=>r[1])}]}:void 0}function pd(e,...t){for(const n of t)if((e==null?void 0:e[n])!=null)return Number(e[n])||0;return 0}function xpe(){const[e,t]=O.useState({}),[n,r]=O.useState({}),[a,i]=O.useState({}),[l,s]=O.useState(null),[c,u]=O.useState(null);return O.useEffect(()=>{hB(30).then(f=>t(f||{})).catch(()=>{}),pB(30).then(f=>r(f||{})).catch(()=>{}),mB().then(f=>i(f||{})).catch(()=>{}),zT(14).then(s).catch(()=>{}),yB(30,10).then(u).catch(()=>{})},[]),o.jsxs("div",{children:[o.jsx("div",{className:"flex items-center justify-between mb-6",children:o.jsxs("div",{children:[o.jsxs("h1",{className:"text-xl font-bold flex items-center gap-2",children:[o.jsx(G_,{className:"text-brand",size:20})," 분석 / KPI"]}),o.jsx("p",{className:"text-sm text-slate-400 mt-0.5",children:"생산 · 품질 · 재고 KPI (BI 피드 연동, 30일)"})]})}),o.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 mb-6",children:[o.jsx(Pr,{label:"총 생산량",value:pd(e,"totalOutput","totalQty","output"),icon:o.jsx(cl,{size:13}),color:"text-brand"}),o.jsx(Pr,{label:"검사 합격률",value:pd(n,"passRate","rate").toFixed(1),unit:"%",icon:o.jsx(ul,{size:13}),color:"text-accent"}),o.jsx(Pr,{label:"불량률",value:pd(n,"defectRate").toFixed(2),unit:"%",icon:o.jsx(su,{size:13}),color:"text-rose-400"}),o.jsx(Pr,{label:"재고 품목수",value:pd(a,"itemCount","totalItems","count"),icon:o.jsx(sf,{size:13}),color:"text-sky-400"})]}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 mb-4",children:[o.jsx(xe,{title:"일별 생산량 (14일)",icon:o.jsx(cl,{size:15}),children:o.jsx(pr,{type:"AREA",data:tE(l,"생산량")})}),o.jsx(xe,{title:"품목별 생산 TOP (30일)",icon:o.jsx(su,{size:15}),children:o.jsx(pr,{type:"BAR",data:tE(c,"생산량")})})]}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[o.jsx(xe,{title:"생산 KPI",icon:o.jsx(cl,{size:15}),children:o.jsx(nE,{o:e})}),o.jsx(xe,{title:"품질 KPI",icon:o.jsx(ul,{size:15}),children:o.jsx(nE,{o:n})})]})]})}function nE({o:e}){const t=Object.entries(e||{}).filter(([,n])=>typeof n=="number"||typeof n=="string");return t.length?o.jsx("div",{className:"space-y-1.5",children:t.map(([n,r])=>o.jsxs("div",{className:"flex items-center justify-between text-sm border-b border-edge/40 py-1.5",children:[o.jsx("span",{className:"text-slate-400 text-xs",children:n}),o.jsx("span",{className:"text-slate-200 font-medium",children:typeof r=="number"?r.toLocaleString():String(r)})]},n))}):o.jsx("p",{className:"text-slate-500 text-sm py-4 text-center",children:"데이터 없음"})}function kl({data:e}){return e==null?null:typeof e=="string"?o.jsx("pre",{className:"mt-3 text-xs text-slate-300 bg-ink border border-edge rounded p-3 whitespace-pre-wrap max-h-56 overflow-auto",children:e}):o.jsx("pre",{className:"mt-3 text-xs text-slate-300 bg-ink border border-edge rounded p-3 whitespace-pre-wrap max-h-56 overflow-auto",children:JSON.stringify(e,null,2)})}function bpe(){const[e,t]=O.useState(null);return O.useEffect(()=>{BT().then(n=>t(!!((n==null?void 0:n.ollamaAvailable)??(n==null?void 0:n.available)))).catch(()=>t(!1))},[]),o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center justify-between mb-6",children:[o.jsxs("div",{children:[o.jsxs("h1",{className:"text-xl font-bold flex items-center gap-2",children:[o.jsx(Rn,{className:"text-accent",size:20})," AI 도구"]}),o.jsx("p",{className:"text-sm text-slate-400 mt-0.5",children:"불량분석 · 생산예측 · 예지보전 · SPC이상 · 자연어조회 · 안전재고 · 일정최적화 (Ollama 온프레미스 + Java 폴백)"})]}),o.jsxs("span",{className:`flex items-center gap-1.5 text-xs px-3 py-1.5 rounded-lg border ${e?"text-accent border-accent/30 bg-accent/10":"text-slate-400 border-edge bg-card"}`,children:[o.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${e?"bg-accent":"bg-slate-500"}`}),"Ollama ",e===null?"확인 중":e?"온라인":"오프라인 (Java 폴백)"]})]}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-5",children:[o.jsx(jpe,{}),o.jsx(Spe,{}),o.jsx(wpe,{}),o.jsx(Ope,{}),o.jsx(Ape,{}),o.jsx(Npe,{}),o.jsx(Epe,{})]})]})}function jpe(){const[e,t]=O.useState(""),[n,r]=O.useState(""),[a,i]=O.useState(null),[l,s]=O.useState(!1),c=async()=>{s(!0);try{i(await vB({defectCode:e,context:n}))}finally{s(!1)}};return o.jsxs(xe,{title:"불량 원인 분석",icon:o.jsx(gi,{size:15}),children:[o.jsx(D,{label:"불량 코드",children:o.jsx("input",{className:"inp",value:e,onChange:u=>t(u.target.value),placeholder:"예: D-CRACK-01"})}),o.jsx(D,{label:"컨텍스트(공정/설비/자재)",children:o.jsx("textarea",{className:"inp",value:n,onChange:u=>r(u.target.value)})}),o.jsxs(K,{onClick:c,disabled:l,size:"sm",children:[o.jsx(Rn,{size:13})," ",l?"분석 중…":"원인 분석"]}),o.jsx(kl,{data:a})]})}function Spe(){const[e,t]=O.useState(""),[n,r]=O.useState(30),[a,i]=O.useState(null),[l,s]=O.useState(!1),c=async()=>{s(!0);try{i(await gB({itemCode:e,days:n}))}finally{s(!1)}};return o.jsxs(xe,{title:"수요·생산량 예측",icon:o.jsx(su,{size:15}),children:[o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(D,{label:"품목코드",children:o.jsx("input",{className:"inp",value:e,onChange:u=>t(u.target.value)})}),o.jsx(D,{label:"예측 기간(일)",children:o.jsx("input",{type:"number",className:"inp",value:n,onChange:u=>r(Number(u.target.value))})})]}),o.jsxs(K,{onClick:c,disabled:l,size:"sm",children:[o.jsx(Rn,{size:13})," ",l?"예측 중…":"예측"]}),o.jsx(kl,{data:a})]})}function wpe(){const[e,t]=O.useState(""),[n,r]=O.useState(null),[a,i]=O.useState(!1),l=async()=>{i(!0);try{r(await xB({equipmentCode:e}))}finally{i(!1)}};return o.jsxs(xe,{title:"설비 예지보전",icon:o.jsx(cf,{size:15}),children:[o.jsx(D,{label:"설비 코드",children:o.jsx("input",{className:"inp",value:e,onChange:s=>t(s.target.value),placeholder:"예: EQ-CNC-01"})}),o.jsxs(K,{onClick:l,disabled:a,size:"sm",children:[o.jsx(Rn,{size:13})," ",a?"분석 중…":"정비 권고"]}),o.jsx(kl,{data:n})]})}function Ope(){const[e,t]=O.useState(""),[n,r]=O.useState(null),[a,i]=O.useState(!1),l=async()=>{i(!0);try{r(await bB({chartCode:e}))}finally{i(!1)}};return o.jsxs(xe,{title:"SPC 이상 감지",icon:o.jsx(g0,{size:15}),children:[o.jsx(D,{label:"관리도 코드",children:o.jsx("input",{className:"inp",value:e,onChange:s=>t(s.target.value)})}),o.jsxs(K,{onClick:l,disabled:a,size:"sm",children:[o.jsx(Rn,{size:13})," ",a?"감지 중…":"이상 감지"]}),o.jsx(kl,{data:n})]})}function Ape(){const[e,t]=O.useState(""),[n,r]=O.useState(null),[a,i]=O.useState(!1),l=async()=>{i(!0);try{r(await jB({query:e}))}finally{i(!1)}};return o.jsxs(xe,{title:"작업지시·재고 자연어 조회",icon:o.jsx(Rs,{size:15}),children:[o.jsx(D,{label:"자연어 질의",children:o.jsx("input",{className:"inp",value:e,onChange:s=>t(s.target.value),placeholder:"예: 지난주 지연된 작업지시",onKeyDown:s=>s.key==="Enter"&&l()})}),o.jsxs(K,{onClick:l,disabled:a,size:"sm",children:[o.jsx(Rn,{size:13})," ",a?"해석 중…":"질의 해석"]}),o.jsx(kl,{data:n})]})}function Npe(){const[e,t]=O.useState(""),[n,r]=O.useState(null),[a,i]=O.useState(!1),l=async()=>{i(!0);try{r(await SB({itemCode:e}))}finally{i(!1)}};return o.jsxs(xe,{title:"재고 최적화·안전재고 추천",icon:o.jsx(sf,{size:15}),children:[o.jsx(D,{label:"품목코드",children:o.jsx("input",{className:"inp",value:e,onChange:s=>t(s.target.value)})}),o.jsxs(K,{onClick:l,disabled:a,size:"sm",children:[o.jsx(Rn,{size:13})," ",a?"분석 중…":"추천"]}),o.jsx(kl,{data:n})]})}function Epe(){const[e,t]=O.useState(null),[n,r]=O.useState(!1),a=async()=>{r(!0);try{t(await wB({}))}finally{r(!1)}};return o.jsxs(xe,{title:"생산 일정 최적화",icon:o.jsx(Y5,{size:15}),children:[o.jsx("p",{className:"text-xs text-slate-400 mb-2",children:"현재 작업지시·설비 부하 기반으로 일정 최적화를 제안합니다."}),o.jsxs(K,{onClick:a,disabled:n,size:"sm",children:[o.jsx(Rn,{size:13})," ",n?"최적화 중…":"일정 최적화 제안"]}),o.jsx(kl,{data:e})]})}function rE(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?"권한이 없습니다 (SuperAdmin 전용).":/409|exist|이미/i.test(t)?"이미 존재하는 사용자명입니다.":/last|마지막|423/i.test(t)?"마지막 SuperAdmin은 강등/삭제/비활성화할 수 없습니다.":/404|not found/i.test(t)?"대상 사용자를 찾을 수 없습니다.":"요청을 처리하지 못했습니다. 잠시 후 다시 시도하세요."}function Cpe(){const[e,t]=O.useState([]),[n,r]=O.useState({username:"",password:"",displayName:"",role:"WORKER"}),[a,i]=O.useState(!1),[l,s]=O.useState(""),c=()=>OB().then(v=>{var p;t(((p=v.data)==null?void 0:p.data)||[]),s("")}).catch(v=>s(rE(v)));O.useEffect(()=>{c()},[]);const u=async v=>{try{await v(),s(""),await c()}catch(p){s(rE(p))}},f=async()=>{if(!n.username||!n.password){s("사용자명과 비밀번호를 입력하세요.");return}await u(async()=>{await AB(n),r({username:"",password:"",displayName:"",role:"WORKER"}),i(!1)})},d=(v,p)=>u(()=>NB(v.id,p)),h=v=>u(()=>EB(v.id,!v.active)),m=v=>{const p=window.prompt(`'${v.username}' 의 새 비밀번호`);p&&u(()=>CB(v.id,p))},j=v=>{window.confirm(`'${v.username}' 삭제?`)&&u(()=>_B(v.id))};return o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center justify-between mb-6",children:[o.jsxs("h1",{className:"text-xl font-bold flex items-center gap-2",children:[o.jsx(x0,{className:"text-brand",size:20})," 사용자 / 권한"]}),o.jsxs("button",{onClick:()=>i(!a),className:"flex items-center gap-1.5 px-3 py-2 rounded-lg bg-brand text-ink text-sm font-semibold",children:[o.jsx(at,{size:16})," 새 사용자"]})]}),l&&o.jsx("div",{className:"bg-rose-500/10 border border-rose-500/40 text-rose-300 text-sm rounded-lg px-4 py-2.5 mb-4",children:l}),a&&o.jsxs("div",{className:"bg-card border border-edge rounded-xl p-5 mb-6 grid grid-cols-5 gap-3",children:[o.jsx("input",{placeholder:"사용자명",value:n.username,onChange:v=>r({...n,username:v.target.value}),className:"inp"}),o.jsx("input",{placeholder:"표시 이름",value:n.displayName,onChange:v=>r({...n,displayName:v.target.value}),className:"inp"}),o.jsx("input",{placeholder:"비밀번호",type:"password",value:n.password,onChange:v=>r({...n,password:v.target.value}),className:"inp"}),o.jsx("select",{value:n.role,onChange:v=>r({...n,role:v.target.value}),className:"inp",children:MS.map(v=>o.jsx("option",{value:v,children:v},v))}),o.jsx("button",{onClick:f,className:"px-4 rounded-lg bg-brand text-ink text-sm font-semibold",children:"저장"})]}),o.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left py-3 px-4",children:"ID"}),o.jsx("th",{className:"text-left",children:"사용자명"}),o.jsx("th",{className:"text-left",children:"표시 이름"}),o.jsx("th",{className:"text-left",children:"역할"}),o.jsx("th",{className:"text-left",children:"상태"}),o.jsx("th",{className:"text-left",children:"생성일"}),o.jsx("th",{className:"text-right px-4",children:"작업"})]})}),o.jsxs("tbody",{children:[e.map(v=>o.jsxs("tr",{className:"border-t border-edge/50",children:[o.jsx("td",{className:"py-3 px-4 text-slate-500",children:v.id}),o.jsx("td",{className:"font-medium",children:v.username}),o.jsx("td",{className:"text-slate-400",children:v.displayName||"-"}),o.jsx("td",{children:o.jsx("select",{value:v.role,onChange:p=>d(v,p.target.value),className:"px-2 py-1 rounded-md bg-ink border border-edge text-xs focus:border-brand outline-none",children:MS.map(p=>o.jsx("option",{value:p,children:p},p))})}),o.jsx("td",{children:o.jsx("span",{className:`inline-block px-2 py-0.5 rounded-md text-xs font-medium ${v.active?"bg-accent/15 text-accent":"bg-slate-500/15 text-slate-400"}`,children:v.active?"활성":"비활성"})}),o.jsx("td",{className:"text-slate-500 text-xs",children:v.createdAt?new Date(v.createdAt).toLocaleString("ko-KR"):"-"}),o.jsx("td",{className:"px-4",children:o.jsxs("div",{className:"flex items-center justify-end gap-3",children:[o.jsx("button",{onClick:()=>h(v),title:v.active?"비활성화":"활성화",className:"text-slate-400 hover:text-brand",children:o.jsx(lT,{size:16})}),o.jsx("button",{onClick:()=>m(v),title:"비밀번호 재설정",className:"text-slate-400 hover:text-brand",children:o.jsx(J5,{size:16})}),o.jsx("button",{onClick:()=>j(v),title:"삭제",className:"text-rose-400 hover:text-rose-300",children:o.jsx(tr,{size:16})})]})})]},v.id)),e.length===0&&o.jsx("tr",{children:o.jsx("td",{colSpan:7,className:"py-6 text-center text-slate-500",children:"사용자가 없습니다."})})]})]})})]})}function _pe(){const[e,t]=O.useState([]),[n,r]=O.useState(""),[a,i]=O.useState(""),[l,s]=O.useState(""),c=()=>TB(n,a,200).then(u=>{var f;t(((f=u.data)==null?void 0:f.data)||[]),s("")}).catch(u=>{var f;return s(((f=u==null?void 0:u.response)==null?void 0:f.status)===403?"권한이 없습니다 (Manager+).":"감사 로그를 불러오지 못했습니다.")});return O.useEffect(()=>{c()},[]),o.jsxs("div",{children:[o.jsx("div",{className:"flex items-center justify-between mb-6",children:o.jsxs("h1",{className:"text-xl font-bold flex items-center gap-2",children:[o.jsx(cT,{className:"text-brand",size:20})," 감사 로그"]})}),o.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[o.jsx("input",{placeholder:"action 필터",value:n,onChange:u=>r(u.target.value),onKeyDown:u=>u.key==="Enter"&&c(),className:"inp w-44"}),o.jsx("input",{placeholder:"actor 필터",value:a,onChange:u=>i(u.target.value),onKeyDown:u=>u.key==="Enter"&&c(),className:"inp w-44"}),o.jsxs("button",{onClick:c,className:"flex items-center gap-1.5 px-3 py-2 rounded-lg bg-card border border-edge text-sm hover:border-brand",children:[o.jsx(Rs,{size:15})," 검색"]})]}),l&&o.jsx("div",{className:"bg-rose-500/10 border border-rose-500/40 text-rose-300 text-sm rounded-lg px-4 py-2.5 mb-4",children:l}),o.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left py-3 px-4",children:"시각"}),o.jsx("th",{className:"text-left",children:"행위자"}),o.jsx("th",{className:"text-left",children:"액션"}),o.jsx("th",{className:"text-left",children:"대상"}),o.jsx("th",{className:"text-left",children:"상세"})]})}),o.jsxs("tbody",{children:[e.map(u=>o.jsxs("tr",{className:"border-t border-edge/50",children:[o.jsx("td",{className:"py-3 px-4 text-slate-500 text-xs whitespace-nowrap",children:u.createdAt?new Date(u.createdAt).toLocaleString("ko-KR"):"-"}),o.jsx("td",{className:"text-slate-300",children:u.actor}),o.jsx("td",{children:o.jsx("span",{className:"px-2 py-0.5 rounded bg-brand/15 text-brand text-xs border border-brand/30",children:u.action})}),o.jsx("td",{className:"text-slate-400 font-mono text-xs",children:u.target||"-"}),o.jsx("td",{className:"text-slate-400 text-xs truncate max-w-[360px]",children:u.detail||"-"})]},u.id)),e.length===0&&o.jsx("tr",{children:o.jsx("td",{colSpan:5,className:"py-6 text-center text-slate-500",children:"감사 로그가 없습니다."})})]})]})})]})}function Tpe(){const[e,t]=O.useState([]),[n,r]=O.useState({}),[a,i]=O.useState(""),[l,s]=O.useState(""),c=lL(),u=()=>PB().then(d=>{var j;const h=((j=d.data)==null?void 0:j.data)||[],m=Array.isArray(h)?h:Object.entries(h).map(([v,p])=>({key:v,value:String(p)}));t(m),s("")}).catch(d=>{var h;return s(((h=d==null?void 0:d.response)==null?void 0:h.status)===403?"권한이 없습니다 (Manager+).":"시스템 설정을 불러오지 못했습니다.")});O.useEffect(()=>{u()},[]);const f=async d=>{var h;i(""),s("");try{await MB(d,n[d]??""),i(`'${d}' 저장됨`),u()}catch(m){s(((h=m==null?void 0:m.response)==null?void 0:h.status)===403?"SuperAdmin 권한이 필요합니다.":"저장 실패")}};return o.jsxs("div",{children:[o.jsx("div",{className:"flex items-center justify-between mb-6",children:o.jsxs("h1",{className:"text-xl font-bold flex items-center gap-2",children:[o.jsx(uT,{className:"text-brand",size:20})," 시스템 설정"]})}),a&&o.jsx("div",{className:"bg-brand/10 border border-brand/30 text-brand text-sm rounded-lg px-4 py-2.5 mb-4",children:a}),l&&o.jsx("div",{className:"bg-rose-500/10 border border-rose-500/40 text-rose-300 text-sm rounded-lg px-4 py-2.5 mb-4",children:l}),!c&&o.jsx("div",{className:"bg-amber-500/10 border border-amber-500/30 text-amber-300 text-sm rounded-lg px-4 py-2.5 mb-4",children:"조회 전용입니다. 설정 변경은 SuperAdmin 권한이 필요합니다."}),o.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left py-3 px-4",children:"키"}),o.jsx("th",{className:"text-left",children:"값"}),o.jsx("th",{className:"text-right px-4",children:"작업"})]})}),o.jsxs("tbody",{children:[e.map(d=>o.jsxs("tr",{className:"border-t border-edge/50",children:[o.jsxs("td",{className:"py-3 px-4 font-mono text-xs text-brand align-top",children:[d.key,d.description&&o.jsx("div",{className:"text-[11px] text-slate-500 font-sans mt-0.5",children:d.description})]}),o.jsx("td",{className:"py-3",children:o.jsx("input",{className:"inp",defaultValue:d.value,disabled:!c,onChange:h=>r({...n,[d.key]:h.target.value})})}),o.jsx("td",{className:"px-4 text-right align-top",children:c&&o.jsxs("button",{onClick:()=>f(d.key),className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-brand text-ink text-xs font-semibold",children:[o.jsx(rL,{size:13})," 저장"]})})]},d.key)),e.length===0&&o.jsx("tr",{children:o.jsx("td",{colSpan:3,className:"py-6 text-center text-slate-500",children:"설정 항목이 없습니다."})})]})]})})]})}const Ppe=new B5;function Mpe(){return o.jsx(U5,{client:Ppe,children:o.jsx(n5,{children:o.jsxs(M4,{children:[o.jsx(Oe,{path:"/login",element:o.jsx(kB,{})}),o.jsxs(Oe,{element:o.jsx(RB,{}),children:[o.jsx(Oe,{path:"/dashboard",element:o.jsx(Wde,{})}),o.jsx(Oe,{path:"/jobs",element:o.jsx(ehe,{})}),o.jsx(Oe,{path:"/progress",element:o.jsx(rhe,{})}),o.jsx(Oe,{path:"/workorders",element:o.jsx(ohe,{})}),o.jsx(Oe,{path:"/production",element:o.jsx(che,{})}),o.jsx(Oe,{path:"/process-board",element:o.jsx(fhe,{})}),o.jsx(Oe,{path:"/oee",element:o.jsx(yhe,{})}),o.jsx(Oe,{path:"/tracking",element:o.jsx(vhe,{})}),o.jsx(Oe,{path:"/plans",element:o.jsx(She,{})}),o.jsx(Oe,{path:"/receiving",element:o.jsx(Ahe,{})}),o.jsx(Oe,{path:"/shipping",element:o.jsx(Che,{})}),o.jsx(Oe,{path:"/inventory",element:o.jsx(_he,{})}),o.jsx(Oe,{path:"/stocktake",element:o.jsx(Mhe,{})}),o.jsx(Oe,{path:"/lotserial",element:o.jsx(Dhe,{})}),o.jsx(Oe,{path:"/inspection",element:o.jsx(Ihe,{})}),o.jsx(Oe,{path:"/spec",element:o.jsx(Hhe,{})}),o.jsx(Oe,{path:"/ncr",element:o.jsx(Yhe,{})}),o.jsx(Oe,{path:"/capa",element:o.jsx(Zhe,{})}),o.jsx(Oe,{path:"/spc",element:o.jsx(epe,{})}),o.jsx(Oe,{path:"/certificate",element:o.jsx(rpe,{})}),o.jsx(Oe,{path:"/items",element:o.jsx(ope,{})}),o.jsx(Oe,{path:"/bom",element:o.jsx(upe,{})}),o.jsx(Oe,{path:"/routing",element:o.jsx(dpe,{})}),o.jsx(Oe,{path:"/partners",element:o.jsx(Kf,{min:"MANAGER",children:o.jsx(ype,{})})}),o.jsx(Oe,{path:"/warehouses",element:o.jsx(gpe,{})}),o.jsx(Oe,{path:"/analytics",element:o.jsx(xpe,{})}),o.jsx(Oe,{path:"/ai-tools",element:o.jsx(bpe,{})}),o.jsx(Oe,{path:"/admin/users",element:o.jsx(Kf,{min:"SUPERADMIN",children:o.jsx(Cpe,{})})}),o.jsx(Oe,{path:"/admin/audit",element:o.jsx(Kf,{min:"MANAGER",children:o.jsx(_pe,{})})}),o.jsx(Oe,{path:"/admin/settings",element:o.jsx(Kf,{min:"MANAGER",children:o.jsx(Tpe,{})})})]}),o.jsx(Oe,{path:"*",element:o.jsx(T_,{to:"/dashboard",replace:!0})})]})})})}PD.createRoot(document.getElementById("root")).render(o.jsx(T.StrictMode,{children:o.jsx(Mpe,{})}));
